-
Notifications
You must be signed in to change notification settings - Fork 13.4k
feat(chip): add recipe and variables #30873
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
base: ionic-modular
Are you sure you want to change the base?
Changes from all commits
e729dea
0d6bd9d
ade5c05
0349ff7
ee81a8a
c6dfb10
e795c61
39bfce5
b67f4f5
9ecb103
7040091
098cba4
55b610a
918582b
3e5236c
b90fe18
2f71c0a
32c7471
da0a9a6
28d61aa
d616dee
2c9b1f1
d830d48
68a19fd
fdaafcd
c07ef36
b419a9c
3111d64
0db9f57
ef79c8d
626bace
92edc69
beaf349
4dd7e23
61dce8e
e36b9bb
94b9288
98bf385
401ef1f
683093d
ee18ef3
cf6a2fd
c680ee2
95aeea4
6ae28ab
fd0f67f
66fd3f3
ce86297
85989fc
f425a07
d927c57
a710962
83c948e
81ec32f
36301c8
67b6342
f2bf154
7b37035
f462318
018b259
04377ad
b1737f0
2529db8
07e1cf3
efd95f0
9f6383c
369492e
294ab5b
b5686f3
e1b12d1
e28b7a1
2b93e77
8524e2c
5bb8352
ef4f820
41b1917
145fdb1
1e05746
f8f0452
62cf46b
edb9556
c84cc73
f772f13
b2e7e0c
b76e23c
fb7c836
01106c2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
brandyscarney marked this conversation as resolved.
Show resolved
Hide resolved
|
|
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. These changes for
|
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,157 @@ | ||||||||||||||||||
| import type { IonPadding, IonMargin } from '../../themes/themes.interfaces.js'; | ||||||||||||||||||
|
|
||||||||||||||||||
| export type IonChipRecipe = { | ||||||||||||||||||
| cursor?: string; | ||||||||||||||||||
brandyscarney marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||
| margin?: IonMargin; | ||||||||||||||||||
|
|
||||||||||||||||||
| font?: { | ||||||||||||||||||
| weight?: string | number; | ||||||||||||||||||
| }; | ||||||||||||||||||
|
|
||||||||||||||||||
| gap?: string | number; | ||||||||||||||||||
|
Member
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. Gap seems like a weird property to define here - shouldn't this be determined by spacing somehow? |
||||||||||||||||||
| lineHeight?: string | number; | ||||||||||||||||||
| letterSpacing?: string | number; | ||||||||||||||||||
|
|
||||||||||||||||||
| padding?: IonPadding; | ||||||||||||||||||
|
|
||||||||||||||||||
| // Sizes | ||||||||||||||||||
| size: { | ||||||||||||||||||
| small: IonChipSizeDefinition; | ||||||||||||||||||
| large: IonChipSizeDefinition; | ||||||||||||||||||
| }; | ||||||||||||||||||
|
Comment on lines
+18
to
+21
Member
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.
Suggested change
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. Why would these be considered as optional? We don't define |
||||||||||||||||||
|
|
||||||||||||||||||
| // States | ||||||||||||||||||
| state?: { | ||||||||||||||||||
| disabled?: { | ||||||||||||||||||
| opacity?: string | number; | ||||||||||||||||||
| }; | ||||||||||||||||||
|
|
||||||||||||||||||
| focus?: { | ||||||||||||||||||
| ring?: { | ||||||||||||||||||
| color?: string; | ||||||||||||||||||
| width?: string | number; | ||||||||||||||||||
| }; | ||||||||||||||||||
| }; | ||||||||||||||||||
| }; | ||||||||||||||||||
|
|
||||||||||||||||||
| // Shapes | ||||||||||||||||||
| shape: { | ||||||||||||||||||
| soft: IonChipShapeDefinition; | ||||||||||||||||||
| round: IonChipShapeDefinition; | ||||||||||||||||||
| rectangular: IonChipShapeDefinition; | ||||||||||||||||||
| }; | ||||||||||||||||||
|
|
||||||||||||||||||
| // Hues | ||||||||||||||||||
| hue?: { | ||||||||||||||||||
| bold?: IonChipHueDefinition; | ||||||||||||||||||
| subtle?: IonChipHueDefinition; | ||||||||||||||||||
| }; | ||||||||||||||||||
|
|
||||||||||||||||||
| // Fills | ||||||||||||||||||
|
|
||||||||||||||||||
| fill?: { | ||||||||||||||||||
| outline: { | ||||||||||||||||||
|
Member
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.
Suggested change
|
||||||||||||||||||
| bg?: string; | ||||||||||||||||||
|
|
||||||||||||||||||
| border: { | ||||||||||||||||||
|
Member
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.
Suggested change
|
||||||||||||||||||
| color?: HueRef; | ||||||||||||||||||
| width?: string | number; | ||||||||||||||||||
| }; | ||||||||||||||||||
|
|
||||||||||||||||||
| // Any of the semantic colors like primary, secondary, etc. | ||||||||||||||||||
| semantic?: { | ||||||||||||||||||
| bg?: HueRef; | ||||||||||||||||||
|
|
||||||||||||||||||
| border?: { | ||||||||||||||||||
| color?: HueRef; | ||||||||||||||||||
| }; | ||||||||||||||||||
| }; | ||||||||||||||||||
|
|
||||||||||||||||||
| state?: IonChipVariantState; | ||||||||||||||||||
| }; | ||||||||||||||||||
| }; | ||||||||||||||||||
|
|
||||||||||||||||||
| icon: IonChipIconDefinition; | ||||||||||||||||||
|
Member
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.
Suggested change
|
||||||||||||||||||
| avatar?: IonChipMediaDefinition; | ||||||||||||||||||
| }; | ||||||||||||||||||
|
|
||||||||||||||||||
| type IonChipSizeDefinition = { | ||||||||||||||||||
| minHeight: string | number; | ||||||||||||||||||
|
Member
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.
Suggested change
|
||||||||||||||||||
|
|
||||||||||||||||||
| font: { | ||||||||||||||||||
| size: string | number; | ||||||||||||||||||
brandyscarney marked this conversation as resolved.
Show resolved
Hide resolved
Comment on lines
+81
to
+82
Member
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.
Suggested change
|
||||||||||||||||||
| }; | ||||||||||||||||||
| }; | ||||||||||||||||||
|
|
||||||||||||||||||
| type IonChipShapeDefinition = { | ||||||||||||||||||
| border: { | ||||||||||||||||||
| radius: string | number; | ||||||||||||||||||
|
Member
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. We need to determine a standard for when to do this vs
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. My thought is that if there are multiple properties that share the same prefix then we should split them:
Comment on lines
+87
to
+88
Member
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.
Suggested change
|
||||||||||||||||||
| }; | ||||||||||||||||||
| }; | ||||||||||||||||||
|
|
||||||||||||||||||
| type IonChipHueDefinition = { | ||||||||||||||||||
| bg: string; | ||||||||||||||||||
| color: string; | ||||||||||||||||||
|
Comment on lines
+93
to
+94
Member
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.
Suggested change
|
||||||||||||||||||
|
|
||||||||||||||||||
| semantic?: { | ||||||||||||||||||
| bg?: string; | ||||||||||||||||||
| color?: string; | ||||||||||||||||||
| state?: IonChipInteractionStates; | ||||||||||||||||||
| }; | ||||||||||||||||||
|
|
||||||||||||||||||
| state?: IonChipInteractionStates; | ||||||||||||||||||
| }; | ||||||||||||||||||
|
|
||||||||||||||||||
| type IonChipInteractionStates = { | ||||||||||||||||||
| focus?: { | ||||||||||||||||||
| bg?: string; | ||||||||||||||||||
| }; | ||||||||||||||||||
|
|
||||||||||||||||||
| hover?: { | ||||||||||||||||||
| bg?: string; | ||||||||||||||||||
| }; | ||||||||||||||||||
|
|
||||||||||||||||||
| activated?: { | ||||||||||||||||||
| bg?: string; | ||||||||||||||||||
| }; | ||||||||||||||||||
| }; | ||||||||||||||||||
|
|
||||||||||||||||||
| type IonChipVariantState = { | ||||||||||||||||||
|
Member
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. Do we need this when it matches |
||||||||||||||||||
| focus?: { | ||||||||||||||||||
| bg?: HueRef; | ||||||||||||||||||
| }; | ||||||||||||||||||
| hover?: { | ||||||||||||||||||
| bg?: HueRef; | ||||||||||||||||||
| }; | ||||||||||||||||||
| activated?: { | ||||||||||||||||||
| bg?: HueRef; | ||||||||||||||||||
| }; | ||||||||||||||||||
| }; | ||||||||||||||||||
|
|
||||||||||||||||||
| type HueRef = { | ||||||||||||||||||
| bold?: string; | ||||||||||||||||||
| subtle?: string; | ||||||||||||||||||
| }; | ||||||||||||||||||
|
|
||||||||||||||||||
| type IonChipMediaDefinition = { | ||||||||||||||||||
| size: string | number; | ||||||||||||||||||
|
Member
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.
Suggested change
Member
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. Should this be |
||||||||||||||||||
|
|
||||||||||||||||||
| // Styles for the media component only if it is the first element in the slot | ||||||||||||||||||
| firstChild?: { | ||||||||||||||||||
| margin?: IonMargin; | ||||||||||||||||||
| }; | ||||||||||||||||||
| // Styles for the media component only if it is the last element in the slot | ||||||||||||||||||
| lastChild?: { | ||||||||||||||||||
| margin?: IonMargin; | ||||||||||||||||||
| }; | ||||||||||||||||||
| }; | ||||||||||||||||||
|
|
||||||||||||||||||
| type IonChipIconDefinition = IonChipMediaDefinition & { | ||||||||||||||||||
| color?: string; | ||||||||||||||||||
| }; | ||||||||||||||||||
|
|
||||||||||||||||||
| export type IonChipConfig = { | ||||||||||||||||||
| hue?: 'bold' | 'subtle'; | ||||||||||||||||||
| size?: 'small' | 'large'; | ||||||||||||||||||
| shape?: 'soft' | 'round' | 'rectangular'; | ||||||||||||||||||
| }; | ||||||||||||||||||
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.
These changes for
iosare happening becauseroundinstead ofsoft.subtleinstead ofbold.