@common-origin/design-system 3.1.0 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/dist/client.js +1050 -722
  2. package/dist/client.js.map +1 -1
  3. package/dist/components/atoms/Badge/Badge.d.mts +2 -2
  4. package/dist/components/atoms/Badge/Badge.d.ts +2 -2
  5. package/dist/components/atoms/Badge/Badge.mjs +15 -9
  6. package/dist/components/atoms/Box/Box.d.mts +3 -2
  7. package/dist/components/atoms/Box/Box.d.ts +3 -2
  8. package/dist/components/atoms/Button/Button.mjs +1 -1
  9. package/dist/components/atoms/Chip/shared/ChipBase.mjs +1 -1
  10. package/dist/components/atoms/Icon/Icon.d.mts +1 -1
  11. package/dist/components/atoms/Icon/Icon.d.ts +1 -1
  12. package/dist/components/atoms/Icon/Icon.mjs +35 -10
  13. package/dist/components/atoms/IconButton/IconButton.mjs +1 -1
  14. package/dist/components/atoms/ProgressBar/ProgressBar.d.mts +1 -1
  15. package/dist/components/atoms/ProgressBar/ProgressBar.d.ts +1 -1
  16. package/dist/components/atoms/Tag/Tag.d.mts +1 -1
  17. package/dist/components/atoms/Tag/Tag.d.ts +1 -1
  18. package/dist/components/atoms/Tooltip/Tooltip.d.mts +7 -1
  19. package/dist/components/atoms/Tooltip/Tooltip.d.ts +7 -1
  20. package/dist/components/atoms/Tooltip/Tooltip.mjs +18 -8
  21. package/dist/components/molecules/ActionSheet/ActionSheet.mjs +2 -2
  22. package/dist/components/molecules/Alert/Alert.mjs +1 -1
  23. package/dist/components/molecules/Checkbox/SelectableInputBase.mjs +1 -1
  24. package/dist/components/molecules/Dropdown/Dropdown.mjs +1 -1
  25. package/dist/components/molecules/List/ListItem.mjs +3 -3
  26. package/dist/components/molecules/Menu/Menu.d.mts +8 -1
  27. package/dist/components/molecules/Menu/Menu.d.ts +8 -1
  28. package/dist/components/molecules/Menu/Menu.mjs +12 -9
  29. package/dist/components/molecules/Modal/Modal.mjs +1 -1
  30. package/dist/components/molecules/NumberInput/NumberInput.mjs +2 -1
  31. package/dist/components/molecules/PasswordField/PasswordField.mjs +3 -2
  32. package/dist/components/molecules/SearchField/SearchField.mjs +3 -3
  33. package/dist/components/molecules/Sheet/Sheet.mjs +3 -3
  34. package/dist/components/molecules/SidebarNavItem/SidebarNavItem.d.mts +3 -2
  35. package/dist/components/molecules/SidebarNavItem/SidebarNavItem.d.ts +3 -2
  36. package/dist/components/molecules/SidebarNavItem/SidebarNavItem.mjs +128 -41
  37. package/dist/components/molecules/SidebarNavItem/sidebarNavMotion.d.mts +30 -0
  38. package/dist/components/molecules/SidebarNavItem/sidebarNavMotion.d.ts +30 -0
  39. package/dist/components/molecules/SidebarNavItem/sidebarNavMotion.mjs +69 -0
  40. package/dist/components/molecules/SidebarNavItem/sidebarNavMotion.mjs.map +1 -0
  41. package/dist/components/molecules/SidebarNavSection/SidebarNavSection.mjs +57 -43
  42. package/dist/components/molecules/TabBar/TabBar.mjs +3 -3
  43. package/dist/components/molecules/WorkspaceSwitcher/WorkspaceSwitcher.mjs +3 -1
  44. package/dist/components/organisms/SidebarNav/SidebarNav.mjs +173 -62
  45. package/dist/data.js +2680 -190
  46. package/dist/data.js.map +1 -1
  47. package/dist/index.d.mts +2 -1
  48. package/dist/index.d.ts +2 -1
  49. package/dist/index.js +1 -0
  50. package/dist/index.js.map +1 -1
  51. package/dist/index.mjs +1 -0
  52. package/dist/index.mjs.map +1 -1
  53. package/dist/lib/statusShapes.mjs +1 -1
  54. package/dist/lib/statusShapes.mjs.map +1 -1
  55. package/dist/lib/styleUtils.d.mts +4 -0
  56. package/dist/lib/styleUtils.d.ts +4 -0
  57. package/dist/lib/styleUtils.mjs +5 -1
  58. package/dist/lib/styleUtils.mjs.map +1 -1
  59. package/dist/lib/tokenAliases.mjs +1 -0
  60. package/dist/lib/tokenAliases.mjs.map +1 -1
  61. package/dist/lib/useFloatingLayer.d.mts +8 -1
  62. package/dist/lib/useFloatingLayer.d.ts +8 -1
  63. package/dist/lib/useFloatingLayer.mjs +11 -2
  64. package/dist/lib/useFloatingLayer.mjs.map +1 -1
  65. package/dist/styles/iconSet.json.mjs +2442 -0
  66. package/dist/styles/iconSet.json.mjs.map +1 -0
  67. package/dist/styles/tokens.d.mts +93 -24
  68. package/dist/styles/tokens.d.ts +93 -24
  69. package/dist/styles/tokens.json +96 -59
  70. package/dist/styles/tokens.json.mjs +96 -59
  71. package/dist/styles/tokens.json.mjs.map +1 -1
  72. package/dist/tokens/index.js +96 -59
  73. package/dist/tokens/index.js.map +1 -1
  74. package/dist/tokens/index.mjs +96 -59
  75. package/dist/tokens/index.mjs.map +1 -1
  76. package/dist/tokens/styles/tokens.d.mts +93 -24
  77. package/dist/tokens/styles/tokens.d.ts +93 -24
  78. package/dist/tokens.css +1105 -74
  79. package/dist/types/iconSet.d.mts +6 -0
  80. package/dist/types/iconSet.d.ts +6 -0
  81. package/dist/types/iconSet.mjs +12 -0
  82. package/dist/types/iconSet.mjs.map +1 -0
  83. package/dist/types/icons.d.mts +58 -6
  84. package/dist/types/icons.d.ts +58 -6
  85. package/dist/types/icons.mjs +5 -0
  86. package/dist/types/icons.mjs.map +1 -1
  87. package/dist/types/index.d.mts +1 -0
  88. package/dist/types/index.d.ts +1 -0
  89. package/package.json +7 -3
@@ -43,6 +43,8 @@ export type Tokens = {
43
43
  '5': string;
44
44
  '6': string;
45
45
  none: string;
46
+ /** A sunken well or pressed state. A shadow, so the theme scales it with the others (decision 0056). */
47
+ inset: string;
46
48
  };
47
49
  /** Stacking order: 1–5 are 10–50 for layers within the page, 6–8 are 1000 and up for overlays. */
48
50
  zIndex: {
@@ -75,6 +77,8 @@ export type Tokens = {
75
77
  '90': string;
76
78
  '95': string;
77
79
  '100': string;
80
+ /** How strongly the scrim dims the page: a theme parameter, 0.5 in light (decision 0056). */
81
+ scrim: string;
78
82
  };
79
83
  /** The one dimension scale on the 4px grid; the key is the multiple of 4px (12 is 3rem, 48px). Replaces the parallel base.size and base.spacing scales (#188). */
80
84
  dimension: {
@@ -128,6 +132,22 @@ export type Tokens = {
128
132
  transparent: string;
129
133
  /** Pure white, outside the ramps: raised surfaces (semantic.surface.raised) that sit on the gray.100 page. The ramps' contrast is measured against it (decision 0049). */
130
134
  white: string;
135
+ /** Surfaces by elevation, the same rule in every theme: higher is lighter (decision 0056). Raised and overlay are the next neutrals lighter than the page; in light the scale tops out at white, so both are white and shadows separate them. */
136
+ surface: {
137
+ /** The page. */
138
+ page: string;
139
+ /** One level above the page: cards, inputs, code blocks. */
140
+ raised: string;
141
+ /** Two levels above the page: menus, dialogs, sheets. */
142
+ overlay: string;
143
+ };
144
+ /** The light and dark ends of the neutral ramp, by role, in every theme (decision 0056): labels on solid fills use the light ink, and the scrim the dark ink. */
145
+ ink: {
146
+ /** The light end of the neutral ramp. */
147
+ light: string;
148
+ /** The dark end of the neutral ramp. */
149
+ dark: string;
150
+ };
131
151
  /** Pure-grey ramp, defined in OKLCH (chroma 0): 100 (lightest) to 1200 (primary text). Each step has one job, and its contrast against white is in its description (decision 0040). */
132
152
  gray: {
133
153
  /** Page background. oklch(0.991 0 0), 1.03:1 on white. */
@@ -182,6 +202,33 @@ export type Tokens = {
182
202
  /** Primary text, and the darkest step. Composites to gray.1200 over white. */
183
203
  '1200': string;
184
204
  };
205
+ /** Alpha twins of the inverse end of the grey ramp, named by role like text.inverse: gray.100 at gray-alpha's opacity for each step, so a translucent overlay on a dark or coloured fill (issue 354). In the dark theme the inverse end is dark, so this ramp is too (decision 0054). */
206
+ 'gray-alpha-inverse': {
207
+ /** Page background. gray.100 at gray-alpha.100's opacity. */
208
+ '100': string;
209
+ /** Subtle background. gray.100 at gray-alpha.200's opacity. */
210
+ '200': string;
211
+ /** Component fill at rest. gray.100 at gray-alpha.300's opacity. */
212
+ '300': string;
213
+ /** Component fill on hover. gray.100 at gray-alpha.400's opacity. */
214
+ '400': string;
215
+ /** Component fill pressed or selected. gray.100 at gray-alpha.500's opacity. */
216
+ '500': string;
217
+ /** Subtle border. gray.100 at gray-alpha.600's opacity. */
218
+ '600': string;
219
+ /** Default border, for dividers and decorative outlines. gray.100 at gray-alpha.700's opacity. */
220
+ '700': string;
221
+ /** Strong border: a control edge, at least 3:1 on 100, 200 and white (decision 0025). gray.100 at gray-alpha.800's opacity. */
222
+ '800': string;
223
+ /** Solid fill. gray.100 at gray-alpha.900's opacity. */
224
+ '900': string;
225
+ /** Solid fill on hover. gray.100 at gray-alpha.1000's opacity. */
226
+ '1000': string;
227
+ /** Secondary text: at least 4.5:1 on 100 to 500 and white. gray.100 at gray-alpha.1100's opacity. */
228
+ '1100': string;
229
+ /** Primary text, and the darkest step. gray.100 at gray-alpha.1200's opacity. */
230
+ '1200': string;
231
+ };
185
232
  /** Accent role (decision 0043): links, selected and active states, the accent action, neutral information, in progress. Defined in OKLCH at hue 255°: 100 (lightest) to 1200 (darkest), each step at the gray step's contrast with white, with its contrast in its description (decisions 0040 and 0044). */
186
233
  accent: {
187
234
  /** Page background. oklch(0.991 0.002 248), 1.03:1 on white. */
@@ -208,6 +255,8 @@ export type Tokens = {
208
255
  '1100': string;
209
256
  /** Primary text, and the darkest step. oklch(0.252 0.049 252), 15.91:1 on white. */
210
257
  '1200': string;
258
+ /** Solid fill that carries a label: where the light ink reads at the contrast secondary text has with the page (decision 0056). In light that is step 1100; the dark theme generates its own. */
259
+ solid: string;
211
260
  };
212
261
  /** Alpha twins of accent: each is the smallest opacity that composites over white to the solid step (decision 0044). */
213
262
  'accent-alpha': {
@@ -262,6 +311,8 @@ export type Tokens = {
262
311
  '1100': string;
263
312
  /** Primary text, and the darkest step. oklch(0.248 0.034 159), 15.92:1 on white. */
264
313
  '1200': string;
314
+ /** Solid fill that carries a label: where the light ink reads at the contrast secondary text has with the page (decision 0056). In light that is step 1100; the dark theme generates its own. */
315
+ solid: string;
265
316
  };
266
317
  /** Alpha twins of success: each is the smallest opacity that composites over white to the solid step (decision 0044). */
267
318
  'success-alpha': {
@@ -316,6 +367,8 @@ export type Tokens = {
316
367
  '1100': string;
317
368
  /** Primary text, and the darkest step. oklch(0.252 0.030 84), 15.91:1 on white. */
318
369
  '1200': string;
370
+ /** Solid fill that carries a label: where the light ink reads at the contrast secondary text has with the page (decision 0056). In light that is step 1100; the dark theme generates its own. */
371
+ solid: string;
319
372
  };
320
373
  /** Alpha twins of warning: each is the smallest opacity that composites over white to the solid step (decision 0044). */
321
374
  'warning-alpha': {
@@ -370,6 +423,8 @@ export type Tokens = {
370
423
  '1100': string;
371
424
  /** Primary text, and the darkest step. oklch(0.256 0.043 47), 15.91:1 on white. */
372
425
  '1200': string;
426
+ /** Solid fill that carries a label: where the light ink reads at the contrast secondary text has with the page (decision 0056). In light that is step 1100; the dark theme generates its own. */
427
+ solid: string;
373
428
  };
374
429
  /** Alpha twins of serious: each is the smallest opacity that composites over white to the solid step (decision 0044). */
375
430
  'serious-alpha': {
@@ -424,6 +479,8 @@ export type Tokens = {
424
479
  '1100': string;
425
480
  /** Primary text, and the darkest step. oklch(0.259 0.063 29), 15.89:1 on white. */
426
481
  '1200': string;
482
+ /** Solid fill that carries a label: where the light ink reads at the contrast secondary text has with the page (decision 0056). In light that is step 1100; the dark theme generates its own. */
483
+ solid: string;
427
484
  };
428
485
  /** Alpha twins of danger: each is the smallest opacity that composites over white to the solid step (decision 0044). */
429
486
  'danger-alpha': {
@@ -822,7 +879,7 @@ export type Tokens = {
822
879
  backgroundColor: string;
823
880
  /** Text and icon colour on the primary Button. */
824
881
  textColor: string;
825
- /** Corner radius of every Button (visual language: Button uses sm). */
882
+ /** Corner radius of every Button (visual language: Button uses md). */
826
883
  borderRadius: string;
827
884
  /** Button label typography, the same as sizes.large.font. */
828
885
  font: string;
@@ -954,7 +1011,7 @@ export type Tokens = {
954
1011
  backgroundColor: string;
955
1012
  /** Default chip text and icon colour. */
956
1013
  textColor: string;
957
- /** Corner radius of every chip: rounder than Button, to signal a different job (decision 0016). */
1014
+ /** Corner radius of every chip: fully round, so a chip never shares Button's shape and the two read as different jobs (decision 0016). */
958
1015
  borderRadius: string;
959
1016
  /** Chip label typography, the same as sizes.large.font. */
960
1017
  font: string;
@@ -1056,7 +1113,7 @@ export type Tokens = {
1056
1113
  textColor: string;
1057
1114
  /** Text input, Dropdown and Checkbox border at rest. At least 3:1 on white (decision 0025). */
1058
1115
  borderColor: string;
1059
- /** Corner radius of text inputs and the Checkbox box. */
1116
+ /** Corner radius of text inputs, Dropdown and SearchField, matching Button. */
1060
1117
  borderRadius: string;
1061
1118
  /** Border width of text inputs and the Checkbox box. */
1062
1119
  borderWidth: string;
@@ -1330,6 +1387,8 @@ export type Tokens = {
1330
1387
  box: {
1331
1388
  /** Width and height of the Checkbox and Radio box. */
1332
1389
  size: string;
1390
+ /** Corner radius of the Checkbox box: one step tighter than the control radius, so the small box stays square and never reads as a Radio. */
1391
+ borderRadius: string;
1333
1392
  };
1334
1393
  row: {
1335
1394
  /** Minimum height of a Checkbox or Radio row, so the whole row is easy to hit. */
@@ -1414,6 +1473,10 @@ export type Tokens = {
1414
1473
  /** Unfilled track of ProgressBar and Slider: light, so the fill and thumb show the value (decision 0026). The resting fill step, 1.12:1 on white. */
1415
1474
  background: string;
1416
1475
  };
1476
+ overlay: {
1477
+ /** Corner radius of every overlay that holds controls: Modal, ActionSheet's top corners and the drawer Sheet, so they share one shape that nests around the control radius (decision 0055). */
1478
+ borderRadius: string;
1479
+ };
1417
1480
  };
1418
1481
  semantic: {
1419
1482
  elevation: {
@@ -1640,8 +1703,10 @@ export type Tokens = {
1640
1703
  text: {
1641
1704
  /** Primary text: body copy, labels and headings. 15.91:1 on white, 15.51:1 on the page. */
1642
1705
  default: string;
1643
- /** Text on dark or coloured fills, such as the primary, accent and danger Buttons. 15.51:1 on fill.emphasis. */
1706
+ /** Text on the emphasis and inverse fills, such as the primary Button, the emphasis Tag and Tooltip. 15.51:1 on fill.emphasis. Text on a coloured fill uses text.on-fill. */
1644
1707
  inverse: string;
1708
+ /** Text on solid coloured fills: the accent, danger, success, warning and serious fills (issue 355). The light ink, in every theme; text.inverse is for the emphasis and inverse fills. 6.00:1 on fill.accent. */
1709
+ 'on-fill': string;
1645
1710
  /** Text of disabled controls, translucent so it stays right on tinted surfaces. 1.53:1 on white: disabled text is exempt from the contrast minimum (WCAG 1.4.3), so never use it for text people need to read, including placeholders. */
1646
1711
  disabled: string;
1647
1712
  /** Success text, such as InlineAlert success messages. 5.99:1 on white. */
@@ -1688,8 +1753,10 @@ export type Tokens = {
1688
1753
  default: string;
1689
1754
  /** Icons and other foreground marks in disabled controls, matching text.disabled. 1.53:1 on white. */
1690
1755
  disabled: string;
1691
- /** Icons on dark or coloured fills, matching text.inverse. */
1756
+ /** Icons on the emphasis and inverse fills, matching text.inverse. */
1692
1757
  inverse: string;
1758
+ /** Icons on coloured fills, matching text.on-fill. */
1759
+ 'on-fill': string;
1693
1760
  /** Success icons, such as in Alert and EmptyState. 5.99:1 on white. (InlineAlert’s icon takes the text colour instead.) */
1694
1761
  success: string;
1695
1762
  /** Warning icons, such as in Alert. 6.01:1 on white. (InlineAlert’s icon takes the text colour instead.) */
@@ -1754,7 +1821,7 @@ export type Tokens = {
1754
1821
  muted: string;
1755
1822
  /** Dark fill for inverse elements: a checked Checkbox, Modal and Sheet drag handles. */
1756
1823
  inverse: string;
1757
- /** Blue fill for the accent Button and other deliberate highlights (0003), with text.inverse on it at 6.00:1. */
1824
+ /** Blue fill for the accent Button and other deliberate highlights (0003), with text.on-fill on it at 6.00:1. */
1758
1825
  accent: string;
1759
1826
  /** Light blue fill for selected items: a selected chip, tab or row (0016). Accent text on it is 5.37:1. */
1760
1827
  'accent-muted': string;
@@ -1762,23 +1829,23 @@ export type Tokens = {
1762
1829
  'accent-muted-hover': string;
1763
1830
  /** Fill of a pressed selected item, such as a selected filter chip. */
1764
1831
  'accent-muted-pressed': string;
1765
- /** Blue fill of a hovered accent control: fill.accent with text.inverse mixed in at opacity.state.hover (decision 0048). */
1832
+ /** Blue fill of a hovered accent control: fill.accent with text.on-fill mixed in at opacity.state.hover (decision 0048). */
1766
1833
  'accent-hover': string;
1767
- /** Blue fill of a pressed accent control: fill.accent with text.inverse mixed in at opacity.state.pressed (decision 0048). */
1834
+ /** Blue fill of a pressed accent control: fill.accent with text.on-fill mixed in at opacity.state.pressed (decision 0048). */
1768
1835
  'accent-pressed': string;
1769
- /** Strong red fill for destructive actions, such as the danger Button, with text.inverse on it at 6.03:1. */
1836
+ /** Strong red fill for destructive actions, such as the danger Button, with text.on-fill on it at 6.03:1. */
1770
1837
  danger: string;
1771
- /** Fill of a hovered destructive control: fill.danger with text.inverse mixed in at opacity.state.hover (decision 0048). */
1838
+ /** Fill of a hovered destructive control: fill.danger with text.on-fill mixed in at opacity.state.hover (decision 0048). */
1772
1839
  'danger-hover': string;
1773
- /** Fill of a pressed destructive control: fill.danger with text.inverse mixed in at opacity.state.pressed (decision 0048). */
1840
+ /** Fill of a pressed destructive control: fill.danger with text.on-fill mixed in at opacity.state.pressed (decision 0048). */
1774
1841
  'danger-pressed': string;
1775
1842
  /** Light red tint behind error messages, such as an error Alert. Danger text on it is 5.39:1. */
1776
1843
  'danger-muted': string;
1777
- /** Strong green fill for success states, such as a success indicator, with text.inverse on it at 5.99:1. */
1844
+ /** Strong green fill for success states, such as a success indicator, with text.on-fill on it at 5.99:1. */
1778
1845
  success: string;
1779
1846
  /** Light green tint behind success messages, such as a success Alert. Success text on it is 5.34:1. */
1780
1847
  'success-muted': string;
1781
- /** Strong yellow fill for warning states, such as a warning indicator, with text.inverse on it at 6.01:1. */
1848
+ /** Strong yellow fill for warning states, such as a warning indicator, with text.on-fill on it at 6.01:1. */
1782
1849
  warning: string;
1783
1850
  /** Light yellow tint behind warning messages, such as a warning Alert. Warning text on it is 5.37:1. */
1784
1851
  'warning-muted': string;
@@ -1798,7 +1865,7 @@ export type Tokens = {
1798
1865
  'none-pressed': string;
1799
1866
  /** Hover tint for a fill-less element on a dark background, such as a count on a dark tab. */
1800
1867
  'inverse-none-hover': string;
1801
- /** Strong orange fill for serious-warning states, with text.inverse on it at 6.04:1. */
1868
+ /** Strong orange fill for serious-warning states, with text.on-fill on it at 6.04:1. */
1802
1869
  serious: string;
1803
1870
  /** Light orange tint behind serious-warning messages. */
1804
1871
  'serious-muted': string;
@@ -1933,21 +2000,21 @@ export type Tokens = {
1933
2000
  radius: {
1934
2001
  /** No rounding: tables, dividers and sharp-edged containers. */
1935
2002
  none: string;
1936
- /** Minimal rounding: small badges, checkboxes, compact tags. */
2003
+ /** Minimal rounding for thin bars: ProgressBar and AgentInput's level meter. */
1937
2004
  xs: string;
1938
- /** Subtle rounding: buttons, inputs and other form controls. */
2005
+ /** Subtle rounding for small elements that aren't controls: Tag, Tooltip, CodeBlock, Slider's value label, small images (CardSmall, Picture) and the Checkbox box. */
1939
2006
  sm: string;
1940
- /** Standard rounding: cards, dropdown menus, popovers. */
2007
+ /** The control radius: Button, IconButton, inputs, rows and tabs, and the menus and popovers they open. */
1941
2008
  md: string;
1942
- /** Generous rounding: modals, action sheets and feature cards. */
2009
+ /** Generous rounding for containers that hold controls: Alert and cards. */
1943
2010
  lg: string;
1944
- /** Large rounding: pill buttons and prominent search bars. */
2011
+ /** Large rounding: large cards such as AccountCard. */
1945
2012
  xl: string;
1946
- /** Extra-large rounding: hero elements and decorative containers. */
2013
+ /** Overlays that hold controls (Modal, ActionSheet and the drawer Sheet), so their corners nest around the control radius, and large image cards (CardLarge, FeatureBlock). */
1947
2014
  '2xl': string;
1948
- /** Maximum rounding short of a circle: decorative cards and marketing elements. */
2015
+ /** Maximum rounding short of a circle: AgentInput's input shell, which holds round buttons. */
1949
2016
  '3xl': string;
1950
- /** Fully round: avatars, round icon buttons, status dots and chips. */
2017
+ /** Fully round: avatars, chips, badges, round icon buttons and status dots. */
1951
2018
  full: string;
1952
2019
  };
1953
2020
  space: {
@@ -2001,9 +2068,11 @@ export type Tokens = {
2001
2068
  surface: {
2002
2069
  /** The page: the off-white background everything else sits on (decision 0006). */
2003
2070
  base: string;
2004
- /** Content raised off the page: cards, inputs, sheets, dialogs, code blocks. */
2071
+ /** Content raised off the page: cards, inputs, code blocks. Floating layers use surface.overlay. */
2005
2072
  raised: string;
2006
- /** Backdrop behind a modal surface: Modal, Sheet, ActionSheet. */
2073
+ /** Floating layers above raised content: Menu, the Dropdown and SearchField lists, ActionSheet, Modal and Sheet (issue 356). White in light, the same as raised; in the dark theme one step lighter than raised, because shadows barely show on a dark page. */
2074
+ overlay: string;
2075
+ /** Backdrop behind a modal surface: Modal, Sheet, ActionSheet. The dark ink at opacity.scrim, so it stays dark in every theme. */
2007
2076
  scrim: string;
2008
2077
  };
2009
2078
  };
@@ -43,6 +43,8 @@ export type Tokens = {
43
43
  '5': string;
44
44
  '6': string;
45
45
  none: string;
46
+ /** A sunken well or pressed state. A shadow, so the theme scales it with the others (decision 0056). */
47
+ inset: string;
46
48
  };
47
49
  /** Stacking order: 1–5 are 10–50 for layers within the page, 6–8 are 1000 and up for overlays. */
48
50
  zIndex: {
@@ -75,6 +77,8 @@ export type Tokens = {
75
77
  '90': string;
76
78
  '95': string;
77
79
  '100': string;
80
+ /** How strongly the scrim dims the page: a theme parameter, 0.5 in light (decision 0056). */
81
+ scrim: string;
78
82
  };
79
83
  /** The one dimension scale on the 4px grid; the key is the multiple of 4px (12 is 3rem, 48px). Replaces the parallel base.size and base.spacing scales (#188). */
80
84
  dimension: {
@@ -128,6 +132,22 @@ export type Tokens = {
128
132
  transparent: string;
129
133
  /** Pure white, outside the ramps: raised surfaces (semantic.surface.raised) that sit on the gray.100 page. The ramps' contrast is measured against it (decision 0049). */
130
134
  white: string;
135
+ /** Surfaces by elevation, the same rule in every theme: higher is lighter (decision 0056). Raised and overlay are the next neutrals lighter than the page; in light the scale tops out at white, so both are white and shadows separate them. */
136
+ surface: {
137
+ /** The page. */
138
+ page: string;
139
+ /** One level above the page: cards, inputs, code blocks. */
140
+ raised: string;
141
+ /** Two levels above the page: menus, dialogs, sheets. */
142
+ overlay: string;
143
+ };
144
+ /** The light and dark ends of the neutral ramp, by role, in every theme (decision 0056): labels on solid fills use the light ink, and the scrim the dark ink. */
145
+ ink: {
146
+ /** The light end of the neutral ramp. */
147
+ light: string;
148
+ /** The dark end of the neutral ramp. */
149
+ dark: string;
150
+ };
131
151
  /** Pure-grey ramp, defined in OKLCH (chroma 0): 100 (lightest) to 1200 (primary text). Each step has one job, and its contrast against white is in its description (decision 0040). */
132
152
  gray: {
133
153
  /** Page background. oklch(0.991 0 0), 1.03:1 on white. */
@@ -182,6 +202,33 @@ export type Tokens = {
182
202
  /** Primary text, and the darkest step. Composites to gray.1200 over white. */
183
203
  '1200': string;
184
204
  };
205
+ /** Alpha twins of the inverse end of the grey ramp, named by role like text.inverse: gray.100 at gray-alpha's opacity for each step, so a translucent overlay on a dark or coloured fill (issue 354). In the dark theme the inverse end is dark, so this ramp is too (decision 0054). */
206
+ 'gray-alpha-inverse': {
207
+ /** Page background. gray.100 at gray-alpha.100's opacity. */
208
+ '100': string;
209
+ /** Subtle background. gray.100 at gray-alpha.200's opacity. */
210
+ '200': string;
211
+ /** Component fill at rest. gray.100 at gray-alpha.300's opacity. */
212
+ '300': string;
213
+ /** Component fill on hover. gray.100 at gray-alpha.400's opacity. */
214
+ '400': string;
215
+ /** Component fill pressed or selected. gray.100 at gray-alpha.500's opacity. */
216
+ '500': string;
217
+ /** Subtle border. gray.100 at gray-alpha.600's opacity. */
218
+ '600': string;
219
+ /** Default border, for dividers and decorative outlines. gray.100 at gray-alpha.700's opacity. */
220
+ '700': string;
221
+ /** Strong border: a control edge, at least 3:1 on 100, 200 and white (decision 0025). gray.100 at gray-alpha.800's opacity. */
222
+ '800': string;
223
+ /** Solid fill. gray.100 at gray-alpha.900's opacity. */
224
+ '900': string;
225
+ /** Solid fill on hover. gray.100 at gray-alpha.1000's opacity. */
226
+ '1000': string;
227
+ /** Secondary text: at least 4.5:1 on 100 to 500 and white. gray.100 at gray-alpha.1100's opacity. */
228
+ '1100': string;
229
+ /** Primary text, and the darkest step. gray.100 at gray-alpha.1200's opacity. */
230
+ '1200': string;
231
+ };
185
232
  /** Accent role (decision 0043): links, selected and active states, the accent action, neutral information, in progress. Defined in OKLCH at hue 255°: 100 (lightest) to 1200 (darkest), each step at the gray step's contrast with white, with its contrast in its description (decisions 0040 and 0044). */
186
233
  accent: {
187
234
  /** Page background. oklch(0.991 0.002 248), 1.03:1 on white. */
@@ -208,6 +255,8 @@ export type Tokens = {
208
255
  '1100': string;
209
256
  /** Primary text, and the darkest step. oklch(0.252 0.049 252), 15.91:1 on white. */
210
257
  '1200': string;
258
+ /** Solid fill that carries a label: where the light ink reads at the contrast secondary text has with the page (decision 0056). In light that is step 1100; the dark theme generates its own. */
259
+ solid: string;
211
260
  };
212
261
  /** Alpha twins of accent: each is the smallest opacity that composites over white to the solid step (decision 0044). */
213
262
  'accent-alpha': {
@@ -262,6 +311,8 @@ export type Tokens = {
262
311
  '1100': string;
263
312
  /** Primary text, and the darkest step. oklch(0.248 0.034 159), 15.92:1 on white. */
264
313
  '1200': string;
314
+ /** Solid fill that carries a label: where the light ink reads at the contrast secondary text has with the page (decision 0056). In light that is step 1100; the dark theme generates its own. */
315
+ solid: string;
265
316
  };
266
317
  /** Alpha twins of success: each is the smallest opacity that composites over white to the solid step (decision 0044). */
267
318
  'success-alpha': {
@@ -316,6 +367,8 @@ export type Tokens = {
316
367
  '1100': string;
317
368
  /** Primary text, and the darkest step. oklch(0.252 0.030 84), 15.91:1 on white. */
318
369
  '1200': string;
370
+ /** Solid fill that carries a label: where the light ink reads at the contrast secondary text has with the page (decision 0056). In light that is step 1100; the dark theme generates its own. */
371
+ solid: string;
319
372
  };
320
373
  /** Alpha twins of warning: each is the smallest opacity that composites over white to the solid step (decision 0044). */
321
374
  'warning-alpha': {
@@ -370,6 +423,8 @@ export type Tokens = {
370
423
  '1100': string;
371
424
  /** Primary text, and the darkest step. oklch(0.256 0.043 47), 15.91:1 on white. */
372
425
  '1200': string;
426
+ /** Solid fill that carries a label: where the light ink reads at the contrast secondary text has with the page (decision 0056). In light that is step 1100; the dark theme generates its own. */
427
+ solid: string;
373
428
  };
374
429
  /** Alpha twins of serious: each is the smallest opacity that composites over white to the solid step (decision 0044). */
375
430
  'serious-alpha': {
@@ -424,6 +479,8 @@ export type Tokens = {
424
479
  '1100': string;
425
480
  /** Primary text, and the darkest step. oklch(0.259 0.063 29), 15.89:1 on white. */
426
481
  '1200': string;
482
+ /** Solid fill that carries a label: where the light ink reads at the contrast secondary text has with the page (decision 0056). In light that is step 1100; the dark theme generates its own. */
483
+ solid: string;
427
484
  };
428
485
  /** Alpha twins of danger: each is the smallest opacity that composites over white to the solid step (decision 0044). */
429
486
  'danger-alpha': {
@@ -822,7 +879,7 @@ export type Tokens = {
822
879
  backgroundColor: string;
823
880
  /** Text and icon colour on the primary Button. */
824
881
  textColor: string;
825
- /** Corner radius of every Button (visual language: Button uses sm). */
882
+ /** Corner radius of every Button (visual language: Button uses md). */
826
883
  borderRadius: string;
827
884
  /** Button label typography, the same as sizes.large.font. */
828
885
  font: string;
@@ -954,7 +1011,7 @@ export type Tokens = {
954
1011
  backgroundColor: string;
955
1012
  /** Default chip text and icon colour. */
956
1013
  textColor: string;
957
- /** Corner radius of every chip: rounder than Button, to signal a different job (decision 0016). */
1014
+ /** Corner radius of every chip: fully round, so a chip never shares Button's shape and the two read as different jobs (decision 0016). */
958
1015
  borderRadius: string;
959
1016
  /** Chip label typography, the same as sizes.large.font. */
960
1017
  font: string;
@@ -1056,7 +1113,7 @@ export type Tokens = {
1056
1113
  textColor: string;
1057
1114
  /** Text input, Dropdown and Checkbox border at rest. At least 3:1 on white (decision 0025). */
1058
1115
  borderColor: string;
1059
- /** Corner radius of text inputs and the Checkbox box. */
1116
+ /** Corner radius of text inputs, Dropdown and SearchField, matching Button. */
1060
1117
  borderRadius: string;
1061
1118
  /** Border width of text inputs and the Checkbox box. */
1062
1119
  borderWidth: string;
@@ -1330,6 +1387,8 @@ export type Tokens = {
1330
1387
  box: {
1331
1388
  /** Width and height of the Checkbox and Radio box. */
1332
1389
  size: string;
1390
+ /** Corner radius of the Checkbox box: one step tighter than the control radius, so the small box stays square and never reads as a Radio. */
1391
+ borderRadius: string;
1333
1392
  };
1334
1393
  row: {
1335
1394
  /** Minimum height of a Checkbox or Radio row, so the whole row is easy to hit. */
@@ -1414,6 +1473,10 @@ export type Tokens = {
1414
1473
  /** Unfilled track of ProgressBar and Slider: light, so the fill and thumb show the value (decision 0026). The resting fill step, 1.12:1 on white. */
1415
1474
  background: string;
1416
1475
  };
1476
+ overlay: {
1477
+ /** Corner radius of every overlay that holds controls: Modal, ActionSheet's top corners and the drawer Sheet, so they share one shape that nests around the control radius (decision 0055). */
1478
+ borderRadius: string;
1479
+ };
1417
1480
  };
1418
1481
  semantic: {
1419
1482
  elevation: {
@@ -1640,8 +1703,10 @@ export type Tokens = {
1640
1703
  text: {
1641
1704
  /** Primary text: body copy, labels and headings. 15.91:1 on white, 15.51:1 on the page. */
1642
1705
  default: string;
1643
- /** Text on dark or coloured fills, such as the primary, accent and danger Buttons. 15.51:1 on fill.emphasis. */
1706
+ /** Text on the emphasis and inverse fills, such as the primary Button, the emphasis Tag and Tooltip. 15.51:1 on fill.emphasis. Text on a coloured fill uses text.on-fill. */
1644
1707
  inverse: string;
1708
+ /** Text on solid coloured fills: the accent, danger, success, warning and serious fills (issue 355). The light ink, in every theme; text.inverse is for the emphasis and inverse fills. 6.00:1 on fill.accent. */
1709
+ 'on-fill': string;
1645
1710
  /** Text of disabled controls, translucent so it stays right on tinted surfaces. 1.53:1 on white: disabled text is exempt from the contrast minimum (WCAG 1.4.3), so never use it for text people need to read, including placeholders. */
1646
1711
  disabled: string;
1647
1712
  /** Success text, such as InlineAlert success messages. 5.99:1 on white. */
@@ -1688,8 +1753,10 @@ export type Tokens = {
1688
1753
  default: string;
1689
1754
  /** Icons and other foreground marks in disabled controls, matching text.disabled. 1.53:1 on white. */
1690
1755
  disabled: string;
1691
- /** Icons on dark or coloured fills, matching text.inverse. */
1756
+ /** Icons on the emphasis and inverse fills, matching text.inverse. */
1692
1757
  inverse: string;
1758
+ /** Icons on coloured fills, matching text.on-fill. */
1759
+ 'on-fill': string;
1693
1760
  /** Success icons, such as in Alert and EmptyState. 5.99:1 on white. (InlineAlert’s icon takes the text colour instead.) */
1694
1761
  success: string;
1695
1762
  /** Warning icons, such as in Alert. 6.01:1 on white. (InlineAlert’s icon takes the text colour instead.) */
@@ -1754,7 +1821,7 @@ export type Tokens = {
1754
1821
  muted: string;
1755
1822
  /** Dark fill for inverse elements: a checked Checkbox, Modal and Sheet drag handles. */
1756
1823
  inverse: string;
1757
- /** Blue fill for the accent Button and other deliberate highlights (0003), with text.inverse on it at 6.00:1. */
1824
+ /** Blue fill for the accent Button and other deliberate highlights (0003), with text.on-fill on it at 6.00:1. */
1758
1825
  accent: string;
1759
1826
  /** Light blue fill for selected items: a selected chip, tab or row (0016). Accent text on it is 5.37:1. */
1760
1827
  'accent-muted': string;
@@ -1762,23 +1829,23 @@ export type Tokens = {
1762
1829
  'accent-muted-hover': string;
1763
1830
  /** Fill of a pressed selected item, such as a selected filter chip. */
1764
1831
  'accent-muted-pressed': string;
1765
- /** Blue fill of a hovered accent control: fill.accent with text.inverse mixed in at opacity.state.hover (decision 0048). */
1832
+ /** Blue fill of a hovered accent control: fill.accent with text.on-fill mixed in at opacity.state.hover (decision 0048). */
1766
1833
  'accent-hover': string;
1767
- /** Blue fill of a pressed accent control: fill.accent with text.inverse mixed in at opacity.state.pressed (decision 0048). */
1834
+ /** Blue fill of a pressed accent control: fill.accent with text.on-fill mixed in at opacity.state.pressed (decision 0048). */
1768
1835
  'accent-pressed': string;
1769
- /** Strong red fill for destructive actions, such as the danger Button, with text.inverse on it at 6.03:1. */
1836
+ /** Strong red fill for destructive actions, such as the danger Button, with text.on-fill on it at 6.03:1. */
1770
1837
  danger: string;
1771
- /** Fill of a hovered destructive control: fill.danger with text.inverse mixed in at opacity.state.hover (decision 0048). */
1838
+ /** Fill of a hovered destructive control: fill.danger with text.on-fill mixed in at opacity.state.hover (decision 0048). */
1772
1839
  'danger-hover': string;
1773
- /** Fill of a pressed destructive control: fill.danger with text.inverse mixed in at opacity.state.pressed (decision 0048). */
1840
+ /** Fill of a pressed destructive control: fill.danger with text.on-fill mixed in at opacity.state.pressed (decision 0048). */
1774
1841
  'danger-pressed': string;
1775
1842
  /** Light red tint behind error messages, such as an error Alert. Danger text on it is 5.39:1. */
1776
1843
  'danger-muted': string;
1777
- /** Strong green fill for success states, such as a success indicator, with text.inverse on it at 5.99:1. */
1844
+ /** Strong green fill for success states, such as a success indicator, with text.on-fill on it at 5.99:1. */
1778
1845
  success: string;
1779
1846
  /** Light green tint behind success messages, such as a success Alert. Success text on it is 5.34:1. */
1780
1847
  'success-muted': string;
1781
- /** Strong yellow fill for warning states, such as a warning indicator, with text.inverse on it at 6.01:1. */
1848
+ /** Strong yellow fill for warning states, such as a warning indicator, with text.on-fill on it at 6.01:1. */
1782
1849
  warning: string;
1783
1850
  /** Light yellow tint behind warning messages, such as a warning Alert. Warning text on it is 5.37:1. */
1784
1851
  'warning-muted': string;
@@ -1798,7 +1865,7 @@ export type Tokens = {
1798
1865
  'none-pressed': string;
1799
1866
  /** Hover tint for a fill-less element on a dark background, such as a count on a dark tab. */
1800
1867
  'inverse-none-hover': string;
1801
- /** Strong orange fill for serious-warning states, with text.inverse on it at 6.04:1. */
1868
+ /** Strong orange fill for serious-warning states, with text.on-fill on it at 6.04:1. */
1802
1869
  serious: string;
1803
1870
  /** Light orange tint behind serious-warning messages. */
1804
1871
  'serious-muted': string;
@@ -1933,21 +2000,21 @@ export type Tokens = {
1933
2000
  radius: {
1934
2001
  /** No rounding: tables, dividers and sharp-edged containers. */
1935
2002
  none: string;
1936
- /** Minimal rounding: small badges, checkboxes, compact tags. */
2003
+ /** Minimal rounding for thin bars: ProgressBar and AgentInput's level meter. */
1937
2004
  xs: string;
1938
- /** Subtle rounding: buttons, inputs and other form controls. */
2005
+ /** Subtle rounding for small elements that aren't controls: Tag, Tooltip, CodeBlock, Slider's value label, small images (CardSmall, Picture) and the Checkbox box. */
1939
2006
  sm: string;
1940
- /** Standard rounding: cards, dropdown menus, popovers. */
2007
+ /** The control radius: Button, IconButton, inputs, rows and tabs, and the menus and popovers they open. */
1941
2008
  md: string;
1942
- /** Generous rounding: modals, action sheets and feature cards. */
2009
+ /** Generous rounding for containers that hold controls: Alert and cards. */
1943
2010
  lg: string;
1944
- /** Large rounding: pill buttons and prominent search bars. */
2011
+ /** Large rounding: large cards such as AccountCard. */
1945
2012
  xl: string;
1946
- /** Extra-large rounding: hero elements and decorative containers. */
2013
+ /** Overlays that hold controls (Modal, ActionSheet and the drawer Sheet), so their corners nest around the control radius, and large image cards (CardLarge, FeatureBlock). */
1947
2014
  '2xl': string;
1948
- /** Maximum rounding short of a circle: decorative cards and marketing elements. */
2015
+ /** Maximum rounding short of a circle: AgentInput's input shell, which holds round buttons. */
1949
2016
  '3xl': string;
1950
- /** Fully round: avatars, round icon buttons, status dots and chips. */
2017
+ /** Fully round: avatars, chips, badges, round icon buttons and status dots. */
1951
2018
  full: string;
1952
2019
  };
1953
2020
  space: {
@@ -2001,9 +2068,11 @@ export type Tokens = {
2001
2068
  surface: {
2002
2069
  /** The page: the off-white background everything else sits on (decision 0006). */
2003
2070
  base: string;
2004
- /** Content raised off the page: cards, inputs, sheets, dialogs, code blocks. */
2071
+ /** Content raised off the page: cards, inputs, code blocks. Floating layers use surface.overlay. */
2005
2072
  raised: string;
2006
- /** Backdrop behind a modal surface: Modal, Sheet, ActionSheet. */
2073
+ /** Floating layers above raised content: Menu, the Dropdown and SearchField lists, ActionSheet, Modal and Sheet (issue 356). White in light, the same as raised; in the dark theme one step lighter than raised, because shadows barely show on a dark page. */
2074
+ overlay: string;
2075
+ /** Backdrop behind a modal surface: Modal, Sheet, ActionSheet. The dark ink at opacity.scrim, so it stays dark in every theme. */
2007
2076
  scrim: string;
2008
2077
  };
2009
2078
  };