@sableui/react 0.15.0 → 0.17.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.
- package/CHANGELOG.md +99 -0
- package/bin/sable-lint.mjs +5 -1
- package/dist/{_contract-CkqXDVww.d.ts → _contract-CDa9-NdB.d.ts} +47 -1
- package/dist/blocks/approval-block.js +30 -48
- package/dist/blocks/approval-block.meta.js +7 -8
- package/dist/blocks/index.d.ts +1 -1
- package/dist/blocks/wallet-block.js +2 -2
- package/dist/components/app-shell/app-shell-frame.js +16 -0
- package/dist/components/app-shell/app-shell-main.js +12 -0
- package/dist/components/app-shell/app-shell.js +28 -4
- package/dist/components/app-shell/app-shell.meta.js +88 -4
- package/dist/components/area-chart/area-chart.meta.js +6 -1
- package/dist/components/attachment/attachment.meta.js +2 -1
- package/dist/components/attachment/attachment.variants.js +1 -1
- package/dist/components/badge/badge.meta.js +8 -1
- package/dist/components/badge/badge.variants.js +7 -7
- package/dist/components/banner/banner.meta.js +6 -1
- package/dist/components/banner/banner.variants.js +5 -5
- package/dist/components/bar-chart/bar-chart.meta.js +6 -1
- package/dist/components/caret-menu/caret-menu.js +5 -6
- package/dist/components/chat-composer/chat-composer.meta.js +2 -2
- package/dist/components/chat-composer/chat-composer.variants.js +1 -1
- package/dist/components/color-field/color-field.js +6 -8
- package/dist/components/combobox/combobox.js +27 -5
- package/dist/components/combobox/combobox.meta.js +10 -2
- package/dist/components/command-menu/command-menu.js +14 -3
- package/dist/components/command-menu/command-menu.meta.js +9 -1
- package/dist/components/date-picker/date-picker.meta.js +2 -2
- package/dist/components/feedback/feedback.js +1 -1
- package/dist/components/feedback/feedback.meta.js +2 -1
- package/dist/components/gradient-art/gradient-art.js +8 -5
- package/dist/components/gradient-art/gradient-art.meta.js +35 -2
- package/dist/components/input/input.meta.js +11 -3
- package/dist/components/input-group/input-group.js +1 -1
- package/dist/components/input-group/input-group.meta.js +1 -1
- package/dist/components/line-chart/line-chart.meta.js +6 -1
- package/dist/components/menu/menu.js +1 -1
- package/dist/components/meter/meter.js +53 -7
- package/dist/components/meter/meter.meta.js +51 -4
- package/dist/components/meter/meter.variants.js +43 -7
- package/dist/components/note/note.meta.js +5 -1
- package/dist/components/note/note.variants.js +4 -4
- package/dist/components/number-field/number-field.meta.js +2 -2
- package/dist/components/otp-field/otp-field.meta.js +2 -2
- package/dist/components/panel-group/panel-group.js +5 -8
- package/dist/components/pie-chart/pie-chart.meta.js +6 -1
- package/dist/components/radar-chart/radar-chart.meta.js +6 -1
- package/dist/components/radial-chart/radial-chart.meta.js +6 -1
- package/dist/components/search-input/search-input.meta.js +11 -3
- package/dist/components/section-rail/index.js +7 -0
- package/dist/components/section-rail/section-rail.js +153 -0
- package/dist/components/section-rail/section-rail.meta.js +189 -0
- package/dist/components/segmented-bar/segmented-bar.meta.js +8 -1
- package/dist/components/segmented-bar/segmented-bar.variants.js +7 -7
- package/dist/components/select/select.js +1 -1
- package/dist/components/select/select.meta.js +2 -2
- package/dist/components/sheet/sheet.js +5 -4
- package/dist/components/sidebar/sidebar.js +16 -1
- package/dist/components/sidebar/sidebar.meta.js +7 -2
- package/dist/components/sparkline/sparkline.meta.js +8 -1
- package/dist/components/status-dot/status-dot.meta.js +8 -1
- package/dist/components/status-dot/status-dot.variants.js +7 -7
- package/dist/components/stepper/stepper.meta.js +2 -1
- package/dist/components/stepper/stepper.variants.js +1 -1
- package/dist/components/table/table.meta.js +4 -4
- package/dist/components/textarea/textarea.js +5 -0
- package/dist/components/textarea/textarea.meta.js +3 -3
- package/dist/file-hashes.json +99 -92
- package/dist/foundations/accessibility.js +5 -0
- package/dist/index.d.ts +227 -25
- package/dist/index.js +12 -1
- package/dist/lib/chart/types.js +8 -8
- package/dist/lib/chart/use-arrival.js +5 -4
- package/dist/lib/field-shell.js +1 -1
- package/dist/lib/highlight-glide.js +6 -6
- package/dist/lib/scrub-gesture.js +6 -6
- package/dist/lib/taxonomy.js +1 -0
- package/dist/lib/use-active-section.js +59 -0
- package/dist/lib/use-caret-trigger.js +11 -18
- package/dist/lib/use-match-highlight.js +69 -0
- package/dist/lib/use-smooth-wheel.js +10 -8
- package/dist/presets/index.d.ts +13 -2
- package/dist/presets/index.js +17 -1
- package/dist/styles.css +100 -0
- package/dist/{theme-provider-CdSicAad.d.ts → theme-provider-BydfM5Z0.d.ts} +1 -1
- package/dist/themes/_contract.js +14 -0
- package/dist/themes/atelier/atelier.css +18 -0
- package/dist/themes/atelier/index.d.ts +1 -1
- package/dist/themes/contrast.js +48 -1
- package/dist/themes/ember/ember.css +18 -0
- package/dist/themes/ember/index.d.ts +1 -1
- package/dist/themes/index.d.ts +2 -2
- package/dist/themes/meridian/index.d.ts +1 -1
- package/dist/themes/meridian/meridian.css +18 -0
- package/dist/themes/poppy/index.d.ts +1 -1
- package/dist/themes/poppy/poppy.css +18 -0
- package/dist/themes/prism/index.d.ts +1 -1
- package/dist/themes/prism/prism.css +18 -0
- package/dist/themes/sable/index.d.ts +1 -1
- package/dist/themes/sable/sable.css +18 -0
- package/dist/themes/verdant/index.d.ts +1 -1
- package/dist/themes/verdant/verdant.css +18 -0
- package/llms/blocks/approval-block.md +40 -55
- package/llms/blocks/wallet-block.md +5 -4
- package/llms/components/app-shell.md +72 -3
- package/llms/components/area-chart.md +1 -1
- package/llms/components/attachment.md +1 -1
- package/llms/components/badge.md +1 -1
- package/llms/components/banner.md +1 -1
- package/llms/components/bar-chart.md +1 -1
- package/llms/components/chat-composer.md +1 -1
- package/llms/components/combobox.md +2 -1
- package/llms/components/command-menu.md +3 -2
- package/llms/components/date-picker.md +1 -1
- package/llms/components/feedback.md +1 -1
- package/llms/components/gradient-art.md +28 -1
- package/llms/components/input-group.md +1 -1
- package/llms/components/input.md +4 -2
- package/llms/components/line-chart.md +1 -1
- package/llms/components/meter.md +33 -4
- package/llms/components/note.md +1 -1
- package/llms/components/number-field.md +1 -1
- package/llms/components/otp-field.md +1 -1
- package/llms/components/pie-chart.md +1 -1
- package/llms/components/radar-chart.md +1 -1
- package/llms/components/radial-chart.md +1 -1
- package/llms/components/search-input.md +20 -2
- package/llms/components/section-rail.md +101 -0
- package/llms/components/segmented-bar.md +1 -1
- package/llms/components/select.md +1 -1
- package/llms/components/sidebar.md +3 -2
- package/llms/components/sparkline.md +1 -1
- package/llms/components/status-dot.md +1 -1
- package/llms/components/stepper.md +1 -1
- package/llms/components/table.md +2 -2
- package/llms/components/textarea.md +2 -2
- package/llms/foundations/accessibility.md +1 -0
- package/llms/reference/token-intent.md +22 -2
- package/llms/reference/utilities.md +5 -2
- package/llms-full.txt +367 -105
- package/llms.txt +6 -5
- package/package.json +1 -1
- package/registry.json +609 -67
- package/scripts/lint-rules.mjs +6 -3
- package/targets/ios.json +9 -0
package/dist/themes/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AnyThemeId, D as DEFAULT_THEME_ID, S as SABLE_COLOR_STORAGE_KEY, a as SABLE_THEME_ATTRIBUTE, b as SABLE_THEME_STORAGE_KEY, c as SableColorMode, d as SableThemeContextValue, e as SableThemePreference, f as SableThemeProvider, g as SableThemeProviderProps, T as ThemeId, h as applySableColorMode, i as applySableTheme, j as buildThemeManifestById, k as defaultThemeId, l as featuredThemeManifests, m as getThemeManifest, n as isKnownThemeId, o as isThemeId, t as themeIds, p as themeManifestById, q as themeManifests, u as useSableTheme } from '../theme-provider-
|
|
1
|
+
export { A as AnyThemeId, D as DEFAULT_THEME_ID, S as SABLE_COLOR_STORAGE_KEY, a as SABLE_THEME_ATTRIBUTE, b as SABLE_THEME_STORAGE_KEY, c as SableColorMode, d as SableThemeContextValue, e as SableThemePreference, f as SableThemeProvider, g as SableThemeProviderProps, T as ThemeId, h as applySableColorMode, i as applySableTheme, j as buildThemeManifestById, k as defaultThemeId, l as featuredThemeManifests, m as getThemeManifest, n as isKnownThemeId, o as isThemeId, t as themeIds, p as themeManifestById, q as themeManifests, u as useSableTheme } from '../theme-provider-BydfM5Z0.js';
|
|
2
2
|
export { atelierTheme } from './atelier/index.js';
|
|
3
3
|
export { default as emberTheme } from './ember/index.js';
|
|
4
4
|
export { default as meridianTheme } from './meridian/index.js';
|
|
@@ -7,4 +7,4 @@ export { default as prismTheme } from './prism/index.js';
|
|
|
7
7
|
export { default as sableTheme } from './sable/index.js';
|
|
8
8
|
export { default as verdantTheme } from './verdant/index.js';
|
|
9
9
|
import 'react';
|
|
10
|
-
import '../_contract-
|
|
10
|
+
import '../_contract-CDa9-NdB.js';
|
|
@@ -166,6 +166,15 @@
|
|
|
166
166
|
--tone-1-foreground: oklch(94.6% 0.0083 91.48);
|
|
167
167
|
--tone-info-foreground: oklch(94.6% 0.0083 91.48);
|
|
168
168
|
--tone-warning-foreground: oklch(94.6% 0.0083 91.48);
|
|
169
|
+
/* Graphic strength (MARK_TOKENS): meters, bars, dots, chart series and soft tints.
|
|
170
|
+
The same hues lifted and saturated; held to 2:1 on the page, not a text ratio. */
|
|
171
|
+
--theme-destructive-mark: oklch(62.0% 0.246 25.0);
|
|
172
|
+
--theme-success-mark: oklch(70.0% 0.130 165.0);
|
|
173
|
+
--theme-tone-warning-mark: oklch(71.0% 0.156 52.0);
|
|
174
|
+
--theme-tone-info-mark: oklch(63.0% 0.169 250.0);
|
|
175
|
+
--theme-tone-1-mark: oklch(62.0% 0.195 309.0);
|
|
176
|
+
--theme-tone-2-mark: oklch(60.0% 0.182 285.0);
|
|
177
|
+
--theme-tone-3-mark: oklch(70.0% 0.091 130.0);
|
|
169
178
|
--highlight-foreground: oklch(99% 0.004 91.5);
|
|
170
179
|
--overlay: oklch(22.46% 0.0094 107.13);
|
|
171
180
|
--overlay-foreground: oklch(94.3% 0.0042 91.45);
|
|
@@ -255,6 +264,15 @@
|
|
|
255
264
|
--tone-1-foreground: oklch(22.46% 0.0094 107.13);
|
|
256
265
|
--tone-info-foreground: oklch(22.46% 0.0094 107.13);
|
|
257
266
|
--tone-warning-foreground: oklch(22.46% 0.0094 107.13);
|
|
267
|
+
/* Graphic strength (MARK_TOKENS): meters, bars, dots, chart series and soft tints.
|
|
268
|
+
The same hues lifted and saturated; held to 2:1 on the page, not a text ratio. */
|
|
269
|
+
--theme-destructive-mark: oklch(65.0% 0.231 25.0);
|
|
270
|
+
--theme-success-mark: oklch(75.5% 0.137 165.0);
|
|
271
|
+
--theme-tone-warning-mark: oklch(78.0% 0.149 60.0);
|
|
272
|
+
--theme-tone-info-mark: oklch(76.5% 0.122 250.0);
|
|
273
|
+
--theme-tone-1-mark: oklch(68.0% 0.161 309.0);
|
|
274
|
+
--theme-tone-2-mark: oklch(70.0% 0.137 285.0);
|
|
275
|
+
--theme-tone-3-mark: oklch(70.0% 0.103 130.0);
|
|
258
276
|
--highlight-foreground: oklch(99% 0.004 91.5);
|
|
259
277
|
--overlay: oklch(22.46% 0.0094 107.13);
|
|
260
278
|
--overlay-foreground: oklch(94.3% 0.0042 91.45);
|
|
@@ -97,6 +97,15 @@
|
|
|
97
97
|
--tone-1-foreground: oklch(100.00000% 0.000000 89.8756);
|
|
98
98
|
--tone-info-foreground: oklch(100.00000% 0.000000 89.8756);
|
|
99
99
|
--tone-warning-foreground: oklch(100.00000% 0.000000 89.8756);
|
|
100
|
+
/* Graphic strength (MARK_TOKENS): meters, bars, dots, chart series and soft tints.
|
|
101
|
+
The same hues lifted and saturated; held to 2:1 on the page, not a text ratio. */
|
|
102
|
+
--theme-destructive-mark: oklch(62.0% 0.238 13.5);
|
|
103
|
+
--theme-success-mark: oklch(70.0% 0.111 159.0);
|
|
104
|
+
--theme-tone-warning-mark: oklch(76.0% 0.132 75.1);
|
|
105
|
+
--theme-tone-info-mark: oklch(63.0% 0.152 253.8);
|
|
106
|
+
--theme-tone-1-mark: oklch(62.0% 0.196 344.9);
|
|
107
|
+
--theme-tone-2-mark: oklch(62.0% 0.208 301.6);
|
|
108
|
+
--theme-tone-3-mark: oklch(63.0% 0.065 265.7);
|
|
100
109
|
--highlight-foreground: oklch(27.91553% 0.070219 323.8141);
|
|
101
110
|
--overlay: oklch(23.10300% 0.056738 321.2844);
|
|
102
111
|
--overlay-foreground: oklch(100.00000% 0.000000 89.8756);
|
|
@@ -198,6 +207,15 @@
|
|
|
198
207
|
--tone-1-foreground: oklch(27.91553% 0.070219 323.8141);
|
|
199
208
|
--tone-info-foreground: oklch(27.91553% 0.070219 323.8141);
|
|
200
209
|
--tone-warning-foreground: oklch(27.91553% 0.070219 323.8141);
|
|
210
|
+
/* Graphic strength (MARK_TOKENS): meters, bars, dots, chart series and soft tints.
|
|
211
|
+
The same hues lifted and saturated; held to 2:1 on the page, not a text ratio. */
|
|
212
|
+
--theme-destructive-mark: oklch(80.1% 0.118 6.9);
|
|
213
|
+
--theme-success-mark: oklch(83.1% 0.092 158.2);
|
|
214
|
+
--theme-tone-warning-mark: oklch(86.6% 0.136 86.7);
|
|
215
|
+
--theme-tone-info-mark: oklch(85.2% 0.074 252.9);
|
|
216
|
+
--theme-tone-1-mark: oklch(82.6% 0.111 343.4);
|
|
217
|
+
--theme-tone-2-mark: oklch(81.8% 0.108 306.5);
|
|
218
|
+
--theme-tone-3-mark: oklch(82.6% 0.068 270.3);
|
|
201
219
|
}
|
|
202
220
|
|
|
203
221
|
/* Art direction for generated imagery (GradientArt; ART_TOKENS in
|
|
@@ -97,6 +97,15 @@
|
|
|
97
97
|
--tone-1-foreground: oklch(100.00000% 0.000000 89.8756);
|
|
98
98
|
--tone-info-foreground: oklch(100.00000% 0.000000 89.8756);
|
|
99
99
|
--tone-warning-foreground: oklch(100.00000% 0.000000 89.8756);
|
|
100
|
+
/* Graphic strength (MARK_TOKENS): meters, bars, dots, chart series and soft tints.
|
|
101
|
+
The same hues lifted and saturated; held to 2:1 on the page, not a text ratio. */
|
|
102
|
+
--theme-destructive-mark: oklch(62.0% 0.238 19.5);
|
|
103
|
+
--theme-success-mark: oklch(70.0% 0.105 166.9);
|
|
104
|
+
--theme-tone-warning-mark: oklch(75.0% 0.134 73.8);
|
|
105
|
+
--theme-tone-info-mark: oklch(63.0% 0.181 259.8);
|
|
106
|
+
--theme-tone-1-mark: oklch(62.0% 0.183 343.5);
|
|
107
|
+
--theme-tone-2-mark: oklch(60.0% 0.218 300.0);
|
|
108
|
+
--theme-tone-3-mark: oklch(63.0% 0.056 257.4);
|
|
100
109
|
--highlight-foreground: oklch(26.55994% 0.047330 255.4106);
|
|
101
110
|
--overlay: oklch(21.14912% 0.029163 257.5277);
|
|
102
111
|
--overlay-foreground: oklch(100.00000% 0.000000 89.8756);
|
|
@@ -194,6 +203,15 @@
|
|
|
194
203
|
--tone-1-foreground: oklch(25.20350% 0.047984 259.9119);
|
|
195
204
|
--tone-info-foreground: oklch(25.20350% 0.047984 259.9119);
|
|
196
205
|
--tone-warning-foreground: oklch(25.20350% 0.047984 259.9119);
|
|
206
|
+
/* Graphic strength (MARK_TOKENS): meters, bars, dots, chart series and soft tints.
|
|
207
|
+
The same hues lifted and saturated; held to 2:1 on the page, not a text ratio. */
|
|
208
|
+
--theme-destructive-mark: oklch(79.5% 0.121 8.7);
|
|
209
|
+
--theme-success-mark: oklch(82.2% 0.098 165.8);
|
|
210
|
+
--theme-tone-warning-mark: oklch(84.7% 0.124 84.2);
|
|
211
|
+
--theme-tone-info-mark: oklch(80.6% 0.097 259.5);
|
|
212
|
+
--theme-tone-1-mark: oklch(80.4% 0.117 341.7);
|
|
213
|
+
--theme-tone-2-mark: oklch(77.3% 0.135 301.0);
|
|
214
|
+
--theme-tone-3-mark: oklch(82.0% 0.053 256.5);
|
|
197
215
|
}
|
|
198
216
|
|
|
199
217
|
/* Art direction for generated imagery (GradientArt; ART_TOKENS in
|
|
@@ -280,6 +280,15 @@
|
|
|
280
280
|
--tone-2-foreground: var(--zinc-50);
|
|
281
281
|
--tone-1-foreground: var(--zinc-50);
|
|
282
282
|
--tone-warning-foreground: var(--zinc-50);
|
|
283
|
+
/* Graphic strength (MARK_TOKENS): meters, bars, dots, chart series and soft tints.
|
|
284
|
+
The same hues lifted and saturated; held to 2:1 on the page, not a text ratio. */
|
|
285
|
+
--theme-destructive-mark: oklch(62.0% 0.244 22.0);
|
|
286
|
+
--theme-success-mark: oklch(70.0% 0.131 173.0);
|
|
287
|
+
--theme-tone-warning-mark: oklch(71.0% 0.169 52.0);
|
|
288
|
+
--theme-tone-info-mark: oklch(63.0% 0.178 250.0);
|
|
289
|
+
--theme-tone-1-mark: oklch(62.0% 0.269 309.0);
|
|
290
|
+
--theme-tone-2-mark: oklch(60.0% 0.227 285.0);
|
|
291
|
+
--theme-tone-3-mark: oklch(70.0% 0.131 173.0);
|
|
283
292
|
--tone-info-foreground: var(--zinc-50);
|
|
284
293
|
--highlight-foreground: var(--zinc-50);
|
|
285
294
|
|
|
@@ -463,6 +472,15 @@
|
|
|
463
472
|
--tone-2-foreground: var(--zinc-950);
|
|
464
473
|
--tone-1-foreground: var(--zinc-950);
|
|
465
474
|
--tone-warning-foreground: var(--zinc-950);
|
|
475
|
+
/* Graphic strength (MARK_TOKENS): meters, bars, dots, chart series and soft tints.
|
|
476
|
+
The same hues lifted and saturated; held to 2:1 on the page, not a text ratio. */
|
|
477
|
+
--theme-destructive-mark: oklch(65.0% 0.231 25.0);
|
|
478
|
+
--theme-success-mark: oklch(78.0% 0.157 168.0);
|
|
479
|
+
--theme-tone-warning-mark: oklch(82.0% 0.132 65.0);
|
|
480
|
+
--theme-tone-info-mark: oklch(76.0% 0.144 235.0);
|
|
481
|
+
--theme-tone-1-mark: oklch(62.0% 0.295 318.0);
|
|
482
|
+
--theme-tone-2-mark: oklch(72.0% 0.151 285.0);
|
|
483
|
+
--theme-tone-3-mark: oklch(78.0% 0.157 168.0);
|
|
466
484
|
--tone-info-foreground: var(--zinc-950);
|
|
467
485
|
--highlight-foreground: var(--zinc-50);
|
|
468
486
|
--overlay: var(--zinc-950);
|
|
@@ -128,6 +128,15 @@
|
|
|
128
128
|
--tone-warning: oklch(53% 0.12 65);
|
|
129
129
|
--tone-warning-text: oklch(51% 0.12 65); /* a step under the fill: 53% is 4.44:1 as text on muted */
|
|
130
130
|
--tone-warning-foreground: oklch(98.6% 0.004 106);
|
|
131
|
+
/* Graphic strength (MARK_TOKENS): meters, bars, dots, chart series and soft tints.
|
|
132
|
+
The same hues lifted and saturated; held to 2:1 on the page, not a text ratio. */
|
|
133
|
+
--theme-destructive-mark: oklch(62.0% 0.244 22.0);
|
|
134
|
+
--theme-success-mark: oklch(70.0% 0.131 173.0);
|
|
135
|
+
--theme-tone-warning-mark: oklch(71.0% 0.156 65.0);
|
|
136
|
+
--theme-tone-info-mark: oklch(63.0% 0.156 250.0);
|
|
137
|
+
--theme-tone-1-mark: oklch(70.0% 0.131 173.0);
|
|
138
|
+
--theme-tone-2-mark: oklch(70.0% 0.091 175.0);
|
|
139
|
+
--theme-tone-3-mark: oklch(60.0% 0.018 175.0);
|
|
131
140
|
--highlight: oklch(90% 0.05 100);
|
|
132
141
|
--highlight-foreground: oklch(24% 0.035 175);
|
|
133
142
|
--overlay: oklch(16% 0.03 175 / 0.6);
|
|
@@ -209,6 +218,15 @@
|
|
|
209
218
|
--tone-warning: oklch(80% 0.13 75);
|
|
210
219
|
--tone-warning-text: oklch(80% 0.13 75);
|
|
211
220
|
--tone-warning-foreground: oklch(16% 0.03 175);
|
|
221
|
+
/* Graphic strength (MARK_TOKENS): meters, bars, dots, chart series and soft tints.
|
|
222
|
+
The same hues lifted and saturated; held to 2:1 on the page, not a text ratio. */
|
|
223
|
+
--theme-destructive-mark: oklch(65.0% 0.218 22.0);
|
|
224
|
+
--theme-success-mark: oklch(74.0% 0.139 173.0);
|
|
225
|
+
--theme-tone-warning-mark: oklch(80.0% 0.149 75.0);
|
|
226
|
+
--theme-tone-info-mark: oklch(76.0% 0.125 250.0);
|
|
227
|
+
--theme-tone-1-mark: oklch(76.0% 0.137 173.0);
|
|
228
|
+
--theme-tone-2-mark: oklch(74.0% 0.103 175.0);
|
|
229
|
+
--theme-tone-3-mark: oklch(72.0% 0.015 175.0);
|
|
212
230
|
--highlight: oklch(40% 0.06 90);
|
|
213
231
|
--highlight-foreground: oklch(98.6% 0.004 106);
|
|
214
232
|
--overlay: oklch(8% 0.015 175 / 0.7);
|
|
@@ -1,48 +1,45 @@
|
|
|
1
1
|
# ApprovalBlock
|
|
2
2
|
|
|
3
|
-
An agent asking permission for one tool call: the question, what
|
|
3
|
+
An agent asking permission for one tool call: the question, what is at stake, the call itself as a ToolCall with its exact input, and Deny / Always allow / Allow once.
|
|
4
4
|
|
|
5
|
-
**Intent:** Reach for this in a chat or agent run when a tool call waits on the person — sending, paying, deleting, publishing.
|
|
5
|
+
**Intent:** Reach for this in a chat or agent run when a tool call waits on the person — running a command, sending, paying, deleting, publishing. It wraps the call's own ToolCall, which shows status="awaiting" until the person answers and then "complete" or "denied". A destructive action outside an agent is DestructiveActionModal.
|
|
6
6
|
|
|
7
7
|
**Block:** AI & agents · card · designed for 18rem–28rem wide (fills its container up to the max)
|
|
8
8
|
|
|
9
9
|
## Notes
|
|
10
10
|
|
|
11
|
-
- The title is the question in plain words ("
|
|
12
|
-
- The
|
|
13
|
-
-
|
|
14
|
-
- After a decision the buttons give way to one InlineStatus line saying what happened, so the thread keeps a record of the answer.
|
|
11
|
+
- The title is the question in plain words ("Run this command?"); the description says what is at stake. That sentence is what the person is deciding on.
|
|
12
|
+
- The call is shown as the agent made it — tool name and raw input, open on arrival — because the exact arguments are what a careful person checks. Do not paraphrase them into a form.
|
|
13
|
+
- Three answers, as agent products settle on: Deny on the start edge, then Always allow and Allow once, the primary on the end. Neither is focused on arrival: an approval that a stray Enter can grant is not an approval.
|
|
14
|
+
- After a decision the buttons give way to one InlineStatus line saying what happened, and the ToolCall shows the outcome, so the thread keeps a record of the answer.
|
|
15
15
|
|
|
16
16
|
## Accessibility
|
|
17
17
|
|
|
18
18
|
- Focus moves to the outcome line when the buttons leave, instead of dropping to the page; the line is a role=status region, so the decision is announced.
|
|
19
|
-
- The
|
|
20
|
-
- The remember Checkbox has its own Label, so the tool name inside it is part of its accessible name.
|
|
19
|
+
- The ToolCall announces its own status change, and its input is a labelled code view.
|
|
21
20
|
|
|
22
21
|
## Source
|
|
23
22
|
|
|
24
23
|
```tsx
|
|
25
|
-
import { useState, useEffect, useRef
|
|
26
|
-
import { Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle,
|
|
24
|
+
import { useState, useEffect, useRef } from "react"
|
|
25
|
+
import { Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, cn, InlineStatus, ToolCall } from "@sableui/react"
|
|
27
26
|
|
|
28
27
|
const request = {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
allowed: "Allowed. Sending the email.",
|
|
38
|
-
denied: "Denied. The agent won't send it.",
|
|
28
|
+
title: "Run this command?",
|
|
29
|
+
description: "The agent wants to migrate the production database in acme/api. It changes live data.",
|
|
30
|
+
tool: "run_command",
|
|
31
|
+
action: "Run a command",
|
|
32
|
+
// A command reads as the command; a structured call would pass its arguments object.
|
|
33
|
+
input: "pnpm db:migrate --env production",
|
|
34
|
+
allowed: "Allowed. Running the migration.",
|
|
35
|
+
denied: "Denied. The agent won't run it.",
|
|
39
36
|
}
|
|
40
37
|
|
|
41
38
|
export interface ApprovalBlockProps {
|
|
42
39
|
className?: string
|
|
43
40
|
/** false drops the card's surface and border — for a chat column that already frames it. */
|
|
44
41
|
framed?: boolean
|
|
45
|
-
/** The person allowed the call. `remember` is
|
|
42
|
+
/** The person allowed the call. `remember` is true for "Always allow". */
|
|
46
43
|
onApprove?: (options: { remember: boolean }) => void
|
|
47
44
|
/** The person declined the call. */
|
|
48
45
|
onDeny?: () => void
|
|
@@ -50,8 +47,6 @@ export interface ApprovalBlockProps {
|
|
|
50
47
|
|
|
51
48
|
export function ApprovalBlock({ className, framed = true, onApprove, onDeny }: ApprovalBlockProps) {
|
|
52
49
|
const [decision, setDecision] = useState<"allowed" | "denied" | null>(null)
|
|
53
|
-
const [remember, setRemember] = useState(false)
|
|
54
|
-
const id = useId()
|
|
55
50
|
const outcome = useRef<HTMLDivElement>(null)
|
|
56
51
|
// The buttons leave with the decision, so focus moves to the line that
|
|
57
52
|
// replaces them instead of falling back to the top of the page.
|
|
@@ -59,37 +54,30 @@ export function ApprovalBlock({ className, framed = true, onApprove, onDeny }: A
|
|
|
59
54
|
if (decision) outcome.current?.focus()
|
|
60
55
|
}, [decision])
|
|
61
56
|
|
|
57
|
+
const approve = (remember: boolean) => {
|
|
58
|
+
setDecision("allowed")
|
|
59
|
+
onApprove?.({ remember })
|
|
60
|
+
}
|
|
61
|
+
|
|
62
62
|
return (
|
|
63
63
|
<Card variant={framed ? "default" : "flat"} className={cn("w-full max-w-md", className)}>
|
|
64
64
|
<CardHeader>
|
|
65
65
|
<CardTitle>{request.title}</CardTitle>
|
|
66
66
|
<CardDescription>{request.description}</CardDescription>
|
|
67
67
|
</CardHeader>
|
|
68
|
-
<CardContent
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
<Code>{request.tool}</Code>
|
|
80
|
-
</dd>
|
|
81
|
-
</div>
|
|
82
|
-
</dl>
|
|
83
|
-
{decision ? null : (
|
|
84
|
-
<div className="flex items-center gap-2">
|
|
85
|
-
<Checkbox id={`${id}-remember`} checked={remember} onCheckedChange={(v: boolean) => setRemember(v)} />
|
|
86
|
-
<Label htmlFor={`${id}-remember`} className="text-body-sm">
|
|
87
|
-
Allow <Code>{request.tool}</Code> for the rest of this chat
|
|
88
|
-
</Label>
|
|
89
|
-
</div>
|
|
90
|
-
)}
|
|
68
|
+
<CardContent>
|
|
69
|
+
{/* The call itself, exactly as the agent made it. It answers with the
|
|
70
|
+
person: held, then done or denied. */}
|
|
71
|
+
<ToolCall
|
|
72
|
+
name={request.tool}
|
|
73
|
+
title={request.action}
|
|
74
|
+
status={decision === "allowed" ? "complete" : decision === "denied" ? "denied" : "awaiting"}
|
|
75
|
+
statusLabel={decision === "allowed" ? "Allowed" : undefined}
|
|
76
|
+
input={request.input}
|
|
77
|
+
defaultOpen
|
|
78
|
+
/>
|
|
91
79
|
</CardContent>
|
|
92
|
-
<CardFooter actions
|
|
80
|
+
<CardFooter actions>
|
|
93
81
|
{decision ? (
|
|
94
82
|
<InlineStatus
|
|
95
83
|
ref={outcome}
|
|
@@ -103,7 +91,8 @@ export function ApprovalBlock({ className, framed = true, onApprove, onDeny }: A
|
|
|
103
91
|
) : (
|
|
104
92
|
<>
|
|
105
93
|
<Button
|
|
106
|
-
variant="
|
|
94
|
+
variant="ghost"
|
|
95
|
+
className="me-auto"
|
|
107
96
|
onClick={() => {
|
|
108
97
|
setDecision("denied")
|
|
109
98
|
onDeny?.()
|
|
@@ -111,14 +100,10 @@ export function ApprovalBlock({ className, framed = true, onApprove, onDeny }: A
|
|
|
111
100
|
>
|
|
112
101
|
Deny
|
|
113
102
|
</Button>
|
|
114
|
-
<Button
|
|
115
|
-
|
|
116
|
-
setDecision("allowed")
|
|
117
|
-
onApprove?.({ remember })
|
|
118
|
-
}}
|
|
119
|
-
>
|
|
120
|
-
Allow
|
|
103
|
+
<Button variant="outline" onClick={() => approve(true)}>
|
|
104
|
+
Always allow
|
|
121
105
|
</Button>
|
|
106
|
+
<Button onClick={() => approve(false)}>Allow once</Button>
|
|
122
107
|
</>
|
|
123
108
|
)}
|
|
124
109
|
</CardFooter>
|
|
@@ -28,7 +28,10 @@ const activity = [
|
|
|
28
28
|
{ title: "Subscription", detail: "Team plan · 2h ago", amount: "+49.00", tone: "1" },
|
|
29
29
|
{ title: "Refund", detail: "Order 1042 · Yesterday", amount: "-24.00", tone: "2" },
|
|
30
30
|
{ title: "Payout", detail: "To checking · Mon", amount: "-850.00", tone: "3" },
|
|
31
|
-
]
|
|
31
|
+
] as const
|
|
32
|
+
|
|
33
|
+
/** Each row's mark: its tone at graphic strength, which every theme tunes. */
|
|
34
|
+
const TONE_MARK = { "1": "bg-tone-1-mark", "2": "bg-tone-2-mark", "3": "bg-tone-3-mark" } as const
|
|
32
35
|
|
|
33
36
|
export interface WalletBlockProps {
|
|
34
37
|
className?: string
|
|
@@ -62,9 +65,7 @@ export function WalletBlock({ className, framed = true, onSend, onReceive }: Wal
|
|
|
62
65
|
leading={
|
|
63
66
|
<span
|
|
64
67
|
aria-hidden
|
|
65
|
-
className="block size-8 rounded-full"
|
|
66
|
-
// design-lint-disable-next-line inline-color -- relative colour derived from the theme's own --tone token, so it follows every look
|
|
67
|
-
style={{ background: `oklch(from var(--tone-${item.tone}) clamp(0.5, calc(l + 0.16), 0.9) max(calc(c * 1.25), 0.1) h)` }}
|
|
68
|
+
className={cn("block size-8 rounded-full", TONE_MARK[item.tone])}
|
|
68
69
|
/>
|
|
69
70
|
}
|
|
70
71
|
title={item.title}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
The application frame: slots for status banners, a mobile header, a desktop sidebar, main content, a mobile bottom nav, a persistent dock (a now-playing or call bar), and floating overlays — plus a built-in skip link and #main-content target.
|
|
6
6
|
|
|
7
|
-
**Keywords:** app shell, layout, frame, sidebar, header, bottom nav, mobile, banners, main, dock, player bar, now playing, persistent
|
|
7
|
+
**Keywords:** app shell, layout, frame, sidebar, header, bottom nav, mobile, banners, main, dock, player bar, now playing, persistent, inset, inset frame, floating panel, rounded content, scroll container
|
|
8
8
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
@@ -16,7 +16,10 @@ Use AppShell as the outer product frame for authenticated or app-like experience
|
|
|
16
16
|
- Do: Pass app-wide outage or status messages through banners so they remain above the frame.
|
|
17
17
|
- Do: Use Region inside the main content to choose each route's reading width.
|
|
18
18
|
- Do: Wrap EVERY return of a route in its own Page or Region — including early returns for loading, empty and error states. AppShell's <main> deliberately carries no padding (it is a frame, and padding belongs to the region that chose the width), so a route that returns a bare spinner or error renders flush against the chrome. This is the most common conversion bug: the happy path gets a Page, the three early returns do not.
|
|
19
|
+
- Do: Use frame="inset" for dense, multi-pane product apps — a CRM, an issue tracker, an AI workspace — where framing the content as one raised panel on the rail's ground helps it read as the workspace and the rail as chrome. Keep the Sidebar on surface="rail" so its tint is the ground. Inset moves the page scroll from the window to <main id="main-content"> on desktop: point scroll listeners, scroll restoration and scroll-to-top at that element, not window.
|
|
19
20
|
- Don't: Nest AppShell inside route cards or panels. It is page chrome, not local content.
|
|
21
|
+
- Don't: Wrap a route in its own h-full overflow-y-auto box inside an inset shell. main is already the page's scroll container; a second one traps the scrollbar inside a smaller box and breaks sticky headers and the skip link's scroll target. Scroll a genuinely separate pane (a list beside a detail view) with Scroller. → use **Scroller**
|
|
22
|
+
- Don't: Combine frame="inset" with a full-width header bar above the rail. The inset ground is the rail running the full height of the window; a bar across the top cuts it off. Use the flush frame with Sidebar surface="page" for that layout.
|
|
20
23
|
- Don't: Put desktop-only navigation in the mobile header slot or mobile-only controls in the sidebar slot.
|
|
21
24
|
|
|
22
25
|
### Anatomy
|
|
@@ -26,7 +29,7 @@ Use AppShell as the outer product frame for authenticated or app-like experience
|
|
|
26
29
|
| Banners | no | Full-width app status messages rendered above the shell. |
|
|
27
30
|
| Header | no | Mobile top chrome, usually AppHeader. |
|
|
28
31
|
| Sidebar | no | Desktop navigation chrome, usually Sidebar. |
|
|
29
|
-
| Main | yes | The route content landmark with id main-content. |
|
|
32
|
+
| Main | yes | The route content landmark with id main-content. With frame="inset", from lg it is a rounded, bordered panel that scrolls inside itself. |
|
|
30
33
|
| Bottom nav | no | Mobile fixed navigation with reserved bottom space. |
|
|
31
34
|
| Dock | no | Persistent bottom chrome that outlives routes — a now-playing bar, a call bar. Sticky above the bottom nav; the desktop Sidebar shortens to clear it. |
|
|
32
35
|
|
|
@@ -46,10 +49,11 @@ Use AppShell as the outer product frame for authenticated or app-like experience
|
|
|
46
49
|
| bottomNav | ReactNode | — | Mobile bottom navigation (e.g. BottomNav); fixed to the bottom edge. main reserves space for it. |
|
|
47
50
|
| dock | ReactNode | — | Persistent chrome kept on screen across routes (a now-playing bar, an active-call bar, an upload tray). Full width, sticky to the bottom edge and above bottomNav on mobile; its height is published as --dock-height and the app Sidebar subtracts it. In flow, so main needs no reserved space. The contents paint their own surface and top border, and name themselves (e.g. <section aria-label="Player">). Mount AppShell in a layout that survives navigation, or the playback restarts. |
|
|
48
51
|
| overlays | ReactNode | — | Floating overlays — a message launcher, FAB, or modal mount points. |
|
|
52
|
+
| frame | "flush" \| "inset" | "flush" | How the desktop frame (lg and up) holds the content; below lg both are the same mobile layout with page scroll. "flush": main sits on the page beside the rail and the document scrolls. "inset": the shell fills the viewport and paints the shell-ground token (one step off the rail's surface, tunable with --theme-shell-ground) behind the rail and around the panel; main becomes a rounded-lg panel with a hairline border and shadow-sm, inset by a spacing step from the window edges, that scrolls inside itself (scrollbar-quiet) while the rail stays put. The Sidebar in the sidebar slot drops its right border and fills the row. main stays the #main-content target (tabIndex -1, so the skip link lands focus in the scroller) and the inline-size query container; sticky children stick to the panel's top; banners and the dock stay in flow, so the panel's bottom gap sits above a dock. With Sidebar surface="page" the ground is the page colour and the panel's border alone lifts it. |
|
|
49
53
|
|
|
50
54
|
## Tokens used
|
|
51
55
|
|
|
52
|
-
`background`, `foreground`, `primary`, `primary-foreground`
|
|
56
|
+
`background`, `foreground`, `primary`, `primary-foreground`, `sidebar`, `shell-ground`, `border`
|
|
53
57
|
|
|
54
58
|
## Accessibility
|
|
55
59
|
|
|
@@ -57,6 +61,7 @@ Use AppShell as the outer product frame for authenticated or app-like experience
|
|
|
57
61
|
- Wraps content in a <main id="main-content"> landmark.
|
|
58
62
|
- Slot components own their own ARIA (nav landmarks, labels).
|
|
59
63
|
- The dock follows <main> in DOM order, so keyboard and screen-reader users reach the player after the page content, not before it.
|
|
64
|
+
- With frame="inset", <main> is the desktop scroll container and takes tabIndex -1: the skip link moves focus into it, so PageDown and the arrow keys scroll the content, without adding a tab stop.
|
|
60
65
|
|
|
61
66
|
## Related
|
|
62
67
|
|
|
@@ -96,6 +101,70 @@ import { AppHeader, AppShell, Banner, BottomNav, BottomNavItem, Icon, PageHeader
|
|
|
96
101
|
</AppShell>
|
|
97
102
|
```
|
|
98
103
|
|
|
104
|
+
### Inset frame
|
|
105
|
+
|
|
106
|
+
```tsx
|
|
107
|
+
import { AppHeader, AppShell, BottomNav, BottomNavItem, Button, Card, CardContent, Icon, Page, PageHeader, Sidebar, SidebarBrand, SidebarHeader, SidebarItem, SidebarNav, Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@sableui/react"
|
|
108
|
+
// <Link> = your router's link (react-router, next/link, @tanstack/router, …)
|
|
109
|
+
|
|
110
|
+
<AppShell
|
|
111
|
+
frame="inset"
|
|
112
|
+
header={<AppHeader title="Pipeline" />}
|
|
113
|
+
sidebar={
|
|
114
|
+
<Sidebar>
|
|
115
|
+
<SidebarHeader>
|
|
116
|
+
<SidebarBrand mark={<Icon name="gem" variant="solid" />} label="Relay" render={<Link to="/" />} />
|
|
117
|
+
</SidebarHeader>
|
|
118
|
+
<SidebarNav>
|
|
119
|
+
<SidebarItem icon={<Icon name="inbox" />} label="Inbox" render={<Link to="/inbox" />} />
|
|
120
|
+
<SidebarItem icon={<Icon name="user" />} label="People" active render={<Link to="/people" />} />
|
|
121
|
+
<SidebarItem icon={<Icon name="folder" />} label="Companies" render={<Link to="/companies" />} />
|
|
122
|
+
</SidebarNav>
|
|
123
|
+
</Sidebar>
|
|
124
|
+
}
|
|
125
|
+
bottomNav={
|
|
126
|
+
<BottomNav>
|
|
127
|
+
<BottomNavItem icon={<Icon name="inbox" />} label="Inbox" render={<Link to="/inbox" />} />
|
|
128
|
+
<BottomNavItem icon={<Icon name="user" />} label="People" active render={<Link to="/people" />} />
|
|
129
|
+
<BottomNavItem icon={<Icon name="folder" />} label="Companies" render={<Link to="/companies" />} />
|
|
130
|
+
</BottomNav>
|
|
131
|
+
}
|
|
132
|
+
>
|
|
133
|
+
<Page max="wide" gap={4} className="py-6">
|
|
134
|
+
<PageHeader
|
|
135
|
+
title="People"
|
|
136
|
+
description="Everyone in your pipeline, newest first."
|
|
137
|
+
actions={<Button><Icon name="plus" />Add person</Button>}
|
|
138
|
+
/>
|
|
139
|
+
<Card>
|
|
140
|
+
<CardContent flush>
|
|
141
|
+
<Table>
|
|
142
|
+
<TableHeader>
|
|
143
|
+
<TableRow>
|
|
144
|
+
<TableHead>Name</TableHead>
|
|
145
|
+
<TableHead>Company</TableHead>
|
|
146
|
+
<TableHead numeric>Deals</TableHead>
|
|
147
|
+
</TableRow>
|
|
148
|
+
</TableHeader>
|
|
149
|
+
<TableBody>
|
|
150
|
+
<TableRow>
|
|
151
|
+
<TableCell>Ada Lovelace</TableCell>
|
|
152
|
+
<TableCell>Northwind</TableCell>
|
|
153
|
+
<TableCell numeric>4</TableCell>
|
|
154
|
+
</TableRow>
|
|
155
|
+
<TableRow>
|
|
156
|
+
<TableCell>Grace Hopper</TableCell>
|
|
157
|
+
<TableCell>Harbor Labs</TableCell>
|
|
158
|
+
<TableCell numeric>2</TableCell>
|
|
159
|
+
</TableRow>
|
|
160
|
+
</TableBody>
|
|
161
|
+
</Table>
|
|
162
|
+
</CardContent>
|
|
163
|
+
</Card>
|
|
164
|
+
</Page>
|
|
165
|
+
</AppShell>
|
|
166
|
+
```
|
|
167
|
+
|
|
99
168
|
### SkipLink in a layout of your own
|
|
100
169
|
|
|
101
170
|
```tsx
|
|
@@ -45,7 +45,7 @@ Use AreaChart for volume over time — visitors, revenue, usage — where the fi
|
|
|
45
45
|
|
|
46
46
|
## Tokens used
|
|
47
47
|
|
|
48
|
-
`tone-1`, `tone-2`, `tone-3`, `tone-info`, `tone-warning`, `primary`, `muted-foreground`, `border`, `popover`, `popover-foreground`, `foreground`, `background`
|
|
48
|
+
`tone-1`, `tone-2`, `tone-3`, `tone-info`, `tone-warning`, `primary`, `muted-foreground`, `border`, `popover`, `popover-foreground`, `foreground`, `background`, `tone-warning-mark`, `tone-info-mark`, `tone-1-mark`, `tone-2-mark`, `tone-3-mark`
|
|
49
49
|
|
|
50
50
|
## Motion
|
|
51
51
|
|
|
@@ -52,7 +52,7 @@ The card a file takes in a conversation — in the composer while it uploads, an
|
|
|
52
52
|
|
|
53
53
|
## Tokens used
|
|
54
54
|
|
|
55
|
-
`card`, `border`, `border-strong`, `muted`, `muted-foreground`, `foreground`, `destructive`, `overlay`, `overlay-foreground`, `ring`
|
|
55
|
+
`card`, `border`, `border-strong`, `muted`, `muted-foreground`, `foreground`, `destructive`, `overlay`, `overlay-foreground`, `ring`, `destructive-mark`
|
|
56
56
|
|
|
57
57
|
## Motion
|
|
58
58
|
|
package/llms/components/badge.md
CHANGED
|
@@ -46,7 +46,7 @@ Use Badge for any short static label: metadata, categories, tone-coded labels, a
|
|
|
46
46
|
|
|
47
47
|
## Tokens used
|
|
48
48
|
|
|
49
|
-
`palette-wash`, `palette-wash-strong`, `palette-edge`, `palette-dot`, `palette-solid`, `palette-text`, `palette-solid-ink`, `secondary`, `secondary-foreground`, `border`, `foreground`, `background`, `muted`, `muted-foreground`, `tone-1`, `tone-2`, `tone-3`, `tone-info`, `success`, `tone-warning`, `destructive`, `overlay`, `overlay-foreground`, `tone-1-foreground`, `tone-2-foreground`, `tone-3-foreground`, `tone-info-foreground`, `success-foreground`, `tone-warning-foreground`, `destructive-foreground`
|
|
49
|
+
`palette-wash`, `palette-wash-strong`, `palette-edge`, `palette-dot`, `palette-solid`, `palette-text`, `palette-solid-ink`, `secondary`, `secondary-foreground`, `border`, `foreground`, `background`, `muted`, `muted-foreground`, `tone-1`, `tone-2`, `tone-3`, `tone-info`, `success`, `tone-warning`, `destructive`, `overlay`, `overlay-foreground`, `tone-1-foreground`, `tone-2-foreground`, `tone-3-foreground`, `tone-info-foreground`, `success-foreground`, `tone-warning-foreground`, `destructive-foreground`, `destructive-mark`, `success-mark`, `tone-warning-mark`, `tone-info-mark`, `tone-1-mark`, `tone-2-mark`, `tone-3-mark`
|
|
50
50
|
|
|
51
51
|
## Accessibility
|
|
52
52
|
|
|
@@ -47,7 +47,7 @@ Use Banner for page-level or app-level messages that affect the current experien
|
|
|
47
47
|
|
|
48
48
|
## Tokens used
|
|
49
49
|
|
|
50
|
-
`secondary`, `secondary-foreground`, `foreground`, `background`, `tone-info`, `tone-info-foreground`, `success`, `success-foreground`, `tone-warning`, `tone-warning-foreground`, `tone-1`, `tone-1-foreground`, `destructive`, `destructive-foreground`
|
|
50
|
+
`secondary`, `secondary-foreground`, `foreground`, `background`, `tone-info`, `tone-info-foreground`, `success`, `success-foreground`, `tone-warning`, `tone-warning-foreground`, `tone-1`, `tone-1-foreground`, `destructive`, `destructive-foreground`, `destructive-mark`, `success-mark`, `tone-warning-mark`, `tone-info-mark`, `tone-1-mark`
|
|
51
51
|
|
|
52
52
|
## Accessibility
|
|
53
53
|
|
|
@@ -49,7 +49,7 @@ Use BarChart to compare amounts across categories — the default chart for "how
|
|
|
49
49
|
|
|
50
50
|
## Tokens used
|
|
51
51
|
|
|
52
|
-
`tone-1`, `tone-2`, `tone-3`, `tone-info`, `tone-warning`, `primary`, `muted-foreground`, `border`, `popover`, `popover-foreground`, `foreground`, `background`
|
|
52
|
+
`tone-1`, `tone-2`, `tone-3`, `tone-info`, `tone-warning`, `primary`, `muted-foreground`, `border`, `popover`, `popover-foreground`, `foreground`, `background`, `tone-warning-mark`, `tone-info-mark`, `tone-1-mark`, `tone-2-mark`, `tone-3-mark`
|
|
53
53
|
|
|
54
54
|
## Motion
|
|
55
55
|
|
|
@@ -67,7 +67,7 @@ Pairs with MessageScroller to make a working chat. A single surface rather than
|
|
|
67
67
|
|
|
68
68
|
## Tokens used
|
|
69
69
|
|
|
70
|
-
`
|
|
70
|
+
`field`, `field-border`, `ring`, `destructive`, `foreground`, `muted-foreground`, `primary`, `primary-foreground`, `secondary`, `secondary-foreground`, `accent`, `accent-foreground`
|
|
71
71
|
|
|
72
72
|
## Motion
|
|
73
73
|
|
|
@@ -56,13 +56,14 @@ Use Combobox when users choose from a list that benefits from typing, filtering,
|
|
|
56
56
|
| items | readonly any[] \| readonly ComboboxItemGroup[] | — | The pool of options, flat or grouped ({ value, items }). Drives type-to-filter and is required for ComboboxEmpty to render its fallback. |
|
|
57
57
|
| multiple | boolean | false | Select several items instead of one. `value` / `defaultValue` / `onValueChange` become arrays, choosing an item toggles its membership, and the popup stays open between picks. Pair it with ComboboxChips in place of ComboboxInput; every other part is unchanged. |
|
|
58
58
|
| filter | null \| ((item, query, itemToString?) => boolean) | Base UI's locale-aware contains | How items match the query. `null` turns matching off, for items a server already filtered: pair it with `onInputValueChange` to fetch. |
|
|
59
|
+
| highlightMatches | boolean | true | Paints the typed text wherever it appears in a row's label, on the `highlight` / `highlight-foreground` pair, through the CSS Custom Highlight API — no `<mark>` in the row, and the accessible name is unchanged. Only typed text counts: a field still holding the selected item's label lists everything and lights nothing. A literal, case-insensitive match within the label; a `filter` that matches differently leaves rows it kept unpainted. `false` turns it off. |
|
|
59
60
|
| onInputValueChange | (inputValue: string, eventDetails) => void | — | Fires as the reader types. The place to fetch results for a server-backed combobox. |
|
|
60
61
|
| itemToStringLabel | (item) => string | item.label for { value, label } items | The text an object item shows in the input once chosen, and is matched by. Needed for object items without a `label` field. |
|
|
61
62
|
| virtualized | boolean | false | Tells Base UI the DOM holds only part of the list. Required when using ComboboxVirtualList. |
|
|
62
63
|
|
|
63
64
|
## Tokens used
|
|
64
65
|
|
|
65
|
-
`
|
|
66
|
+
`highlight`, `highlight-foreground`, `field-border`, `field`, `foreground`, `muted-foreground`, `ring`, `destructive`, `popover`, `popover-foreground`, `border`, `accent`, `accent-foreground`, `primary`, `secondary`, `secondary-foreground`
|
|
66
67
|
|
|
67
68
|
## Motion
|
|
68
69
|
|