datocms-react-ui 3.0.0-alpha.0 → 3.0.1-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,84 +14,186 @@ export function useCtx() {
14
14
  /**
15
15
  * @example Semantic color token CSS variables
16
16
  *
17
- * Within the `Canvas` component, semantic color tokens are made available as
18
- * CSS variables, allowing you to conform to the theme of the current
19
- * environment (including dark mode):
17
+ * Inside `Canvas`, the host exposes a full semantic color palette as CSS
18
+ * custom properties. Components should reference these tokens directly
19
+ * they adapt to the user's active theme (including dark mode)
20
+ * automatically.
21
+ *
22
+ * ### How to read a token name
23
+ *
24
+ * ```
25
+ * --color--{property} // standalone (one -- after color)
26
+ * --color--{context}--{property} // context pair (two -- after color)
27
+ * ```
28
+ *
29
+ * **Properties** — `surface` (backgrounds), `ink` (text/icons),
30
+ * `border` (1px lines), `outline` (focus rings), plus `fill` / `track`
31
+ * for progress bars.
32
+ *
33
+ * **Standalone** tokens work on any neutral page. **Contexts** are
34
+ * self-contained environments: always pair a `surface` with the `ink`,
35
+ * `border`, and hover states from the *same* context. Never mix — e.g.
36
+ * don't put `--color--primary--ink` on `--color--danger--surface`.
37
+ *
38
+ * Non-color tokens `--shadow--elevated` / `--shadow--float` /
39
+ * `--shadow--ambient` are ready-made `box-shadow` composites.
20
40
  *
21
41
  * ```js
22
42
  * <Canvas ctx={ctx}>
23
- * <Section title="Standalone">
24
- * <table>
25
- * <tbody>
26
- * {[
27
- * '--color--surface',
28
- * '--color--surface-hover',
29
- * '--color--surface-muted',
30
- * '--color--ink',
31
- * '--color--ink-subtle',
32
- * '--color--ink-placeholder',
33
- * '--color--ink-accent',
34
- * '--color--border',
35
- * '--color--border-hover',
36
- * ].map((v) => (
37
- * <tr key={v}>
38
- * <td><code>{v}</code></td>
39
- * <td width="30%">
40
- * <div style={{ width: '30px', height: '30px', background: `var(${v})` }} />
41
- * </td>
42
- * </tr>
43
- * ))}
44
- * </tbody>
45
- * </table>
43
+ * <Section title="Standalone — use on any neutral page">
44
+ * <table><tbody>
45
+ * {[
46
+ * ['--color--surface', 'Default page background'],
47
+ * ['--color--surface-hover', 'Hovered row / list item'],
48
+ * ['--color--surface-muted', 'Muted section / card background'],
49
+ * ['--color--ink', 'Primary text'],
50
+ * ['--color--ink-subtle', 'Secondary text / captions'],
51
+ * ['--color--ink-hover', 'Text under hover'],
52
+ * ['--color--ink-muted', 'De-emphasized text'],
53
+ * ['--color--ink-placeholder', 'Input placeholder text'],
54
+ * ['--color--ink-primary', 'Brand-highlighted text / icons'],
55
+ * ['--color--ink-accent', 'Links / accent text'],
56
+ * ['--color--ink-disabled', 'Disabled text'],
57
+ * ['--color--border', 'Default 1px border'],
58
+ * ['--color--border-hover', 'Border under hover'],
59
+ * ].map(([t, d]) => (
60
+ * <tr key={t}>
61
+ * <td><code>{t}</code></td>
62
+ * <td style={{ color: 'var(--color--ink-subtle)' }}>{d}</td>
63
+ * <td width="40"><div style={{ width: '30px', height: '30px', background: `var(${t})`, border: '1px solid var(--color--border)' }} /></td>
64
+ * </tr>
65
+ * ))}
66
+ * </tbody></table>
46
67
  * </Section>
47
- * <Section title="Contexts">
48
- * <table>
49
- * <tbody>
50
- * {[
51
- * '--color--primary--surface',
52
- * '--color--primary--ink',
53
- * '--color--tinted--surface',
54
- * '--color--tinted--ink',
55
- * '--color--accent--surface',
56
- * '--color--accent--ink',
57
- * '--color--selected--surface',
58
- * '--color--danger--surface',
59
- * '--color--danger--ink',
60
- * '--color--disabled--surface',
61
- * '--color--disabled--ink',
62
- * '--color--focus--border',
63
- * '--color--focus--outline',
64
- * ].map((v) => (
65
- * <tr key={v}>
66
- * <td><code>{v}</code></td>
67
- * <td width="30%">
68
- * <div style={{ width: '30px', height: '30px', background: `var(${v})` }} />
69
- * </td>
70
- * </tr>
71
- * ))}
72
- * </tbody>
73
- * </table>
68
+ *
69
+ * <Section title="Context: raised — modals, dropdowns, popovers">
70
+ * <table><tbody>
71
+ * {['--color--raised--surface', '--color--raised--surface-hover', '--color--raised--surface-active']
72
+ * .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>))}
73
+ * </tbody></table>
74
+ * </Section>
75
+ *
76
+ * <Section title="Context: primary — main call-to-action buttons, badges, nav">
77
+ * <table><tbody>
78
+ * {['--color--primary--surface', '--color--primary--surface-hover', '--color--primary--surface-active', '--color--primary--surface-muted', '--color--primary--ink', '--color--primary--border']
79
+ * .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>))}
80
+ * </tbody></table>
74
81
  * </Section>
75
- * <Section title="Feedback">
76
- * <table>
77
- * <tbody>
78
- * {[
79
- * '--color--feedback-fail--ink',
80
- * '--color--feedback-fail--border',
81
- * '--color--feedback-warning--ink',
82
- * '--color--feedback-warning--surface',
83
- * '--color--feedback-success--ink',
84
- * '--color--feedback-success--border',
85
- * ].map((v) => (
86
- * <tr key={v}>
87
- * <td><code>{v}</code></td>
88
- * <td width="30%">
89
- * <div style={{ width: '30px', height: '30px', background: `var(${v})` }} />
90
- * </td>
91
- * </tr>
92
- * ))}
93
- * </tbody>
94
- * </table>
82
+ *
83
+ * <Section title="Context: tinted — subtle brand-tinted surfaces">
84
+ * <table><tbody>
85
+ * {['--color--tinted--surface', '--color--tinted--surface-hover', '--color--tinted--surface-active', '--color--tinted--ink']
86
+ * .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>))}
87
+ * </tbody></table>
88
+ * </Section>
89
+ *
90
+ * <Section title="Context: accent, selected, disabled, danger, enterprise">
91
+ * <table><tbody>
92
+ * {['--color--accent--surface', '--color--accent--ink',
93
+ * '--color--selected--surface', '--color--selected--ink', '--color--selected--border',
94
+ * '--color--disabled--surface', '--color--disabled--ink',
95
+ * '--color--danger--surface', '--color--danger--ink',
96
+ * '--color--enterprise--surface']
97
+ * .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>))}
98
+ * </tbody></table>
99
+ * </Section>
100
+ *
101
+ * <Section title="Context: focus — focus rings and outlines">
102
+ * <table><tbody>
103
+ * {['--color--focus--border', '--color--focus--outline']
104
+ * .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>))}
105
+ * </tbody></table>
106
+ * </Section>
107
+ *
108
+ * <Section title="Feedback — validation and form states">
109
+ * <table><tbody>
110
+ * {['--color--feedback-fail--ink', '--color--feedback-fail--border', '--color--feedback-fail--outline',
111
+ * '--color--feedback-warning--ink', '--color--feedback-warning--surface', '--color--feedback-warning--border',
112
+ * '--color--feedback-success--ink', '--color--feedback-success--border']
113
+ * .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>))}
114
+ * </tbody></table>
115
+ * </Section>
116
+ *
117
+ * <Section title="Context: highlight — rich text inline highlights">
118
+ * <table><tbody>
119
+ * {['--color--highlight--surface']
120
+ * .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>))}
121
+ * </tbody></table>
122
+ * </Section>
123
+ *
124
+ * <Section title="Diffs — content versioning (added / removed / changed)">
125
+ * <table><tbody>
126
+ * {['--color--diff-added--surface', '--color--diff-removed--surface', '--color--diff-changed--surface',
127
+ * '--color--diff-added--surface-subtle', '--color--diff-removed--surface-subtle', '--color--diff-changed--surface-subtle',
128
+ * '--color--diff-added--outline-subtle', '--color--diff-removed--outline-subtle', '--color--diff-changed--outline-subtle',
129
+ * '--color--diff-changed--border', '--color--diff-changed--border-negative']
130
+ * .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>))}
131
+ * </tbody></table>
132
+ * </Section>
133
+ *
134
+ * <Section title="Status — publishing workflow badges (ink-only)">
135
+ * <table><tbody>
136
+ * {['--color--status-draft--ink', '--color--status-outdated--ink', '--color--status-published--ink']
137
+ * .map((t) => (<tr key={t}><td><code>{t}</code></td><td><span style={{ color: `var(${t})`, fontWeight: 'bold' }}>Sample text</span></td></tr>))}
138
+ * </tbody></table>
139
+ * </Section>
140
+ *
141
+ * <Section title="Backdrop & overlay — scrims and floating UI">
142
+ * <table><tbody>
143
+ * {['--color--backdrop--surface', '--color--backdrop--ink',
144
+ * '--color--overlay--surface', '--color--overlay--surface-subtle', '--color--overlay--ink']
145
+ * .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>))}
146
+ * </tbody></table>
147
+ * </Section>
148
+ *
149
+ * <Section title="Stacked — dark layered UI (uploaders, media players)">
150
+ * <p>Stacked gives you three layers of depth (base → surface → raised) plus buttons, borders and a translucent fill. Use it when a dark inline panel needs internal hierarchy.</p>
151
+ * <table><tbody>
152
+ * {['--color--stacked--surface-base', '--color--stacked--surface', '--color--stacked--surface-raised',
153
+ * '--color--stacked--surface-hover', '--color--stacked--surface-translucent',
154
+ * '--color--stacked--surface-button', '--color--stacked--surface-button-active',
155
+ * '--color--stacked--ink', '--color--stacked--ink-subtle', '--color--stacked--border']
156
+ * .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>))}
157
+ * </tbody></table>
158
+ * </Section>
159
+ *
160
+ * <Section title="Progress — bar track and fill">
161
+ * <table><tbody>
162
+ * {['--color--progress--track', '--color--progress--fill', '--color--progress--fill-hover']
163
+ * .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>))}
164
+ * </tbody></table>
165
+ * </Section>
166
+ *
167
+ * <Section title="Tooltip — small dark floating labels">
168
+ * <table><tbody>
169
+ * {['--color--tooltip--surface', '--color--tooltip--surface-hover', '--color--tooltip--ink', '--color--tooltip--ink-subtle']
170
+ * .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>))}
171
+ * </tbody></table>
172
+ * </Section>
173
+ *
174
+ * <Section title="Code — dark code blocks, logs, error traces">
175
+ * <table><tbody>
176
+ * {['--color--code--surface', '--color--code--ink']
177
+ * .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>))}
178
+ * </tbody></table>
179
+ * </Section>
180
+ *
181
+ * <Section title="Shadow colors and scrollbar">
182
+ * <table><tbody>
183
+ * {['--color--shadow-subtle', '--color--shadow', '--color--shadow-strong', '--color--scrollbar']
184
+ * .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>))}
185
+ * </tbody></table>
186
+ * </Section>
187
+ *
188
+ * <Section title="Shadow composites — drop-in box-shadow values">
189
+ * <div style={{ display: 'flex', gap: 'var(--spacing-l)', padding: 'var(--spacing-l)' }}>
190
+ * {['--shadow--elevated', '--shadow--float', '--shadow--ambient'].map((t) => (
191
+ * <div key={t} style={{ textAlign: 'center' }}>
192
+ * <div style={{ width: '80px', height: '80px', background: 'var(--color--surface)', borderRadius: '4px', boxShadow: `var(${t})` }} />
193
+ * <code style={{ display: 'block', marginTop: 'var(--spacing-s)', fontSize: 'var(--font-size-xs)' }}>{t}</code>
194
+ * </div>
195
+ * ))}
196
+ * </div>
95
197
  * </Section>
96
198
  * </Canvas>;
97
199
  * ```
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Canvas/index.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAC;AAKpC,OAAO,KAAK,EAAE,EACZ,aAAa,EAEb,UAAU,EACV,SAAS,GACV,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,CAAC,MAAM,0BAA0B,CAAC;AAIzC,8DAA8D;AAC9D,MAAM,CAAC,IAAM,UAAU,GAAG,aAAa,CAAiB,IAAI,CAAC,CAAC;AAE9D,MAAM,UAAU,MAAM;IACpB,IAAM,GAAG,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;IAEnC,IAAI,CAAC,GAAG,EAAE;QACR,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;KAChD;IAED,OAAO,GAAQ,CAAC;AAClB,CAAC;AAQD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsSG;AAEH,MAAM,UAAU,MAAM,CAAC,EAIT;QAHZ,GAAG,SAAA,EACH,QAAQ,cAAA,EACR,aAAa,mBAAA;IAEL,IAAA,IAAI,GAAK,GAAkC,KAAvC,CAAwC;IAEpD,SAAS,CAAC;QACR,IAAI,CAAC,aAAa,IAAI,kBAAkB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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4YG;AAEH,MAAM,UAAU,MAAM,CAAC,EAIT;QAHZ,GAAG,SAAA,EACH,QAAQ,cAAA,EACR,aAAa,mBAAA;IAEL,IAAA,IAAI,GAAK,GAAkC,KAAvC,CAAwC;IAEpD,SAAS,CAAC;QACR,IAAI,CAAC,aAAa,IAAI,kBAAkB,IAAI,GAAG,EAAE;YAC/C,IAAM,oBAAkB,GAAG,GAAiC,CAAC;YAC7D,oBAAkB,CAAC,gBAAgB,EAAE,CAAC;YAEtC,OAAO;gBACL,oBAAkB,CAAC,eAAe,EAAE,CAAC;YACvC,CAAC,CAAC;SACH;QAED,OAAO,SAAS,CAAC;IACnB,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC;IAE1B,OAAO,CACL,oBAAC,UAAU,CAAC,QAAQ,IAAC,KAAK,EAAE,GAAG;QAC7B,6BACE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC,CAAC,MAAM,CAAC,EACjD,KAAK,EAAE,oBAAoB,CAAC,GAAG,CAAC,IAE/B,QAAQ,CACL,CACc,CACvB,CAAC;AACJ,CAAC"}
@@ -68,7 +68,10 @@ var useStyles = function (isDisabled, error) {
68
68
  : 'var(--color--border-hover)',
69
69
  } });
70
70
  },
71
- multiValueRemove: function (provided) { return (__assign(__assign({}, provided), { cursor: 'pointer' })); },
71
+ multiValueRemove: function (provided) { return (__assign(__assign({}, provided), { cursor: 'pointer', color: 'var(--color--tinted--ink)', ':hover': {
72
+ backgroundColor: 'var(--color--tinted--surface-hover)',
73
+ color: 'var(--color--tinted--ink)',
74
+ } })); },
72
75
  menu: function (provided) {
73
76
  return __assign(__assign({}, provided), { zIndex: 1000, minWidth: 250, backgroundColor: 'var(--color--raised--surface)' });
74
77
  },
@@ -87,7 +90,7 @@ var useStyles = function (isDisabled, error) {
87
90
  multiValue: function (provided) {
88
91
  return __assign(__assign({}, provided), { zIndex: 100, backgroundColor: 'var(--color--tinted--surface)', userSelect: 'none' });
89
92
  },
90
- multiValueLabel: function (provided) { return (__assign(__assign({}, provided), { fontSize: 'inherit', padding: 3 })); },
93
+ multiValueLabel: function (provided) { return (__assign(__assign({}, provided), { fontSize: 'inherit', padding: 3, color: 'var(--color--tinted--ink)' })); },
91
94
  };
92
95
  }, [isDisabled, error]);
93
96
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/SelectInput/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,SAKN,MAAM,cAAc,CAAC;AACtB,OAAO,cAAmC,MAAM,oBAAoB,CAAC;AACrE,OAAO,uBAEN,MAAM,8BAA8B,CAAC;AACtC,OAAO,kBAEN,MAAM,wBAAwB,CAAC;AAEhC,IAAM,WAAW,GAAgB,UAAC,QAAQ,IAAK,OAAA,uBAC1C,QAAQ,KACX,YAAY,EAAE,CAAC,EACf,MAAM,wBACD,QAAQ,CAAC,MAAM,KAClB,SAAS,EAAE,6BAA6B;QACxC,WAAW;QACX,SAAS,EAAE,sBAAsB;QACjC,SAAS;QACT,SAAS,EAAE,sBAAsB;QACjC,UAAU;QACV,OAAO,EAAE,6BAA6B;QACtC,QAAQ;QACR,SAAS,EAAE,4BAA4B,OAEzC,EAf6C,CAe7C,CAAC;AAEH,IAAM,SAAS,GAAG,UAAC,UAAoB,EAAE,KA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,oBAAC,SAAS,eACJ,KAAK,IACT,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,WAAW;QAClB,8DAA8D;QAC9D,MAAM,EAAE,MAAa,IACrB,CACH,CAAC;AACJ,CAAC;AAQD,MAAM,UAAU,gBAAgB,CAI9B,EAI8C;IAH9C,IAAA,UAAU,gBAAA,EACV,KAAK,WAAA,EACF,KAAK,cAHR,uBAID,CADS;IAER,IAAM,MAAM,GAAG,SAAS,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,oBAAC,cAAc,eACT,KAAK,IACT,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,WAAW;QAClB,8DAA8D;QAC9D,MAAM,EAAE,MAAa,IACrB,CACH,CAAC;AACJ,CAAC;AASD,MAAM,UAAU,oBAAoB,CAIlC,EAIkD;IAHlD,IAAA,UAAU,gBAAA,EACV,KAAK,WAAA,EACF,KAAK,cAHR,uBAID,CADS;IAER,IAAM,MAAM,GAAG,SAAS,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,oBAAC,kBAAkB,eACb,KAAK,IACT,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,WAAW;QAClB,8DAA8D;QAC9D,MAAM,EAAE,MAAa,IACrB,CACH,CAAC;AACJ,CAAC;AASD,MAAM,UAAU,yBAAyB,CAIvC,EAIuD;IAHvD,IAAA,UAAU,gBAAA,EACV,KAAK,WAAA,EACF,KAAK,cAHR,uBAID,CADS;IAER,IAAM,MAAM,GAAG,SAAS,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,oBAAC,uBAAuB,eAClB,KAAK,IACT,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,WAAW;QAClB,8DAA8D;QAC9D,MAAM,EAAE,MAAa,IACrB,CACH,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/SelectInput/index.tsx"],"names":[],"mappings":";;;;;;;;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U,oBAAoB,CAIlC,EAIkD;IAHlD,IAAA,UAAU,gBAAA,EACV,KAAK,WAAA,EACF,KAAK,cAHR,uBAID,CADS;IAER,IAAM,MAAM,GAAG,SAAS,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,oBAAC,kBAAkB,eACb,KAAK,IACT,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,WAAW;QAClB,8DAA8D;QAC9D,MAAM,EAAE,MAAa,IACrB,CACH,CAAC;AACJ,CAAC;AASD,MAAM,UAAU,yBAAyB,CAIvC,EAIuD;IAHvD,IAAA,UAAU,gBAAA,EACV,KAAK,WAAA,EACF,KAAK,cAHR,uBAID,CADS;IAER,IAAM,MAAM,GAAG,SAAS,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,oBAAC,uBAAuB,eAClB,KAAK,IACT,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,WAAW;QAClB,8DAA8D;QAC9D,MAAM,EAAE,MAAa,IACrB,CACH,CAAC;AACJ,CAAC"}
@@ -11,84 +11,186 @@ export declare type CanvasProps = {
11
11
  /**
12
12
  * @example Semantic color token CSS variables
13
13
  *
14
- * Within the `Canvas` component, semantic color tokens are made available as
15
- * CSS variables, allowing you to conform to the theme of the current
16
- * environment (including dark mode):
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--elevated` / `--shadow--float` /
36
+ * `--shadow--ambient` are ready-made `box-shadow` composites.
17
37
  *
18
38
  * ```js
19
39
  * <Canvas ctx={ctx}>
20
- * <Section title="Standalone">
21
- * <table>
22
- * <tbody>
23
- * {[
24
- * '--color--surface',
25
- * '--color--surface-hover',
26
- * '--color--surface-muted',
27
- * '--color--ink',
28
- * '--color--ink-subtle',
29
- * '--color--ink-placeholder',
30
- * '--color--ink-accent',
31
- * '--color--border',
32
- * '--color--border-hover',
33
- * ].map((v) => (
34
- * <tr key={v}>
35
- * <td><code>{v}</code></td>
36
- * <td width="30%">
37
- * <div style={{ width: '30px', height: '30px', background: `var(${v})` }} />
38
- * </td>
39
- * </tr>
40
- * ))}
41
- * </tbody>
42
- * </table>
40
+ * <Section title="Standalone — use on any neutral page">
41
+ * <table><tbody>
42
+ * {[
43
+ * ['--color--surface', 'Default page background'],
44
+ * ['--color--surface-hover', 'Hovered row / list item'],
45
+ * ['--color--surface-muted', 'Muted section / card background'],
46
+ * ['--color--ink', 'Primary text'],
47
+ * ['--color--ink-subtle', 'Secondary text / captions'],
48
+ * ['--color--ink-hover', 'Text under hover'],
49
+ * ['--color--ink-muted', 'De-emphasized text'],
50
+ * ['--color--ink-placeholder', 'Input placeholder text'],
51
+ * ['--color--ink-primary', 'Brand-highlighted text / icons'],
52
+ * ['--color--ink-accent', 'Links / accent text'],
53
+ * ['--color--ink-disabled', 'Disabled text'],
54
+ * ['--color--border', 'Default 1px border'],
55
+ * ['--color--border-hover', 'Border under hover'],
56
+ * ].map(([t, d]) => (
57
+ * <tr key={t}>
58
+ * <td><code>{t}</code></td>
59
+ * <td style={{ color: 'var(--color--ink-subtle)' }}>{d}</td>
60
+ * <td width="40"><div style={{ width: '30px', height: '30px', background: `var(${t})`, border: '1px solid var(--color--border)' }} /></td>
61
+ * </tr>
62
+ * ))}
63
+ * </tbody></table>
43
64
  * </Section>
44
- * <Section title="Contexts">
45
- * <table>
46
- * <tbody>
47
- * {[
48
- * '--color--primary--surface',
49
- * '--color--primary--ink',
50
- * '--color--tinted--surface',
51
- * '--color--tinted--ink',
52
- * '--color--accent--surface',
53
- * '--color--accent--ink',
54
- * '--color--selected--surface',
55
- * '--color--danger--surface',
56
- * '--color--danger--ink',
57
- * '--color--disabled--surface',
58
- * '--color--disabled--ink',
59
- * '--color--focus--border',
60
- * '--color--focus--outline',
61
- * ].map((v) => (
62
- * <tr key={v}>
63
- * <td><code>{v}</code></td>
64
- * <td width="30%">
65
- * <div style={{ width: '30px', height: '30px', background: `var(${v})` }} />
66
- * </td>
67
- * </tr>
68
- * ))}
69
- * </tbody>
70
- * </table>
65
+ *
66
+ * <Section title="Context: raised — modals, dropdowns, popovers">
67
+ * <table><tbody>
68
+ * {['--color--raised--surface', '--color--raised--surface-hover', '--color--raised--surface-active']
69
+ * .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>))}
70
+ * </tbody></table>
71
+ * </Section>
72
+ *
73
+ * <Section title="Context: primary — main call-to-action buttons, badges, nav">
74
+ * <table><tbody>
75
+ * {['--color--primary--surface', '--color--primary--surface-hover', '--color--primary--surface-active', '--color--primary--surface-muted', '--color--primary--ink', '--color--primary--border']
76
+ * .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>))}
77
+ * </tbody></table>
71
78
  * </Section>
72
- * <Section title="Feedback">
73
- * <table>
74
- * <tbody>
75
- * {[
76
- * '--color--feedback-fail--ink',
77
- * '--color--feedback-fail--border',
78
- * '--color--feedback-warning--ink',
79
- * '--color--feedback-warning--surface',
80
- * '--color--feedback-success--ink',
81
- * '--color--feedback-success--border',
82
- * ].map((v) => (
83
- * <tr key={v}>
84
- * <td><code>{v}</code></td>
85
- * <td width="30%">
86
- * <div style={{ width: '30px', height: '30px', background: `var(${v})` }} />
87
- * </td>
88
- * </tr>
89
- * ))}
90
- * </tbody>
91
- * </table>
79
+ *
80
+ * <Section title="Context: tinted — subtle brand-tinted surfaces">
81
+ * <table><tbody>
82
+ * {['--color--tinted--surface', '--color--tinted--surface-hover', '--color--tinted--surface-active', '--color--tinted--ink']
83
+ * .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>))}
84
+ * </tbody></table>
85
+ * </Section>
86
+ *
87
+ * <Section title="Context: accent, selected, disabled, danger, enterprise">
88
+ * <table><tbody>
89
+ * {['--color--accent--surface', '--color--accent--ink',
90
+ * '--color--selected--surface', '--color--selected--ink', '--color--selected--border',
91
+ * '--color--disabled--surface', '--color--disabled--ink',
92
+ * '--color--danger--surface', '--color--danger--ink',
93
+ * '--color--enterprise--surface']
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',
108
+ * '--color--feedback-warning--ink', '--color--feedback-warning--surface', '--color--feedback-warning--border',
109
+ * '--color--feedback-success--ink', '--color--feedback-success--border']
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-removed--surface', '--color--diff-changed--surface',
124
+ * '--color--diff-added--surface-subtle', '--color--diff-removed--surface-subtle', '--color--diff-changed--surface-subtle',
125
+ * '--color--diff-added--outline-subtle', '--color--diff-removed--outline-subtle', '--color--diff-changed--outline-subtle',
126
+ * '--color--diff-changed--border', '--color--diff-changed--border-negative']
127
+ * .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>))}
128
+ * </tbody></table>
129
+ * </Section>
130
+ *
131
+ * <Section title="Status — publishing workflow badges (ink-only)">
132
+ * <table><tbody>
133
+ * {['--color--status-draft--ink', '--color--status-outdated--ink', '--color--status-published--ink']
134
+ * .map((t) => (<tr key={t}><td><code>{t}</code></td><td><span style={{ color: `var(${t})`, fontWeight: 'bold' }}>Sample text</span></td></tr>))}
135
+ * </tbody></table>
136
+ * </Section>
137
+ *
138
+ * <Section title="Backdrop & overlay — scrims and floating UI">
139
+ * <table><tbody>
140
+ * {['--color--backdrop--surface', '--color--backdrop--ink',
141
+ * '--color--overlay--surface', '--color--overlay--surface-subtle', '--color--overlay--ink']
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="Stacked — dark layered UI (uploaders, media players)">
147
+ * <p>Stacked gives you three layers of depth (base → surface → raised) plus buttons, borders and a translucent fill. Use it when a dark inline panel needs internal hierarchy.</p>
148
+ * <table><tbody>
149
+ * {['--color--stacked--surface-base', '--color--stacked--surface', '--color--stacked--surface-raised',
150
+ * '--color--stacked--surface-hover', '--color--stacked--surface-translucent',
151
+ * '--color--stacked--surface-button', '--color--stacked--surface-button-active',
152
+ * '--color--stacked--ink', '--color--stacked--ink-subtle', '--color--stacked--border']
153
+ * .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>))}
154
+ * </tbody></table>
155
+ * </Section>
156
+ *
157
+ * <Section title="Progress — bar track and fill">
158
+ * <table><tbody>
159
+ * {['--color--progress--track', '--color--progress--fill', '--color--progress--fill-hover']
160
+ * .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>))}
161
+ * </tbody></table>
162
+ * </Section>
163
+ *
164
+ * <Section title="Tooltip — small dark floating labels">
165
+ * <table><tbody>
166
+ * {['--color--tooltip--surface', '--color--tooltip--surface-hover', '--color--tooltip--ink', '--color--tooltip--ink-subtle']
167
+ * .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>))}
168
+ * </tbody></table>
169
+ * </Section>
170
+ *
171
+ * <Section title="Code — dark code blocks, logs, error traces">
172
+ * <table><tbody>
173
+ * {['--color--code--surface', '--color--code--ink']
174
+ * .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>))}
175
+ * </tbody></table>
176
+ * </Section>
177
+ *
178
+ * <Section title="Shadow colors and scrollbar">
179
+ * <table><tbody>
180
+ * {['--color--shadow-subtle', '--color--shadow', '--color--shadow-strong', '--color--scrollbar']
181
+ * .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>))}
182
+ * </tbody></table>
183
+ * </Section>
184
+ *
185
+ * <Section title="Shadow composites — drop-in box-shadow values">
186
+ * <div style={{ display: 'flex', gap: 'var(--spacing-l)', padding: 'var(--spacing-l)' }}>
187
+ * {['--shadow--elevated', '--shadow--float', '--shadow--ambient'].map((t) => (
188
+ * <div key={t} style={{ textAlign: 'center' }}>
189
+ * <div style={{ width: '80px', height: '80px', background: 'var(--color--surface)', borderRadius: '4px', boxShadow: `var(${t})` }} />
190
+ * <code style={{ display: 'block', marginTop: 'var(--spacing-s)', fontSize: 'var(--font-size-xs)' }}>{t}</code>
191
+ * </div>
192
+ * ))}
193
+ * </div>
92
194
  * </Section>
93
195
  * </Canvas>;
94
196
  * ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datocms-react-ui",
3
- "version": "3.0.0-alpha.0",
3
+ "version": "3.0.1-alpha.0",
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": "^3.0.0-alpha.0",
45
+ "datocms-plugin-sdk": "^3.0.1-alpha.0",
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": "01c46332e40377d305c3abd262c3d1840385ec49"
61
+ "gitHead": "52e7affbf92416cbc1cde78e016a62f3ff1a95cf"
62
62
  }