datocms-react-ui 2.1.5 → 2.2.0-alpha.2

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 (150) hide show
  1. package/dist/cjs/Button/styles.module.css.json +1 -1
  2. package/dist/cjs/ButtonGroup/Button/styles.module.css.json +1 -1
  3. package/dist/cjs/ButtonGroup/Group/styles.module.css.json +1 -1
  4. package/dist/cjs/Canvas/index.js +529 -470
  5. package/dist/cjs/Canvas/index.js.map +1 -1
  6. package/dist/cjs/Canvas/styles.module.css.json +1 -1
  7. package/dist/cjs/ContextInspector/styles.module.css.json +1 -1
  8. package/dist/cjs/Dropdown/styles.module.css.json +1 -1
  9. package/dist/cjs/FieldError/styles.module.css.json +1 -1
  10. package/dist/cjs/FieldHint/styles.module.css.json +1 -1
  11. package/dist/cjs/FormLabel/styles.module.css.json +1 -1
  12. package/dist/cjs/HotKey/styles.module.css.json +1 -1
  13. package/dist/cjs/Section/index.js +7 -6
  14. package/dist/cjs/Section/index.js.map +1 -1
  15. package/dist/cjs/Section/styles.module.css.json +1 -1
  16. package/dist/cjs/SelectInput/index.js +41 -22
  17. package/dist/cjs/SelectInput/index.js.map +1 -1
  18. package/dist/cjs/SidebarPanel/index.js +4 -11
  19. package/dist/cjs/SidebarPanel/index.js.map +1 -1
  20. package/dist/cjs/SidebarPanel/styles.module.css.json +1 -1
  21. package/dist/cjs/Spinner/styles.module.css.json +1 -1
  22. package/dist/cjs/SplitView/SplitViewSash/styles.module.css.json +1 -1
  23. package/dist/cjs/SwitchField/styles.module.css.json +1 -1
  24. package/dist/cjs/SwitchInput/styles.module.css.json +1 -1
  25. package/dist/cjs/TextInput/styles.module.css.json +1 -1
  26. package/dist/cjs/TextareaInput/styles.module.css.json +1 -1
  27. package/dist/cjs/Toolbar/Button/styles.module.css.json +1 -1
  28. package/dist/cjs/Toolbar/Toolbar/index.js +3 -3
  29. package/dist/cjs/Toolbar/Toolbar/styles.module.css.json +1 -1
  30. package/dist/cjs/Tooltip/TooltipContent/styles.module.css.json +1 -1
  31. package/dist/cjs/Tooltip/TooltipDelayGroup/index.js +2 -2
  32. package/dist/cjs/VerticalSplit/index.js +4 -4
  33. package/dist/cjs/VerticalSplit/styles.module.css.json +1 -1
  34. package/dist/cjs/generateStyleFromCtx/index.js +2 -2
  35. package/dist/cjs/generateStyleFromCtx/index.js.map +1 -1
  36. package/dist/cjs/icons.js +8 -8
  37. package/dist/cjs/icons.js.map +1 -1
  38. package/dist/esm/Button/styles.module.css.json +1 -1
  39. package/dist/esm/ButtonGroup/Button/styles.module.css.json +1 -1
  40. package/dist/esm/ButtonGroup/Group/styles.module.css.json +1 -1
  41. package/dist/esm/Canvas/index.d.ts +507 -470
  42. package/dist/esm/Canvas/index.js +529 -470
  43. package/dist/esm/Canvas/index.js.map +1 -1
  44. package/dist/esm/Canvas/styles.module.css.json +1 -1
  45. package/dist/esm/ContextInspector/styles.module.css.json +1 -1
  46. package/dist/esm/Dropdown/styles.module.css.json +1 -1
  47. package/dist/esm/FieldError/styles.module.css.json +1 -1
  48. package/dist/esm/FieldHint/styles.module.css.json +1 -1
  49. package/dist/esm/FormLabel/styles.module.css.json +1 -1
  50. package/dist/esm/HotKey/styles.module.css.json +1 -1
  51. package/dist/esm/Section/index.js +7 -6
  52. package/dist/esm/Section/index.js.map +1 -1
  53. package/dist/esm/Section/styles.module.css.json +1 -1
  54. package/dist/esm/SelectInput/index.js +41 -22
  55. package/dist/esm/SelectInput/index.js.map +1 -1
  56. package/dist/esm/SidebarPanel/index.d.ts +2 -2
  57. package/dist/esm/SidebarPanel/index.js +4 -11
  58. package/dist/esm/SidebarPanel/index.js.map +1 -1
  59. package/dist/esm/SidebarPanel/styles.module.css.json +1 -1
  60. package/dist/esm/Spinner/styles.module.css.json +1 -1
  61. package/dist/esm/SplitView/SplitViewSash/styles.module.css.json +1 -1
  62. package/dist/esm/SwitchField/styles.module.css.json +1 -1
  63. package/dist/esm/SwitchInput/styles.module.css.json +1 -1
  64. package/dist/esm/TextInput/styles.module.css.json +1 -1
  65. package/dist/esm/TextareaInput/styles.module.css.json +1 -1
  66. package/dist/esm/Toolbar/Button/styles.module.css.json +1 -1
  67. package/dist/esm/Toolbar/Toolbar/index.d.ts +3 -3
  68. package/dist/esm/Toolbar/Toolbar/index.js +3 -3
  69. package/dist/esm/Toolbar/Toolbar/styles.module.css.json +1 -1
  70. package/dist/esm/Tooltip/TooltipContent/styles.module.css.json +1 -1
  71. package/dist/esm/Tooltip/TooltipDelayGroup/index.d.ts +2 -2
  72. package/dist/esm/Tooltip/TooltipDelayGroup/index.js +2 -2
  73. package/dist/esm/VerticalSplit/index.d.ts +4 -4
  74. package/dist/esm/VerticalSplit/index.js +4 -4
  75. package/dist/esm/VerticalSplit/styles.module.css.json +1 -1
  76. package/dist/esm/generateStyleFromCtx/index.d.ts +1 -1
  77. package/dist/esm/generateStyleFromCtx/index.js +2 -2
  78. package/dist/esm/generateStyleFromCtx/index.js.map +1 -1
  79. package/dist/esm/icons.js +8 -8
  80. package/dist/esm/icons.js.map +1 -1
  81. package/dist/types/Canvas/index.d.ts +507 -470
  82. package/dist/types/SidebarPanel/index.d.ts +2 -2
  83. package/dist/types/Toolbar/Toolbar/index.d.ts +3 -3
  84. package/dist/types/Tooltip/TooltipDelayGroup/index.d.ts +2 -2
  85. package/dist/types/VerticalSplit/index.d.ts +4 -4
  86. package/dist/types/generateStyleFromCtx/index.d.ts +1 -1
  87. package/package.json +3 -3
  88. package/src/Button/styles.module.css +28 -19
  89. package/src/Button/styles.module.css.json +1 -1
  90. package/src/ButtonGroup/Button/styles.module.css +13 -17
  91. package/src/ButtonGroup/Button/styles.module.css.json +1 -1
  92. package/src/ButtonGroup/Group/styles.module.css +1 -1
  93. package/src/ButtonGroup/Group/styles.module.css.json +1 -1
  94. package/src/Canvas/index.tsx +532 -470
  95. package/src/Canvas/styles.module.css +32 -16
  96. package/src/Canvas/styles.module.css.json +1 -1
  97. package/src/ContextInspector/styles.module.css +10 -10
  98. package/src/ContextInspector/styles.module.css.json +1 -1
  99. package/src/Dropdown/styles.module.css +30 -28
  100. package/src/Dropdown/styles.module.css.json +1 -1
  101. package/src/FieldError/styles.module.css +1 -1
  102. package/src/FieldError/styles.module.css.json +1 -1
  103. package/src/FieldHint/styles.module.css +1 -1
  104. package/src/FieldHint/styles.module.css.json +1 -1
  105. package/src/FormLabel/styles.module.css +2 -2
  106. package/src/FormLabel/styles.module.css.json +1 -1
  107. package/src/HotKey/styles.module.css +1 -1
  108. package/src/HotKey/styles.module.css.json +1 -1
  109. package/src/Section/index.tsx +17 -16
  110. package/src/Section/styles.module.css +41 -35
  111. package/src/Section/styles.module.css.json +1 -1
  112. package/src/SelectInput/index.tsx +55 -27
  113. package/src/SidebarPanel/index.tsx +4 -29
  114. package/src/SidebarPanel/styles.module.css +5 -6
  115. package/src/SidebarPanel/styles.module.css.json +1 -1
  116. package/src/Spinner/styles.module.css +1 -1
  117. package/src/Spinner/styles.module.css.json +1 -1
  118. package/src/SplitView/SplitViewSash/styles.module.css +7 -7
  119. package/src/SplitView/SplitViewSash/styles.module.css.json +1 -1
  120. package/src/SwitchField/styles.module.css +1 -1
  121. package/src/SwitchField/styles.module.css.json +1 -1
  122. package/src/SwitchInput/styles.module.css +15 -13
  123. package/src/SwitchInput/styles.module.css.json +1 -1
  124. package/src/TextInput/styles.module.css +13 -11
  125. package/src/TextInput/styles.module.css.json +1 -1
  126. package/src/TextareaInput/styles.module.css +13 -11
  127. package/src/TextareaInput/styles.module.css.json +1 -1
  128. package/src/Toolbar/Badge/styles.module.css.json +5 -0
  129. package/src/Toolbar/Button/styles.module.css +4 -4
  130. package/src/Toolbar/Button/styles.module.css.json +1 -1
  131. package/src/Toolbar/DotsDropdown/styles.module.css.json +4 -0
  132. package/src/Toolbar/GoBack/styles.module.css.json +1 -0
  133. package/src/Toolbar/Pagination/styles.module.css.json +1 -0
  134. package/src/Toolbar/PrimaryButton/styles.module.css.json +5 -0
  135. package/src/Toolbar/Space/styles.module.css.json +1 -0
  136. package/src/Toolbar/Subtitle/styles.module.css.json +1 -0
  137. package/src/Toolbar/Toolbar/index.tsx +3 -3
  138. package/src/Toolbar/Toolbar/styles.module.css +2 -2
  139. package/src/Toolbar/Toolbar/styles.module.css.json +1 -1
  140. package/src/Tooltip/TooltipContent/styles.module.css +3 -2
  141. package/src/Tooltip/TooltipContent/styles.module.css.json +1 -1
  142. package/src/Tooltip/TooltipDelayGroup/index.tsx +2 -2
  143. package/src/VerticalSplit/index.tsx +4 -4
  144. package/src/VerticalSplit/styles.module.css +8 -11
  145. package/src/VerticalSplit/styles.module.css.json +1 -1
  146. package/src/base.css +17 -0
  147. package/src/generateStyleFromCtx/index.ts +7 -1
  148. package/src/icons.tsx +8 -0
  149. package/styles.css +1 -1
  150. package/types.json +601 -395
@@ -9,494 +9,531 @@ export declare type CanvasProps = {
9
9
  children: ReactNode;
10
10
  };
11
11
  /**
12
- * @example Color palette CSS variables
12
+ * @example Colors
13
13
  *
14
- * Within the `Canvas` component, a color palette is made available as a set of
15
- * CSS variables, allowing you to conform to the theme of the current
16
- * environment:
14
+ * A full semantic color palette is exposed inside `Canvas` as `--color--*` CSS variables.
15
+ *
16
+ * Regarding dark mode, `ctx.colorScheme` resolves to `'light'` or `'dark'`. The SDK runtime also sets `data-color-scheme` on `<html>` so selectors like `[data-color-scheme="dark"] {…}` work out of the box.
17
+ *
18
+ * #### Token name shape
19
+ *
20
+ * Tokens follow one of two name shapes:
21
+ *
22
+ * | Shape | Meaning |
23
+ * | --- | --- |
24
+ * | `--color--{property}` | standalone (one `--` after color) |
25
+ * | `--color--{context}--{property}` | context pair (two `--` after color) |
26
+ *
27
+ * **Properties** are the role a color plays:
28
+ *
29
+ * | Property | Role |
30
+ * | --- | --- |
31
+ * | `surface` | backgrounds |
32
+ * | `ink` | text and icons |
33
+ * | `border` | 1px lines |
34
+ * | `outline` | focus rings and block-level rings |
35
+ * | `fill` / `track` | indicator fills and their backgrounds |
36
+ *
37
+ * **Standalone tokens** are for neutral page chrome; use them by default. Elevated neutral surfaces (modals, dropdowns, popovers) are standalone too, with hover and active variants for the raised layer. Pair them with the standalone ink tokens.
38
+ *
39
+ * **Context tokens** describe a self-contained mini-environment (a primary CTA, a danger button). Contexts come in two shapes:
40
+ *
41
+ * 1. **Ink-owning contexts**: signal contexts (primary, primary-soft, danger, danger-soft, warning-soft, success-soft, selected) and dark/inverted elevation contexts (overlay, backdrop, stacked, tooltip, code). Each defines an ink balanced on its own surface, so always pair surface and ink from the *same* context.
42
+ * 2. **Single-property contexts**: focus (outline/border), progress (fill/track), highlight (surface), scrollbar (fill). Not surface+ink environments; the pairing rule doesn't apply.
43
+ *
44
+ * > [!WARNING] Never cross ink-owning contexts
45
+ * > Don't put a primary ink on a danger surface, or a danger-soft surface under a warning-soft ink. Each ink-owning context is contrast-balanced as a unit, and mixing produces illegible combinations, especially in dark mode.
46
+ *
47
+ * #### Defining custom colors
48
+ *
49
+ * Reserve custom colors for things genuinely outside the design system, such as brand illustrations, data-viz palettes, vendor-specific UI. Most needs ("primary button color", "error state") are already covered by tokens. When a custom color is justified, define it once per theme using the `[data-color-scheme="dark"]` selector that the SDK already sets:
50
+ *
51
+ * ```css
52
+ * .my-plugin {
53
+ * --my-brand: #4a90e2;
54
+ * }
55
+ *
56
+ * [data-color-scheme="dark"] .my-plugin {
57
+ * --my-brand: #6aa9ec;
58
+ * }
59
+ *
60
+ * .my-plugin__cta {
61
+ * background: var(--my-brand);
62
+ * color: var(--color--primary--ink);
63
+ * }
64
+ * ```
65
+ *
66
+ * For non-CSS branching (image sources, third-party widget themes, syntax-highlighting presets), branch on `ctx.colorScheme` directly, e.g. `<img src={ctx.colorScheme === 'dark' ? logoDark : logoLight} />`. On modern browsers, the CSS `light-dark()` function is a more concise alternative to the per-theme variable pattern above.
67
+ *
68
+ * #### Available tokens
69
+ *
70
+ * A swatch for every available token, grouped by context.
71
+ *
72
+ * ```js
73
+ * <Canvas ctx={ctx}>
74
+ * <div style={{ display: 'flex', flexDirection: 'column', gap: 'var(--spacing-l)' }}>
75
+ * <StateManager initial={true}>
76
+ * {(isOpen, setOpen) => (
77
+ * <Section
78
+ * title="Standalone"
79
+ * collapsible={{ isOpen, onToggle: () => setOpen((v) => !v) }}
80
+ * >
81
+ * <p>
82
+ * One-level tokens that work on any neutral page. The <code>surface</code>, <code>ink</code> and <code>border</code> families cover the page background, body text and dividers; the <code>surface-raised</code> variants belong to the elevated layer used by modals, dropdowns and popovers. The tone-on-neutral inks (<code>ink-danger</code>, <code>ink-warning</code>, <code>ink-success</code>) color text and icons on a neutral surface; inside a toned panel use that context's own ink instead.
83
+ * </p>
84
+ * <Swatches
85
+ * tokens={[
86
+ * ['--color--surface', 'Page background everything else sits on'],
87
+ * ['--color--surface-hover', 'Hovered row inside lists and tables'],
88
+ * ['--color--surface-muted', 'Background of muted section panels and quiet cards'],
89
+ * ['--color--surface-raised', 'Elevated layer for modals, dropdowns and popovers'],
90
+ * ['--color--surface-raised-hover', 'Hovered option inside a dropdown menu'],
91
+ * ['--color--surface-raised-active', 'Focused or pressed option inside a dropdown menu'],
92
+ * ['--color--ink', 'Primary body text'],
93
+ * ['--color--ink-subtle', 'Secondary text, captions, helper labels'],
94
+ * ['--color--ink-hover', 'Toolbar icon and link fill on hover'],
95
+ * ['--color--ink-muted', 'Deemphasized text that should recede'],
96
+ * ['--color--ink-placeholder', 'Empty-input placeholder text'],
97
+ * ['--color--ink-primary', 'Theme-colored text and icons for branded labels'],
98
+ * ['--color--ink-link', 'Inline links and accent text'],
99
+ * ['--color--ink-danger', 'Error text or icon on a neutral surface'],
100
+ * ['--color--ink-warning', 'Warning text or icon on a neutral surface'],
101
+ * ['--color--ink-success', 'Success text or icon on a neutral surface'],
102
+ * ['--color--ink-disabled', 'Label color on disabled inputs and buttons'],
103
+ * ['--color--border', 'Default 1px divider between cards, rows and sections'],
104
+ * ['--color--border-hover', 'Border of an input or card when hovered'],
105
+ * ]}
106
+ * />
107
+ * </Section>
108
+ * )}
109
+ * </StateManager>
110
+ *
111
+ * <StateManager initial={false}>
112
+ * {(isOpen, setOpen) => (
113
+ * <Section
114
+ * title="Context: primary"
115
+ * collapsible={{ isOpen, onToggle: () => setOpen((v) => !v) }}
116
+ * >
117
+ * <p>
118
+ * The project's brand hue (the color the user picked for their DatoCMS project) at full strength. Reach for it on the main call-to-action button on a page, and on badges or navigation bars that need to stand out. The <code>surface-secondary</code> variant is a quieter brand surface step (for accent badges and inline action chips) that keeps the same white <code>ink</code>.
119
+ * </p>
120
+ * <Swatches
121
+ * tokens={[
122
+ * ['--color--primary--surface', 'Resting background of a primary call-to-action button'],
123
+ * ['--color--primary--surface-hover', 'Hovered primary button background'],
124
+ * ['--color--primary--surface-active', 'Pressed primary button background'],
125
+ * ['--color--primary--surface-muted', 'Muted variant of the primary surface'],
126
+ * ['--color--primary--surface-secondary', 'Quieter brand surface for accent badges and inline chips'],
127
+ * ['--color--primary--ink', 'Text and icon color sitting on any primary surface'],
128
+ * ['--color--primary--border', 'Thin border drawn on top of a primary surface'],
129
+ * ]}
130
+ * />
131
+ * </Section>
132
+ * )}
133
+ * </StateManager>
134
+ *
135
+ * <StateManager initial={false}>
136
+ * {(isOpen, setOpen) => (
137
+ * <Section
138
+ * title="Context: primary-soft"
139
+ * collapsible={{ isOpen, onToggle: () => setOpen((v) => !v) }}
140
+ * >
141
+ * <p>
142
+ * A soft panel in the same project brand hue: a pale brand surface paired with saturated brand ink. Quieter than primary, still clearly on-brand, for secondary actions, chips and tinted callouts.
143
+ * </p>
144
+ * <Swatches
145
+ * tokens={[
146
+ * ['--color--primary-soft--surface', 'Resting background of secondary brand-tinted buttons'],
147
+ * ['--color--primary-soft--surface-hover', 'Hovered tinted button background'],
148
+ * ['--color--primary-soft--surface-active', 'Pressed tinted button background'],
149
+ * ['--color--primary-soft--ink', 'Text and icon color on a soft brand surface'],
150
+ * ['--color--primary-soft--border', 'Thin border drawn on top of a soft brand surface'],
151
+ * ]}
152
+ * />
153
+ * </Section>
154
+ * )}
155
+ * </StateManager>
156
+ *
157
+ * <StateManager initial={false}>
158
+ * {(isOpen, setOpen) => (
159
+ * <Section
160
+ * title="Context: selected"
161
+ * collapsible={{ isOpen, onToggle: () => setOpen((v) => !v) }}
162
+ * >
163
+ * <p>
164
+ * The active selection state: the highlighted entry in a list or tree, the currently picked option in a radio or choice group, the chosen card in a gallery.
165
+ * </p>
166
+ * <Swatches
167
+ * tokens={[
168
+ * ['--color--selected--surface', 'Background of the currently active entry in a list or tree'],
169
+ * ['--color--selected--surface-hover', 'Hover on an entry that is already selected'],
170
+ * ['--color--selected--ink', 'Text and icon color inside the selected entry'],
171
+ * ['--color--selected--border', 'Border or outline ring drawn around a selected option or card'],
172
+ * ]}
173
+ * />
174
+ * </Section>
175
+ * )}
176
+ * </StateManager>
177
+ *
178
+ * <StateManager initial={false}>
179
+ * {(isOpen, setOpen) => (
180
+ * <Section
181
+ * title="Context: disabled"
182
+ * collapsible={{ isOpen, onToggle: () => setOpen((v) => !v) }}
183
+ * >
184
+ * <p>
185
+ * The flat, low-contrast pair applied to non-interactive controls: disabled buttons, disabled selects and disabled toggles.
186
+ * </p>
187
+ * <PairSwatches
188
+ * tokens={[
189
+ * ['--color--disabled--surface', '--color--disabled--ink', 'Disabled button or control: muted background with low-contrast label'],
190
+ * ]}
191
+ * />
192
+ * </Section>
193
+ * )}
194
+ * </StateManager>
195
+ *
196
+ * <StateManager initial={false}>
197
+ * {(isOpen, setOpen) => (
198
+ * <Section
199
+ * title="Context: danger"
200
+ * collapsible={{ isOpen, onToggle: () => setOpen((v) => !v) }}
201
+ * >
202
+ * <p>
203
+ * Reserved for destructive actions, such as Delete, Remove or Reset operations.
204
+ * </p>
205
+ * <PairSwatches
206
+ * tokens={[
207
+ * ['--color--danger--surface', '--color--danger--ink', 'Destructive action button: vivid red surface with white label'],
208
+ * ]}
209
+ * />
210
+ * </Section>
211
+ * )}
212
+ * </StateManager>
213
+ *
214
+ * <StateManager initial={false}>
215
+ * {(isOpen, setOpen) => (
216
+ * <Section
217
+ * title="Context: focus"
218
+ * collapsible={{ isOpen, onToggle: () => setOpen((v) => !v) }}
219
+ * >
220
+ * <p>
221
+ * The keyboard-focus ring drawn around inputs, buttons and any other focusable control. Pair <code>border</code> on the element itself with <code>outline</code> as a soft halo.
222
+ * </p>
223
+ * <Swatches
224
+ * tokens={[
225
+ * ['--color--focus--border', 'Border color of the focused element'],
226
+ * ['--color--focus--outline', 'Soft outline ring drawn around the focused element'],
227
+ * ]}
228
+ * />
229
+ * </Section>
230
+ * )}
231
+ * </StateManager>
232
+ *
233
+ * <StateManager initial={false}>
234
+ * {(isOpen, setOpen) => (
235
+ * <Section
236
+ * title="Signal tones"
237
+ * collapsible={{ isOpen, onToggle: () => setOpen((v) => !v) }}
238
+ * >
239
+ * <p>
240
+ * Soft panels for validation states and notifications: red for failures, amber for warnings, green for successes. Each <code>-soft</code> context is a pale surface paired with saturated ink, following the same four-property shape (surface, ink, border, outline), so you can swap the tone without touching layout. For a colored message on a plain neutral surface, reach for the standalone <code>ink-danger</code>, <code>ink-warning</code> and <code>ink-success</code> instead.
241
+ * </p>
242
+ * <Swatches
243
+ * tokens={[
244
+ * ['--color--danger-soft--surface', 'Background of error banners and alert toasts'],
245
+ * ['--color--danger-soft--ink', 'Error message text and the icon inside an error panel'],
246
+ * ['--color--danger-soft--border', 'Border around an invalid input or alert toast'],
247
+ * ['--color--danger-soft--outline', 'Soft halo around an invalid field on focus'],
248
+ * ['--color--warning-soft--surface', 'Background of warning banners and plugin notices'],
249
+ * ['--color--warning-soft--ink', 'Text inside warning banners and warning toasts'],
250
+ * ['--color--warning-soft--border', 'Border around warning banners and modified-state pills'],
251
+ * ['--color--warning-soft--outline', 'Soft halo for warning emphasis'],
252
+ * ['--color--success-soft--surface', 'Background of success toasts'],
253
+ * ['--color--success-soft--ink', 'Text inside success toasts and success banners'],
254
+ * ['--color--success-soft--border', 'Border around success banners'],
255
+ * ['--color--success-soft--outline', 'Soft halo for success emphasis'],
256
+ * ]}
257
+ * />
258
+ * </Section>
259
+ * )}
260
+ * </StateManager>
261
+ *
262
+ * <StateManager initial={false}>
263
+ * {(isOpen, setOpen) => (
264
+ * <Section
265
+ * title="Context: highlight"
266
+ * collapsible={{ isOpen, onToggle: () => setOpen((v) => !v) }}
267
+ * >
268
+ * <p>
269
+ * The yellow marker pen for inline rich-text highlights inside Structured Text editors.
270
+ * </p>
271
+ * <Swatches
272
+ * tokens={[
273
+ * ['--color--highlight--surface', 'Background of a highlighted span inside a rich text editor'],
274
+ * ]}
275
+ * />
276
+ * </Section>
277
+ * )}
278
+ * </StateManager>
279
+ *
280
+ * <StateManager initial={false}>
281
+ * {(isOpen, setOpen) => (
282
+ * <Section
283
+ * title="Diffs"
284
+ * collapsible={{ isOpen, onToggle: () => setOpen((v) => !v) }}
285
+ * >
286
+ * <p>
287
+ * Content-versioning palette across three intents: green for added, red for removed, blue for changed. Inline text diffs use the surface tint; block-level revision panels use the outline. For positive/negative rule indicators, the left-border tone depends on whether the rule was just edited: a subtle ink when stable, a vivid one when freshly changed. The changed variant has no ink stops, since rule borders are only ever green or red.
288
+ * </p>
289
+ * <Swatches
290
+ * tokens={[
291
+ * ['--color--diff-added--surface', 'Background of inline added text inside a text diff'],
292
+ * ['--color--diff-added--outline', 'Outline drawn around a block-level added revision panel'],
293
+ * ['--color--diff-added--ink', 'Left-border color of a positive rule when it was recently changed (vivid)'],
294
+ * ['--color--diff-added--ink-subtle', 'Left-border color of a positive rule when it was not recently changed'],
295
+ * ['--color--diff-removed--surface', 'Background of inline removed text inside a text diff'],
296
+ * ['--color--diff-removed--outline', 'Outline drawn around a block-level removed revision panel'],
297
+ * ['--color--diff-removed--ink', 'Left-border color of a negative rule when it was recently changed (vivid)'],
298
+ * ['--color--diff-removed--ink-subtle', 'Left-border color of a negative rule when it was not recently changed'],
299
+ * ['--color--diff-changed--surface', 'Background of inline changed text inside a text diff'],
300
+ * ['--color--diff-changed--outline', 'Outline drawn around a block-level changed revision panel'],
301
+ * ]}
302
+ * />
303
+ * </Section>
304
+ * )}
305
+ * </StateManager>
306
+ *
307
+ * <StateManager initial={false}>
308
+ * {(isOpen, setOpen) => (
309
+ * <Section
310
+ * title="Status"
311
+ * collapsible={{ isOpen, onToggle: () => setOpen((v) => !v) }}
312
+ * >
313
+ * <p>
314
+ * Publishing-workflow status dots. Ink-only because the colored dot is the whole marker, no surface or border needed.
315
+ * </p>
316
+ * <Swatches
317
+ * tokens={[
318
+ * ['--color--status-draft--ink', 'Dot color for records that exist only as a draft'],
319
+ * ['--color--status-outdated--ink', 'Dot color for published records with unpublished changes'],
320
+ * ['--color--status-published--ink', 'Dot color for fully published records'],
321
+ * ]}
322
+ * />
323
+ * </Section>
324
+ * )}
325
+ * </StateManager>
326
+ *
327
+ * <StateManager initial={false}>
328
+ * {(isOpen, setOpen) => (
329
+ * <Section
330
+ * title="Backdrop and overlay"
331
+ * collapsible={{ isOpen, onToggle: () => setOpen((v) => !v) }}
332
+ * >
333
+ * <p>
334
+ * Two scrims for two jobs. The backdrop is the full-screen dim painted behind a modal dialog. The overlay is the lighter scrim that sits on top of media or thumbnails and hosts reversed buttons designed to read against dark imagery.
335
+ * </p>
336
+ * <PairSwatches
337
+ * tokens={[
338
+ * ['--color--backdrop--surface', '--color--backdrop--ink', 'Full-screen modal dim with icon color for close controls'],
339
+ * ]}
340
+ * />
341
+ * <Swatches
342
+ * tokens={[
343
+ * ['--color--overlay--surface', 'Scrim painted over media thumbnails and image cards'],
344
+ * ['--color--overlay--surface-hover', 'Hover background of a reversed button floating on dark media'],
345
+ * ['--color--overlay--surface-active', 'Pressed background of a reversed button on dark media'],
346
+ * ['--color--overlay--ink', 'Text and icon color inside reversed buttons on overlay surfaces'],
347
+ * ]}
348
+ * />
349
+ * </Section>
350
+ * )}
351
+ * </StateManager>
352
+ *
353
+ * <StateManager initial={false}>
354
+ * {(isOpen, setOpen) => (
355
+ * <Section
356
+ * title="Stacked"
357
+ * collapsible={{ isOpen, onToggle: () => setOpen((v) => !v) }}
358
+ * >
359
+ * <p>
360
+ * Layered dark inline areas, the kind used for asset uploaders and audio/video players. The wrapper paints the base surface; an inner detail panel sits a layer up; transparent action buttons gain visibility on hover and press.
361
+ * </p>
362
+ * <Swatches
363
+ * tokens={[
364
+ * ['--color--stacked--surface', 'Base layer of a dark inline panel'],
365
+ * ['--color--stacked--surface-upper', 'Inner detail panel sitting one layer above the base'],
366
+ * ['--color--stacked--surface-action', 'Resting background of action buttons inside a stacked panel (transparent)'],
367
+ * ['--color--stacked--surface-action-hover', 'Hovered action button inside a stacked panel'],
368
+ * ['--color--stacked--surface-action-active', 'Pressed action button inside a stacked panel'],
369
+ * ['--color--stacked--ink', 'Main text and values on a stacked surface'],
370
+ * ['--color--stacked--ink-subtle', 'Field labels and secondary text on a stacked surface'],
371
+ * ['--color--stacked--border', 'Column rules and dividers inside a stacked panel'],
372
+ * ]}
373
+ * />
374
+ * </Section>
375
+ * )}
376
+ * </StateManager>
377
+ *
378
+ * <StateManager initial={false}>
379
+ * {(isOpen, setOpen) => (
380
+ * <Section
381
+ * title="Progress"
382
+ * collapsible={{ isOpen, onToggle: () => setOpen((v) => !v) }}
383
+ * >
384
+ * <p>
385
+ * Horizontal progress bars used to report quota usage, upload advancement and similar percentage indicators.
386
+ * </p>
387
+ * <Swatches
388
+ * tokens={[
389
+ * ['--color--progress--track', 'Empty portion of the bar (the background track)'],
390
+ * ['--color--progress--fill', 'Filled portion of the bar, drawn in the brand color'],
391
+ * ['--color--progress--fill-hover', 'Fill color when the bar is hovered'],
392
+ * ]}
393
+ * />
394
+ * </Section>
395
+ * )}
396
+ * </StateManager>
397
+ *
398
+ * <StateManager initial={false}>
399
+ * {(isOpen, setOpen) => (
400
+ * <Section
401
+ * title="Tooltip"
402
+ * collapsible={{ isOpen, onToggle: () => setOpen((v) => !v) }}
403
+ * >
404
+ * <p>
405
+ * Small dark floating labels: the plain tooltip shown on hover, and the keyboard-hint variant that pairs a description with a keyboard shortcut.
406
+ * </p>
407
+ * <Swatches
408
+ * tokens={[
409
+ * ['--color--tooltip--surface', 'Background of standard and keyboard-hint tooltips'],
410
+ * ['--color--tooltip--surface-hover', 'Hover background for interactive controls living inside a tooltip'],
411
+ * ['--color--tooltip--ink', 'Primary text inside a tooltip'],
412
+ * ['--color--tooltip--ink-subtle', 'Secondary text inside a tooltip, e.g. the keyboard shortcut hint'],
413
+ * ]}
414
+ * />
415
+ * </Section>
416
+ * )}
417
+ * </StateManager>
418
+ *
419
+ * <StateManager initial={false}>
420
+ * {(isOpen, setOpen) => (
421
+ * <Section
422
+ * title="Code"
423
+ * collapsible={{ isOpen, onToggle: () => setOpen((v) => !v) }}
424
+ * >
425
+ * <p>
426
+ * The dark monospaced surface used by build logs, error traces and other terminal-style output.
427
+ * </p>
428
+ * <PairSwatches
429
+ * tokens={[
430
+ * ['--color--code--surface', '--color--code--ink', 'Dark monospaced surface with its text color'],
431
+ * ]}
432
+ * />
433
+ * </Section>
434
+ * )}
435
+ * </StateManager>
436
+ *
437
+ * <StateManager initial={false}>
438
+ * {(isOpen, setOpen) => (
439
+ * <Section
440
+ * title="Scrollbar"
441
+ * collapsible={{ isOpen, onToggle: () => setOpen((v) => !v) }}
442
+ * >
443
+ * <p>
444
+ * Tint applied globally to the native scrollbar thumb. Most visible in Firefox and on systems that keep scrollbars always on.
445
+ * </p>
446
+ * <Swatches
447
+ * tokens={[
448
+ * ['--color--scrollbar--fill', 'Color of the native scrollbar thumb across the whole app'],
449
+ * ]}
450
+ * />
451
+ * </Section>
452
+ * )}
453
+ * </StateManager>
454
+ *
455
+ * <StateManager initial={false}>
456
+ * {(isOpen, setOpen) => (
457
+ * <Section
458
+ * title="Field type groups"
459
+ * collapsible={{ isOpen, onToggle: () => setOpen((v) => !v) }}
460
+ * >
461
+ * <p>
462
+ * Fixed-hue soft chips for field type group icons. Each context exposes a <code>surface</code> (chip background) and an <code>ink</code> (icon fill). The hues are not brand-adaptive — they are fixed across projects and automatically flip between a pale surface with saturated ink in light mode and a deep surface with bright ink in dark mode.
463
+ * </p>
464
+ * <PairSwatches
465
+ * tokens={[
466
+ * ['--color--field-group-text--surface', '--color--field-group-text--ink', 'Text / string / structured-text fields'],
467
+ * ['--color--field-group-rich-text--surface', '--color--field-group-rich-text--ink', 'Rich-text and single-block fields'],
468
+ * ['--color--field-group-media--surface', '--color--field-group-media--ink', 'File, gallery and video fields'],
469
+ * ['--color--field-group-datetime--surface', '--color--field-group-datetime--ink', 'Date and date-time fields'],
470
+ * ['--color--field-group-number--surface', '--color--field-group-number--ink', 'Integer and float fields'],
471
+ * ['--color--field-group-boolean--surface', '--color--field-group-boolean--ink', 'Boolean fields'],
472
+ * ['--color--field-group-location--surface', '--color--field-group-location--ink', 'Lat/lon fields'],
473
+ * ['--color--field-group-color--surface', '--color--field-group-color--ink', 'Color fields'],
474
+ * ['--color--field-group-seo--surface', '--color--field-group-seo--ink', 'Slug and SEO fields'],
475
+ * ['--color--field-group-reference--surface', '--color--field-group-reference--ink', 'Link and links fields'],
476
+ * ['--color--field-group-json--surface', '--color--field-group-json--ink', 'JSON fields'],
477
+ * ]}
478
+ * />
479
+ * </Section>
480
+ * )}
481
+ * </StateManager>
482
+ * </div>
483
+ * </Canvas>;
484
+ * ```
485
+ *
486
+ * @example Shadows
487
+ *
488
+ * Four ready-made `box-shadow` composites (raised, floating, lifted, ambient). Drop them straight into a `box-shadow` property.
17
489
  *
18
490
  * ```js
19
491
  * <Canvas ctx={ctx}>
20
- * <Section title="Text colors">
21
- * <table>
22
- * <tbody>
23
- * <tr>
24
- * <td>
25
- * <code>--base-body-color</code>
26
- * </td>
27
- * <td width="30%">
28
- * <div
29
- * style={{
30
- * width: '30px',
31
- * height: '30px',
32
- * background: 'var(--base-body-color)',
33
- * }}
34
- * />
35
- * </td>
36
- * </tr>
37
- * <tr>
38
- * <td>
39
- * <code>--light-body-color</code>
40
- * </td>
41
- * <td width="30%">
42
- * <div
43
- * style={{
44
- * width: '30px',
45
- * height: '30px',
46
- * background: 'var(--light-body-color)',
47
- * }}
48
- * />
49
- * </td>
50
- * </tr>
51
- * <tr>
52
- * <td>
53
- * <code>--placeholder-body-color</code>
54
- * </td>
55
- * <td width="30%">
56
- * <div
57
- * style={{
58
- * width: '30px',
59
- * height: '30px',
60
- * background: 'var(--placeholder-body-color)',
61
- * }}
62
- * />
63
- * </td>
64
- * </tr>
65
- * </tbody>
66
- * </table>
67
- * </Section>
68
- * <Section title="UI colors">
69
- * <table>
70
- * <tbody>
71
- * <tr>
72
- * <td>
73
- * <code>--light-bg-color</code>
74
- * </td>
75
- * <td width="30%">
76
- * <div
77
- * style={{
78
- * width: '30px',
79
- * height: '30px',
80
- * background: 'var(--light-bg-color)',
81
- * }}
82
- * />
83
- * </td>
84
- * </tr>
85
- * <tr>
86
- * <td>
87
- * <code>--lighter-bg-color</code>
88
- * </td>
89
- * <td width="30%">
90
- * <div
91
- * style={{
92
- * width: '30px',
93
- * height: '30px',
94
- * background: 'var(--lighter-bg-color)',
95
- * }}
96
- * />
97
- * </td>
98
- * </tr>
99
- * <tr>
100
- * <td>
101
- * <code>--disabled-bg-color</code>
102
- * </td>
103
- * <td width="30%">
104
- * <div
105
- * style={{
106
- * width: '30px',
107
- * height: '30px',
108
- * background: 'var(--disabled-bg-color)',
109
- * }}
110
- * />
111
- * </td>
112
- * </tr>
113
- * <tr>
114
- * <td>
115
- * <code>--border-color</code>
116
- * </td>
117
- * <td width="30%">
118
- * <div
119
- * style={{
120
- * width: '30px',
121
- * height: '30px',
122
- * background: 'var(--border-color)',
123
- * }}
124
- * />
125
- * </td>
126
- * </tr>
127
- * <tr>
128
- * <td>
129
- * <code>--darker-border-color</code>
130
- * </td>
131
- * <td width="30%">
132
- * <div
133
- * style={{
134
- * width: '30px',
135
- * height: '30px',
136
- * background: 'var(--darker-border-color)',
137
- * }}
138
- * />
139
- * </td>
140
- * </tr>
141
- * <tr>
142
- * <td>
143
- * <code>--alert-color</code>
144
- * </td>
145
- * <td width="30%">
146
- * <div
147
- * style={{
148
- * width: '30px',
149
- * height: '30px',
150
- * background: 'var(--alert-color)',
151
- * }}
152
- * />
153
- * </td>
154
- * </tr>
155
- * <tr>
156
- * <td>
157
- * <code>--warning-color</code>
158
- * </td>
159
- * <td width="30%">
160
- * <div
161
- * style={{
162
- * width: '30px',
163
- * height: '30px',
164
- * background: 'var(--warning-color)',
165
- * }}
166
- * />
167
- * </td>
168
- * </tr>
169
- * <tr>
170
- * <td>
171
- * <code>--notice-color</code>
172
- * </td>
173
- * <td width="30%">
174
- * <div
175
- * style={{
176
- * width: '30px',
177
- * height: '30px',
178
- * background: 'var(--notice-color)',
179
- * }}
180
- * />
181
- * </td>
182
- * </tr>
183
- * <tr>
184
- * <td>
185
- * <code>--warning-bg-color</code>
186
- * </td>
187
- * <td width="30%">
188
- * <div
189
- * style={{
190
- * width: '30px',
191
- * height: '30px',
192
- * background: 'var(--warning-bg-color)',
193
- * }}
194
- * />
195
- * </td>
196
- * </tr>
197
- * <tr>
198
- * <td>
199
- * <code>--add-color</code>
200
- * </td>
201
- * <td width="30%">
202
- * <div
203
- * style={{
204
- * width: '30px',
205
- * height: '30px',
206
- * background: 'var(--add-color)',
207
- * }}
208
- * />
209
- * </td>
210
- * </tr>
211
- * <tr>
212
- * <td>
213
- * <code>--remove-color</code>
214
- * </td>
215
- * <td width="30%">
216
- * <div
217
- * style={{
218
- * width: '30px',
219
- * height: '30px',
220
- * background: 'var(--remove-color)',
221
- * }}
222
- * />
223
- * </td>
224
- * </tr>
225
- * </tbody>
226
- * </table>
227
- * </Section>
228
- * <Section title="Project-specific colors">
229
- * <table>
230
- * <tbody>
231
- * <tr>
232
- * <td>
233
- * <code>--accent-color</code>
234
- * </td>
235
- * <td width="30%">
236
- * <div
237
- * style={{
238
- * width: '30px',
239
- * height: '30px',
240
- * background: 'var(--accent-color)',
241
- * }}
242
- * />
243
- * </td>
244
- * </tr>
245
- * <tr>
246
- * <td>
247
- * <code>--primary-color</code>
248
- * </td>
249
- * <td width="30%">
250
- * <div
251
- * style={{
252
- * width: '30px',
253
- * height: '30px',
254
- * background: 'var(--primary-color)',
255
- * }}
256
- * />
257
- * </td>
258
- * </tr>
259
- * <tr>
260
- * <td>
261
- * <code>--light-color</code>
262
- * </td>
263
- * <td width="30%">
264
- * <div
265
- * style={{
266
- * width: '30px',
267
- * height: '30px',
268
- * background: 'var(--light-color)',
269
- * }}
270
- * />
271
- * </td>
272
- * </tr>
273
- * <tr>
274
- * <td>
275
- * <code>--dark-color</code>
276
- * </td>
277
- * <td width="30%">
278
- * <div
279
- * style={{
280
- * width: '30px',
281
- * height: '30px',
282
- * background: 'var(--dark-color)',
283
- * }}
284
- * />
285
- * </td>
286
- * </tr>
287
- * </tbody>
288
- * </table>
289
- * </Section>
492
+ * <Swatches
493
+ * kind="shadow"
494
+ * tokens={['--shadow--raised', '--shadow--floating', '--shadow--lifted', '--shadow--ambient']}
495
+ * />
290
496
  * </Canvas>;
291
497
  * ```
292
498
  *
293
- * @example Typography CSS variables
499
+ * @example Typography
294
500
  *
295
- * Typography is a foundational element in UI design. Good typography
296
- * establishes a strong, cohesive visual hierarchy and presents content clearly
297
- * and efficiently to users. Within the `Canvas` component, a set of CSS
298
- * variables is available allowing your plugin to conform to the overall
299
- * look&feel of DatoCMS:
501
+ * Typography is a foundational element in UI design. Good typography establishes a strong, cohesive visual hierarchy and presents content clearly and efficiently to users. Within the `Canvas` component, a set of CSS variables is available allowing your plugin to conform to the overall look&feel of DatoCMS:
300
502
  *
301
503
  * ```js
302
504
  * <Canvas ctx={ctx}>
303
- * <table>
304
- * <tbody>
305
- * <tr>
306
- * <td>
307
- * <code>--font-size-xxs</code>
308
- * </td>
309
- * <td>
310
- * <div style={{ fontSize: 'var(--font-size-xxs)' }}>
311
- * Size XXS
312
- * </div>
313
- * </td>
314
- * </tr>
315
- * <tr>
316
- * <td>
317
- * <code>--font-size-xs</code>
318
- * </td>
319
- * <td>
320
- * <div style={{ fontSize: 'var(--font-size-xs)' }}>Size XS</div>
321
- * </td>
322
- * </tr>
323
- * <tr>
324
- * <td>
325
- * <code>--font-size-s</code>
326
- * </td>
327
- * <td>
328
- * <div style={{ fontSize: 'var(--font-size-s)' }}>Size S</div>
329
- * </td>
330
- * </tr>
331
- * <tr>
332
- * <td>
333
- * <code>--font-size-m</code>
334
- * </td>
335
- * <td>
336
- * <div style={{ fontSize: 'var(--font-size-m)' }}>Size M</div>
337
- * </td>
338
- * </tr>
339
- * <tr>
340
- * <td>
341
- * <code>--font-size-l</code>
342
- * </td>
343
- * <td>
344
- * <div
345
- * style={{
346
- * fontSize: 'var(--font-size-l)',
347
- * fontWeight: 'var(--font-weight-bold)',
348
- * }}
349
- * >
350
- * Size L
351
- * </div>
352
- * </td>
353
- * </tr>
354
- * <tr>
355
- * <td>
356
- * <code>--font-size-xl</code>
357
- * </td>
358
- * <td>
359
- * <div
360
- * style={{
361
- * fontSize: 'var(--font-size-xl)',
362
- * fontWeight: 'var(--font-weight-bold)',
363
- * }}
364
- * >
365
- * Size XL
366
- * </div>
367
- * </td>
368
- * </tr>
369
- * <tr>
370
- * <td>
371
- * <code>--font-size-xxl</code>
372
- * </td>
373
- * <td>
374
- * <div
375
- * style={{
376
- * fontSize: 'var(--font-size-xxl)',
377
- * fontWeight: 'var(--font-weight-bold)',
378
- * }}
379
- * >
380
- * Size XXL
381
- * </div>
382
- * </td>
383
- * </tr>
384
- * <tr>
385
- * <td>
386
- * <code>--font-size-xxxl</code>
387
- * </td>
388
- * <td>
389
- * <div
390
- * style={{
391
- * fontSize: 'var(--font-size-xxxl)',
392
- * fontWeight: 'var(--font-weight-bold)',
393
- * }}
394
- * >
395
- * Size XXXL
396
- * </div>
397
- * </td>
398
- * </tr>
399
- * </tbody>
400
- * </table>
505
+ * <Swatches
506
+ * kind="font-size"
507
+ * tokens={[
508
+ * '--font-size-xxs',
509
+ * '--font-size-xs',
510
+ * '--font-size-s',
511
+ * '--font-size-m',
512
+ * '--font-size-l',
513
+ * '--font-size-xl',
514
+ * '--font-size-xxl',
515
+ * '--font-size-xxxl',
516
+ * ]}
517
+ * />
401
518
  * </Canvas>;
402
519
  * ```
403
520
  *
404
- * @example Spacing CSS variables
521
+ * @example Spacing
405
522
  *
406
- * The following CSS variables are available as well, to mimick the spacing
407
- * between elements used by the main DatoCMS application. Negative spacing
408
- * variables are available too (`--negative-spacing-<SIZE>`).
523
+ * The following CSS variables are available as well, to mimick the spacing between elements used by the main DatoCMS application. Negative spacing variables are available too (`--negative-spacing-<SIZE>`).
409
524
  *
410
525
  * ```js
411
526
  * <Canvas ctx={ctx}>
412
- * <table>
413
- * <tbody>
414
- * <tr>
415
- * <td>
416
- * <code>--spacing-s</code>
417
- * </td>
418
- * <td>
419
- * <div
420
- * style={{
421
- * background: 'var(--accent-color)',
422
- * width: 'var(--spacing-s)',
423
- * height: 'var(--spacing-s)',
424
- * }}
425
- * />
426
- * </td>
427
- * </tr>
428
- * <tr>
429
- * <td>
430
- * <code>--spacing-m</code>
431
- * </td>
432
- * <td>
433
- * <div
434
- * style={{
435
- * background: 'var(--accent-color)',
436
- * width: 'var(--spacing-m)',
437
- * height: 'var(--spacing-m)',
438
- * }}
439
- * />
440
- * </td>
441
- * </tr>
442
- * <tr>
443
- * <td>
444
- * <code>--spacing-l</code>
445
- * </td>
446
- * <td>
447
- * <div
448
- * style={{
449
- * background: 'var(--accent-color)',
450
- * width: 'var(--spacing-l)',
451
- * height: 'var(--spacing-l)',
452
- * }}
453
- * />
454
- * </td>
455
- * </tr>
456
- * <tr>
457
- * <td>
458
- * <code>--spacing-xl</code>
459
- * </td>
460
- * <td>
461
- * <div
462
- * style={{
463
- * background: 'var(--accent-color)',
464
- * width: 'var(--spacing-xl)',
465
- * height: 'var(--spacing-xl)',
466
- * }}
467
- * />
468
- * </td>
469
- * </tr>
470
- * <tr>
471
- * <td>
472
- * <code>--spacing-xxl</code>
473
- * </td>
474
- * <td>
475
- * <div
476
- * style={{
477
- * background: 'var(--accent-color)',
478
- * width: 'var(--spacing-xxl)',
479
- * height: 'var(--spacing-xxl)',
480
- * }}
481
- * />
482
- * </td>
483
- * </tr>
484
- * <tr>
485
- * <td>
486
- * <code>--spacing-xxxl</code>
487
- * </td>
488
- * <td>
489
- * <div
490
- * style={{
491
- * background: 'var(--accent-color)',
492
- * width: 'var(--spacing-xxxl)',
493
- * height: 'var(--spacing-xxxl)',
494
- * }}
495
- * />
496
- * </td>
497
- * </tr>
498
- * </tbody>
499
- * </table>
527
+ * <Spacings
528
+ * tokens={[
529
+ * '--spacing-s',
530
+ * '--spacing-m',
531
+ * '--spacing-l',
532
+ * '--spacing-xl',
533
+ * '--spacing-xxl',
534
+ * '--spacing-xxxl',
535
+ * ]}
536
+ * />
500
537
  * </Canvas>;
501
538
  * ```
502
539
  */