@ringcentral/spring-ui 1.7.0 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Alert.js +3 -3
- package/Announcement.js +1 -1
- package/Autocomplete.js +216 -243
- package/Avatar.js +27 -13
- package/BottomNavigation.js +0 -3
- package/Checkbox.js +0 -2
- package/DatePicker.js +5 -13
- package/DateUtilsContext.js +0 -1
- package/Dialer.js +2 -50
- package/Dialog.js +18 -6
- package/Dropdown.js +0 -7
- package/FocusTrap.js +0 -32
- package/InlineEditable.js +0 -4
- package/Link.js +1 -1
- package/ListItem.js +1 -1
- package/ListNavigation.js +0 -6
- package/Menu.js +1 -1
- package/MenuDivider.js +2 -2
- package/MenuFooter.js +4 -4
- package/MenuHeader.js +4 -4
- package/MenuItem.js +1 -1
- package/MenuItemText.js +1 -1
- package/Modal.js +1 -1
- package/PageHeader.js +6 -4
- package/Popper.js +0 -1
- package/Rating.js +0 -5
- package/SingleFilter.js +0 -1
- package/Slider.js +1 -4
- package/Snackbar.js +0 -14
- package/SortableListItem.js +0 -1
- package/SplitButton.js +1 -3
- package/StatusIndicator.js +1 -1
- package/StepButton.js +2 -3
- package/StepContent.js +3 -8
- package/SubMenu.js +0 -4
- package/SwipeableDrawer.js +37 -162
- package/Switch.js +1 -4
- package/Tab.js +7 -8
- package/TabContext.js +0 -5
- package/TableBody.js +1 -1
- package/TableCell.js +0 -6
- package/TableRow.js +2 -4
- package/Tabs.js +22 -121
- package/Text.js +2 -4
- package/TimePicker.js +7 -46
- package/VirtualizedList.js +6 -39
- package/VirtualizedMenu.js +1 -1
- package/chunks/Alert.js +8 -7
- package/chunks/BottomNavigationItem.js +0 -1
- package/chunks/Button.js +0 -1
- package/chunks/Chip.js +0 -5
- package/chunks/Drawer.js +1 -30
- package/chunks/ListItem.js +3 -6
- package/chunks/Menu.js +6 -5
- package/chunks/MenuDivider.js +2 -3
- package/chunks/MenuItemText.js +3 -3
- package/chunks/MenuList.js +3 -6
- package/chunks/Modal.js +1 -1
- package/chunks/PickerTextField.js +0 -1
- package/chunks/Popover.js +0 -5
- package/chunks/Select.js +2 -39
- package/chunks/Squircle.js +0 -7
- package/chunks/StatusIndicator.js +1 -0
- package/chunks/StepIcon.js +1 -3
- package/chunks/StepperContext.js +0 -7
- package/chunks/Tooltip.js +0 -36
- package/chunks/VirtualizedMenu.js +45 -99
- package/chunks/getFade.js +4 -0
- package/chunks/useFocusTrapStack.js +0 -8
- package/chunks/useHelperTextId.js +0 -24
- package/chunks/useListNavigation.js +5 -17
- package/chunks/useMenuItemSelect.js +9 -22
- package/chunks/useMotionSafeTransition.js +0 -4
- package/chunks/useNestedParentMenu.js +5 -18
- package/chunks/usePrefersReducedMotion.js +6 -12
- package/chunks/useTooltipForceHide.js +0 -4
- package/chunks/useTrayNavigate.js +0 -1
- package/index.css +434 -135
- package/index.js +1 -1
- package/package.json +4 -4
- package/src/Accordion/Accordion.d.ts +1 -1
- package/src/Accordion/Accordion.type.d.ts +0 -21
- package/src/AccordionHeader/AccordionHeader.d.ts +1 -1
- package/src/AccordionHeader/AccordionHeader.type.d.ts +0 -14
- package/src/Alert/Alert.d.ts +1 -1
- package/src/Alert/Alert.type.d.ts +0 -32
- package/src/Animation/components/ExpandCollapseCaret/ExpandCollapseCaret.d.ts +0 -4
- package/src/Animation/components/ShowHideEye/ShowHideEye.d.ts +0 -4
- package/src/Animation/hooks/useMotionSafeTransition/useMotionSafeTransition.d.ts +0 -4
- package/src/Autocomplete/Autocomplete.d.ts +0 -5
- package/src/Autocomplete/Autocomplete.type.d.ts +0 -84
- package/src/Autocomplete/SuggestionList/SuggestionList.d.ts +5 -89
- package/src/Autocomplete/SuggestionList/SuggestionListItem.d.ts +0 -2
- package/src/Autocomplete/SuggestionList/utils/SuggestionListItem.d.ts +1 -13
- package/src/Autocomplete/SuggestionList/utils/useDynamicHeight.d.ts +0 -6
- package/src/Autocomplete/SuggestionList/utils/useHighlightScroll.d.ts +4 -23
- package/src/Autocomplete/SuggestionList/utils/useSuggestionList.d.ts +3 -41
- package/src/Autocomplete/SuggestionList/utils/useSuggestionListGroup.d.ts +0 -49
- package/src/Autocomplete/useAutocomplete.d.ts +5 -66
- package/src/Autocomplete/useAutocompleteTag.d.ts +3 -36
- package/src/Avatar/Avatar.type.d.ts +0 -58
- package/src/AvatarGroup/AvatarGroup.type.d.ts +0 -3
- package/src/Backdrop/Backdrop.type.d.ts +0 -4
- package/src/Badge/Badge.type.d.ts +0 -33
- package/src/Block/Block.type.d.ts +0 -24
- package/src/BlockHeader/BlockHeader.type.d.ts +0 -5
- package/src/BottomNavigation/BottomNavigation.type.d.ts +0 -34
- package/src/BottomNavigationItem/BottomNavigationItem.type.d.ts +0 -39
- package/src/Button/Button.type.d.ts +0 -30
- package/src/CallButton/CallButton.type.d.ts +0 -4
- package/src/Checkbox/Checkbox.type.d.ts +0 -17
- package/src/Chip/Chip.type.d.ts +0 -41
- package/src/CircularProgressIndicator/CircularProgressIndicator.d.ts +1 -1
- package/src/CircularProgressIndicator/CircularProgressIndicator.type.d.ts +0 -19
- package/src/DatePicker/Calendar.d.ts +1 -20
- package/src/DatePicker/DatePicker.type.d.ts +0 -18
- package/src/DatePicker/DatePickerHeader.d.ts +1 -12
- package/src/DatePicker/Day.d.ts +1 -8
- package/src/DatePicker/Year.d.ts +1 -7
- package/src/DatePicker/Years.d.ts +0 -7
- package/src/Dialer/DialDelete/DialDelete.d.ts +0 -3
- package/src/Dialer/DialPad/DialPad.d.ts +0 -106
- package/src/Dialer/DialPad/utils/types.d.ts +0 -5
- package/src/Dialer/DialPad/utils/useDialKeyboard.d.ts +0 -5
- package/src/Dialer/DialPad/utils/useKeyAudio.d.ts +0 -9
- package/src/Dialer/DialPadButton/DialPadButton.d.ts +0 -14
- package/src/Dialer/DialTextField/DialTextField.d.ts +0 -23
- package/src/Dialer/DialTextField/utils/getDialPadValueOnlyRegex.d.ts +0 -3
- package/src/Dialer/DialTextField/utils/useFixedEndSelection.d.ts +0 -3
- package/src/Dialog/Dialog.classes.d.ts +1 -1
- package/src/Dialog/Dialog.d.ts +1 -1
- package/src/Dialog/Dialog.type.d.ts +3 -11
- package/src/Divider/Divider.type.d.ts +0 -17
- package/src/DragHandle/DragHandle.type.d.ts +0 -4
- package/src/Drawer/Drawer.d.ts +1 -29
- package/src/Drawer/Drawer.type.d.ts +0 -84
- package/src/Dropdown/Dropdown.type.d.ts +0 -64
- package/src/EmptyState/EmptyState.d.ts +1 -1
- package/src/EmptyState/EmptyState.type.d.ts +0 -12
- package/src/FabButton/FabButton.type.d.ts +0 -5
- package/src/FocusTrap/FocusTrap.d.ts +0 -38
- package/src/FocusTrap/useFocusTrapStack.d.ts +0 -9
- package/src/FormField/FormField.type.d.ts +0 -26
- package/src/FormField/useHelperTextId.d.ts +0 -25
- package/src/FormLabel/FormLabel.d.ts +1 -1
- package/src/FormLabel/FormLabel.type.d.ts +0 -14
- package/src/Icon/Icon.d.ts +1 -1
- package/src/Icon/Icon.type.d.ts +0 -15
- package/src/IconButton/IconButton.type.d.ts +0 -30
- package/src/IconButton/IconButtonLabel.d.ts +1 -1
- package/src/IconButton/IconButtonLabel.type.d.ts +0 -3
- package/src/IconButtonGroup/IconButtonGroup.type.d.ts +0 -8
- package/src/InlineEditable/InlineEditable.type.d.ts +0 -75
- package/src/LinearProgressIndicator/LinearProgressIndicator.type.d.ts +0 -31
- package/src/Link/Link.classes.d.ts +1 -1
- package/src/Link/Link.type.d.ts +1 -10
- package/src/ListItem/ListItem.type.d.ts +0 -41
- package/src/ListItemText/ListItemText.d.ts +1 -1
- package/src/ListItemText/ListItemText.type.d.ts +0 -21
- package/src/ListNavigation/useListNavigation.d.ts +0 -16
- package/src/Menu/Menu.d.ts +1 -1
- package/src/Menu/Menu.type.d.ts +0 -10
- package/src/MenuFooter/MenuFooter.type.d.ts +0 -4
- package/src/MenuHeader/MenuHeader.type.d.ts +0 -10
- package/src/MenuItem/MenuItem.d.ts +1 -1
- package/src/MenuItem/MenuItem.type.d.ts +0 -19
- package/src/MenuItem/MenuItemSelectContext.d.ts +0 -3
- package/src/MenuItem/useMenuItemSelect.d.ts +0 -21
- package/src/MenuItemText/MenuItemText.d.ts +1 -1
- package/src/MenuItemText/MenuItemText.type.d.ts +0 -17
- package/src/MenuList/MenuList.type.d.ts +0 -4
- package/src/MenuList/MenuListContext.d.ts +0 -6
- package/src/Modal/InnerModal.d.ts +2 -2
- package/src/Modal/InnerModal.type.d.ts +0 -5
- package/src/Modal/Modal.classes.d.ts +1 -1
- package/src/Modal/Modal.d.ts +3 -3
- package/src/Modal/Modal.type.d.ts +0 -11
- package/src/Modal/ModalContext.d.ts +0 -4
- package/src/NestedMenuContext/NestedMenuContext.d.ts +1 -1
- package/src/Option/Option.d.ts +1 -1
- package/src/Option/Option.type.d.ts +0 -3
- package/src/Overlap/Overlap.type.d.ts +0 -11
- package/src/PageHeader/PageHeader.type.d.ts +0 -4
- package/src/PickerTextField/PickerTextField.type.d.ts +0 -10
- package/src/Popover/Popover.d.ts +1 -1
- package/src/Popover/Popover.type.d.ts +0 -29
- package/src/Popper/Popper.d.ts +1 -1
- package/src/Popper/Popper.type.d.ts +0 -61
- package/src/PopperPaper/PopperPaper.d.ts +1 -1
- package/src/Radio/Radio.type.d.ts +0 -5
- package/src/RadioGroup/RadioGroup.d.ts +1 -1
- package/src/RadioGroup/RadioGroup.type.d.ts +0 -4
- package/src/Rating/Rating.d.ts +1 -1
- package/src/Rating/Rating.type.d.ts +0 -74
- package/src/Rating/RatingItem.d.ts +1 -1
- package/src/Select/Select.type.d.ts +0 -84
- package/src/SingleFilter/FilterButton/FilterButton.d.ts +1 -1
- package/src/SingleFilter/FilterButton/FilterButton.type.d.ts +0 -16
- package/src/SingleFilter/SingleFilter.d.ts +1 -1
- package/src/SingleFilter/SingleFilter.type.d.ts +0 -26
- package/src/Skeleton/Skeleton.type.d.ts +0 -1
- package/src/Skeleton/SkeletonContainer/SkeletonContainer.classes.d.ts +1 -1
- package/src/Slider/Slider.classes.d.ts +1 -5
- package/src/Slider/Slider.d.ts +2 -2
- package/src/Slider/Slider.type.d.ts +0 -104
- package/src/Snackbar/Snackbar.type.d.ts +0 -18
- package/src/SortableListItem/SortableListItemOverlay.d.ts +1 -1
- package/src/SplitButton/SplitButton.d.ts +1 -1
- package/src/SplitButton/SplitButton.type.d.ts +0 -21
- package/src/Squircle/Squircle.type.d.ts +0 -3
- package/src/StatusIndicator/StatusIndicator.classes.d.ts +1 -1
- package/src/StatusIndicator/StatusIndicator.type.d.ts +1 -9
- package/src/Step/Step.type.d.ts +0 -29
- package/src/Step/StepContext.d.ts +0 -7
- package/src/StepButton/StepButton.type.d.ts +0 -15
- package/src/StepContent/StepContent.d.ts +1 -1
- package/src/StepContent/StepContent.type.d.ts +0 -7
- package/src/StepIcon/StepIcon.type.d.ts +0 -26
- package/src/StepLabel/StepLabel.d.ts +1 -1
- package/src/StepLabel/StepLabel.type.d.ts +0 -23
- package/src/Stepper/Stepper.type.d.ts +0 -27
- package/src/SubMenu/PopperMenu.d.ts +1 -1
- package/src/SubMenu/SubMenu.d.ts +1 -1
- package/src/SwipeableDrawer/SwipeableDrawer.d.ts +1 -27
- package/src/SwipeableDrawer/SwipeableDrawer.types.d.ts +0 -67
- package/src/SwipeableDrawer/hooks/useDrawerGestures.d.ts +0 -110
- package/src/SwipeableDrawer/hooks/useElementSizeObserver.d.ts +0 -5
- package/src/SwipeableDrawer/hooks/useSnapPoints.d.ts +0 -60
- package/src/Switch/Switch.type.d.ts +0 -9
- package/src/Tab/Tab.classes.d.ts +3 -2
- package/src/Tab/Tab.d.ts +1 -1
- package/src/Tab/Tab.type.d.ts +0 -29
- package/src/TabContext/TabContext.d.ts +0 -4
- package/src/TabContext/TabContext.type.d.ts +0 -7
- package/src/TabPanel/TabPanel.d.ts +1 -1
- package/src/TabPanel/TabPanel.type.d.ts +0 -10
- package/src/Table/Table.type.d.ts +0 -19
- package/src/TableBody/TableBody.type.d.ts +0 -3
- package/src/TableCell/TableCell.d.ts +0 -4
- package/src/TableCell/TableCell.type.d.ts +0 -35
- package/src/TableContainer/TableContainer.type.d.ts +0 -7
- package/src/TableFooter/TableFooter.type.d.ts +0 -3
- package/src/TableHead/TableHead.type.d.ts +0 -6
- package/src/TablePagination/TablePagination.type.d.ts +0 -47
- package/src/TableRow/TableRow.type.d.ts +0 -17
- package/src/Tabs/TabMoreMenu.d.ts +0 -16
- package/src/Tabs/TabScrollButton.d.ts +1 -11
- package/src/Tabs/Tabs.classes.d.ts +1 -1
- package/src/Tabs/Tabs.d.ts +1 -1
- package/src/Tabs/Tabs.type.d.ts +2 -36
- package/src/Tabs/TabsContext.d.ts +2 -0
- package/src/Tabs/hooks/useTabsScroller.d.ts +0 -30
- package/src/Tag/Tag.d.ts +1 -1
- package/src/Tag/Tag.type.d.ts +0 -12
- package/src/Text/Text.type.d.ts +0 -13
- package/src/TextField/TextField.type.d.ts +0 -64
- package/src/Textarea/Textarea.d.ts +1 -1
- package/src/Textarea/Textarea.type.d.ts +0 -13
- package/src/TimePicker/NumberPicker.d.ts +1 -1
- package/src/TimePicker/NumberPicker.type.d.ts +0 -12
- package/src/TimePicker/SelectionView.d.ts +0 -6
- package/src/TimePicker/TimeButton.d.ts +1 -4
- package/src/TimePicker/TimePicker.type.d.ts +0 -11
- package/src/TimePicker/ToggleText.d.ts +1 -1
- package/src/TimePicker/ToggleText.type.d.ts +0 -3
- package/src/TimePicker/utils/TimeBoundary.d.ts +0 -3
- package/src/TimePicker/utils/TimePickerHelper.d.ts +0 -19
- package/src/TimePicker/utils/getNumberPickerBoundary.d.ts +0 -3
- package/src/Tooltip/TooltipTrigger.a11y.d.ts +0 -9
- package/src/Tooltip/TooltipTrigger.type.d.ts +0 -44
- package/src/Tooltip/TooltipView.type.d.ts +0 -25
- package/src/Tooltip/useTooltipForceHide.d.ts +0 -4
- package/src/Tray/Tray.d.ts +1 -1
- package/src/Tray/Tray.type.d.ts +0 -13
- package/src/Tray/TrayContext.d.ts +0 -4
- package/src/Tray/hooks/useTray.d.ts +0 -16
- package/src/Tray/hooks/useTrayPanel.d.ts +0 -3
- package/src/TrayMenu/TrayMenu.d.ts +1 -1
- package/src/TrayMenu/TrayMenuItem.d.ts +1 -1
- package/src/VirtualizedList/VirtualizedList.type.d.ts +0 -27
- package/src/VirtualizedMenu/VirtualizedMenu.classes.d.ts +1 -1
- package/src/VirtualizedMenu/VirtualizedMenu.type.d.ts +0 -17
|
@@ -1,33 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { FlatIndexLocationWithAlign, ListItem } from 'react-virtuoso';
|
|
3
3
|
declare type UseHighlightScrollParams = {
|
|
4
|
-
|
|
4
|
+
virtualize?: boolean;
|
|
5
5
|
scrollToIndex: (location: FlatIndexLocationWithAlign) => void;
|
|
6
|
-
/** that scroll container height ref */
|
|
7
6
|
containerHeighRef: React.MutableRefObject<number>;
|
|
8
7
|
};
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
*/
|
|
12
|
-
export declare function useHighlightScroll({ containerHeighRef, scrollToIndex, }: UseHighlightScrollParams): {
|
|
13
|
-
/**
|
|
14
|
-
* scroller reference
|
|
15
|
-
*/
|
|
16
|
-
scrollerRef: React.MutableRefObject<HTMLElement | undefined>;
|
|
17
|
-
/**
|
|
18
|
-
* Scroll to target highlighted index
|
|
19
|
-
* @param prevHighlightedIndex previous highlightedIndex
|
|
20
|
-
* @param currHighlightedIndex current highlightedIndex
|
|
21
|
-
* @param topHighlightIndex top highlighIndex for check should scroll when init
|
|
22
|
-
*/
|
|
8
|
+
export declare function useHighlightScroll({ virtualize, containerHeighRef, scrollToIndex, }: UseHighlightScrollParams): {
|
|
9
|
+
scrollerRef: import("react").MutableRefObject<HTMLElement | undefined>;
|
|
23
10
|
scrollToHighlightedIndex: (prevHighlightedIndex: number, currHighlightedIndex: number, topHighlightIndex?: number) => void;
|
|
24
|
-
/**
|
|
25
|
-
* set to virtuoso `scrollerRef` prop, auto bind inner `scrollerRef`
|
|
26
|
-
*/
|
|
27
11
|
scrollerRefFn: (elm: HTMLElement) => HTMLElement;
|
|
28
|
-
/**
|
|
29
|
-
* set to virtuoso `itemsRendered` prop, auto bind inner `renderedItemsRef`
|
|
30
|
-
*/
|
|
31
12
|
itemsRendered: (e: ListItem<unknown>[]) => ListItem<unknown>[];
|
|
32
13
|
};
|
|
33
14
|
export {};
|
|
@@ -11,64 +11,27 @@ export declare type SuggestionListGetItemPropsOptions<T> = {
|
|
|
11
11
|
};
|
|
12
12
|
export declare type SuggestionListHighlightChangeReason = 'keyboard' | 'mouse' | 'auto' | undefined;
|
|
13
13
|
export declare type SuggestionListFilterOptions<T> = (options: T[], state: {
|
|
14
|
-
/** current input value */
|
|
15
14
|
inputValue?: string;
|
|
16
|
-
/** is that input value have been changed or not */
|
|
17
15
|
inputChanged?: boolean;
|
|
18
|
-
/** get option label */
|
|
19
16
|
getOptionLabel: (option: T) => string;
|
|
20
|
-
/** current be selected item array */
|
|
21
17
|
selectedItems: T[];
|
|
18
|
+
isOptionEqualToValue: (option: T, value: T) => boolean;
|
|
22
19
|
}) => T[];
|
|
23
20
|
export declare type UseSuggestionListParams<T extends SuggestionListItemData = SuggestionListItemData> = {
|
|
24
|
-
/** current suggestion list unique id */
|
|
25
21
|
id?: string;
|
|
26
|
-
/** current text field input value */
|
|
27
22
|
inputValue?: string;
|
|
28
|
-
/** emit current input value */
|
|
29
23
|
onInputChange?: (value: string) => void;
|
|
30
|
-
/** that input ref you binding event */
|
|
31
24
|
inputRef: React.RefObject<HTMLInputElement>;
|
|
32
|
-
/**
|
|
33
|
-
* If `true`, will allow disabled items highlightable.
|
|
34
|
-
*/
|
|
35
25
|
disabledItemsHighlightable?: boolean;
|
|
36
|
-
/**
|
|
37
|
-
* process filtered options result, let you can handle result after filter
|
|
38
|
-
*/
|
|
39
26
|
processFilteredResult?: (options: T[], inputValue: string) => T[];
|
|
40
|
-
/**
|
|
41
|
-
* A filter function that determines the options that are eligible.
|
|
42
|
-
*
|
|
43
|
-
* @param {T[]} options The options to render.
|
|
44
|
-
* @param {object} state The state of the component.
|
|
45
|
-
* @returns {T[]}
|
|
46
|
-
*/
|
|
47
27
|
filterOptions?: SuggestionListFilterOptions<T>;
|
|
48
|
-
/** emit when item be select */
|
|
49
28
|
onSelect?: (event: React.ChangeEvent<{}>, selectedItems: T) => void;
|
|
50
|
-
/**
|
|
51
|
-
* @param event keydown event
|
|
52
|
-
* @param highlightedIndex current menu highlightedIndex
|
|
53
|
-
*/
|
|
54
29
|
onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>, highlightedIndex?: number | null) => void;
|
|
55
|
-
/**
|
|
56
|
-
* Trigger when click clear button.
|
|
57
|
-
*/
|
|
58
30
|
onClear?: React.MouseEventHandler<HTMLButtonElement>;
|
|
59
|
-
/**
|
|
60
|
-
* Used to determine the string value for a given option.
|
|
61
|
-
* It's used to fill the input (and the list box options if `renderOption` is not provided).
|
|
62
|
-
*
|
|
63
|
-
* @param {T} option
|
|
64
|
-
* @returns {string}
|
|
65
|
-
*/
|
|
66
31
|
getOptionLabel?: (option: T) => string;
|
|
32
|
+
isOptionEqualToValue?: (option: T, value: T) => boolean;
|
|
67
33
|
} & Omit<UseAutocompleteGroupParams<T>, 'filteredResult' | 'id'>;
|
|
68
|
-
|
|
69
|
-
* provide suggestion list with search function and expandable group with virtualized list
|
|
70
|
-
*/
|
|
71
|
-
export declare const useSuggestionList: <T extends SuggestionListItemData = SuggestionListItemData>({ id, inputValue: inputValueProp, getOptionLabel, filterOptions, disabledItemsHighlightable, options, onInputChange: onInputChangeProp, inputRef, onKeyDown: onKeyDownProp, onSelect, onClear, getOptionDisabled, groupBy, onGroupExpanded, groupVariant, groupExpanded, groupDefaultExpanded, getExpandIconProps, processFilteredResult, }: UseSuggestionListParams<T>) => {
|
|
34
|
+
export declare const useSuggestionList: <T extends SuggestionListItemData = SuggestionListItemData>({ id, inputValue: inputValueProp, getOptionLabel, filterOptions, disabledItemsHighlightable, options, onInputChange: onInputChangeProp, inputRef, onKeyDown: onKeyDownProp, onSelect, onClear, getOptionDisabled, groupBy, onGroupExpanded, groupVariant, groupExpanded, groupDefaultExpanded, getExpandIconProps, processFilteredResult, isOptionEqualToValue, }: UseSuggestionListParams<T>) => {
|
|
72
35
|
reset: (isFocus?: boolean | undefined) => void;
|
|
73
36
|
clearInput: () => void;
|
|
74
37
|
forceUpdate: () => void;
|
|
@@ -94,7 +57,6 @@ export declare const useSuggestionList: <T extends SuggestionListItemData = Sugg
|
|
|
94
57
|
changeHighlightedIndexReasonRef: import("react").MutableRefObject<SuggestionListHighlightChangeReason>;
|
|
95
58
|
changeHighlightedIndexReason: SuggestionListHighlightChangeReason;
|
|
96
59
|
optionsGroupList: import("./SuggestionListItem").SuggestionListGroupedOption<T>[];
|
|
97
|
-
/** current unique id */
|
|
98
60
|
id: string;
|
|
99
61
|
getNextFocusableOption: (index?: number, isInfinite?: any) => number;
|
|
100
62
|
handleF10KeyDown: (e: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
@@ -2,63 +2,14 @@ import { ButtonHTMLAttributes, PropsWithoutRef } from 'react';
|
|
|
2
2
|
import { SuggestionListGroupedOption, SuggestionListItemData } from './SuggestionListItem';
|
|
3
3
|
export declare type UseAutocompleteGroupParams<T extends SuggestionListItemData = SuggestionListItemData> = {
|
|
4
4
|
id: string;
|
|
5
|
-
/**
|
|
6
|
-
* @requires
|
|
7
|
-
* options for search
|
|
8
|
-
*/
|
|
9
5
|
options: T[];
|
|
10
|
-
/**
|
|
11
|
-
* Used to determine the disabled state for a given option.
|
|
12
|
-
*
|
|
13
|
-
* @param {T} option The option to test.
|
|
14
|
-
* @returns {boolean}
|
|
15
|
-
*/
|
|
16
6
|
getOptionDisabled?: (option: T) => boolean;
|
|
17
|
-
/**
|
|
18
|
-
* current filtered results
|
|
19
|
-
*/
|
|
20
7
|
filteredResult: T[];
|
|
21
|
-
/**
|
|
22
|
-
* group layout mode
|
|
23
|
-
*
|
|
24
|
-
* - `normal`: use group name as group title
|
|
25
|
-
* - `expanded`: use first-item as group title, and that is `clickable`
|
|
26
|
-
*
|
|
27
|
-
* @default 'normal'
|
|
28
|
-
*/
|
|
29
8
|
groupVariant?: 'normal' | 'expanded';
|
|
30
|
-
/**
|
|
31
|
-
* group expanded state, you can control expanded state by that
|
|
32
|
-
*
|
|
33
|
-
* - `true`: expand all
|
|
34
|
-
* - `false`: collapse all
|
|
35
|
-
* - `{key: boolean}`: control group state
|
|
36
|
-
*/
|
|
37
9
|
groupExpanded?: Record<string, boolean> | boolean;
|
|
38
|
-
/**
|
|
39
|
-
* group default expanded state
|
|
40
|
-
*
|
|
41
|
-
* - `true`: expand all
|
|
42
|
-
* - `false`: collapse all
|
|
43
|
-
* - `{key: boolean}`: control group state
|
|
44
|
-
*/
|
|
45
10
|
groupDefaultExpanded?: Record<string, boolean> | boolean;
|
|
46
|
-
/**
|
|
47
|
-
* If provided, the options will be grouped under the returned string.
|
|
48
|
-
* The groupBy value is also used as the text for group headings when `renderGroup` is not provided.
|
|
49
|
-
*
|
|
50
|
-
* @param {T} option The options to group.
|
|
51
|
-
* @returns {string} The group key
|
|
52
|
-
*/
|
|
53
11
|
groupBy?: (option: T) => string;
|
|
54
|
-
/**
|
|
55
|
-
* Trigger when group item expanded state change.
|
|
56
|
-
*
|
|
57
|
-
* @param {object} group The state of the group.
|
|
58
|
-
* @param {object} groupStateMap The whole group state
|
|
59
|
-
*/
|
|
60
12
|
onGroupExpanded?: (group: SuggestionListGroupedOption<T>, groupStateMap: Record<string, boolean>) => void;
|
|
61
|
-
/** The props apply to ExpandIcon */
|
|
62
13
|
getExpandIconProps?: (group: SuggestionListGroupedOption) => PropsWithoutRef<React.DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>> | undefined;
|
|
63
14
|
};
|
|
64
15
|
declare type ExpandedMapState = Record<string, boolean>;
|
|
@@ -3,82 +3,22 @@ import { SuggestionListGetItemPropsOptions, SuggestionListItemData, UseSuggestio
|
|
|
3
3
|
import { UseAutocompleteTagParams } from './useAutocompleteTag';
|
|
4
4
|
export declare type AutocompleteCloseReason = 'toggleInput' | 'escape' | 'select-option' | 'blur';
|
|
5
5
|
export declare type UseAutocompleteParams<T extends SuggestionListItemData = SuggestionListItemData> = {
|
|
6
|
-
/** input container ref, if you have a scrollable input, that will be needed */
|
|
7
6
|
inputContainerRef?: React.RefObject<HTMLDivElement>;
|
|
8
|
-
/**
|
|
9
|
-
* if you want add `freeSolo` item at `first` or `last` of options array,
|
|
10
|
-
* set that will auto add item into options
|
|
11
|
-
*/
|
|
12
7
|
addNoOptionItem?: 'first' | 'last';
|
|
13
|
-
/**
|
|
14
|
-
* Control the popup open state.
|
|
15
|
-
*/
|
|
16
8
|
open?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Callback fired when the popup requests to be opened.
|
|
19
|
-
* Use in controlled mode (see open).
|
|
20
|
-
*
|
|
21
|
-
* @param {object} event The event source of the callback.
|
|
22
|
-
*/
|
|
23
9
|
onOpen?: (event: React.ChangeEvent<{}>) => void;
|
|
24
|
-
/**
|
|
25
|
-
* Callback fired when the popup requests to be closed.
|
|
26
|
-
* Use in controlled mode (see open).
|
|
27
|
-
*
|
|
28
|
-
* @param {object} event The event source of the callback.
|
|
29
|
-
* @param {string} reason Can be: `"toggleInput"`, `"escape"`, `"select-option"`, `"blur"`.
|
|
30
|
-
*/
|
|
31
10
|
onClose?: (event: React.ChangeEvent<{}>, reason: AutocompleteCloseReason) => void;
|
|
32
|
-
/**
|
|
33
|
-
* If `true`, the popup won't close when a value is selected.
|
|
34
|
-
* This prop defaults to the value of the `multiple` prop.
|
|
35
|
-
*
|
|
36
|
-
* @default multiple
|
|
37
|
-
*/
|
|
38
11
|
disableCloseOnSelect?: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* This is the initial isOpen value when Autocomplete is initialized.
|
|
41
|
-
*/
|
|
42
12
|
initialIsOpen?: boolean;
|
|
43
|
-
/** current input value */
|
|
44
13
|
inputValue?: string;
|
|
45
|
-
/**
|
|
46
|
-
* If `true`, the selected option becomes the value of the input
|
|
47
|
-
* when the input loses focus unless the user chooses
|
|
48
|
-
* a different option or changes the character string in the input.
|
|
49
|
-
*/
|
|
50
14
|
autoSelect?: boolean;
|
|
51
|
-
/**
|
|
52
|
-
* If `true`, the popup will open on input focus.
|
|
53
|
-
* @default true
|
|
54
|
-
*/
|
|
55
15
|
openOnFocus?: boolean;
|
|
56
|
-
/**
|
|
57
|
-
* If `true`, when the input element is clicked it will toggle
|
|
58
|
-
* the visibility of the popup.
|
|
59
|
-
*
|
|
60
|
-
* @default true
|
|
61
|
-
*/
|
|
62
16
|
toggleWithInput?: boolean;
|
|
63
|
-
/**
|
|
64
|
-
* Render when search no have any options.
|
|
65
|
-
*
|
|
66
|
-
* @param {object} additionItems
|
|
67
|
-
* render when not have any options,
|
|
68
|
-
* if set that the freeSolo auto add items will not be cover
|
|
69
|
-
*/
|
|
70
17
|
renderNoOptions?: (getNoOptionsProps: (additionProps: PropsWithoutRef<DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>>) => DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, additionItem: SuggestionListItemData | null) => React.ReactNode;
|
|
71
|
-
/**
|
|
72
|
-
* If `true`, the first option is automatically highlighted.
|
|
73
|
-
* @default true
|
|
74
|
-
*/
|
|
75
18
|
autoHighlight?: boolean;
|
|
76
|
-
/**
|
|
77
|
-
* current focused state
|
|
78
|
-
*/
|
|
79
19
|
focused?: boolean;
|
|
80
20
|
} & Pick<InputHTMLAttributes<HTMLInputElement>, 'disabled' | 'required'> & UseSuggestionListParams<T> & Omit<UseAutocompleteTagParams<T>, 'id'>;
|
|
81
|
-
export declare const useAutocomplete: <T extends SuggestionListItemData = SuggestionListItemData>({ multiple: multipleProp, variant, inputValue: inputValueProp, getOptionLabel, keyToTags, filterOptions: filterOptionsProp, disabledItemsHighlightable, options, freeSolo, onInputChange: onInputChangeProp, maxFreeSolo, onMaxFreeSolo, openOnFocus, toggleWithInput, disableCloseOnSelect, initialIsOpen, autoSelect, inputContainerRef, inputRef, wrapperRef, onKeyDown: onKeyDownProp, onChange: onSelectChange, value: selectedItemsProp, disabled, renderNoOptions, onClear, autoHighlight, getOptionDisabled, addNoOptionItem, groupBy, onGroupExpanded, groupVariant, groupExpanded, groupDefaultExpanded, getExpandIconProps, required, open: openProp, onOpen, onClose, focused, }: UseAutocompleteParams<T>) => {
|
|
21
|
+
export declare const useAutocomplete: <T extends SuggestionListItemData = SuggestionListItemData>({ multiple: multipleProp, variant, inputValue: inputValueProp, getOptionLabel, keyToTags, filterOptions: filterOptionsProp, disabledItemsHighlightable, options, freeSolo, onInputChange: onInputChangeProp, maxFreeSolo, onMaxFreeSolo, openOnFocus, toggleWithInput, disableCloseOnSelect, initialIsOpen, autoSelect, inputContainerRef, inputRef, wrapperRef, onKeyDown: onKeyDownProp, onChange: onSelectChange, value: selectedItemsProp, disabled, renderNoOptions, onClear, autoHighlight, getOptionDisabled, addNoOptionItem, groupBy, onGroupExpanded, groupVariant, groupExpanded, groupDefaultExpanded, getExpandIconProps, required, open: openProp, onOpen, onClose, focused, isOptionEqualToValue, }: UseAutocompleteParams<T>) => {
|
|
82
22
|
focusInput: () => void | undefined;
|
|
83
23
|
readOnly: boolean | undefined;
|
|
84
24
|
getTagProps: ({ index, selectedItem, ...restTagProps }: import("./useAutocompleteTag").GetTagProps<T>) => {
|
|
@@ -89,6 +29,7 @@ export declare const useAutocomplete: <T extends SuggestionListItemData = Sugges
|
|
|
89
29
|
children?: import("react").ReactNode;
|
|
90
30
|
onKeyDown?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
91
31
|
onKeyUp?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
32
|
+
onMouseDown?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
92
33
|
onClick?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
93
34
|
'aria-hidden'?: boolean | "true" | "false" | undefined;
|
|
94
35
|
dir?: string | undefined;
|
|
@@ -153,7 +94,7 @@ export declare const useAutocomplete: <T extends SuggestionListItemData = Sugges
|
|
|
153
94
|
'aria-describedby'?: string | undefined;
|
|
154
95
|
'aria-details'?: string | undefined;
|
|
155
96
|
'aria-disabled'?: boolean | "true" | "false" | undefined;
|
|
156
|
-
'aria-dropeffect'?: "
|
|
97
|
+
'aria-dropeffect'?: "copy" | "link" | "none" | "execute" | "move" | "popup" | undefined;
|
|
157
98
|
'aria-errormessage'?: string | undefined;
|
|
158
99
|
'aria-expanded'?: boolean | "true" | "false" | undefined;
|
|
159
100
|
'aria-flowto'?: string | undefined;
|
|
@@ -290,7 +231,6 @@ export declare const useAutocomplete: <T extends SuggestionListItemData = Sugges
|
|
|
290
231
|
onDragStartCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
291
232
|
onDrop?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
292
233
|
onDropCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
293
|
-
onMouseDown?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
294
234
|
onMouseDownCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
295
235
|
onMouseMove?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
296
236
|
onMouseMoveCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
@@ -343,7 +283,7 @@ export declare const useAutocomplete: <T extends SuggestionListItemData = Sugges
|
|
|
343
283
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
344
284
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
345
285
|
};
|
|
346
|
-
getClearButtonProps: (props?: Pick<Omit<DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "color">, "value" | "children" | "onKeyDown" | "onKeyUp" | "onClick" | "disabled" | "aria-hidden" | "dir" | "form" | "slot" | "style" | "title" | "aria-live" | "aria-atomic" | "role" | "name" | "className" | "accessKey" | "draggable" | "hidden" | "lang" | "translate" | "id" | "prefix" | "contentEditable" | "inputMode" | "tabIndex" | "key" | "defaultChecked" | "defaultValue" | "formAction" | "formMethod" | "formNoValidate" | "formTarget" | "placeholder" | "type" | "onFocus" | "onBlur" | "onMouseEnter" | "onMouseLeave" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "is" | "aria-activedescendant" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "
|
|
286
|
+
getClearButtonProps: (props?: Pick<Omit<DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "color">, "value" | "children" | "onKeyDown" | "onKeyUp" | "onMouseDown" | "onClick" | "disabled" | "aria-hidden" | "dir" | "form" | "slot" | "style" | "title" | "aria-live" | "aria-atomic" | "role" | "name" | "className" | "accessKey" | "draggable" | "hidden" | "lang" | "translate" | "id" | "prefix" | "contentEditable" | "inputMode" | "tabIndex" | "key" | "defaultChecked" | "defaultValue" | "formAction" | "formMethod" | "formNoValidate" | "formTarget" | "placeholder" | "type" | "onFocus" | "onBlur" | "onMouseEnter" | "onMouseLeave" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "is" | "aria-activedescendant" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDownCapture" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "autoFocus" | "formEncType"> | undefined) => Pick<Omit<DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "color">, "value" | "children" | "onKeyDown" | "onKeyUp" | "onMouseDown" | "onClick" | "disabled" | "aria-hidden" | "dir" | "form" | "slot" | "style" | "title" | "aria-live" | "aria-atomic" | "role" | "name" | "className" | "accessKey" | "draggable" | "hidden" | "lang" | "translate" | "id" | "prefix" | "contentEditable" | "inputMode" | "tabIndex" | "key" | "defaultChecked" | "defaultValue" | "formAction" | "formMethod" | "formNoValidate" | "formTarget" | "placeholder" | "type" | "onFocus" | "onBlur" | "onMouseEnter" | "onMouseLeave" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "is" | "aria-activedescendant" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDownCapture" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "autoFocus" | "formEncType">;
|
|
347
287
|
activeIndex: number;
|
|
348
288
|
setActiveIndex: (tagToFocus: number, focus?: any) => void;
|
|
349
289
|
isOpen: boolean;
|
|
@@ -411,7 +351,7 @@ export declare const useAutocomplete: <T extends SuggestionListItemData = Sugges
|
|
|
411
351
|
'aria-describedby'?: string | undefined;
|
|
412
352
|
'aria-details'?: string | undefined;
|
|
413
353
|
'aria-disabled': boolean | "true" | "false";
|
|
414
|
-
'aria-dropeffect'?: "
|
|
354
|
+
'aria-dropeffect'?: "copy" | "link" | "none" | "execute" | "move" | "popup" | undefined;
|
|
415
355
|
'aria-errormessage'?: string | undefined;
|
|
416
356
|
'aria-expanded'?: boolean | "true" | "false" | undefined;
|
|
417
357
|
'aria-flowto'?: string | undefined;
|
|
@@ -631,7 +571,6 @@ export declare const useAutocomplete: <T extends SuggestionListItemData = Sugges
|
|
|
631
571
|
reset: (isFocus?: boolean | undefined) => void;
|
|
632
572
|
forceUpdate: () => void;
|
|
633
573
|
optionsGroupList: import("./SuggestionList").SuggestionListGroupedOption<T>[];
|
|
634
|
-
/** that state of current Autocomplete focused, both tag or input focused */
|
|
635
574
|
focused: boolean | undefined;
|
|
636
575
|
id: string;
|
|
637
576
|
inputChanged: boolean;
|
|
@@ -11,54 +11,21 @@ export declare type GetTagProps<T> = PropsWithChildren<{
|
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
} & PropsWithoutRef<Omit<DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, 'color'>> & HTMLDataAttribute>;
|
|
13
13
|
export declare type UseAutocompleteTagParams<T extends SuggestionListItemData = SuggestionListItemData> = {
|
|
14
|
-
/** id for unique */
|
|
15
14
|
id: string;
|
|
16
|
-
/** that input ref you binding event */
|
|
17
15
|
inputRef: React.RefObject<HTMLInputElement>;
|
|
18
|
-
/** wrapper container ref, if you have `tag` or use in `popper`, that will be needed */
|
|
19
16
|
wrapperRef?: React.RefObject<HTMLDivElement>;
|
|
20
|
-
/** when that return `true` will ignore freeSolo create event */
|
|
21
17
|
getStopCreateFreeSolo?: () => boolean;
|
|
22
|
-
/** trigger when check free solo complete */
|
|
23
18
|
onReset?: (e?: ChangeEvent<{}>) => void;
|
|
24
|
-
/**
|
|
25
|
-
* max number of tags,
|
|
26
|
-
* @default 20
|
|
27
|
-
*/
|
|
28
19
|
maxFreeSolo?: number;
|
|
29
|
-
/** emit when bigger than maxFreeSolo number */
|
|
30
20
|
onMaxFreeSolo?: (max?: number) => void;
|
|
31
|
-
/**
|
|
32
|
-
* one of that character, also can be confirm a tag
|
|
33
|
-
* @default
|
|
34
|
-
* [',', ';', '↵']
|
|
35
|
-
*/
|
|
36
21
|
keyToTags?: string[];
|
|
37
|
-
/** selectedItems array list */
|
|
38
22
|
value?: T[];
|
|
39
|
-
/**
|
|
40
|
-
* emit tags change event
|
|
41
|
-
*/
|
|
42
23
|
onChange?: (selectedItems: T[]) => void;
|
|
43
|
-
/**
|
|
44
|
-
* display mode,
|
|
45
|
-
* when be `autocomplete`, that `multiple` will be `false`
|
|
46
|
-
*
|
|
47
|
-
* @default tags
|
|
48
|
-
*/
|
|
49
24
|
variant?: 'tags' | 'autocomplete';
|
|
50
|
-
/**
|
|
51
|
-
* If `true`, the Autocomplete is free solo, meaning that the user input is not bound to provided options.
|
|
52
|
-
*/
|
|
53
25
|
freeSolo?: boolean;
|
|
54
|
-
/**
|
|
55
|
-
* is that can select multiple, default is `false`
|
|
56
|
-
*/
|
|
57
26
|
multiple?: boolean;
|
|
58
|
-
/** trigger when addTags is called */
|
|
59
27
|
onAddTags?: () => void;
|
|
60
28
|
} & Pick<InputHTMLAttributes<HTMLInputElement>, 'disabled' | 'required'> & Pick<UseSuggestionListParams<T>, 'getOptionLabel' | 'onInputChange'>;
|
|
61
|
-
/** @inner inner hook work with useAutocomplete */
|
|
62
29
|
export declare const useAutocompleteTag: <T extends SuggestionListItemData = SuggestionListItemData>({ id: AutocompleteId, value: selectedItemsProp, onChange: onSelectChange, variant, getOptionLabel, onInputChange: onInputChangeProp, freeSolo, multiple, wrapperRef, inputRef, maxFreeSolo, keyToTags, onMaxFreeSolo, required, disabled, getStopCreateFreeSolo, onReset, onAddTags, }: UseAutocompleteTagParams<T>) => {
|
|
63
30
|
focused: boolean;
|
|
64
31
|
setFocused: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
@@ -128,7 +95,7 @@ export declare const useAutocompleteTag: <T extends SuggestionListItemData = Sug
|
|
|
128
95
|
'aria-describedby'?: string | undefined;
|
|
129
96
|
'aria-details'?: string | undefined;
|
|
130
97
|
'aria-disabled': boolean | "true" | "false";
|
|
131
|
-
'aria-dropeffect'?: "
|
|
98
|
+
'aria-dropeffect'?: "copy" | "link" | "none" | "execute" | "move" | "popup" | undefined;
|
|
132
99
|
'aria-errormessage'?: string | undefined;
|
|
133
100
|
'aria-expanded'?: boolean | "true" | "false" | undefined;
|
|
134
101
|
'aria-flowto'?: string | undefined;
|
|
@@ -336,6 +303,7 @@ export declare const useAutocompleteTag: <T extends SuggestionListItemData = Sug
|
|
|
336
303
|
children?: import("react").ReactNode;
|
|
337
304
|
onKeyDown?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
338
305
|
onKeyUp?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
306
|
+
onMouseDown?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
339
307
|
onClick?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
340
308
|
'aria-hidden'?: boolean | "true" | "false" | undefined;
|
|
341
309
|
dir?: string | undefined;
|
|
@@ -400,7 +368,7 @@ export declare const useAutocompleteTag: <T extends SuggestionListItemData = Sug
|
|
|
400
368
|
'aria-describedby'?: string | undefined;
|
|
401
369
|
'aria-details'?: string | undefined;
|
|
402
370
|
'aria-disabled'?: boolean | "true" | "false" | undefined;
|
|
403
|
-
'aria-dropeffect'?: "
|
|
371
|
+
'aria-dropeffect'?: "copy" | "link" | "none" | "execute" | "move" | "popup" | undefined;
|
|
404
372
|
'aria-errormessage'?: string | undefined;
|
|
405
373
|
'aria-expanded'?: boolean | "true" | "false" | undefined;
|
|
406
374
|
'aria-flowto'?: string | undefined;
|
|
@@ -537,7 +505,6 @@ export declare const useAutocompleteTag: <T extends SuggestionListItemData = Sug
|
|
|
537
505
|
onDragStartCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
538
506
|
onDrop?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
539
507
|
onDropCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
540
|
-
onMouseDown?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
541
508
|
onMouseDownCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
542
509
|
onMouseMove?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
543
510
|
onMouseMoveCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
@@ -8,79 +8,21 @@ declare type ExtendElementType = ElementType;
|
|
|
8
8
|
export declare type AvatarVariant = 'circle' | 'squircle';
|
|
9
9
|
export declare type AvatarSize = 'xxlarge' | 'xlarge' | 'large' | 'medium' | 'small' | 'xsmall' | 'xxsmall';
|
|
10
10
|
declare type BaseAvatarProps = WithClassesProps<{
|
|
11
|
-
/**
|
|
12
|
-
* Used in combination with `src` or `srcSet` to
|
|
13
|
-
* provide an alt attribute for the rendered `img` element.
|
|
14
|
-
*/
|
|
15
11
|
alt?: string;
|
|
16
|
-
/**
|
|
17
|
-
* Used to render text elements inside the Avatar if `src` or `srcSet` is not set.
|
|
18
|
-
* This can be an element, or just a string.
|
|
19
|
-
*/
|
|
20
12
|
children?: ReactNode;
|
|
21
|
-
/**
|
|
22
|
-
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attributes) applied to the `img` element if the component is used to display an image.
|
|
23
|
-
* It can be used to listen for the loading error event.
|
|
24
|
-
*/
|
|
25
13
|
imgProps?: Omit<ComponentProps<'img'>, 'alt' | 'src' | 'srcSet'>;
|
|
26
|
-
/**
|
|
27
|
-
* The size of the component.
|
|
28
|
-
* @default 'xlarge'
|
|
29
|
-
*/
|
|
30
14
|
size?: AvatarSize;
|
|
31
|
-
/**
|
|
32
|
-
* The `src` attribute for the `img` element.
|
|
33
|
-
* If an error occurs while loading the avatar image, it will fallback to alternatives in the following order:
|
|
34
|
-
* 1. The provided children string.
|
|
35
|
-
* 2. The first letter of the alt text.
|
|
36
|
-
* 3. A generic icon. (**Only applies to variant 'circle'**)
|
|
37
|
-
*/
|
|
38
15
|
src?: string;
|
|
39
|
-
/**
|
|
40
|
-
* The `srcSet` attribute for the `img` element.
|
|
41
|
-
* Use this attribute for responsive image display.
|
|
42
|
-
*/
|
|
43
16
|
srcSet?: string;
|
|
44
|
-
/**
|
|
45
|
-
* Icon symbol.
|
|
46
|
-
*/
|
|
47
17
|
symbol?: ComponentType;
|
|
48
|
-
/**
|
|
49
|
-
* The variant to use.
|
|
50
|
-
* @default 'circle'
|
|
51
|
-
*/
|
|
52
18
|
variant?: AvatarVariant;
|
|
53
|
-
/**
|
|
54
|
-
* The color of the component.
|
|
55
|
-
* @default 'default'
|
|
56
|
-
*/
|
|
57
19
|
color?: 'default' | 'primary';
|
|
58
|
-
/**
|
|
59
|
-
* This will apply to the avatar shape node
|
|
60
|
-
* @default div
|
|
61
|
-
* */
|
|
62
20
|
component?: 'div' | 'button';
|
|
63
|
-
/**
|
|
64
|
-
* If this component is clickable. When enabled hover, pressed and focus states are triggered.
|
|
65
|
-
*/
|
|
66
21
|
clickable?: boolean;
|
|
67
|
-
/**
|
|
68
|
-
* Props of the avatar shape
|
|
69
|
-
*/
|
|
70
22
|
avatarShapeRef?: Ref<ElementRef<'div' | 'button'>>;
|
|
71
|
-
/**
|
|
72
|
-
* If `true`, the Avatar will show a StatusIndicator component. Does not apply to the `xxsmall`/`xsmall` sizes.
|
|
73
|
-
*/
|
|
74
23
|
showStatusIndicator?: boolean;
|
|
75
|
-
/**
|
|
76
|
-
* Props passed to the StatusIndicator component. Only applicable if `showStatusIndicator` is `true`.
|
|
77
|
-
*/
|
|
78
24
|
IndicatorProps?: StatusIndicatorProps;
|
|
79
|
-
/** Attributes applied to root */
|
|
80
25
|
rootProps?: Omit<ComponentProps<'div'>, 'className' | 'classes'> & Partial<OverlapProps>;
|
|
81
|
-
/**
|
|
82
|
-
* If `true`, the component is disabled.
|
|
83
|
-
*/
|
|
84
26
|
disabled?: boolean;
|
|
85
27
|
} & Pick<UseFocusVisibleOptions, 'onFocusVisible'>, AvatarClassesKey>;
|
|
86
28
|
export declare type AvatarProps<T extends ExtendElementType = DefaultElementType> = OverridableProps<BaseAvatarProps, T>;
|
|
@@ -4,9 +4,6 @@ import { AvatarGroupClassesKey } from './AvatarGroup.classes';
|
|
|
4
4
|
declare type DefaultElementType = 'div';
|
|
5
5
|
declare type ExtendElementType = 'div' | 'button';
|
|
6
6
|
declare type BaseAvatarGroupProps = WithClassesProps<{
|
|
7
|
-
/**
|
|
8
|
-
* You can only pass 2 Avatar components as children
|
|
9
|
-
*/
|
|
10
7
|
children: ReactNode;
|
|
11
8
|
}, AvatarGroupClassesKey>;
|
|
12
9
|
export declare type AvatarGroupProps<T extends ExtendElementType = DefaultElementType> = OverridableProps<BaseAvatarGroupProps, T>;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { StandardProps } from '@ringcentral/spring-base';
|
|
2
2
|
import { BackdropClassesKey } from './Backdrop.classes';
|
|
3
3
|
export declare type BackdropProps = StandardProps<{
|
|
4
|
-
/**
|
|
5
|
-
* Prop to set backdrop transparent
|
|
6
|
-
* @default false
|
|
7
|
-
*/
|
|
8
4
|
isTransparent?: boolean;
|
|
9
5
|
}, BackdropClassesKey, 'div'>;
|
|
@@ -8,45 +8,12 @@ export declare type BadgeOverlap = 'rectangular' | 'circular';
|
|
|
8
8
|
export declare type BadgeAnchorOrigin = 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
|
|
9
9
|
export declare type BadgeType = 'standard' | 'dot';
|
|
10
10
|
export declare type BadgeProps = StandardProps<{
|
|
11
|
-
/**
|
|
12
|
-
* The variant to use.
|
|
13
|
-
* @default 'contained'
|
|
14
|
-
*/
|
|
15
11
|
variant?: BadgeVariant;
|
|
16
|
-
/**
|
|
17
|
-
* The count type to use.
|
|
18
|
-
* @default 'standard'
|
|
19
|
-
*/
|
|
20
12
|
type?: BadgeType;
|
|
21
|
-
/**
|
|
22
|
-
* The integer to display. Undefined count with dot type can be used to show a dot.
|
|
23
|
-
*/
|
|
24
13
|
count?: number | string;
|
|
25
|
-
/**
|
|
26
|
-
* The color of the component.
|
|
27
|
-
* @default 'primary'
|
|
28
|
-
*/
|
|
29
14
|
color?: BadgeColor;
|
|
30
|
-
/**
|
|
31
|
-
* The size of the component.
|
|
32
|
-
* @default 'small'
|
|
33
|
-
*/
|
|
34
15
|
size?: BadgeSize;
|
|
35
|
-
/**
|
|
36
|
-
* Wrapped shape the badge should overlap.
|
|
37
|
-
* Note: Automatically take effect when there are child elements.
|
|
38
|
-
* @default 'rectangular'
|
|
39
|
-
*/
|
|
40
16
|
overlap?: BadgeOverlap;
|
|
41
|
-
/**
|
|
42
|
-
* Use the overlap position when there are no child elements.
|
|
43
|
-
* Note: If true, please give the parent element a position relative or absolute to make the badge work.
|
|
44
|
-
* @default false
|
|
45
|
-
*/
|
|
46
17
|
forceOverlap?: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* The anchor of the badge.
|
|
49
|
-
* @default 'topRight'
|
|
50
|
-
*/
|
|
51
18
|
anchorOrigin?: BadgeAnchorOrigin;
|
|
52
19
|
} & Omit<UseBadgeParameters, 'badgeContent'>, BadgeClassesKey, 'span'>;
|
|
@@ -5,35 +5,11 @@ export declare type BlockBorderRadius = 'none' | 'xsmall' | 'small' | 'medium';
|
|
|
5
5
|
export declare type BlockColor = 'default' | 'neutral';
|
|
6
6
|
declare type DefaultElementType = 'div';
|
|
7
7
|
declare type BaseBlockProps = WithClassesProps<{
|
|
8
|
-
/**
|
|
9
|
-
* If `true`, flex direction is set to 'row'.
|
|
10
|
-
* @default false
|
|
11
|
-
*/
|
|
12
8
|
row?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* If `false`, container padding is set to 0.
|
|
15
|
-
* @default true
|
|
16
|
-
*/
|
|
17
9
|
padding?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* If `false`, the border is hidden.
|
|
20
|
-
* @default true
|
|
21
|
-
*/
|
|
22
10
|
bordered?: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* The border radius of the component.
|
|
25
|
-
* @default 'medium'
|
|
26
|
-
*/
|
|
27
11
|
borderRadius?: BlockBorderRadius;
|
|
28
|
-
/**
|
|
29
|
-
* The color of the component.
|
|
30
|
-
* @default 'default'
|
|
31
|
-
*/
|
|
32
12
|
color?: BlockColor;
|
|
33
|
-
/**
|
|
34
|
-
* If `false`, the background is hidden.
|
|
35
|
-
* @default true
|
|
36
|
-
*/
|
|
37
13
|
background?: boolean;
|
|
38
14
|
}, BlockClassesKey>;
|
|
39
15
|
export declare type BlockProps<T extends ElementType = DefaultElementType> = OverridableProps<BaseBlockProps, T>;
|