Skip to content
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(panel): Add component tokens #10822

Merged
merged 16 commits into from
Nov 21, 2024
Merged

Conversation

macandcheese
Copy link
Contributor

@macandcheese macandcheese commented Nov 21, 2024

Related Issue: #7180

This will also serve as a pattern for consuming component like Dialog, Sheet, etc.

Summary

--calcite-panel-corner-radius: Specifies the corner radius of the component.
--calcite-panel-heading-text-color: Specifies the text color of the component's heading.
--calcite-panel-description-text-color: Specifies the text color of the component's description.
--calcite-panel-border-color: Specifies the border color of the component.

--calcite-panel-background-color: Specifies the background color of the component.
--calcite-panel-header-background-color: Specifies the background color of the component's footer.
--calcite-panel-footer-background-color: Specifies the background color of the component's footer.

--calcite-panel-space: Specifies the padding of the component's "unnamed (default)" slot.
--calcite-panel-header-content-space: Specifies the padding of the "header-content" slot.
--calcite-panel-footer-space: Specifies the padding of the component's footer.

--calcite-action-background-color: Specifies the background color of the component's closable, collapsible, and back Action components. Will apply to any slotted Calcite Action components.
--calcite-action-background-color-hover: Specifies the background color of the component's closable, collapsible, and back Action components when hovered. Will apply to any slotted Calcite Action components.
--calcite-action-background-color-pressed: Specifies the background color of the component's closable, collapsible, and back Action components when pressed. Will apply to any slotted Calcite Action components.
--calcite-action-text-color-hover: Specifies the text and icon color of the component's closable, collapsible, and back Action components when hovered. Will apply to any slotted Calcite Action components.
--calcite-action-text-color-pressed: Specifies the text and icon color of the component's closable, collapsible, and back Action components when pressed. Will apply to any slotted Calcite Action components.
--calcite-popover-border-color: Specifies the border color of the component's Calcite Popover component, which is used to display a Calcite Action Menu when slotted Calcite Actions are present in the header-actions-end slot. Will apply to any slotted Calcite Popover components.

--calcite-panel-content-space: [Deprecated] Specifies the padding of the component's content. Use --calcite-panel-space instead.
--calcite-panel-footer-padding: [Deprecated] Specifies the padding of the component's footer. Use --calcite-panel-footer-space instead.
--calcite-panel-header-border-block-end: [Deprecated] Specifies the component header's block end border. Use --calcite-panel-border-color instead.

@github-actions github-actions bot added the enhancement Issues tied to a new feature or request. label Nov 21, 2024
@macandcheese macandcheese added design-tokens Issues requiring design tokens. pr ready for visual snapshots Adding this label will run visual snapshot testing. labels Nov 21, 2024
@macandcheese macandcheese added pr ready for visual snapshots Adding this label will run visual snapshot testing. and removed pr ready for visual snapshots Adding this label will run visual snapshot testing. labels Nov 21, 2024
Copy link
Contributor

@alisonailea alisonailea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just a couple of small things.

* @prop --calcite-action-background-color-pressed: Specifies the background color of the component's `closable`, `collapsible`, and `back` Action components when pressed. Will apply to any slotted Calcite Action components.
* @prop --calcite-action-text-color-hover: Specifies the text and icon color of the component's `closable`, `collapsible`, and `back` Action components when hovered. Will apply to any slotted Calcite Action components.
* @prop --calcite-action-text-color-pressed: Specifies the text and icon color of the component's `closable`, `collapsible`, and `back` Action components when pressed. Will apply to any slotted Calcite Action components.
* @prop --calcite-popover-border-color: Specifies the border color of the component's internally rendered Popover component, which is rendered within an Action Menu when slotted Actions are present in the `header-actions-end` slot. Will apply to any slotted Calcite Popover components.
*/

:host {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

border-radius needs to be added to the :host or the component doesn't look right.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I don't know if this component needs @extend %component-host; at all which places that visible background that isn't clipped. Might be able to remove that and not have to set the radius on :host

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to just take what was needed from %component-host and not set a background color on :host. Could you verify: https://www.chromatic.com/build?appId=6266d45509d7eb004aa254fb&number=6466

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going to merge in.

Copy link
Contributor

@alisonailea alisonailea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@macandcheese macandcheese added pr ready for visual snapshots Adding this label will run visual snapshot testing. and removed pr ready for visual snapshots Adding this label will run visual snapshot testing. labels Nov 21, 2024
@macandcheese macandcheese added pr ready for visual snapshots Adding this label will run visual snapshot testing. and removed pr ready for visual snapshots Adding this label will run visual snapshot testing. labels Nov 21, 2024
@macandcheese macandcheese merged commit e8228b1 into dev Nov 21, 2024
10 checks passed
@macandcheese macandcheese deleted the macandcheese/panel-tokens-lumina branch November 21, 2024 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design-tokens Issues requiring design tokens. enhancement Issues tied to a new feature or request. pr ready for visual snapshots Adding this label will run visual snapshot testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants