diff --git a/documentation/Color system.md b/documentation/Color system.md deleted file mode 100644 index 9f9f36c4305..00000000000 --- a/documentation/Color system.md +++ /dev/null @@ -1,295 +0,0 @@ -## Table of contents - -- [surface](#surface) -- [onSurface](#onSurface) -- [interactive](#interactive) -- [secondary](#secondary) -- [primary](#primary) -- [critical](#critical) -- [warning](#warning) -- [highlight](#highlight) -- [success](#success) -- [decorative](#decorative) -- [Overrides](#Overrides) - -## surface - -[↑ Back to top](#table-of-contents) - -The surface role is used for the backgrounds of the UI. With a light color scheme, surface colors are nearly white, while in a dark color scheme, surface colors are nearly black. The color passed to the surface role impacts the rest of the color roles and their variants, adjusting them for light or dark contexts. - -| CSS variable | Description | Light mode | Dark mode | -| ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -|
--p-background
| For use as a background color, in components such as Page and Frame backgrounds. | ![](https://www.gifpng.com/64x64/f6f6f7/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#f6f6f7 | ![](https://www.gifpng.com/64x64/0b0c0d/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#0b0c0d | -|
--p-background-hovered
| For use when an action or navigation is used on a background. | ![](https://www.gifpng.com/64x64/f1f2f3/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#f1f2f3 | ![](https://www.gifpng.com/64x64/0b0c0d/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#0b0c0d | -|
--p-background-pressed
| For use when an action or navigation is used on a background. | ![](https://www.gifpng.com/64x64/edeeef/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#edeeef | ![](https://www.gifpng.com/64x64/0b0c0d/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#0b0c0d | -|
--p-background-selected
| For use in the selected item in navigation | ![](https://www.gifpng.com/64x64/edeeef/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#edeeef | ![](https://www.gifpng.com/64x64/0b0c0d/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#0b0c0d | -|
--p-surface
| For use as a background color, in components such as Card, Modal, and Popover. | ![](https://www.gifpng.com/64x64/ffffff/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#ffffff | ![](https://www.gifpng.com/64x64/202123/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#202123 | -|
--p-surface-neutral
| For use as a background color in neutral badges. | ![](https://www.gifpng.com/64x64/e4e5e7/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#e4e5e7 | ![](https://www.gifpng.com/64x64/313335/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#313335 | -|
--p-surface-neutral-hovered
| For use as a hovered background color in neutral badges. | ![](https://www.gifpng.com/64x64/dbdddf/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#dbdddf | ![](https://www.gifpng.com/64x64/313335/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#313335 | -|
--p-surface-neutral-pressed
| For use as a pressed background color in neutral badges. | ![](https://www.gifpng.com/64x64/c9ccd0/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#c9ccd0 | ![](https://www.gifpng.com/64x64/313335/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#313335 | -|
--p-surface-neutral-disabled
| For use as a disabled background color in neutral badges. | ![](https://www.gifpng.com/64x64/f1f2f3/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#f1f2f3 | ![](https://www.gifpng.com/64x64/313335/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#313335 | -|
--p-surface-neutral-subdued
| For use as a background color in neutral banners. | ![](https://www.gifpng.com/64x64/f6f6f7/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#f6f6f7 | ![](https://www.gifpng.com/64x64/44474a/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#44474a | -|
--p-surface-subdued
| For use as a subdued background color, in components such as Card, Modal, and Popover. | ![](https://www.gifpng.com/64x64/fafbfb/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#fafbfb | ![](https://www.gifpng.com/64x64/1a1c1d/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#1a1c1d | -|
--p-surface-disabled
| For use as a surface color on disabled interactive elements such as option list items and action list items when in a disabled state. | ![](https://www.gifpng.com/64x64/fafbfb/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#fafbfb | ![](https://www.gifpng.com/64x64/1a1c1d/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#1a1c1d | -|
--p-surface-hovered
| For use as a surface color on interactive elements such as resource list items and action list items when in a hovered state. | ![](https://www.gifpng.com/64x64/f6f6f7/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#f6f6f7 | ![](https://www.gifpng.com/64x64/2f3133/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#2f3133 | -|
--p-surface-pressed
| For use as a surface color on interactive elements such as resource list items and action list items when in a pressed state. | ![](https://www.gifpng.com/64x64/f1f2f3/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#f1f2f3 | ![](https://www.gifpng.com/64x64/3e4043/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#3e4043 | -|
--p-surface-depressed
| For use as a surface color on interactive elements such as resource list items and action list items when in a depressed state. | ![](https://www.gifpng.com/64x64/edeeef/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#edeeef | ![](https://www.gifpng.com/64x64/505356/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#505356 | -|
--p-surface-search-field
| For use as a background color, in components on surface elements such as SearchField | ![](https://www.gifpng.com/64x64/f1f2f3/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#f1f2f3 | ![](https://www.gifpng.com/64x64/2f3133/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#2f3133 | -|
--p-backdrop
| For use as the background color of the backdrop component for navigation and modal. This color has an alpha of `0.5`. | ![](https://www.gifpng.com/64x64/000000/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#000000 | ![](https://www.gifpng.com/64x64/000000/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#000000 | -|
--p-overlay
| For use as the background color of elements which lay on top of surfaces to obscure their contents. This color has an alpha of `0.5`. | ![](https://www.gifpng.com/64x64/ffffff/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#ffffff | ![](https://www.gifpng.com/64x64/212121/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#212121 | -|
--p-shadow-from-dim-light
| For use in building shadows for modals. This color has an alpha of `0.02`. | ![](https://www.gifpng.com/64x64/000000/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#000000 | ![](https://www.gifpng.com/64x64/ffffff/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#ffffff | -|
--p-shadow-from-ambient-light
| For use in building shadows for popovers, and cards. This color has an alpha of `0.05`. | ![](https://www.gifpng.com/64x64/171818/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#171818 | ![](https://www.gifpng.com/64x64/171818/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#171818 | -|
--p-shadow-from-direct-light
| For use in building shadows for popovers and cards. This color has an alpha of `0.15`. | ![](https://www.gifpng.com/64x64/000000/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#000000 | ![](https://www.gifpng.com/64x64/ffffff/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#ffffff | -|
--p-hint-from-direct-light
| For use in building shadows scrollables. | ![](https://www.gifpng.com/64x64/000000/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#000000 | ![](https://www.gifpng.com/64x64/b9b9b9/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#b9b9b9 | - ---- - -## onSurface - -[↑ Back to top](#table-of-contents) - -The onSurface role is made up of elements which appear on top of a surface, including borders, secondary icons, and text. When a light surface is provided, onSurface values will be dark. When a dark surface is provided, onSurface values will be light. - -| CSS variable | Description | Light mode | Dark mode | -| ------------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -|
--p-border
| For use as the default border on elements. | ![](https://www.gifpng.com/64x64/8c9196/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#8c9196 | ![](https://www.gifpng.com/64x64/505356/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#505356 | -|
--p-border-neutral-subdued
| For use as the border on banners. | ![](https://www.gifpng.com/64x64/babfc3/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#babfc3 | ![](https://www.gifpng.com/64x64/82878b/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#82878b | -|
--p-border-hovered
| Used for borders on hovered interactive elements | ![](https://www.gifpng.com/64x64/999ea4/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#999ea4 | ![](https://www.gifpng.com/64x64/505356/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#505356 | -|
--p-border-disabled
| Used for disabled borders on interactive elements | ![](https://www.gifpng.com/64x64/d2d5d8/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#d2d5d8 | ![](https://www.gifpng.com/64x64/676b6f/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#676b6f | -|
--p-border-subdued
| For use as a subdued border on elements. | ![](https://www.gifpng.com/64x64/c9cccf/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#c9cccf | ![](https://www.gifpng.com/64x64/82878b/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#82878b | -|
--p-border-depressed
| For use as a border on depressed elements. | ![](https://www.gifpng.com/64x64/575959/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#575959 | ![](https://www.gifpng.com/64x64/8e9191/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#8e9191 | -|
--p-border-shadow
| For use as an additional bottom border on elements. | ![](https://www.gifpng.com/64x64/aeb4b9/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#aeb4b9 | ![](https://www.gifpng.com/64x64/5b5f62/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#5b5f62 | -|
--p-border-shadow-subdued
| For use as an additional, subdued bottom border on elements. | ![](https://www.gifpng.com/64x64/babfc4/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#babfc4 | ![](https://www.gifpng.com/64x64/82878b/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#82878b | -|
--p-divider
| For use as a divider between elements. | ![](https://www.gifpng.com/64x64/e1e3e5/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#e1e3e5 | ![](https://www.gifpng.com/64x64/454749/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#454749 | -|
--p-icon
| For use as the fill color of icons. | ![](https://www.gifpng.com/64x64/5c5f62/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#5c5f62 | ![](https://www.gifpng.com/64x64/a6acb2/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#a6acb2 | -|
--p-icon-hovered
| For use as the fill color of hovered icons. | ![](https://www.gifpng.com/64x64/1a1c1d/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#1a1c1d | ![](https://www.gifpng.com/64x64/e1e3e5/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#e1e3e5 | -|
--p-icon-pressed
| For use as the fill color of pressed icons. | ![](https://www.gifpng.com/64x64/44474a/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#44474a | ![](https://www.gifpng.com/64x64/a6acb2/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#a6acb2 | -|
--p-icon-disabled
| For use as the fill color of disabled icons. | ![](https://www.gifpng.com/64x64/babec3/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#babec3 | ![](https://www.gifpng.com/64x64/54575a/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#54575a | -|
--p-icon-subdued
| For use as the fill color of subdued icons. | ![](https://www.gifpng.com/64x64/8c9196/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#8c9196 | ![](https://www.gifpng.com/64x64/787d81/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#787d81 | -|
--p-text
| For use as a text color. | ![](https://www.gifpng.com/64x64/202223/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#202223 | ![](https://www.gifpng.com/64x64/e3e5e7/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#e3e5e7 | -|
--p-text-disabled
| For use as a disabled text color and as a placeholder text color. | ![](https://www.gifpng.com/64x64/8c9196/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#8c9196 | ![](https://www.gifpng.com/64x64/6f7377/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#6f7377 | -|
--p-text-subdued
| For use as a subdued text color. | ![](https://www.gifpng.com/64x64/6d7175/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#6d7175 | ![](https://www.gifpng.com/64x64/999fa4/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#999fa4 | - ---- - -## interactive - -[↑ Back to top](#table-of-contents) - -The interactive role is used to express interactivity in components. It is used in links, as an indicator of focus, and as an indicator of selected interactive states. - -| CSS variable | Description | Light mode | Dark mode | -| --------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -|
--p-interactive
| Used for links, plain buttons, and as the fill color for selected checkboxes and radio buttons. | ![](https://www.gifpng.com/64x64/2c6ecb/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#2c6ecb | ![](https://www.gifpng.com/64x64/36a3ff/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#36a3ff | -|
--p-interactive-disabled
| Used for disabled links and plain buttons. | ![](https://www.gifpng.com/64x64/bdc1cc/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#bdc1cc | ![](https://www.gifpng.com/64x64/2662b6/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#2662b6 | -|
--p-interactive-hovered
| Used for hovered links and plain buttons. | ![](https://www.gifpng.com/64x64/1f5199/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#1f5199 | ![](https://www.gifpng.com/64x64/67afff/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#67afff | -|
--p-interactive-pressed
| Used for pressed links and plain buttons. | ![](https://www.gifpng.com/64x64/103262/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#103262 | ![](https://www.gifpng.com/64x64/88bcff/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#88bcff | -|
--p-focused
| For use in the focus ring on interactive elements. | ![](https://www.gifpng.com/64x64/458fff/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#458fff | ![](https://www.gifpng.com/64x64/2662b6/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#2662b6 | -|
--p-surface-selected
| For use as a surface color in selected interactive elements, in components such as action list and resource list. | ![](https://www.gifpng.com/64x64/f2f7fe/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#f2f7fe | ![](https://www.gifpng.com/64x64/020e23/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#020e23 | -|
--p-surface-selected-hovered
| For use as a surface color in selected interactive elements that are hovered, in components such as action list and resource list. | ![](https://www.gifpng.com/64x64/edf4fe/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#edf4fe | ![](https://www.gifpng.com/64x64/071d3d/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#071d3d | -|
--p-surface-selected-pressed
| For use as a surface color in selected interactive elements that are pressed, in components such as action list and resource list. | ![](https://www.gifpng.com/64x64/e5effd/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#e5effd | ![](https://www.gifpng.com/64x64/0d2b56/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#0d2b56 | -|
--p-icon-on-interactive
| For use as a fill color for icons on interactive elements. | ![](https://www.gifpng.com/64x64/ffffff/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#ffffff | ![](https://www.gifpng.com/64x64/ffffff/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#ffffff | -|
--p-text-on-interactive
| For use as a text color on interactive elements. | ![](https://www.gifpng.com/64x64/ffffff/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#ffffff | ![](https://www.gifpng.com/64x64/ffffff/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#ffffff | - ---- - -## secondary - -[↑ Back to top](#table-of-contents) - -A secondary interactive color role, for use in secondary and tertiary buttons as a background color, as well as in form elements as a background color. - -| CSS variable | Description | Light mode | Dark mode | -| ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -|
--p-action-secondary
| Used for secondary buttons and tertiary buttons, as well as in form elements as a background color and pontentially other secondary surfaces. | ![](https://www.gifpng.com/64x64/ffffff/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#ffffff | ![](https://www.gifpng.com/64x64/4d5053/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#4d5053 | -|
--p-action-secondary-disabled
| Used as a disabled state for secondary buttons | ![](https://www.gifpng.com/64x64/ffffff/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#ffffff | ![](https://www.gifpng.com/64x64/202223/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#202223 | -|
--p-action-secondary-hovered
| Used as a hovered state for secondary buttons | ![](https://www.gifpng.com/64x64/f6f6f7/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#f6f6f7 | ![](https://www.gifpng.com/64x64/54575b/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#54575b | -|
--p-action-secondary-pressed
| Used as a pressed state for secondary buttons | ![](https://www.gifpng.com/64x64/f1f2f3/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#f1f2f3 | ![](https://www.gifpng.com/64x64/606467/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#606467 | -|
--p-action-secondary-depressed
| Used as a depressed state for secondary buttons | ![](https://www.gifpng.com/64x64/6d7175/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#6d7175 | ![](https://www.gifpng.com/64x64/7b7f84/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#7b7f84 | - ---- - -## primary - -[↑ Back to top](#table-of-contents) - -A primary interactive color, for use in primary buttons as a background color. Also used in navigation and tabs for icons, and for a surface color when in a selected state. - -| CSS variable | Description | Light mode | Dark mode | -| ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -|
--p-action-primary
| Used as the background color for primary actions, and as the fill color for icons and the text color in navigation and tabs to communicate interaction states. | ![](https://www.gifpng.com/64x64/008060/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#008060 | ![](https://www.gifpng.com/64x64/008060/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#008060 | -|
--p-action-primary-disabled
| Used as the background color for disabled primary actions, and as the fill color for icons and the text color in navigation and tabs to communicate interaction states. | ![](https://www.gifpng.com/64x64/f1f1f1/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#f1f1f1 | ![](https://www.gifpng.com/64x64/005640/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#005640 | -|
--p-action-primary-hovered
| Used as the background color for hovered primary actions, and as the fill color for icons and the text color in navigation and tabs to communicate interaction states. | ![](https://www.gifpng.com/64x64/006e52/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#006e52 | ![](https://www.gifpng.com/64x64/009671/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#009671 | -|
--p-action-primary-pressed
| Used as the background color for pressed primary actions, and as the fill color for icons and the text color in navigation and tabs to communicate interaction states. | ![](https://www.gifpng.com/64x64/005e46/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#005e46 | ![](https://www.gifpng.com/64x64/00a47c/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#00a47c | -|
--p-action-primary-depressed
| Used as the background color for pressed primary actions, and as the fill color for icons and the text color in navigation and tabs to communicate interaction states. | ![](https://www.gifpng.com/64x64/003d2c/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#003d2c | ![](https://www.gifpng.com/64x64/00b388/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#00b388 | -|
--p-icon-on-primary
| For use as a fill color for icons on primary actions. Not for use in icons on navigation and tabs. | ![](https://www.gifpng.com/64x64/ffffff/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#ffffff | ![](https://www.gifpng.com/64x64/e6fff4/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#e6fff4 | -|
--p-text-on-primary
| For use as a text color on primary actions. Not for use in text on navigation and tabs. | ![](https://www.gifpng.com/64x64/ffffff/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#ffffff | ![](https://www.gifpng.com/64x64/ffffff/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#ffffff | -|
--p-text-primary
| For use as primary text color on background. For use in text in components such as Navigation. | ![](https://www.gifpng.com/64x64/007b5c/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#007b5c | ![](https://www.gifpng.com/64x64/008d6a/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#008d6a | -|
--p-text-primary-hovered
| For use as primary hovered text color on background. For use in text in components such as Navigation. | ![](https://www.gifpng.com/64x64/006c50/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#006c50 | ![](https://www.gifpng.com/64x64/009e78/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#009e78 | -|
--p-text-primary-pressed
| For use as primary pressed text color on background. For use in text in components such as Navigation. | ![](https://www.gifpng.com/64x64/005c44/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#005c44 | ![](https://www.gifpng.com/64x64/00b085/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#00b085 | -|
--p-surface-primary-selected
| Used as a surface color to indicate selected interactive states in navigation and tabs. | ![](https://www.gifpng.com/64x64/f1f8f5/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#f1f8f5 | ![](https://www.gifpng.com/64x64/0c1210/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#0c1210 | -|
--p-surface-primary-selected-hovered
| Used as a surface color to indicate selected interactive states that are hovered in navigation and tabs. | ![](https://www.gifpng.com/64x64/b3d0c3/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#b3d0c3 | ![](https://www.gifpng.com/64x64/28302c/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#28302c | -|
--p-surface-primary-selected-pressed
| Used as a surface color to indicate selected interactive states that are pressed in navigation and tabs. | ![](https://www.gifpng.com/64x64/a2bcb0/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#a2bcb0 | ![](https://www.gifpng.com/64x64/36403b/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#36403b | - ---- - -## critical - -[↑ Back to top](#table-of-contents) - -Used to communicate destructive outcomes on interactive elements, for communicating errors, and to indicate a critical event in inert elements that requires immediate merchant action. - -| CSS variable | Description | Light mode | Dark mode | -| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -|
--p-border-critical
| For use as a border on critical components such as an outline on interactive elements in an error state. | ![](https://www.gifpng.com/64x64/fd5749/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#fd5749 | ![](https://www.gifpng.com/64x64/e32f0e/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#e32f0e | -|
--p-border-critical-subdued
| For use as a border on critical components such as banners. | ![](https://www.gifpng.com/64x64/e0b3b2/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#e0b3b2 | ![](https://www.gifpng.com/64x64/e32f0e/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#e32f0e | -|
--p-border-critical-disabled
| For use as a disabled border on critical components such as banners, and as an outline on interactive elements in an error state. | ![](https://www.gifpng.com/64x64/ffa7a3/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#ffa7a3 | ![](https://www.gifpng.com/64x64/831704/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#831704 | -|
--p-icon-critical
| For use as an icon fill color on top of critical elements. | ![](https://www.gifpng.com/64x64/d72c0d/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#d72c0d | ![](https://www.gifpng.com/64x64/da2d0d/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#da2d0d | -|
--p-surface-critical
| For use as a surface color on critical elements including badges. | ![](https://www.gifpng.com/64x64/fed3d1/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#fed3d1 | ![](https://www.gifpng.com/64x64/450701/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#450701 | -|
--p-surface-critical-subdued
| For use as a subdued surface color on critical elements including banners. | ![](https://www.gifpng.com/64x64/fff4f4/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#fff4f4 | ![](https://www.gifpng.com/64x64/450701/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#450701 | -|
--p-surface-critical-subdued-hovered
| For use as a surface color on critical interactive elements including action list items in a hovered state. | ![](https://www.gifpng.com/64x64/fff0f0/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#fff0f0 | ![](https://www.gifpng.com/64x64/441714/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#441714 | -|
--p-surface-critical-subdued-pressed
| For use as a surface color on critical interactive elements including action list items in a pressed state. | ![](https://www.gifpng.com/64x64/ffe9e8/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#ffe9e8 | ![](https://www.gifpng.com/64x64/6b1003/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#6b1003 | -|
--p-surface-critical-subdued-depressed
| For use as a surface color on critical interactive elements including action list items in a depressed state. | ![](https://www.gifpng.com/64x64/febcb9/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#febcb9 | ![](https://www.gifpng.com/64x64/871805/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#871805 | -|
--p-text-critical
| For use as a text color in inert critical elements such as exception list. Not for use as a text color on banners and badges. | ![](https://www.gifpng.com/64x64/d72c0d/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#d72c0d | ![](https://www.gifpng.com/64x64/e9807a/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#e9807a | -|
--p-action-critical
| For use as the background color for destructive buttons, and as the background color for error toast messages. | ![](https://www.gifpng.com/64x64/d82c0d/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#d82c0d | ![](https://www.gifpng.com/64x64/cd290c/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#cd290c | -|
--p-action-critical-disabled
| For use as the background color for disabled destructive buttons, and as the background color for error toast messages. | ![](https://www.gifpng.com/64x64/f1f1f1/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#f1f1f1 | ![](https://www.gifpng.com/64x64/bb250a/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#bb250a | -|
--p-action-critical-hovered
| For use as the background color for hovered destructive buttons, and as the background color for error toast messages. | ![](https://www.gifpng.com/64x64/bc2200/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#bc2200 | ![](https://www.gifpng.com/64x64/e32f0e/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#e32f0e | -|
--p-action-critical-pressed
| For use as the background color for pressed destructive buttons, and as the background color for error toast messages. | ![](https://www.gifpng.com/64x64/a21b00/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#a21b00 | ![](https://www.gifpng.com/64x64/fa3511/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#fa3511 | -|
--p-action-critical-depressed
| For use as the background color for depressed destructive buttons, and as the background color for error toast messages. | ![](https://www.gifpng.com/64x64/6c0f00/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#6c0f00 | ![](https://www.gifpng.com/64x64/fd5749/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#fd5749 | -|
--p-icon-on-critical
| For use as a fill color for icons on critical actions. | ![](https://www.gifpng.com/64x64/ffffff/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#ffffff | ![](https://www.gifpng.com/64x64/fff8f7/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#fff8f7 | -|
--p-text-on-critical
| For use as a text color on critical actions. | ![](https://www.gifpng.com/64x64/ffffff/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#ffffff | ![](https://www.gifpng.com/64x64/ffffff/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#ffffff | -|
--p-interactive-critical
| For use as the text color for destructive interactive elements: links, plain buttons, error state of selected checkboxes and radio buttons, as well as a text color on destructive action list items. Not for use on critical banners and badges. | ![](https://www.gifpng.com/64x64/d82c0d/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#d82c0d | ![](https://www.gifpng.com/64x64/fd726a/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#fd726a | -|
--p-interactive-critical-disabled
| For use as a text color in disabled destructive plain buttons, as well as a text color on destructive action list items. Not for use on critical banners and badges. | ![](https://www.gifpng.com/64x64/fd938d/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#fd938d | ![](https://www.gifpng.com/64x64/feaca8/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#feaca8 | -|
--p-interactive-critical-hovered
| For use as a text color in hovered destructive plain buttons, as well as a text color on destructive action list items. Not for use on critical banners and badges. | ![](https://www.gifpng.com/64x64/cd290c/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#cd290c | ![](https://www.gifpng.com/64x64/fd8a84/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#fd8a84 | -|
--p-interactive-critical-pressed
| For use as a text color in pressed destructive plain buttons, as well as a text color on destructive action list items. Not for use on critical banners and badges. | ![](https://www.gifpng.com/64x64/670f03/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#670f03 | ![](https://www.gifpng.com/64x64/fd9f9b/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#fd9f9b | - ---- - -## warning - -[↑ Back to top](#table-of-contents) - -For use as an indicator that action should be taken by merchants in components including badges, banners, and exception lists. - -| CSS variable | Description | Light mode | Dark mode | -| ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -|
--p-border-warning
| For use as a border on warning components such as... | ![](https://www.gifpng.com/64x64/b98900/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#b98900 | ![](https://www.gifpng.com/64x64/997000/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#997000 | -|
--p-border-warning-subdued
| For use as a border on warning components such as banners. | ![](https://www.gifpng.com/64x64/e1b878/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#e1b878 | ![](https://www.gifpng.com/64x64/997000/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#997000 | -|
--p-icon-warning
| For use as an icon fill color on top of warning elements. | ![](https://www.gifpng.com/64x64/b98900/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#b98900 | ![](https://www.gifpng.com/64x64/684b00/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#684b00 | -|
--p-surface-warning
| For use as a surface color on warning elements including badges. | ![](https://www.gifpng.com/64x64/ffd79d/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#ffd79d | ![](https://www.gifpng.com/64x64/997000/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#997000 | -|
--p-surface-warning-subdued
| For use as a subdued surface color on warning elements including banners. | ![](https://www.gifpng.com/64x64/fff5ea/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#fff5ea | ![](https://www.gifpng.com/64x64/4d3b1d/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#4d3b1d | -|
--p-surface-warning-subdued-hovered
| For use as a subdued surface color on warning elements including banners. | ![](https://www.gifpng.com/64x64/fff2e2/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#fff2e2 | ![](https://www.gifpng.com/64x64/523f20/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#523f20 | -|
--p-surface-warning-subdued-pressed
| For use as a subdued surface color on warning elements including banners. | ![](https://www.gifpng.com/64x64/ffebd3/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#ffebd3 | ![](https://www.gifpng.com/64x64/574322/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#574322 | -|
--p-text-warning
| For use as a text color in inert critical elements such as exception list. Not for use as a text color on banners and badges. | ![](https://www.gifpng.com/64x64/916a00/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#916a00 | ![](https://www.gifpng.com/64x64/ca9500/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#ca9500 | - ---- - -## highlight - -[↑ Back to top](#table-of-contents) - -Used to highlight elements of the UI that are important for merchants, but do not require immediate action. Used in information banners and badges, indicators that draw attention to new information, bars that indicate loading or progress, and in data visualization. - -| CSS variable | Description | Light mode | Dark mode | -| ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -|
--p-border-highlight
| For use as a border on informational components such as... | ![](https://www.gifpng.com/64x64/449da7/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#449da7 | ![](https://www.gifpng.com/64x64/449da7/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#449da7 | -|
--p-border-highlight-subdued
| For use as a border on informational components such as banners. | ![](https://www.gifpng.com/64x64/98c6cd/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#98c6cd | ![](https://www.gifpng.com/64x64/449da7/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#449da7 | -|
--p-icon-highlight
| For use as an icon fill color on top of informational elements. | ![](https://www.gifpng.com/64x64/00a0ac/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#00a0ac | ![](https://www.gifpng.com/64x64/2c6c73/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#2c6c73 | -|
--p-surface-highlight
| For use as a surface color on information elements including badges. | ![](https://www.gifpng.com/64x64/a4e8f2/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#a4e8f2 | ![](https://www.gifpng.com/64x64/006971/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#006971 | -|
--p-surface-highlight-subdued
| For use as a surface color on information elements including banners. | ![](https://www.gifpng.com/64x64/ebf9fc/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#ebf9fc | ![](https://www.gifpng.com/64x64/123539/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#123539 | -|
--p-surface-highlight-subdued-hovered
| For use as a surface color on information elements including banners. | ![](https://www.gifpng.com/64x64/e4f7fa/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#e4f7fa | ![](https://www.gifpng.com/64x64/143a3e/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#143a3e | -|
--p-surface-highlight-subdued-pressed
| For use as a surface color on information elements including banners. | ![](https://www.gifpng.com/64x64/d5f3f8/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#d5f3f8 | ![](https://www.gifpng.com/64x64/184146/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#184146 | -|
--p-text-highlight
| For use as a text color in inert informational elements. Not for use as a text color on banners and badges. | ![](https://www.gifpng.com/64x64/347c84/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#347c84 | ![](https://www.gifpng.com/64x64/a2effa/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#a2effa | - ---- - -## success - -[↑ Back to top](#table-of-contents) - -Used to indicate the result of a successful action taken by a merchant, to indicate a positive event, or to illustrate growth. - -| CSS variable | Description | Light mode | Dark mode | -| ---------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -|
--p-border-success
| For use as a border on success components such as text inputs. | ![](https://www.gifpng.com/64x64/00a47c/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#00a47c | ![](https://www.gifpng.com/64x64/008766/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#008766 | -|
--p-border-success-subdued
| For use as a border on success components such as banners. | ![](https://www.gifpng.com/64x64/95c9b4/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#95c9b4 | ![](https://www.gifpng.com/64x64/008766/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#008766 | -|
--p-icon-success
| For use as an icon fill color on top of success elements. | ![](https://www.gifpng.com/64x64/007f5f/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#007f5f | ![](https://www.gifpng.com/64x64/005e46/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#005e46 | -|
--p-surface-success
| For use as a surface color on success elements including badges. | ![](https://www.gifpng.com/64x64/aee9d1/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#aee9d1 | ![](https://www.gifpng.com/64x64/005e46/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#005e46 | -|
--p-surface-success-subdued
| For use as a surface color on information elements including banners. | ![](https://www.gifpng.com/64x64/f1f8f5/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#f1f8f5 | ![](https://www.gifpng.com/64x64/1c352c/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#1c352c | -|
--p-surface-success-subdued-hovered
| For use as a surface color on information elements including banners. | ![](https://www.gifpng.com/64x64/ecf6f1/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#ecf6f1 | ![](https://www.gifpng.com/64x64/1f3a30/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#1f3a30 | -|
--p-surface-success-subdued-pressed
| For use as a surface color on information elements including banners. | ![](https://www.gifpng.com/64x64/e2f1ea/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#e2f1ea | ![](https://www.gifpng.com/64x64/234136/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#234136 | -|
--p-text-success
| For use as a text color in inert success elements. Not for use as a text color on banners and badges. | ![](https://www.gifpng.com/64x64/008060/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#008060 | ![](https://www.gifpng.com/64x64/58ad8e/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#58ad8e | - ---- - -## decorative - -[↑ Back to top](#table-of-contents) - -Used to decorate elements where color does convey a specific meaning in components like avatars - -| CSS variable | Description | Light mode | Dark mode | -| --------------------------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -|
--p-decorative-one-icon
| For use as a decorative icon color that is applied on a decorative surface. | ![](https://www.gifpng.com/64x64/7e5700/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#7e5700 | ![](https://www.gifpng.com/64x64/ffba43/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#ffba43 | -|
--p-decorative-one-surface
| For use as a decorative surface color. | ![](https://www.gifpng.com/64x64/ffc96b/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#ffc96b | ![](https://www.gifpng.com/64x64/8e6609/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#8e6609 | -|
--p-decorative-one-text
| For use as a decorative text color that is applied on a decorative surface. | ![](https://www.gifpng.com/64x64/3d2800/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#3d2800 | ![](https://www.gifpng.com/64x64/ffffff/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#ffffff | -|
--p-decorative-two-icon
| For use as a decorative icon color that is applied on a decorative surface. | ![](https://www.gifpng.com/64x64/af294e/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#af294e | ![](https://www.gifpng.com/64x64/f5b6c0/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#f5b6c0 | -|
--p-decorative-two-surface
| For use as a decorative surface color. | ![](https://www.gifpng.com/64x64/ffc4b0/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#ffc4b0 | ![](https://www.gifpng.com/64x64/ce5814/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#ce5814 | -|
--p-decorative-two-text
| For use as a decorative text color that is applied on a decorative surface. | ![](https://www.gifpng.com/64x64/490b1c/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#490b1c | ![](https://www.gifpng.com/64x64/ffffff/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#ffffff | -|
--p-decorative-three-icon
| For use as a decorative icon color that is applied on a decorative surface. | ![](https://www.gifpng.com/64x64/006d41/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#006d41 | ![](https://www.gifpng.com/64x64/00e38d/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#00e38d | -|
--p-decorative-three-surface
| For use as a decorative surface color. | ![](https://www.gifpng.com/64x64/92e6b5/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#92e6b5 | ![](https://www.gifpng.com/64x64/007c5a/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#007c5a | -|
--p-decorative-three-text
| For use as a decorative text color that is applied on a decorative surface. | ![](https://www.gifpng.com/64x64/002f19/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#002f19 | ![](https://www.gifpng.com/64x64/ffffff/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#ffffff | -|
--p-decorative-four-icon
| For use as a decorative icon color that is applied on a decorative surface. | ![](https://www.gifpng.com/64x64/006a68/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#006a68 | ![](https://www.gifpng.com/64x64/00ddda/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#00ddda | -|
--p-decorative-four-surface
| For use as a decorative surface color. | ![](https://www.gifpng.com/64x64/91e0d6/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#91e0d6 | ![](https://www.gifpng.com/64x64/167c79/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#167c79 | -|
--p-decorative-four-text
| For use as a decorative text color that is applied on a decorative surface. | ![](https://www.gifpng.com/64x64/002d2d/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#002d2d | ![](https://www.gifpng.com/64x64/ffffff/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#ffffff | -|
--p-decorative-five-icon
| For use as a decorative icon color that is applied on a decorative surface. | ![](https://www.gifpng.com/64x64/ae2b4c/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#ae2b4c | ![](https://www.gifpng.com/64x64/f4b7bf/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#f4b7bf | -|
--p-decorative-five-surface
| For use as a decorative surface color. | ![](https://www.gifpng.com/64x64/fdc9d0/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#fdc9d0 | ![](https://www.gifpng.com/64x64/c23356/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#c23356 | -|
--p-decorative-five-text
| For use as a decorative text color that is applied on a decorative surface. | ![](https://www.gifpng.com/64x64/4f0e1f/FFFFFF?border-width=16&border-type=rectangle&border-color=f6f6f7&text=%20)
#4f0e1f | ![](https://www.gifpng.com/64x64/ffffff/FFFFFF?border-width=16&border-type=rectangle&border-color=0b0c0d&text=%20)
#ffffff | - ---- - -## Overrides - -[↑ Back to top](#table-of-contents) - -### UNSTABLE these may become @deprecated at any time - -| CSS variable | Value | -| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------ | -| `--p-border-radius-slim` | `0.2rem` | -| `--p-border-radius-base` | `0.4rem` | -| `--p-border-radius-wide` | `0.8rem` | -| `--p-border-radius-full` | `50%` | -| `--p-font-weight-regular` | `400` | -| `--p-font-weight-medium` | `500` | -| `--p-font-weight-semibold` | `600` | -| `--p-font-weight-bold` | `700` | -| `--p-card-shadow` | `0px 0px 5px var(--p-shadow-from-ambient-light), 0px 1px 2px var(--p-shadow-from-direct-light)` | -| `--p-popover-shadow` | `-1px 0px 20px var(--p-shadow-from-ambient-light), 0px 1px 5px var(--p-shadow-from-direct-light)` | -| `--p-modal-shadow` | `0px 26px 80px var(--p-shadow-from-dim-light), 0px 0px 1px var(--p-shadow-from-dim-light)` | -| `--p-top-bar-shadow` | `0 2px 2px -1px var(--p-shadow-from-direct-light)` | -| `--p-button-drop-shadow` | `0 1px 0 rgba(0, 0, 0, 0.05)` | -| `--p-button-inner-shadow` | `inset 0 -1px 0 rgba(0, 0, 0, 0.2)` | -| `--p-button-pressed-inner-shadow` | `inset 0 1px 0 rgba(0, 0, 0, 0.15)` | -| `--p-override-loading-z-index` | `514` | -| `--p-choice-size` | `2rem` | -| `--p-icon-size` | `1rem` | -| `--p-choice-margin` | `0.1rem` | -| `--p-control-border-width` | `0.2rem` | -| `--p-banner-border-default` | `inset 0 0.1rem 0 0 var(--p-border-neutral-subdued), inset 0 0 0 0.1rem var(--p-border-neutral-subdued)` | -| `--p-banner-border-success` | `inset 0 0.1rem 0 0 var(--p-border-success-subdued), inset 0 0 0 0.1rem var(--p-border-success-subdued)` | -| `--p-banner-border-highlight` | `inset 0 0.1rem 0 0 var(--p-border-highlight-subdued), inset 0 0 0 0.1rem var(--p-border-highlight-subdued)` | -| `--p-banner-border-warning` | `inset 0 0.1rem 0 0 var(--p-border-warning-subdued), inset 0 0 0 0.1rem var(--p-border-warning-subdued)` | -| `--p-banner-border-critical` | `inset 0 0.1rem 0 0 var(--p-border-critical-subdued), inset 0 0 0 0.1rem var(--p-border-critical-subdued)` | -| `--p-thin-border-subdued` | `0.1rem solid var(--p-border-subdued)` | -| `--p-text-field-spinner-offset` | `0.2rem` | -| `--p-text-field-focus-ring-offset` | `-0.4rem` | -| `--p-text-field-focus-ring-border-radius` | `0.7rem` | -| `--p-button-group-item-spacing` | `-0.1rem` | -| `--p-duration-100` | `100ms` | -| `--p-duration-150` | `150ms` | -| `--p-ease-in` | `cubic-bezier(0.5, 0.1, 1, 1)` | -| `--p-ease` | `cubic-bezier(0.4, 0.22, 0.28, 1)` | -| `--p-range-slider-thumb-size-base` | `1.6rem` | -| `--p-range-slider-thumb-size-active` | `2.4rem` | diff --git a/package.json b/package.json index becbba76d65..50186c6d9d0 100644 --- a/package.json +++ b/package.json @@ -63,10 +63,7 @@ "readme-update-version": "node ./scripts/readme-update-version", "version": "yarn run readme-update-version", "storybook": "start-storybook -p 6006 --quiet", - "storybook:build": "yarn run copy-polaris-tokens && build-storybook -o build-internal/storybook/static", - "precolordocs": "yarn run build", - "colordocs": "node ./scripts/color-system-docs", - "postcolordocs": "yarn run format" + "storybook:build": "yarn run copy-polaris-tokens && build-storybook -o build-internal/storybook/static" }, "dependencies": { "@shopify/polaris-icons": "^4.10.0", diff --git a/pre-commit b/pre-commit index d9afae53643..fda17a3e579 100755 --- a/pre-commit +++ b/pre-commit @@ -1,14 +1,12 @@ #!/usr/bin/ruby --disable-gems NON_COMMITTABLE_FILE_PATHS = ['playground/Playground.tsx'] -COLOR_DOC_SOURCE_FILE_PATHS = ['src/utilities/theme/tokens.ts'] module PreCommit extend self def main ignore_playground - generate_color_docs end private @@ -24,16 +22,6 @@ module PreCommit end end - def generate_color_docs - changed_files.each do |path| - if COLOR_DOC_SOURCE_FILE_PATHS.include? path - puts "Color system changes detected. Generating new docs (may take a couple minutes)..." - %x(yarn run colordocs) - %x(git add "documentation/Color system.md") - end - end - end - def changed_files @changed_files ||= %x(git diff --cached --name-only HEAD).lines.map(&:chomp) end diff --git a/scripts/color-system-docs.js b/scripts/color-system-docs.js deleted file mode 100644 index 4fdf6a43d11..00000000000 --- a/scripts/color-system-docs.js +++ /dev/null @@ -1,135 +0,0 @@ -const {resolve: resolvePath} = require('path'); - -const {writeFileSync} = require('fs-extra'); -const { - config: roleVariants, -} = require('@shopify/polaris-tokens/dist-modern/configs/base'); -const theme = require('@shopify/polaris-tokens/dist-modern/theme/base.json'); -const {colorFactory} = require('@shopify/polaris-tokens/dist-modern'); - -const { - rgbToHex, - UNSTABLE_toCssCustomPropertySyntax: cssify, - UNSTABLE_Tokens: Tokens, -} = require('../'); - -const ColorSwatch = { - Width: 32, - Height: 32, - Padding: 16, -}; - -const RoleDescription = { - surface: - 'The surface role is used for the backgrounds of the UI. With a light color scheme, surface colors are nearly white, while in a dark color scheme, surface colors are nearly black. The color passed to the surface role impacts the rest of the color roles and their variants, adjusting them for light or dark contexts.', - onSurface: - 'The onSurface role is made up of elements which appear on top of a surface, including borders, secondary icons, and text. When a light surface is provided, onSurface values will be dark. When a dark surface is provided, onSurface values will be light.', - interactive: - 'The interactive role is used to express interactivity in components. It is used in links, as an indicator of focus, and as an indicator of selected interactive states.', - secondary: - 'A secondary interactive color role, for use in secondary and tertiary buttons as a background color, as well as in form elements as a background color.', - primary: - 'A primary interactive color, for use in primary buttons as a background color. Also used in navigation and tabs for icons, and for a surface color when in a selected state.', - critical: - 'Used to communicate destructive outcomes on interactive elements, for communicating errors, and to indicate a critical event in inert elements that requires immediate merchant action.', - warning: - 'For use as an indicator that action should be taken by merchants in components including badges, banners, and exception lists.', - highlight: - 'Used to highlight elements of the UI that are important for merchants, but do not require immediate action. Used in information banners and badges, indicators that draw attention to new information, bars that indicate loading or progress, and in data visualization.', - success: - 'Used to indicate the result of a successful action taken by a merchant, to indicate a positive event, or to illustrate growth.', - decorative: - 'Used to decorate elements where color does convey a specific meaning in components like avatars', -}; - -const lightColors = colorFactory(theme, 'light'); -const darkColors = colorFactory(theme, 'dark'); - -const Template = { - tocItem: (name) => `- [${name}](#${name})\n`, - section: (name, description) => - `## ${name}\n\n[↑ Back to top](#table-of-contents)\n\n${ - description ? `${description}\n\n` : '' - }`, - heading: - '|CSS variable|Description|Light mode|Dark mode|\n|---|---|---|---|\n', - hr: '\n\n---\n\n', - variant: (name, description, light, dark) => { - const {Width, Height, Padding} = ColorSwatch; - const size = `${Width + Padding * 2}x${Height + Padding * 2}`; - - return `|
${cssify(
-      name,
-    )}
|${description} |![](https://www.gifpng.com/${size}/${light}/FFFFFF?border-width=${Padding}&border-type=rectangle&border-color=${toHex( - lightColors.background, - )}&text=%20)
#${light}|![](https://www.gifpng.com/${size}/${dark}/FFFFFF?border-width=${Padding}&border-type=rectangle&border-color=${toHex( - darkColors.background, - )}&text=%20)
#${dark}|\n`; - }, - overrideItem: (name, value) => `|\`${cssify(name)}\`|\`${value}\`|\n`, -}; - -const tocTitle = '## Table of contents\n\n'; - -const tocContents = Object.keys(roleVariants).reduce( - (accumulator, role) => accumulator + Template.tocItem(role), - '', -); - -const contents = Object.entries(roleVariants).reduce( - (tableMarkdown, [role, variants]) => { - const children = variants.reduce((rowMarkdown, variant) => { - const light = toHex(lightColors[variant.name]); - const dark = toHex(darkColors[variant.name]); - - return ( - rowMarkdown + - Template.variant(variant.name, variant.description, light, dark) - ); - }, ''); - - return ( - tableMarkdown + - Template.section(role, RoleDescription[role]) + - Template.heading + - children + - Template.hr - ); - }, - '', -); - -const overridesContents = Object.entries(Tokens).reduce( - (accumulator, [override, value]) => { - return accumulator + Template.overrideItem(override, value); - }, - '### UNSTABLE these may become @deprecated at any time\n|CSS variable|Value|\n|---|---|\n', -); - -const data = - tocTitle + - tocContents + - Template.tocItem('Overrides') + - contents + - Template.section('Overrides') + - overridesContents; - -writeFileSync(resolvePath('documentation/Color system.md'), data); - -function stringToRgba(rgba) { - const [red, green, blue] = rgba - .substring(5) - .slice(0, -1) - .split(', ') - .map((num) => Number(num)); - - return { - red, - green, - blue, - }; -} - -function toHex(color) { - return rgbToHex(stringToRgba(color)).substr(1); -} diff --git a/src/index.ts b/src/index.ts index 952d9615435..526d112c55e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -57,8 +57,3 @@ export { useRowSelected as useIndexTableRowSelected, useContainerScroll as useIndexTableContainerScroll, } from './utilities/index-table'; - -export { - toCssCustomPropertySyntax as UNSTABLE_toCssCustomPropertySyntax, - Tokens as UNSTABLE_Tokens, -} from './utilities/theme'; diff --git a/src/utilities/custom-properties/custom-properties.ts b/src/utilities/custom-properties/custom-properties.ts index ba8f131d3a7..e50516aa3a6 100644 --- a/src/utilities/custom-properties/custom-properties.ts +++ b/src/utilities/custom-properties/custom-properties.ts @@ -1,6 +1,8 @@ import {config} from '@shopify/polaris-tokens/dist-modern/configs/base'; -import {toCssCustomPropertySyntax, Tokens} from '../theme'; +function toCssCustomPropertySyntax(camelCase: string) { + return `--p-${camelCase.replace(/([A-Z]|[0-9]+)/g, '-$1').toLowerCase()}`; +} export const nonDesignLangaugeCustomProperties = [ '--global-ribbon-height', @@ -22,5 +24,4 @@ export const designLangaugeCustomProperties = ([] as string[]).concat( ...Object.values(config).map((variant) => variant.map(({name}) => toCssCustomPropertySyntax(name)), ), - ...Object.keys(Tokens).map(toCssCustomPropertySyntax), ); diff --git a/src/utilities/theme/index.ts b/src/utilities/theme/index.ts deleted file mode 100644 index 99e2bdc5e8a..00000000000 --- a/src/utilities/theme/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export {toCssCustomPropertySyntax, toString} from './utils'; - -export * from './tokens'; diff --git a/src/utilities/theme/tokens.ts b/src/utilities/theme/tokens.ts deleted file mode 100644 index b0e4c017c54..00000000000 --- a/src/utilities/theme/tokens.ts +++ /dev/null @@ -1,52 +0,0 @@ -export const Tokens = { - // Border Radiuses - borderRadiusSlim: '0.2rem', - borderRadiusBase: '0.4rem', - borderRadiusWide: '0.8rem', - borderRadiusFull: '50%', - - // Font-Weights - fontWeightRegular: 400, - fontWeightMedium: 500, - fontWeightSemibold: 600, - fontWeightBold: 700, - - // Shadows - cardShadow: - '0px 0px 5px var(--p-shadow-from-ambient-light), 0px 1px 2px var(--p-shadow-from-direct-light)', - popoverShadow: - '-1px 0px 20px var(--p-shadow-from-ambient-light), 0px 1px 5px var(--p-shadow-from-direct-light)', - modalShadow: - '0px 26px 80px var(--p-shadow-from-dim-light), 0px 0px 1px var(--p-shadow-from-dim-light)', - topBarShadow: '0 2px 2px -1px var(--p-shadow-from-direct-light)', - buttonDropShadow: '0 1px 0 rgba(0, 0, 0, 0.05)', - buttonInnerShadow: 'inset 0 -1px 0 rgba(0, 0, 0, 0.2)', - buttonPressedInnerShadow: 'inset 0 1px 0 rgba(0, 0, 0, 0.15)', - - // Overrides - overrideLoadingZIndex: '514', - choiceSize: '2rem', - iconSize: '1rem', - choiceMargin: '0.1rem', - controlBorderWidth: '0.2rem', - bannerBorderDefault: buildBannerBorder('--p-border-neutral-subdued'), - bannerBorderSuccess: buildBannerBorder('--p-border-success-subdued'), - bannerBorderHighlight: buildBannerBorder('--p-border-highlight-subdued'), - bannerBorderWarning: buildBannerBorder('--p-border-warning-subdued'), - bannerBorderCritical: buildBannerBorder('--p-border-critical-subdued'), - thinBorderSubdued: '0.1rem solid var(--p-border-subdued)', - textFieldSpinnerOffset: '0.2rem', - textFieldFocusRingOffset: '-0.4rem', - textFieldFocusRingBorderRadius: '0.7rem', - buttonGroupItemSpacing: '-0.1rem', - duration100: '100ms', - duration150: '150ms', - easeIn: 'cubic-bezier(0.5, 0.1, 1, 1)', - ease: 'cubic-bezier(0.4, 0.22, 0.28, 1)', - rangeSliderThumbSizeBase: '1.6rem', - rangeSliderThumbSizeActive: '2.4rem', -}; - -function buildBannerBorder(cssVar: string) { - return `inset 0 0.1rem 0 0 var(${cssVar}), inset 0 0 0 0.1rem var(${cssVar})`; -} diff --git a/src/utilities/theme/utils.ts b/src/utilities/theme/utils.ts deleted file mode 100644 index 917ff77bdde..00000000000 --- a/src/utilities/theme/utils.ts +++ /dev/null @@ -1,15 +0,0 @@ -type CustomPropertiesObject = Record; - -export function toString(obj?: CustomPropertiesObject) { - if (obj) { - return Object.entries(obj) - .map((pair) => pair.join(':')) - .join(';'); - } else { - return ''; - } -} - -export function toCssCustomPropertySyntax(camelCase: string) { - return `--p-${camelCase.replace(/([A-Z]|[0-9]+)/g, '-$1').toLowerCase()}`; -}