-
Notifications
You must be signed in to change notification settings - Fork 76
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
feat(chip): add component tokens #10179
Merged
+400
−360
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
9507e9a
feat(chip): refactor chip for component tokens
alisonailea c6d5f1b
test(chip): add component tokens to stories
alisonailea a7ddcc2
fix(chip): remove mouse state tokens
alisonailea b226cb9
test(chip): update e2e tests
alisonailea b052c8d
feat(chip-group): add component tokens
alisonailea 865757a
Merge branch 'dev' of github.com:Esri/calcite-design-system into ali-…
alisonailea 3b0ac61
Revert "feat(chip-group): add component tokens"
alisonailea 2332a09
fix(chip): chip element spacing
alisonailea 5fe9b0c
fix(chip): internal variables in selection states
alisonailea 819021c
fix(chip): minor issues with spacing
alisonailea 798c7c4
fix(chip): add chip-icon-color token
alisonailea f9d0ec0
fix(chip): add select and close token options
alisonailea b6e6c97
test(chip): simplify theme tests
alisonailea d9cad9a
test(chip): fix theme setup
alisonailea be4ac0f
Revert package.json in test(chip): simplify theme tests”
alisonailea a709177
refactor(chip): restore —calcite-icon-color styles
alisonailea 89fa877
Merge branch 'dev' of github.com:Esri/calcite-design-system into ali-…
alisonailea a8e74a8
Merge branch 'dev' into astump/7180-chip
alisonailea 9ce58e7
Merge branch 'dev' into astump/7180-chip
alisonailea fa3f3e7
chore(custom-theme): fix imports
alisonailea 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
fix(chip): add select and close token options
- Loading branch information
commit f9d0ec0ebd93621e9dcbdfe439169eaf6267a36b
There are no files selected for viewing
This file contains 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 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 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
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.
I think we'd at the very least want to add
--calcite-chip-icon-color
and--calcite-chip-selection-icon-color
(or whatever name) from the 7180 PR:calcite-design-system/packages/calcite-components/src/components/chip/chip.scss
Line 10 in 2c5e985
We can't just set
--calcite-icon-color
on a Calcite Chip - it has too many internally rendered icons that would be affected. The 7180 PR also had--calcite-chip-close-icon-color
(and, props to control internal close button states, which it sounds like we did not want to pursue - I still think this prevents a lot of valid use cases)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.
The design pattern for calcite-chip is for icons to follow the text color. If a user wants to have a special color they can do something like
calcite-chip.my-chip { --calicte-icon-color: red }
. Similarly. IMO, all close sub-elements (should) have the same interaction pattern with a shared token set. Something like@SkyeSeitz @ashetland
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.
Agreed they should be (ideally) consistently implemented when overridden - but not adding component-specific ones (even if it falls back to the global one) to the component means they won't be documented alongside all the other component tokens - wherever that doc is consumed (including places we can't manually supplement it with info about these generic "close-color" props).
Currently it seems like
text-color
property here also sets the selection affordance icon as well as theicon-start
icon. At the very least I'd like to be able to not have this happen (which is the current behavior):The current behavior that is available (just overriding the global css prop - changes the affordance as well as the icon, which I don't think is always preferable).
My use case for overriding an icon color is probably to match map symbology or layer display color / graphics (or something like that). So I don't think I'd want the selection icon to change as well: