datocms-react-ui 2.1.4 → 2.2.0-alpha.1

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 (137) 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 +179 -276
  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/styles.module.css.json +1 -1
  14. package/dist/cjs/SelectInput/index.js +41 -22
  15. package/dist/cjs/SelectInput/index.js.map +1 -1
  16. package/dist/cjs/SidebarPanel/index.js +4 -11
  17. package/dist/cjs/SidebarPanel/index.js.map +1 -1
  18. package/dist/cjs/SidebarPanel/styles.module.css.json +1 -1
  19. package/dist/cjs/Spinner/styles.module.css.json +1 -1
  20. package/dist/cjs/SplitView/SplitViewSash/styles.module.css.json +1 -1
  21. package/dist/cjs/SwitchField/styles.module.css.json +1 -1
  22. package/dist/cjs/SwitchInput/styles.module.css.json +1 -1
  23. package/dist/cjs/TextInput/styles.module.css.json +1 -1
  24. package/dist/cjs/TextareaInput/styles.module.css.json +1 -1
  25. package/dist/cjs/Toolbar/Button/styles.module.css.json +1 -1
  26. package/dist/cjs/Toolbar/Toolbar/index.js +3 -3
  27. package/dist/cjs/Toolbar/Toolbar/styles.module.css.json +1 -1
  28. package/dist/cjs/Tooltip/TooltipContent/styles.module.css.json +1 -1
  29. package/dist/cjs/Tooltip/TooltipDelayGroup/index.js +2 -2
  30. package/dist/cjs/VerticalSplit/index.js +4 -4
  31. package/dist/cjs/VerticalSplit/styles.module.css.json +1 -1
  32. package/dist/cjs/generateStyleFromCtx/index.js +2 -2
  33. package/dist/cjs/generateStyleFromCtx/index.js.map +1 -1
  34. package/dist/cjs/icons.js +8 -8
  35. package/dist/cjs/icons.js.map +1 -1
  36. package/dist/esm/Button/styles.module.css.json +1 -1
  37. package/dist/esm/ButtonGroup/Button/styles.module.css.json +1 -1
  38. package/dist/esm/ButtonGroup/Group/styles.module.css.json +1 -1
  39. package/dist/esm/Canvas/index.d.ts +179 -276
  40. package/dist/esm/Canvas/index.js +179 -276
  41. package/dist/esm/Canvas/index.js.map +1 -1
  42. package/dist/esm/Canvas/styles.module.css.json +1 -1
  43. package/dist/esm/ContextInspector/styles.module.css.json +1 -1
  44. package/dist/esm/Dropdown/styles.module.css.json +1 -1
  45. package/dist/esm/FieldError/styles.module.css.json +1 -1
  46. package/dist/esm/FieldHint/styles.module.css.json +1 -1
  47. package/dist/esm/FormLabel/styles.module.css.json +1 -1
  48. package/dist/esm/HotKey/styles.module.css.json +1 -1
  49. package/dist/esm/Section/styles.module.css.json +1 -1
  50. package/dist/esm/SelectInput/index.js +41 -22
  51. package/dist/esm/SelectInput/index.js.map +1 -1
  52. package/dist/esm/SidebarPanel/index.d.ts +2 -2
  53. package/dist/esm/SidebarPanel/index.js +4 -11
  54. package/dist/esm/SidebarPanel/index.js.map +1 -1
  55. package/dist/esm/SidebarPanel/styles.module.css.json +1 -1
  56. package/dist/esm/Spinner/styles.module.css.json +1 -1
  57. package/dist/esm/SplitView/SplitViewSash/styles.module.css.json +1 -1
  58. package/dist/esm/SwitchField/styles.module.css.json +1 -1
  59. package/dist/esm/SwitchInput/styles.module.css.json +1 -1
  60. package/dist/esm/TextInput/styles.module.css.json +1 -1
  61. package/dist/esm/TextareaInput/styles.module.css.json +1 -1
  62. package/dist/esm/Toolbar/Button/styles.module.css.json +1 -1
  63. package/dist/esm/Toolbar/Toolbar/index.d.ts +3 -3
  64. package/dist/esm/Toolbar/Toolbar/index.js +3 -3
  65. package/dist/esm/Toolbar/Toolbar/styles.module.css.json +1 -1
  66. package/dist/esm/Tooltip/TooltipContent/styles.module.css.json +1 -1
  67. package/dist/esm/Tooltip/TooltipDelayGroup/index.d.ts +2 -2
  68. package/dist/esm/Tooltip/TooltipDelayGroup/index.js +2 -2
  69. package/dist/esm/VerticalSplit/index.d.ts +4 -4
  70. package/dist/esm/VerticalSplit/index.js +4 -4
  71. package/dist/esm/VerticalSplit/styles.module.css.json +1 -1
  72. package/dist/esm/generateStyleFromCtx/index.d.ts +1 -1
  73. package/dist/esm/generateStyleFromCtx/index.js +2 -2
  74. package/dist/esm/generateStyleFromCtx/index.js.map +1 -1
  75. package/dist/esm/icons.js +8 -8
  76. package/dist/esm/icons.js.map +1 -1
  77. package/dist/types/Canvas/index.d.ts +179 -276
  78. package/dist/types/SidebarPanel/index.d.ts +2 -2
  79. package/dist/types/Toolbar/Toolbar/index.d.ts +3 -3
  80. package/dist/types/Tooltip/TooltipDelayGroup/index.d.ts +2 -2
  81. package/dist/types/VerticalSplit/index.d.ts +4 -4
  82. package/dist/types/generateStyleFromCtx/index.d.ts +1 -1
  83. package/package.json +3 -3
  84. package/src/Button/styles.module.css +28 -19
  85. package/src/Button/styles.module.css.json +1 -1
  86. package/src/ButtonGroup/Button/styles.module.css +13 -17
  87. package/src/ButtonGroup/Button/styles.module.css.json +1 -1
  88. package/src/ButtonGroup/Group/styles.module.css +1 -1
  89. package/src/ButtonGroup/Group/styles.module.css.json +1 -1
  90. package/src/Canvas/index.tsx +179 -276
  91. package/src/Canvas/styles.module.css +32 -16
  92. package/src/Canvas/styles.module.css.json +1 -1
  93. package/src/ContextInspector/styles.module.css +10 -10
  94. package/src/ContextInspector/styles.module.css.json +1 -1
  95. package/src/Dropdown/styles.module.css +30 -28
  96. package/src/Dropdown/styles.module.css.json +1 -1
  97. package/src/FieldError/styles.module.css +1 -1
  98. package/src/FieldError/styles.module.css.json +1 -1
  99. package/src/FieldHint/styles.module.css +1 -1
  100. package/src/FieldHint/styles.module.css.json +1 -1
  101. package/src/FormLabel/styles.module.css +2 -2
  102. package/src/FormLabel/styles.module.css.json +1 -1
  103. package/src/HotKey/styles.module.css +1 -1
  104. package/src/HotKey/styles.module.css.json +1 -1
  105. package/src/Section/styles.module.css +8 -8
  106. package/src/Section/styles.module.css.json +1 -1
  107. package/src/SelectInput/index.tsx +54 -26
  108. package/src/SidebarPanel/index.tsx +4 -29
  109. package/src/SidebarPanel/styles.module.css +5 -6
  110. package/src/SidebarPanel/styles.module.css.json +1 -1
  111. package/src/Spinner/styles.module.css +1 -1
  112. package/src/Spinner/styles.module.css.json +1 -1
  113. package/src/SplitView/SplitViewSash/styles.module.css +7 -7
  114. package/src/SplitView/SplitViewSash/styles.module.css.json +1 -1
  115. package/src/SwitchField/styles.module.css +1 -1
  116. package/src/SwitchField/styles.module.css.json +1 -1
  117. package/src/SwitchInput/styles.module.css +15 -13
  118. package/src/SwitchInput/styles.module.css.json +1 -1
  119. package/src/TextInput/styles.module.css +13 -11
  120. package/src/TextInput/styles.module.css.json +1 -1
  121. package/src/TextareaInput/styles.module.css +13 -11
  122. package/src/TextareaInput/styles.module.css.json +1 -1
  123. package/src/Toolbar/Button/styles.module.css +4 -4
  124. package/src/Toolbar/Button/styles.module.css.json +1 -1
  125. package/src/Toolbar/Toolbar/index.tsx +3 -3
  126. package/src/Toolbar/Toolbar/styles.module.css +2 -2
  127. package/src/Toolbar/Toolbar/styles.module.css.json +1 -1
  128. package/src/Tooltip/TooltipContent/styles.module.css +2 -2
  129. package/src/Tooltip/TooltipContent/styles.module.css.json +1 -1
  130. package/src/Tooltip/TooltipDelayGroup/index.tsx +2 -2
  131. package/src/VerticalSplit/index.tsx +4 -4
  132. package/src/VerticalSplit/styles.module.css +8 -11
  133. package/src/VerticalSplit/styles.module.css.json +1 -1
  134. package/src/generateStyleFromCtx/index.ts +7 -1
  135. package/src/icons.tsx +8 -0
  136. package/styles.css +1 -1
  137. package/types.json +534 -389
@@ -34,283 +34,186 @@ export type CanvasProps = {
34
34
  };
35
35
 
36
36
  /**
37
- * @example Color palette CSS variables
37
+ * @example Semantic color token CSS variables
38
38
  *
39
- * Within the `Canvas` component, a color palette is made available as a set of
40
- * CSS variables, allowing you to conform to the theme of the current
41
- * environment:
39
+ * Inside `Canvas`, the host exposes a full semantic color palette as CSS
40
+ * custom properties. Components should reference these tokens directly
41
+ * they adapt to the user's active theme (including dark mode)
42
+ * automatically.
43
+ *
44
+ * ### How to read a token name
45
+ *
46
+ * ```
47
+ * --color--{property} // standalone (one -- after color)
48
+ * --color--{context}--{property} // context pair (two -- after color)
49
+ * ```
50
+ *
51
+ * **Properties** — `surface` (backgrounds), `ink` (text/icons),
52
+ * `border` (1px lines), `outline` (focus rings), plus `fill` / `track`
53
+ * for progress bars.
54
+ *
55
+ * **Standalone** tokens work on any neutral page. **Contexts** are
56
+ * self-contained environments: always pair a `surface` with the `ink`,
57
+ * `border`, and hover states from the *same* context. Never mix — e.g.
58
+ * don't put `--color--primary--ink` on `--color--danger--surface`.
59
+ *
60
+ * Non-color tokens `--shadow--raised` / `--shadow--floating` /
61
+ * `--shadow--lifted` / `--shadow--ambient` are ready-made `box-shadow`
62
+ * composites.
42
63
  *
43
64
  * ```js
44
65
  * <Canvas ctx={ctx}>
45
- * <Section title="Text colors">
46
- * <table>
47
- * <tbody>
48
- * <tr>
49
- * <td>
50
- * <code>--base-body-color</code>
51
- * </td>
52
- * <td width="30%">
53
- * <div
54
- * style={{
55
- * width: '30px',
56
- * height: '30px',
57
- * background: 'var(--base-body-color)',
58
- * }}
59
- * />
60
- * </td>
66
+ * <Section title="Standalone — use on any neutral page">
67
+ * <table><tbody>
68
+ * {[
69
+ * ['--color--surface', 'Default page background'],
70
+ * ['--color--surface-hover', 'Hovered row / list item'],
71
+ * ['--color--surface-muted', 'Muted section / card background'],
72
+ * ['--color--ink', 'Primary text'],
73
+ * ['--color--ink-subtle', 'Secondary text / captions'],
74
+ * ['--color--ink-hover', 'Text under hover'],
75
+ * ['--color--ink-muted', 'De-emphasized text'],
76
+ * ['--color--ink-placeholder', 'Input placeholder text'],
77
+ * ['--color--ink-primary', 'Brand-highlighted text / icons'],
78
+ * ['--color--ink-accent', 'Links / accent text'],
79
+ * ['--color--ink-disabled', 'Disabled text'],
80
+ * ['--color--border', 'Default 1px border'],
81
+ * ['--color--border-hover', 'Border under hover'],
82
+ * ].map(([t, d]) => (
83
+ * <tr key={t}>
84
+ * <td><code>{t}</code></td>
85
+ * <td style={{ color: 'var(--color--ink-subtle)' }}>{d}</td>
86
+ * <td width="40"><div style={{ width: '30px', height: '30px', background: `var(${t})`, border: '1px solid var(--color--border)' }} /></td>
61
87
  * </tr>
62
- * <tr>
63
- * <td>
64
- * <code>--light-body-color</code>
65
- * </td>
66
- * <td width="30%">
67
- * <div
68
- * style={{
69
- * width: '30px',
70
- * height: '30px',
71
- * background: 'var(--light-body-color)',
72
- * }}
73
- * />
74
- * </td>
75
- * </tr>
76
- * <tr>
77
- * <td>
78
- * <code>--placeholder-body-color</code>
79
- * </td>
80
- * <td width="30%">
81
- * <div
82
- * style={{
83
- * width: '30px',
84
- * height: '30px',
85
- * background: 'var(--placeholder-body-color)',
86
- * }}
87
- * />
88
- * </td>
89
- * </tr>
90
- * </tbody>
91
- * </table>
88
+ * ))}
89
+ * </tbody></table>
92
90
  * </Section>
93
- * <Section title="UI colors">
94
- * <table>
95
- * <tbody>
96
- * <tr>
97
- * <td>
98
- * <code>--light-bg-color</code>
99
- * </td>
100
- * <td width="30%">
101
- * <div
102
- * style={{
103
- * width: '30px',
104
- * height: '30px',
105
- * background: 'var(--light-bg-color)',
106
- * }}
107
- * />
108
- * </td>
109
- * </tr>
110
- * <tr>
111
- * <td>
112
- * <code>--lighter-bg-color</code>
113
- * </td>
114
- * <td width="30%">
115
- * <div
116
- * style={{
117
- * width: '30px',
118
- * height: '30px',
119
- * background: 'var(--lighter-bg-color)',
120
- * }}
121
- * />
122
- * </td>
123
- * </tr>
124
- * <tr>
125
- * <td>
126
- * <code>--disabled-bg-color</code>
127
- * </td>
128
- * <td width="30%">
129
- * <div
130
- * style={{
131
- * width: '30px',
132
- * height: '30px',
133
- * background: 'var(--disabled-bg-color)',
134
- * }}
135
- * />
136
- * </td>
137
- * </tr>
138
- * <tr>
139
- * <td>
140
- * <code>--border-color</code>
141
- * </td>
142
- * <td width="30%">
143
- * <div
144
- * style={{
145
- * width: '30px',
146
- * height: '30px',
147
- * background: 'var(--border-color)',
148
- * }}
149
- * />
150
- * </td>
151
- * </tr>
152
- * <tr>
153
- * <td>
154
- * <code>--darker-border-color</code>
155
- * </td>
156
- * <td width="30%">
157
- * <div
158
- * style={{
159
- * width: '30px',
160
- * height: '30px',
161
- * background: 'var(--darker-border-color)',
162
- * }}
163
- * />
164
- * </td>
165
- * </tr>
166
- * <tr>
167
- * <td>
168
- * <code>--alert-color</code>
169
- * </td>
170
- * <td width="30%">
171
- * <div
172
- * style={{
173
- * width: '30px',
174
- * height: '30px',
175
- * background: 'var(--alert-color)',
176
- * }}
177
- * />
178
- * </td>
179
- * </tr>
180
- * <tr>
181
- * <td>
182
- * <code>--warning-color</code>
183
- * </td>
184
- * <td width="30%">
185
- * <div
186
- * style={{
187
- * width: '30px',
188
- * height: '30px',
189
- * background: 'var(--warning-color)',
190
- * }}
191
- * />
192
- * </td>
193
- * </tr>
194
- * <tr>
195
- * <td>
196
- * <code>--notice-color</code>
197
- * </td>
198
- * <td width="30%">
199
- * <div
200
- * style={{
201
- * width: '30px',
202
- * height: '30px',
203
- * background: 'var(--notice-color)',
204
- * }}
205
- * />
206
- * </td>
207
- * </tr>
208
- * <tr>
209
- * <td>
210
- * <code>--warning-bg-color</code>
211
- * </td>
212
- * <td width="30%">
213
- * <div
214
- * style={{
215
- * width: '30px',
216
- * height: '30px',
217
- * background: 'var(--warning-bg-color)',
218
- * }}
219
- * />
220
- * </td>
221
- * </tr>
222
- * <tr>
223
- * <td>
224
- * <code>--add-color</code>
225
- * </td>
226
- * <td width="30%">
227
- * <div
228
- * style={{
229
- * width: '30px',
230
- * height: '30px',
231
- * background: 'var(--add-color)',
232
- * }}
233
- * />
234
- * </td>
235
- * </tr>
236
- * <tr>
237
- * <td>
238
- * <code>--remove-color</code>
239
- * </td>
240
- * <td width="30%">
241
- * <div
242
- * style={{
243
- * width: '30px',
244
- * height: '30px',
245
- * background: 'var(--remove-color)',
246
- * }}
247
- * />
248
- * </td>
249
- * </tr>
250
- * </tbody>
251
- * </table>
91
+ *
92
+ * <Section title="Context: raised — modals, dropdowns, popovers">
93
+ * <table><tbody>
94
+ * {['--color--raised--surface', '--color--raised--surface-hover', '--color--raised--surface-active']
95
+ * .map((t) => (<tr key={t}><td><code>{t}</code></td><td width="40"><div style={{ width: '30px', height: '30px', background: `var(${t})`, border: '1px solid var(--color--border)' }} /></td></tr>))}
96
+ * </tbody></table>
252
97
  * </Section>
253
- * <Section title="Project-specific colors">
254
- * <table>
255
- * <tbody>
256
- * <tr>
257
- * <td>
258
- * <code>--accent-color</code>
259
- * </td>
260
- * <td width="30%">
261
- * <div
262
- * style={{
263
- * width: '30px',
264
- * height: '30px',
265
- * background: 'var(--accent-color)',
266
- * }}
267
- * />
268
- * </td>
269
- * </tr>
270
- * <tr>
271
- * <td>
272
- * <code>--primary-color</code>
273
- * </td>
274
- * <td width="30%">
275
- * <div
276
- * style={{
277
- * width: '30px',
278
- * height: '30px',
279
- * background: 'var(--primary-color)',
280
- * }}
281
- * />
282
- * </td>
283
- * </tr>
284
- * <tr>
285
- * <td>
286
- * <code>--light-color</code>
287
- * </td>
288
- * <td width="30%">
289
- * <div
290
- * style={{
291
- * width: '30px',
292
- * height: '30px',
293
- * background: 'var(--light-color)',
294
- * }}
295
- * />
296
- * </td>
297
- * </tr>
298
- * <tr>
299
- * <td>
300
- * <code>--dark-color</code>
301
- * </td>
302
- * <td width="30%">
303
- * <div
304
- * style={{
305
- * width: '30px',
306
- * height: '30px',
307
- * background: 'var(--dark-color)',
308
- * }}
309
- * />
310
- * </td>
311
- * </tr>
312
- * </tbody>
313
- * </table>
98
+ *
99
+ * <Section title="Context: primary — main call-to-action buttons, badges, nav">
100
+ * <table><tbody>
101
+ * {['--color--primary--surface', '--color--primary--surface-hover', '--color--primary--surface-active', '--color--primary--surface-muted', '--color--primary--ink', '--color--primary--border']
102
+ * .map((t) => (<tr key={t}><td><code>{t}</code></td><td width="40"><div style={{ width: '30px', height: '30px', background: `var(${t})`, border: '1px solid var(--color--border)' }} /></td></tr>))}
103
+ * </tbody></table>
104
+ * </Section>
105
+ *
106
+ * <Section title="Context: tinted — subtle brand-tinted surfaces">
107
+ * <table><tbody>
108
+ * {['--color--tinted--surface', '--color--tinted--surface-hover', '--color--tinted--surface-active', '--color--tinted--ink', '--color--tinted--border']
109
+ * .map((t) => (<tr key={t}><td><code>{t}</code></td><td width="40"><div style={{ width: '30px', height: '30px', background: `var(${t})`, border: '1px solid var(--color--border)' }} /></td></tr>))}
110
+ * </tbody></table>
111
+ * </Section>
112
+ *
113
+ * <Section title="Context: accent, selected, disabled, danger">
114
+ * <table><tbody>
115
+ * {['--color--accent--surface', '--color--accent--ink',
116
+ * '--color--selected--surface', '--color--selected--ink', '--color--selected--border',
117
+ * '--color--disabled--surface', '--color--disabled--ink',
118
+ * '--color--danger--surface', '--color--danger--ink']
119
+ * .map((t) => (<tr key={t}><td><code>{t}</code></td><td width="40"><div style={{ width: '30px', height: '30px', background: `var(${t})`, border: '1px solid var(--color--border)' }} /></td></tr>))}
120
+ * </tbody></table>
121
+ * </Section>
122
+ *
123
+ * <Section title="Context: focus — focus rings and outlines">
124
+ * <table><tbody>
125
+ * {['--color--focus--border', '--color--focus--outline']
126
+ * .map((t) => (<tr key={t}><td><code>{t}</code></td><td width="40"><div style={{ width: '30px', height: '30px', background: `var(${t})`, border: '1px solid var(--color--border)' }} /></td></tr>))}
127
+ * </tbody></table>
128
+ * </Section>
129
+ *
130
+ * <Section title="Feedback — validation and form states">
131
+ * <table><tbody>
132
+ * {['--color--feedback-fail--ink', '--color--feedback-fail--border', '--color--feedback-fail--outline', '--color--feedback-fail--surface',
133
+ * '--color--feedback-warning--ink', '--color--feedback-warning--border', '--color--feedback-warning--outline', '--color--feedback-warning--surface',
134
+ * '--color--feedback-success--ink', '--color--feedback-success--border', '--color--feedback-success--outline', '--color--feedback-success--surface']
135
+ * .map((t) => (<tr key={t}><td><code>{t}</code></td><td width="40"><div style={{ width: '30px', height: '30px', background: `var(${t})`, border: '1px solid var(--color--border)' }} /></td></tr>))}
136
+ * </tbody></table>
137
+ * </Section>
138
+ *
139
+ * <Section title="Context: highlight — rich text inline highlights">
140
+ * <table><tbody>
141
+ * {['--color--highlight--surface']
142
+ * .map((t) => (<tr key={t}><td><code>{t}</code></td><td width="40"><div style={{ width: '30px', height: '30px', background: `var(${t})`, border: '1px solid var(--color--border)' }} /></td></tr>))}
143
+ * </tbody></table>
144
+ * </Section>
145
+ *
146
+ * <Section title="Diffs — content versioning (added / removed / changed)">
147
+ * <table><tbody>
148
+ * {['--color--diff-added--surface', '--color--diff-added--outline', '--color--diff-added--ink', '--color--diff-added--ink-subtle',
149
+ * '--color--diff-removed--surface', '--color--diff-removed--outline', '--color--diff-removed--ink', '--color--diff-removed--ink-subtle',
150
+ * '--color--diff-changed--surface', '--color--diff-changed--outline']
151
+ * .map((t) => (<tr key={t}><td><code>{t}</code></td><td width="40"><div style={{ width: '30px', height: '30px', background: `var(${t})`, border: '1px solid var(--color--border)' }} /></td></tr>))}
152
+ * </tbody></table>
153
+ * </Section>
154
+ *
155
+ * <Section title="Status — publishing workflow badges (ink-only)">
156
+ * <table><tbody>
157
+ * {['--color--status-draft--ink', '--color--status-outdated--ink', '--color--status-published--ink']
158
+ * .map((t) => (<tr key={t}><td><code>{t}</code></td><td><span style={{ color: `var(${t})`, fontWeight: 'bold' }}>Sample text</span></td></tr>))}
159
+ * </tbody></table>
160
+ * </Section>
161
+ *
162
+ * <Section title="Backdrop & overlay — scrims and floating UI">
163
+ * <table><tbody>
164
+ * {['--color--backdrop--surface', '--color--backdrop--ink',
165
+ * '--color--overlay--surface', '--color--overlay--surface-hover', '--color--overlay--surface-active', '--color--overlay--ink']
166
+ * .map((t) => (<tr key={t}><td><code>{t}</code></td><td width="40"><div style={{ width: '30px', height: '30px', background: `var(${t})`, border: '1px solid var(--color--border)' }} /></td></tr>))}
167
+ * </tbody></table>
168
+ * </Section>
169
+ *
170
+ * <Section title="Stacked — dark layered UI (uploaders, media players)">
171
+ * <p>Stacked gives you layered dark surfaces (base → upper) plus action buttons, borders and ink tones. Use it when a dark inline panel needs internal hierarchy.</p>
172
+ * <table><tbody>
173
+ * {['--color--stacked--surface', '--color--stacked--surface-upper',
174
+ * '--color--stacked--surface-action', '--color--stacked--surface-action-hover', '--color--stacked--surface-action-active',
175
+ * '--color--stacked--ink', '--color--stacked--ink-subtle', '--color--stacked--border']
176
+ * .map((t) => (<tr key={t}><td><code>{t}</code></td><td width="40"><div style={{ width: '30px', height: '30px', background: `var(${t})`, border: '1px solid var(--color--border)' }} /></td></tr>))}
177
+ * </tbody></table>
178
+ * </Section>
179
+ *
180
+ * <Section title="Progress — bar track and fill">
181
+ * <table><tbody>
182
+ * {['--color--progress--track', '--color--progress--fill', '--color--progress--fill-hover']
183
+ * .map((t) => (<tr key={t}><td><code>{t}</code></td><td width="40"><div style={{ width: '30px', height: '30px', background: `var(${t})`, border: '1px solid var(--color--border)' }} /></td></tr>))}
184
+ * </tbody></table>
185
+ * </Section>
186
+ *
187
+ * <Section title="Tooltip — small dark floating labels">
188
+ * <table><tbody>
189
+ * {['--color--tooltip--surface', '--color--tooltip--surface-hover', '--color--tooltip--ink', '--color--tooltip--ink-subtle']
190
+ * .map((t) => (<tr key={t}><td><code>{t}</code></td><td width="40"><div style={{ width: '30px', height: '30px', background: `var(${t})`, border: '1px solid var(--color--border)' }} /></td></tr>))}
191
+ * </tbody></table>
192
+ * </Section>
193
+ *
194
+ * <Section title="Code — dark code blocks, logs, error traces">
195
+ * <table><tbody>
196
+ * {['--color--code--surface', '--color--code--ink']
197
+ * .map((t) => (<tr key={t}><td><code>{t}</code></td><td width="40"><div style={{ width: '30px', height: '30px', background: `var(${t})`, border: '1px solid var(--color--border)' }} /></td></tr>))}
198
+ * </tbody></table>
199
+ * </Section>
200
+ *
201
+ * <Section title="Scrollbar">
202
+ * <table><tbody>
203
+ * {['--color--scrollbar--fill']
204
+ * .map((t) => (<tr key={t}><td><code>{t}</code></td><td width="40"><div style={{ width: '30px', height: '30px', background: `var(${t})`, border: '1px solid var(--color--border)' }} /></td></tr>))}
205
+ * </tbody></table>
206
+ * </Section>
207
+ *
208
+ * <Section title="Shadow composites — drop-in box-shadow values">
209
+ * <div style={{ display: 'flex', gap: 'var(--spacing-l)', padding: 'var(--spacing-l)' }}>
210
+ * {['--shadow--raised', '--shadow--floating', '--shadow--lifted', '--shadow--ambient'].map((t) => (
211
+ * <div key={t} style={{ textAlign: 'center' }}>
212
+ * <div style={{ width: '80px', height: '80px', background: 'var(--color--surface)', borderRadius: '4px', boxShadow: `var(${t})` }} />
213
+ * <code style={{ display: 'block', marginTop: 'var(--spacing-s)', fontSize: 'var(--font-size-xs)' }}>{t}</code>
214
+ * </div>
215
+ * ))}
216
+ * </div>
314
217
  * </Section>
315
218
  * </Canvas>;
316
219
  * ```
@@ -443,7 +346,7 @@ export type CanvasProps = {
443
346
  * <td>
444
347
  * <div
445
348
  * style={{
446
- * background: 'var(--accent-color)',
349
+ * background: 'var(--color--accent--surface)',
447
350
  * width: 'var(--spacing-s)',
448
351
  * height: 'var(--spacing-s)',
449
352
  * }}
@@ -457,7 +360,7 @@ export type CanvasProps = {
457
360
  * <td>
458
361
  * <div
459
362
  * style={{
460
- * background: 'var(--accent-color)',
363
+ * background: 'var(--color--accent--surface)',
461
364
  * width: 'var(--spacing-m)',
462
365
  * height: 'var(--spacing-m)',
463
366
  * }}
@@ -471,7 +374,7 @@ export type CanvasProps = {
471
374
  * <td>
472
375
  * <div
473
376
  * style={{
474
- * background: 'var(--accent-color)',
377
+ * background: 'var(--color--accent--surface)',
475
378
  * width: 'var(--spacing-l)',
476
379
  * height: 'var(--spacing-l)',
477
380
  * }}
@@ -485,7 +388,7 @@ export type CanvasProps = {
485
388
  * <td>
486
389
  * <div
487
390
  * style={{
488
- * background: 'var(--accent-color)',
391
+ * background: 'var(--color--accent--surface)',
489
392
  * width: 'var(--spacing-xl)',
490
393
  * height: 'var(--spacing-xl)',
491
394
  * }}
@@ -499,7 +402,7 @@ export type CanvasProps = {
499
402
  * <td>
500
403
  * <div
501
404
  * style={{
502
- * background: 'var(--accent-color)',
405
+ * background: 'var(--color--accent--surface)',
503
406
  * width: 'var(--spacing-xxl)',
504
407
  * height: 'var(--spacing-xxl)',
505
408
  * }}
@@ -513,7 +416,7 @@ export type CanvasProps = {
513
416
  * <td>
514
417
  * <div
515
418
  * style={{
516
- * background: 'var(--accent-color)',
419
+ * background: 'var(--color--accent--surface)',
517
420
  * width: 'var(--spacing-xxxl)',
518
421
  * height: 'var(--spacing-xxxl)',
519
422
  * }}
@@ -1,33 +1,46 @@
1
1
  .themeVariables {
2
- /* Colors */
2
+ /**
3
+ * @deprecated LEGACY COLOR VARIABLES — DO NOT USE IN NEW CODE.
4
+ *
5
+ * The color variables below are kept strictly for backward compatibility
6
+ * with third-party plugins authored before the semantic color token
7
+ * system. Each one now resolves to its closest semantic token, so it
8
+ * follows the active theme (including dark mode).
9
+ *
10
+ * The colors in this block will be removed in a future major version.
11
+ * Migrate to the `--color--*` semantic tokens (see the `Canvas` JSDoc
12
+ * for the full list). The non-color tokens further below (fonts, spacing,
13
+ * font-sizes, easings) are stable and will remain.
14
+ */
15
+ /* Colors (deprecated) */
3
16
  --base-body-color-rgb-components: 52, 54, 58;
4
- --base-body-color: rgb(var(--base-body-color-rgb-components));
17
+ --base-body-color: var(--color--ink);
5
18
  --light-body-color-rgb-components: 132, 132, 132;
6
- --light-body-color: rgb(var(--light-body-color-rgb-components));
19
+ --light-body-color: var(--color--ink-subtle);
7
20
  --placeholder-body-color-rgb-components: 198, 198, 198;
8
- --placeholder-body-color: rgb(var(--placeholder-body-color-rgb-components));
21
+ --placeholder-body-color: var(--color--ink-placeholder);
9
22
  --light-bg-color-rgb-components: 245, 245, 245;
10
- --light-bg-color: rgb(var(--light-bg-color-rgb-components));
23
+ --light-bg-color: var(--color--surface-muted);
11
24
  --lighter-bg-color-rgb-components: 248, 248, 248;
12
- --lighter-bg-color: rgb(var(--lighter-bg-color-rgb-components));
25
+ --lighter-bg-color: var(--color--surface-muted);
13
26
  --disabled-bg-color-rgb-components: 237, 237, 237;
14
- --disabled-bg-color: rgb(var(--disabled-bg-color-rgb-components));
27
+ --disabled-bg-color: var(--color--disabled--surface);
15
28
  --border-color-rgb-components: 240, 240, 240;
16
- --border-color: rgb(var(--border-color-rgb-components));
29
+ --border-color: var(--color--border);
17
30
  --darker-border-color-rgb-components: 215, 215, 215;
18
- --darker-border-color: rgb(var(--darker-border-color-rgb-components));
31
+ --darker-border-color: var(--color--border-hover);
19
32
  --alert-color-rgb-components: 255, 94, 73;
20
- --alert-color: rgb(var(--alert-color-rgb-components));
33
+ --alert-color: var(--color--feedback-fail--ink);
21
34
  --warning-color-rgb-components: 255, 215, 0;
22
- --warning-color: rgb(var(--warning-color-rgb-components));
35
+ --warning-color: var(--color--feedback-warning--ink);
23
36
  --notice-color-rgb-components: 70, 215, 0;
24
- --notice-color: rgb(var(--notice-color-rgb-components));
37
+ --notice-color: var(--color--feedback-success--ink);
25
38
  --warning-bg-color-rgb-components: 255, 255, 229;
26
- --warning-bg-color: rgb(var(--warning-bg-color-rgb-components));
39
+ --warning-bg-color: var(--color--feedback-warning--surface);
27
40
  --add-color-rgb-components: 76, 176, 109;
28
- --add-color: rgb(var(--add-color-rgb-components));
41
+ --add-color: var(--color--diff-added--surface);
29
42
  --remove-color-rgb-components: 235, 87, 106;
30
- --remove-color: rgb(var(--remove-color-rgb-components));
43
+ --remove-color: var(--color--diff-removed--surface);
31
44
 
32
45
  /* Fonts */
33
46
  --base-font-family:
@@ -39,6 +52,7 @@
39
52
  --font-weight-bold: 500;
40
53
 
41
54
  /* Spacing */
55
+ --spacing-xs: calc(0.25 * 12 * 0.0625rem);
42
56
  --spacing-s: calc(0.5 * 12 * 0.0625rem);
43
57
  --spacing-m: calc(1 * 12 * 0.0625rem);
44
58
  --spacing-l: calc(2 * 12 * 0.0625rem);
@@ -46,6 +60,7 @@
46
60
  --spacing-xxl: calc(5 * 12 * 0.0625rem);
47
61
  --spacing-xxxl: calc(8 * 12 * 0.0625rem);
48
62
 
63
+ --negative-spacing-xs: calc(-0.25 * 12 * 0.0625rem);
49
64
  --negative-spacing-s: calc(-0.5 * 12 * 0.0625rem);
50
65
  --negative-spacing-m: calc(-1 * 12 * 0.0625rem);
51
66
  --negative-spacing-l: calc(-2 * 12 * 0.0625rem);
@@ -71,7 +86,8 @@
71
86
  font-family: var(--base-font-family);
72
87
  -webkit-text-size-adjust: 100%;
73
88
  line-height: 1.5;
74
- color: var(--base-body-color);
89
+ color: var(--color--ink);
90
+ background: var(--color--surface);
75
91
  font-size: var(--font-size-m);
76
92
  text-rendering: optimizeLegibility;
77
93
  }
@@ -1 +1 @@
1
- {"themeVariables":"_themeVariables_2dr1w_1","canvas":"_canvas_2dr1w_70"}
1
+ {"themeVariables":"_themeVariables_1evrh_1","canvas":"_canvas_1evrh_85"}