-
Notifications
You must be signed in to change notification settings - Fork 13.4k
feat(item-divider): add recipe and tokens #31009
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
thetaPC
wants to merge
19
commits into
ionic-modular
Choose a base branch
from
FW-6841
base: ionic-modular
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,651
−415
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
20a4a33
feat(item-divider): add recipe and tokens
thetaPC 8295819
chore(): run build
thetaPC 38145a3
chore(item-divider): remove theme sass files
thetaPC e2cf0e4
feat(item-divider): remove theme usage
thetaPC 4b170f0
docs(item-divider): add todo for border
thetaPC c66561e
refactor(tokens): rearrange shared tokens
thetaPC fda52f5
docs(tokens): update shared file comments
thetaPC eac584c
test(item): update divider snapshots
thetaPC 87e6443
test(item): update divider snapshots again
thetaPC d9db79f
docs(item-divider, thumbnail): update todo
thetaPC 6260629
docs(item-divider): update comments
thetaPC fd9f0b5
feat(item-divider): revert-layer note font size
thetaPC 77e50df
feat(item-divider): add interface
thetaPC 3336859
feat(item-divider): cleanup
thetaPC 89bcfb4
revert(chip): import usage
thetaPC fc0b992
feat(item-divider): more cleanup
thetaPC 226beaa
refactor(theme): move baseline pixel
thetaPC 88bfce3
refactor(theme): update dynamicFont to use root
thetaPC a9f991b
fix(theme): check window
thetaPC File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
201 changes: 201 additions & 0 deletions
201
core/src/components/item-divider/item-divider.interfaces.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,201 @@ | ||
| import type { IonPadding, IonMargin } from '../../themes/themes.interfaces'; | ||
|
|
||
| export type IonItemDividerRecipe = { | ||
| background?: string; | ||
| color?: string; | ||
| minHeight?: string; | ||
|
|
||
| padding?: IonPadding; | ||
|
|
||
| inner?: { | ||
| padding?: IonPadding; | ||
| }; | ||
|
|
||
| border?: { | ||
| bottom?: string; | ||
| }; | ||
|
|
||
| font?: { | ||
| size?: string; | ||
| weight?: string; | ||
| }; | ||
|
|
||
| leading?: { | ||
| // Targets `:host([slot="start"])` | ||
| anchor?: { | ||
| margin?: IonMargin; | ||
| }; | ||
|
|
||
| // Targets `::slotted([slot="start"])` | ||
| edge?: { | ||
| margin?: IonMargin; | ||
| }; | ||
| }; | ||
|
|
||
| trailing?: { | ||
| // Targets `::slotted([slot="end"])` | ||
| edge?: { | ||
| margin?: IonMargin; | ||
| }; | ||
| }; | ||
|
|
||
| label?: { | ||
| margin?: IonMargin; | ||
| }; | ||
|
|
||
| icon?: { | ||
| font?: { | ||
| size?: string; | ||
| }; | ||
|
|
||
| leading?: { | ||
| // Targets `::slotted([slot="start"])` | ||
| edge?: { | ||
| margin?: IonMargin; | ||
| }; | ||
| }; | ||
|
|
||
| trailing?: { | ||
| // Targets `::slotted([slot="end"])` | ||
| edge?: { | ||
| margin?: IonMargin; | ||
| }; | ||
| }; | ||
|
|
||
| // Default non-semantic states | ||
| default?: { | ||
| color?: string; | ||
| }; | ||
|
|
||
| // Any of the semantic colors like primary, secondary, etc. | ||
| semantic?: { | ||
| default?: { | ||
| color?: string; | ||
| }; | ||
| }; | ||
|
Comment on lines
+66
to
+75
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This follows the same structure established in chip when it came to default vs semantic colors. |
||
| }; | ||
|
|
||
| note?: { | ||
| align?: { | ||
| self?: string; | ||
| }; | ||
|
|
||
| font?: { | ||
| size?: string; | ||
| }; | ||
|
|
||
| margin?: IonMargin; | ||
| padding?: IonPadding; | ||
| }; | ||
|
|
||
| avatar?: { | ||
| height?: string; | ||
| width?: string; | ||
|
|
||
| margin?: IonMargin; | ||
|
|
||
| leading?: { | ||
| // Targets `::slotted([slot="start"])` | ||
| edge?: { | ||
| margin?: IonMargin; | ||
| }; | ||
| }; | ||
|
|
||
| trailing?: { | ||
| // Targets `::slotted([slot="end"])` | ||
| edge?: { | ||
| margin?: IonMargin; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| thumbnail?: { | ||
| height?: string; | ||
| width?: string; | ||
|
|
||
| margin?: IonMargin; | ||
|
|
||
| leading?: { | ||
| // Targets `::slotted([slot="start"])` | ||
| edge?: { | ||
| margin?: IonMargin; | ||
| }; | ||
| }; | ||
|
|
||
| trailing?: { | ||
| // Targets `::slotted([slot="end"])` | ||
| edge?: { | ||
| margin?: IonMargin; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| header1?: { | ||
| margin?: IonMargin; | ||
| }; | ||
|
|
||
| header2?: { | ||
| margin?: IonMargin; | ||
|
|
||
| // Targets `:last-child` | ||
| trailing?: { | ||
| margin?: IonMargin; | ||
| }; | ||
| }; | ||
|
|
||
| header3?: { | ||
| margin?: IonMargin; | ||
|
|
||
| // Targets `:last-child` | ||
| trailing?: { | ||
| margin?: IonMargin; | ||
| }; | ||
| }; | ||
|
|
||
| header4?: { | ||
| margin?: IonMargin; | ||
|
|
||
| // Targets `:last-child` | ||
| trailing?: { | ||
| margin?: IonMargin; | ||
| }; | ||
| }; | ||
|
|
||
| header5?: { | ||
| margin?: IonMargin; | ||
|
|
||
| // Targets `:last-child` | ||
| trailing?: { | ||
| margin?: IonMargin; | ||
| }; | ||
| }; | ||
|
|
||
| header6?: { | ||
| margin?: IonMargin; | ||
|
|
||
| // Targets `:last-child` | ||
| trailing?: { | ||
| margin?: IonMargin; | ||
| }; | ||
| }; | ||
|
|
||
| paragraph?: { | ||
| color?: string; | ||
| overflow?: string; | ||
|
|
||
| margin?: IonMargin; | ||
|
|
||
| font?: { | ||
| size?: string; | ||
| }; | ||
|
|
||
| text?: { | ||
| overflow?: string; | ||
| }; | ||
|
|
||
| // Targets `:last-child` | ||
| trailing?: { | ||
| margin?: IonMargin; | ||
| }; | ||
| }; | ||
| }; | ||
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
core/src/components/item-divider/item-divider.ios.vars.scss
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Naming Convention: Anchors & Edges
To maintain consistency with the Ionic Modular architecture established in
ion-chip, this component adopts a shared spatial vocabulary. While chips use DOM order (:first-child), dividers use named slots (slot="start/end"). The following naming convention bridges that gap::host): Refers to the component's own placement within a parent container.leading-anchor: Targets:host([slot="start"]).trailing-anchor: Targets:host([slot="end"]).::slotted): Refers to content placed at the boundaries of the component itself.leading-edge: Targets::slotted([slot="start"]).trailing-edge: Targets::slotted([slot="end"]).Why this matters:
This mirrors the
leading(:first-child) andtrailing(:last-child) pattern used in chips. By usingleading/trailinginstead ofleft/rightorstart/end, we create a less confusing structure that developers can use with ease.