-
Notifications
You must be signed in to change notification settings - Fork 77
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): enhance component's interactivity states #11538
feat(chip): enhance component's interactivity states #11538
Conversation
Didn't see any existing stories that would capture these new visual changes. Could you create a new story that shows all of these chip combinations so we can visually capture them with Chromatic? If you make a new one, you can add the |
…ciado88/10005-chip-enhance-component-interactivity-states
@eriklharper I added stories to cover the new visual changes. |
Hey @aPreciado88 ! Just saw this come in: #9085 Could you drop the |
@ashetland @SkyeSeitz Can you please take a look? 👀 |
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.
🚀
@@ -108,6 +108,95 @@ | |||
opacity: 1; | |||
} | |||
|
|||
:host([appearance="solid"]) { |
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.
Would internal CSS props help simplify this?
.container {
&.selectable {
&:active {
background-color: var(--calcite-internal-chip-selectable-active-background-color);
border-color: var(--calcite-internal-chip-selectable-active-border-color);
}
&:hover {
background-color: var(--calcite-internal-chip-selectable-hover-background-color);
border-color: var(--calcite-internal-chip-selectable-hover-border-color);
}
}
:host([appearance="solid"]) {
&:host([kind="neutral"]) {
// using illustrative names
--calcite-internal-chip-selectable-active-background-color: var(--calcite-color-a);
--calcite-internal-chip-selectable-active-border-color: transparent;
--calcite-internal-chip-selectable-hover-background-color: var(--calcite-color-c);
--calcite-internal-chip-selectable-hover-border-color: transparent;
}
}
// ...
This can be done in a follow-up if feasible.
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 can take a look at this and create a follow-up issue if it's feasible.
@@ -105,3 +105,79 @@ export const darkThemeRTL_TestOnly = (): string => html` | |||
`; | |||
|
|||
darkThemeRTL_TestOnly.parameters = { themes: modesDarkDefault }; | |||
|
|||
export const interactivityStates_TestOnly = (): string => html` | |||
<div style="width:500px; max-width:100%; background-color:white; padding:100px"> |
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.
This might not be the case, but let’s remove any non-essential inline styles for the test to keep it as focused and simple as possible.
A thing of beauty! 🍾 🚀 |
Related Issue: #10005
Summary
Update
chip
's interactivity states forchip-group
's with selection modes.appearance=“solid” kind=“neutral”
:hover
background-color
to--calcite-color-foreground-3
.active
background-color
to--calcite-color-border-3
.appearance=“solid” kind=“inverse”
:hover
background-color
to--calcite-color-inverse-hover
.active
background-color
to--calcite-color-inverse-press
.appearance=“solid” kind=“brand”
:hover
background-color
to--calcite-color-brand-hover
.active
background-color
to--calcite-color-brand-press
.appearance=“outline-fill” kind=“neutral”
:hover
background-color
to--calcite-color-foreground-2
.hover
border-color
to--calcite-color-border-input
.active
background-color
to--calcite-color-foreground-3
.active
border-color
to--calcite-color-text-3
.appearance=“outline-fill” kind=“inverse | brand”
:hover
background-color
to--calcite-color-foreground-2
.active
background-color
to--calcite-color-foreground-3
.appearance=“outline” kind=“neutral”
:hover
background-color
to--calcite-color-transparent-hover
.hover
border-color
to--calcite-color-border-input
.active
background-color
to--calcite-color-transparent-press
.active
border-color
to--calcite-color-text-3
.appearance=“outline” kind=“inverse | brand”
:hover
background-color
to--calcite-color-transparent-hover
.active
background-color
to--calcite-color-transparent-press
.