-
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(popover): add component tokens #10253
base: dev
Are you sure you want to change the base?
Conversation
This is looking good Eliza! Thanks! Probably outside this PR but @macandcheese @SkyeSeitz @ashetland @jcfranco per the discussion on accordion-item header, I'm wondering if there is a larger ui pattern we should be setting here allowing component container header backgrounds to be styled separately from the body? |
packages/calcite-components/src/components/popover/popover.e2e.ts
Outdated
Show resolved
Hide resolved
packages/calcite-components/src/components/popover/popover.e2e.ts
Outdated
Show resolved
Hide resolved
packages/calcite-components/src/components/popover/resources.ts
Outdated
Show resolved
Hide resolved
Outside the scope, but I agree it might be helpful to explore this pattern. I'll defer to the rest of the group on this. |
Agreed - many components will require multiple regions of styling - Panel (and consuming components like DIalog) has "content", "header", "footer", "content-top/bottom", etc. that may all be styled separately depending on needs. Same for Block, Accordion, etc. |
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.
Looking great, @Elijbet! Just a few more tweaks and this should be good to merge.
packages/calcite-components/src/components/popover/popover.stories.ts
Outdated
Show resolved
Hide resolved
packages/calcite-components/src/components/popover/popover.e2e.ts
Outdated
Show resolved
Hide resolved
packages/calcite-components/src/components/popover/popover.e2e.ts
Outdated
Show resolved
Hide resolved
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.
🚀
* @prop --calcite-popover-background-color: Specifies the background color of the component. | ||
* @prop --calcite-popover-border-color: Specifies the border color of the component. | ||
* @prop --calcite-popover-corner-radius: Specifies the corner radius of the component. | ||
* @prop --calcite-popover-text-color: Specifies the text color of the component. | ||
* @prop --calcite-popover-z-index: Sets the z-index value for the component. | ||
*/ |
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 might expect a --calcite-popover-shadow
css property here.
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 don't see any shadow related styling on the component. Can you expand on that?
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.
It's coming from floating ui - but I don't think a user would need to know that, so maybe a pattern q of how to set that up. As a user I'd want to just set it at the component level like the other adjustments to border color, corner radius, etc.
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.
let's leave the floating-ui tokens separately.
…r close action button
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 is really close, @Elijbet! One more round and it should be good to land.
packages/calcite-components/src/components/popover/popover.scss
Outdated
Show resolved
Hide resolved
packages/calcite-components/src/components/popover/popover.scss
Outdated
Show resolved
Hide resolved
* @prop --calcite-popover-background-color: Specifies the background color of the component. | ||
* @prop --calcite-popover-border-color: Specifies the border color of the component. | ||
* @prop --calcite-popover-corner-radius: Specifies the corner radius of the component. | ||
* @prop --calcite-popover-text-color: Specifies the text color of the component. | ||
* @prop --calcite-popover-z-index: Sets the z-index value for the component. |
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.
Sidebar: can we deprecate component-specific z-indices? We should be using the semantic z-indices instead to adjust different layers. cc @alisonailea @driskull @macandcheese
packages/calcite-components/src/components/popover/popover.e2e.ts
Outdated
Show resolved
Hide resolved
border-end-end-radius: none; | ||
border-start-end-radius: var(--calcite-popover-corner-radius, var(--calcite-corner-radius-round)); | ||
border-end-end-radius: var(--calcite-popover-corner-radius, var(--calcite-corner-radius-round)); | ||
--calcite-internal-action-corner-radius-start-end: var( |
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.
Shouldn't this be setting the public action CSS props?
--calcite-action-corner-radius-end-end, | ||
var( | ||
--calcite-action-corner-radius, | ||
var(--calcite-internal-action-corner-radius-end-end, var(--calcite-corner-radius)) |
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.
Should the internal CSS prop be defined in this file?
Related Issue: #7180
Summary
Add
popover
component tokens.--calcite-popover-background-color
: Specifies the background color of the component.--calcite-popover-border-color
: Specifies the border color of the component.--calcite-popover-corner-radius
: Specifies the corner radius of the component.--calcite-popover-text-color
: Specifies the text color of the component.