-
Notifications
You must be signed in to change notification settings - Fork 89
feat(popover, action): add component tokens #10253
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
Changes from 27 commits
10668af
d0c1d93
81df053
d410806
69e0cbc
e70e1b7
a94882a
c43eab3
ea7c73d
ef7ba80
7925ef0
879d71e
f3c7b69
38795c5
0a71e83
f047f66
852b2a0
9a56f70
8daa1b5
25219e9
c9ddd1d
356f005
6d1a74c
087cbf7
2383c60
9897306
8cc2cd4
a02d0b4
dde6eee
435d74c
cb068f6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,10 @@ | |
| * | ||
| * These properties can be overridden using the component's tag as selector. | ||
| * | ||
| * @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. | ||
|
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. 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 |
||
| */ | ||
|
Contributor
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. I might expect a
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. I don't see any shadow related styling on the component. Can you expand on that?
Contributor
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. 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.
Contributor
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. let's leave the floating-ui tokens separately. |
||
|
|
||
|
|
@@ -46,42 +50,40 @@ | |
| } | ||
|
|
||
| .calcite-floating-ui-anim { | ||
| @apply bg-foreground-1 | ||
| border-color-3 | ||
| rounded | ||
| border | ||
| @apply border | ||
| border-solid; | ||
| } | ||
|
|
||
| .arrow::before { | ||
| outline: 1px solid var(--calcite-color-border-3); | ||
| background-color: var(--calcite-popover-background-color, var(--calcite-color-foreground-1)); | ||
| border-color: var(--calcite-popover-border-color, var(--calcite-color-border-3)); | ||
| border-radius: var(--calcite-popover-corner-radius, var(--calcite-corner-radius-round)); | ||
| } | ||
|
|
||
| .header { | ||
| @apply border-b-color-3 | ||
| flex | ||
| @apply flex | ||
| flex-auto | ||
| items-stretch | ||
| justify-start | ||
| border-0 | ||
| border-b | ||
| border-solid; | ||
|
|
||
| border-block-end-color: var(--calcite-popover-border-color, var(--calcite-color-border-3)); | ||
| } | ||
|
|
||
| .heading { | ||
| @apply text-color-1 | ||
| word-break | ||
| @apply word-break | ||
| m-0 | ||
| block | ||
| flex-auto | ||
| self-center | ||
| whitespace-normal | ||
| font-medium; | ||
|
|
||
| color: var(--calcite-popover-text-color, var(--calcite-color-text-1)); | ||
| } | ||
|
|
||
| .container { | ||
| @apply text-color-1 | ||
| relative | ||
| .headerContainer { | ||
| @apply relative | ||
| flex | ||
| h-full | ||
| flex-row | ||
|
|
@@ -90,6 +92,8 @@ | |
| &.has-header { | ||
| @apply flex-col; | ||
| } | ||
|
|
||
| color: var(--calcite-popover-text-color, var(--calcite-color-text-1)); | ||
| } | ||
|
|
||
| .content { | ||
|
|
@@ -105,12 +109,16 @@ | |
| .close-button-container { | ||
| @apply flex overflow-hidden; | ||
| flex: 0 0 auto; | ||
| border-start-end-radius: theme("borderRadius.DEFAULT"); | ||
| border-end-end-radius: theme("borderRadius.DEFAULT"); | ||
| } | ||
|
|
||
| .has-header .close-button-container { | ||
| 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( | ||
|
Elijbet marked this conversation as resolved.
Outdated
|
||
| --calcite-popover-corner-radius, | ||
| var(--calcite-corner-radius-sharp) | ||
| ); | ||
| --calcite-internal-action-corner-radius-end-end: var( | ||
| --calcite-popover-corner-radius, | ||
| var(--calcite-corner-radius-sharp) | ||
| ); | ||
| } | ||
|
|
||
| ::slotted(calcite-panel), | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.