@motech-development/breeze-ui 2.4.0 → 3.0.1
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/Cabin-LICENSE.txt +93 -0
- package/dist/assets/cabin-latin-wght-normal-DZW_uTKI.woff2 +0 -0
- package/dist/formatting/FormattedDateTime/FormattedDateTime.d.ts +17 -0
- package/dist/formatting/FormattedDateTime/FormattedDateTime.d.ts.map +1 -0
- package/dist/formatting/FormattedList/FormattedList.d.ts +17 -0
- package/dist/formatting/FormattedList/FormattedList.d.ts.map +1 -0
- package/dist/formatting/FormattedNumber/FormattedNumber.d.ts +17 -0
- package/dist/formatting/FormattedNumber/FormattedNumber.d.ts.map +1 -0
- package/dist/formatting/RelativeTime/RelativeTime.d.ts +21 -0
- package/dist/formatting/RelativeTime/RelativeTime.d.ts.map +1 -0
- package/dist/icons/index.d.ts +77 -0
- package/dist/icons/index.d.ts.map +1 -0
- package/dist/icons.js +27 -0
- package/dist/index.d.ts +100 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5759 -0
- package/dist/internal/collections/VirtualizedCollection.d.ts +15 -0
- package/dist/internal/collections/VirtualizedCollection.d.ts.map +1 -0
- package/dist/internal/collections/useCollectionEmptyContent.d.ts +3 -0
- package/dist/internal/collections/useCollectionEmptyContent.d.ts.map +1 -0
- package/dist/internal/collections/useLoadMoreHandler.d.ts +7 -0
- package/dist/internal/collections/useLoadMoreHandler.d.ts.map +1 -0
- package/dist/internal/date/conversion.d.ts +16 -0
- package/dist/internal/date/conversion.d.ts.map +1 -0
- package/dist/internal/files/validation.d.ts +17 -0
- package/dist/internal/files/validation.d.ts.map +1 -0
- package/dist/internal/hooks/useForwardedRef.d.ts +3 -0
- package/dist/internal/hooks/useForwardedRef.d.ts.map +1 -0
- package/dist/internal/react-aria/DisclosureParts.d.ts +27 -0
- package/dist/internal/react-aria/DisclosureParts.d.ts.map +1 -0
- package/dist/internal/react-aria/OverlayParts.d.ts +55 -0
- package/dist/internal/react-aria/OverlayParts.d.ts.map +1 -0
- package/dist/internal/react-aria/renderNativeButton.d.ts +6 -0
- package/dist/internal/react-aria/renderNativeButton.d.ts.map +1 -0
- package/dist/internal/styling/actions.d.ts +72 -0
- package/dist/internal/styling/actions.d.ts.map +1 -0
- package/dist/internal/styling/formControls.d.ts +23 -0
- package/dist/internal/styling/formControls.d.ts.map +1 -0
- package/dist/internal/styling/layout.d.ts +108 -0
- package/dist/internal/styling/layout.d.ts.map +1 -0
- package/dist/internal/styling/responsive.d.ts +22 -0
- package/dist/internal/styling/responsive.d.ts.map +1 -0
- package/dist/internal/styling/visual.d.ts +7 -0
- package/dist/internal/styling/visual.d.ts.map +1 -0
- package/dist/internal/types/collection.d.ts +60 -0
- package/dist/internal/types/collection.d.ts.map +1 -0
- package/dist/internal/types/date.d.ts +8 -0
- package/dist/internal/types/date.d.ts.map +1 -0
- package/dist/internal/types/file.d.ts +21 -0
- package/dist/internal/types/file.d.ts.map +1 -0
- package/dist/internal/types/native.d.ts +8 -0
- package/dist/internal/types/native.d.ts.map +1 -0
- package/dist/patterns/ApplicationShell/ApplicationShell.d.ts +32 -0
- package/dist/patterns/ApplicationShell/ApplicationShell.d.ts.map +1 -0
- package/dist/patterns/ButtonGroup/ButtonGroup.d.ts +20 -0
- package/dist/patterns/ButtonGroup/ButtonGroup.d.ts.map +1 -0
- package/dist/patterns/ConfirmationDialog/ConfirmationDialog.d.ts +58 -0
- package/dist/patterns/ConfirmationDialog/ConfirmationDialog.d.ts.map +1 -0
- package/dist/patterns/ContextSwitcher/ContextSwitcher.d.ts +42 -0
- package/dist/patterns/ContextSwitcher/ContextSwitcher.d.ts.map +1 -0
- package/dist/patterns/FileAttachment/FileAttachment.d.ts +17 -0
- package/dist/patterns/FileAttachment/FileAttachment.d.ts.map +1 -0
- package/dist/patterns/FileUpload/FileUpload.d.ts +35 -0
- package/dist/patterns/FileUpload/FileUpload.d.ts.map +1 -0
- package/dist/patterns/FormActions/FormActions.d.ts +25 -0
- package/dist/patterns/FormActions/FormActions.d.ts.map +1 -0
- package/dist/patterns/FormSection/FormSection.d.ts +31 -0
- package/dist/patterns/FormSection/FormSection.d.ts.map +1 -0
- package/dist/patterns/MetricCard/MetricCard.d.ts +28 -0
- package/dist/patterns/MetricCard/MetricCard.d.ts.map +1 -0
- package/dist/patterns/NavigationSection/NavigationSection.d.ts +17 -0
- package/dist/patterns/NavigationSection/NavigationSection.d.ts.map +1 -0
- package/dist/patterns/PageHeader/PageHeader.d.ts +21 -0
- package/dist/patterns/PageHeader/PageHeader.d.ts.map +1 -0
- package/dist/patterns/Pagination/Pagination.d.ts +23 -0
- package/dist/patterns/Pagination/Pagination.d.ts.map +1 -0
- package/dist/patterns/PasswordField/PasswordField.d.ts +58 -0
- package/dist/patterns/PasswordField/PasswordField.d.ts.map +1 -0
- package/dist/patterns/SectionHeader/SectionHeader.d.ts +21 -0
- package/dist/patterns/SectionHeader/SectionHeader.d.ts.map +1 -0
- package/dist/patterns/SegmentedControl/SegmentedControl.d.ts +56 -0
- package/dist/patterns/SegmentedControl/SegmentedControl.d.ts.map +1 -0
- package/dist/patterns/StatePanel/StatePanel.d.ts +25 -0
- package/dist/patterns/StatePanel/StatePanel.d.ts.map +1 -0
- package/dist/patterns/UserMenu/UserMenu.d.ts +45 -0
- package/dist/patterns/UserMenu/UserMenu.d.ts.map +1 -0
- package/dist/primitives/Accordion/Accordion.d.ts +76 -0
- package/dist/primitives/Accordion/Accordion.d.ts.map +1 -0
- package/dist/primitives/Alert/Alert.d.ts +23 -0
- package/dist/primitives/Alert/Alert.d.ts.map +1 -0
- package/dist/primitives/AlertDialog/AlertDialog.d.ts +63 -0
- package/dist/primitives/AlertDialog/AlertDialog.d.ts.map +1 -0
- package/dist/primitives/Avatar/Avatar.d.ts +308 -0
- package/dist/primitives/Avatar/Avatar.d.ts.map +1 -0
- package/dist/primitives/Badge/Badge.d.ts +299 -0
- package/dist/primitives/Badge/Badge.d.ts.map +1 -0
- package/dist/primitives/Breadcrumbs/Breadcrumbs.d.ts +40 -0
- package/dist/primitives/Breadcrumbs/Breadcrumbs.d.ts.map +1 -0
- package/dist/primitives/Button/Button.d.ts +36 -0
- package/dist/primitives/Button/Button.d.ts.map +1 -0
- package/dist/primitives/Calendar/Calendar.d.ts +61 -0
- package/dist/primitives/Calendar/Calendar.d.ts.map +1 -0
- package/dist/primitives/Card/Card.d.ts +63 -0
- package/dist/primitives/Card/Card.d.ts.map +1 -0
- package/dist/primitives/Center/Center.d.ts +295 -0
- package/dist/primitives/Center/Center.d.ts.map +1 -0
- package/dist/primitives/Checkbox/Checkbox.d.ts +106 -0
- package/dist/primitives/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/primitives/CheckboxGroup/CheckboxGroup.d.ts +76 -0
- package/dist/primitives/CheckboxGroup/CheckboxGroup.d.ts.map +1 -0
- package/dist/primitives/ComboBox/ComboBox.d.ts +174 -0
- package/dist/primitives/ComboBox/ComboBox.d.ts.map +1 -0
- package/dist/primitives/Container/Container.d.ts +296 -0
- package/dist/primitives/Container/Container.d.ts.map +1 -0
- package/dist/primitives/DateField/DateField.d.ts +87 -0
- package/dist/primitives/DateField/DateField.d.ts.map +1 -0
- package/dist/primitives/DatePicker/DatePicker.d.ts +74 -0
- package/dist/primitives/DatePicker/DatePicker.d.ts.map +1 -0
- package/dist/primitives/DateRangePicker/DateRangePicker.d.ts +116 -0
- package/dist/primitives/DateRangePicker/DateRangePicker.d.ts.map +1 -0
- package/dist/primitives/DateTimePicker/DateTimePicker.d.ts +93 -0
- package/dist/primitives/DateTimePicker/DateTimePicker.d.ts.map +1 -0
- package/dist/primitives/DescriptionList/DescriptionList.d.ts +45 -0
- package/dist/primitives/DescriptionList/DescriptionList.d.ts.map +1 -0
- package/dist/primitives/Dialog/Dialog.d.ts +56 -0
- package/dist/primitives/Dialog/Dialog.d.ts.map +1 -0
- package/dist/primitives/Disclosure/Disclosure.d.ts +59 -0
- package/dist/primitives/Disclosure/Disclosure.d.ts.map +1 -0
- package/dist/primitives/Drawer/Drawer.d.ts +87 -0
- package/dist/primitives/Drawer/Drawer.d.ts.map +1 -0
- package/dist/primitives/DropZone/DropZone.d.ts +85 -0
- package/dist/primitives/DropZone/DropZone.d.ts.map +1 -0
- package/dist/primitives/Fieldset/Fieldset.d.ts +57 -0
- package/dist/primitives/Fieldset/Fieldset.d.ts.map +1 -0
- package/dist/primitives/FileTrigger/FileTrigger.d.ts +72 -0
- package/dist/primitives/FileTrigger/FileTrigger.d.ts.map +1 -0
- package/dist/primitives/Grid/Grid.d.ts +307 -0
- package/dist/primitives/Grid/Grid.d.ts.map +1 -0
- package/dist/primitives/GridList/GridList.d.ts +131 -0
- package/dist/primitives/GridList/GridList.d.ts.map +1 -0
- package/dist/primitives/IconButton/IconButton.d.ts +37 -0
- package/dist/primitives/IconButton/IconButton.d.ts.map +1 -0
- package/dist/primitives/IconTile/IconTile.d.ts +312 -0
- package/dist/primitives/IconTile/IconTile.d.ts.map +1 -0
- package/dist/primitives/Inline/Inline.d.ts +302 -0
- package/dist/primitives/Inline/Inline.d.ts.map +1 -0
- package/dist/primitives/InputGroup/InputGroup.d.ts +36 -0
- package/dist/primitives/InputGroup/InputGroup.d.ts.map +1 -0
- package/dist/primitives/Link/Link.d.ts +28 -0
- package/dist/primitives/Link/Link.d.ts.map +1 -0
- package/dist/primitives/LinkButton/LinkButton.d.ts +31 -0
- package/dist/primitives/LinkButton/LinkButton.d.ts.map +1 -0
- package/dist/primitives/List/List.d.ts +29 -0
- package/dist/primitives/List/List.d.ts.map +1 -0
- package/dist/primitives/ListBox/ListBox.d.ts +102 -0
- package/dist/primitives/ListBox/ListBox.d.ts.map +1 -0
- package/dist/primitives/Logo/Logo.d.ts +292 -0
- package/dist/primitives/Logo/Logo.d.ts.map +1 -0
- package/dist/primitives/Menu/Menu.d.ts +151 -0
- package/dist/primitives/Menu/Menu.d.ts.map +1 -0
- package/dist/primitives/Meter/Meter.d.ts +28 -0
- package/dist/primitives/Meter/Meter.d.ts.map +1 -0
- package/dist/primitives/NavigationList/NavigationList.d.ts +44 -0
- package/dist/primitives/NavigationList/NavigationList.d.ts.map +1 -0
- package/dist/primitives/NumberField/NumberField.d.ts +118 -0
- package/dist/primitives/NumberField/NumberField.d.ts.map +1 -0
- package/dist/primitives/Popover/Popover.d.ts +61 -0
- package/dist/primitives/Popover/Popover.d.ts.map +1 -0
- package/dist/primitives/ProgressBar/ProgressBar.d.ts +41 -0
- package/dist/primitives/ProgressBar/ProgressBar.d.ts.map +1 -0
- package/dist/primitives/RadioGroup/RadioGroup.d.ts +131 -0
- package/dist/primitives/RadioGroup/RadioGroup.d.ts.map +1 -0
- package/dist/primitives/RangeCalendar/RangeCalendar.d.ts +57 -0
- package/dist/primitives/RangeCalendar/RangeCalendar.d.ts.map +1 -0
- package/dist/primitives/SearchField/SearchField.d.ts +70 -0
- package/dist/primitives/SearchField/SearchField.d.ts.map +1 -0
- package/dist/primitives/Select/Select.d.ts +110 -0
- package/dist/primitives/Select/Select.d.ts.map +1 -0
- package/dist/primitives/Separator/Separator.d.ts +302 -0
- package/dist/primitives/Separator/Separator.d.ts.map +1 -0
- package/dist/primitives/Skeleton/Skeleton.d.ts +27 -0
- package/dist/primitives/Skeleton/Skeleton.d.ts.map +1 -0
- package/dist/primitives/SkipLink/SkipLink.d.ts +21 -0
- package/dist/primitives/SkipLink/SkipLink.d.ts.map +1 -0
- package/dist/primitives/Slider/Slider.d.ts +148 -0
- package/dist/primitives/Slider/Slider.d.ts.map +1 -0
- package/dist/primitives/Spinner/Spinner.d.ts +23 -0
- package/dist/primitives/Spinner/Spinner.d.ts.map +1 -0
- package/dist/primitives/Stack/Stack.d.ts +300 -0
- package/dist/primitives/Stack/Stack.d.ts.map +1 -0
- package/dist/primitives/Stepper/Stepper.d.ts +42 -0
- package/dist/primitives/Stepper/Stepper.d.ts.map +1 -0
- package/dist/primitives/Surface/Surface.d.ts +306 -0
- package/dist/primitives/Surface/Surface.d.ts.map +1 -0
- package/dist/primitives/Switch/Switch.d.ts +118 -0
- package/dist/primitives/Switch/Switch.d.ts.map +1 -0
- package/dist/primitives/Table/Table.d.ts +226 -0
- package/dist/primitives/Table/Table.d.ts.map +1 -0
- package/dist/primitives/Tabs/Tabs.d.ts +105 -0
- package/dist/primitives/Tabs/Tabs.d.ts.map +1 -0
- package/dist/primitives/Tag/Tag.d.ts +18 -0
- package/dist/primitives/Tag/Tag.d.ts.map +1 -0
- package/dist/primitives/TagGroup/TagGroup.d.ts +60 -0
- package/dist/primitives/TagGroup/TagGroup.d.ts.map +1 -0
- package/dist/primitives/TextArea/TextArea.d.ts +40 -0
- package/dist/primitives/TextArea/TextArea.d.ts.map +1 -0
- package/dist/primitives/TextField/TextField.d.ts +102 -0
- package/dist/primitives/TextField/TextField.d.ts.map +1 -0
- package/dist/primitives/TimeField/TimeField.d.ts +58 -0
- package/dist/primitives/TimeField/TimeField.d.ts.map +1 -0
- package/dist/primitives/Toast/Toast.d.ts +88 -0
- package/dist/primitives/Toast/Toast.d.ts.map +1 -0
- package/dist/primitives/ToggleButton/ToggleButton.d.ts +55 -0
- package/dist/primitives/ToggleButton/ToggleButton.d.ts.map +1 -0
- package/dist/primitives/ToggleGroup/ToggleGroup.d.ts +48 -0
- package/dist/primitives/ToggleGroup/ToggleGroup.d.ts.map +1 -0
- package/dist/primitives/Toolbar/Toolbar.d.ts +17 -0
- package/dist/primitives/Toolbar/Toolbar.d.ts.map +1 -0
- package/dist/primitives/Tooltip/Tooltip.d.ts +66 -0
- package/dist/primitives/Tooltip/Tooltip.d.ts.map +1 -0
- package/dist/primitives/Typography/Typography.d.ts +317 -0
- package/dist/primitives/Typography/Typography.d.ts.map +1 -0
- package/dist/primitives/VisuallyHidden/VisuallyHidden.d.ts +294 -0
- package/dist/primitives/VisuallyHidden/VisuallyHidden.d.ts.map +1 -0
- package/dist/primitives/date/CalendarParts.d.ts +26 -0
- package/dist/primitives/date/CalendarParts.d.ts.map +1 -0
- package/dist/primitives/date/DateInput.d.ts +9 -0
- package/dist/primitives/date/DateInput.d.ts.map +1 -0
- package/dist/primitives/date/PickerFieldParts.d.ts +11 -0
- package/dist/primitives/date/PickerFieldParts.d.ts.map +1 -0
- package/dist/primitives/date/PickerParts.d.ts +29 -0
- package/dist/primitives/date/PickerParts.d.ts.map +1 -0
- package/dist/primitives/file/FileFeedback.d.ts +14 -0
- package/dist/primitives/file/FileFeedback.d.ts.map +1 -0
- package/dist/provider/BreezeContext.d.ts +19 -0
- package/dist/provider/BreezeContext.d.ts.map +1 -0
- package/dist/provider/BreezeProvider.d.ts +30 -0
- package/dist/provider/BreezeProvider.d.ts.map +1 -0
- package/dist/provider/messages.d.ts +43 -0
- package/dist/provider/messages.d.ts.map +1 -0
- package/dist/reset.css +2 -0
- package/dist/styles.css +2 -0
- package/package.json +66 -93
- package/lib/index.cjs.js +0 -2900
- package/lib/index.cjs.js.map +0 -1
- package/lib/index.d.ts +0 -489
- package/lib/index.esm.js +0 -2846
- package/lib/index.esm.js.map +0 -1
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, HTMLAttributes, InputHTMLAttributes, ReactElement, ReactNode, Ref } from 'react';
|
|
2
|
+
import type { ControlSize } from '../../internal/styling/visual';
|
|
3
|
+
import { type TextFieldDescriptionProps, type TextFieldErrorProps, type TextFieldLabelProps } from '../TextField/TextField';
|
|
4
|
+
type NumberFieldRootNativeProps = Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'defaultValue' | 'onChange' | 'style'>;
|
|
5
|
+
interface NumberFieldRootSharedProps extends NumberFieldRootNativeProps {
|
|
6
|
+
/** Compound label, group, input, stepper, description, and error parts. */
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
/** Prevents editing, stepping, and focus. Defaults to `false`. */
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
/** Locale-aware number formatting options. */
|
|
11
|
+
formatOptions?: Intl.NumberFormatOptions;
|
|
12
|
+
/** Exposes invalid state to assistive technology and error styling. Defaults to `false`. */
|
|
13
|
+
invalid?: boolean;
|
|
14
|
+
/** Largest permitted value. */
|
|
15
|
+
max?: number;
|
|
16
|
+
/** Smallest permitted value. */
|
|
17
|
+
min?: number;
|
|
18
|
+
/** Marks the field as required for native validation and assistive technology. Defaults to `false`. */
|
|
19
|
+
required?: boolean;
|
|
20
|
+
/** Ref to the rendered field container. */
|
|
21
|
+
ref?: Ref<HTMLDivElement>;
|
|
22
|
+
/** Amount applied by stepper buttons and arrow keys. Defaults to `1`. */
|
|
23
|
+
step?: number;
|
|
24
|
+
}
|
|
25
|
+
interface ControlledNumberFieldRootProps {
|
|
26
|
+
/** Current number, or `null` for an empty input. */
|
|
27
|
+
value: number | null;
|
|
28
|
+
/** Called with the next number, or `null` when the input becomes empty. */
|
|
29
|
+
onChange: (value: number | null) => void;
|
|
30
|
+
defaultValue?: never;
|
|
31
|
+
readOnly?: false;
|
|
32
|
+
}
|
|
33
|
+
interface ReadOnlyNumberFieldRootProps {
|
|
34
|
+
/** Current immutable number, or `null` for an empty input. */
|
|
35
|
+
value: number | null;
|
|
36
|
+
/** Marks a controlled value as intentionally immutable. */
|
|
37
|
+
readOnly: true;
|
|
38
|
+
defaultValue?: never;
|
|
39
|
+
onChange?: never;
|
|
40
|
+
}
|
|
41
|
+
interface UncontrolledNumberFieldRootProps {
|
|
42
|
+
/** Initial number, or `null` for an empty input. */
|
|
43
|
+
defaultValue?: number | null;
|
|
44
|
+
/** Called with the next number, or `null` when the input becomes empty. */
|
|
45
|
+
onChange?: (value: number | null) => void;
|
|
46
|
+
readOnly?: false;
|
|
47
|
+
value?: never;
|
|
48
|
+
}
|
|
49
|
+
/** Props for controlled, read-only, or uncontrolled numeric field state. */
|
|
50
|
+
export type NumberFieldRootProps = NumberFieldRootSharedProps & (ControlledNumberFieldRootProps | ReadOnlyNumberFieldRootProps | UncontrolledNumberFieldRootProps);
|
|
51
|
+
/** Props for the visible numeric field label. */
|
|
52
|
+
export type NumberFieldLabelProps = TextFieldLabelProps;
|
|
53
|
+
/** Props for the numeric input and stepper layout group. */
|
|
54
|
+
export interface NumberFieldGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {
|
|
55
|
+
/** Numeric input and stepper buttons. */
|
|
56
|
+
children: ReactNode;
|
|
57
|
+
/** Ref to the rendered group. */
|
|
58
|
+
ref?: Ref<HTMLDivElement>;
|
|
59
|
+
}
|
|
60
|
+
/** Props for the native locale-aware numeric input part. */
|
|
61
|
+
export interface NumberFieldInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'children' | 'className' | 'defaultValue' | 'disabled' | 'max' | 'min' | 'onChange' | 'readOnly' | 'required' | 'size' | 'step' | 'style' | 'type' | 'value'> {
|
|
62
|
+
/** Placement and composition classes. */
|
|
63
|
+
className?: string;
|
|
64
|
+
/** Ref to the rendered input. */
|
|
65
|
+
ref?: Ref<HTMLInputElement>;
|
|
66
|
+
/** Canonical control size. Defaults to `md`. */
|
|
67
|
+
size?: ControlSize;
|
|
68
|
+
}
|
|
69
|
+
/** Props shared by numeric increment and decrement actions. */
|
|
70
|
+
export interface NumberFieldStepButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'onClickCapture' | 'style' | 'type'> {
|
|
71
|
+
/** Accessible action name describing the step direction. */
|
|
72
|
+
'aria-label': string;
|
|
73
|
+
/** Visible stepper content. */
|
|
74
|
+
children: ReactNode;
|
|
75
|
+
/** Ref to the rendered stepper button. */
|
|
76
|
+
ref?: Ref<HTMLButtonElement>;
|
|
77
|
+
/** Canonical square control size. Defaults to `md`. */
|
|
78
|
+
size?: ControlSize;
|
|
79
|
+
}
|
|
80
|
+
/** Props for supporting text associated with the numeric input. */
|
|
81
|
+
export type NumberFieldDescriptionProps = TextFieldDescriptionProps;
|
|
82
|
+
/** Props for an accessible numeric validation message. */
|
|
83
|
+
export type NumberFieldErrorProps = TextFieldErrorProps;
|
|
84
|
+
/** Coordinates locale-aware numeric state, constraints, and compound anatomy. */
|
|
85
|
+
export declare function Root({ children, className, defaultValue, disabled, formatOptions, invalid, max, min, onChange, readOnly, ref, required, step, value, ...props }: Readonly<NumberFieldRootProps>): ReactElement;
|
|
86
|
+
/** Groups the NumberField input and stepper buttons as one interactive control. */
|
|
87
|
+
export declare function Group({ className, ref, ...props }: Readonly<NumberFieldGroupProps>): ReactElement;
|
|
88
|
+
/** Renders the editable locale-aware spinbutton for a NumberField. */
|
|
89
|
+
export declare function Input({ className, ref, size, ...props }: Readonly<NumberFieldInputProps>): ReactElement;
|
|
90
|
+
/** Decreases the NumberField value by its configured step. */
|
|
91
|
+
export declare function DecrementButton({ 'aria-label': ariaLabel, children, ref, size, ...props }: Readonly<NumberFieldStepButtonProps>): ReactElement;
|
|
92
|
+
/** Increases the NumberField value by its configured step. */
|
|
93
|
+
export declare function IncrementButton({ 'aria-label': ariaLabel, children, ref, size, ...props }: Readonly<NumberFieldStepButtonProps>): ReactElement;
|
|
94
|
+
/**
|
|
95
|
+
* Accessible compound locale-aware numeric-entry primitive.
|
|
96
|
+
*
|
|
97
|
+
* @summary locale-aware numeric entry with optional stepper controls
|
|
98
|
+
*/
|
|
99
|
+
export declare const NumberField: {
|
|
100
|
+
/** Decrement action. */
|
|
101
|
+
DecrementButton: typeof DecrementButton;
|
|
102
|
+
/** Supporting guidance associated with the numeric input. */
|
|
103
|
+
Description: typeof import("../TextField/TextField").Description;
|
|
104
|
+
/** Validation message associated with an invalid numeric input. */
|
|
105
|
+
Error: typeof import("../TextField/TextField").Error;
|
|
106
|
+
/** Numeric input and stepper layout group. */
|
|
107
|
+
Group: typeof Group;
|
|
108
|
+
/** Increment action. */
|
|
109
|
+
IncrementButton: typeof IncrementButton;
|
|
110
|
+
/** Locale-aware native spinbutton. */
|
|
111
|
+
Input: typeof Input;
|
|
112
|
+
/** Persistent accessible label. */
|
|
113
|
+
Label: typeof import("../TextField/TextField").Label;
|
|
114
|
+
/** State, constraints, and accessibility root. */
|
|
115
|
+
Root: typeof Root;
|
|
116
|
+
};
|
|
117
|
+
export {};
|
|
118
|
+
//# sourceMappingURL=NumberField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NumberField.d.ts","sourceRoot":"","sources":["../../../src/primitives/NumberField/NumberField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EAEpB,cAAc,EACd,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,GAAG,EACJ,MAAM,OAAO,CAAC;AASf,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAEjE,OAAO,EAEL,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACzB,MAAM,wBAAwB,CAAC;AA4BhC,KAAK,0BAA0B,GAAG,IAAI,CACpC,cAAc,CAAC,cAAc,CAAC,EAC9B,UAAU,GAAG,cAAc,GAAG,UAAU,GAAG,OAAO,CACnD,CAAC;AAEF,UAAU,0BAA2B,SAAQ,0BAA0B;IACrE,2EAA2E;IAC3E,QAAQ,EAAE,SAAS,CAAC;IACpB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8CAA8C;IAC9C,aAAa,CAAC,EAAE,IAAI,CAAC,mBAAmB,CAAC;IACzC,4FAA4F;IAC5F,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,+BAA+B;IAC/B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,gCAAgC;IAChC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,uGAAuG;IACvG,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,2CAA2C;IAC3C,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IAC1B,yEAAyE;IACzE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,UAAU,8BAA8B;IACtC,oDAAoD;IACpD,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,2EAA2E;IAC3E,QAAQ,EAAE,CAAC,KAAK,EAAE,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AA8D;AAC9D,wBAAgB,eAAe,CAAC,EAC9B,YAAY,EAAE,SAAS,EACvB,QAAQ,EACR,GAAG,EACH,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,QAAQ,CAAC,0BAA0B,CAAC,GAAG,YAAY,CAYrD;AAED,8DAA8D;AAC9D,wBAAgB,eAAe,CAAC,EAC9B,YAAY,EAAE,SAAS,EACvB,QAAQ,EACR,GAAG,EACH,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,QAAQ,CAAC,0BAA0B,CAAC,GAAG,YAAY,CAYrD;AAED;;;;GAIG;AACH,eAAO,MAAM,WAAW;IACtB,wBAAwB;;IAExB,6DAA6D;;IAE7D,mEAAmE;;IAEnE,8CAA8C;;IAE9C,wBAAwB;;IAExB,sCAAsC;;IAEtC,mCAAmC;;IAEnC,kDAAkD;;CAEnD,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';
|
|
2
|
+
import { SharedOverlayClose, type SharedOverlayCloseProps, SharedOverlayDescription, type SharedOverlayDescriptionProps, SharedOverlayTitle, type SharedOverlayTitleProps, SharedOverlayTrigger, type SharedOverlayTriggerProps } from '../../internal/react-aria/OverlayParts';
|
|
3
|
+
interface PopoverRootSharedProps {
|
|
4
|
+
/** Trigger and content. */ children: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
interface ControlledPopoverRootProps {
|
|
7
|
+
/** Current open state. */ open: boolean;
|
|
8
|
+
/** Called with next open state. */ onOpenChange: (open: boolean) => void;
|
|
9
|
+
defaultOpen?: never;
|
|
10
|
+
readOnly?: false;
|
|
11
|
+
}
|
|
12
|
+
interface ReadOnlyPopoverRootProps {
|
|
13
|
+
/** Current immutable open state. */ open: boolean;
|
|
14
|
+
/** Marks controlled state immutable. */ readOnly: true;
|
|
15
|
+
defaultOpen?: never;
|
|
16
|
+
onOpenChange?: never;
|
|
17
|
+
}
|
|
18
|
+
interface UncontrolledPopoverRootProps {
|
|
19
|
+
/** Initial open state. */ defaultOpen?: boolean;
|
|
20
|
+
/** Called with next open state. */ onOpenChange?: (open: boolean) => void;
|
|
21
|
+
open?: never;
|
|
22
|
+
readOnly?: false;
|
|
23
|
+
}
|
|
24
|
+
/** Props for controlled, read-only, or uncontrolled popover state. */ export type PopoverRootProps = PopoverRootSharedProps & (ControlledPopoverRootProps | ReadOnlyPopoverRootProps | UncontrolledPopoverRootProps);
|
|
25
|
+
/** Props for the popover trigger. */ export type PopoverTriggerProps = SharedOverlayTriggerProps;
|
|
26
|
+
/** Props for positioned popover content. */ export interface PopoverContentProps extends Omit<HTMLAttributes<HTMLElement>, 'style'> {
|
|
27
|
+
/** Popover anatomy. */ children: ReactNode;
|
|
28
|
+
/** Allows outside pointer dismissal. Defaults to `true`. */ dismissible?: boolean;
|
|
29
|
+
/** Prevents Escape dismissal. */ keyboardDismissDisabled?: boolean;
|
|
30
|
+
/** Traps outside interaction when true. Defaults to `false`. */ modal?: boolean;
|
|
31
|
+
/** Gap from trigger. Defaults to `8`. */ offset?: number;
|
|
32
|
+
/** Logical placement. Defaults to `bottom start`. */ placement?: 'top' | 'bottom' | 'left' | 'right' | 'top start' | 'top end' | 'bottom start' | 'bottom end';
|
|
33
|
+
/** Ref to rendered dialog surface. */ ref?: Ref<HTMLElement>;
|
|
34
|
+
}
|
|
35
|
+
/** Props for required popover title. */ export type PopoverTitleProps = SharedOverlayTitleProps;
|
|
36
|
+
/** Props for required popover description. */ export type PopoverDescriptionProps = SharedOverlayDescriptionProps;
|
|
37
|
+
/** Props for semantic popover close action. */ export type PopoverCloseProps = SharedOverlayCloseProps;
|
|
38
|
+
/** Coordinates non-modal contextual content anchored to a trigger. */
|
|
39
|
+
export declare function Root({ defaultOpen, onOpenChange, open, readOnly: _readOnly, ...props }: Readonly<PopoverRootProps>): ReactElement;
|
|
40
|
+
export declare function Content({ children, className, dismissible, keyboardDismissDisabled, modal, offset, placement, ref, ...props }: Readonly<PopoverContentProps>): ReactElement;
|
|
41
|
+
/**
|
|
42
|
+
* Accessible compound positioned popover primitive.
|
|
43
|
+
*
|
|
44
|
+
* @summary contextual modal or nonmodal dialog anchored to a trigger
|
|
45
|
+
*/
|
|
46
|
+
export declare const Popover: {
|
|
47
|
+
/** Semantic action that closes the popover. */
|
|
48
|
+
Close: typeof SharedOverlayClose;
|
|
49
|
+
/** Positioned modal or nonmodal dialog surface. */
|
|
50
|
+
Content: typeof Content;
|
|
51
|
+
/** Required accessible popover description. */
|
|
52
|
+
Description: typeof SharedOverlayDescription;
|
|
53
|
+
/** Controlled, read-only, or uncontrolled open-state coordinator. */
|
|
54
|
+
Root: typeof Root;
|
|
55
|
+
/** Required accessible popover title. */
|
|
56
|
+
Title: typeof SharedOverlayTitle;
|
|
57
|
+
/** Semantic action that opens the popover. */
|
|
58
|
+
Trigger: typeof SharedOverlayTrigger;
|
|
59
|
+
};
|
|
60
|
+
export {};
|
|
61
|
+
//# sourceMappingURL=Popover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/primitives/Popover/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,cAAc,EACd,YAAY,EACZ,SAAS,EACT,GAAG,EACJ,MAAM,OAAO,CAAC;AASf,OAAO,EAEL,kBAAkB,EAClB,KAAK,uBAAuB,EAC5B,wBAAwB,EACxB,KAAK,6BAA6B,EAClC,kBAAkB,EAClB,KAAK,uBAAuB,EAC5B,oBAAoB,EACpB,KAAK,yBAAyB,EAC/B,MAAM,wCAAwC,CAAC;AAMhD,UAAU,sBAAsB;IAC9B,2BAA2B,CAAC,QAAQ,EAAE,SAAS,CAAC;CACjD;AACD,UAAU,0BAA0B;IAClC,0BAA0B,CAAC,IAAI,EAAE,OAAO,CAAC;IACzC,mCAAmC,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1E,WAAW,CAAC,EAAE,KAAK,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AM,iBAAiB,GACpE,uBAAuB,CAAC;AAC1B,8CAA8C,CAAC,MAAM,MAAM,uBAAuB,GAChF,6BAA6B,CAAC;AAChC,+CAA+C,CAAC,MAAM,MAAM,iBAAiB,GAC3E,uBAAuB,CAAC;AAE1B,sEAAsE;AACtE,wBAAgB,IAAI,CAAC,EACnB,WAAW,EACX,YAAY,EACZ,IAAI,EACJ,QAAQ,EAAE,SAAS,EACnB,GAAG,KAAK,EACT,EAAE,QAAQ,CAAC,gBAAgB,CAAC,GAAG,YAAY,CAQ3C;AACD,wBAAgB,OAAO,CAAC,EACtB,QAAQ,EACR,SAAS,EACT,WAAkB,EAClB,uBAA+B,EAC/B,KAAa,EACb,MAAU,EACV,SAA0B,EAC1B,GAAG,EACH,GAAG,KAAK,EACT,EAAE,QAAQ,CAAC,mBAAmB,CAAC,GAAG,YAAY,CA4B9C;AACD;;;;GAIG;AACH,eAAO,MAAM,OAAO;IAClB,+CAA+C;;IAE/C,mDAAmD;;IAEnD,+CAA+C;;IAE/C,qEAAqE;;IAErE,yCAAyC;;IAEzC,8CAA8C;;CAE/C,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';
|
|
2
|
+
import type { VisualVariant } from '../../internal/styling/visual';
|
|
3
|
+
type ProgressBarNativeProps = Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'role' | 'style'>;
|
|
4
|
+
interface ProgressBarSharedProps extends ProgressBarNativeProps {
|
|
5
|
+
/** Visible application-owned translated progress label. */
|
|
6
|
+
label: ReactNode;
|
|
7
|
+
/** Maximum range value. Defaults to `100`. */
|
|
8
|
+
maximum?: number;
|
|
9
|
+
/** Minimum range value. Defaults to `0`. */
|
|
10
|
+
minimum?: number;
|
|
11
|
+
/** Ref to the rendered progress element. */
|
|
12
|
+
ref?: Ref<HTMLDivElement>;
|
|
13
|
+
/** Bootstrap-aligned semantic colour. Defaults to `primary`. */
|
|
14
|
+
variant?: VisualVariant;
|
|
15
|
+
}
|
|
16
|
+
interface DeterminateProgressBarProps {
|
|
17
|
+
/** Excluded or false when progress has a measurable value. */
|
|
18
|
+
indeterminate?: false;
|
|
19
|
+
/** Current progress value within the configured range. */
|
|
20
|
+
value: number;
|
|
21
|
+
/** Optional translated value announced instead of the numeric value. */
|
|
22
|
+
valueText?: string;
|
|
23
|
+
}
|
|
24
|
+
interface IndeterminateProgressBarProps {
|
|
25
|
+
/** Marks progress as ongoing without a measurable value. */
|
|
26
|
+
indeterminate: true;
|
|
27
|
+
/** Excluded because indeterminate progress has no current value. */
|
|
28
|
+
value?: never;
|
|
29
|
+
/** Excluded because indeterminate progress has no current value text. */
|
|
30
|
+
valueText?: never;
|
|
31
|
+
}
|
|
32
|
+
/** Props for determinate or indeterminate operation progress. */
|
|
33
|
+
export type ProgressBarProps = ProgressBarSharedProps & (DeterminateProgressBarProps | IndeterminateProgressBarProps);
|
|
34
|
+
/**
|
|
35
|
+
* Shows measurable or indeterminate operation progress with range semantics.
|
|
36
|
+
*
|
|
37
|
+
* @summary labelled determinate or indeterminate operation progress
|
|
38
|
+
*/
|
|
39
|
+
export declare function ProgressBar({ className, indeterminate, label, maximum, minimum, ref, value, valueText, variant, ...props }: Readonly<ProgressBarProps>): ReactElement;
|
|
40
|
+
export {};
|
|
41
|
+
//# sourceMappingURL=ProgressBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProgressBar.d.ts","sourceRoot":"","sources":["../../../src/primitives/ProgressBar/ProgressBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,cAAc,EACd,YAAY,EACZ,SAAS,EACT,GAAG,EACJ,MAAM,OAAO,CAAC;AAMf,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AA6BnE,KAAK,sBAAsB,GAAG,IAAI,CAChC,cAAc,CAAC,cAAc,CAAC,EAC9B,UAAU,GAAG,MAAM,GAAG,OAAO,CAC9B,CAAC;AAEF,UAAU,sBAAuB,SAAQ,sBAAsB;IAC7D,2DAA2D;IAC3D,KAAK,EAAE,SAAS,CAAC;IACjB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4CAA4C;IAC5C,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IAC1B,gEAAgE;IAChE,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB;AAED,UAAU,2BAA2B;IACnC,8DAA8D;IAC9D,aAAa,CAAC,EAAE,KAAK,CAAC;IACtB,0DAA0D;IAC1D,KAAK,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,6BAA6B;IACrC,4DAA4D;IAC5D,aAAa,EAAE,IAAI,CAAC;IACpB,oEAAoE;IACpE,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,yEAAyE;IACzE,SAAS,CAAC,EAAE,KAAK,CAAC;CACnB;AAED,iEAAiE;AACjE,MAAM,MAAM,gBAAgB,GAAG,sBAAsB,GACnD,CAAC,2BAA2B,GAAG,6BAA6B,CAAC,CAAC;AAEhE;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAC1B,SAAS,EACT,aAAqB,EACrB,KAAK,EACL,OAAa,EACb,OAAW,EACX,GAAG,EACH,KAAK,EACL,SAAS,EACT,OAAmB,EACnB,GAAG,KAAK,EACT,EAAE,QAAQ,CAAC,gBAAgB,CAAC,GAAG,YAAY,CA2D3C"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import type { HTMLAttributes, LabelHTMLAttributes, ReactElement, ReactNode, Ref, RefObject } from 'react';
|
|
2
|
+
import type { ControlSize } from '../../internal/styling/visual';
|
|
3
|
+
import { type TextFieldDescriptionProps, type TextFieldErrorProps, type TextFieldLabelProps } from '../TextField/TextField';
|
|
4
|
+
type RadioGroupRootNativeProps = Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'defaultValue' | 'onChange' | 'style'>;
|
|
5
|
+
interface RadioGroupRootSharedProps extends RadioGroupRootNativeProps {
|
|
6
|
+
/** Compound label, radio items, description, and error parts. */
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
/** Prevents focus and selection changes for every option. Defaults to `false`. */
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
/** Exposes invalid group state to assistive technology and error styling. Defaults to `false`. */
|
|
11
|
+
invalid?: boolean;
|
|
12
|
+
/** Native form field name shared by every radio option. */
|
|
13
|
+
name?: string;
|
|
14
|
+
/** Option layout and arrow-key navigation axis. Defaults to `vertical`. */
|
|
15
|
+
orientation?: 'horizontal' | 'vertical';
|
|
16
|
+
/** Marks the radio group as requiring a selection. Defaults to `false`. */
|
|
17
|
+
required?: boolean;
|
|
18
|
+
/** Ref to the rendered radio group. */
|
|
19
|
+
ref?: Ref<HTMLDivElement>;
|
|
20
|
+
}
|
|
21
|
+
interface ControlledRadioGroupRootProps {
|
|
22
|
+
/** Current selected option, or `null` when no option is selected. */
|
|
23
|
+
selection: string | null;
|
|
24
|
+
/** Called with the next selected option value. */
|
|
25
|
+
onSelectionChange: (selection: string) => void;
|
|
26
|
+
defaultSelection?: never;
|
|
27
|
+
readOnly?: false;
|
|
28
|
+
}
|
|
29
|
+
interface ReadOnlyRadioGroupRootProps {
|
|
30
|
+
/** Current immutable option, or `null` when no option is selected. */
|
|
31
|
+
selection: string | null;
|
|
32
|
+
/** Marks a controlled selection as intentionally immutable. */
|
|
33
|
+
readOnly: true;
|
|
34
|
+
defaultSelection?: never;
|
|
35
|
+
onSelectionChange?: never;
|
|
36
|
+
}
|
|
37
|
+
interface UncontrolledRadioGroupRootProps {
|
|
38
|
+
/** Initial selected option. Defaults to no selection. */
|
|
39
|
+
defaultSelection?: string;
|
|
40
|
+
/** Called with the next selected option value. */
|
|
41
|
+
onSelectionChange?: (selection: string) => void;
|
|
42
|
+
readOnly?: false;
|
|
43
|
+
selection?: never;
|
|
44
|
+
}
|
|
45
|
+
/** Props for controlled, read-only, or uncontrolled radio-group selection. */
|
|
46
|
+
export type RadioGroupRootProps = RadioGroupRootSharedProps & (ControlledRadioGroupRootProps | ReadOnlyRadioGroupRootProps | UncontrolledRadioGroupRootProps);
|
|
47
|
+
/** Props for the visible radio-group label. */
|
|
48
|
+
export type RadioGroupLabelProps = TextFieldLabelProps;
|
|
49
|
+
/** Props for supporting text associated with the radio group. */
|
|
50
|
+
export type RadioGroupDescriptionProps = TextFieldDescriptionProps;
|
|
51
|
+
/** Props for an accessible radio-group validation message. */
|
|
52
|
+
export type RadioGroupErrorProps = TextFieldErrorProps;
|
|
53
|
+
/** Props for one radio option and its optional description. */
|
|
54
|
+
export interface RadioGroupItemProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'style'> {
|
|
55
|
+
/** Compound control and optional item description. */
|
|
56
|
+
children: ReactNode;
|
|
57
|
+
/** Prevents selection of this option. Defaults to `false`. */
|
|
58
|
+
disabled?: boolean;
|
|
59
|
+
/** Ref to the hidden native radio input. */
|
|
60
|
+
inputRef?: RefObject<HTMLInputElement | null>;
|
|
61
|
+
/** Ref to the rendered option field. */
|
|
62
|
+
ref?: Ref<HTMLDivElement>;
|
|
63
|
+
/** Stable native form value for this option. */
|
|
64
|
+
value: string;
|
|
65
|
+
}
|
|
66
|
+
/** Props for the clickable radio option and native label. */
|
|
67
|
+
export interface RadioGroupControlProps extends Omit<LabelHTMLAttributes<HTMLLabelElement>, 'onClick' | 'onClickCapture' | 'style'> {
|
|
68
|
+
/** Indicator and persistent option label. */
|
|
69
|
+
children: ReactNode;
|
|
70
|
+
/** Ref to the rendered native label. */
|
|
71
|
+
ref?: Ref<HTMLLabelElement>;
|
|
72
|
+
}
|
|
73
|
+
/** Props for the visual radio selection indicator. */
|
|
74
|
+
export interface RadioGroupIndicatorProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children' | 'style'> {
|
|
75
|
+
/** Ref to the rendered indicator. */
|
|
76
|
+
ref?: Ref<HTMLSpanElement>;
|
|
77
|
+
/** Canonical indicator size. Defaults to `md`. */
|
|
78
|
+
size?: ControlSize;
|
|
79
|
+
}
|
|
80
|
+
/** Props for persistent visible radio-option label text. */
|
|
81
|
+
export interface RadioGroupItemLabelProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'style'> {
|
|
82
|
+
/** Text naming the radio option. */
|
|
83
|
+
children: ReactNode;
|
|
84
|
+
/** Ref to the rendered option label text. */
|
|
85
|
+
ref?: Ref<HTMLSpanElement>;
|
|
86
|
+
}
|
|
87
|
+
/** Props for supporting text associated with one radio option. */
|
|
88
|
+
export type RadioGroupItemDescriptionProps = TextFieldDescriptionProps;
|
|
89
|
+
/** Coordinates exclusive selection, validation, orientation, and native form naming. */
|
|
90
|
+
export declare function Root({ children, className, defaultSelection, disabled, invalid, name, onSelectionChange, orientation, readOnly, ref, required, selection, ...props }: Readonly<RadioGroupRootProps>): ReactElement;
|
|
91
|
+
/** Renders one radio option field with native form value and optional guidance. */
|
|
92
|
+
export declare function Item({ children, className, disabled, inputRef, ref, value, ...props }: Readonly<RadioGroupItemProps>): ReactElement;
|
|
93
|
+
/** Renders the persistent accessible label owned by the radio group. */
|
|
94
|
+
export declare function Label({ className, ref, ...props }: Readonly<RadioGroupLabelProps>): ReactElement;
|
|
95
|
+
/** Renders supporting guidance on its own radio-group row. */
|
|
96
|
+
export declare function Description(props: Readonly<RadioGroupDescriptionProps>): ReactElement;
|
|
97
|
+
/** Renders associated validation feedback on its own radio-group row. */
|
|
98
|
+
declare function ErrorMessage(props: Readonly<RadioGroupErrorProps>): ReactElement;
|
|
99
|
+
export { ErrorMessage as Error };
|
|
100
|
+
/** Renders the pointer, touch, and keyboard target for one radio option. */
|
|
101
|
+
export declare function Control({ className, ref, ...props }: Readonly<RadioGroupControlProps>): ReactElement;
|
|
102
|
+
/** Renders the visual selected state for one radio option. */
|
|
103
|
+
export declare function Indicator({ className, ref, size, ...props }: Readonly<RadioGroupIndicatorProps>): ReactElement;
|
|
104
|
+
/** Renders persistent visible label text within RadioGroup.Control. */
|
|
105
|
+
export declare function ItemLabel({ ref, ...props }: Readonly<RadioGroupItemLabelProps>): ReactElement;
|
|
106
|
+
/**
|
|
107
|
+
* Accessible compound exclusive-selection primitive.
|
|
108
|
+
*
|
|
109
|
+
* @summary labelled exclusive selection with native radio semantics
|
|
110
|
+
*/
|
|
111
|
+
export declare const RadioGroup: {
|
|
112
|
+
/** Pointer, touch, and keyboard selection target for one option. */
|
|
113
|
+
Control: typeof Control;
|
|
114
|
+
/** Supporting guidance associated with the group. */
|
|
115
|
+
Description: typeof Description;
|
|
116
|
+
/** Validation message associated with an invalid group. */
|
|
117
|
+
Error: typeof ErrorMessage;
|
|
118
|
+
/** Visual selected-state indicator. */
|
|
119
|
+
Indicator: typeof Indicator;
|
|
120
|
+
/** One radio option field. */
|
|
121
|
+
Item: typeof Item;
|
|
122
|
+
/** Supporting guidance associated with one option. */
|
|
123
|
+
ItemDescription: typeof import("../TextField/TextField").Description;
|
|
124
|
+
/** Persistent visible option label text. */
|
|
125
|
+
ItemLabel: typeof ItemLabel;
|
|
126
|
+
/** Persistent accessible group label. */
|
|
127
|
+
Label: typeof Label;
|
|
128
|
+
/** Selection, validation, orientation, and native form root. */
|
|
129
|
+
Root: typeof Root;
|
|
130
|
+
};
|
|
131
|
+
//# sourceMappingURL=RadioGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../src/primitives/RadioGroup/RadioGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,cAAc,EACd,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,GAAG,EACH,SAAS,EACV,MAAM,OAAO,CAAC;AAUf,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAEjE,OAAO,EAEL,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EAC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T,EAAE,QAAQ,CAAC,sBAAsB,CAAC,GAAG,YAAY,CAQjD;AAED,8DAA8D;AAC9D,wBAAgB,SAAS,CAAC,EACxB,SAAS,EACT,GAAG,EACH,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,QAAQ,CAAC,wBAAwB,CAAC,GAAG,YAAY,CASnD;AAED,uEAAuE;AACvE,wBAAgB,SAAS,CAAC,EACxB,GAAG,EACH,GAAG,KAAK,EACT,EAAE,QAAQ,CAAC,wBAAwB,CAAC,GAAG,YAAY,CAOnD;AAED;;;;GAIG;AACH,eAAO,MAAM,UAAU;IACrB,oEAAoE;;IAEpE,qDAAqD;;IAErD,2DAA2D;;IAE3D,uCAAuC;;IAEvC,8BAA8B;;IAE9B,sDAAsD;;IAEtD,4CAA4C;;IAE5C,yCAAyC;;IAEzC,gEAAgE;;CAEjE,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';
|
|
2
|
+
import type { DateRangeValue } from '../../internal/types/date';
|
|
3
|
+
import { type CalendarButtonPartProps, CalendarGridPart, type CalendarGridPartProps, CalendarHeaderPart, type CalendarHeaderPartProps, CalendarHeadingPart, type CalendarHeadingPartProps, CalendarNextButtonPart, CalendarPreviousButtonPart } from '../date/CalendarParts';
|
|
4
|
+
interface SharedProps extends Omit<HTMLAttributes<HTMLDivElement>, 'defaultValue' | 'onChange' | 'style'> {
|
|
5
|
+
/** Calendar navigation, heading, range grid, and guidance. */ children: ReactNode;
|
|
6
|
+
/** Allows ranges containing unavailable dates. */ allowsNonContiguousRanges?: boolean;
|
|
7
|
+
/** Prevents focus and selection. */ disabled?: boolean;
|
|
8
|
+
/** Exposes invalid selection state. */ invalid?: boolean;
|
|
9
|
+
/** Returns whether a stable date is unavailable. */ isDateUnavailable?: (date: string, anchorDate: string | null) => boolean;
|
|
10
|
+
/** Latest selectable date. */ maxValue?: string;
|
|
11
|
+
/** Earliest selectable date. */ minValue?: string;
|
|
12
|
+
/** Ref to the rendered range-calendar root. */ ref?: Ref<HTMLDivElement>;
|
|
13
|
+
/** Number of visible months. Defaults to `1`. */ visibleMonths?: number;
|
|
14
|
+
}
|
|
15
|
+
type State = {
|
|
16
|
+
/** Current controlled range, or `null` when empty. */ value: DateRangeValue | null;
|
|
17
|
+
/** Called with the next stable range or `null`. */ onChange: (value: DateRangeValue | null) => void;
|
|
18
|
+
/** Excluded when controlled. */ defaultValue?: never;
|
|
19
|
+
/** Mutable controlled calendars cannot be read-only. */ readOnly?: false;
|
|
20
|
+
} | {
|
|
21
|
+
/** Current immutable range, or `null` when empty. */ value: DateRangeValue | null;
|
|
22
|
+
/** Prevents range changes. */ readOnly: true;
|
|
23
|
+
/** Excluded when controlled. */ defaultValue?: never;
|
|
24
|
+
/** Excluded because read-only calendars cannot change. */ onChange?: never;
|
|
25
|
+
} | {
|
|
26
|
+
/** Initial uncontrolled range, or `null` when empty. */ defaultValue?: DateRangeValue | null;
|
|
27
|
+
/** Called with the next stable range or `null`. */ onChange?: (value: DateRangeValue | null) => void;
|
|
28
|
+
/** Uncontrolled calendars cannot be read-only. */ readOnly?: false;
|
|
29
|
+
/** Excluded when uncontrolled. */ value?: never;
|
|
30
|
+
};
|
|
31
|
+
/** Props for stable date-range calendar selection. */
|
|
32
|
+
export type RangeCalendarRootProps = SharedProps & State;
|
|
33
|
+
/** Props for the navigation header. */
|
|
34
|
+
export type RangeCalendarHeaderProps = CalendarHeaderPartProps;
|
|
35
|
+
/** Props for previous and next buttons. */
|
|
36
|
+
export type RangeCalendarButtonProps = CalendarButtonPartProps;
|
|
37
|
+
/** Props for the locale-formatted heading. */
|
|
38
|
+
export type RangeCalendarHeadingProps = CalendarHeadingPartProps;
|
|
39
|
+
/** Props for the range calendar grid. */
|
|
40
|
+
export type RangeCalendarGridProps = CalendarGridPartProps;
|
|
41
|
+
/** Coordinates locale-aware selection of a start and end date. */
|
|
42
|
+
export declare function Root({ allowsNonContiguousRanges, children, className, defaultValue, disabled, invalid, isDateUnavailable, maxValue, minValue, onChange, readOnly, ref, value, visibleMonths, ...props }: Readonly<RangeCalendarRootProps>): ReactElement;
|
|
43
|
+
/**
|
|
44
|
+
* Accessible locale-aware date-range calendar.
|
|
45
|
+
*
|
|
46
|
+
* @summary inclusive ISO date-range selection from calendar grids
|
|
47
|
+
*/
|
|
48
|
+
export declare const RangeCalendar: {
|
|
49
|
+
/** Locale-aware weekday and range grid. */ Grid: typeof CalendarGridPart;
|
|
50
|
+
/** Navigation header container. */ Header: typeof CalendarHeaderPart;
|
|
51
|
+
/** Visible month heading. */ Heading: typeof CalendarHeadingPart;
|
|
52
|
+
/** Next-page navigation. */ NextButton: typeof CalendarNextButtonPart;
|
|
53
|
+
/** Previous-page navigation. */ PreviousButton: typeof CalendarPreviousButtonPart;
|
|
54
|
+
/** Stable range state and constraints. */ Root: typeof Root;
|
|
55
|
+
};
|
|
56
|
+
export {};
|
|
57
|
+
//# sourceMappingURL=RangeCalendar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RangeCalendar.d.ts","sourceRoot":"","sources":["../../../src/primitives/RangeCalendar/RangeCalendar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,cAAc,EACd,YAAY,EACZ,SAAS,EACT,GAAG,EACJ,MAAM,OAAO,CAAC;AAUf,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EACL,KAAK,uBAAuB,EAC5B,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,kBAAkB,EAClB,KAAK,uBAAuB,EAC5B,mBAAmB,EACnB,KAAK,wBAAwB,EAC7B,sBAAsB,EACtB,0BAA0B,EAC3B,MAAM,uBAAuB,CAAC;AAK/B,UAAU,WACR,SAAQ,IAAI,CACV,cAAc,CAAC,cAAc,CAAC,EAC9B,cAAc,GAAG,UAAU,GAAG,OAAO,CACtC;IACD,8DAA8D,CAAC,QAAQ,EAAE,SAAS,CAA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KAAK,CAAC,EAAE,KAAK,CAAC;CAClD,CAAC;AACN,sDAAsD;AACtD,MAAM,MAAM,sBAAsB,GAAG,WAAW,GAAG,KAAK,CAAC;AACzD,uCAAuC;AACvC,MAAM,MAAM,wBAAwB,GAAG,uBAAuB,CAAC;AAC/D,2CAA2C;AAC3C,MAAM,MAAM,wBAAwB,GAAG,uBAAuB,CAAC;AAC/D,8CAA8C;AAC9C,MAAM,MAAM,yBAAyB,GAAG,wBAAwB,CAAC;AACjE,yCAAyC;AACzC,MAAM,MAAM,sBAAsB,GAAG,qBAAqB,CAAC;AAE3D,kEAAkE;AAClE,wBAAgB,IAAI,CAAC,EACnB,yBAAiC,EACjC,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,QAAgB,EAChB,OAAe,EACf,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAgB,EAChB,GAAG,EACH,KAAK,EACL,aAAiB,EACjB,GAAG,KAAK,EACT,EAAE,QAAQ,CAAC,sBAAsB,CAAC,GAAG,YAAY,CAyBjD;AACD;;;;GAIG;AACH,eAAO,MAAM,aAAa;IACxB,2CAA2C;IAC3C,mCAAmC;IACnC,6BAA6B;IAC7B,4BAA4B;IAC5B,gCAAgC;IAChC,0CAA0C;CAC3C,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';
|
|
2
|
+
import type { ControlSize } from '../../internal/styling/visual';
|
|
3
|
+
import { type TextFieldDescriptionProps, type TextFieldErrorProps, type TextFieldInputProps, type TextFieldLabelProps, type TextFieldRootProps } from '../TextField/TextField';
|
|
4
|
+
interface SearchFieldRootCallbacks {
|
|
5
|
+
/** Called after the query is cleared with the clear button or Escape key. */
|
|
6
|
+
onClear?: () => void;
|
|
7
|
+
/** Called with the current query when the user submits the search. */
|
|
8
|
+
onSubmit?: (value: string) => void;
|
|
9
|
+
}
|
|
10
|
+
/** Props for controlled, read-only, or uncontrolled search field state. */
|
|
11
|
+
export type SearchFieldRootProps = TextFieldRootProps & SearchFieldRootCallbacks;
|
|
12
|
+
/** Props for the visible search field label. */
|
|
13
|
+
export type SearchFieldLabelProps = TextFieldLabelProps;
|
|
14
|
+
/** Props for the single-surface search input and clear-action group. */
|
|
15
|
+
export interface SearchFieldGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {
|
|
16
|
+
/** Search input and optional clear action. */
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
/** Ref to the rendered group. */
|
|
19
|
+
ref?: Ref<HTMLDivElement>;
|
|
20
|
+
/** Canonical size applied to every grouped control part. Defaults to `md`. */
|
|
21
|
+
size?: ControlSize;
|
|
22
|
+
}
|
|
23
|
+
/** Props for the native search input part. */
|
|
24
|
+
export type SearchFieldInputProps = Omit<TextFieldInputProps, 'type'>;
|
|
25
|
+
/** Props for supporting text associated with the search input. */
|
|
26
|
+
export type SearchFieldDescriptionProps = TextFieldDescriptionProps;
|
|
27
|
+
/** Props for an accessible search validation message. */
|
|
28
|
+
export type SearchFieldErrorProps = TextFieldErrorProps;
|
|
29
|
+
/** Props for the search clear action. */
|
|
30
|
+
export interface SearchFieldClearButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'onClick' | 'onClickCapture' | 'style' | 'type'> {
|
|
31
|
+
/** Accessible action name. Defaults to the provider's `clear` message. */
|
|
32
|
+
'aria-label'?: string;
|
|
33
|
+
/** Optional clear-action content. Defaults to the Breeze close icon. */
|
|
34
|
+
children?: ReactNode;
|
|
35
|
+
/** Ref to the rendered clear button. */
|
|
36
|
+
ref?: Ref<HTMLButtonElement>;
|
|
37
|
+
/** Standalone action size. A containing Group takes precedence. Defaults to `md`. */
|
|
38
|
+
size?: ControlSize;
|
|
39
|
+
}
|
|
40
|
+
/** Coordinates accessible query state, submission, clearing, and compound anatomy. */
|
|
41
|
+
export declare function Root({ children, className, defaultValue, disabled, invalid, onChange, onClear, onSubmit, readOnly, ref, required, value, ...props }: Readonly<SearchFieldRootProps>): ReactElement;
|
|
42
|
+
/** Groups the SearchField input and clear action as one visual control. */
|
|
43
|
+
export declare function Group({ className, ref, role, size, ...props }: Readonly<SearchFieldGroupProps>): ReactElement;
|
|
44
|
+
/** Renders the native search input for a SearchField. */
|
|
45
|
+
export declare function Input({ className, size, ...props }: Readonly<SearchFieldInputProps>): ReactElement;
|
|
46
|
+
/** Clears the current SearchField value with pointer or keyboard activation. */
|
|
47
|
+
export declare function ClearButton({ 'aria-label': ariaLabel, children, className, ref, size, ...props }: Readonly<SearchFieldClearButtonProps>): ReactElement | null;
|
|
48
|
+
/**
|
|
49
|
+
* Accessible compound search-query primitive.
|
|
50
|
+
*
|
|
51
|
+
* @summary labelled search entry with submission and clearing
|
|
52
|
+
*/
|
|
53
|
+
export declare const SearchField: {
|
|
54
|
+
/** Query clear action. */
|
|
55
|
+
ClearButton: typeof ClearButton;
|
|
56
|
+
/** Supporting guidance associated with the search input. */
|
|
57
|
+
Description: typeof import("../TextField/TextField").Description;
|
|
58
|
+
/** Validation message associated with an invalid search input. */
|
|
59
|
+
Error: typeof import("../TextField/TextField").Error;
|
|
60
|
+
/** Single-surface input and clear-action composition. */
|
|
61
|
+
Group: typeof Group;
|
|
62
|
+
/** Native search input. */
|
|
63
|
+
Input: typeof Input;
|
|
64
|
+
/** Persistent accessible label. */
|
|
65
|
+
Label: typeof import("../TextField/TextField").Label;
|
|
66
|
+
/** State, submission, and accessibility root. */
|
|
67
|
+
Root: typeof Root;
|
|
68
|
+
};
|
|
69
|
+
export {};
|
|
70
|
+
//# sourceMappingURL=SearchField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchField.d.ts","sourceRoot":"","sources":["../../../src/primitives/SearchField/SearchField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EAEpB,cAAc,EACd,YAAY,EACZ,SAAS,EACT,GAAG,EACJ,MAAM,OAAO,CAA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