sherick-ui 2.5.0 → 2.6.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/README.md +55 -1
- package/dist/cjs/components/CheckboxGroup.cjs +41 -0
- package/dist/cjs/components/CheckboxGroup.cjs.map +1 -0
- package/dist/cjs/components/Combobox.cjs +186 -12
- package/dist/cjs/components/Combobox.cjs.map +1 -1
- package/dist/cjs/components/Form.cjs +27 -0
- package/dist/cjs/components/Form.cjs.map +1 -0
- package/dist/cjs/components/Input.cjs +20 -2
- package/dist/cjs/components/Input.cjs.map +1 -1
- package/dist/cjs/components/NumberField.cjs +29 -3
- package/dist/cjs/components/NumberField.cjs.map +1 -1
- package/dist/cjs/components/RadioGroup.cjs +7 -3
- package/dist/cjs/components/RadioGroup.cjs.map +1 -1
- package/dist/cjs/components/Select.cjs +4 -2
- package/dist/cjs/components/Select.cjs.map +1 -1
- package/dist/cjs/components/Textarea.cjs +6 -1
- package/dist/cjs/components/Textarea.cjs.map +1 -1
- package/dist/cjs/components/choice-row.cjs +51 -0
- package/dist/cjs/components/choice-row.cjs.map +1 -0
- package/dist/cjs/components/option-groups.cjs +35 -0
- package/dist/cjs/components/option-groups.cjs.map +1 -0
- package/dist/cjs/components/ui.common.cjs +13 -0
- package/dist/cjs/components/ui.common.cjs.map +1 -1
- package/dist/cjs/dev.cjs +1 -0
- package/dist/cjs/dev.cjs.map +1 -1
- package/dist/cjs/index.cjs +4 -0
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/components/CheckboxGroup.js +36 -0
- package/dist/esm/components/CheckboxGroup.js.map +1 -0
- package/dist/esm/components/Combobox.js +191 -17
- package/dist/esm/components/Combobox.js.map +1 -1
- package/dist/esm/components/Form.js +22 -0
- package/dist/esm/components/Form.js.map +1 -0
- package/dist/esm/components/Input.js +21 -3
- package/dist/esm/components/Input.js.map +1 -1
- package/dist/esm/components/NumberField.js +30 -4
- package/dist/esm/components/NumberField.js.map +1 -1
- package/dist/esm/components/RadioGroup.js +10 -6
- package/dist/esm/components/RadioGroup.js.map +1 -1
- package/dist/esm/components/Select.js +6 -4
- package/dist/esm/components/Select.js.map +1 -1
- package/dist/esm/components/Textarea.js +6 -1
- package/dist/esm/components/Textarea.js.map +1 -1
- package/dist/esm/components/choice-row.js +46 -0
- package/dist/esm/components/choice-row.js.map +1 -0
- package/dist/esm/components/option-groups.js +30 -0
- package/dist/esm/components/option-groups.js.map +1 -0
- package/dist/esm/components/ui.common.js +14 -2
- package/dist/esm/components/ui.common.js.map +1 -1
- package/dist/esm/dev.js +1 -1
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/styles.css +31 -0
- package/dist/types/dev.d.cts +3 -1
- package/dist/types/dev.d.ts +3 -1
- package/dist/types/index.d.cts +184 -20
- package/dist/types/index.d.ts +184 -20
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -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
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
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
|
|
419
|
-
*
|
|
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
|
-
|
|
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
|
|
452
|
-
* sibling of `Select`: the same option shape, the same value contract and the same box,
|
|
453
|
-
* input instead of a trigger. Base UI owns filtering, the listbox semantics, keyboard
|
|
454
|
-
* interaction, the anchored popup and the hidden form
|
|
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
|
-
|
|
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?:
|
|
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 };
|