@platned/ui 0.9.7 → 0.10.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/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { ButtonHTMLAttributes, ReactNode, InputHTMLAttributes, HTMLAttributes, LabelHTMLAttributes, TextareaHTMLAttributes, SelectHTMLAttributes, ChangeEventHandler, RefObject, ReactElement, Ref, ComponentType, AnchorHTMLAttributes, RefAttributes, Component, ErrorInfo } from 'react';
2
+ import { ButtonHTMLAttributes, ReactNode, InputHTMLAttributes, HTMLAttributes, LabelHTMLAttributes, TextareaHTMLAttributes, SelectHTMLAttributes, ChangeEventHandler, RefObject, FormHTMLAttributes, ReactElement, Ref, ComponentType, AnchorHTMLAttributes, RefAttributes, Component, ErrorInfo } from 'react';
3
3
  import { ClassValue } from 'clsx';
4
4
  import { P as ProgressBarTone } from './data-table-JX-vnL0F.js';
5
5
  export { C as ColumnMobileRole, a as CreateSelectColumnOptions, D as DataTable, b as DataTableAlign, c as DataTableColumnAlign, d as DataTableColumnHeader, e as DataTableColumnHeaderProps, f as DataTableDensity, g as DataTableManual, h as DataTablePagination, i as DataTablePaginationProps, j as DataTableProps, k as DataTableRowLinkProps, l as DataTableSearchOptions, m as DataTableState, n as DataTableViewOptions, o as DataTableViewOptionsProps, p as ProgressBar, q as ProgressBarProps, r as ProgressBarSize, S as SELECT_COLUMN_ID, T as Table, s as TableBody, t as TableCaption, u as TableCaptionProps, v as TableCell, w as TableCellBadge, x as TableCellBadgeProps, y as TableCellLeadText, z as TableCellLeadTextProps, A as TableCellProgress, B as TableCellProgressProps, E as TableCellProps, F as TableCellSize, G as TableCellText, H as TableCellTextProps, I as TableDensity, J as TableFooter, K as TableHead, L as TableHeadProps, M as TableHeader, N as TableProps, O as TableRow, Q as TableRowProps, R as TableRowTone, U as TableSortDirection, V as createSelectColumn } from './data-table-JX-vnL0F.js';
@@ -107,23 +107,24 @@ declare function AvatarBlock({ children, title, description, className }: Avatar
107
107
 
108
108
  type InputSize = 'lg' | 'md' | 'sm';
109
109
  interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
110
- label?: string;
111
- description?: string;
112
- /** Red border + message shown below the input. Also sets `aria-invalid`. */
113
- error?: string;
114
- /** Neutral helper text shown below the input (hidden when error is set) */
115
- hint?: string;
116
110
  size?: InputSize;
111
+ /** Red border and `aria-invalid`. Inside a `Field`, a `FieldError` with a message sets this. */
112
+ invalid?: boolean;
117
113
  leadingIcon?: ReactNode;
118
114
  trailingIcon?: ReactNode;
119
115
  /** Interactive trailing slot (e.g. a show/hide password button) — unlike
120
116
  * `trailingIcon` it receives pointer events. */
121
117
  trailingAction?: ReactNode;
122
118
  }
119
+ /**
120
+ * A text input with optional icons. Bare from 0.10.0: it has no label, hint or error of its
121
+ * own. Put it in a `Field` with a `FieldLabel` (and `FieldHint` / `FieldError`), or give it
122
+ * an `aria-label`. `className` sets the layout of the whole control, icons included.
123
+ */
123
124
  declare const Input: react.ForwardRefExoticComponent<InputProps & react.RefAttributes<HTMLInputElement>>;
124
125
  /**
125
- * The bare `<input>` with the field wiring applied and no label/message chrome — for
126
- * `InputGroup` and any composition that supplies its own `Field`.
126
+ * The plain `<input>` element with the field wiring and no icon slots — for `InputGroup` and
127
+ * compositions that place their own adornments. `Input` is built on it.
127
128
  */
128
129
  interface InputControlProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
129
130
  size?: InputSize;
@@ -167,6 +168,7 @@ interface FieldContextValue {
167
168
  descriptionId: string;
168
169
  errorId: string;
169
170
  hintId: string;
171
+ /** Whether a `FieldDescription` / `FieldError` / `FieldHint` is showing. The parts report it. */
170
172
  hasDescription: boolean;
171
173
  hasError: boolean;
172
174
  hasHint: boolean;
@@ -174,7 +176,10 @@ interface FieldContextValue {
174
176
  required: boolean;
175
177
  disabled: boolean;
176
178
  size: InputSize;
179
+ /** Used by the message parts to tell the field they are showing. Returns the unregister. */
180
+ register: (part: FieldPart) => () => void;
177
181
  }
182
+ type FieldPart = 'description' | 'error' | 'hint';
178
183
  declare function useFieldContext(): FieldContextValue | null;
179
184
  /**
180
185
  * Props for the control itself. Spread onto the `<input>`/`<select>`/`<textarea>`.
@@ -195,34 +200,54 @@ interface FieldProps extends HTMLAttributes<HTMLDivElement> {
195
200
  children: ReactNode;
196
201
  /** Supply to control the id yourself; otherwise one is generated. */
197
202
  id?: string;
203
+ /** Default: the enclosing container's control size, else `md`. */
198
204
  size?: InputSize;
205
+ /** Marks the control invalid without a message. A `FieldError` with a message does this by itself. */
199
206
  invalid?: boolean;
200
207
  required?: boolean;
201
208
  disabled?: boolean;
202
209
  /** `horizontal` puts the label beside the control — for switches and checkboxes. */
203
210
  orientation?: FieldOrientation;
204
- /** Set when a `FieldDescription` is rendered. Inferred by the wrapped controls. */
205
- hasDescription?: boolean;
206
- hasError?: boolean;
207
- hasHint?: boolean;
208
211
  }
209
- declare function Field({ children, id, size, invalid, required, disabled, orientation, hasDescription, hasError, hasHint, className, ...rest }: FieldProps): react.JSX.Element;
212
+ /**
213
+ * One form field: a label, a control and its messages, wired for assistive tech.
214
+ *
215
+ * From 0.10.0 this is the only place a field's text lives. The controls (`Input`, `Textarea`,
216
+ * `Select`, `NativeSelect`, `TagInput`, `DatePicker`) are bare, the way shadcn/ui, Chakra and
217
+ * Fluent split them, and the form decides which message to show:
218
+ *
219
+ * ```tsx
220
+ * <Field required>
221
+ * <FieldLabel>Email</FieldLabel>
222
+ * <Input type="email" value={email} onChange={…} />
223
+ * <FieldHint>We send the invite here.</FieldHint>
224
+ * <FieldError>{error}</FieldError>
225
+ * </Field>
226
+ * ```
227
+ *
228
+ * The parts report themselves, so there are no flags to keep in step: a `FieldError` with a
229
+ * message marks the control `aria-invalid` and describes it, an empty one renders nothing, and
230
+ * a `FieldHint` steps aside while an error shows.
231
+ */
232
+ declare function Field({ children, id, size: sizeProp, invalid, required, disabled, orientation, className, ...rest }: FieldProps): react.JSX.Element;
210
233
  interface FieldLabelProps extends LabelHTMLAttributes<HTMLLabelElement> {
211
234
  children: ReactNode;
212
235
  }
213
236
  declare function FieldLabel({ children, className, htmlFor, ...rest }: FieldLabelProps): react.JSX.Element;
214
237
  interface FieldTextProps extends HTMLAttributes<HTMLParagraphElement> {
215
- children: ReactNode;
238
+ children?: ReactNode;
216
239
  }
217
- /** Persistent guidance, shown above the control and announced with it. */
218
- declare function FieldDescription({ children, className, ...rest }: FieldTextProps): react.JSX.Element;
240
+ /** Persistent guidance, shown above the control and announced with it. Renders nothing when empty. */
241
+ declare function FieldDescription({ children, className, ...rest }: FieldTextProps): react.JSX.Element | null;
219
242
  /**
220
- * Validation message. `role="alert"` because an error that appears after submit —
221
- * asynchronously, without focus moving — is otherwise never announced at all.
243
+ * Validation message. Renders nothing when empty, so `<FieldError>{error}</FieldError>` can
244
+ * always be rendered; with a message it marks the control invalid and describes it.
245
+ * `role="alert"` because an error that appears after submit — asynchronously, without focus
246
+ * moving — is otherwise never announced at all.
222
247
  */
223
- declare function FieldError({ children, className, ...rest }: FieldTextProps): react.JSX.Element;
224
- /** Neutral helper text. Suppressed while an error is showing, so the two never stack. */
225
- declare function FieldHint({ children, className, ...rest }: FieldTextProps): react.JSX.Element;
248
+ declare function FieldError({ children, className, ...rest }: FieldTextProps): react.JSX.Element | null;
249
+ /** Neutral helper text below the control. Hidden while a `FieldError` shows, so the two never stack. */
250
+ declare function FieldHint({ children, className, ...rest }: FieldTextProps): react.JSX.Element | null;
226
251
  interface FieldGroupProps extends HTMLAttributes<HTMLDivElement> {
227
252
  children: ReactNode;
228
253
  }
@@ -260,20 +285,19 @@ declare function ControlSizeProvider({ size, children }: ControlSizeProviderProp
260
285
  declare function useControlSize(explicit?: InputSize): InputSize;
261
286
 
262
287
  interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
263
- label?: string;
264
- description?: string;
265
- /** Red border + message shown below the control. Also sets `aria-invalid`. */
266
- error?: string;
267
- hint?: string;
268
- size?: InputSize;
269
- }
270
- declare const Textarea: react.ForwardRefExoticComponent<TextareaProps & react.RefAttributes<HTMLTextAreaElement>>;
271
- interface TextareaControlProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
272
288
  size?: InputSize;
289
+ /** Red border and `aria-invalid`. Inside a `Field`, a `FieldError` with a message sets this. */
273
290
  invalid?: boolean;
274
291
  }
275
- /** The bare `<textarea>` with field wiring, for compositions that supply their own `Field`. */
276
- declare const TextareaControl: react.ForwardRefExoticComponent<TextareaControlProps & react.RefAttributes<HTMLTextAreaElement>>;
292
+ /**
293
+ * A multi-line text input. Bare from 0.10.0: no label, hint or error of its own. Put it in a
294
+ * `Field` with a `FieldLabel` (and `FieldHint` / `FieldError`), or give it an `aria-label`.
295
+ */
296
+ declare const Textarea: react.ForwardRefExoticComponent<TextareaProps & react.RefAttributes<HTMLTextAreaElement>>;
297
+ /** @deprecated Since 0.10.0 `Textarea` is the bare control. Use `Textarea`. */
298
+ declare const TextareaControl: react.ForwardRefExoticComponent<TextareaProps & react.RefAttributes<HTMLTextAreaElement>>;
299
+ /** @deprecated Since 0.10.0. Use `TextareaProps`. */
300
+ type TextareaControlProps = TextareaProps;
277
301
 
278
302
  interface SelectOption {
279
303
  value: string;
@@ -284,7 +308,7 @@ interface SelectOptionGroup {
284
308
  label: string;
285
309
  options: SelectOption[];
286
310
  }
287
- interface SelectControlProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'value' | 'defaultValue' | 'onChange' | 'children' | 'type'> {
311
+ interface SelectProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'value' | 'defaultValue' | 'onChange' | 'children' | 'type'> {
288
312
  /** Flat options, or groups which render as a labelled `role="group"`. */
289
313
  options: (SelectOption | SelectOptionGroup)[];
290
314
  value?: string | null;
@@ -297,21 +321,11 @@ interface SelectControlProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement
297
321
  */
298
322
  name?: string;
299
323
  size?: InputSize;
324
+ /** Red border and `aria-invalid`. Inside a `Field`, a `FieldError` with a message sets this. */
300
325
  invalid?: boolean;
301
- placeholder?: string;
302
- }
303
- /**
304
- * The bare trigger and its listbox, with field wiring and no label/message chrome — for
305
- * `Select` and any composition that supplies its own `Field`.
306
- */
307
- declare const SelectControl: react.ForwardRefExoticComponent<SelectControlProps & react.RefAttributes<HTMLButtonElement>>;
308
- interface SelectProps extends SelectControlProps {
309
- label?: string;
310
- description?: string;
311
- /** Red border + message shown below the control. Also sets `aria-invalid`. */
312
- error?: string;
313
- hint?: string;
326
+ /** Blocks submit while empty (with `name`). Inside a `Field`, `Field required` sets this. */
314
327
  required?: boolean;
328
+ placeholder?: string;
315
329
  }
316
330
  /**
317
331
  * Single-select dropdown: a trigger and a portalled listbox.
@@ -337,10 +351,17 @@ interface SelectProps extends SelectControlProps {
337
351
  * every consumer's test suite.
338
352
  *
339
353
  * For a list long enough to need filtering, use `Combobox`.
354
+ *
355
+ * Bare from 0.10.0: no label, hint or error of its own. Put it in a `Field` with a
356
+ * `FieldLabel`, or give it an `aria-label`.
340
357
  */
341
358
  declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAttributes<HTMLButtonElement>>;
359
+ /** @deprecated Since 0.10.0 `Select` is the bare control. Use `Select`. */
360
+ declare const SelectControl: react.ForwardRefExoticComponent<SelectProps & react.RefAttributes<HTMLButtonElement>>;
361
+ /** @deprecated Since 0.10.0. Use `SelectProps`. */
362
+ type SelectControlProps = SelectProps;
342
363
 
343
- interface NativeSelectControlProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'size' | 'children'> {
364
+ interface NativeSelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'size' | 'children'> {
344
365
  /**
345
366
  * Flat options, or groups, which render as `<optgroup>`. The same types as `Select`, so
346
367
  * moving a field between the two is a rename. Pass `children` instead for hand-written
@@ -349,6 +370,7 @@ interface NativeSelectControlProps extends Omit<SelectHTMLAttributes<HTMLSelectE
349
370
  options?: (SelectOption | SelectOptionGroup)[];
350
371
  children?: ReactNode;
351
372
  size?: InputSize;
373
+ /** Red border and `aria-invalid`. Inside a `Field`, a `FieldError` with a message sets this. */
352
374
  invalid?: boolean;
353
375
  /**
354
376
  * A first, disabled `<option value="">`, shown in the muted placeholder colour while it is
@@ -359,20 +381,7 @@ interface NativeSelectControlProps extends Omit<SelectHTMLAttributes<HTMLSelectE
359
381
  placeholder?: string;
360
382
  }
361
383
  /**
362
- * The bare native `<select>` with field wiring and no label/message chrome, for `NativeSelect`
363
- * and any composition that supplies its own `Field`, e.g. a label with markup in it.
364
- */
365
- declare const NativeSelectControl: react.ForwardRefExoticComponent<NativeSelectControlProps & react.RefAttributes<HTMLSelectElement>>;
366
- interface NativeSelectProps extends NativeSelectControlProps {
367
- label?: string;
368
- description?: string;
369
- /** Red border + message shown below the control. Also sets `aria-invalid`. */
370
- error?: string;
371
- hint?: string;
372
- required?: boolean;
373
- }
374
- /**
375
- * A single-select field on the browser's own `<select>`, styled like `Select`.
384
+ * A single-select control on the browser's own `<select>`, styled like `Select`.
376
385
  *
377
386
  * Use it for form fields, and anywhere on a phone: the OS draws the picker (the iOS wheel, the
378
387
  * Android sheet), it is fast with long lists, and it submits and validates as any form control
@@ -382,16 +391,20 @@ interface NativeSelectProps extends NativeSelectControlProps {
382
391
  *
383
392
  * `onChange` is the native event (`event.target.value`), not `onValueChange`. The trade is
384
393
  * the one every native select makes: the open list can't be styled.
394
+ *
395
+ * Bare from 0.10.0: no label, hint or error of its own. Put it in a `Field` with a
396
+ * `FieldLabel`, or give it an `aria-label`.
385
397
  */
386
398
  declare const NativeSelect: react.ForwardRefExoticComponent<NativeSelectProps & react.RefAttributes<HTMLSelectElement>>;
399
+ /** @deprecated Since 0.10.0 `NativeSelect` is the bare control. Use `NativeSelect`. */
400
+ declare const NativeSelectControl: react.ForwardRefExoticComponent<NativeSelectProps & react.RefAttributes<HTMLSelectElement>>;
401
+ /** @deprecated Since 0.10.0. Use `NativeSelectProps`. */
402
+ type NativeSelectControlProps = NativeSelectProps;
387
403
 
388
404
  interface DatePickerProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'value' | 'defaultValue'> {
389
- label?: string;
390
- description?: string;
391
- /** Red border + message shown below the control. Also sets `aria-invalid`. */
392
- error?: string;
393
- hint?: string;
394
405
  size?: InputSize;
406
+ /** Red border and `aria-invalid`. Inside a `Field`, a `FieldError` with a message sets this. */
407
+ invalid?: boolean;
395
408
  /** The selected date as an ISO `YYYY-MM-DD` string, `''` for none. Controlled. */
396
409
  value?: string;
397
410
  /** Initial ISO date when uncontrolled. */
@@ -429,6 +442,8 @@ interface DatePickerProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 's
429
442
  * closes the popover and returns focus to the trigger; Escape closes it without a change.
430
443
  * - The month and year selects (`captionLayout="dropdown"`, the default) reach a far-away date
431
444
  * in two choices instead of a PageUp per month.
445
+ * - Bare from 0.10.0: no label, hint or error of its own. Put it in a `Field` with a
446
+ * `FieldLabel`, or give it an `aria-label`. The calendar dialog takes its name from either.
432
447
  * - A real, invisible `<input type="date">` keeps the old contract: it carries `name`, `value`,
433
448
  * `min`, `max` and `required` for forms and native validation, the forwarded ref points at
434
449
  * it, and `onChange` receives its genuine change event. When validation focuses it, focus is
@@ -718,11 +733,9 @@ type TagInputParseResult = {
718
733
  error: string;
719
734
  };
720
735
  interface TagInputProps {
721
- label?: string;
722
- hint?: string;
723
- /** An error from outside (e.g. the server). Takes precedence over a parse error. */
724
- error?: string;
725
736
  placeholder?: string;
737
+ /** Red border and `aria-invalid`. Inside a `Field`, a `FieldError` with a message sets this. */
738
+ invalid?: boolean;
726
739
  disabled?: boolean;
727
740
  required?: boolean;
728
741
  /** The committed chips, controlled. */
@@ -740,7 +753,13 @@ interface TagInputProps {
740
753
  maxTags?: number;
741
754
  /** Told whenever rejected text is sitting in the field, so a form can block saving. */
742
755
  onInvalidChange?: (invalid: boolean) => void;
743
- id?: string;
756
+ /**
757
+ * Why the text in the field was rejected (`parse`'s error, or the `maxTags` limit), and
758
+ * `null` once it is fixed or cleared. Show it in the `FieldError`: the control has no
759
+ * message of its own from 0.10.0.
760
+ */
761
+ onParseError?: (error: string | null) => void;
762
+ 'aria-label'?: string;
744
763
  className?: string;
745
764
  }
746
765
  /**
@@ -755,10 +774,10 @@ interface TagInputProps {
755
774
  * the last chip. Duplicates are ignored. A token `parse` rejects stays in the field with its error
756
775
  * rather than being dropped, so nothing the user typed silently disappears.
757
776
  *
758
- * Wired through `Field` like the other text fields: the label names the input, and the error or
759
- * hint describes it.
777
+ * Bare from 0.10.0, like the other text fields: no label, hint or error of its own. Put it in
778
+ * a `Field` with a `FieldLabel`, and show `onParseError`'s message in its `FieldError`.
760
779
  */
761
- declare function TagInput({ label, hint, error, required, disabled, id, className, ...rest }: TagInputProps): react.JSX.Element;
780
+ declare function TagInput(props: TagInputProps): react.JSX.Element;
762
781
 
763
782
  declare function FormCard({ children, className, }: {
764
783
  children: ReactNode;
@@ -783,6 +802,513 @@ interface FormCardFooterProps {
783
802
  }
784
803
  declare function FormCardFooter({ onSaveDraft, onBack, onContinue, continueLabel, continueIcon, backDisabled, continueDisabled, saveDraftDisabled, }: FormCardFooterProps): react.JSX.Element;
785
804
 
805
+ interface ComboboxOption<T = string> {
806
+ value: T;
807
+ label: string;
808
+ description?: string;
809
+ disabled?: boolean;
810
+ /** Optional group heading. Options sharing a group are rendered together. */
811
+ group?: string;
812
+ /**
813
+ * A leading glyph, e.g. a flag or an avatar. It is shown before the option's label in the
814
+ * list and, for the selected option, inside the field. Decorative: it is `aria-hidden`, so
815
+ * the label must say everything. New in 0.9.0.
816
+ */
817
+ icon?: ReactNode;
818
+ }
819
+ interface ComboboxProps<T extends string = string> {
820
+ options: ComboboxOption<T>[];
821
+ value?: T | null;
822
+ defaultValue?: T | null;
823
+ onValueChange?: (value: T | null) => void;
824
+ /** Accessible name. Required unless the combobox is inside a `Field` with a label. */
825
+ label?: string;
826
+ placeholder?: string;
827
+ size?: InputSize;
828
+ disabled?: boolean;
829
+ invalid?: boolean;
830
+ /** Allow clearing back to `null` by selecting the chosen option again. Default `true`. */
831
+ clearable?: boolean;
832
+ /** Override the filter. Default is a case-insensitive substring match on `label`. */
833
+ filter?: (option: ComboboxOption<T>, query: string) => boolean;
834
+ /** Shown when nothing matches. */
835
+ emptyMessage?: ReactNode;
836
+ /** Custom option rendering. Receives the option and whether it is selected. */
837
+ renderOption?: (option: ComboboxOption<T>, selected: boolean) => ReactNode;
838
+ className?: string;
839
+ }
840
+ /**
841
+ * Single-select combobox with a text filter — an autocomplete.
842
+ *
843
+ * Implements the ARIA 1.2 combobox pattern, which is specific about a few things that are
844
+ * easy to get wrong and were all wrong in the `RoleComboBox` this replaces:
845
+ *
846
+ * - **`role="combobox"` belongs on the text input**, not on a wrapping `<div>`. The div
847
+ * version means the state attributes sit on an element the user never focuses.
848
+ * - **`aria-activedescendant`, not focus, tracks the highlighted option.** Focus stays in
849
+ * the input the whole time — moving DOM focus into the list breaks typing. This is the
850
+ * one place a roving tabindex is the *wrong* answer, which is why this does not use
851
+ * `useRovingFocus`.
852
+ * - **`aria-controls` points at the listbox**, which therefore needs a stable id.
853
+ * - The listbox is portaled, so it is not clipped by a `Card` or a scrolling container.
854
+ *
855
+ * For a command palette — filter over *actions* rather than a value — use `Command`.
856
+ */
857
+ declare function Combobox<T extends string = string>({ options, value: valueProp, defaultValue, onValueChange, label, placeholder, size: sizeProp, disabled: disabledProp, invalid, clearable, filter, emptyMessage, renderOption, className, }: ComboboxProps<T>): react.JSX.Element;
858
+
859
+ type CheckControlSize = 'sm' | 'md';
860
+
861
+ type RadioGroupOrientation = 'vertical' | 'horizontal';
862
+ /** One radio as data: the `Radio` props it renders with. New in 0.8.0. */
863
+ interface RadioGroupOption {
864
+ value: string;
865
+ label: ReactNode;
866
+ description?: ReactNode;
867
+ disabled?: boolean;
868
+ }
869
+ interface RadioGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
870
+ /** The parts: `Radio`s. Omit when passing `options`. */
871
+ children?: ReactNode;
872
+ /** The radios as data, each rendered as a `Radio`. New in 0.8.0. Use it or `children`. */
873
+ options?: readonly RadioGroupOption[];
874
+ value?: string;
875
+ defaultValue?: string;
876
+ onValueChange?: (value: string) => void;
877
+ /** Shared `name` for the underlying inputs. Generated when omitted. */
878
+ name?: string;
879
+ /** Names the group. Prefer wrapping in `FieldSet` + `FieldLegend` for a visible label. */
880
+ label?: string;
881
+ size?: CheckControlSize;
882
+ orientation?: RadioGroupOrientation;
883
+ disabled?: boolean;
884
+ invalid?: boolean;
885
+ required?: boolean;
886
+ }
887
+ /**
888
+ * Radio group. Matches the `Type=Radio` half of Figma's `Checkbox` set, and shares its
889
+ * geometry through `CheckControl`.
890
+ *
891
+ * Built on real `<input type="radio">` elements sharing a `name`, which is what buys the
892
+ * whole keyboard contract for free: arrow keys move *and* select, only the checked radio is
893
+ * in the tab sequence, and the group is announced as "2 of 4". A `div`-based
894
+ * `role="radiogroup"` has to reimplement all of that, and the version of this pattern the
895
+ * library already had — `SegmentedControl` before 0.4.0 — shipped with none of it.
896
+ *
897
+ * `role="radiogroup"` is still set explicitly rather than relying on a `<fieldset>`, so the
898
+ * group works with or without a visible legend.
899
+ */
900
+ declare const RadioGroup: react.ForwardRefExoticComponent<RadioGroupProps & react.RefAttributes<HTMLDivElement>>;
901
+ interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'onChange' | 'checked'> {
902
+ value: string;
903
+ label?: ReactNode;
904
+ /** Second line under the label. Matches Figma's `Supporting text` axis. */
905
+ description?: ReactNode;
906
+ /**
907
+ * Standalone only (outside a `RadioGroup`): whether this radio is the selected one. Inside a
908
+ * group the group's `value` decides, and this is ignored. New in 0.9.5.
909
+ */
910
+ checked?: boolean;
911
+ /** Standalone only: called with `true` when the user selects this radio. New in 0.9.5. */
912
+ onCheckedChange?: (checked: boolean) => void;
913
+ /** Standalone only; a group sets it for its radios. New in 0.9.5. */
914
+ size?: CheckControlSize;
915
+ /** Standalone only; a group sets it for its radios. New in 0.9.5. */
916
+ invalid?: boolean;
917
+ className?: string;
918
+ }
919
+ /**
920
+ * One radio. Inside a `RadioGroup` it takes its name, value and state from the group.
921
+ *
922
+ * From 0.9.5 it also works **standalone**, for radios a group's wrapper cannot hold, such as one
923
+ * per row of a table ("Make this the default"). Give every radio of the set the same `name`,
924
+ * control `checked`, and handle `onCheckedChange`. Native radios that share a name are one group
925
+ * wherever they sit in the DOM, so arrow keys, the single tab stop and "2 of 4" still work. Name
926
+ * the set with the column header, and name each radio with `aria-label` when it has no `label`.
927
+ * This is MUI's standalone `Radio`; a `div role="radiogroup"` around a whole table would put the
928
+ * table's other controls inside the group.
929
+ */
930
+ declare const Radio: react.ForwardRefExoticComponent<RadioProps & react.RefAttributes<HTMLInputElement>>;
931
+
932
+ interface SegmentedControlOption {
933
+ value: string;
934
+ label: string;
935
+ disabled?: boolean;
936
+ }
937
+ interface SegmentedControlProps {
938
+ options: SegmentedControlOption[];
939
+ /** Controlled selection. Omit and pass `defaultValue` for uncontrolled. */
940
+ value?: string;
941
+ defaultValue?: string;
942
+ onValueChange?: (value: string) => void;
943
+ /** Names the group. Required by the APG when the control has no visible label. */
944
+ label?: string;
945
+ className?: string;
946
+ }
947
+ /**
948
+ * Single-select segmented toggle.
949
+ *
950
+ * Through 0.3.0 this had **no ARIA whatsoever** — the selected segment was distinguished
951
+ * only by `bg-default shadow-panel`, so a screen reader user could not tell which of the
952
+ * segments was active. It is single-select, so `radiogroup`/`radio` is the correct pattern
953
+ * rather than a row of `aria-pressed` buttons: it announces "2 of 3" and lets the arrow
954
+ * keys move between options, which a toggle-button group does not.
955
+ *
956
+ * `onChange` was also optional, so `<SegmentedControl options value />` rendered a control
957
+ * that looked interactive and silently did nothing.
958
+ */
959
+ declare function SegmentedControl({ options, value: valueProp, defaultValue, onValueChange, label, className, }: SegmentedControlProps): react.JSX.Element;
960
+
961
+ /** The values a `SchemaForm` holds, by field name. */
962
+ type SchemaFormValues = Record<string, unknown>;
963
+ /**
964
+ * What `onSubmit` returns: whether the save went through. Only `ok` is read. On `ok: true` the
965
+ * form takes the saved values as its new starting point (no longer dirty); on `ok: false` it
966
+ * stays as it is, with what was typed. The form shows no save error itself: anything the save
967
+ * refuses is the page's to show, in a toast or an alert outside the form. Extra properties are
968
+ * ignored, so a result such as `{ ok: false, error }` can be returned as is. Returning nothing
969
+ * counts as success.
970
+ */
971
+ type SchemaFormResult = {
972
+ ok: boolean;
973
+ };
974
+ /** Field messages by name (or `list.0.item` path). `undefined` means "no message". Client-side only. */
975
+ type SchemaFormErrors = Record<string, string | undefined>;
976
+ /** `large` spans both columns of the `grid` layout. Ignored by `stack` and `inline`. */
977
+ type SchemaFormFieldSize = 'medium' | 'large';
978
+ /**
979
+ * `grid`: two columns from `sm` up, grouped into sections (record forms).
980
+ * `stack`: one column (sign-in and other narrow forms).
981
+ * `inline`: a wrapping row of controls with no sections (filter toolbars).
982
+ */
983
+ type SchemaFormLayout = 'grid' | 'stack' | 'inline';
984
+ /** `submit`: on the submit button. `change`: on every change, debounced for typing (filters). */
985
+ type SchemaFormSubmitOn = 'submit' | 'change';
986
+ /** What the form reports to `onStateChange` and to an `actions` render function. */
987
+ interface SchemaFormState {
988
+ /** `onSubmit` is running. */
989
+ pending: boolean;
990
+ /** The values differ from the ones the form started with, or last saved. */
991
+ dirty: boolean;
992
+ /** No field on the form (on the current step, with `steps`) has a validation error. */
993
+ valid: boolean;
994
+ /** A field's `check` is running. The form can't be submitted until it answers. */
995
+ checking: boolean;
996
+ /** Index of the current step, with `steps`. Otherwise `0`. */
997
+ step: number;
998
+ }
999
+ /** Handed to a `custom` field's `render` and to a field's `onValueChange`. */
1000
+ interface SchemaFormFieldContext<V extends object = SchemaFormValues> {
1001
+ /** The field's name, or its `list.0.item` path inside a `list` row. */
1002
+ name: string;
1003
+ value: unknown;
1004
+ setValue: (value: unknown) => void;
1005
+ /** All values. For a field inside a `list` row, the row's values. */
1006
+ values: V;
1007
+ /** Set another field, by name. Inside a `list` row, another field of the same row. */
1008
+ setField: (name: string, value: unknown) => void;
1009
+ /** The message to show, if any. */
1010
+ error: string | undefined;
1011
+ /** Mark the field as visited, so its validation message may show. */
1012
+ touch: () => void;
1013
+ disabled: boolean;
1014
+ readOnly: boolean;
1015
+ required: boolean;
1016
+ pending: boolean;
1017
+ }
1018
+ type Maybe<V, T> = T | ((values: V) => T);
1019
+ interface SchemaFormFieldBase<V extends object = SchemaFormValues> {
1020
+ /** The key in the form's values. */
1021
+ name: string;
1022
+ label: string;
1023
+ /** Keep the label for assistive tech only, e.g. on a filter toolbar. */
1024
+ hideLabel?: boolean;
1025
+ /** Help under the control, replaced by the error while there is one. */
1026
+ hint?: Maybe<V, ReactNode>;
1027
+ /** Shown at the end of the label row, e.g. a "Forgot password?" link. */
1028
+ labelAction?: ReactNode;
1029
+ required?: boolean;
1030
+ /** Shown but not editable or focusable, and dimmed. */
1031
+ disabled?: Maybe<V, boolean>;
1032
+ /** Shown and focusable but not editable, with no dimming. Choice fields show their label as text. */
1033
+ readOnly?: Maybe<V, boolean>;
1034
+ /** Default `medium`. */
1035
+ size?: SchemaFormFieldSize;
1036
+ /** Heading of the section the field is in. Fields with none go before the first section. */
1037
+ section?: string;
1038
+ /** Id of the step the field is on, with `steps`. */
1039
+ step?: string;
1040
+ /** Leave the field out while this returns true. Its value is kept and still submitted. */
1041
+ hidden?: (values: V) => boolean;
1042
+ /** Called after the value changes, e.g. to reset a field that depends on this one. */
1043
+ onValueChange?: (value: unknown, ctx: SchemaFormFieldContext<V>) => void;
1044
+ /**
1045
+ * An asynchronous check, e.g. "is this username free?". Resolve with the message to show, or
1046
+ * nothing when the value is fine. It runs once typing pauses (`checkDelay`), only for a value
1047
+ * that is filled in, passes the form's other checks and differs from the one the form started
1048
+ * with; an answer for an older value is ignored, and `signal` aborts when the value changes.
1049
+ * While it runs the field says "Checking…" and the form can't be submitted. A failing check
1050
+ * shows its message like any validation message. A check that throws blocks nothing.
1051
+ */
1052
+ check?: (value: unknown, values: V, signal: AbortSignal) => Promise<string | null | undefined | void>;
1053
+ /** Pause after the last change before `check` runs, in ms. Default 400. */
1054
+ checkDelay?: number;
1055
+ /** Layout only: a width on a filter toolbar, a column placement. */
1056
+ className?: string;
1057
+ }
1058
+ type SchemaFormTextType = 'text' | 'email' | 'tel' | 'url' | 'number' | 'currency' | 'password' | 'search';
1059
+ /** A single-line text field. Its value is a string, `number` and `currency` included. */
1060
+ interface SchemaFormTextField<V extends object = SchemaFormValues> extends SchemaFormFieldBase<V> {
1061
+ type: SchemaFormTextType;
1062
+ placeholder?: string;
1063
+ autoComplete?: string;
1064
+ maxLength?: number;
1065
+ /** Rewrites what is typed before it is stored, e.g. `(v) => v.toUpperCase()`. */
1066
+ transform?: (value: string) => string;
1067
+ }
1068
+ interface SchemaFormTextareaField<V extends object = SchemaFormValues> extends SchemaFormFieldBase<V> {
1069
+ type: 'textarea';
1070
+ rows?: number;
1071
+ placeholder?: string;
1072
+ maxLength?: number;
1073
+ transform?: (value: string) => string;
1074
+ }
1075
+ /** Value: the option's value, or `null` for none. */
1076
+ interface SchemaFormSelectField<V extends object = SchemaFormValues> extends SchemaFormFieldBase<V> {
1077
+ type: 'select';
1078
+ /** The options are being fetched (see `useDependentOptions`): the control shows "Loading…" and is disabled. */
1079
+ loading?: boolean;
1080
+ options: Maybe<V, (SelectOption | SelectOptionGroup)[]>;
1081
+ placeholder?: string;
1082
+ }
1083
+ /** Value: the option's value, or `null` for none. */
1084
+ interface SchemaFormComboboxField<V extends object = SchemaFormValues> extends SchemaFormFieldBase<V> {
1085
+ type: 'combobox';
1086
+ /** The options are being fetched (see `useDependentOptions`): the control shows "Loading…" and is disabled. */
1087
+ loading?: boolean;
1088
+ options: Maybe<V, ComboboxOption[]>;
1089
+ placeholder?: string;
1090
+ emptyMessage?: ReactNode;
1091
+ /** Picking the chosen option again clears it. Default `true`. */
1092
+ clearable?: boolean;
1093
+ }
1094
+ /** Value: an ISO 3166-1 alpha-2 code, or `null`. */
1095
+ interface SchemaFormCountryField<V extends object = SchemaFormValues> extends SchemaFormFieldBase<V> {
1096
+ type: 'country';
1097
+ countries?: readonly string[];
1098
+ locale?: string;
1099
+ renderFlag?: (code: string) => ReactNode;
1100
+ placeholder?: string;
1101
+ }
1102
+ /** Value: an IANA zone name, or `null`. */
1103
+ interface SchemaFormTimeZoneField<V extends object = SchemaFormValues> extends SchemaFormFieldBase<V> {
1104
+ type: 'timezone';
1105
+ timeZones?: readonly string[];
1106
+ placeholder?: string;
1107
+ }
1108
+ /** Value: the chosen option's value, or `null`. */
1109
+ interface SchemaFormRadioField<V extends object = SchemaFormValues> extends SchemaFormFieldBase<V> {
1110
+ type: 'radio';
1111
+ options: Maybe<V, readonly RadioGroupOption[]>;
1112
+ orientation?: 'vertical' | 'horizontal';
1113
+ }
1114
+ /** Value: the chosen option's value. */
1115
+ interface SchemaFormSegmentedField<V extends object = SchemaFormValues> extends SchemaFormFieldBase<V> {
1116
+ type: 'segmented';
1117
+ options: Maybe<V, SegmentedControlOption[]>;
1118
+ }
1119
+ /** Value: an ISO `YYYY-MM-DD` string, `''` for none. */
1120
+ interface SchemaFormDateField<V extends object = SchemaFormValues> extends SchemaFormFieldBase<V> {
1121
+ type: 'date';
1122
+ min?: string;
1123
+ max?: string;
1124
+ placeholder?: string;
1125
+ }
1126
+ /** Value: a boolean. The label sits beside the control; `hint` is its supporting text. */
1127
+ interface SchemaFormCheckField<V extends object = SchemaFormValues> extends SchemaFormFieldBase<V> {
1128
+ type: 'checkbox' | 'switch';
1129
+ }
1130
+ /**
1131
+ * Value: an array of rows, each an object holding the row's `fields`. Rows render as a line of
1132
+ * controls with a remove button; errors for a row's field use the path `name.index.field`.
1133
+ */
1134
+ interface SchemaFormListField<V extends object = SchemaFormValues> extends SchemaFormFieldBase<V> {
1135
+ type: 'list';
1136
+ /** The controls of one row. `section`, `step` and `size` are ignored on them. */
1137
+ fields: SchemaFormField[];
1138
+ /** The row the Add button appends. Omit together with `renderAdd` to offer no Add button. */
1139
+ newItem?: () => SchemaFormValues;
1140
+ /** Label of the Add button. Default "Add". */
1141
+ addLabel?: string;
1142
+ /** Replaces the Add button, e.g. with a picker. Call `add` with the new row. */
1143
+ renderAdd?: (add: (item: SchemaFormValues) => void, ctx: SchemaFormFieldContext<V>) => ReactNode;
1144
+ /** Fewest rows: remove buttons are disabled at this count. */
1145
+ min?: number;
1146
+ /** Most rows: the Add button is disabled at this count. */
1147
+ max?: number;
1148
+ /** Stable key of a row. Default: its index. */
1149
+ itemKey?: (item: SchemaFormValues, index: number) => string;
1150
+ /** Accessible name of a row's remove button. Default "Remove row n". */
1151
+ removeLabel?: (item: SchemaFormValues, index: number) => string;
1152
+ /** Whether a row may be removed. Default: always, subject to `min`. */
1153
+ canRemove?: (item: SchemaFormValues, index: number) => boolean;
1154
+ /** Content above the rows, e.g. column headings. */
1155
+ header?: ReactNode;
1156
+ /** Shown when there are no rows. */
1157
+ empty?: ReactNode;
1158
+ }
1159
+ /**
1160
+ * Anything the other types do not cover. `render` gets the field's value, setter and error.
1161
+ * By default it is wrapped in the field chrome (label, hint, error); set `bare` to render it alone.
1162
+ */
1163
+ interface SchemaFormCustomField<V extends object = SchemaFormValues> extends Omit<SchemaFormFieldBase<V>, 'label'> {
1164
+ type: 'custom';
1165
+ label?: string;
1166
+ render: (ctx: SchemaFormFieldContext<V>) => ReactNode;
1167
+ bare?: boolean;
1168
+ }
1169
+ type SchemaFormField<V extends object = SchemaFormValues> = SchemaFormTextField<V> | SchemaFormTextareaField<V> | SchemaFormSelectField<V> | SchemaFormComboboxField<V> | SchemaFormCountryField<V> | SchemaFormTimeZoneField<V> | SchemaFormRadioField<V> | SchemaFormSegmentedField<V> | SchemaFormDateField<V> | SchemaFormCheckField<V> | SchemaFormListField<V> | SchemaFormCustomField<V>;
1170
+ type SchemaFormFieldType = SchemaFormField['type'];
1171
+ interface SchemaFormStep {
1172
+ id: string;
1173
+ label: string;
1174
+ }
1175
+
1176
+ /** Handed to an `actions` render function, for buttons of your own. */
1177
+ interface SchemaFormActionsApi extends SchemaFormState {
1178
+ /** Submits the form, as its submit button does (validation first). */
1179
+ submit: () => void;
1180
+ /** With `steps`: back one step. */
1181
+ back: () => void;
1182
+ /** With `steps`: whether the current step is the last. Otherwise `true`. */
1183
+ lastStep: boolean;
1184
+ }
1185
+ interface SchemaFormProps<V extends object = SchemaFormValues> extends Omit<FormHTMLAttributes<HTMLFormElement>, 'onSubmit' | 'children' | 'title' | 'defaultValue'> {
1186
+ /** The fields, in order. A field's `section` groups it under a heading. */
1187
+ fields: SchemaFormField<V>[];
1188
+ /** The form's accessible name. */
1189
+ title: string;
1190
+ /** Starting values when the form holds them itself. */
1191
+ defaultValues?: Partial<V>;
1192
+ /** Controlled values. Pair with `onValuesChange`. */
1193
+ values?: V;
1194
+ /** Every change, with the new values and the name of the field that changed. */
1195
+ onValuesChange?: (values: NoInfer<V>, name: string) => void;
1196
+ /**
1197
+ * Saves the values, once every check passes. Disabled fields are left out. Return
1198
+ * `{ ok: false }` when the save is refused: the form keeps what was typed. Show why on the
1199
+ * page, in a toast or an alert outside the form: the form shows client-side messages only.
1200
+ * While it runs the form is `pending`. If it throws, the form stops being pending and the
1201
+ * error propagates.
1202
+ */
1203
+ onSubmit?: (values: NoInfer<V>) => SchemaFormResult | void | Promise<SchemaFormResult | void>;
1204
+ /**
1205
+ * Messages by field name (or `list.0.field` path), for values as they stand. A message shows
1206
+ * once its field has been visited or a submit was tried, and blocks the submit.
1207
+ */
1208
+ validate?: (values: NoInfer<V>) => SchemaFormErrors;
1209
+ /**
1210
+ * The message for an empty `required` field that `validate` leaves alone. Default
1211
+ * "<Label> is required." Pass `false` to leave required checks to `validate`.
1212
+ */
1213
+ requiredMessage?: ((field: SchemaFormField<V>) => string) | false;
1214
+ /**
1215
+ * Messages from the page that show at once and win over the form's own, e.g. a check the page
1216
+ * runs itself. `undefined` entries are ignored. Not for save errors: those go outside the form.
1217
+ */
1218
+ errors?: SchemaFormErrors;
1219
+ /**
1220
+ * When a validation message first shows. `blur` (default): once its field has been visited, or a
1221
+ * submit was tried. `submit`: only once a submit was tried, as sign-in screens do.
1222
+ */
1223
+ validateOn?: 'blur' | 'submit';
1224
+ /** Default `grid`. */
1225
+ layout?: SchemaFormLayout;
1226
+ /** Default `submit`. `change` submits on every change, with typing debounced. */
1227
+ submitOn?: SchemaFormSubmitOn;
1228
+ /** Debounce for typing with `submitOn="change"`, in ms. Default 300. */
1229
+ debounce?: number;
1230
+ /** Shows one step at a time; fields name theirs with `step`. Next validates the step. */
1231
+ steps?: SchemaFormStep[];
1232
+ /** Every field read-only, and no buttons. */
1233
+ readOnly?: boolean;
1234
+ /** Every field disabled. */
1235
+ disabled?: boolean;
1236
+ /** Control size for every field. */
1237
+ size?: InputSize;
1238
+ /** Default "Save". */
1239
+ submitLabel?: string;
1240
+ /** Read out while saving. Default "Saving". */
1241
+ pendingLabel?: string;
1242
+ /** Default "Next" and "Back", with `steps`. */
1243
+ nextLabel?: string;
1244
+ backLabel?: string;
1245
+ /** Shows a Cancel button that calls it. */
1246
+ onCancel?: () => void;
1247
+ cancelLabel?: string;
1248
+ /** Replaces the default buttons. */
1249
+ actions?: ReactNode | ((api: SchemaFormActionsApi) => ReactNode);
1250
+ /** Default: shown unless `readOnly` or `submitOn="change"`. */
1251
+ showActions?: boolean;
1252
+ /** Pending, dirty, valid, checking and step, for buttons and guards outside the form. */
1253
+ onStateChange?: (state: SchemaFormState) => void;
1254
+ /** Extra content after the fields, before the buttons. */
1255
+ children?: ReactNode;
1256
+ }
1257
+ /**
1258
+ * A form described as data: give it fields and an `onSubmit`, and it holds the values, runs
1259
+ * every check that doesn't need a save, shows the messages against the right fields, and
1260
+ * tracks pending and dirty state.
1261
+ *
1262
+ * It covers record forms (`grid`, sections, one Save), narrow forms such as sign-in (`stack`),
1263
+ * filter toolbars (`inline` with `submitOn="change"`) and step-by-step flows (`steps`). For
1264
+ * the one odd field, use a `custom` field (any control, wired to the form's value and error),
1265
+ * or a `list` field for repeated rows, rather than building the whole form by hand.
1266
+ *
1267
+ * Where messages show:
1268
+ * - **In the form, under the field:** everything checkable without saving. `required`,
1269
+ * `validate` (cross-field rules such as a matching password, conditional requirements), a
1270
+ * field's async `check` (e.g. username availability), and the page's own `errors`. A message
1271
+ * shows once its field is visited or a submit is tried, and blocks the submit.
1272
+ * - **Outside the form:** anything the save itself refuses. `onSubmit` returns `{ ok: false }`
1273
+ * and the page shows why in a toast or an alert. The form keeps what was typed.
1274
+ *
1275
+ * The Save button looks disabled while a message or a check stands in the way, but it stays
1276
+ * focusable and pressing it shows what is wrong: a disabled look is a signal, not an
1277
+ * explanation. Values are held in React state, never read back from the DOM.
1278
+ */
1279
+ declare function SchemaForm<V extends object = SchemaFormValues>({ fields: fieldsProp, title, defaultValues, values: valuesProp, onValuesChange, onSubmit, validate, requiredMessage, errors: errorsProp, validateOn, layout, submitOn, debounce, steps, readOnly, disabled, size, submitLabel, pendingLabel, nextLabel, backLabel, onCancel, cancelLabel, actions, showActions, onStateChange, children, className, noValidate, ...formProps }: SchemaFormProps<V>): react.JSX.Element;
1280
+
1281
+ interface DependentOptions<T = SelectOption> {
1282
+ /** Choices for the parent's current value. Empty while loading, when the parent is empty, or if loading failed. */
1283
+ options: T[];
1284
+ /** True from the moment the parent value changes until `load` answers. */
1285
+ loading: boolean;
1286
+ }
1287
+ /**
1288
+ * Choices of a field that depend on another field's value, fetched asynchronously, e.g. the
1289
+ * departments of the chosen role. New in 0.10.0 (from Cleo's form work).
1290
+ *
1291
+ * Calls `load(parentValue)` every time the parent value changes and ignores answers that arrive
1292
+ * after the parent has changed again. An empty parent loads nothing. The options are tied to the
1293
+ * parent value they were loaded for, so a stale list is never shown for a new parent. A `load`
1294
+ * that fails gives no options.
1295
+ *
1296
+ * Pass `loading` to the `SchemaForm` select or combobox field, which then shows "Loading…".
1297
+ * Clearing the dependent field's own value when the parent changes is up to the form: do it in
1298
+ * the parent field's `onValueChange`.
1299
+ *
1300
+ * ```tsx
1301
+ * const { options, loading } = useDependentOptions(values.role ?? '', loadDepartments);
1302
+ * const fields = [
1303
+ * { type: 'select', name: 'role', label: 'Role', options: roles,
1304
+ * onValueChange: (_, ctx) => ctx.setField('department', null) },
1305
+ * { type: 'select', name: 'department', label: 'Department', options, loading,
1306
+ * disabled: (v) => !v.role },
1307
+ * ];
1308
+ * ```
1309
+ */
1310
+ declare function useDependentOptions<T = SelectOption>(parentValue: string, load: (parentValue: string) => Promise<T[]>): DependentOptions<T>;
1311
+
786
1312
  type BadgeColor = 'gray' | 'red' | 'yellow' | 'lime' | 'green' | 'teal' | 'blue' | 'pink' | 'slate' | 'violet';
787
1313
  /**
788
1314
  * Every `BadgeColor`, in a stable order: the library's categorical palette. Index it to give
@@ -874,60 +1400,6 @@ interface RoleComboBoxProps {
874
1400
  */
875
1401
  declare function RoleComboBox({ value, onChange, options, label, size, disabled, className, }: RoleComboBoxProps): react.JSX.Element;
876
1402
 
877
- interface ComboboxOption<T = string> {
878
- value: T;
879
- label: string;
880
- description?: string;
881
- disabled?: boolean;
882
- /** Optional group heading. Options sharing a group are rendered together. */
883
- group?: string;
884
- /**
885
- * A leading glyph, e.g. a flag or an avatar. It is shown before the option's label in the
886
- * list and, for the selected option, inside the field. Decorative: it is `aria-hidden`, so
887
- * the label must say everything. New in 0.9.0.
888
- */
889
- icon?: ReactNode;
890
- }
891
- interface ComboboxProps<T extends string = string> {
892
- options: ComboboxOption<T>[];
893
- value?: T | null;
894
- defaultValue?: T | null;
895
- onValueChange?: (value: T | null) => void;
896
- /** Accessible name. Required unless the combobox is inside a `Field` with a label. */
897
- label?: string;
898
- placeholder?: string;
899
- size?: InputSize;
900
- disabled?: boolean;
901
- invalid?: boolean;
902
- /** Allow clearing back to `null` by selecting the chosen option again. Default `true`. */
903
- clearable?: boolean;
904
- /** Override the filter. Default is a case-insensitive substring match on `label`. */
905
- filter?: (option: ComboboxOption<T>, query: string) => boolean;
906
- /** Shown when nothing matches. */
907
- emptyMessage?: ReactNode;
908
- /** Custom option rendering. Receives the option and whether it is selected. */
909
- renderOption?: (option: ComboboxOption<T>, selected: boolean) => ReactNode;
910
- className?: string;
911
- }
912
- /**
913
- * Single-select combobox with a text filter — an autocomplete.
914
- *
915
- * Implements the ARIA 1.2 combobox pattern, which is specific about a few things that are
916
- * easy to get wrong and were all wrong in the `RoleComboBox` this replaces:
917
- *
918
- * - **`role="combobox"` belongs on the text input**, not on a wrapping `<div>`. The div
919
- * version means the state attributes sit on an element the user never focuses.
920
- * - **`aria-activedescendant`, not focus, tracks the highlighted option.** Focus stays in
921
- * the input the whole time — moving DOM focus into the list breaks typing. This is the
922
- * one place a roving tabindex is the *wrong* answer, which is why this does not use
923
- * `useRovingFocus`.
924
- * - **`aria-controls` points at the listbox**, which therefore needs a stable id.
925
- * - The listbox is portaled, so it is not clipped by a `Card` or a scrolling container.
926
- *
927
- * For a command palette — filter over *actions* rather than a value — use `Command`.
928
- */
929
- declare function Combobox<T extends string = string>({ options, value: valueProp, defaultValue, onValueChange, label, placeholder, size: sizeProp, disabled, invalid, clearable, filter, emptyMessage, renderOption, className, }: ComboboxProps<T>): react.JSX.Element;
930
-
931
1403
  declare const COUNTRY_CODES: readonly string[];
932
1404
  interface CountrySelectProps extends Omit<ComboboxProps<string>, 'options' | 'filter' | 'renderOption'> {
933
1405
  /** Restrict the list to these ISO 3166-1 alpha-2 codes. Default: every code. */
@@ -1210,8 +1682,6 @@ interface EntityIconBadgeProps {
1210
1682
  }
1211
1683
  declare function EntityIconBadge({ size, tone, shape, hue, bg, iconColor, children, className }: EntityIconBadgeProps): react.JSX.Element;
1212
1684
 
1213
- type CheckControlSize = 'sm' | 'md';
1214
-
1215
1685
  type CheckboxSize = CheckControlSize;
1216
1686
  interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'onChange' | 'checked'> {
1217
1687
  /** Controlled. Omit and pass `defaultChecked` for uncontrolled. */
@@ -1242,77 +1712,6 @@ interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'siz
1242
1712
  */
1243
1713
  declare const Checkbox: react.ForwardRefExoticComponent<CheckboxProps & react.RefAttributes<HTMLInputElement>>;
1244
1714
 
1245
- type RadioGroupOrientation = 'vertical' | 'horizontal';
1246
- /** One radio as data: the `Radio` props it renders with. New in 0.8.0. */
1247
- interface RadioGroupOption {
1248
- value: string;
1249
- label: ReactNode;
1250
- description?: ReactNode;
1251
- disabled?: boolean;
1252
- }
1253
- interface RadioGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
1254
- /** The parts: `Radio`s. Omit when passing `options`. */
1255
- children?: ReactNode;
1256
- /** The radios as data, each rendered as a `Radio`. New in 0.8.0. Use it or `children`. */
1257
- options?: readonly RadioGroupOption[];
1258
- value?: string;
1259
- defaultValue?: string;
1260
- onValueChange?: (value: string) => void;
1261
- /** Shared `name` for the underlying inputs. Generated when omitted. */
1262
- name?: string;
1263
- /** Names the group. Prefer wrapping in `FieldSet` + `FieldLegend` for a visible label. */
1264
- label?: string;
1265
- size?: CheckControlSize;
1266
- orientation?: RadioGroupOrientation;
1267
- disabled?: boolean;
1268
- invalid?: boolean;
1269
- required?: boolean;
1270
- }
1271
- /**
1272
- * Radio group. Matches the `Type=Radio` half of Figma's `Checkbox` set, and shares its
1273
- * geometry through `CheckControl`.
1274
- *
1275
- * Built on real `<input type="radio">` elements sharing a `name`, which is what buys the
1276
- * whole keyboard contract for free: arrow keys move *and* select, only the checked radio is
1277
- * in the tab sequence, and the group is announced as "2 of 4". A `div`-based
1278
- * `role="radiogroup"` has to reimplement all of that, and the version of this pattern the
1279
- * library already had — `SegmentedControl` before 0.4.0 — shipped with none of it.
1280
- *
1281
- * `role="radiogroup"` is still set explicitly rather than relying on a `<fieldset>`, so the
1282
- * group works with or without a visible legend.
1283
- */
1284
- declare const RadioGroup: react.ForwardRefExoticComponent<RadioGroupProps & react.RefAttributes<HTMLDivElement>>;
1285
- interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'onChange' | 'checked'> {
1286
- value: string;
1287
- label?: ReactNode;
1288
- /** Second line under the label. Matches Figma's `Supporting text` axis. */
1289
- description?: ReactNode;
1290
- /**
1291
- * Standalone only (outside a `RadioGroup`): whether this radio is the selected one. Inside a
1292
- * group the group's `value` decides, and this is ignored. New in 0.9.5.
1293
- */
1294
- checked?: boolean;
1295
- /** Standalone only: called with `true` when the user selects this radio. New in 0.9.5. */
1296
- onCheckedChange?: (checked: boolean) => void;
1297
- /** Standalone only; a group sets it for its radios. New in 0.9.5. */
1298
- size?: CheckControlSize;
1299
- /** Standalone only; a group sets it for its radios. New in 0.9.5. */
1300
- invalid?: boolean;
1301
- className?: string;
1302
- }
1303
- /**
1304
- * One radio. Inside a `RadioGroup` it takes its name, value and state from the group.
1305
- *
1306
- * From 0.9.5 it also works **standalone**, for radios a group's wrapper cannot hold, such as one
1307
- * per row of a table ("Make this the default"). Give every radio of the set the same `name`,
1308
- * control `checked`, and handle `onCheckedChange`. Native radios that share a name are one group
1309
- * wherever they sit in the DOM, so arrow keys, the single tab stop and "2 of 4" still work. Name
1310
- * the set with the column header, and name each radio with `aria-label` when it has no `label`.
1311
- * This is MUI's standalone `Radio`; a `div role="radiogroup"` around a whole table would put the
1312
- * table's other controls inside the group.
1313
- */
1314
- declare const Radio: react.ForwardRefExoticComponent<RadioProps & react.RefAttributes<HTMLInputElement>>;
1315
-
1316
1715
  /** `MultiSelectCard`'s sizes, so the single- and multi-select cards line up. `lg` from 0.9.0. */
1317
1716
  type RadioCardsSize = ChoiceCardSize;
1318
1717
  interface RadioCardsProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
@@ -1404,35 +1803,6 @@ interface CheckboxGroupItemProps {
1404
1803
  }
1405
1804
  declare const CheckboxGroupItem: react.ForwardRefExoticComponent<CheckboxGroupItemProps & react.RefAttributes<HTMLInputElement>>;
1406
1805
 
1407
- interface SegmentedControlOption {
1408
- value: string;
1409
- label: string;
1410
- disabled?: boolean;
1411
- }
1412
- interface SegmentedControlProps {
1413
- options: SegmentedControlOption[];
1414
- /** Controlled selection. Omit and pass `defaultValue` for uncontrolled. */
1415
- value?: string;
1416
- defaultValue?: string;
1417
- onValueChange?: (value: string) => void;
1418
- /** Names the group. Required by the APG when the control has no visible label. */
1419
- label?: string;
1420
- className?: string;
1421
- }
1422
- /**
1423
- * Single-select segmented toggle.
1424
- *
1425
- * Through 0.3.0 this had **no ARIA whatsoever** — the selected segment was distinguished
1426
- * only by `bg-default shadow-panel`, so a screen reader user could not tell which of the
1427
- * segments was active. It is single-select, so `radiogroup`/`radio` is the correct pattern
1428
- * rather than a row of `aria-pressed` buttons: it announces "2 of 3" and lets the arrow
1429
- * keys move between options, which a toggle-button group does not.
1430
- *
1431
- * `onChange` was also optional, so `<SegmentedControl options value />` rendered a control
1432
- * that looked interactive and silently did nothing.
1433
- */
1434
- declare function SegmentedControl({ options, value: valueProp, defaultValue, onValueChange, label, className, }: SegmentedControlProps): react.JSX.Element;
1435
-
1436
1806
  interface SliderProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size' | 'onChange' | 'value'> {
1437
1807
  value?: number;
1438
1808
  defaultValue?: number;
@@ -5394,4 +5764,4 @@ declare function ChatBubble({ sender, children, failed, className }: ChatBubbleP
5394
5764
 
5395
5765
  declare function AuroraBackdrop(): react.JSX.Element;
5396
5766
 
5397
- export { AIChatBar, type AIChatBarProps, AISuggestionChip, type AISuggestionChipProps, AccessibleIcon, type AccessibleIconProps, Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemDef, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, type AccordionType, AiAvatar, type AiAvatarProps, AspectRatio, type AspectRatioProps, AuroraBackdrop, Avatar, AvatarBlock, type AvatarBlockProps, AvatarGroup, type AvatarGroupProps, type AvatarGroupSpacing, type AvatarImageProps, type AvatarInitialProps, type AvatarProps, type AvatarShape, type AvatarSize, BADGE_COLORS, Badge, type BadgeColor, type BadgeProps, type BadgeSize, type BadgeVariant, Banner, type BannerProps, type BannerVariant, BarChart, type BarChartOrientation, type BarChartProps, type BarChartSeries, type BarChartSize, Blockquote, type BlockquoteProps, Box, type BoxProps, Breadcrumb, BreadcrumbEllipsis, type BreadcrumbEllipsisProps, BreadcrumbItem, type BreadcrumbItemDef, type BreadcrumbItemProps, type BreadcrumbProps, Button, ButtonGroup, type ButtonGroupAlign, type ButtonGroupItem, type ButtonGroupProps, type ButtonGroupVariant, type ButtonProps, type ButtonSize, type ButtonVariant, CHART_SEQUENCE, CHART_TONE, CHART_TRACK, COL_SPAN, COL_SPAN_BY_TIER, COUNTRY_CODES, Calendar, type CalendarMode, type CalendarProps, Card, CardAction, type CardActionProps, CardBody, type CardBodyProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterAlign, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, type CardRadius, type CardSize, CardTitle, type CardTitleProps, type CardTone, Carousel, CarouselControls, type CarouselControlsProps, type CarouselProps, CarouselSlide, type CarouselSlideProps, CarouselViewport, type CarouselViewportProps, ChartLegend, type ChartLegendItem, type ChartLegendOrientation, type ChartLegendProps, type ChartTone, ChatBubble, type ChatBubbleProps, type ChatBubbleSender, CheckIndicator, type CheckIndicatorProps, type CheckIndicatorStatus, Checkbox, CheckboxGroup, CheckboxGroupItem, type CheckboxGroupItemProps, type CheckboxGroupProps, type CheckboxProps, type CheckboxSize, type CheckedGroup, CheckedGroupList, type CheckedGroupListColumns, type CheckedGroupListProps, ChecklistRow, type ChecklistRowProps, type ChecklistRowState, type ChoiceCardBreakpoint, type ColSize, Collapsible, CollapsibleContent, type CollapsibleContentProps, type CollapsibleProps, CollapsibleTrigger, type CollapsibleTriggerProps, Combobox, type ComboboxOption, type ComboboxProps, Command, type CommandItem, type CommandProps, ConfirmDialog, type ConfirmDialogProps, Container, type ContainerProps, type ContainerSize, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, type ContextMenuContentProps, ContextMenuGroup, ContextMenuItem, ContextMenuItems, ContextMenuLabel, type ContextMenuProps, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type ContextMenuTriggerProps, ControlSizeProvider, type ControlSizeProviderProps, CopyButton, type CopyButtonProps, CountBadge, type CountBadgeProps, CountrySelect, type CountrySelectProps, DEFAULT_SCORE_THRESHOLDS, DatePicker, type DatePickerProps, type DateRange, DescriptionItem, type DescriptionItemProps, DescriptionList, type DescriptionListProps, DetailGrid, type DetailGridColumns, type DetailGridProps, DetailItem, type DetailItemLayout, type DetailItemProps, type DetailItemSpan, DonutChart, type DonutChartProps, type DonutChartSize, type DonutSegment, Drawer, DrawerBody, type DrawerBodyProps, DrawerClose, type DrawerCloseProps, DrawerDescription, type DrawerDescriptionProps, DrawerFooter, type DrawerFooterAlign, type DrawerFooterProps, DrawerHeader, type DrawerHeaderProps, type DrawerProps, type DrawerSide, DrawerTitle, type DrawerTitleProps, DrawerTrigger, type DrawerTriggerProps, DropdownMenu, DropdownMenuCheckboxItem, type MenuCheckboxItemProps as DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type MenuGroupProps as DropdownMenuGroupProps, DropdownMenuItem, type MenuItemProps as DropdownMenuItemProps, type MenuItemTone as DropdownMenuItemTone, DropdownMenuItems, DropdownMenuLabel, type MenuLabelProps as DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuRadioGroup, type MenuRadioGroupProps as DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type MenuRadioItemProps as DropdownMenuRadioItemProps, DropdownMenuSeparator, type MenuSeparatorProps as DropdownMenuSeparatorProps, DropdownMenuShortcut, type MenuShortcutProps as DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, type MenuSubContentProps as DropdownMenuSubContentProps, type MenuSubProps as DropdownMenuSubProps, DropdownMenuSubTrigger, type MenuSubTriggerProps as DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, EmailText, EmptyState, type EmptyStateProps, type EmptyStateSize, type EmptyStateVariant, EntityIconBadge, type EntityIconBadgeProps, type EntityIconBadgeSize, type EntityIconBadgeTone, ErrorBoundary, type ErrorBoundaryProps, EyebrowLabel, type EyebrowLabelProps, type EyebrowLabelVariant, FOCUS_RING, FOCUS_RING_INSET, Field, type FieldContextValue, FieldDescription, FieldError, FieldGroup, type FieldGroupProps, FieldHint, FieldLabel, type FieldLabelProps, FieldLegend, type FieldLegendProps, type FieldOrientation, type FieldProps, FieldSeparator, type FieldSeparatorProps, FieldSet, type FieldSetProps, type FieldTextProps, FileDropZone, type FileDropZoneProps, FileRow, type FileRowProps, FilterBar, type FilterBarProps, type FilterBarSize, Flex, type FlexAlign, type FlexDirection, type FlexJustify, type FlexProps, FormCard, FormCardFooter, type FormCardFooterProps, FormCardHeader, type FormCardHeaderProps, type FullscreenStacking, FullscreenSurface, type FullscreenSurfaceProps, GRID_TIERS, Grid, type GridBreakpoint, type GridColumnCount, type GridProps, type GridTier, HEIGHT_CLASS, HEIGHT_PX, Heading, HoverCard, type HoverCardProps, IconButton, type IconButtonProps, type IconButtonVariant, IconTextRow, type IconTextRowProps, InlineAlert, type InlineAlertProps, type InlineAlertTone, Input, InputControl, type InputControlProps, InputGroup, InputGroupAddon, type InputGroupAddonProps, type InputGroupAlign, InputGroupInput, type InputGroupInputProps, type InputGroupProps, InputGroupText, type InputGroupTextProps, InputOTP, type InputOTPMode, type InputOTPProps, type InputProps, type InputSize, Kbd, type KbdProps, type KbdSize, Label, type LabelProps, LegendDot, type LegendDotProps, type LegendDotShape, type LegendDotSize, ListRow, type ListRowDensity, type ListRowDivider, type ListRowProps, Listbox, type ListboxGroup, type ListboxOption, type ListboxProps, type MenuItemDef, Menubar, MenubarCheckboxItem, MenubarContent, type MenubarContentProps, MenubarGroup, MenubarItem, MenubarItems, MenubarLabel, MenubarMenu, type MenubarMenuDef, type MenubarMenuProps, type MenubarProps, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, type MenubarTriggerProps, MiniBarChart, type MiniBarChartOrientation, type MiniBarChartProps, type MiniBarChartSize, Modal, type ModalAlign, ModalBody, type ModalBodyProps, ModalClose, type ModalCloseProps, ModalDescription, type ModalDescriptionProps, ModalFooter, type ModalFooterAlign, type ModalFooterProps, ModalHeader, type ModalHeaderProps, type ModalProps, type ModalSize, ModalTitle, type ModalTitleProps, type ModalTone, ModalTrigger, type ModalTriggerProps, MultiSelectCard, type MultiSelectCardProps, type MultiSelectCardSize, NativeSelect, NativeSelectControl, type NativeSelectControlProps, type NativeSelectProps, NavGroupHeader, type NavGroupHeaderProps, NavItem, type NavItemDensity, type NavItemProps, type NavItemSize, type NavItemVariant, NavSubItem, type NavSubItemProps, NavigationMenu, NavigationMenuItem, type NavigationMenuItemProps, type NavigationMenuOrientation, type NavigationMenuProps, type NavigationMenuVariant, NoteConfirmModal, type NoteConfirmModalProps, NumberedList, type NumberedListGap, type NumberedListItem, type NumberedListProps, OVERLAY_SCRIM, PageHeading, type PageHeadingProps, type PageHeadingSize, PageToolbar, type PageToolbarProps, type PageToolbarSize, Pagination, PaginationBar, type PaginationBarProps, type PaginationProps, type PaginationType, PasswordInput, type PasswordInputProps, Popover, PopoverAnchor, PopoverClose, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Portal, PortalContainerProvider, type PortalProps, ProgressBarTone, type QuickAction, QuickActionsBar, type QuickActionsBarProps, Quote, ROLE_COMBO_OPTIONS, RadialGauge, type RadialGaugeProps, type RadialGaugeSize, Radio, RadioCards, RadioCardsItem, type RadioCardsItemProps, type RadioCardsProps, type RadioCardsSize, RadioGroup, type RadioGroupOption, type RadioGroupOrientation, type RadioGroupProps, type RadioProps, Resizable, type ResizableDirection, ResizableHandle, type ResizableHandleProps, ResizablePanel, type ResizablePanelProps, type ResizableProps, type ResponsiveChoiceCardSize, RoleBadge, type RoleBadgeProps, type RoleBadgeTone, RoleComboBox, type RoleComboBoxProps, type RoleOption, SCROLLBAR_CLASSES, type ScoreDirection, type ScoreRampTone, type ScoreThresholds, type ScoreTone, ScoreValue, type ScoreValueProps, type ScoreValueSize, type ScoreValueTone, type ScoreValueWeight, ScoredRow, type ScoredRowAlign, type ScoredRowGap, type ScoredRowProps, Scrim, type ScrimProps, ScrollArea, type ScrollAreaAxis, type ScrollAreaProps, SearchInput, type SearchInputProps, Section, type SectionProps, type SectionSize, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, Select, SelectControl, type SelectControlProps, type SelectOption, type SelectOptionGroup, type SelectProps, Separator, type SeparatorOrientation, type SeparatorProps, Sidebar, type SidebarContextValue, type SidebarLinkComponent, type SidebarLinkProps, type SidebarNavGroup, type SidebarNavItem, type SidebarProps, SidebarProvider, type SidebarProviderProps, type SidebarRenderState, SidebarSeparator, type SidebarSeparatorProps, SidebarTrigger, type SidebarTriggerProps, SidebarUserCard, type SidebarUserCardProps, Skeleton, type SkeletonProps, type SkeletonShape, Slider, type SliderProps, Slot, type SlotProps, type SpaceToken, Sparkline, type SparklineProps, type SparklineSize, type SparklineVariant, Spinner, type SpinnerProps, type SpinnerSize, StatNumber, type StatNumberProps, type StatNumberSize, type StatNumberWeight, StatTile, type StatTileProps, StatusBadge, type StatusBadgeProps, type StatusBadgeSize, StatusChip, type StatusChipProps, StatusDot, type StatusDotProps, type StatusDotTone, type StatusTone, type StepItem, type StepStatus, Stepper, type StepperAlign, type StepperCompactInfo, type StepperProps, type StepperSize, StepsList, type StepsListProps, Subheading, Subtitle, Switch, type SwitchProps, type SwitchSize, TIER_COLS, TIER_MIN_PX, type TabItem, Tabs, type TabsActivation, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsOrientation, TabsPanel, type TabsPanelProps, type TabsProps, type TabsRootProps, type TabsSize, TabsTrigger, type TabsTriggerProps, type TabsVariant, TagInput, type TagInputParseResult, type TagInputProps, TagPill, type TagPillProps, type TagPillSize, type TagPillTone, Text, TextCode, TextEmphasis, TextLink, type TextLinkProps, type TextLinkTone, TextList, type TextListDensity, TextListItem, type TextListItemProps, type TextListProps, type TextListVariant, type TextProps, TextSmall, TextStrong, TextTiny, type TextTone, Textarea, TextareaControl, type TextareaControlProps, type TextareaProps, TileGrid, type TileGridBreakpoint, type TileGridColumns, type TileGridProps, TimeZoneSelect, type TimeZoneSelectProps, TitleHero, TitlePage, type ToastOptions, type ToastRecord, type ToastTone, Toaster, type ToasterPosition, type ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupOption, type ToggleGroupProps, type ToggleGroupType, type ToggleProps, type ToggleSize, type ToggleVariant, Tooltip, type TooltipProps, TrailChip, type TrailChipProps, type TreeItemState, TreeView, type TreeViewProps, type TreeViewSize, type TrendDirection, TrendLabel, type TrendLabelProps, type TrendLabelSize, type TrendLabelWeight, TypingIndicator, type TypingIndicatorProps, type UseFilePicker, type UseFilePickerOptions, type UseWidthTierOptions, type UseWidthTierResult, type UserAccountStatus, UserStatusPill, type UserStatusPillProps, VisuallyHidden, type VisuallyHiddenProps, WidgetFooter, type WidgetFooterProps, WidgetGrid, WidgetGridItem, type WidgetGridItemProps, type WidgetGridProps, WidgetGridRow, type WidgetGridRowProps, WidgetHeader, WidgetHeaderAccessoryProvider, type WidgetHeaderAccessoryProviderProps, type WidgetHeaderEyebrowVariant, type WidgetHeaderProps, type WidgetHeight, WidgetTitle, type WidgetTitleProps, type WidgetTitleSize, cn, colsFor, composeRefs, countryOptions, currentZoneName, filterNav, filterNavItems, formatFileSize, getScoreTone, nextTier, paginationRange, quantizeWidth, resolveChartColor, slotWidthPx, tabId, tabPanelId, tierForWidth, timeZoneOffset, timeZoneOptions, useControlSize, useElementWidth, useFieldContext, useFieldControl, useFilePicker, useOverlayDismiss, usePortalContainer, useSidebar, useToast, useWidgetHeaderAccessory, useWidthTier };
5767
+ export { AIChatBar, type AIChatBarProps, AISuggestionChip, type AISuggestionChipProps, AccessibleIcon, type AccessibleIconProps, Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemDef, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, type AccordionType, AiAvatar, type AiAvatarProps, AspectRatio, type AspectRatioProps, AuroraBackdrop, Avatar, AvatarBlock, type AvatarBlockProps, AvatarGroup, type AvatarGroupProps, type AvatarGroupSpacing, type AvatarImageProps, type AvatarInitialProps, type AvatarProps, type AvatarShape, type AvatarSize, BADGE_COLORS, Badge, type BadgeColor, type BadgeProps, type BadgeSize, type BadgeVariant, Banner, type BannerProps, type BannerVariant, BarChart, type BarChartOrientation, type BarChartProps, type BarChartSeries, type BarChartSize, Blockquote, type BlockquoteProps, Box, type BoxProps, Breadcrumb, BreadcrumbEllipsis, type BreadcrumbEllipsisProps, BreadcrumbItem, type BreadcrumbItemDef, type BreadcrumbItemProps, type BreadcrumbProps, Button, ButtonGroup, type ButtonGroupAlign, type ButtonGroupItem, type ButtonGroupProps, type ButtonGroupVariant, type ButtonProps, type ButtonSize, type ButtonVariant, CHART_SEQUENCE, CHART_TONE, CHART_TRACK, COL_SPAN, COL_SPAN_BY_TIER, COUNTRY_CODES, Calendar, type CalendarMode, type CalendarProps, Card, CardAction, type CardActionProps, CardBody, type CardBodyProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterAlign, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, type CardRadius, type CardSize, CardTitle, type CardTitleProps, type CardTone, Carousel, CarouselControls, type CarouselControlsProps, type CarouselProps, CarouselSlide, type CarouselSlideProps, CarouselViewport, type CarouselViewportProps, ChartLegend, type ChartLegendItem, type ChartLegendOrientation, type ChartLegendProps, type ChartTone, ChatBubble, type ChatBubbleProps, type ChatBubbleSender, CheckIndicator, type CheckIndicatorProps, type CheckIndicatorStatus, Checkbox, CheckboxGroup, CheckboxGroupItem, type CheckboxGroupItemProps, type CheckboxGroupProps, type CheckboxProps, type CheckboxSize, type CheckedGroup, CheckedGroupList, type CheckedGroupListColumns, type CheckedGroupListProps, ChecklistRow, type ChecklistRowProps, type ChecklistRowState, type ChoiceCardBreakpoint, type ColSize, Collapsible, CollapsibleContent, type CollapsibleContentProps, type CollapsibleProps, CollapsibleTrigger, type CollapsibleTriggerProps, Combobox, type ComboboxOption, type ComboboxProps, Command, type CommandItem, type CommandProps, ConfirmDialog, type ConfirmDialogProps, Container, type ContainerProps, type ContainerSize, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, type ContextMenuContentProps, ContextMenuGroup, ContextMenuItem, ContextMenuItems, ContextMenuLabel, type ContextMenuProps, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type ContextMenuTriggerProps, ControlSizeProvider, type ControlSizeProviderProps, CopyButton, type CopyButtonProps, CountBadge, type CountBadgeProps, CountrySelect, type CountrySelectProps, DEFAULT_SCORE_THRESHOLDS, DatePicker, type DatePickerProps, type DateRange, type DependentOptions, DescriptionItem, type DescriptionItemProps, DescriptionList, type DescriptionListProps, DetailGrid, type DetailGridColumns, type DetailGridProps, DetailItem, type DetailItemLayout, type DetailItemProps, type DetailItemSpan, DonutChart, type DonutChartProps, type DonutChartSize, type DonutSegment, Drawer, DrawerBody, type DrawerBodyProps, DrawerClose, type DrawerCloseProps, DrawerDescription, type DrawerDescriptionProps, DrawerFooter, type DrawerFooterAlign, type DrawerFooterProps, DrawerHeader, type DrawerHeaderProps, type DrawerProps, type DrawerSide, DrawerTitle, type DrawerTitleProps, DrawerTrigger, type DrawerTriggerProps, DropdownMenu, DropdownMenuCheckboxItem, type MenuCheckboxItemProps as DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type MenuGroupProps as DropdownMenuGroupProps, DropdownMenuItem, type MenuItemProps as DropdownMenuItemProps, type MenuItemTone as DropdownMenuItemTone, DropdownMenuItems, DropdownMenuLabel, type MenuLabelProps as DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuRadioGroup, type MenuRadioGroupProps as DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type MenuRadioItemProps as DropdownMenuRadioItemProps, DropdownMenuSeparator, type MenuSeparatorProps as DropdownMenuSeparatorProps, DropdownMenuShortcut, type MenuShortcutProps as DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, type MenuSubContentProps as DropdownMenuSubContentProps, type MenuSubProps as DropdownMenuSubProps, DropdownMenuSubTrigger, type MenuSubTriggerProps as DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, EmailText, EmptyState, type EmptyStateProps, type EmptyStateSize, type EmptyStateVariant, EntityIconBadge, type EntityIconBadgeProps, type EntityIconBadgeSize, type EntityIconBadgeTone, ErrorBoundary, type ErrorBoundaryProps, EyebrowLabel, type EyebrowLabelProps, type EyebrowLabelVariant, FOCUS_RING, FOCUS_RING_INSET, Field, type FieldContextValue, FieldDescription, FieldError, FieldGroup, type FieldGroupProps, FieldHint, FieldLabel, type FieldLabelProps, FieldLegend, type FieldLegendProps, type FieldOrientation, type FieldPart, type FieldProps, FieldSeparator, type FieldSeparatorProps, FieldSet, type FieldSetProps, type FieldTextProps, FileDropZone, type FileDropZoneProps, FileRow, type FileRowProps, FilterBar, type FilterBarProps, type FilterBarSize, Flex, type FlexAlign, type FlexDirection, type FlexJustify, type FlexProps, FormCard, FormCardFooter, type FormCardFooterProps, FormCardHeader, type FormCardHeaderProps, type FullscreenStacking, FullscreenSurface, type FullscreenSurfaceProps, GRID_TIERS, Grid, type GridBreakpoint, type GridColumnCount, type GridProps, type GridTier, HEIGHT_CLASS, HEIGHT_PX, Heading, HoverCard, type HoverCardProps, IconButton, type IconButtonProps, type IconButtonVariant, IconTextRow, type IconTextRowProps, InlineAlert, type InlineAlertProps, type InlineAlertTone, Input, InputControl, type InputControlProps, InputGroup, InputGroupAddon, type InputGroupAddonProps, type InputGroupAlign, InputGroupInput, type InputGroupInputProps, type InputGroupProps, InputGroupText, type InputGroupTextProps, InputOTP, type InputOTPMode, type InputOTPProps, type InputProps, type InputSize, Kbd, type KbdProps, type KbdSize, Label, type LabelProps, LegendDot, type LegendDotProps, type LegendDotShape, type LegendDotSize, ListRow, type ListRowDensity, type ListRowDivider, type ListRowProps, Listbox, type ListboxGroup, type ListboxOption, type ListboxProps, type MenuItemDef, Menubar, MenubarCheckboxItem, MenubarContent, type MenubarContentProps, MenubarGroup, MenubarItem, MenubarItems, MenubarLabel, MenubarMenu, type MenubarMenuDef, type MenubarMenuProps, type MenubarProps, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, type MenubarTriggerProps, MiniBarChart, type MiniBarChartOrientation, type MiniBarChartProps, type MiniBarChartSize, Modal, type ModalAlign, ModalBody, type ModalBodyProps, ModalClose, type ModalCloseProps, ModalDescription, type ModalDescriptionProps, ModalFooter, type ModalFooterAlign, type ModalFooterProps, ModalHeader, type ModalHeaderProps, type ModalProps, type ModalSize, ModalTitle, type ModalTitleProps, type ModalTone, ModalTrigger, type ModalTriggerProps, MultiSelectCard, type MultiSelectCardProps, type MultiSelectCardSize, NativeSelect, NativeSelectControl, type NativeSelectControlProps, type NativeSelectProps, NavGroupHeader, type NavGroupHeaderProps, NavItem, type NavItemDensity, type NavItemProps, type NavItemSize, type NavItemVariant, NavSubItem, type NavSubItemProps, NavigationMenu, NavigationMenuItem, type NavigationMenuItemProps, type NavigationMenuOrientation, type NavigationMenuProps, type NavigationMenuVariant, NoteConfirmModal, type NoteConfirmModalProps, NumberedList, type NumberedListGap, type NumberedListItem, type NumberedListProps, OVERLAY_SCRIM, PageHeading, type PageHeadingProps, type PageHeadingSize, PageToolbar, type PageToolbarProps, type PageToolbarSize, Pagination, PaginationBar, type PaginationBarProps, type PaginationProps, type PaginationType, PasswordInput, type PasswordInputProps, Popover, PopoverAnchor, PopoverClose, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Portal, PortalContainerProvider, type PortalProps, ProgressBarTone, type QuickAction, QuickActionsBar, type QuickActionsBarProps, Quote, ROLE_COMBO_OPTIONS, RadialGauge, type RadialGaugeProps, type RadialGaugeSize, Radio, RadioCards, RadioCardsItem, type RadioCardsItemProps, type RadioCardsProps, type RadioCardsSize, RadioGroup, type RadioGroupOption, type RadioGroupOrientation, type RadioGroupProps, type RadioProps, Resizable, type ResizableDirection, ResizableHandle, type ResizableHandleProps, ResizablePanel, type ResizablePanelProps, type ResizableProps, type ResponsiveChoiceCardSize, RoleBadge, type RoleBadgeProps, type RoleBadgeTone, RoleComboBox, type RoleComboBoxProps, type RoleOption, SCROLLBAR_CLASSES, SchemaForm, type SchemaFormActionsApi, type SchemaFormCheckField, type SchemaFormComboboxField, type SchemaFormCountryField, type SchemaFormCustomField, type SchemaFormDateField, type SchemaFormErrors, type SchemaFormField, type SchemaFormFieldBase, type SchemaFormFieldContext, type SchemaFormFieldSize, type SchemaFormFieldType, type SchemaFormLayout, type SchemaFormListField, type SchemaFormProps, type SchemaFormRadioField, type SchemaFormResult, type SchemaFormSegmentedField, type SchemaFormSelectField, type SchemaFormState, type SchemaFormStep, type SchemaFormSubmitOn, type SchemaFormTextField, type SchemaFormTextType, type SchemaFormTextareaField, type SchemaFormTimeZoneField, type SchemaFormValues, type ScoreDirection, type ScoreRampTone, type ScoreThresholds, type ScoreTone, ScoreValue, type ScoreValueProps, type ScoreValueSize, type ScoreValueTone, type ScoreValueWeight, ScoredRow, type ScoredRowAlign, type ScoredRowGap, type ScoredRowProps, Scrim, type ScrimProps, ScrollArea, type ScrollAreaAxis, type ScrollAreaProps, SearchInput, type SearchInputProps, Section, type SectionProps, type SectionSize, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, Select, SelectControl, type SelectControlProps, type SelectOption, type SelectOptionGroup, type SelectProps, Separator, type SeparatorOrientation, type SeparatorProps, Sidebar, type SidebarContextValue, type SidebarLinkComponent, type SidebarLinkProps, type SidebarNavGroup, type SidebarNavItem, type SidebarProps, SidebarProvider, type SidebarProviderProps, type SidebarRenderState, SidebarSeparator, type SidebarSeparatorProps, SidebarTrigger, type SidebarTriggerProps, SidebarUserCard, type SidebarUserCardProps, Skeleton, type SkeletonProps, type SkeletonShape, Slider, type SliderProps, Slot, type SlotProps, type SpaceToken, Sparkline, type SparklineProps, type SparklineSize, type SparklineVariant, Spinner, type SpinnerProps, type SpinnerSize, StatNumber, type StatNumberProps, type StatNumberSize, type StatNumberWeight, StatTile, type StatTileProps, StatusBadge, type StatusBadgeProps, type StatusBadgeSize, StatusChip, type StatusChipProps, StatusDot, type StatusDotProps, type StatusDotTone, type StatusTone, type StepItem, type StepStatus, Stepper, type StepperAlign, type StepperCompactInfo, type StepperProps, type StepperSize, StepsList, type StepsListProps, Subheading, Subtitle, Switch, type SwitchProps, type SwitchSize, TIER_COLS, TIER_MIN_PX, type TabItem, Tabs, type TabsActivation, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsOrientation, TabsPanel, type TabsPanelProps, type TabsProps, type TabsRootProps, type TabsSize, TabsTrigger, type TabsTriggerProps, type TabsVariant, TagInput, type TagInputParseResult, type TagInputProps, TagPill, type TagPillProps, type TagPillSize, type TagPillTone, Text, TextCode, TextEmphasis, TextLink, type TextLinkProps, type TextLinkTone, TextList, type TextListDensity, TextListItem, type TextListItemProps, type TextListProps, type TextListVariant, type TextProps, TextSmall, TextStrong, TextTiny, type TextTone, Textarea, TextareaControl, type TextareaControlProps, type TextareaProps, TileGrid, type TileGridBreakpoint, type TileGridColumns, type TileGridProps, TimeZoneSelect, type TimeZoneSelectProps, TitleHero, TitlePage, type ToastOptions, type ToastRecord, type ToastTone, Toaster, type ToasterPosition, type ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupOption, type ToggleGroupProps, type ToggleGroupType, type ToggleProps, type ToggleSize, type ToggleVariant, Tooltip, type TooltipProps, TrailChip, type TrailChipProps, type TreeItemState, TreeView, type TreeViewProps, type TreeViewSize, type TrendDirection, TrendLabel, type TrendLabelProps, type TrendLabelSize, type TrendLabelWeight, TypingIndicator, type TypingIndicatorProps, type UseFilePicker, type UseFilePickerOptions, type UseWidthTierOptions, type UseWidthTierResult, type UserAccountStatus, UserStatusPill, type UserStatusPillProps, VisuallyHidden, type VisuallyHiddenProps, WidgetFooter, type WidgetFooterProps, WidgetGrid, WidgetGridItem, type WidgetGridItemProps, type WidgetGridProps, WidgetGridRow, type WidgetGridRowProps, WidgetHeader, WidgetHeaderAccessoryProvider, type WidgetHeaderAccessoryProviderProps, type WidgetHeaderEyebrowVariant, type WidgetHeaderProps, type WidgetHeight, WidgetTitle, type WidgetTitleProps, type WidgetTitleSize, cn, colsFor, composeRefs, countryOptions, currentZoneName, filterNav, filterNavItems, formatFileSize, getScoreTone, nextTier, paginationRange, quantizeWidth, resolveChartColor, slotWidthPx, tabId, tabPanelId, tierForWidth, timeZoneOffset, timeZoneOptions, useControlSize, useDependentOptions, useElementWidth, useFieldContext, useFieldControl, useFilePicker, useOverlayDismiss, usePortalContainer, useSidebar, useToast, useWidgetHeaderAccessory, useWidthTier };