sherick-ui 2.5.0 → 2.7.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.
Files changed (75) hide show
  1. package/README.md +57 -3
  2. package/dist/cjs/components/CheckboxGroup.cjs +41 -0
  3. package/dist/cjs/components/CheckboxGroup.cjs.map +1 -0
  4. package/dist/cjs/components/Combobox.cjs +190 -14
  5. package/dist/cjs/components/Combobox.cjs.map +1 -1
  6. package/dist/cjs/components/Form.cjs +27 -0
  7. package/dist/cjs/components/Form.cjs.map +1 -0
  8. package/dist/cjs/components/Input.cjs +20 -2
  9. package/dist/cjs/components/Input.cjs.map +1 -1
  10. package/dist/cjs/components/NumberField.cjs +30 -4
  11. package/dist/cjs/components/NumberField.cjs.map +1 -1
  12. package/dist/cjs/components/RadioGroup.cjs +7 -3
  13. package/dist/cjs/components/RadioGroup.cjs.map +1 -1
  14. package/dist/cjs/components/Search.cjs +1 -1
  15. package/dist/cjs/components/Search.cjs.map +1 -1
  16. package/dist/cjs/components/Select.cjs +4 -2
  17. package/dist/cjs/components/Select.cjs.map +1 -1
  18. package/dist/cjs/components/Tabs.cjs +1 -1
  19. package/dist/cjs/components/Tabs.cjs.map +1 -1
  20. package/dist/cjs/components/Textarea.cjs +6 -1
  21. package/dist/cjs/components/Textarea.cjs.map +1 -1
  22. package/dist/cjs/components/ToggleGroup.cjs +1 -1
  23. package/dist/cjs/components/ToggleGroup.cjs.map +1 -1
  24. package/dist/cjs/components/choice-row.cjs +51 -0
  25. package/dist/cjs/components/choice-row.cjs.map +1 -0
  26. package/dist/cjs/components/date-field.cjs +3 -3
  27. package/dist/cjs/components/date-field.cjs.map +1 -1
  28. package/dist/cjs/components/option-groups.cjs +35 -0
  29. package/dist/cjs/components/option-groups.cjs.map +1 -0
  30. package/dist/cjs/components/ui.common.cjs +100 -50
  31. package/dist/cjs/components/ui.common.cjs.map +1 -1
  32. package/dist/cjs/dev.cjs +2 -0
  33. package/dist/cjs/dev.cjs.map +1 -1
  34. package/dist/cjs/index.cjs +4 -0
  35. package/dist/cjs/index.cjs.map +1 -1
  36. package/dist/esm/components/CheckboxGroup.js +36 -0
  37. package/dist/esm/components/CheckboxGroup.js.map +1 -0
  38. package/dist/esm/components/Combobox.js +195 -19
  39. package/dist/esm/components/Combobox.js.map +1 -1
  40. package/dist/esm/components/Form.js +22 -0
  41. package/dist/esm/components/Form.js.map +1 -0
  42. package/dist/esm/components/Input.js +21 -3
  43. package/dist/esm/components/Input.js.map +1 -1
  44. package/dist/esm/components/NumberField.js +31 -5
  45. package/dist/esm/components/NumberField.js.map +1 -1
  46. package/dist/esm/components/RadioGroup.js +10 -6
  47. package/dist/esm/components/RadioGroup.js.map +1 -1
  48. package/dist/esm/components/Search.js +1 -1
  49. package/dist/esm/components/Search.js.map +1 -1
  50. package/dist/esm/components/Select.js +6 -4
  51. package/dist/esm/components/Select.js.map +1 -1
  52. package/dist/esm/components/Tabs.js +2 -2
  53. package/dist/esm/components/Tabs.js.map +1 -1
  54. package/dist/esm/components/Textarea.js +6 -1
  55. package/dist/esm/components/Textarea.js.map +1 -1
  56. package/dist/esm/components/ToggleGroup.js +2 -2
  57. package/dist/esm/components/ToggleGroup.js.map +1 -1
  58. package/dist/esm/components/choice-row.js +46 -0
  59. package/dist/esm/components/choice-row.js.map +1 -0
  60. package/dist/esm/components/date-field.js +3 -3
  61. package/dist/esm/components/date-field.js.map +1 -1
  62. package/dist/esm/components/option-groups.js +30 -0
  63. package/dist/esm/components/option-groups.js.map +1 -0
  64. package/dist/esm/components/ui.common.js +100 -52
  65. package/dist/esm/components/ui.common.js.map +1 -1
  66. package/dist/esm/dev.js +1 -1
  67. package/dist/esm/index.js +2 -0
  68. package/dist/esm/index.js.map +1 -1
  69. package/dist/styles.css +271 -205
  70. package/dist/theme.css +160 -157
  71. package/dist/types/dev.d.cts +31 -25
  72. package/dist/types/dev.d.ts +31 -25
  73. package/dist/types/index.d.cts +184 -20
  74. package/dist/types/index.d.ts +184 -20
  75. package/package.json +2 -2
@@ -17,13 +17,13 @@ declare const elevation: {
17
17
  };
18
18
  declare const recessedTop = "shadow-sherick-recessed-top";
19
19
  declare const shape: {
20
- readonly control: "rounded-[1rem]";
20
+ readonly control: "rounded-[0.75rem]";
21
21
  readonly mark: "rounded-[0.375rem]";
22
- readonly row: "rounded-[0.75rem]";
23
- readonly prominent: "rounded-[1.25rem]";
24
- readonly surface: "rounded-[1.5rem]";
25
- readonly sheet: "rounded-[1rem]";
26
- readonly expressive: "rounded-[1.75rem]";
22
+ readonly row: "rounded-[0.5rem]";
23
+ readonly prominent: "rounded-[1rem]";
24
+ readonly surface: "rounded-[1.25rem]";
25
+ readonly sheet: "rounded-[0.75rem]";
26
+ readonly expressive: "rounded-[1.5rem]";
27
27
  readonly pill: "rounded-full";
28
28
  readonly circle: "rounded-full";
29
29
  };
@@ -33,8 +33,8 @@ declare const edgeTone: {
33
33
  readonly rule: "border-sherick-edge/[0.075]";
34
34
  };
35
35
  declare const rim: {
36
- readonly field: "border-[1.5px] border-sherick-rim";
37
- readonly fieldError: "border-[1.5px] border-sherick-danger";
36
+ readonly field: "border-[1.5px] border-transparent border-b-sherick-rim";
37
+ readonly fieldError: "border-[1.5px] border-transparent border-b-sherick-danger";
38
38
  readonly dashed: string;
39
39
  readonly dashedHover: "hover:after:bg-sherick-ink-muted";
40
40
  readonly dashedDragging: "data-[dragging]:after:bg-sherick-primary";
@@ -56,17 +56,17 @@ declare const state: {
56
56
  readonly text: "cursor-text";
57
57
  readonly rowHover: "hover:bg-sherick-ink/[0.05]";
58
58
  readonly field: {
59
- readonly hover: "hover:bg-sherick-canvas/[0.85] hover:border-sherick-ink-muted";
60
- readonly focus: "focus:bg-sherick-canvas focus:border-sherick-ink-muted";
61
- readonly focusWithin: "[&&]:focus-within:bg-sherick-canvas [&&]:focus-within:border-sherick-ink-muted";
62
- readonly engaged: "bg-sherick-canvas border-sherick-ink-muted";
63
- readonly errorHover: "hover:bg-sherick-canvas/[0.85]";
64
- readonly errorFocus: "focus:bg-sherick-canvas";
65
- readonly errorEngaged: "bg-sherick-canvas";
66
- readonly invalid: "data-[invalid]:border-sherick-danger";
67
- readonly invalidHover: "data-[invalid]:hover:border-sherick-danger";
68
- readonly invalidEngaged: "data-[invalid]:border-sherick-danger";
69
- readonly invalidFocusWithin: "[&&]:data-[invalid]:focus-within:border-sherick-danger";
59
+ readonly hover: "hover:bg-sherick-surface-high/[0.82] hover:border-b-sherick-ink-muted";
60
+ readonly focus: "focus:bg-sherick-surface-high focus:border-b-sherick-ink-muted";
61
+ readonly focusWithin: "[&&]:focus-within:bg-sherick-surface-high [&&]:focus-within:border-b-sherick-ink-muted";
62
+ readonly engaged: "bg-sherick-surface-high border-b-sherick-ink-muted";
63
+ readonly errorHover: "hover:bg-sherick-danger-soft/[0.55]";
64
+ readonly errorFocus: "focus:bg-sherick-danger-soft/[0.55]";
65
+ readonly errorEngaged: "bg-sherick-danger-soft/[0.55]";
66
+ readonly invalid: "data-[invalid]:bg-sherick-danger-soft/[0.55] data-[invalid]:border-b-sherick-danger";
67
+ readonly invalidHover: "data-[invalid]:hover:bg-sherick-danger-soft/[0.55] data-[invalid]:hover:border-b-sherick-danger";
68
+ readonly invalidEngaged: "data-[invalid]:bg-sherick-danger-soft/[0.55] data-[invalid]:border-b-sherick-danger";
69
+ readonly invalidFocusWithin: "[&&]:data-[invalid]:focus-within:bg-sherick-danger-soft/[0.55] [&&]:data-[invalid]:focus-within:border-b-sherick-danger";
70
70
  };
71
71
  };
72
72
  declare const stateLayerQuietComposite: string;
@@ -78,6 +78,7 @@ declare const stateLayer: {
78
78
  readonly track: string;
79
79
  readonly mark: string;
80
80
  readonly activeRow: "data-[highlighted]:before:opacity-[0.05]";
81
+ readonly fieldPart: string;
81
82
  };
82
83
  declare const hitArea = "relative after:pointer-events-auto after:absolute after:inset-[min(0px,calc((100%-2.75rem)/2))] after:content-['']";
83
84
  declare const material: {
@@ -85,8 +86,8 @@ declare const material: {
85
86
  readonly matteQuiet: "bg-sherick-surface/[0.42] text-sherick-ink";
86
87
  readonly matte: "bg-sherick-surface/[0.78] text-sherick-ink";
87
88
  readonly matteHigh: "bg-sherick-surface-high/[0.72] text-sherick-ink";
88
- readonly control: "bg-sherick-canvas/[0.7] text-sherick-ink placeholder:text-sherick-ink-muted";
89
- readonly controlError: "bg-sherick-canvas/[0.7] text-sherick-ink placeholder:text-sherick-danger";
89
+ readonly control: "bg-sherick-surface-high/[0.6] text-sherick-ink placeholder:text-sherick-ink-muted";
90
+ readonly controlError: "bg-sherick-danger-soft/[0.55] text-sherick-ink placeholder:text-sherick-danger";
90
91
  readonly handle: "bg-sherick-ink-muted text-sherick-canvas";
91
92
  readonly acrylic: "bg-sherick-surface-float/[var(--sui-glass-fill)] bg-[image:var(--sui-glass-gradient)] text-sherick-ink backdrop-blur-[var(--sui-glass-blur)] backdrop-saturate-[var(--sui-glass-saturation)] backdrop-brightness-[var(--sui-glass-brightness)]";
92
93
  readonly acrylicDense: "bg-sherick-surface-float/[var(--sui-glass-dense-fill)] bg-[image:var(--sui-glass-gradient-dense)] text-sherick-ink backdrop-blur-[var(--sui-glass-dense-blur)] backdrop-saturate-[var(--sui-glass-dense-saturation)] backdrop-brightness-[var(--sui-glass-dense-brightness)]";
@@ -102,7 +103,7 @@ declare const type: {
102
103
  };
103
104
  readonly supporting: "text-[0.8125rem] leading-5";
104
105
  readonly caption: "text-xs leading-4";
105
- readonly title: "text-[0.9375rem] leading-[1.375rem] font-semibold";
106
+ readonly title: "text-[0.9375rem] leading-[1.375rem] font-semibold tracking-[-0.011em]";
106
107
  readonly heading: "text-xl leading-7 font-semibold tracking-[-0.02em]";
107
108
  readonly numeric: "tabular-nums";
108
109
  };
@@ -111,7 +112,7 @@ declare const density: {
111
112
  readonly normal: string;
112
113
  readonly prominent: string;
113
114
  readonly target: "min-h-11 min-w-11";
114
- readonly part: "min-h-11 min-w-9";
115
+ readonly part: "min-h-11 min-w-8";
115
116
  };
116
117
  declare const iconSlot: {
117
118
  readonly caption: "inline-flex size-3.5 shrink-0 items-center justify-center [&>svg]:size-3.5";
@@ -145,6 +146,7 @@ declare const detail: {
145
146
  declare const list: {
146
147
  readonly sheet: "max-w-[var(--available-width)] max-h-[var(--available-height)] overflow-y-auto";
147
148
  readonly option: string;
149
+ readonly groupLabel: string;
148
150
  readonly command: string;
149
151
  };
150
152
  declare const disclosure: {
@@ -196,7 +198,9 @@ declare const tone: {
196
198
  };
197
199
  };
198
200
  declare const currentDestination = "bg-sherick-primary-soft text-sherick-ink font-medium";
199
- declare const selectableRowSurface = "has-[[data-checked]]:bg-sherick-primary-selected has-[[data-checked]]:text-sherick-ink has-[[data-checked]]:shadow-sherick-control";
201
+ declare const puck = "bg-sherick-puck";
202
+ declare const selectableRowSurface = "has-[[data-checked]]:bg-sherick-primary-soft has-[[data-checked]]:text-sherick-ink";
203
+ declare const selectableRowSupporting = "group-has-[[data-checked]]:text-sherick-ink";
200
204
  declare const selectable: {
201
205
  readonly surface: string;
202
206
  readonly markSurface: string;
@@ -239,6 +243,8 @@ declare const recipeAlphas: {
239
243
  readonly control: number;
240
244
  readonly hover: number;
241
245
  readonly engaged: number;
246
+ readonly mark: number;
247
+ readonly error: number;
242
248
  };
243
249
  };
244
250
  declare const fieldLayout = "flex min-w-0 w-full flex-col [overflow-wrap:anywhere]";
@@ -343,5 +349,5 @@ declare const motionPresenceToast: string;
343
349
  */
344
350
  declare const cn: (...inputs: ClassValue[]) => string;
345
351
 
346
- export { cn, currentDestination, density, detail, disclosure, edge, edgeTone, elevation, fieldLayout, fieldMessage, focusRing, focusRingDrag, focusRingHeld, focusRingInset, focusRingWithin, groupFocusRing, hitArea, iconSlot, list, material, matteInset, mediaCanvas, motionActivityIndeterminate, motionActivityPulse, motionActivitySpin, motionArrive, motionDirect, motionDisclose, motionFeedback, motionInkPress, motionOrient, motionPresenceAnchored, motionPresenceModal, motionPresenceScrim, motionPresenceSheet, motionPresenceToast, motionPresenceTooltip, motionRelocate, motionRelocateLong, motionRim, motionRowLayer, motionStateLayer, motionTactile, motionTactileField, motionTactileWide, overlay, parentFocusRingInset, recessedTop, recipeAlphas, rim, selectable, selectableRowSurface, shape, stacking, state, stateLayer, stateLayerQuietComposite, text, tone, type };
352
+ export { cn, currentDestination, density, detail, disclosure, edge, edgeTone, elevation, fieldLayout, fieldMessage, focusRing, focusRingDrag, focusRingHeld, focusRingInset, focusRingWithin, groupFocusRing, hitArea, iconSlot, list, material, matteInset, mediaCanvas, motionActivityIndeterminate, motionActivityPulse, motionActivitySpin, motionArrive, motionDirect, motionDisclose, motionFeedback, motionInkPress, motionOrient, motionPresenceAnchored, motionPresenceModal, motionPresenceScrim, motionPresenceSheet, motionPresenceToast, motionPresenceTooltip, motionRelocate, motionRelocateLong, motionRim, motionRowLayer, motionStateLayer, motionTactile, motionTactileField, motionTactileWide, overlay, parentFocusRingInset, puck, recessedTop, recipeAlphas, rim, selectable, selectableRowSupporting, selectableRowSurface, shape, stacking, state, stateLayer, stateLayerQuietComposite, text, tone, type };
347
353
  export type { MotionIntent };
@@ -1,9 +1,10 @@
1
1
  import { Accordion as Accordion$1 } from '@base-ui/react/accordion';
2
2
  import * as React from 'react';
3
- import React__default, { ReactNode, ButtonHTMLAttributes, ImgHTMLAttributes, HTMLAttributes, ComponentPropsWithoutRef, AnchorHTMLAttributes, ComponentProps, Ref, ReactElement, InputHTMLAttributes, ForwardRefExoticComponent, RefAttributes, MouseEventHandler, ComponentPropsWithRef, TextareaHTMLAttributes } from 'react';
3
+ import React__default, { ReactNode, ButtonHTMLAttributes, ImgHTMLAttributes, HTMLAttributes, ComponentPropsWithoutRef, AnchorHTMLAttributes, ComponentProps, Ref, ClipboardEvent, ReactElement, InputHTMLAttributes, ForwardRefExoticComponent, RefAttributes, MouseEventHandler, ComponentPropsWithRef, TextareaHTMLAttributes } from 'react';
4
4
  import { Collapsible as Collapsible$1 } from '@base-ui/react/collapsible';
5
5
  import { AlertDialog as AlertDialog$1 } from '@base-ui/react/alert-dialog';
6
6
  import { Checkbox as Checkbox$1 } from '@base-ui/react/checkbox';
7
+ import { CheckboxGroup as CheckboxGroup$1 } from '@base-ui/react/checkbox-group';
7
8
  import { Toggle } from '@base-ui/react/toggle';
8
9
  import { ToggleGroup as ToggleGroup$1 } from '@base-ui/react/toggle-group';
9
10
  import { Combobox as Combobox$1 } from '@base-ui/react/combobox';
@@ -12,6 +13,7 @@ import { Dialog as Dialog$1 } from '@base-ui/react/dialog';
12
13
  import { Popover as Popover$1 } from '@base-ui/react/popover';
13
14
  import { Select as Select$1 } from '@base-ui/react/select';
14
15
  import { Field as Field$1 } from '@base-ui/react/field';
16
+ import { Form as Form$1 } from '@base-ui/react/form';
15
17
  import { Input as Input$1 } from '@base-ui/react/input';
16
18
  import { Menu as Menu$1 } from '@base-ui/react/menu';
17
19
  import { NumberField as NumberField$1 } from '@base-ui/react/number-field';
@@ -324,6 +326,55 @@ interface CheckboxProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "v
324
326
  */
325
327
  declare const Checkbox: React__default.ForwardRefExoticComponent<CheckboxProps & React__default.RefAttributes<HTMLButtonElement>>;
326
328
 
329
+ type ChoiceAppearance = "default" | "surface";
330
+
331
+ interface CheckboxGroupOption {
332
+ value: string;
333
+ label: ReactNode;
334
+ /** Supporting copy beneath the label, such as the domains a casino answers on. */
335
+ description?: ReactNode;
336
+ disabled?: boolean;
337
+ }
338
+ type CheckboxGroupChangeDetails = Parameters<NonNullable<CheckboxGroup$1.Props["onValueChange"]>>[1];
339
+ interface CheckboxGroupProps extends Omit<ComponentProps<"div">, "onChange" | "defaultValue" | "children"> {
340
+ options: CheckboxGroupOption[];
341
+ /** Gives each choice its own selectable surface. The default keeps the compact, unfilled rows. */
342
+ appearance?: ChoiceAppearance;
343
+ /** The group's own label. Base names the group from it. */
344
+ label?: ReactNode;
345
+ /** Supporting copy beneath the group. */
346
+ description?: ReactNode;
347
+ /**
348
+ * The message shown while the group is invalid. Its presence is what makes the group invalid; omit
349
+ * it and the group shows what Base reports, including an error a `Form` returns for its `name`.
350
+ */
351
+ error?: ReactNode;
352
+ /** The ticked options' values. */
353
+ value?: string[];
354
+ defaultValue?: string[];
355
+ /** Base's own change callback, event details included. */
356
+ onValueChange?: (value: string[], eventDetails: CheckboxGroupChangeDetails) => void;
357
+ /** Identifies the group when a form is submitted: one entry per ticked option. */
358
+ name?: string;
359
+ /**
360
+ * At least one option must be ticked. It marks the label and is checked when a `Form` validates;
361
+ * the message is `requiredMessage`.
362
+ */
363
+ required?: boolean;
364
+ /** The message a required group shows when nothing is ticked. */
365
+ requiredMessage?: string;
366
+ disabled?: boolean;
367
+ readOnly?: boolean;
368
+ /** Styles the labelled group. */
369
+ className?: string;
370
+ }
371
+ /**
372
+ * Any number of choices out of a list — the options-API sibling of `RadioGroup`, with the same rows,
373
+ * the same opt-in `surface` row and the same labelled column. Base UI owns the value, the group
374
+ * semantics and the form participation; Sherick UI owns the rows and the marks.
375
+ */
376
+ declare const CheckboxGroup: React__default.ForwardRefExoticComponent<Omit<CheckboxGroupProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
377
+
327
378
  /** The parts every chip has, whichever of its two forms it takes. */
328
379
  interface ChipAnatomy {
329
380
  children: ReactNode;
@@ -402,23 +453,35 @@ interface ChipGroupProps extends Omit<ToggleGroup$1.Props<string>, "multiple" |
402
453
  */
403
454
  declare const ChipGroup: React__default.ForwardRefExoticComponent<Omit<ChipGroupProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
404
455
 
456
+ interface OptionGroup<Option> {
457
+ /** The heading the group is filed under. The primitive names the group from it. */
458
+ label: string;
459
+ options: Option[];
460
+ }
461
+
405
462
  interface ComboboxOption {
406
463
  label: string;
407
464
  value: string;
408
465
  disabled?: boolean;
409
466
  }
467
+ /** Options filed under one heading, such as channels under their category. */
468
+ type ComboboxOptionGroup = OptionGroup<ComboboxOption>;
410
469
  type ComboboxRootProps = Combobox$1.Root.Props<ComboboxOption>;
411
470
  type ComboboxChangeDetails = Parameters<NonNullable<ComboboxRootProps["onValueChange"]>>[1];
412
- interface ComboboxProps {
413
- options: ComboboxOption[];
414
- /** The selected option's value, or `null` for no selection. */
415
- value?: string | null;
416
- defaultValue?: string | null;
471
+ /**
472
+ * A change Base did not make: several entries pasted at once into a creatable combobox. It carries
473
+ * the paste event itself, and nothing to cancel — the entries are added in one step.
474
+ */
475
+ interface ComboboxPasteDetails {
476
+ reason: "input-paste";
477
+ event: ClipboardEvent<HTMLInputElement>["nativeEvent"];
478
+ }
479
+ interface ComboboxCommonProps {
417
480
  /**
418
- * The selected option's own `value`, so two equal options compare equal even when a caller
419
- * rebuilds its options array. Base's event details are passed through unchanged.
481
+ * The options, in the order they read. Any of them may be filed under a heading by passing a group
482
+ * (`{ label, options }`) in its place; an option outside every group is listed where it stands.
420
483
  */
421
- onValueChange?: (value: string | null, eventDetails: ComboboxChangeDetails) => void;
484
+ options: Array<ComboboxOption | ComboboxOptionGroup>;
422
485
  placeholder?: string;
423
486
  /** Shown in place of the list when the query matches no option. */
424
487
  emptyMessage?: ReactNode;
@@ -447,12 +510,48 @@ interface ComboboxProps {
447
510
  readOnly?: boolean;
448
511
  disabled?: boolean;
449
512
  }
513
+ interface ComboboxSingleProps extends ComboboxCommonProps {
514
+ multiple?: false;
515
+ /** The selected option's value, or `null` for no selection. */
516
+ value?: string | null;
517
+ defaultValue?: string | null;
518
+ /**
519
+ * The selected option's own `value`, so two equal options compare equal even when a caller
520
+ * rebuilds its options array. Base's event details are passed through unchanged.
521
+ */
522
+ onValueChange?: (value: string | null, eventDetails: ComboboxChangeDetails) => void;
523
+ creatable?: never;
524
+ createLabel?: never;
525
+ chipsLabel?: never;
526
+ }
527
+ interface ComboboxMultipleProps extends ComboboxCommonProps {
528
+ /** Holds any number of options, each shown as a removable chip inside the field. */
529
+ multiple: true;
530
+ /** The selected options' values, in the order they were chosen. */
531
+ value?: string[];
532
+ defaultValue?: string[];
533
+ /**
534
+ * The selected options' own values. Base's event details are passed through unchanged; a
535
+ * multi-line paste into a creatable field reports `{ reason: "input-paste" }` instead.
536
+ */
537
+ onValueChange?: (value: string[], eventDetails: ComboboxChangeDetails | ComboboxPasteDetails) => void;
538
+ /**
539
+ * Accepts entries that are not among the options: the typed text is offered as an "Add" row, and
540
+ * pasting several lines adds one entry per line. A created entry's value is its own text.
541
+ */
542
+ creatable?: boolean;
543
+ /** The "Add" row's copy for the current query. */
544
+ createLabel?: (query: string) => ReactNode;
545
+ /** The accessible name of the chip row. */
546
+ chipsLabel?: string;
547
+ }
548
+ type ComboboxProps = ComboboxSingleProps | ComboboxMultipleProps;
450
549
  /**
451
- * A text field that filters a list of options and selects one of them. It is the searchable
452
- * sibling of `Select`: the same option shape, the same value contract and the same box, with an
453
- * input instead of a trigger. Base UI owns filtering, the listbox semantics, keyboard
454
- * interaction, the anchored popup and the hidden form input; Sherick UI owns the field, the row
455
- * treatment and the tone of the selected option.
550
+ * A text field that filters a list of options and selects one of them, or several. It is the
551
+ * searchable sibling of `Select`: the same option shape, the same value contract and the same box,
552
+ * with an input instead of a trigger. Base UI owns filtering, the listbox semantics, keyboard
553
+ * interaction, chip navigation and removal, the anchored popup and the hidden form inputs; Sherick UI
554
+ * owns the field, the row treatment, the chips and the tone of the selected option.
456
555
  *
457
556
  * Filtering is Base's and it is local — an application that needs remote results owns the
458
557
  * fetching, the debounce and the loading state around this control.
@@ -772,10 +871,16 @@ interface SelectOption {
772
871
  value: string;
773
872
  disabled?: boolean;
774
873
  }
874
+ /** Options filed under one heading, such as channels under their category. */
875
+ type SelectOptionGroup = OptionGroup<SelectOption>;
775
876
  type SelectRootProps = Select$1.Root.Props<string>;
776
877
  type SelectChangeDetails = Parameters<NonNullable<SelectRootProps["onValueChange"]>>[1];
777
878
  interface SelectProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "value" | "defaultValue"> {
778
- options: SelectOption[];
879
+ /**
880
+ * The options, in the order they read. Any of them may be filed under a heading by passing a group
881
+ * (`{ label, options }`) in its place; an option outside every group is listed where it stands.
882
+ */
883
+ options: Array<SelectOption | SelectOptionGroup>;
779
884
  variant?: Variant;
780
885
  value?: string | null;
781
886
  defaultValue?: string | null;
@@ -882,6 +987,32 @@ interface FileUploadProps extends Omit<HTMLAttributes<HTMLDivElement>, "children
882
987
  }
883
988
  declare const FileUpload: React__default.ForwardRefExoticComponent<FileUploadProps & React__default.RefAttributes<HTMLInputElement>>;
884
989
 
990
+ /** Messages keyed by each field's `name`: one message, or several. */
991
+ type FormErrors = Record<string, string | string[]>;
992
+ interface FormProps extends Omit<ComponentProps<typeof Form$1>, "className" | "render" | "errors" | "children" | "ref"> {
993
+ /**
994
+ * Errors returned from outside the form — typically a server's answer to a submission — keyed by
995
+ * each field's `name`. Each field shows its own message, the form moves focus to the first field
996
+ * that has one, and a field's entry clears as soon as its value changes.
997
+ */
998
+ errors?: FormErrors;
999
+ /** Styles the form's own column. The fields inside it style themselves. */
1000
+ className?: string;
1001
+ children?: ReactNode;
1002
+ }
1003
+ /**
1004
+ * A form whose fields report what is wrong where it is wrong. On submit, Base UI validates every
1005
+ * field it holds, keeps the submission from leaving while any is invalid and moves focus to the
1006
+ * first invalid field in document order, so a submit button at the bottom of a long form never
1007
+ * answers with nothing. The same happens when `errors` arrive after a submission.
1008
+ *
1009
+ * Every Sherick field takes part through its `name`: `Input`, `Textarea`, `RadioGroup` and
1010
+ * `CheckboxGroup` carry their own; `Select`, `Combobox`, `NumberField`, `Checkbox`, `Switch` and
1011
+ * `Slider` take part inside a `Field` given the `name`. Base UI owns validation, the errors map and
1012
+ * the focus move; Sherick UI owns only the column the fields stand in.
1013
+ */
1014
+ declare const Form: React__default.ForwardRefExoticComponent<FormProps & React__default.RefAttributes<HTMLFormElement>>;
1015
+
885
1016
  type IconButtonAppearance = "tonal" | "ghost" | "acrylic";
886
1017
  interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
887
1018
  variant?: Variant;
@@ -891,7 +1022,7 @@ interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
891
1022
  }
892
1023
  declare const IconButton: React__default.ForwardRefExoticComponent<IconButtonProps & React__default.RefAttributes<HTMLButtonElement>>;
893
1024
 
894
- interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
1025
+ interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "prefix"> {
895
1026
  label?: ReactNode;
896
1027
  description?: ReactNode;
897
1028
  error?: boolean;
@@ -899,6 +1030,13 @@ interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
899
1030
  inputClassName?: string;
900
1031
  /** Base's value-change callback, event details included. */
901
1032
  onValueChange?: Input$1.Props["onValueChange"];
1033
+ /**
1034
+ * Text or a mark at the start of the field, such as `€` or `https://`. It is presentation only and
1035
+ * hidden from assistive technology, so the label must carry whatever the reader needs from it.
1036
+ */
1037
+ prefix?: ReactNode;
1038
+ /** Text or a mark at the end of the field, such as `tickets` or `.discord.gg`. Presentation only. */
1039
+ suffix?: ReactNode;
902
1040
  }
903
1041
  declare const Input: React__default.ForwardRefExoticComponent<InputProps & React__default.RefAttributes<HTMLInputElement>>;
904
1042
 
@@ -1084,7 +1222,7 @@ interface NavItemProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
1084
1222
  }
1085
1223
  declare const NavItem: ({ children, icon, className, href, active, ...props }: NavItemProps) => React__default.JSX.Element;
1086
1224
 
1087
- interface NumberFieldProps extends Omit<ComponentProps<"input">, "value" | "defaultValue" | "onChange" | "min" | "max" | "step" | "type" | "size" | "ref"> {
1225
+ interface NumberFieldProps extends Omit<ComponentProps<"input">, "value" | "defaultValue" | "onChange" | "min" | "max" | "step" | "type" | "size" | "ref" | "prefix"> {
1088
1226
  value?: number | null;
1089
1227
  defaultValue?: number;
1090
1228
  onValueChange?: NumberField$1.Root.Props["onValueChange"];
@@ -1093,6 +1231,23 @@ interface NumberFieldProps extends Omit<ComponentProps<"input">, "value" | "defa
1093
1231
  min?: number;
1094
1232
  max?: number;
1095
1233
  step?: number;
1234
+ /**
1235
+ * How the value is written: Base's `Intl.NumberFormatOptions`, passed through unchanged —
1236
+ * `{ style: "currency", currency: "EUR" }`, `{ minimumFractionDigits: 2 }`, `{ style: "percent" }`.
1237
+ */
1238
+ format?: NumberField$1.Root.Props["format"];
1239
+ /** The locale the value is parsed and written in. Defaults to the runtime's own. */
1240
+ locale?: NumberField$1.Root.Props["locale"];
1241
+ /**
1242
+ * A unit written before the value, such as `€`. It is presentation only and hidden from assistive
1243
+ * technology, so the field's label must name the unit as well ("Price (€)").
1244
+ */
1245
+ prefix?: ReactNode;
1246
+ /**
1247
+ * A unit written after the value, such as `×` or `tickets`. Presentation only, like `prefix`:
1248
+ * name the unit in the label as well.
1249
+ */
1250
+ suffix?: ReactNode;
1096
1251
  disabled?: boolean;
1097
1252
  readOnly?: boolean;
1098
1253
  required?: boolean;
@@ -1209,15 +1364,24 @@ declare const Progress: React__default.ForwardRefExoticComponent<Omit<ProgressPr
1209
1364
  interface RadioGroupOption {
1210
1365
  value: string;
1211
1366
  label: ReactNode;
1367
+ /** Supporting copy beneath the label. It describes the choice rather than naming it. */
1368
+ description?: ReactNode;
1212
1369
  disabled?: boolean;
1213
1370
  }
1214
1371
  interface RadioGroupProps extends Omit<ComponentProps<"div">, "onChange" | "defaultValue" | "children"> {
1215
1372
  options: RadioGroupOption[];
1216
1373
  /** Gives each choice its own selectable surface. The default keeps the compact, unfilled rows. */
1217
- appearance?: "default" | "surface";
1374
+ appearance?: ChoiceAppearance;
1218
1375
  /** The group's own label. Naming the group is the group's job, not a field's: an
1219
1376
  * enclosing `Field` names one control, while every option here is its own control. */
1220
1377
  label?: ReactNode;
1378
+ /** Supporting copy beneath the group. */
1379
+ description?: ReactNode;
1380
+ /**
1381
+ * The message shown while the group is invalid. Its presence is what makes the group invalid; omit
1382
+ * it and the group shows what Base reports, including an error a `Form` returns for its `name`.
1383
+ */
1384
+ error?: ReactNode;
1221
1385
  value?: string;
1222
1386
  defaultValue?: string;
1223
1387
  onValueChange?: RadioGroup$1.Props<string>["onValueChange"];
@@ -1726,5 +1890,5 @@ interface DirectionProviderProps {
1726
1890
  /** Declares writing direction to the interaction and positioning primitives, including portals. */
1727
1891
  declare const DirectionProvider: ({ direction, children }: DirectionProviderProps) => React__default.JSX.Element;
1728
1892
 
1729
- export { Accordion, Alert, AlertDialog, Avatar, Badge, Breadcrumb, Button, Calendar, Card, Checkbox, Chip, ChipGroup, Collapsible, Combobox, Command, CommandPalette, DatePicker, DateRangePicker, DateTimePicker, Dialog, DirectionProvider, Divider, Drawer, Field, FileUpload, IconButton, Input, Media, Menu, NavGroup, NavItem, NumberField, Pagination, Popover, Progress, RadioGroup, Search, SegmentedControl, Select, Skeleton, Slider, Spinner, Stepper, Switch, Table, Tabs, Textarea, ToastProvider, ToastViewport, ToggleGroup, Tooltip, TreeView, createToastManager, useToast };
1730
- export type { AccordionHeadingLevel, AccordionItemProps, AccordionPanelProps, AccordionProps, AccordionTriggerProps, AlertDialogProps, AlertProps, AvatarProps, BadgeProps, BreadcrumbItem, BreadcrumbProps, ButtonAppearance, ButtonProps, ButtonSize, CalendarDate, CalendarDateTime, CalendarLabels, CalendarProps, CardProps, CheckboxProps, ChipGroupProps, ChipProps, CollapsiblePanelProps, CollapsibleProps, CollapsibleTriggerProps, ComboboxOption, ComboboxProps, CommandItem, CommandPaletteProps, CommandProps, DatePickerProps, DateRange, DateRangePickerProps, DateTimePickerLabels, DateTimePickerProps, DialogContentProps, DialogDescriptionProps, DialogFooterProps, DialogHeaderProps, DialogProps, DirectionProviderProps, DividerProps, DividerWeight, DrawerContentProps, DrawerDescriptionProps, DrawerFooterProps, DrawerHeaderProps, DrawerProps, DrawerSide, DrawerTriggerProps, FieldProps, FileRejection, FileUploadProps, IconButtonAppearance, IconButtonProps, InputProps, MediaImageProps, MediaVideoProps, MenuContentProps, MenuItemProps, MenuProps, MenuSeparatorProps, MenuTriggerProps, NavGroupHeadingLevel, NavGroupItem, NavGroupProps, NavItemProps, NumberFieldProps, OverlayAlign, OverlaySide, PaginationProps, PopoverContentProps, PopoverProps, PopoverTriggerProps, ProgressProps, RadioGroupOption, RadioGroupProps, SearchProps, SegmentedControlOption, SegmentedControlProps, SelectOption, SelectProps, SkeletonProps, SliderProps, SpinnerProps, StepperItem, StepperProps, SwitchProps, Tab, TableColumn, TableProps, TabsProps, TextareaProps, ToastActionOptions, ToastManager, ToastOptions, ToastPosition, ToastPromiseOptions, ToastProviderProps, ToastType, ToastUpdateOptions, ToastViewportProps, ToggleGroupItemProps, ToggleGroupProps, TooltipProps, TreeViewItem, TreeViewProps, Variant };
1893
+ export { Accordion, Alert, AlertDialog, Avatar, Badge, Breadcrumb, Button, Calendar, Card, Checkbox, CheckboxGroup, Chip, ChipGroup, Collapsible, Combobox, Command, CommandPalette, DatePicker, DateRangePicker, DateTimePicker, Dialog, DirectionProvider, Divider, Drawer, Field, FileUpload, Form, IconButton, Input, Media, Menu, NavGroup, NavItem, NumberField, Pagination, Popover, Progress, RadioGroup, Search, SegmentedControl, Select, Skeleton, Slider, Spinner, Stepper, Switch, Table, Tabs, Textarea, ToastProvider, ToastViewport, ToggleGroup, Tooltip, TreeView, createToastManager, useToast };
1894
+ export type { AccordionHeadingLevel, AccordionItemProps, AccordionPanelProps, AccordionProps, AccordionTriggerProps, AlertDialogProps, AlertProps, AvatarProps, BadgeProps, BreadcrumbItem, BreadcrumbProps, ButtonAppearance, ButtonProps, ButtonSize, CalendarDate, CalendarDateTime, CalendarLabels, CalendarProps, CardProps, CheckboxGroupOption, CheckboxGroupProps, CheckboxProps, ChipGroupProps, ChipProps, CollapsiblePanelProps, CollapsibleProps, CollapsibleTriggerProps, ComboboxMultipleProps, ComboboxOption, ComboboxOptionGroup, ComboboxPasteDetails, ComboboxProps, ComboboxSingleProps, CommandItem, CommandPaletteProps, CommandProps, DatePickerProps, DateRange, DateRangePickerProps, DateTimePickerLabels, DateTimePickerProps, DialogContentProps, DialogDescriptionProps, DialogFooterProps, DialogHeaderProps, DialogProps, DirectionProviderProps, DividerProps, DividerWeight, DrawerContentProps, DrawerDescriptionProps, DrawerFooterProps, DrawerHeaderProps, DrawerProps, DrawerSide, DrawerTriggerProps, FieldProps, FileRejection, FileUploadProps, FormErrors, FormProps, IconButtonAppearance, IconButtonProps, InputProps, MediaImageProps, MediaVideoProps, MenuContentProps, MenuItemProps, MenuProps, MenuSeparatorProps, MenuTriggerProps, NavGroupHeadingLevel, NavGroupItem, NavGroupProps, NavItemProps, NumberFieldProps, OverlayAlign, OverlaySide, PaginationProps, PopoverContentProps, PopoverProps, PopoverTriggerProps, ProgressProps, RadioGroupOption, RadioGroupProps, SearchProps, SegmentedControlOption, SegmentedControlProps, SelectOption, SelectOptionGroup, SelectProps, SkeletonProps, SliderProps, SpinnerProps, StepperItem, StepperProps, SwitchProps, Tab, TableColumn, TableProps, TabsProps, TextareaProps, ToastActionOptions, ToastManager, ToastOptions, ToastPosition, ToastPromiseOptions, ToastProviderProps, ToastType, ToastUpdateOptions, ToastViewportProps, ToggleGroupItemProps, ToggleGroupProps, TooltipProps, TreeViewItem, TreeViewProps, Variant };