-
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(action): add component tokens #8836
Conversation
…igation, panel, pick-list-item, popover, stepper, tip-manager, tip): add sub-component token mappings
packages/calcite-components/src/components/pick-list-item/pick-list-item.scss
Outdated
Show resolved
Hide resolved
This reverts part of commit 0181b49.
packages/calcite-components/src/components/action/action.e2e.ts
Outdated
Show resolved
Hide resolved
This reverts part of commit 2ea9865.
packages/calcite-components/src/components/action/action.e2e.ts
Outdated
Show resolved
Hide resolved
…avigation, panel, popover, stepper, tip-manager, tip): sort docs alphabetically
…components into astump/7180-action # Conflicts: # packages/calcite-components/src/components/action-group/action-group.scss # packages/calcite-components/src/components/action-menu/action-menu.scss # packages/calcite-components/src/components/menu-item/menu-item.scss # packages/calcite-components/src/components/panel/panel.scss
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.
Just some more cleanup then it should be good to go.
A class is preferred instead of an element selector incase another button element is added inside the component for some state. Its better to be specific.
No it's not. This is a coding approach recommended for large React applications and LightDom elements, not web components. There is no use case in which a simple action element should have more than one button. |
packages/calcite-components/src/components/menu-item/menu-item.scss
Outdated
Show resolved
Hide resolved
packages/calcite-components/src/components/menu-item/menu-item.scss
Outdated
Show resolved
Hide resolved
packages/calcite-components/src/components/stepper/stepper.scss
Outdated
Show resolved
Hide resolved
packages/calcite-components/src/components/navigation/navigation.scss
Outdated
Show resolved
Hide resolved
It seems like we just need to clarify in our coding guidelines for when its appropriate to use an element as a selector vs a class. In action, it may be perfectly fine since there will likely only be one We also have this guideline which we've been not really doing: cc @jcfranco |
… flow-item, action-menu, action-group, action-bar): add mapped state tokens for action when a dependency
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.
Changes look good to me once other feedback is addressed 🎉 🌮
…components into astump/7180-action # Conflicts: # packages/calcite-components/src/components/input/input.scss
@alisonailea @driskull Let’s discuss this after we wrap up #7180. Minor cleanup and collateral refactoring are expected, but the changing of classes for element selectors are slightly beyond what’s required for the issue. I’m open to adjusting our approach. Here’s a quick overview on our current pattern: • it provides an abstraction layer that helps refactor the component internals without affecting styles and testing |
Related Issue: #7180
Summary
Action
--calcite-action-indicator-color: Specifies the color of the component's indicator.
--calcite-action-background-color: Specifies the background color of the component.
--calcite-action-text-color: Specifies the text color of the component.
Action Bar
--calcite-action-bar-action-indicator-color: defines the indicator color of an action sub-component inside the component.
--calcite-action-bar-action-background-color: defines the background color of an action sub-component inside the component.
--calcite-action-bar-action-text-color: defines the text color of an action sub-component inside the component.
Action Group
--calcite-action-group-action-indicator-color: defines the indicator color of an action sub-component inside the component.
--calcite-action-group-action-background-color: defines the background color of an action sub-component inside the component.
--calcite-action-group-action-text-color: defines the text color of an action sub-component inside the component.
Action Menu
--calcite-action-menu-action-indicator-color: defines the indicator color of an action sub-component inside the component.
--calcite-action-menu-action-background-color: defines the background color of an action sub-component inside the component.
--calcite-action-menu-action-text-color: defines the text color of an action sub-component inside the component.
Flow Item
--calcite-flow-item-action-indicator-color: defines the indicator color of an action sub-component inside the component.
--calcite-flow-item-action-background-color: defines the background color of an action sub-component inside the component.
--calcite-flow-item-action-text-color: defines the text color of an action sub-component inside the component.
Menu Item
--calcite-menu-item-action-indicator-color: defines the indicator color of an action sub-component inside a menu-item.
--calcite-menu-item-action-background-color: defines the background color of an action sub-component inside a menu-item.
--calcite-menu-item-action-text-color: defines the text color of an action sub-component inside a menu-item.
Navigation
--calcite-navigation-action-indicator-color: defines the indicator color of an action sub-component inside the component.
--calcite-navigation-action-background-color: defines the background color of an action sub-component inside the component.
--calcite-navigation-action-text-color: defines the text color of an action sub-component inside the component.
Panel
--calcite-panel-action-indicator-color: defines the indicator color of an action sub-component inside the component.
--calcite-panel-action-background-color: defines the background color of an action sub-component inside the component.
--calcite-panel-action-text-color: defines the text color of an action sub-component inside the component.
Popover
--calcite-popover-action-indicator-color: defines the indicator color of an action sub-component inside the component.
--calcite-popover-action-background-color: defines the background color of an action sub-component inside the component.
--calcite-popover-action-text-color: defines the text color of an action sub-component inside the component.
Stepper
--calcite-stepper-action-indicator-color: defines the indicator color of an action sub-component inside the component.
--calcite-stepper-action-background-color: defines the background color of an action sub-component inside the component.
--calcite-stepper-action-text-color: defines the text color of an action sub-component inside the component.
Tip Manager
--calcite-tip-manager-action-indicator-color: defines the indicator color of an action sub-component inside the component.
--calcite-tip-manager-action-background-color: defines the background color of an action sub-component inside the component.
--calcite-tip-manager-action-text-color: defines the text color of an action sub-component inside the component.
Tip
--calcite-tip-action-indicator-color: defines the indicator color of an action sub-component inside the component.
--calcite-tip-action-background-color: defines the background color of an action sub-component inside the component.
--calcite-tip-action-text-color: defines the text color of an action sub-component inside the component.