@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,110 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';
|
|
2
|
+
import type { ControlSize } from '../../internal/styling/visual';
|
|
3
|
+
import type { BreezeCollectionItem, CollectionContentProps, CollectionKey } from '../../internal/types/collection';
|
|
4
|
+
import { type ListBoxItemProps } from '../ListBox/ListBox';
|
|
5
|
+
import { type TextFieldDescriptionProps, type TextFieldErrorProps, type TextFieldLabelProps } from '../TextField/TextField';
|
|
6
|
+
type NativeRoot = Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'defaultValue' | 'onChange' | 'style'>;
|
|
7
|
+
interface SharedRoot extends NativeRoot {
|
|
8
|
+
/** Compound label, trigger, popover, listbox, description, and error parts. */ children: ReactNode;
|
|
9
|
+
/** Prevents focus and selection. Defaults to `false`. */ disabled?: boolean;
|
|
10
|
+
/** Associates the native form value with an external form. */ form?: string;
|
|
11
|
+
/** Exposes invalid state. Defaults to `false`. */ invalid?: boolean;
|
|
12
|
+
/** Native form field name. */ name?: string;
|
|
13
|
+
/** Placeholder shown before selection. */ placeholder?: string;
|
|
14
|
+
/** Marks the select as required. Defaults to `false`. */ required?: boolean;
|
|
15
|
+
/** Ref to the rendered field root. */ ref?: Ref<HTMLDivElement>;
|
|
16
|
+
}
|
|
17
|
+
interface Controlled {
|
|
18
|
+
/** Current selected key, or `null` when no option is selected. */
|
|
19
|
+
value: CollectionKey | null;
|
|
20
|
+
/** Called when the selected key changes. */
|
|
21
|
+
onChange: (value: CollectionKey | null) => void;
|
|
22
|
+
/** Excluded when value is controlled. */
|
|
23
|
+
defaultValue?: never;
|
|
24
|
+
/** Controlled mutable state cannot be marked read-only. */
|
|
25
|
+
readOnly?: false;
|
|
26
|
+
}
|
|
27
|
+
interface ReadOnly {
|
|
28
|
+
/** Current immutable selected key, or `null` when no option is selected. */
|
|
29
|
+
value: CollectionKey | null;
|
|
30
|
+
/** Prevents interaction with the controlled value. */
|
|
31
|
+
readOnly: true;
|
|
32
|
+
/** Excluded when value is controlled. */
|
|
33
|
+
defaultValue?: never;
|
|
34
|
+
/** Excluded because read-only values cannot change. */
|
|
35
|
+
onChange?: never;
|
|
36
|
+
}
|
|
37
|
+
interface Uncontrolled {
|
|
38
|
+
/** Initial selected key. */
|
|
39
|
+
defaultValue?: CollectionKey;
|
|
40
|
+
/** Called when the selected key changes. */
|
|
41
|
+
onChange?: (value: CollectionKey | null) => void;
|
|
42
|
+
/** Uncontrolled state cannot be marked read-only. */
|
|
43
|
+
readOnly?: false;
|
|
44
|
+
/** Excluded when value is uncontrolled. */
|
|
45
|
+
value?: never;
|
|
46
|
+
}
|
|
47
|
+
/** Props for controlled, read-only, or uncontrolled single-value select state. */
|
|
48
|
+
export type SelectRootProps = SharedRoot & (Controlled | ReadOnly | Uncontrolled);
|
|
49
|
+
/** Props for the visible select label. */ export type SelectLabelProps = TextFieldLabelProps;
|
|
50
|
+
/** Props for select supporting text. */ export type SelectDescriptionProps = TextFieldDescriptionProps;
|
|
51
|
+
/** Props for a select validation message. */ export type SelectErrorProps = TextFieldErrorProps;
|
|
52
|
+
/** Props for the native select trigger button. */
|
|
53
|
+
export interface SelectTriggerProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'onClickCapture' | 'style'> {
|
|
54
|
+
/** Trigger content. */ children: ReactNode;
|
|
55
|
+
/** Ref to the trigger. */ ref?: Ref<HTMLButtonElement>;
|
|
56
|
+
/** Canonical control size. Defaults to `md`. */ size?: ControlSize;
|
|
57
|
+
}
|
|
58
|
+
/** Props for the displayed selected value. */
|
|
59
|
+
export interface SelectValueProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'style'> {
|
|
60
|
+
/** Optional custom value content. */ children?: ReactNode;
|
|
61
|
+
/** Ref to the value element. */ ref?: Ref<HTMLSpanElement>;
|
|
62
|
+
}
|
|
63
|
+
/** Props for the select popover. */
|
|
64
|
+
export interface SelectPopoverProps extends Omit<HTMLAttributes<HTMLElement>, 'style'> {
|
|
65
|
+
/** Select listbox content. */ children: ReactNode;
|
|
66
|
+
/** Ref to the popover. */ ref?: Ref<HTMLElement>;
|
|
67
|
+
}
|
|
68
|
+
/** Props for static or generic select options. */
|
|
69
|
+
export type SelectListBoxProps<Item extends BreezeCollectionItem = BreezeCollectionItem> = Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'style'> & CollectionContentProps<Item> & {
|
|
70
|
+
/** Empty-state content. */ emptyContent?: ReactNode;
|
|
71
|
+
/** Ref to the listbox. */ ref?: Ref<HTMLDivElement>;
|
|
72
|
+
};
|
|
73
|
+
/** Props for one keyed select option. */ export type SelectItemProps = ListBoxItemProps;
|
|
74
|
+
/** Coordinates select state, validation, and native form participation. */
|
|
75
|
+
export declare function Root({ children, className, defaultValue, disabled, form, invalid, name, onChange, placeholder, readOnly, ref, required, value, ...props }: Readonly<SelectRootProps>): ReactElement;
|
|
76
|
+
/** Renders the select trigger button. */
|
|
77
|
+
export declare function Trigger({ children, className, ref, size, ...props }: Readonly<SelectTriggerProps>): ReactElement;
|
|
78
|
+
/** Renders selected option text or the placeholder. */
|
|
79
|
+
export declare function Value({ className, ref, ...props }: Readonly<SelectValueProps>): ReactElement;
|
|
80
|
+
/** Positions the select listbox relative to its trigger. */
|
|
81
|
+
export declare function Popover({ className, ref, ...props }: Readonly<SelectPopoverProps>): ReactElement;
|
|
82
|
+
/** Renders static or typed generic select options. */
|
|
83
|
+
export declare function ListBox<Item extends BreezeCollectionItem>({ children, className, emptyContent, items, ref, ...props }: Readonly<SelectListBoxProps<Item>>): ReactElement;
|
|
84
|
+
/**
|
|
85
|
+
* Accessible compound native-form select primitive.
|
|
86
|
+
*
|
|
87
|
+
* @summary compact single selection from a keyed option collection
|
|
88
|
+
*/
|
|
89
|
+
export declare const Select: {
|
|
90
|
+
/** Supporting guidance associated with the select. */
|
|
91
|
+
Description: typeof import("../TextField/TextField").Description;
|
|
92
|
+
/** Validation feedback associated with the select. */
|
|
93
|
+
Error: typeof import("../TextField/TextField").Error;
|
|
94
|
+
/** One keyed option within `Select.ListBox`. */
|
|
95
|
+
Item: typeof import("../ListBox/ListBox").Item;
|
|
96
|
+
/** Visible label associated with the select trigger. */
|
|
97
|
+
Label: typeof import("../TextField/TextField").Label;
|
|
98
|
+
/** Static or typed generic option collection. */
|
|
99
|
+
ListBox: typeof ListBox;
|
|
100
|
+
/** Popup positioned relative to the trigger. */
|
|
101
|
+
Popover: typeof Popover;
|
|
102
|
+
/** State, validation, and native-form coordination root. */
|
|
103
|
+
Root: typeof Root;
|
|
104
|
+
/** Button that opens and closes the option popup. */
|
|
105
|
+
Trigger: typeof Trigger;
|
|
106
|
+
/** Selected option text or placeholder content. */
|
|
107
|
+
Value: typeof Value;
|
|
108
|
+
};
|
|
109
|
+
export {};
|
|
110
|
+
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/primitives/Select/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EAEpB,cAAc,EACd,YAAY,EACZ,SAAS,EACT,GAAG,EACJ,MAAM,OAAO,CAAC;AAcf,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,KAAK,EACV,oBAAoB,EACpB,sBAAsB,EACtB,aAAa,EACd,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAEL,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACzB,MAAM,wBAAwB,CAAC;AAWhC,KAAK,UAAU,GAAG,IAAI,CACpB,cAAc,CAAC,cAAc,CAAC,EAC9B,UAAU,GAAG,cAAc,GAAG,UAAU,GAAG,OAAO,CACnD,CAAC;AACF,UAAU,UAAW,SAAQ,UAAU;IACrC,+EAA+E,CAAC,QAAQ,EAAE,SAAS,CAAC;IACpG,yDAAyD,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC7E,8DAA8D,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAC7E,kDAAkD,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IACrE,8BAA8B,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAC7C,0CAA0C,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAChE,yDAAyD,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC7E,sCAAsC,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAClE;AACD,UAAU,UAAU;IAClB,kEAAkE;IAClE,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;IAC5B,4CAA4C;IAC5C,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,KAAK,IAAI,CAAC;IAChD,yCAAyC;IACzC,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,KAAK,CAAC;CAClB;AACD,UAAU,QAAQ;IAChB,4EAA4E;IAC5E,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;IAC5B,sDAAsD;IACtD,QAAQ,EAAE,IAAI,CAAC;IACf,yCAAyC;IACzC,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,uDAAuD;IACvD,QAAQ,CAAC,EAAE,KAAK,CAAC;CAClB;AACD,UAAU,YAAY;IACpB,4BAA4B;IAC5B,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,KAAK,IAAI,CAAC;IACjD,qDAAqD;IACrD,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,2CAA2C;IAC3C,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AACD,kFAAkF;AAClF,MAAM,MAAM,eAAe,GAAG,UAAU,GACtC,CAAC,UAAU,GAAG,QAAQ,GAAG,YAAY,CAAC,CAAC;AACzC,0CAA0C,CAAC,MAAM,MAAM,gBAAgB,GACrE,mBAAmB,CAAC;AACtB,wCAAwC,CAAC,MAAM,MAAM,sBAAsB,GACzE,yBAAyB,CAAC;AAC5B,6CAA6C,CAAC,MAAM,MAAM,gBAAgB,GACxE,mBAAmB,CAAC;AACtB,kDAAkD;AAClD,MAAM,WAAW,kBACf,SAAQ,IAAI,CACV,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,SAAS,GAAG,gBAAgB,GAAG,OAAO,CACvC;IACD,uBAAuB,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC5C,0BAA0B,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACxD,gDAAgD,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC;CACrE;AACD,8CAA8C;AAC9C,MAAM,WAAW,gBACf,SAAQ,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IACtD,qCAAqC,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;IAC3D,gCAAgC,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC;CAC7D;AACD,oCAAoC;AACpC,MAAM,WAAW,kBACf,SAAQ,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAClD,8BAA8B,CAAC,QAAQ,EAAE,SAAS,CAAC;IACnD,0BAA0B,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;CACnD;AACD,kDAAkD;AAClD,MAAM,MAAM,kBAAkB,CAC5B,IAAI,SAAS,oBAAoB,GAAG,oBAAoB,IACtD,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,GAC5D,sBAAsB,CAAC,IAAI,CAAC,GAAG;IAC7B,2BAA2B,CAAC,YAAY,CAAC,EAAE,SAAS,CAAC;IACrD,0BAA0B,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CACtD,CAAC;AACJ,yCAAyC,CAAC,MAAM,MAAM,eAAe,GACnE,gBAAgB,CAAC;AAEnB,2EAA2E;AAC3E,wBAAgB,IAAI,CAAC,EACnB,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,QAAgB,EAChB,IAAI,EACJ,OAAe,EACf,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,QAAgB,EAChB,GAAG,EACH,QAAgB,EAChB,KAAK,EACL,GAAG,KAAK,EACT,EAAE,QAAQ,CAAC,eAAe,CAAC,GAAG,YAAY,CAmB1C;AACD,yCAAyC;AACzC,wBAAgB,OAAO,CAAC,EACtB,QAAQ,EACR,SAAS,EACT,GAAG,EACH,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,QAAQ,CAAC,kBAAkB,CAAC,GAAG,YAAY,CAqB7C;AACD,uDAAuD;AACvD,wBAAgB,KAAK,CAAC,EACpB,SAAS,EACT,GAAG,EACH,GAAG,KAAK,EACT,EAAE,QAAQ,CAAC,gBAAgB,CAAC,GAAG,YAAY,CAO3C;AACD,4DAA4D;AAC5D,wBAAgB,OAAO,CAAC,EACtB,SAAS,EACT,GAAG,EACH,GAAG,KAAK,EACT,EAAE,QAAQ,CAAC,kBAAkB,CAAC,GAAG,YAAY,CAO7C;AACD,sDAAsD;AACtD,wBAAgB,OAAO,CAAC,IAAI,SAAS,oBAAoB,EAAE,EACzD,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,KAAK,EACL,GAAG,EACH,GAAG,KAAK,EACT,EAAE,QAAQ,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,GAAG,YAAY,CAYnD;AAED;;;;GAIG;AACH,eAAO,MAAM,MAAM;IACjB,sDAAsD;;IAEtD,sDAAsD;;IAEtD,gDAAgD;;IAEhD,wDAAwD;;IAExD,iDAAiD;;IAEjD,gDAAgD;;IAEhD,4DAA4D;;IAE5D,qDAAqD;;IAErD,mDAAmD;;CAEpD,CAAC"}
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
import type { HTMLAttributes, Ref } from 'react';
|
|
2
|
+
type SeparatorNativeProps = Omit<HTMLAttributes<HTMLElement>, 'aria-orientation' | 'children' | 'role' | 'style'>;
|
|
3
|
+
/** Props for a visual or semantic divider between related regions. */
|
|
4
|
+
export interface SeparatorProps extends SeparatorNativeProps {
|
|
5
|
+
/** Hides the divider from assistive technology. Defaults to `false`. */
|
|
6
|
+
decorative?: boolean;
|
|
7
|
+
/** Divider axis. Defaults to `horizontal`. */
|
|
8
|
+
orientation?: 'horizontal' | 'vertical';
|
|
9
|
+
/** Ref to the rendered HTML element. */
|
|
10
|
+
ref?: Ref<HTMLElement>;
|
|
11
|
+
/** Visual border emphasis. Defaults to `default`. */
|
|
12
|
+
tone?: 'default' | 'strong';
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Separates related regions and exposes separator semantics unless marked as
|
|
16
|
+
* decorative.
|
|
17
|
+
*
|
|
18
|
+
* @summary semantic or decorative horizontal and vertical divider
|
|
19
|
+
*/
|
|
20
|
+
export declare function Separator({ className, decorative, orientation, ref, tone, ...props }: Readonly<SeparatorProps>): import("react").DetailedReactHTMLElement<{
|
|
21
|
+
dangerouslySetInnerHTML?: {
|
|
22
|
+
__html: string | TrustedHTML;
|
|
23
|
+
} | undefined;
|
|
24
|
+
onCopy?: import("react").ClipboardEventHandler<HTMLElement> | undefined;
|
|
25
|
+
onCopyCapture?: import("react").ClipboardEventHandler<HTMLElement> | undefined;
|
|
26
|
+
onCut?: import("react").ClipboardEventHandler<HTMLElement> | undefined;
|
|
27
|
+
onCutCapture?: import("react").ClipboardEventHandler<HTMLElement> | undefined;
|
|
28
|
+
onPaste?: import("react").ClipboardEventHandler<HTMLElement> | undefined;
|
|
29
|
+
onPasteCapture?: import("react").ClipboardEventHandler<HTMLElement> | undefined;
|
|
30
|
+
onCompositionEnd?: import("react").CompositionEventHandler<HTMLElement> | undefined;
|
|
31
|
+
onCompositionEndCapture?: import("react").CompositionEventHandler<HTMLElement> | undefined;
|
|
32
|
+
onCompositionStart?: import("react").CompositionEventHandler<HTMLElement> | undefined;
|
|
33
|
+
onCompositionStartCapture?: import("react").CompositionEventHandler<HTMLElement> | undefined;
|
|
34
|
+
onCompositionUpdate?: import("react").CompositionEventHandler<HTMLElement> | undefined;
|
|
35
|
+
onCompositionUpdateCapture?: import("react").CompositionEventHandler<HTMLElement> | undefined;
|
|
36
|
+
onFocus?: import("react").FocusEventHandler<HTMLElement> | undefined;
|
|
37
|
+
onFocusCapture?: import("react").FocusEventHandler<HTMLElement> | undefined;
|
|
38
|
+
onBlur?: import("react").FocusEventHandler<HTMLElement> | undefined;
|
|
39
|
+
onBlurCapture?: import("react").FocusEventHandler<HTMLElement> | undefined;
|
|
40
|
+
onChange?: import("react").ChangeEventHandler<HTMLElement, Element> | undefined;
|
|
41
|
+
onChangeCapture?: import("react").ChangeEventHandler<HTMLElement, Element> | undefined;
|
|
42
|
+
onBeforeInput?: import("react").InputEventHandler<HTMLElement> | undefined;
|
|
43
|
+
onBeforeInputCapture?: import("react").InputEventHandler<HTMLElement> | undefined;
|
|
44
|
+
onInput?: import("react").InputEventHandler<HTMLElement> | undefined;
|
|
45
|
+
onInputCapture?: import("react").InputEventHandler<HTMLElement> | undefined;
|
|
46
|
+
onReset?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
47
|
+
onResetCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
48
|
+
onSubmit?: import("react").SubmitEventHandler<HTMLElement> | undefined;
|
|
49
|
+
onSubmitCapture?: import("react").SubmitEventHandler<HTMLElement> | undefined;
|
|
50
|
+
onInvalid?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
51
|
+
onInvalidCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
52
|
+
onLoad?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
53
|
+
onLoadCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
54
|
+
onError?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
55
|
+
onErrorCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
56
|
+
onKeyDown?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
57
|
+
onKeyDownCapture?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
58
|
+
onKeyPress?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
59
|
+
onKeyPressCapture?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
60
|
+
onKeyUp?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
61
|
+
onKeyUpCapture?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
62
|
+
onAbort?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
63
|
+
onAbortCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
64
|
+
onCanPlay?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
65
|
+
onCanPlayCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
66
|
+
onCanPlayThrough?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
67
|
+
onCanPlayThroughCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
68
|
+
onDurationChange?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
69
|
+
onDurationChangeCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
70
|
+
onEmptied?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
71
|
+
onEmptiedCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
72
|
+
onEncrypted?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
73
|
+
onEncryptedCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
74
|
+
onEnded?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
75
|
+
onEndedCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
76
|
+
onLoadedData?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
77
|
+
onLoadedDataCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
78
|
+
onLoadedMetadata?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
79
|
+
onLoadedMetadataCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
80
|
+
onLoadStart?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
81
|
+
onLoadStartCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
82
|
+
onPause?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
83
|
+
onPauseCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
84
|
+
onPlay?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
85
|
+
onPlayCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
86
|
+
onPlaying?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
87
|
+
onPlayingCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
88
|
+
onProgress?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
89
|
+
onProgressCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
90
|
+
onRateChange?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
91
|
+
onRateChangeCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
92
|
+
onSeeked?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
93
|
+
onSeekedCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
94
|
+
onSeeking?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
95
|
+
onSeekingCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
96
|
+
onStalled?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
97
|
+
onStalledCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
98
|
+
onSuspend?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
99
|
+
onSuspendCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
100
|
+
onTimeUpdate?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
101
|
+
onTimeUpdateCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
102
|
+
onVolumeChange?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
103
|
+
onVolumeChangeCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
104
|
+
onWaiting?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
105
|
+
onWaitingCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
106
|
+
onAuxClick?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
107
|
+
onAuxClickCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
108
|
+
onClick?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
109
|
+
onClickCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
110
|
+
onContextMenu?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
111
|
+
onContextMenuCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
112
|
+
onDoubleClick?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
113
|
+
onDoubleClickCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
114
|
+
onDrag?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
115
|
+
onDragCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
116
|
+
onDragEnd?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
117
|
+
onDragEndCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
118
|
+
onDragEnter?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
119
|
+
onDragEnterCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
120
|
+
onDragExit?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
121
|
+
onDragExitCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
122
|
+
onDragLeave?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
123
|
+
onDragLeaveCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
124
|
+
onDragOver?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
125
|
+
onDragOverCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
126
|
+
onDragStart?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
127
|
+
onDragStartCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
128
|
+
onDrop?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
129
|
+
onDropCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
130
|
+
onMouseDown?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
131
|
+
onMouseDownCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
132
|
+
onMouseEnter?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
133
|
+
onMouseLeave?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
134
|
+
onMouseMove?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
135
|
+
onMouseMoveCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
136
|
+
onMouseOut?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
137
|
+
onMouseOutCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
138
|
+
onMouseOver?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
139
|
+
onMouseOverCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
140
|
+
onMouseUp?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
141
|
+
onMouseUpCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
142
|
+
onSelect?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
143
|
+
onSelectCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
144
|
+
onTouchCancel?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
145
|
+
onTouchCancelCapture?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
146
|
+
onTouchEnd?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
147
|
+
onTouchEndCapture?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
148
|
+
onTouchMove?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
149
|
+
onTouchMoveCapture?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
150
|
+
onTouchStart?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
151
|
+
onTouchStartCapture?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
152
|
+
onPointerDown?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
153
|
+
onPointerDownCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
154
|
+
onPointerMove?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
155
|
+
onPointerMoveCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
156
|
+
onPointerUp?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
157
|
+
onPointerUpCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
158
|
+
onPointerCancel?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
159
|
+
onPointerCancelCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
160
|
+
onPointerEnter?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
161
|
+
onPointerLeave?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
162
|
+
onPointerOver?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
163
|
+
onPointerOverCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
164
|
+
onPointerOut?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
165
|
+
onPointerOutCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
166
|
+
onGotPointerCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
167
|
+
onGotPointerCaptureCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
168
|
+
onLostPointerCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
169
|
+
onLostPointerCaptureCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
170
|
+
onScroll?: import("react").UIEventHandler<HTMLElement> | undefined;
|
|
171
|
+
onScrollCapture?: import("react").UIEventHandler<HTMLElement> | undefined;
|
|
172
|
+
onScrollEnd?: import("react").UIEventHandler<HTMLElement> | undefined;
|
|
173
|
+
onScrollEndCapture?: import("react").UIEventHandler<HTMLElement> | undefined;
|
|
174
|
+
onWheel?: import("react").WheelEventHandler<HTMLElement> | undefined;
|
|
175
|
+
onWheelCapture?: import("react").WheelEventHandler<HTMLElement> | undefined;
|
|
176
|
+
onAnimationStart?: import("react").AnimationEventHandler<HTMLElement> | undefined;
|
|
177
|
+
onAnimationStartCapture?: import("react").AnimationEventHandler<HTMLElement> | undefined;
|
|
178
|
+
onAnimationEnd?: import("react").AnimationEventHandler<HTMLElement> | undefined;
|
|
179
|
+
onAnimationEndCapture?: import("react").AnimationEventHandler<HTMLElement> | undefined;
|
|
180
|
+
onAnimationIteration?: import("react").AnimationEventHandler<HTMLElement> | undefined;
|
|
181
|
+
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLElement> | undefined;
|
|
182
|
+
onToggle?: import("react").ToggleEventHandler<HTMLElement> | undefined;
|
|
183
|
+
onBeforeToggle?: import("react").ToggleEventHandler<HTMLElement> | undefined;
|
|
184
|
+
onTransitionCancel?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
185
|
+
onTransitionCancelCapture?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
186
|
+
onTransitionEnd?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
187
|
+
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
188
|
+
onTransitionRun?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
189
|
+
onTransitionRunCapture?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
190
|
+
onTransitionStart?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
191
|
+
onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
192
|
+
"aria-activedescendant"?: string | undefined;
|
|
193
|
+
"aria-atomic"?: ("false" | "true" | boolean) | undefined;
|
|
194
|
+
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
|
|
195
|
+
"aria-braillelabel"?: string | undefined;
|
|
196
|
+
"aria-brailleroledescription"?: string | undefined;
|
|
197
|
+
"aria-busy"?: ("false" | "true" | boolean) | undefined;
|
|
198
|
+
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
199
|
+
"aria-colcount"?: number | undefined;
|
|
200
|
+
"aria-colindex"?: number | undefined;
|
|
201
|
+
"aria-colindextext"?: string | undefined;
|
|
202
|
+
"aria-colspan"?: number | undefined;
|
|
203
|
+
"aria-controls"?: string | undefined;
|
|
204
|
+
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
|
|
205
|
+
"aria-describedby"?: string | undefined;
|
|
206
|
+
"aria-description"?: string | undefined;
|
|
207
|
+
"aria-details"?: string | undefined;
|
|
208
|
+
"aria-disabled"?: ("false" | "true" | boolean) | undefined;
|
|
209
|
+
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
|
|
210
|
+
"aria-errormessage"?: string | undefined;
|
|
211
|
+
"aria-expanded"?: ("false" | "true" | boolean) | undefined;
|
|
212
|
+
"aria-flowto"?: string | undefined;
|
|
213
|
+
"aria-grabbed"?: ("false" | "true" | boolean) | undefined;
|
|
214
|
+
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
|
|
215
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
|
|
216
|
+
"aria-keyshortcuts"?: string | undefined;
|
|
217
|
+
"aria-label"?: string | undefined;
|
|
218
|
+
"aria-labelledby"?: string | undefined;
|
|
219
|
+
"aria-level"?: number | undefined;
|
|
220
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
221
|
+
"aria-modal"?: ("false" | "true" | boolean) | undefined;
|
|
222
|
+
"aria-multiline"?: ("false" | "true" | boolean) | undefined;
|
|
223
|
+
"aria-multiselectable"?: ("false" | "true" | boolean) | undefined;
|
|
224
|
+
"aria-owns"?: string | undefined;
|
|
225
|
+
"aria-placeholder"?: string | undefined;
|
|
226
|
+
"aria-posinset"?: number | undefined;
|
|
227
|
+
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
228
|
+
"aria-readonly"?: ("false" | "true" | boolean) | undefined;
|
|
229
|
+
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
|
|
230
|
+
"aria-required"?: ("false" | "true" | boolean) | undefined;
|
|
231
|
+
"aria-roledescription"?: string | undefined;
|
|
232
|
+
"aria-rowcount"?: number | undefined;
|
|
233
|
+
"aria-rowindex"?: number | undefined;
|
|
234
|
+
"aria-rowindextext"?: string | undefined;
|
|
235
|
+
"aria-rowspan"?: number | undefined;
|
|
236
|
+
"aria-selected"?: ("false" | "true" | boolean) | undefined;
|
|
237
|
+
"aria-setsize"?: number | undefined;
|
|
238
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
239
|
+
"aria-valuemax"?: number | undefined;
|
|
240
|
+
"aria-valuemin"?: number | undefined;
|
|
241
|
+
"aria-valuenow"?: number | undefined;
|
|
242
|
+
"aria-valuetext"?: string | undefined;
|
|
243
|
+
defaultChecked?: boolean | undefined;
|
|
244
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
245
|
+
suppressContentEditableWarning?: boolean | undefined;
|
|
246
|
+
suppressHydrationWarning?: boolean | undefined;
|
|
247
|
+
accessKey?: string | undefined;
|
|
248
|
+
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {});
|
|
249
|
+
autoFocus?: boolean | undefined;
|
|
250
|
+
contentEditable?: ("false" | "true" | boolean) | "inherit" | "plaintext-only" | undefined;
|
|
251
|
+
contextMenu?: string | undefined;
|
|
252
|
+
dir?: string | undefined;
|
|
253
|
+
draggable?: ("false" | "true" | boolean) | undefined;
|
|
254
|
+
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
|
|
255
|
+
hidden?: boolean | undefined;
|
|
256
|
+
id?: string | undefined;
|
|
257
|
+
lang?: string | undefined;
|
|
258
|
+
nonce?: string | undefined;
|
|
259
|
+
slot?: string | undefined;
|
|
260
|
+
spellCheck?: ("false" | "true" | boolean) | undefined;
|
|
261
|
+
tabIndex?: number | undefined;
|
|
262
|
+
title?: string | undefined;
|
|
263
|
+
translate?: "yes" | "no" | undefined;
|
|
264
|
+
radioGroup?: string | undefined;
|
|
265
|
+
about?: string | undefined;
|
|
266
|
+
content?: string | undefined;
|
|
267
|
+
datatype?: string | undefined;
|
|
268
|
+
inlist?: any;
|
|
269
|
+
prefix?: string | undefined;
|
|
270
|
+
property?: string | undefined;
|
|
271
|
+
rel?: string | undefined;
|
|
272
|
+
resource?: string | undefined;
|
|
273
|
+
rev?: string | undefined;
|
|
274
|
+
typeof?: string | undefined;
|
|
275
|
+
vocab?: string | undefined;
|
|
276
|
+
autoCorrect?: string | undefined;
|
|
277
|
+
autoSave?: string | undefined;
|
|
278
|
+
color?: string | undefined;
|
|
279
|
+
itemProp?: string | undefined;
|
|
280
|
+
itemScope?: boolean | undefined;
|
|
281
|
+
itemType?: string | undefined;
|
|
282
|
+
itemID?: string | undefined;
|
|
283
|
+
itemRef?: string | undefined;
|
|
284
|
+
results?: number | undefined;
|
|
285
|
+
security?: string | undefined;
|
|
286
|
+
unselectable?: "on" | "off" | undefined;
|
|
287
|
+
popover?: "" | "auto" | "manual" | "hint" | undefined;
|
|
288
|
+
popoverTargetAction?: "toggle" | "show" | "hide" | undefined;
|
|
289
|
+
popoverTarget?: string | undefined;
|
|
290
|
+
inert?: boolean | undefined;
|
|
291
|
+
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
|
|
292
|
+
is?: string | undefined;
|
|
293
|
+
exportparts?: string | undefined;
|
|
294
|
+
part?: string | undefined;
|
|
295
|
+
'aria-hidden': true | undefined;
|
|
296
|
+
'aria-orientation': "vertical" | undefined;
|
|
297
|
+
className: string;
|
|
298
|
+
ref: import("react").RefCallback<HTMLElement>;
|
|
299
|
+
role: "presentation" | "separator";
|
|
300
|
+
}, HTMLElement>;
|
|
301
|
+
export {};
|
|
302
|
+
//# sourceMappingURL=Separator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Separator.d.ts","sourceRoot":"","sources":["../../../src/primitives/Separator/Separator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAwB9D,KAAK,oBAAoB,GAAG,IAAI,CAC9B,cAAc,CAAC,WAAW,CAAC,EAC3B,kBAAkB,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,CACnD,CAAC;AAEF,sEAAsE;AACtE,MAAM,WAAW,cAAe,SAAQ,oBAAoB;IAC1D,wEAAwE;IACxE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,8CAA8C;IAC9C,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,wCAAwC;IACxC,GAAG,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;IACvB,qDAAqD;IACrD,IAAI,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;CAC7B;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,EACxB,SAAS,EACT,UAAkB,EAClB,WAA0B,EAC1B,GAAG,EACH,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,QAAQ,CAAC,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAmB1B"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactElement, Ref } from 'react';
|
|
2
|
+
/** Visual shapes supported by a loading skeleton. */
|
|
3
|
+
export type SkeletonShape = 'circle' | 'rectangle' | 'text';
|
|
4
|
+
/** Semantic surface tones supported by loading placeholders. */
|
|
5
|
+
export type SkeletonTone = 'default' | 'inverse' | 'danger';
|
|
6
|
+
/** Elements supported by a loading skeleton. */
|
|
7
|
+
export type SkeletonElement = 'div' | 'span';
|
|
8
|
+
type SkeletonElementNode<Element extends SkeletonElement> = Element extends 'span' ? HTMLSpanElement : HTMLDivElement;
|
|
9
|
+
/** Props for a non-announcing visual loading placeholder. */
|
|
10
|
+
export type SkeletonProps<Element extends SkeletonElement = 'div'> = Omit<ComponentPropsWithoutRef<Element>, 'children' | 'role' | 'style'> & {
|
|
11
|
+
/** Render as a `span` when the placeholder must sit inside text content. */
|
|
12
|
+
as?: Element;
|
|
13
|
+
/** Ref to the rendered placeholder element. */
|
|
14
|
+
ref?: Ref<SkeletonElementNode<Element>>;
|
|
15
|
+
/** Placeholder geometry. Defaults to `text`. */
|
|
16
|
+
shape?: SkeletonShape;
|
|
17
|
+
/** Surface-aware placeholder colour. Defaults to `default`. */
|
|
18
|
+
tone?: SkeletonTone;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Reserves loading layout without adding content to the accessibility tree.
|
|
22
|
+
*
|
|
23
|
+
* @summary non-announcing loading placeholder with canonical shapes
|
|
24
|
+
*/
|
|
25
|
+
export declare function Skeleton<Element extends SkeletonElement = 'div'>({ as, className, ref, shape, tone, ...props }: Readonly<SkeletonProps<Element>>): ReactElement;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=Skeleton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../src/primitives/Skeleton/Skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AA0BzE,qDAAqD;AACrD,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,WAAW,GAAG,MAAM,CAAC;AAC5D,gEAAgE;AAChE,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC5D,gDAAgD;AAChD,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,MAAM,CAAC;AAE7C,KAAK,mBAAmB,CAAC,OAAO,SAAS,eAAe,IACtD,OAAO,SAAS,MAAM,GAAG,eAAe,GAAG,cAAc,CAAC;AAE5D,6DAA6D;AAC7D,MAAM,MAAM,aAAa,CAAC,OAAO,SAAS,eAAe,GAAG,KAAK,IAAI,IAAI,CACvE,wBAAwB,CAAC,OAAO,CAAC,EACjC,UAAU,GAAG,MAAM,GAAG,OAAO,CAC9B,GAAG;IACF,4EAA4E;IAC5E,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,+CAA+C;IAC/C,GAAG,CAAC,EAAE,GAAG,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAC;IACxC,gDAAgD;IAChD,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,+DAA+D;IAC/D,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,OAAO,SAAS,eAAe,GAAG,KAAK,EAAE,EAChE,EAAE,EACF,SAAS,EACT,GAAG,EACH,KAAc,EACd,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,GAAG,YAAY,CAajD"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ReactElement, ReactNode, Ref } from 'react';
|
|
2
|
+
import type { NativeLinkProps } from '../../internal/types/native';
|
|
3
|
+
/** Props for the keyboard-first link that bypasses repeated page chrome. */
|
|
4
|
+
export interface SkipLinkProps extends NativeLinkProps {
|
|
5
|
+
/** Accessible link content. */
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
/** Placement and composition classes. */
|
|
8
|
+
className?: string;
|
|
9
|
+
/** Ref to the rendered anchor. */
|
|
10
|
+
ref?: Ref<HTMLAnchorElement>;
|
|
11
|
+
/** Id of the focusable main content target, without a leading hash. */
|
|
12
|
+
targetId: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Reveals a native fragment link on focus so keyboard users can bypass
|
|
16
|
+
* repeated content.
|
|
17
|
+
*
|
|
18
|
+
* @summary focus-revealed bypass link to a main-content target
|
|
19
|
+
*/
|
|
20
|
+
export declare function SkipLink({ children, className, ref, targetId, ...props }: Readonly<SkipLinkProps>): ReactElement;
|
|
21
|
+
//# sourceMappingURL=SkipLink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SkipLink.d.ts","sourceRoot":"","sources":["../../../src/primitives/SkipLink/SkipLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAG1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAOnE,4EAA4E;AAC5E,MAAM,WAAW,aAAc,SAAQ,eAAe;IACpD,+BAA+B;IAC/B,QAAQ,EAAE,SAAS,CAAC;IACpB,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kCAAkC;IAClC,GAAG,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAC7B,uEAAuE;IACvE,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,EACvB,QAAQ,EACR,SAAS,EACT,GAAG,EACH,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,QAAQ,CAAC,aAAa,CAAC,GAAG,YAAY,CAWxC"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import type { HTMLAttributes, OutputHTMLAttributes, ReactElement, ReactNode, Ref, RefObject } from 'react';
|
|
2
|
+
import type { ControlSize } from '../../internal/styling/visual';
|
|
3
|
+
import { type TextFieldLabelProps } from '../TextField/TextField';
|
|
4
|
+
type SliderRootNativeProps = Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'defaultValue' | 'onChange' | 'style'>;
|
|
5
|
+
interface SliderRootSharedProps extends SliderRootNativeProps {
|
|
6
|
+
/** Compound label, output, track, fill, thumb, description, and error parts. */
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
/** Prevents focus, dragging, and value changes. Defaults to `false`. */
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
/** Locale-aware number formatting options. */
|
|
11
|
+
formatOptions?: Intl.NumberFormatOptions;
|
|
12
|
+
/** Exposes invalid state to the thumb input and error styling. Defaults to `false`. */
|
|
13
|
+
invalid?: boolean;
|
|
14
|
+
/** Largest permitted value. Defaults to `100`. */
|
|
15
|
+
max?: number;
|
|
16
|
+
/** Smallest permitted value. Defaults to `0`. */
|
|
17
|
+
min?: number;
|
|
18
|
+
/** Track and keyboard direction. Defaults to `horizontal`. */
|
|
19
|
+
orientation?: 'horizontal' | 'vertical';
|
|
20
|
+
/** Called with the final value after a drag or keyboard sequence ends. */
|
|
21
|
+
onChangeEnd?: (value: number) => void;
|
|
22
|
+
/** Marks the native range input as required. Defaults to `false`. */
|
|
23
|
+
required?: boolean;
|
|
24
|
+
/** Ref to the rendered slider group. */
|
|
25
|
+
ref?: Ref<HTMLDivElement>;
|
|
26
|
+
/** Keyboard and drag increment. Defaults to `1`. */
|
|
27
|
+
step?: number;
|
|
28
|
+
}
|
|
29
|
+
interface ControlledSliderRootProps {
|
|
30
|
+
/** Current slider value. */
|
|
31
|
+
value: number;
|
|
32
|
+
/** Called with the next slider value. */
|
|
33
|
+
onChange: (value: number) => void;
|
|
34
|
+
defaultValue?: never;
|
|
35
|
+
readOnly?: false;
|
|
36
|
+
}
|
|
37
|
+
interface ReadOnlySliderRootProps {
|
|
38
|
+
/** Current immutable slider value. */
|
|
39
|
+
value: number;
|
|
40
|
+
/** Marks a controlled value as intentionally immutable and non-interactive. */
|
|
41
|
+
readOnly: true;
|
|
42
|
+
defaultValue?: never;
|
|
43
|
+
onChange?: never;
|
|
44
|
+
}
|
|
45
|
+
interface UncontrolledSliderRootProps {
|
|
46
|
+
/** Initial slider value. Defaults to the minimum value. */
|
|
47
|
+
defaultValue?: number;
|
|
48
|
+
/** Called with the next slider value. */
|
|
49
|
+
onChange?: (value: number) => void;
|
|
50
|
+
readOnly?: false;
|
|
51
|
+
value?: never;
|
|
52
|
+
}
|
|
53
|
+
/** Props for controlled, read-only, or uncontrolled single-value slider state. */
|
|
54
|
+
export type SliderRootProps = SliderRootSharedProps & (ControlledSliderRootProps | ReadOnlySliderRootProps | UncontrolledSliderRootProps);
|
|
55
|
+
/** Props for the visible slider label. */
|
|
56
|
+
export type SliderLabelProps = TextFieldLabelProps;
|
|
57
|
+
/** Props for the locale-formatted slider output. */
|
|
58
|
+
export interface SliderOutputProps extends Omit<OutputHTMLAttributes<HTMLOutputElement>, 'style'> {
|
|
59
|
+
/** Optional custom output content. Defaults to the formatted current value. */
|
|
60
|
+
children?: ReactNode;
|
|
61
|
+
/** Ref to the rendered output. */
|
|
62
|
+
ref?: Ref<HTMLOutputElement>;
|
|
63
|
+
}
|
|
64
|
+
/** Props for the interactive slider track. */
|
|
65
|
+
export interface SliderTrackProps extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {
|
|
66
|
+
/** Fill and thumb parts. */
|
|
67
|
+
children: ReactNode;
|
|
68
|
+
/** Ref to the rendered track. */
|
|
69
|
+
ref?: Ref<HTMLDivElement>;
|
|
70
|
+
}
|
|
71
|
+
/** Props for the selected-value track fill. */
|
|
72
|
+
export interface SliderFillProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'style'> {
|
|
73
|
+
/** Ref to the rendered fill. */
|
|
74
|
+
ref?: Ref<HTMLDivElement>;
|
|
75
|
+
}
|
|
76
|
+
/** Props for the draggable slider thumb and hidden native range input. */
|
|
77
|
+
export interface SliderThumbProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'style'> {
|
|
78
|
+
/** Accessible thumb name when the root label is insufficient. */
|
|
79
|
+
'aria-label'?: string;
|
|
80
|
+
/** Associates the hidden range input with additional guidance. */
|
|
81
|
+
'aria-describedby'?: string;
|
|
82
|
+
/** Associates the hidden native range input with an external form. */
|
|
83
|
+
form?: string;
|
|
84
|
+
/** Ref to the hidden native range input used for focus and form integration. */
|
|
85
|
+
inputRef?: RefObject<HTMLInputElement | null>;
|
|
86
|
+
/** Native form field name. */
|
|
87
|
+
name?: string;
|
|
88
|
+
/** Ref to the rendered draggable thumb. */
|
|
89
|
+
ref?: Ref<HTMLDivElement>;
|
|
90
|
+
/** Canonical thumb size. Defaults to `md`. */
|
|
91
|
+
size?: ControlSize;
|
|
92
|
+
}
|
|
93
|
+
/** Props for supporting text associated with the slider thumb. */
|
|
94
|
+
export interface SliderDescriptionProps extends Omit<HTMLAttributes<HTMLParagraphElement>, 'style'> {
|
|
95
|
+
/** Supporting guidance for the slider. */
|
|
96
|
+
children: ReactNode;
|
|
97
|
+
/** Ref to the rendered description. */
|
|
98
|
+
ref?: Ref<HTMLParagraphElement>;
|
|
99
|
+
}
|
|
100
|
+
/** Props for an accessible slider validation message. */
|
|
101
|
+
export interface SliderErrorProps extends Omit<HTMLAttributes<HTMLParagraphElement>, 'style'> {
|
|
102
|
+
/** Validation message for the slider. */
|
|
103
|
+
children: ReactNode;
|
|
104
|
+
/** Ref to the rendered error message. */
|
|
105
|
+
ref?: Ref<HTMLParagraphElement>;
|
|
106
|
+
}
|
|
107
|
+
/** Coordinates a locale-aware, single-value slider and its compound anatomy. */
|
|
108
|
+
export declare function Root({ children, className, defaultValue, disabled, formatOptions, invalid, max, min, onChange, onChangeEnd, orientation, readOnly, ref, required, step, value, ...props }: Readonly<SliderRootProps>): ReactElement;
|
|
109
|
+
/** Renders the locale-formatted current Slider value. */
|
|
110
|
+
export declare function Output({ className, ref, ...props }: Readonly<SliderOutputProps>): ReactElement;
|
|
111
|
+
/** Renders the pointer and touch interaction surface for a Slider. */
|
|
112
|
+
export declare function Track({ className, ref, ...props }: Readonly<SliderTrackProps>): ReactElement;
|
|
113
|
+
/** Renders the persistent accessible label owned by the Slider. */
|
|
114
|
+
export declare function Label(props: Readonly<SliderLabelProps>): ReactElement;
|
|
115
|
+
/** Renders the selected portion of a Slider track. */
|
|
116
|
+
export declare function Fill({ className, ref, ...props }: Readonly<SliderFillProps>): ReactElement;
|
|
117
|
+
/** Renders the draggable Slider thumb and hidden native range input. */
|
|
118
|
+
export declare function Thumb({ 'aria-describedby': ariaDescribedBy, className, inputRef, ref, size, ...props }: Readonly<SliderThumbProps>): ReactElement;
|
|
119
|
+
/** Renders supporting guidance associated with a Slider thumb. */
|
|
120
|
+
export declare function Description({ className, id, ref, ...props }: Readonly<SliderDescriptionProps>): ReactElement;
|
|
121
|
+
/** Renders a validation message associated with an invalid Slider thumb. */
|
|
122
|
+
declare function ErrorMessage({ className, id, ref, ...props }: Readonly<SliderErrorProps>): ReactElement;
|
|
123
|
+
export { ErrorMessage as Error };
|
|
124
|
+
/**
|
|
125
|
+
* Coordinates a labelled, locale-aware single-value range with explicit
|
|
126
|
+
* track, fill, thumb, output, description, and validation parts.
|
|
127
|
+
*
|
|
128
|
+
* @summary accessible compound single-value range input
|
|
129
|
+
*/
|
|
130
|
+
export declare const Slider: {
|
|
131
|
+
/** Supporting guidance associated with the thumb. */
|
|
132
|
+
Description: typeof Description;
|
|
133
|
+
/** Validation message associated with an invalid thumb. */
|
|
134
|
+
Error: typeof ErrorMessage;
|
|
135
|
+
/** Selected portion of the track. */
|
|
136
|
+
Fill: typeof Fill;
|
|
137
|
+
/** Persistent accessible label. */
|
|
138
|
+
Label: typeof Label;
|
|
139
|
+
/** Locale-formatted current value. */
|
|
140
|
+
Output: typeof Output;
|
|
141
|
+
/** State, constraints, orientation, and accessibility root. */
|
|
142
|
+
Root: typeof Root;
|
|
143
|
+
/** Draggable thumb and hidden native range input. */
|
|
144
|
+
Thumb: typeof Thumb;
|
|
145
|
+
/** Pointer and touch interaction surface. */
|
|
146
|
+
Track: typeof Track;
|
|
147
|
+
};
|
|
148
|
+
//# sourceMappingURL=Slider.d.ts.map
|