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
@@ -9,283 +9,186 @@ export declare type CanvasProps = {
9
9
  children: ReactNode;
10
10
  };
11
11
  /**
12
- * @example Color palette CSS variables
12
+ * @example Semantic color token CSS variables
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
+ * Inside `Canvas`, the host exposes a full semantic color palette as CSS
15
+ * custom properties. Components should reference these tokens directly
16
+ * they adapt to the user's active theme (including dark mode)
17
+ * automatically.
18
+ *
19
+ * ### How to read a token name
20
+ *
21
+ * ```
22
+ * --color--{property} // standalone (one -- after color)
23
+ * --color--{context}--{property} // context pair (two -- after color)
24
+ * ```
25
+ *
26
+ * **Properties** — `surface` (backgrounds), `ink` (text/icons),
27
+ * `border` (1px lines), `outline` (focus rings), plus `fill` / `track`
28
+ * for progress bars.
29
+ *
30
+ * **Standalone** tokens work on any neutral page. **Contexts** are
31
+ * self-contained environments: always pair a `surface` with the `ink`,
32
+ * `border`, and hover states from the *same* context. Never mix — e.g.
33
+ * don't put `--color--primary--ink` on `--color--danger--surface`.
34
+ *
35
+ * Non-color tokens `--shadow--raised` / `--shadow--floating` /
36
+ * `--shadow--lifted` / `--shadow--ambient` are ready-made `box-shadow`
37
+ * composites.
17
38
  *
18
39
  * ```js
19
40
  * <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>
41
+ * <Section title="Standalone — use on any neutral page">
42
+ * <table><tbody>
43
+ * {[
44
+ * ['--color--surface', 'Default page background'],
45
+ * ['--color--surface-hover', 'Hovered row / list item'],
46
+ * ['--color--surface-muted', 'Muted section / card background'],
47
+ * ['--color--ink', 'Primary text'],
48
+ * ['--color--ink-subtle', 'Secondary text / captions'],
49
+ * ['--color--ink-hover', 'Text under hover'],
50
+ * ['--color--ink-muted', 'De-emphasized text'],
51
+ * ['--color--ink-placeholder', 'Input placeholder text'],
52
+ * ['--color--ink-primary', 'Brand-highlighted text / icons'],
53
+ * ['--color--ink-accent', 'Links / accent text'],
54
+ * ['--color--ink-disabled', 'Disabled text'],
55
+ * ['--color--border', 'Default 1px border'],
56
+ * ['--color--border-hover', 'Border under hover'],
57
+ * ].map(([t, d]) => (
58
+ * <tr key={t}>
59
+ * <td><code>{t}</code></td>
60
+ * <td style={{ color: 'var(--color--ink-subtle)' }}>{d}</td>
61
+ * <td width="40"><div style={{ width: '30px', height: '30px', background: `var(${t})`, border: '1px solid var(--color--border)' }} /></td>
36
62
  * </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>
63
+ * ))}
64
+ * </tbody></table>
67
65
  * </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>
66
+ *
67
+ * <Section title="Context: raised — modals, dropdowns, popovers">
68
+ * <table><tbody>
69
+ * {['--color--raised--surface', '--color--raised--surface-hover', '--color--raised--surface-active']
70
+ * .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>))}
71
+ * </tbody></table>
227
72
  * </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>
73
+ *
74
+ * <Section title="Context: primary — main call-to-action buttons, badges, nav">
75
+ * <table><tbody>
76
+ * {['--color--primary--surface', '--color--primary--surface-hover', '--color--primary--surface-active', '--color--primary--surface-muted', '--color--primary--ink', '--color--primary--border']
77
+ * .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>))}
78
+ * </tbody></table>
79
+ * </Section>
80
+ *
81
+ * <Section title="Context: tinted — subtle brand-tinted surfaces">
82
+ * <table><tbody>
83
+ * {['--color--tinted--surface', '--color--tinted--surface-hover', '--color--tinted--surface-active', '--color--tinted--ink', '--color--tinted--border']
84
+ * .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>))}
85
+ * </tbody></table>
86
+ * </Section>
87
+ *
88
+ * <Section title="Context: accent, selected, disabled, danger">
89
+ * <table><tbody>
90
+ * {['--color--accent--surface', '--color--accent--ink',
91
+ * '--color--selected--surface', '--color--selected--ink', '--color--selected--border',
92
+ * '--color--disabled--surface', '--color--disabled--ink',
93
+ * '--color--danger--surface', '--color--danger--ink']
94
+ * .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>))}
95
+ * </tbody></table>
96
+ * </Section>
97
+ *
98
+ * <Section title="Context: focus — focus rings and outlines">
99
+ * <table><tbody>
100
+ * {['--color--focus--border', '--color--focus--outline']
101
+ * .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>))}
102
+ * </tbody></table>
103
+ * </Section>
104
+ *
105
+ * <Section title="Feedback — validation and form states">
106
+ * <table><tbody>
107
+ * {['--color--feedback-fail--ink', '--color--feedback-fail--border', '--color--feedback-fail--outline', '--color--feedback-fail--surface',
108
+ * '--color--feedback-warning--ink', '--color--feedback-warning--border', '--color--feedback-warning--outline', '--color--feedback-warning--surface',
109
+ * '--color--feedback-success--ink', '--color--feedback-success--border', '--color--feedback-success--outline', '--color--feedback-success--surface']
110
+ * .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>))}
111
+ * </tbody></table>
112
+ * </Section>
113
+ *
114
+ * <Section title="Context: highlight — rich text inline highlights">
115
+ * <table><tbody>
116
+ * {['--color--highlight--surface']
117
+ * .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>))}
118
+ * </tbody></table>
119
+ * </Section>
120
+ *
121
+ * <Section title="Diffs — content versioning (added / removed / changed)">
122
+ * <table><tbody>
123
+ * {['--color--diff-added--surface', '--color--diff-added--outline', '--color--diff-added--ink', '--color--diff-added--ink-subtle',
124
+ * '--color--diff-removed--surface', '--color--diff-removed--outline', '--color--diff-removed--ink', '--color--diff-removed--ink-subtle',
125
+ * '--color--diff-changed--surface', '--color--diff-changed--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="Status — publishing workflow badges (ink-only)">
131
+ * <table><tbody>
132
+ * {['--color--status-draft--ink', '--color--status-outdated--ink', '--color--status-published--ink']
133
+ * .map((t) => (<tr key={t}><td><code>{t}</code></td><td><span style={{ color: `var(${t})`, fontWeight: 'bold' }}>Sample text</span></td></tr>))}
134
+ * </tbody></table>
135
+ * </Section>
136
+ *
137
+ * <Section title="Backdrop & overlay — scrims and floating UI">
138
+ * <table><tbody>
139
+ * {['--color--backdrop--surface', '--color--backdrop--ink',
140
+ * '--color--overlay--surface', '--color--overlay--surface-hover', '--color--overlay--surface-active', '--color--overlay--ink']
141
+ * .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>))}
142
+ * </tbody></table>
143
+ * </Section>
144
+ *
145
+ * <Section title="Stacked — dark layered UI (uploaders, media players)">
146
+ * <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>
147
+ * <table><tbody>
148
+ * {['--color--stacked--surface', '--color--stacked--surface-upper',
149
+ * '--color--stacked--surface-action', '--color--stacked--surface-action-hover', '--color--stacked--surface-action-active',
150
+ * '--color--stacked--ink', '--color--stacked--ink-subtle', '--color--stacked--border']
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="Progress — bar track and fill">
156
+ * <table><tbody>
157
+ * {['--color--progress--track', '--color--progress--fill', '--color--progress--fill-hover']
158
+ * .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>))}
159
+ * </tbody></table>
160
+ * </Section>
161
+ *
162
+ * <Section title="Tooltip — small dark floating labels">
163
+ * <table><tbody>
164
+ * {['--color--tooltip--surface', '--color--tooltip--surface-hover', '--color--tooltip--ink', '--color--tooltip--ink-subtle']
165
+ * .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>))}
166
+ * </tbody></table>
167
+ * </Section>
168
+ *
169
+ * <Section title="Code — dark code blocks, logs, error traces">
170
+ * <table><tbody>
171
+ * {['--color--code--surface', '--color--code--ink']
172
+ * .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>))}
173
+ * </tbody></table>
174
+ * </Section>
175
+ *
176
+ * <Section title="Scrollbar">
177
+ * <table><tbody>
178
+ * {['--color--scrollbar--fill']
179
+ * .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>))}
180
+ * </tbody></table>
181
+ * </Section>
182
+ *
183
+ * <Section title="Shadow composites — drop-in box-shadow values">
184
+ * <div style={{ display: 'flex', gap: 'var(--spacing-l)', padding: 'var(--spacing-l)' }}>
185
+ * {['--shadow--raised', '--shadow--floating', '--shadow--lifted', '--shadow--ambient'].map((t) => (
186
+ * <div key={t} style={{ textAlign: 'center' }}>
187
+ * <div style={{ width: '80px', height: '80px', background: 'var(--color--surface)', borderRadius: '4px', boxShadow: `var(${t})` }} />
188
+ * <code style={{ display: 'block', marginTop: 'var(--spacing-s)', fontSize: 'var(--font-size-xs)' }}>{t}</code>
189
+ * </div>
190
+ * ))}
191
+ * </div>
289
192
  * </Section>
290
193
  * </Canvas>;
291
194
  * ```
@@ -418,7 +321,7 @@ export declare type CanvasProps = {
418
321
  * <td>
419
322
  * <div
420
323
  * style={{
421
- * background: 'var(--accent-color)',
324
+ * background: 'var(--color--accent--surface)',
422
325
  * width: 'var(--spacing-s)',
423
326
  * height: 'var(--spacing-s)',
424
327
  * }}
@@ -432,7 +335,7 @@ export declare type CanvasProps = {
432
335
  * <td>
433
336
  * <div
434
337
  * style={{
435
- * background: 'var(--accent-color)',
338
+ * background: 'var(--color--accent--surface)',
436
339
  * width: 'var(--spacing-m)',
437
340
  * height: 'var(--spacing-m)',
438
341
  * }}
@@ -446,7 +349,7 @@ export declare type CanvasProps = {
446
349
  * <td>
447
350
  * <div
448
351
  * style={{
449
- * background: 'var(--accent-color)',
352
+ * background: 'var(--color--accent--surface)',
450
353
  * width: 'var(--spacing-l)',
451
354
  * height: 'var(--spacing-l)',
452
355
  * }}
@@ -460,7 +363,7 @@ export declare type CanvasProps = {
460
363
  * <td>
461
364
  * <div
462
365
  * style={{
463
- * background: 'var(--accent-color)',
366
+ * background: 'var(--color--accent--surface)',
464
367
  * width: 'var(--spacing-xl)',
465
368
  * height: 'var(--spacing-xl)',
466
369
  * }}
@@ -474,7 +377,7 @@ export declare type CanvasProps = {
474
377
  * <td>
475
378
  * <div
476
379
  * style={{
477
- * background: 'var(--accent-color)',
380
+ * background: 'var(--color--accent--surface)',
478
381
  * width: 'var(--spacing-xxl)',
479
382
  * height: 'var(--spacing-xxl)',
480
383
  * }}
@@ -488,7 +391,7 @@ export declare type CanvasProps = {
488
391
  * <td>
489
392
  * <div
490
393
  * style={{
491
- * background: 'var(--accent-color)',
394
+ * background: 'var(--color--accent--surface)',
492
395
  * width: 'var(--spacing-xxxl)',
493
396
  * height: 'var(--spacing-xxxl)',
494
397
  * }}
@@ -14,7 +14,7 @@ export declare type SidebarPanelProps = {
14
14
  * <div
15
15
  * style={{
16
16
  * width: '300px',
17
- * borderRight: '1px solid var(--border-color)',
17
+ * borderRight: '1px solid var(--color--border)',
18
18
  * }}
19
19
  * >
20
20
  * <SidebarPanel title="Default">Content</SidebarPanel>
@@ -31,7 +31,7 @@ export declare type SidebarPanelProps = {
31
31
  * display: 'flex',
32
32
  * justifyContent: 'center',
33
33
  * alignItems: 'center',
34
- * background: 'var(--light-bg-color)',
34
+ * background: 'var(--color--surface-muted)',
35
35
  * }}
36
36
  * >
37
37
  * Main content
@@ -19,7 +19,7 @@ export declare type ToolbarProps = {
19
19
  * display: 'flex',
20
20
  * justifyContent: 'center',
21
21
  * alignItems: 'center',
22
- * background: 'var(--light-bg-color)',
22
+ * background: 'var(--color--surface-muted)',
23
23
  * height: '150px',
24
24
  * }}
25
25
  * >
@@ -50,7 +50,7 @@ export declare type ToolbarProps = {
50
50
  * display: 'flex',
51
51
  * justifyContent: 'center',
52
52
  * alignItems: 'center',
53
- * background: 'var(--light-bg-color)',
53
+ * background: 'var(--color--surface-muted)',
54
54
  * height: '150px',
55
55
  * }}
56
56
  * >
@@ -79,7 +79,7 @@ export declare type ToolbarProps = {
79
79
  * display: 'flex',
80
80
  * justifyContent: 'center',
81
81
  * alignItems: 'center',
82
- * background: 'var(--light-bg-color)',
82
+ * background: 'var(--color--surface-muted)',
83
83
  * height: '150px',
84
84
  * }}
85
85
  * >
@@ -87,8 +87,8 @@ export declare type TooltipDelayGroupProps = {
87
87
  * display: 'flex',
88
88
  * gap: 'var(--spacing-xs)',
89
89
  * padding: 'var(--spacing-s)',
90
- * borderRadius: 'var(--border-radius-m)',
91
- * backgroundColor: 'var(--light-bg-color)'
90
+ * borderRadius: '4px',
91
+ * backgroundColor: 'var(--color--surface-muted)'
92
92
  * }}>
93
93
  * <Tooltip>
94
94
  * <TooltipTrigger>
@@ -36,7 +36,7 @@ export declare type VerticalSplitProps = {
36
36
  * Main content
37
37
  * </div>
38
38
  * </div>
39
- * <div style={{ display: 'flex', flexDirection: 'column', height: '100%', borderLeft: '1px solid var(--border-color)' }}>
39
+ * <div style={{ display: 'flex', flexDirection: 'column', height: '100%', borderLeft: '1px solid var(--color--border)' }}>
40
40
  * <Toolbar>
41
41
  * <ToolbarStack stackSize="l">
42
42
  * <ToolbarTitle>Secondary</ToolbarTitle>
@@ -83,7 +83,7 @@ export declare type VerticalSplitProps = {
83
83
  * Sidebar
84
84
  * </div>
85
85
  * </div>
86
- * <div style={{ display: 'flex', flexDirection: 'column', height: '100%', borderLeft: '1px solid var(--border-color)' }}>
86
+ * <div style={{ display: 'flex', flexDirection: 'column', height: '100%', borderLeft: '1px solid var(--color--border)' }}>
87
87
  * <Toolbar>
88
88
  * <ToolbarStack stackSize="l">
89
89
  * <ToolbarTitle>Primary</ToolbarTitle>
@@ -143,7 +143,7 @@ export declare type VerticalSplitProps = {
143
143
  * display: 'flex',
144
144
  * flexDirection: 'column',
145
145
  * height: '100%',
146
- * borderLeft: '1px solid var(--border-color)',
146
+ * borderLeft: '1px solid var(--color--border)',
147
147
  * }}
148
148
  * >
149
149
  * <Toolbar>
@@ -208,7 +208,7 @@ export declare type VerticalSplitProps = {
208
208
  * display: 'flex',
209
209
  * flexDirection: 'column',
210
210
  * height: '100%',
211
- * borderLeft: '1px solid var(--border-color)',
211
+ * borderLeft: '1px solid var(--color--border)',
212
212
  * }}
213
213
  * >
214
214
  * <Toolbar>
@@ -1,3 +1,3 @@
1
1
  import type { CSSProperties } from 'react';
2
- import { BaseCtx } from '../Canvas';
2
+ import type { BaseCtx } from '../Canvas';
3
3
  export declare function generateStyleFromCtx(ctx: BaseCtx, noBodyPadding?: boolean): CSSProperties;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datocms-react-ui",
3
- "version": "2.1.4",
3
+ "version": "2.2.0-alpha.1",
4
4
  "description": "React components to use inside DatoCMS plugins",
5
5
  "keywords": [
6
6
  "datocms",
@@ -42,7 +42,7 @@
42
42
  "dependencies": {
43
43
  "@floating-ui/react": "^0.27.16",
44
44
  "classnames": "^2.3.1",
45
- "datocms-plugin-sdk": "^2.1.1",
45
+ "datocms-plugin-sdk": "^2.2.0-alpha.1",
46
46
  "react-intersection-observer": "^8.31.0",
47
47
  "react-select": "^5.2.1",
48
48
  "scroll-into-view-if-needed": "^2.2.20"
@@ -58,5 +58,5 @@
58
58
  "postcss-nested": "^5.0.6",
59
59
  "typedoc": "^0.26.7"
60
60
  },
61
- "gitHead": "6272386200d44f08851255639392c6f92cb667d9"
61
+ "gitHead": "998ccd009a2babbc49d883ea4b0ef6539937271c"
62
62
  }