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.
- package/dist/cjs/Button/styles.module.css.json +1 -1
- package/dist/cjs/ButtonGroup/Button/styles.module.css.json +1 -1
- package/dist/cjs/ButtonGroup/Group/styles.module.css.json +1 -1
- package/dist/cjs/Canvas/index.js +179 -276
- package/dist/cjs/Canvas/index.js.map +1 -1
- package/dist/cjs/Canvas/styles.module.css.json +1 -1
- package/dist/cjs/ContextInspector/styles.module.css.json +1 -1
- package/dist/cjs/Dropdown/styles.module.css.json +1 -1
- package/dist/cjs/FieldError/styles.module.css.json +1 -1
- package/dist/cjs/FieldHint/styles.module.css.json +1 -1
- package/dist/cjs/FormLabel/styles.module.css.json +1 -1
- package/dist/cjs/HotKey/styles.module.css.json +1 -1
- package/dist/cjs/Section/styles.module.css.json +1 -1
- package/dist/cjs/SelectInput/index.js +41 -22
- package/dist/cjs/SelectInput/index.js.map +1 -1
- package/dist/cjs/SidebarPanel/index.js +4 -11
- package/dist/cjs/SidebarPanel/index.js.map +1 -1
- package/dist/cjs/SidebarPanel/styles.module.css.json +1 -1
- package/dist/cjs/Spinner/styles.module.css.json +1 -1
- package/dist/cjs/SplitView/SplitViewSash/styles.module.css.json +1 -1
- package/dist/cjs/SwitchField/styles.module.css.json +1 -1
- package/dist/cjs/SwitchInput/styles.module.css.json +1 -1
- package/dist/cjs/TextInput/styles.module.css.json +1 -1
- package/dist/cjs/TextareaInput/styles.module.css.json +1 -1
- package/dist/cjs/Toolbar/Button/styles.module.css.json +1 -1
- package/dist/cjs/Toolbar/Toolbar/index.js +3 -3
- package/dist/cjs/Toolbar/Toolbar/styles.module.css.json +1 -1
- package/dist/cjs/Tooltip/TooltipContent/styles.module.css.json +1 -1
- package/dist/cjs/Tooltip/TooltipDelayGroup/index.js +2 -2
- package/dist/cjs/VerticalSplit/index.js +4 -4
- package/dist/cjs/VerticalSplit/styles.module.css.json +1 -1
- package/dist/cjs/generateStyleFromCtx/index.js +2 -2
- package/dist/cjs/generateStyleFromCtx/index.js.map +1 -1
- package/dist/cjs/icons.js +8 -8
- package/dist/cjs/icons.js.map +1 -1
- package/dist/esm/Button/styles.module.css.json +1 -1
- package/dist/esm/ButtonGroup/Button/styles.module.css.json +1 -1
- package/dist/esm/ButtonGroup/Group/styles.module.css.json +1 -1
- package/dist/esm/Canvas/index.d.ts +179 -276
- package/dist/esm/Canvas/index.js +179 -276
- package/dist/esm/Canvas/index.js.map +1 -1
- package/dist/esm/Canvas/styles.module.css.json +1 -1
- package/dist/esm/ContextInspector/styles.module.css.json +1 -1
- package/dist/esm/Dropdown/styles.module.css.json +1 -1
- package/dist/esm/FieldError/styles.module.css.json +1 -1
- package/dist/esm/FieldHint/styles.module.css.json +1 -1
- package/dist/esm/FormLabel/styles.module.css.json +1 -1
- package/dist/esm/HotKey/styles.module.css.json +1 -1
- package/dist/esm/Section/styles.module.css.json +1 -1
- package/dist/esm/SelectInput/index.js +41 -22
- package/dist/esm/SelectInput/index.js.map +1 -1
- package/dist/esm/SidebarPanel/index.d.ts +2 -2
- package/dist/esm/SidebarPanel/index.js +4 -11
- package/dist/esm/SidebarPanel/index.js.map +1 -1
- package/dist/esm/SidebarPanel/styles.module.css.json +1 -1
- package/dist/esm/Spinner/styles.module.css.json +1 -1
- package/dist/esm/SplitView/SplitViewSash/styles.module.css.json +1 -1
- package/dist/esm/SwitchField/styles.module.css.json +1 -1
- package/dist/esm/SwitchInput/styles.module.css.json +1 -1
- package/dist/esm/TextInput/styles.module.css.json +1 -1
- package/dist/esm/TextareaInput/styles.module.css.json +1 -1
- package/dist/esm/Toolbar/Button/styles.module.css.json +1 -1
- package/dist/esm/Toolbar/Toolbar/index.d.ts +3 -3
- package/dist/esm/Toolbar/Toolbar/index.js +3 -3
- package/dist/esm/Toolbar/Toolbar/styles.module.css.json +1 -1
- package/dist/esm/Tooltip/TooltipContent/styles.module.css.json +1 -1
- package/dist/esm/Tooltip/TooltipDelayGroup/index.d.ts +2 -2
- package/dist/esm/Tooltip/TooltipDelayGroup/index.js +2 -2
- package/dist/esm/VerticalSplit/index.d.ts +4 -4
- package/dist/esm/VerticalSplit/index.js +4 -4
- package/dist/esm/VerticalSplit/styles.module.css.json +1 -1
- package/dist/esm/generateStyleFromCtx/index.d.ts +1 -1
- package/dist/esm/generateStyleFromCtx/index.js +2 -2
- package/dist/esm/generateStyleFromCtx/index.js.map +1 -1
- package/dist/esm/icons.js +8 -8
- package/dist/esm/icons.js.map +1 -1
- package/dist/types/Canvas/index.d.ts +179 -276
- package/dist/types/SidebarPanel/index.d.ts +2 -2
- package/dist/types/Toolbar/Toolbar/index.d.ts +3 -3
- package/dist/types/Tooltip/TooltipDelayGroup/index.d.ts +2 -2
- package/dist/types/VerticalSplit/index.d.ts +4 -4
- package/dist/types/generateStyleFromCtx/index.d.ts +1 -1
- package/package.json +3 -3
- package/src/Button/styles.module.css +28 -19
- package/src/Button/styles.module.css.json +1 -1
- package/src/ButtonGroup/Button/styles.module.css +13 -17
- package/src/ButtonGroup/Button/styles.module.css.json +1 -1
- package/src/ButtonGroup/Group/styles.module.css +1 -1
- package/src/ButtonGroup/Group/styles.module.css.json +1 -1
- package/src/Canvas/index.tsx +179 -276
- package/src/Canvas/styles.module.css +32 -16
- package/src/Canvas/styles.module.css.json +1 -1
- package/src/ContextInspector/styles.module.css +10 -10
- package/src/ContextInspector/styles.module.css.json +1 -1
- package/src/Dropdown/styles.module.css +30 -28
- package/src/Dropdown/styles.module.css.json +1 -1
- package/src/FieldError/styles.module.css +1 -1
- package/src/FieldError/styles.module.css.json +1 -1
- package/src/FieldHint/styles.module.css +1 -1
- package/src/FieldHint/styles.module.css.json +1 -1
- package/src/FormLabel/styles.module.css +2 -2
- package/src/FormLabel/styles.module.css.json +1 -1
- package/src/HotKey/styles.module.css +1 -1
- package/src/HotKey/styles.module.css.json +1 -1
- package/src/Section/styles.module.css +8 -8
- package/src/Section/styles.module.css.json +1 -1
- package/src/SelectInput/index.tsx +54 -26
- package/src/SidebarPanel/index.tsx +4 -29
- package/src/SidebarPanel/styles.module.css +5 -6
- package/src/SidebarPanel/styles.module.css.json +1 -1
- package/src/Spinner/styles.module.css +1 -1
- package/src/Spinner/styles.module.css.json +1 -1
- package/src/SplitView/SplitViewSash/styles.module.css +7 -7
- package/src/SplitView/SplitViewSash/styles.module.css.json +1 -1
- package/src/SwitchField/styles.module.css +1 -1
- package/src/SwitchField/styles.module.css.json +1 -1
- package/src/SwitchInput/styles.module.css +15 -13
- package/src/SwitchInput/styles.module.css.json +1 -1
- package/src/TextInput/styles.module.css +13 -11
- package/src/TextInput/styles.module.css.json +1 -1
- package/src/TextareaInput/styles.module.css +13 -11
- package/src/TextareaInput/styles.module.css.json +1 -1
- package/src/Toolbar/Button/styles.module.css +4 -4
- package/src/Toolbar/Button/styles.module.css.json +1 -1
- package/src/Toolbar/Toolbar/index.tsx +3 -3
- package/src/Toolbar/Toolbar/styles.module.css +2 -2
- package/src/Toolbar/Toolbar/styles.module.css.json +1 -1
- package/src/Tooltip/TooltipContent/styles.module.css +2 -2
- package/src/Tooltip/TooltipContent/styles.module.css.json +1 -1
- package/src/Tooltip/TooltipDelayGroup/index.tsx +2 -2
- package/src/VerticalSplit/index.tsx +4 -4
- package/src/VerticalSplit/styles.module.css +8 -11
- package/src/VerticalSplit/styles.module.css.json +1 -1
- package/src/generateStyleFromCtx/index.ts +7 -1
- package/src/icons.tsx +8 -0
- package/styles.css +1 -1
- package/types.json +534 -389
|
@@ -9,283 +9,186 @@ export declare type CanvasProps = {
|
|
|
9
9
|
children: ReactNode;
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
|
-
* @example
|
|
12
|
+
* @example Semantic color token CSS variables
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
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="
|
|
21
|
-
* <table>
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
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
|
-
*
|
|
38
|
-
*
|
|
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
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
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
|
-
*
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
*
|
|
232
|
-
*
|
|
233
|
-
*
|
|
234
|
-
*
|
|
235
|
-
*
|
|
236
|
-
*
|
|
237
|
-
*
|
|
238
|
-
*
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
-
*
|
|
243
|
-
*
|
|
244
|
-
*
|
|
245
|
-
*
|
|
246
|
-
*
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
*
|
|
250
|
-
*
|
|
251
|
-
*
|
|
252
|
-
*
|
|
253
|
-
*
|
|
254
|
-
*
|
|
255
|
-
*
|
|
256
|
-
*
|
|
257
|
-
*
|
|
258
|
-
*
|
|
259
|
-
*
|
|
260
|
-
*
|
|
261
|
-
*
|
|
262
|
-
*
|
|
263
|
-
*
|
|
264
|
-
*
|
|
265
|
-
*
|
|
266
|
-
*
|
|
267
|
-
*
|
|
268
|
-
*
|
|
269
|
-
*
|
|
270
|
-
*
|
|
271
|
-
*
|
|
272
|
-
* </tr>
|
|
273
|
-
*
|
|
274
|
-
*
|
|
275
|
-
*
|
|
276
|
-
*
|
|
277
|
-
*
|
|
278
|
-
*
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
-
*
|
|
282
|
-
*
|
|
283
|
-
*
|
|
284
|
-
*
|
|
285
|
-
*
|
|
286
|
-
*
|
|
287
|
-
*
|
|
288
|
-
*
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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(--
|
|
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(--
|
|
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(--
|
|
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(--
|
|
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: '
|
|
91
|
-
* backgroundColor: 'var(--
|
|
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
|
|
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
|
|
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
|
|
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
|
|
211
|
+
* borderLeft: '1px solid var(--color--border)',
|
|
212
212
|
* }}
|
|
213
213
|
* >
|
|
214
214
|
* <Toolbar>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "datocms-react-ui",
|
|
3
|
-
"version": "2.1
|
|
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.
|
|
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": "
|
|
61
|
+
"gitHead": "998ccd009a2babbc49d883ea4b0ef6539937271c"
|
|
62
62
|
}
|