@ringcentral/spring-ui 1.7.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/Accordion.js +64 -0
- package/AccordionHeader.js +33 -0
- package/Alert.js +28 -0
- package/Animation.js +46 -0
- package/Announcement.js +48 -0
- package/Autocomplete.js +1767 -0
- package/Avatar.js +105 -0
- package/AvatarGroup.js +9 -0
- package/Backdrop.js +9 -0
- package/Badge.js +15 -0
- package/Block.js +20 -0
- package/BlockHeader.js +18 -0
- package/BottomNavigation.js +145 -0
- package/BottomNavigationItem.js +30 -0
- package/Button.js +24 -0
- package/CallButton.js +39 -0
- package/Checkbox.js +55 -0
- package/Chip.js +26 -0
- package/CircularProgressIndicator.js +10 -0
- package/ClickAwayListener.js +1 -0
- package/ComponentsProps.js +1 -0
- package/DatePicker.js +485 -0
- package/DateUtilsContext.js +56 -0
- package/Dialer.js +587 -0
- package/Dialog.js +62 -0
- package/Divider.js +9 -0
- package/DragHandle.js +8 -0
- package/Drawer.js +19 -0
- package/Dropdown.js +132 -0
- package/EmptyState.js +17 -0
- package/FabButton.js +32 -0
- package/FocusTrap.js +48 -0
- package/FormField.js +10 -0
- package/FormLabel.js +9 -0
- package/Icon.js +9 -0
- package/IconButton.js +26 -0
- package/IconButtonGroup.js +18 -0
- package/InlineEditable.js +98 -0
- package/LICENSE +22 -0
- package/LinearProgressIndicator.js +44 -0
- package/Link.js +18 -0
- package/List.js +11 -0
- package/ListItem.js +22 -0
- package/ListItemText.js +18 -0
- package/ListNavigation.js +57 -0
- package/Menu.js +23 -0
- package/MenuActions.js +21 -0
- package/MenuDivider.js +10 -0
- package/MenuFooter.js +18 -0
- package/MenuHeader.js +18 -0
- package/MenuItem.js +32 -0
- package/MenuItemText.js +9 -0
- package/MenuList.js +33 -0
- package/Modal.js +16 -0
- package/NestedMenuContext.js +23 -0
- package/Option.js +46 -0
- package/Overlap.js +9 -0
- package/PageHeader.js +56 -0
- package/PickerTextField.js +33 -0
- package/Popover.js +21 -0
- package/Popper.js +127 -0
- package/PopperPaper.js +10 -0
- package/Portal.js +1 -0
- package/README.md +76 -0
- package/Radio.js +34 -0
- package/RadioGroup.js +29 -0
- package/Rating.js +235 -0
- package/Select.js +40 -0
- package/SingleFilter.js +130 -0
- package/Skeleton.js +32 -0
- package/Slider.js +110 -0
- package/Snackbar.js +118 -0
- package/SortableList.js +17 -0
- package/SortableListDndContext.js +49 -0
- package/SortableListItem.js +69 -0
- package/SortableVirtualizedList.js +36 -0
- package/SplitButton.js +173 -0
- package/Squircle.js +9 -0
- package/StatusIndicator.js +11 -0
- package/Step.js +65 -0
- package/StepButton.js +41 -0
- package/StepConnector.js +10 -0
- package/StepContent.js +53 -0
- package/StepIcon.js +11 -0
- package/StepLabel.js +14 -0
- package/Stepper.js +37 -0
- package/SubMenu.js +142 -0
- package/SwipeableDrawer.js +742 -0
- package/Switch.js +43 -0
- package/Tab.js +103 -0
- package/TabContext.js +34 -0
- package/TabPanel.js +26 -0
- package/Table.js +24 -0
- package/TableBody.js +20 -0
- package/TableCell.js +86 -0
- package/TableContainer.js +16 -0
- package/TableFooter.js +16 -0
- package/TableHead.js +24 -0
- package/TablePagination.js +122 -0
- package/TableRow.js +37 -0
- package/Tabs.js +827 -0
- package/Tag.js +28 -0
- package/Text.js +61 -0
- package/TextField.js +29 -0
- package/Textarea.js +67 -0
- package/TimePicker.js +600 -0
- package/Tooltip.js +23 -0
- package/Tray.js +13 -0
- package/TrayMenu.js +60 -0
- package/VirtualizedList.js +291 -0
- package/VirtualizedMenu.js +28 -0
- package/VisuallyHidden.js +8 -0
- package/chunks/AccordionContext.js +6 -0
- package/chunks/Alert.js +47 -0
- package/chunks/AvatarGroup.js +22 -0
- package/chunks/Backdrop.js +18 -0
- package/chunks/Badge.js +32 -0
- package/chunks/BottomNavigationItem.js +37 -0
- package/chunks/Button.js +89 -0
- package/chunks/Chip.js +78 -0
- package/chunks/CircularProgressIndicator.js +62 -0
- package/chunks/Divider.js +19 -0
- package/chunks/DragHandle.js +11 -0
- package/chunks/Drawer.js +61 -0
- package/chunks/ExpandCollapseCaret.js +24 -0
- package/chunks/FormLabel.js +27 -0
- package/chunks/Icon.js +25 -0
- package/chunks/IconButtonLabel.js +69 -0
- package/chunks/List.js +22 -0
- package/chunks/ListItem.js +86 -0
- package/chunks/Menu.js +41 -0
- package/chunks/MenuDivider.js +15 -0
- package/chunks/MenuItemText.js +16 -0
- package/chunks/MenuList.js +49 -0
- package/chunks/Modal.js +88 -0
- package/chunks/Overlap.js +25 -0
- package/chunks/PickerTextField.js +75 -0
- package/chunks/Popover.js +58 -0
- package/chunks/PopperPaper.js +15 -0
- package/chunks/RadioGroup.context.js +19 -0
- package/chunks/Select.js +257 -0
- package/chunks/ShowHideEye.js +56 -0
- package/chunks/SlideIn.js +19 -0
- package/chunks/SortableArrow.js +73 -0
- package/chunks/Squircle.js +38 -0
- package/chunks/StatusIndicator.js +19 -0
- package/chunks/StepConnector.js +21 -0
- package/chunks/StepIcon.js +45 -0
- package/chunks/StepLabel.js +29 -0
- package/chunks/StepperContext.js +16 -0
- package/chunks/TableContext.js +6 -0
- package/chunks/Tablelvl2Context.js +6 -0
- package/chunks/TabsContext.js +6 -0
- package/chunks/TextField.js +111 -0
- package/chunks/Tooltip.js +253 -0
- package/chunks/VirtualizedMenu.js +216 -0
- package/chunks/VisuallyHidden.js +12 -0
- package/chunks/getFade.js +23 -0
- package/chunks/getGrow.js +70 -0
- package/chunks/getSlideIn.js +30 -0
- package/chunks/useFocusTrapStack.js +44 -0
- package/chunks/useHelperTextId.js +46 -0
- package/chunks/useListNavigation.js +211 -0
- package/chunks/useMenuItemSelect.js +252 -0
- package/chunks/useMotionSafeTransition.js +13 -0
- package/chunks/useNestedMenuItem.js +16 -0
- package/chunks/useNestedParentMenu.js +54 -0
- package/chunks/usePrefersReducedMotion.js +42 -0
- package/chunks/useTooltipForceHide.js +31 -0
- package/chunks/useTrayNavigate.js +151 -0
- package/chunks/withTooltip.js +15 -0
- package/index.css +10891 -0
- package/index.d.ts +1 -0
- package/index.js +191 -0
- package/package.json +41 -0
- package/src/Accordion/Accordion.classes.d.ts +7 -0
- package/src/Accordion/Accordion.d.ts +5 -0
- package/src/Accordion/Accordion.type.d.ts +31 -0
- package/src/Accordion/AccordionContext.d.ts +9 -0
- package/src/Accordion/index.d.ts +4 -0
- package/src/AccordionHeader/AccordionHeader.classes.d.ts +7 -0
- package/src/AccordionHeader/AccordionHeader.d.ts +5 -0
- package/src/AccordionHeader/AccordionHeader.type.d.ts +25 -0
- package/src/AccordionHeader/index.d.ts +3 -0
- package/src/Alert/Alert.classes.d.ts +8 -0
- package/src/Alert/Alert.d.ts +7 -0
- package/src/Alert/Alert.type.d.ts +56 -0
- package/src/Alert/AlertTitle.classes.d.ts +7 -0
- package/src/Alert/index.d.ts +4 -0
- package/src/Animation/components/ExpandCollapseCaret/ExpandCollapseCaret.classes.d.ts +7 -0
- package/src/Animation/components/ExpandCollapseCaret/ExpandCollapseCaret.d.ts +17 -0
- package/src/Animation/components/ExpandCollapseCaret/index.d.ts +2 -0
- package/src/Animation/components/Fade/Fade.d.ts +5 -0
- package/src/Animation/components/Fade/getFade.d.ts +4 -0
- package/src/Animation/components/Fade/index.d.ts +2 -0
- package/src/Animation/components/Grow/Grow.d.ts +5 -0
- package/src/Animation/components/Grow/getGrow.d.ts +19 -0
- package/src/Animation/components/Grow/index.d.ts +2 -0
- package/src/Animation/components/ShowHideEye/ShowHideEye.classes.d.ts +7 -0
- package/src/Animation/components/ShowHideEye/ShowHideEye.d.ts +14 -0
- package/src/Animation/components/ShowHideEye/index.d.ts +2 -0
- package/src/Animation/components/SlideIn/SlideIn.d.ts +5 -0
- package/src/Animation/components/SlideIn/getSlideIn.d.ts +9 -0
- package/src/Animation/components/SlideIn/index.d.ts +2 -0
- package/src/Animation/components/SortableArrow/SortableArrow.classes.d.ts +7 -0
- package/src/Animation/components/SortableArrow/SortableArrow.d.ts +9 -0
- package/src/Animation/components/SortableArrow/index.d.ts +2 -0
- package/src/Animation/components/index.d.ts +7 -0
- package/src/Animation/components/types.d.ts +9 -0
- package/src/Animation/hooks/__mocks__/MatchMedia.mock.d.ts +12 -0
- package/src/Animation/hooks/index.d.ts +2 -0
- package/src/Animation/hooks/useMotionSafeTransition/index.d.ts +1 -0
- package/src/Animation/hooks/useMotionSafeTransition/useMotionSafeTransition.d.ts +10 -0
- package/src/Animation/hooks/usePrefersReducedMotion/index.d.ts +1 -0
- package/src/Animation/hooks/usePrefersReducedMotion/usePrefersReducedMotion.d.ts +1 -0
- package/src/Animation/index.d.ts +2 -0
- package/src/Announcement/Announcement.classes.d.ts +8 -0
- package/src/Announcement/Announcement.d.ts +5 -0
- package/src/Announcement/Announcement.type.d.ts +4 -0
- package/src/Announcement/index.d.ts +3 -0
- package/src/Autocomplete/Autocomplete.classes.d.ts +14 -0
- package/src/Autocomplete/Autocomplete.d.ts +11 -0
- package/src/Autocomplete/Autocomplete.type.d.ts +141 -0
- package/src/Autocomplete/SuggestionList/SuggestionList.classes.d.ts +7 -0
- package/src/Autocomplete/SuggestionList/SuggestionList.d.ts +144 -0
- package/src/Autocomplete/SuggestionList/SuggestionListItem.d.ts +28 -0
- package/src/Autocomplete/SuggestionList/index.d.ts +4 -0
- package/src/Autocomplete/SuggestionList/utils/SuggestionListItem.d.ts +33 -0
- package/src/Autocomplete/SuggestionList/utils/index.d.ts +5 -0
- package/src/Autocomplete/SuggestionList/utils/useDynamicHeight.d.ts +20 -0
- package/src/Autocomplete/SuggestionList/utils/useHighlightScroll.d.ts +33 -0
- package/src/Autocomplete/SuggestionList/utils/useSuggestionList.d.ts +101 -0
- package/src/Autocomplete/SuggestionList/utils/useSuggestionListGroup.d.ts +71 -0
- package/src/Autocomplete/index.d.ts +6 -0
- package/src/Autocomplete/useAutocomplete.d.ts +640 -0
- package/src/Autocomplete/useAutocompleteTag.d.ts +599 -0
- package/src/Avatar/Avatar.classes.d.ts +10 -0
- package/src/Avatar/Avatar.d.ts +4 -0
- package/src/Avatar/Avatar.type.d.ts +91 -0
- package/src/Avatar/index.d.ts +3 -0
- package/src/AvatarGroup/AvatarGroup.classes.d.ts +7 -0
- package/src/AvatarGroup/AvatarGroup.d.ts +6 -0
- package/src/AvatarGroup/AvatarGroup.type.d.ts +21 -0
- package/src/AvatarGroup/index.d.ts +3 -0
- package/src/Backdrop/Backdrop.classes.d.ts +7 -0
- package/src/Backdrop/Backdrop.d.ts +5 -0
- package/src/Backdrop/Backdrop.type.d.ts +9 -0
- package/src/Backdrop/index.d.ts +3 -0
- package/src/Badge/Badge.classes.d.ts +11 -0
- package/src/Badge/Badge.d.ts +8 -0
- package/src/Badge/Badge.type.d.ts +52 -0
- package/src/Badge/index.d.ts +3 -0
- package/src/Block/Block.classes.d.ts +8 -0
- package/src/Block/Block.d.ts +4 -0
- package/src/Block/Block.type.d.ts +44 -0
- package/src/Block/index.d.ts +3 -0
- package/src/BlockHeader/BlockHeader.classes.d.ts +7 -0
- package/src/BlockHeader/BlockHeader.d.ts +4 -0
- package/src/BlockHeader/BlockHeader.type.d.ts +19 -0
- package/src/BlockHeader/index.d.ts +3 -0
- package/src/BottomNavigation/BottomNavigation.classes.d.ts +7 -0
- package/src/BottomNavigation/BottomNavigation.d.ts +4 -0
- package/src/BottomNavigation/BottomNavigation.type.d.ts +62 -0
- package/src/BottomNavigation/BottomNavigationContext.d.ts +9 -0
- package/src/BottomNavigation/BottomNavigationGroup/BottomNavigationGroup.classes.d.ts +7 -0
- package/src/BottomNavigation/BottomNavigationGroup/BottomNavigationGroup.d.ts +5 -0
- package/src/BottomNavigation/BottomNavigationGroup/BottomNavigationGroup.type.d.ts +3 -0
- package/src/BottomNavigation/BottomNavigationGroup/index.d.ts +3 -0
- package/src/BottomNavigation/index.d.ts +5 -0
- package/src/BottomNavigationItem/BottomNavigationItem.classes.d.ts +7 -0
- package/src/BottomNavigationItem/BottomNavigationItem.d.ts +4 -0
- package/src/BottomNavigationItem/BottomNavigationItem.type.d.ts +63 -0
- package/src/BottomNavigationItem/index.d.ts +3 -0
- package/src/Button/Button.classes.d.ts +8 -0
- package/src/Button/Button.d.ts +6 -0
- package/src/Button/Button.type.d.ts +57 -0
- package/src/Button/index.d.ts +3 -0
- package/src/CallButton/CallButton.classes.d.ts +7 -0
- package/src/CallButton/CallButton.d.ts +4 -0
- package/src/CallButton/CallButton.type.d.ts +19 -0
- package/src/CallButton/index.d.ts +3 -0
- package/src/Checkbox/Checkbox.classes.d.ts +8 -0
- package/src/Checkbox/Checkbox.d.ts +13 -0
- package/src/Checkbox/Checkbox.type.d.ts +30 -0
- package/src/Checkbox/index.d.ts +3 -0
- package/src/Chip/Chip.classes.d.ts +7 -0
- package/src/Chip/Chip.d.ts +4 -0
- package/src/Chip/Chip.type.d.ts +65 -0
- package/src/Chip/index.d.ts +3 -0
- package/src/CircularProgressIndicator/CircularProgressIndicator.classes.d.ts +10 -0
- package/src/CircularProgressIndicator/CircularProgressIndicator.d.ts +5 -0
- package/src/CircularProgressIndicator/CircularProgressIndicator.type.d.ts +32 -0
- package/src/CircularProgressIndicator/index.d.ts +3 -0
- package/src/ClickAwayListener/index.d.ts +2 -0
- package/src/ComponentsProps.d.ts +207 -0
- package/src/DatePicker/Calendar.d.ts +41 -0
- package/src/DatePicker/DatePicker.classes.d.ts +7 -0
- package/src/DatePicker/DatePicker.context.d.ts +6 -0
- package/src/DatePicker/DatePicker.d.ts +6 -0
- package/src/DatePicker/DatePicker.type.d.ts +36 -0
- package/src/DatePicker/DatePickerHeader.d.ts +27 -0
- package/src/DatePicker/Day.d.ts +23 -0
- package/src/DatePicker/HearderAction.d.ts +3 -0
- package/src/DatePicker/SlideDirection.d.ts +1 -0
- package/src/DatePicker/Year.d.ts +21 -0
- package/src/DatePicker/Years.d.ts +21 -0
- package/src/DatePicker/index.d.ts +12 -0
- package/src/DatePicker/utils/DatePickerAriaLabelUtils.d.ts +16 -0
- package/src/DatePicker/utils/DatePickerUtils.d.ts +13 -0
- package/src/DatePicker/utils/findClosestEnabledDate.d.ts +13 -0
- package/src/DatePicker/utils/index.d.ts +3 -0
- package/src/DateUtilsContext/DateUtilsContext.d.ts +22 -0
- package/src/DateUtilsContext/index.d.ts +1 -0
- package/src/Dialer/DialDelete/DialDelete.d.ts +14 -0
- package/src/Dialer/DialDelete/index.d.ts +1 -0
- package/src/Dialer/DialPad/DialPad.classes.d.ts +7 -0
- package/src/Dialer/DialPad/DialPad.d.ts +143 -0
- package/src/Dialer/DialPad/assets/DialerPadSoundsMPEG.d.ts +15 -0
- package/src/Dialer/DialPad/assets/DialerPadSoundsOGG.d.ts +15 -0
- package/src/Dialer/DialPad/assets/index.d.ts +3 -0
- package/src/Dialer/DialPad/index.d.ts +4 -0
- package/src/Dialer/DialPad/utils/DialPadUtils.d.ts +16 -0
- package/src/Dialer/DialPad/utils/index.d.ts +4 -0
- package/src/Dialer/DialPad/utils/types.d.ts +11 -0
- package/src/Dialer/DialPad/utils/useDialKeyboard.d.ts +16 -0
- package/src/Dialer/DialPad/utils/useKeyAudio.d.ts +15 -0
- package/src/Dialer/DialPadButton/DialPadButton.classes.d.ts +7 -0
- package/src/Dialer/DialPadButton/DialPadButton.d.ts +27 -0
- package/src/Dialer/DialPadButton/index.d.ts +2 -0
- package/src/Dialer/DialTextField/DialTextField.d.ts +37 -0
- package/src/Dialer/DialTextField/index.d.ts +2 -0
- package/src/Dialer/DialTextField/utils/getDialPadValueOnlyRegex.d.ts +4 -0
- package/src/Dialer/DialTextField/utils/index.d.ts +2 -0
- package/src/Dialer/DialTextField/utils/useFixedEndSelection.d.ts +10 -0
- package/src/Dialer/Dialer.d.ts +5 -0
- package/src/Dialer/index.d.ts +6 -0
- package/src/Dialer/utils/DialerContext.d.ts +13 -0
- package/src/Dialer/utils/index.d.ts +1 -0
- package/src/Dialog/Dialog.classes.d.ts +29 -0
- package/src/Dialog/Dialog.d.ts +8 -0
- package/src/Dialog/Dialog.type.d.ts +26 -0
- package/src/Dialog/index.d.ts +3 -0
- package/src/Divider/Divider.classes.d.ts +10 -0
- package/src/Divider/Divider.d.ts +4 -0
- package/src/Divider/Divider.type.d.ts +35 -0
- package/src/Divider/index.d.ts +3 -0
- package/src/DragHandle/DragHandle.classes.d.ts +8 -0
- package/src/DragHandle/DragHandle.d.ts +4 -0
- package/src/DragHandle/DragHandle.type.d.ts +17 -0
- package/src/DragHandle/index.d.ts +3 -0
- package/src/Drawer/Drawer.classes.d.ts +10 -0
- package/src/Drawer/Drawer.d.ts +33 -0
- package/src/Drawer/Drawer.type.d.ts +107 -0
- package/src/Drawer/index.d.ts +3 -0
- package/src/Dropdown/Dropdown.classes.d.ts +7 -0
- package/src/Dropdown/Dropdown.d.ts +4 -0
- package/src/Dropdown/Dropdown.type.d.ts +96 -0
- package/src/Dropdown/index.d.ts +3 -0
- package/src/EmptyState/EmptyState.classes.d.ts +7 -0
- package/src/EmptyState/EmptyState.d.ts +5 -0
- package/src/EmptyState/EmptyState.type.d.ts +21 -0
- package/src/EmptyState/index.d.ts +3 -0
- package/src/FabButton/FabButton.classes.d.ts +7 -0
- package/src/FabButton/FabButton.d.ts +4 -0
- package/src/FabButton/FabButton.type.d.ts +22 -0
- package/src/FabButton/index.d.ts +3 -0
- package/src/FocusTrap/FocusTrap.d.ts +49 -0
- package/src/FocusTrap/index.d.ts +2 -0
- package/src/FocusTrap/useFocusTrapStack.d.ts +16 -0
- package/src/FormField/FormField.classes.d.ts +9 -0
- package/src/FormField/FormField.d.ts +5 -0
- package/src/FormField/FormField.type.d.ts +46 -0
- package/src/FormField/index.d.ts +4 -0
- package/src/FormField/useHelperTextId.d.ts +30 -0
- package/src/FormLabel/FormLabel.classes.d.ts +10 -0
- package/src/FormLabel/FormLabel.d.ts +5 -0
- package/src/FormLabel/FormLabel.type.d.ts +26 -0
- package/src/FormLabel/FormLabelContext.d.ts +8 -0
- package/src/FormLabel/index.d.ts +4 -0
- package/src/Icon/Icon.classes.d.ts +7 -0
- package/src/Icon/Icon.d.ts +5 -0
- package/src/Icon/Icon.type.d.ts +25 -0
- package/src/Icon/index.d.ts +3 -0
- package/src/IconButton/IconButton.classes.d.ts +8 -0
- package/src/IconButton/IconButton.d.ts +4 -0
- package/src/IconButton/IconButton.type.d.ts +58 -0
- package/src/IconButton/IconButtonLabel.classes.d.ts +7 -0
- package/src/IconButton/IconButtonLabel.d.ts +5 -0
- package/src/IconButton/IconButtonLabel.type.d.ts +12 -0
- package/src/IconButton/index.d.ts +6 -0
- package/src/IconButtonGroup/IconButtonGroup.classes.d.ts +7 -0
- package/src/IconButtonGroup/IconButtonGroup.d.ts +4 -0
- package/src/IconButtonGroup/IconButtonGroup.type.d.ts +22 -0
- package/src/IconButtonGroup/index.d.ts +3 -0
- package/src/InlineEditable/InlineEditable.classes.d.ts +9 -0
- package/src/InlineEditable/InlineEditable.d.ts +5 -0
- package/src/InlineEditable/InlineEditable.type.d.ts +116 -0
- package/src/InlineEditable/index.d.ts +3 -0
- package/src/LinearProgressIndicator/LinearProgressIndicator.classes.d.ts +9 -0
- package/src/LinearProgressIndicator/LinearProgressIndicator.d.ts +5 -0
- package/src/LinearProgressIndicator/LinearProgressIndicator.type.d.ts +46 -0
- package/src/LinearProgressIndicator/index.d.ts +3 -0
- package/src/Link/Link.classes.d.ts +8 -0
- package/src/Link/Link.d.ts +4 -0
- package/src/Link/Link.type.d.ts +22 -0
- package/src/Link/index.d.ts +3 -0
- package/src/List/List.classes.d.ts +7 -0
- package/src/List/List.d.ts +5 -0
- package/src/List/List.type.d.ts +4 -0
- package/src/List/index.d.ts +3 -0
- package/src/ListItem/HoverActions.d.ts +8 -0
- package/src/ListItem/ListItem.classes.d.ts +7 -0
- package/src/ListItem/ListItem.d.ts +5 -0
- package/src/ListItem/ListItem.type.d.ts +58 -0
- package/src/ListItem/index.d.ts +4 -0
- package/src/ListItemText/ListItemText.classes.d.ts +9 -0
- package/src/ListItemText/ListItemText.d.ts +5 -0
- package/src/ListItemText/ListItemText.type.d.ts +33 -0
- package/src/ListItemText/index.d.ts +3 -0
- package/src/ListNavigation/ListNavigationContext.d.ts +8 -0
- package/src/ListNavigation/index.d.ts +3 -0
- package/src/ListNavigation/useItemNavigation.d.ts +9 -0
- package/src/ListNavigation/useListNavigation.d.ts +49 -0
- package/src/Menu/Menu.classes.d.ts +7 -0
- package/src/Menu/Menu.d.ts +5 -0
- package/src/Menu/Menu.type.d.ts +19 -0
- package/src/Menu/MenuContext.d.ts +7 -0
- package/src/Menu/index.d.ts +4 -0
- package/src/MenuActions/MenuActions.classes.d.ts +13 -0
- package/src/MenuActions/MenuActions.d.ts +9 -0
- package/src/MenuActions/MenuActions.type.d.ts +3 -0
- package/src/MenuActions/index.d.ts +3 -0
- package/src/MenuDivider/MenuDivider.classes.d.ts +7 -0
- package/src/MenuDivider/MenuDivider.d.ts +5 -0
- package/src/MenuDivider/MenuDivider.type.d.ts +3 -0
- package/src/MenuDivider/index.d.ts +3 -0
- package/src/MenuFooter/MenuFooter.classes.d.ts +7 -0
- package/src/MenuFooter/MenuFooter.d.ts +5 -0
- package/src/MenuFooter/MenuFooter.type.d.ts +9 -0
- package/src/MenuFooter/index.d.ts +3 -0
- package/src/MenuHeader/MenuHeader.classes.d.ts +7 -0
- package/src/MenuHeader/MenuHeader.d.ts +5 -0
- package/src/MenuHeader/MenuHeader.type.d.ts +18 -0
- package/src/MenuHeader/index.d.ts +3 -0
- package/src/MenuItem/MenuItem.classes.d.ts +7 -0
- package/src/MenuItem/MenuItem.d.ts +5 -0
- package/src/MenuItem/MenuItem.type.d.ts +29 -0
- package/src/MenuItem/MenuItemSelectContext.d.ts +18 -0
- package/src/MenuItem/index.d.ts +7 -0
- package/src/MenuItem/useMenuItem.d.ts +16 -0
- package/src/MenuItem/useMenuItemSelect.d.ts +62 -0
- package/src/MenuItem/useVirtualizedMenuItem.d.ts +15 -0
- package/src/MenuItemText/MenuItemText.classes.d.ts +7 -0
- package/src/MenuItemText/MenuItemText.d.ts +5 -0
- package/src/MenuItemText/MenuItemText.type.d.ts +27 -0
- package/src/MenuItemText/index.d.ts +3 -0
- package/src/MenuList/MenuList.classes.d.ts +7 -0
- package/src/MenuList/MenuList.d.ts +4 -0
- package/src/MenuList/MenuList.type.d.ts +16 -0
- package/src/MenuList/MenuListContext.d.ts +12 -0
- package/src/MenuList/index.d.ts +4 -0
- package/src/Modal/InnerModal.d.ts +18 -0
- package/src/Modal/InnerModal.type.d.ts +23 -0
- package/src/Modal/Modal.classes.d.ts +7 -0
- package/src/Modal/Modal.d.ts +24 -0
- package/src/Modal/Modal.type.d.ts +19 -0
- package/src/Modal/ModalContext.d.ts +10 -0
- package/src/Modal/index.d.ts +6 -0
- package/src/NestedMenuContext/NestedMenuContext.d.ts +11 -0
- package/src/NestedMenuContext/index.d.ts +4 -0
- package/src/NestedMenuContext/useNestedChildMenu.d.ts +6 -0
- package/src/NestedMenuContext/useNestedMenuItem.d.ts +5 -0
- package/src/NestedMenuContext/useNestedParentMenu.d.ts +8 -0
- package/src/Option/Option.d.ts +4 -0
- package/src/Option/Option.type.d.ts +7 -0
- package/src/Option/index.d.ts +2 -0
- package/src/Overlap/Overlap.classes.d.ts +7 -0
- package/src/Overlap/Overlap.d.ts +4 -0
- package/src/Overlap/Overlap.type.d.ts +30 -0
- package/src/Overlap/index.d.ts +3 -0
- package/src/PageHeader/PageHeader.classes.d.ts +32 -0
- package/src/PageHeader/PageHeader.d.ts +9 -0
- package/src/PageHeader/PageHeader.type.d.ts +14 -0
- package/src/PageHeader/index.d.ts +3 -0
- package/src/PickerTextField/PickerTextField.classes.d.ts +7 -0
- package/src/PickerTextField/PickerTextField.d.ts +5 -0
- package/src/PickerTextField/PickerTextField.type.d.ts +30 -0
- package/src/PickerTextField/index.d.ts +3 -0
- package/src/Popover/Popover.classes.d.ts +7 -0
- package/src/Popover/Popover.d.ts +5 -0
- package/src/Popover/Popover.type.d.ts +50 -0
- package/src/Popover/index.d.ts +3 -0
- package/src/Popper/Popper.d.ts +4 -0
- package/src/Popper/Popper.type.d.ts +92 -0
- package/src/Popper/index.d.ts +2 -0
- package/src/PopperPaper/PopperPaper.classes.d.ts +7 -0
- package/src/PopperPaper/PopperPaper.d.ts +5 -0
- package/src/PopperPaper/PopperPaper.type.d.ts +8 -0
- package/src/PopperPaper/index.d.ts +3 -0
- package/src/Portal/Portal.d.ts +2 -0
- package/src/Portal/index.d.ts +1 -0
- package/src/Radio/Radio.classes.d.ts +7 -0
- package/src/Radio/Radio.d.ts +12 -0
- package/src/Radio/Radio.type.d.ts +16 -0
- package/src/Radio/index.d.ts +3 -0
- package/src/RadioGroup/RadioGroup.classes.d.ts +7 -0
- package/src/RadioGroup/RadioGroup.context.d.ts +15 -0
- package/src/RadioGroup/RadioGroup.d.ts +5 -0
- package/src/RadioGroup/RadioGroup.type.d.ts +14 -0
- package/src/RadioGroup/index.d.ts +4 -0
- package/src/Rating/Rating.classes.d.ts +7 -0
- package/src/Rating/Rating.d.ts +5 -0
- package/src/Rating/Rating.type.d.ts +106 -0
- package/src/Rating/RatingItem.d.ts +3 -0
- package/src/Rating/index.d.ts +5 -0
- package/src/Rating/utils.d.ts +5 -0
- package/src/Select/Select.classes.d.ts +11 -0
- package/src/Select/Select.d.ts +4 -0
- package/src/Select/Select.type.d.ts +118 -0
- package/src/Select/index.d.ts +4 -0
- package/src/Select/useSelect.d.ts +16 -0
- package/src/SingleFilter/FilterButton/FilterButton.classes.d.ts +7 -0
- package/src/SingleFilter/FilterButton/FilterButton.d.ts +5 -0
- package/src/SingleFilter/FilterButton/FilterButton.type.d.ts +27 -0
- package/src/SingleFilter/FilterButton/index.d.ts +3 -0
- package/src/SingleFilter/SingleFilter.classes.d.ts +7 -0
- package/src/SingleFilter/SingleFilter.d.ts +5 -0
- package/src/SingleFilter/SingleFilter.type.d.ts +44 -0
- package/src/SingleFilter/index.d.ts +4 -0
- package/src/Skeleton/Skeleton.classes.d.ts +7 -0
- package/src/Skeleton/Skeleton.d.ts +5 -0
- package/src/Skeleton/Skeleton.type.d.ts +6 -0
- package/src/Skeleton/SkeletonContainer/SkeletonContainer.classes.d.ts +7 -0
- package/src/Skeleton/SkeletonContainer/SkeletonContainer.d.ts +5 -0
- package/src/Skeleton/SkeletonContainer/SkeletonContainer.type.d.ts +11 -0
- package/src/Skeleton/SkeletonContainer/index.d.ts +3 -0
- package/src/Skeleton/index.d.ts +4 -0
- package/src/Slider/Slider.classes.d.ts +13 -0
- package/src/Slider/Slider.d.ts +10 -0
- package/src/Slider/Slider.type.d.ts +137 -0
- package/src/Slider/SliderThumb.d.ts +16 -0
- package/src/Slider/index.d.ts +3 -0
- package/src/Slider/utils.d.ts +1 -0
- package/src/Snackbar/Snackbar.classes.d.ts +7 -0
- package/src/Snackbar/Snackbar.d.ts +5 -0
- package/src/Snackbar/Snackbar.hook.d.ts +1 -0
- package/src/Snackbar/Snackbar.type.d.ts +27 -0
- package/src/Snackbar/SnackbarContent/SnackbarContent.classes.d.ts +8 -0
- package/src/Snackbar/SnackbarContent/SnackbarContent.d.ts +5 -0
- package/src/Snackbar/SnackbarContent/SnackbarContent.type.d.ts +4 -0
- package/src/Snackbar/SnackbarContent/index.d.ts +3 -0
- package/src/Snackbar/index.d.ts +5 -0
- package/src/SortableList/SortableList.d.ts +3 -0
- package/src/SortableList/SortableList.type.d.ts +20 -0
- package/src/SortableList/index.d.ts +2 -0
- package/src/SortableListDndContext/DndKeyboardBlocker.d.ts +2 -0
- package/src/SortableListDndContext/SortableListDndContext.d.ts +4 -0
- package/src/SortableListDndContext/SortableListDndContext.type.d.ts +5 -0
- package/src/SortableListDndContext/index.d.ts +5 -0
- package/src/SortableListDndContext/useSortableListDndContext.d.ts +2 -0
- package/src/SortableListDndContext/utils.d.ts +1 -0
- package/src/SortableListItem/SortableListItem.d.ts +4 -0
- package/src/SortableListItem/SortableListItem.type.d.ts +6 -0
- package/src/SortableListItem/SortableListItemOverlay.d.ts +4 -0
- package/src/SortableListItem/SortableListItemOverlay.type.d.ts +8 -0
- package/src/SortableListItem/index.d.ts +4 -0
- package/src/SortableVirtualizedList/SortableVirtualizedList.d.ts +3 -0
- package/src/SortableVirtualizedList/SortableVirtualizedList.type.d.ts +19 -0
- package/src/SortableVirtualizedList/index.d.ts +2 -0
- package/src/SplitButton/SplitButton.classes.d.ts +8 -0
- package/src/SplitButton/SplitButton.d.ts +5 -0
- package/src/SplitButton/SplitButton.type.d.ts +37 -0
- package/src/SplitButton/index.d.ts +3 -0
- package/src/Squircle/Squircle.d.ts +4 -0
- package/src/Squircle/Squircle.type.d.ts +19 -0
- package/src/Squircle/index.d.ts +3 -0
- package/src/Squircle/squircle.classes.d.ts +7 -0
- package/src/StatusIndicator/StatusIndicator.classes.d.ts +7 -0
- package/src/StatusIndicator/StatusIndicator.d.ts +8 -0
- package/src/StatusIndicator/StatusIndicator.type.d.ts +14 -0
- package/src/StatusIndicator/index.d.ts +3 -0
- package/src/Step/Step.classes.d.ts +7 -0
- package/src/Step/Step.d.ts +4 -0
- package/src/Step/Step.type.d.ts +50 -0
- package/src/Step/StepContext.d.ts +22 -0
- package/src/Step/index.d.ts +4 -0
- package/src/StepButton/StepButton.classes.d.ts +7 -0
- package/src/StepButton/StepButton.d.ts +4 -0
- package/src/StepButton/StepButton.type.d.ts +34 -0
- package/src/StepButton/index.d.ts +3 -0
- package/src/StepConnector/StepConnector.classes.d.ts +7 -0
- package/src/StepConnector/StepConnector.d.ts +5 -0
- package/src/StepConnector/StepConnector.type.d.ts +3 -0
- package/src/StepConnector/index.d.ts +3 -0
- package/src/StepContent/StepContent.classes.d.ts +7 -0
- package/src/StepContent/StepContent.d.ts +5 -0
- package/src/StepContent/StepContent.type.d.ts +14 -0
- package/src/StepContent/index.d.ts +3 -0
- package/src/StepIcon/StepIcon.classes.d.ts +7 -0
- package/src/StepIcon/StepIcon.d.ts +5 -0
- package/src/StepIcon/StepIcon.type.d.ts +38 -0
- package/src/StepIcon/index.d.ts +3 -0
- package/src/StepLabel/StepLabel.classes.d.ts +10 -0
- package/src/StepLabel/StepLabel.d.ts +5 -0
- package/src/StepLabel/StepLabel.type.d.ts +36 -0
- package/src/StepLabel/index.d.ts +3 -0
- package/src/Stepper/Stepper.classes.d.ts +7 -0
- package/src/Stepper/Stepper.d.ts +4 -0
- package/src/Stepper/Stepper.type.d.ts +47 -0
- package/src/Stepper/StepperContext.d.ts +11 -0
- package/src/Stepper/index.d.ts +4 -0
- package/src/SubMenu/PopperMenu.classes.d.ts +7 -0
- package/src/SubMenu/PopperMenu.d.ts +5 -0
- package/src/SubMenu/PopperMenu.type.d.ts +4 -0
- package/src/SubMenu/SubMenu.d.ts +4 -0
- package/src/SubMenu/SubMenu.type.d.ts +6 -0
- package/src/SubMenu/index.d.ts +5 -0
- package/src/SwipeableDrawer/SwipeableDrawer.classes.d.ts +7 -0
- package/src/SwipeableDrawer/SwipeableDrawer.d.ts +31 -0
- package/src/SwipeableDrawer/SwipeableDrawer.types.d.ts +82 -0
- package/src/SwipeableDrawer/hooks/index.d.ts +5 -0
- package/src/SwipeableDrawer/hooks/useDimensions.d.ts +17 -0
- package/src/SwipeableDrawer/hooks/useDrawerGestures.d.ts +151 -0
- package/src/SwipeableDrawer/hooks/useElementSizeObserver.d.ts +10 -0
- package/src/SwipeableDrawer/hooks/useReady.d.ts +4 -0
- package/src/SwipeableDrawer/hooks/useSnapPoints.d.ts +94 -0
- package/src/SwipeableDrawer/index.d.ts +3 -0
- package/src/Switch/Switch.classes.d.ts +7 -0
- package/src/Switch/Switch.d.ts +11 -0
- package/src/Switch/Switch.type.d.ts +19 -0
- package/src/Switch/index.d.ts +3 -0
- package/src/Tab/Tab.classes.d.ts +10 -0
- package/src/Tab/Tab.d.ts +5 -0
- package/src/Tab/Tab.type.d.ts +50 -0
- package/src/Tab/index.d.ts +3 -0
- package/src/TabContext/TabContext.d.ts +20 -0
- package/src/TabContext/TabContext.type.d.ts +13 -0
- package/src/TabContext/index.d.ts +2 -0
- package/src/TabPanel/TabPanel.classes.d.ts +7 -0
- package/src/TabPanel/TabPanel.d.ts +5 -0
- package/src/TabPanel/TabPanel.type.d.ts +18 -0
- package/src/TabPanel/index.d.ts +3 -0
- package/src/Table/Table.classes.d.ts +7 -0
- package/src/Table/Table.d.ts +4 -0
- package/src/Table/Table.type.d.ts +36 -0
- package/src/Table/TableContext.d.ts +8 -0
- package/src/Table/Tablelvl2Context.d.ts +7 -0
- package/src/Table/index.d.ts +5 -0
- package/src/TableBody/TableBody.classes.d.ts +7 -0
- package/src/TableBody/TableBody.d.ts +4 -0
- package/src/TableBody/TableBody.type.d.ts +17 -0
- package/src/TableBody/index.d.ts +3 -0
- package/src/TableCell/TableCell.classes.d.ts +7 -0
- package/src/TableCell/TableCell.d.ts +8 -0
- package/src/TableCell/TableCell.type.d.ts +59 -0
- package/src/TableCell/index.d.ts +3 -0
- package/src/TableContainer/TableContainer.classes.d.ts +8 -0
- package/src/TableContainer/TableContainer.d.ts +4 -0
- package/src/TableContainer/TableContainer.type.d.ts +23 -0
- package/src/TableContainer/index.d.ts +3 -0
- package/src/TableFooter/TableFooter.classes.d.ts +8 -0
- package/src/TableFooter/TableFooter.d.ts +5 -0
- package/src/TableFooter/TableFooter.type.d.ts +9 -0
- package/src/TableFooter/index.d.ts +2 -0
- package/src/TableHead/TableHead.classes.d.ts +7 -0
- package/src/TableHead/TableHead.d.ts +4 -0
- package/src/TableHead/TableHead.type.d.ts +21 -0
- package/src/TableHead/index.d.ts +3 -0
- package/src/TablePagination/TablePagination.classes.d.ts +8 -0
- package/src/TablePagination/TablePagination.d.ts +4 -0
- package/src/TablePagination/TablePagination.type.d.ts +73 -0
- package/src/TablePagination/index.d.ts +2 -0
- package/src/TableRow/TableRow.classes.d.ts +7 -0
- package/src/TableRow/TableRow.d.ts +4 -0
- package/src/TableRow/TableRow.type.d.ts +34 -0
- package/src/TableRow/index.d.ts +3 -0
- package/src/Tabs/TabMoreMenu.d.ts +36 -0
- package/src/Tabs/TabScrollButton.d.ts +21 -0
- package/src/Tabs/Tabs.classes.d.ts +19 -0
- package/src/Tabs/Tabs.d.ts +5 -0
- package/src/Tabs/Tabs.type.d.ts +54 -0
- package/src/Tabs/TabsContext.d.ts +9 -0
- package/src/Tabs/hooks/index.d.ts +2 -0
- package/src/Tabs/hooks/useComputedTabs.d.ts +20 -0
- package/src/Tabs/hooks/useTabsScroller.d.ts +48 -0
- package/src/Tabs/index.d.ts +7 -0
- package/src/Tag/Tag.classes.d.ts +8 -0
- package/src/Tag/Tag.d.ts +5 -0
- package/src/Tag/Tag.type.d.ts +23 -0
- package/src/Tag/index.d.ts +3 -0
- package/src/Text/Text.classes.d.ts +7 -0
- package/src/Text/Text.d.ts +4 -0
- package/src/Text/Text.type.d.ts +34 -0
- package/src/Text/index.d.ts +3 -0
- package/src/TextField/TextField.classes.d.ts +7 -0
- package/src/TextField/TextField.d.ts +5 -0
- package/src/TextField/TextField.type.d.ts +112 -0
- package/src/TextField/index.d.ts +3 -0
- package/src/Textarea/Textarea.classes.d.ts +10 -0
- package/src/Textarea/Textarea.d.ts +5 -0
- package/src/Textarea/Textarea.type.d.ts +26 -0
- package/src/Textarea/index.d.ts +3 -0
- package/src/TimePicker/NumberPicker.d.ts +5 -0
- package/src/TimePicker/NumberPicker.type.d.ts +36 -0
- package/src/TimePicker/PickerView.d.ts +4 -0
- package/src/TimePicker/PickerView.type.d.ts +25 -0
- package/src/TimePicker/SelectionView.d.ts +19 -0
- package/src/TimePicker/TimeButton.d.ts +11 -0
- package/src/TimePicker/TimePicker.classes.d.ts +7 -0
- package/src/TimePicker/TimePicker.context.d.ts +6 -0
- package/src/TimePicker/TimePicker.d.ts +5 -0
- package/src/TimePicker/TimePicker.type.d.ts +30 -0
- package/src/TimePicker/ToggleText.d.ts +5 -0
- package/src/TimePicker/ToggleText.type.d.ts +14 -0
- package/src/TimePicker/constant.d.ts +7 -0
- package/src/TimePicker/index.d.ts +14 -0
- package/src/TimePicker/utils/A11yUtils.d.ts +2 -0
- package/src/TimePicker/utils/TimeBoundary.d.ts +27 -0
- package/src/TimePicker/utils/TimePickerHelper.d.ts +52 -0
- package/src/TimePicker/utils/getNumberPickerBoundary.d.ts +22 -0
- package/src/TimePicker/utils/index.d.ts +4 -0
- package/src/TimePicker/utils/runKeyHandler.d.ts +4 -0
- package/src/Tooltip/Tooltip.d.ts +5 -0
- package/src/Tooltip/Tooltip.type.d.ts +5 -0
- package/src/Tooltip/TooltipTrigger.a11y.d.ts +38 -0
- package/src/Tooltip/TooltipTrigger.d.ts +4 -0
- package/src/Tooltip/TooltipTrigger.type.d.ts +59 -0
- package/src/Tooltip/TooltipView.classes.d.ts +8 -0
- package/src/Tooltip/TooltipView.d.ts +16 -0
- package/src/Tooltip/TooltipView.type.d.ts +44 -0
- package/src/Tooltip/index.d.ts +9 -0
- package/src/Tooltip/useTooltipForceHide.d.ts +8 -0
- package/src/Tooltip/withTooltip/index.d.ts +1 -0
- package/src/Tooltip/withTooltip/withTooltip.d.ts +6 -0
- package/src/Tray/Tray.classes.d.ts +13 -0
- package/src/Tray/Tray.d.ts +5 -0
- package/src/Tray/Tray.type.d.ts +26 -0
- package/src/Tray/TrayContext.d.ts +14 -0
- package/src/Tray/TrayPanel.d.ts +7 -0
- package/src/Tray/hooks/index.d.ts +3 -0
- package/src/Tray/hooks/useTray.d.ts +33 -0
- package/src/Tray/hooks/useTrayNavigate.d.ts +5 -0
- package/src/Tray/hooks/useTrayPanel.d.ts +14 -0
- package/src/Tray/index.d.ts +7 -0
- package/src/Tray/types.d.ts +2 -0
- package/src/TrayMenu/TrayMenu.d.ts +4 -0
- package/src/TrayMenu/TrayMenu.type.d.ts +3 -0
- package/src/TrayMenu/TrayMenuItem.d.ts +9 -0
- package/src/TrayMenu/index.d.ts +3 -0
- package/src/VirtualizedList/VirtualizedItemPropsContext.d.ts +5 -0
- package/src/VirtualizedList/VirtualizedList.d.ts +3 -0
- package/src/VirtualizedList/VirtualizedList.type.d.ts +51 -0
- package/src/VirtualizedList/VirtuosoComponents.d.ts +16 -0
- package/src/VirtualizedList/VirtuosoContextType.d.ts +14 -0
- package/src/VirtualizedList/index.d.ts +5 -0
- package/src/VirtualizedMenu/VirtualizedMenu.classes.d.ts +7 -0
- package/src/VirtualizedMenu/VirtualizedMenu.context.d.ts +6 -0
- package/src/VirtualizedMenu/VirtualizedMenu.d.ts +4 -0
- package/src/VirtualizedMenu/VirtualizedMenu.type.d.ts +35 -0
- package/src/VirtualizedMenu/VirtualizedMenuList.d.ts +6 -0
- package/src/VirtualizedMenu/index.d.ts +5 -0
- package/src/VisuallyHidden/VisuallyHidden.classes.d.ts +7 -0
- package/src/VisuallyHidden/VisuallyHidden.d.ts +5 -0
- package/src/VisuallyHidden/VisuallyHidden.type.d.ts +3 -0
- package/src/VisuallyHidden/index.d.ts +3 -0
- package/src/index.d.ts +112 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Transition } from 'framer-motion';
|
|
2
|
+
import { ComponentType } from 'react';
|
|
3
|
+
export declare type CommonMotionOptions = {
|
|
4
|
+
toggle?: boolean;
|
|
5
|
+
prefersReducedMotion?: boolean;
|
|
6
|
+
toggleOnTransition?: Transition;
|
|
7
|
+
toggleOffTransition?: Transition;
|
|
8
|
+
};
|
|
9
|
+
export declare type MotionComponent<T> = ComponentType<T & CommonMotionOptions>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
export declare class MatchMediaMock {
|
|
3
|
+
private currentQueryValue;
|
|
4
|
+
private listenerNotifiers;
|
|
5
|
+
matchMediaMock: jest.SpyInstance<MediaQueryList, [query: string]>;
|
|
6
|
+
constructor();
|
|
7
|
+
createMock: () => jest.SpyInstance<MediaQueryList, [query: string]>;
|
|
8
|
+
private matchQuery;
|
|
9
|
+
updateMatchMediaQuery: (newQuery: string) => void;
|
|
10
|
+
reset: () => void;
|
|
11
|
+
mockRestore: () => void;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useMotionSafeTransition';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Transition } from 'framer-motion';
|
|
2
|
+
/**
|
|
3
|
+
* A hook that returns an instant transition if the user has reduced motion enabled.
|
|
4
|
+
* If reduced motion is not enabled, returns the given motion transition.
|
|
5
|
+
*/
|
|
6
|
+
export declare const useMotionSafeTransition: (transition: Transition) => (import("framer-motion").Orchestration & import("framer-motion").Repeat & {
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
}) | {
|
|
9
|
+
duration: number;
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './usePrefersReducedMotion';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const usePrefersReducedMotion: () => boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CamelCase } from 'type-fest';
|
|
2
|
+
import { BaseAlertClassesKey } from '../Alert/Alert.classes';
|
|
3
|
+
export declare type BaseAnnouncementClassesKey = BaseAlertClassesKey;
|
|
4
|
+
export declare type AnnouncementClassesKey = CamelCase<BaseAnnouncementClassesKey>;
|
|
5
|
+
export declare type AnnouncementClasses = {
|
|
6
|
+
name: 'announcement';
|
|
7
|
+
classes: BaseAnnouncementClassesKey;
|
|
8
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AnnouncementProps } from './Announcement.type';
|
|
3
|
+
import announcementStyles from './styles/Announcement.css';
|
|
4
|
+
declare const Announcement: import("react").ForwardRefExoticComponent<Pick<AnnouncementProps, "classes" | "key" | "action" | `data-${string}` | keyof import("react").HTMLAttributes<HTMLDivElement> | "component" | "icon" | "onClose" | "startSlot" | "closeText" | "severity" | "CloseButtonProps"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export { Announcement, announcementStyles };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { StandardProps } from '@ringcentral/spring-base';
|
|
2
|
+
import { AlertProps } from '../Alert';
|
|
3
|
+
import { AnnouncementClassesKey } from './Announcement.classes';
|
|
4
|
+
export declare type AnnouncementProps = StandardProps<Omit<AlertProps, 'classes'>, AnnouncementClassesKey, 'div'>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { CamelCase } from 'type-fest';
|
|
2
|
+
import type { FormFieldSize, FormFieldVariant } from '../FormField/FormField.type';
|
|
3
|
+
export declare type AutocompleteSlot = 'chevron' | 'clear' | 'form-field-content' | 'chip' | 'input-container' | 'input' | 'end-adornment';
|
|
4
|
+
export declare type BaseAutocompleteClassesKey = 'root' | 'error' | FormFieldVariant | AutocompleteSlot | `form-field-content-${FormFieldSize}` | `input-container-${FormFieldSize}` | `input-${FormFieldSize}` | `error-${AutocompleteSlot}` | `${FormFieldVariant}-expanded` | `${FormFieldVariant}-expanded-${AutocompleteSlot}` | `${FormFieldVariant}-${AutocompleteSlot}`;
|
|
5
|
+
export declare type AutocompleteClassesKey = CamelCase<BaseAutocompleteClassesKey>;
|
|
6
|
+
export declare type AutocompleteClasses = {
|
|
7
|
+
name: 'autocomplete';
|
|
8
|
+
classes: BaseAutocompleteClassesKey;
|
|
9
|
+
};
|
|
10
|
+
export declare type AutocompletePopperClassesKey = 'root' | 'paper' | 'empty';
|
|
11
|
+
export declare type AutocompletePopperClasses = {
|
|
12
|
+
name: 'autocomplete-popper';
|
|
13
|
+
classes: AutocompletePopperClassesKey;
|
|
14
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AutocompleteComponent, AutocompleteProps } from './Autocomplete.type';
|
|
2
|
+
import autocompleteStyles from './styles/Autocomplete.css';
|
|
3
|
+
import { SuggestionListItemData } from './SuggestionList';
|
|
4
|
+
declare const Autocomplete: AutocompleteComponent<SuggestionListItemData>;
|
|
5
|
+
export { Autocomplete, autocompleteStyles };
|
|
6
|
+
/**
|
|
7
|
+
* default Autocomplete filter options method, use with `variant="tags"`
|
|
8
|
+
*
|
|
9
|
+
* - filter options by input value and selected items
|
|
10
|
+
*/
|
|
11
|
+
export declare const RcAutocompleteDefaultFilterOptions: AutocompleteProps['filterOptions'];
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { ComponentType, ElementType, ReactElement, Ref } from 'react';
|
|
2
|
+
import { ClassesProp, HTMLDataAttribute, StandardProps } from '@ringcentral/spring-base';
|
|
3
|
+
import { IconButtonProps } from '../IconButton';
|
|
4
|
+
import { PopperProps } from '../Popper';
|
|
5
|
+
import { StandardInputAttributes, TextFieldProps } from '../TextField';
|
|
6
|
+
import { AutocompleteClassesKey, AutocompletePopperClassesKey } from './Autocomplete.classes';
|
|
7
|
+
import { AutocompleteRenderOptionState, BaseSuggestionListProps, SuggestionListItemData, SuggestionListProps } from './SuggestionList';
|
|
8
|
+
import { UseAutocompleteParams } from './useAutocomplete';
|
|
9
|
+
import { GetTagProps } from './useAutocompleteTag';
|
|
10
|
+
export declare type AutocompleteSuggestionListProps<T> = BaseSuggestionListProps<T> & Pick<SuggestionListProps, 'maxContainerHeight' | 'padding' | 'virtualize'>;
|
|
11
|
+
export declare type AutocompleteRef<T extends SuggestionListItemData = SuggestionListItemData> = {
|
|
12
|
+
/** get current active index */
|
|
13
|
+
getActiveIndex: () => number;
|
|
14
|
+
/** set current active index */
|
|
15
|
+
setActiveIndex: (index: number) => void;
|
|
16
|
+
/** get current filter result option items; */
|
|
17
|
+
getFilterResultItems: () => T[];
|
|
18
|
+
/** get current highlight index */
|
|
19
|
+
getHighlightedIndex: () => number;
|
|
20
|
+
/** set current highlight index */
|
|
21
|
+
setHighlightedIndex: (index: number) => void;
|
|
22
|
+
/**
|
|
23
|
+
* keep highlightedIndex for next render when options change,
|
|
24
|
+
* can use when lazy load more options
|
|
25
|
+
*/
|
|
26
|
+
keepHighlightedIndex: () => void;
|
|
27
|
+
/** open the listbox menu */
|
|
28
|
+
openMenu: () => void;
|
|
29
|
+
/** close the listbox menu */
|
|
30
|
+
closeMenu: () => void;
|
|
31
|
+
/** focus on text field input */
|
|
32
|
+
focus: () => void;
|
|
33
|
+
/** reset whole downshift, isFocus default is `false` */
|
|
34
|
+
reset: (isFocus?: boolean) => void;
|
|
35
|
+
/** method to clean input value */
|
|
36
|
+
clearInput: () => void;
|
|
37
|
+
};
|
|
38
|
+
export declare type AutocompleteProps<T extends SuggestionListItemData = SuggestionListItemData> = StandardProps<{
|
|
39
|
+
/** Determines the variant of the Autocomplete component. */
|
|
40
|
+
variant?: 'autocomplete' | 'tags';
|
|
41
|
+
/** If true, the component will take up the full width of its container.
|
|
42
|
+
* @default `true`
|
|
43
|
+
*/
|
|
44
|
+
fullWidth?: boolean;
|
|
45
|
+
/** Specifies the variant of the input field. */
|
|
46
|
+
inputVariant?: AutoCompleteTextFieldInputProps['variant'];
|
|
47
|
+
/** Enables the toggle button for the dropdown menu. */
|
|
48
|
+
toggleButton?: boolean;
|
|
49
|
+
/** Props applied to the toggle button. */
|
|
50
|
+
ToggleButtonProps?: Partial<IconButtonProps> & HTMLDataAttribute;
|
|
51
|
+
/**
|
|
52
|
+
* Props applied to the underlying IconButton component used for the clear button.
|
|
53
|
+
* Allows customization of appearance and behavior.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```tsx
|
|
57
|
+
* ClearButtonProps={{
|
|
58
|
+
* size: 'xsmall',
|
|
59
|
+
* 'aria-label': 'Clear input',
|
|
60
|
+
* }}
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
ClearButtonProps?: Partial<IconButtonProps> & HTMLDataAttribute;
|
|
64
|
+
/**
|
|
65
|
+
* Function to get custom props for the toggle button based on the menu's open state.
|
|
66
|
+
* Useful for customizing the toggle button icon.
|
|
67
|
+
*/
|
|
68
|
+
getToggleButtonProps?: (isOpen: boolean) => AutocompleteProps<T>['ToggleButtonProps'];
|
|
69
|
+
/**
|
|
70
|
+
* A ref for imperative actions.
|
|
71
|
+
*
|
|
72
|
+
* - `getActiveIndex`: get current active index
|
|
73
|
+
* - `setActiveIndex`: set current active index;
|
|
74
|
+
* - `getFilterResultItems`: get current filter result option items;
|
|
75
|
+
* - `getHighlightedIndex`: get current highlight index;
|
|
76
|
+
* - `setHighlightedIndex`: set current highlight index;
|
|
77
|
+
* - `openMenu`: open the listbox menu
|
|
78
|
+
* - `closeMenu`: close the listbox menu
|
|
79
|
+
* - `focus`: focus on text field input
|
|
80
|
+
* - `reset(isFocus)`: reset whole downshift, `isFocus` default is `false`
|
|
81
|
+
*/
|
|
82
|
+
action?: React.Ref<AutocompleteRef<T>>;
|
|
83
|
+
/**
|
|
84
|
+
* Custom rendering function for options Uses `getOptionLabel` by default.
|
|
85
|
+
* @param option The option to render.
|
|
86
|
+
* @param state The state of the component.
|
|
87
|
+
* @returns A ReactNode representing the rendered option.
|
|
88
|
+
*/
|
|
89
|
+
renderOption?: (option: T, state: AutocompleteRenderOptionState) => React.ReactNode;
|
|
90
|
+
/** Custom component for rendering the popper. Defaults to Popper.
|
|
91
|
+
* @default Popper
|
|
92
|
+
*/
|
|
93
|
+
PopperComponent?: ComponentType<PopperProps>;
|
|
94
|
+
/** Configuration props for the Popper component. */
|
|
95
|
+
PopperProps?: Omit<Partial<PopperProps>, 'open' | 'keepMounted' | 'anchorEl' | 'classes'> & {
|
|
96
|
+
/**
|
|
97
|
+
* Determines the anchor element type for the popper.
|
|
98
|
+
*
|
|
99
|
+
* - `root`: on that whole TextField
|
|
100
|
+
* - `input`: on that inside input
|
|
101
|
+
* @default 'root'
|
|
102
|
+
*/
|
|
103
|
+
anchorElType?: 'root' | 'input';
|
|
104
|
+
} & ClassesProp<AutocompletePopperClassesKey>;
|
|
105
|
+
/** Props for the suggestion list, supporting virtualized lists. */
|
|
106
|
+
SuggestionListProps?: AutocompleteSuggestionListProps<T>;
|
|
107
|
+
/**
|
|
108
|
+
* Custom rendering function for the input field, default is `RcTextField`
|
|
109
|
+
*/
|
|
110
|
+
renderInput?: (params: Partial<AutoCompleteTextFieldInputProps>) => React.ReactElement;
|
|
111
|
+
/** If true, allows free solo input not bound to provided options. */
|
|
112
|
+
freeSolo?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* If `true`, the placeholder will be displayed when multiple value is allowed and tags are present.
|
|
115
|
+
* @default false
|
|
116
|
+
*/
|
|
117
|
+
showPlaceholderWithTags?: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Custom rendering function for selected tags.
|
|
120
|
+
*
|
|
121
|
+
* @param selectedItems The selected items.
|
|
122
|
+
* @param getTagProps Function to get props for each tag.
|
|
123
|
+
* @returns A ReactNode representing the rendered tags.
|
|
124
|
+
*/
|
|
125
|
+
renderTags?: (selectedItems: T[], getTagProps: (selectedItem: T, index: number) => Omit<GetTagProps<T>, 'children' | 'index' | 'selectedItem'> & {
|
|
126
|
+
onDelete?: React.EventHandler<any>;
|
|
127
|
+
}) => React.ReactNode;
|
|
128
|
+
/** If true, the popup will ignore blur events. Useful for customization. */
|
|
129
|
+
debug?: boolean;
|
|
130
|
+
} & Omit<UseAutocompleteParams<T>, 'inputRef'> & Partial<Pick<UseAutocompleteParams<T>, 'inputRef'>> & Omit<AutoCompleteTextFieldInputProps, 'value' | 'variant' | 'onChange'> & Pick<SuggestionListProps, 'renderGroup'>, AutocompleteClassesKey, 'div'>;
|
|
131
|
+
export interface AutocompleteComponent<T extends SuggestionListItemData = SuggestionListItemData> {
|
|
132
|
+
(props: AutocompleteProps<T>): ReactElement;
|
|
133
|
+
displayName?: string;
|
|
134
|
+
}
|
|
135
|
+
export declare type AutoCompleteInputProps = {
|
|
136
|
+
startAdornment?: React.ReactNode;
|
|
137
|
+
containerRef?: Ref<HTMLDivElement>;
|
|
138
|
+
containerClassName?: string;
|
|
139
|
+
onContainerClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
140
|
+
} & StandardInputAttributes;
|
|
141
|
+
export declare type AutoCompleteTextFieldInputProps = TextFieldProps<ElementType, AutoCompleteInputProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CamelCase } from 'type-fest';
|
|
2
|
+
export declare type BaseSuggestionListClassesKey = 'root' | 'item' | 'selected' | 'group-title' | 'readonly' | 'group-title-readonly' | 'highlighted' | 'expand-icon';
|
|
3
|
+
export declare type SuggestionListClassesKey = CamelCase<BaseSuggestionListClassesKey>;
|
|
4
|
+
export declare type SuggestionListClasses = {
|
|
5
|
+
name: 'suggestion-list';
|
|
6
|
+
classes: BaseSuggestionListClassesKey;
|
|
7
|
+
};
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import React, { HTMLAttributes } from 'react';
|
|
2
|
+
import { VirtuosoHandle, VirtuosoProps } from 'react-virtuoso';
|
|
3
|
+
import { ClassesProp, HTMLDataAttribute } from '@ringcentral/spring-base';
|
|
4
|
+
import { IconButtonProps } from '../../IconButton';
|
|
5
|
+
import suggestionListStyles from './styles/SuggestionList.css';
|
|
6
|
+
import { SuggestionListClassesKey } from './SuggestionList.classes';
|
|
7
|
+
import { SuggestionListItemProps } from './SuggestionListItem';
|
|
8
|
+
import { SuggestionListGroupedOption, SuggestionListHighlightChangeReason, SuggestionListItemData, UseSuggestionListParams } from './utils';
|
|
9
|
+
export interface AutocompleteRenderOptionState {
|
|
10
|
+
/** current input value */
|
|
11
|
+
inputValue?: string;
|
|
12
|
+
/** is that item be show highlighted style */
|
|
13
|
+
highlighted: boolean;
|
|
14
|
+
/** that item index */
|
|
15
|
+
index: number;
|
|
16
|
+
/** sort index in option own group */
|
|
17
|
+
indexInOwnGroup?: number;
|
|
18
|
+
/** if that item is group title, that have that `expanded` state */
|
|
19
|
+
expanded?: boolean;
|
|
20
|
+
/** if that item is group title, that will have that `expandIconProps` */
|
|
21
|
+
expandIconProps?: Partial<IconButtonProps>;
|
|
22
|
+
}
|
|
23
|
+
export declare type BaseSuggestionListProps<T, K = any> = Omit<Partial<VirtuosoProps<T, K>>, 'totalCount' | 'itemContent' | 'data' | 'color'> & ClassesProp<SuggestionListClassesKey> & HTMLDataAttribute;
|
|
24
|
+
export declare type SuggestionListProps<T extends SuggestionListItemData = SuggestionListItemData, K = any> = {
|
|
25
|
+
/**
|
|
26
|
+
* that virtual list container height,
|
|
27
|
+
*
|
|
28
|
+
* @default 100%
|
|
29
|
+
*/
|
|
30
|
+
maxContainerHeight?: number | '100%';
|
|
31
|
+
/**
|
|
32
|
+
* vertical padding of the list
|
|
33
|
+
*
|
|
34
|
+
* @default 8
|
|
35
|
+
*/
|
|
36
|
+
padding?: boolean | number;
|
|
37
|
+
/** is that menu virtualize */
|
|
38
|
+
virtualize?: boolean;
|
|
39
|
+
/** current highlightedIndex */
|
|
40
|
+
highlightedIndex: number;
|
|
41
|
+
/** select options */
|
|
42
|
+
options: SuggestionListItemData[];
|
|
43
|
+
/**
|
|
44
|
+
* Used to determine the selected state for a given option.
|
|
45
|
+
*
|
|
46
|
+
* @param {T} option The option to test.
|
|
47
|
+
* @returns {boolean}
|
|
48
|
+
*/
|
|
49
|
+
getOptionSelected?: (option: T) => boolean;
|
|
50
|
+
/** each item props getter */
|
|
51
|
+
getItemProps: (options: {
|
|
52
|
+
index?: number;
|
|
53
|
+
item: T;
|
|
54
|
+
}) => SuggestionListItemProps;
|
|
55
|
+
/** list wrapper props getter */
|
|
56
|
+
getSuggestionListProps: (restProps?: HTMLAttributes<HTMLDivElement> | undefined) => HTMLAttributes<HTMLDivElement>;
|
|
57
|
+
/** that reason that change highlighted */
|
|
58
|
+
changeHighlightedIndexReason?: SuggestionListHighlightChangeReason | undefined;
|
|
59
|
+
/** is that need keep highlighted index, that will be helpful when you need load more options when scroll */
|
|
60
|
+
isKeepHighlightedIndex?: boolean;
|
|
61
|
+
/** trigger when need update outside popper position */
|
|
62
|
+
onContainerHeightChange?: () => void;
|
|
63
|
+
/** options group list, use for calculate `aria-setsize` */
|
|
64
|
+
optionsGroupList?: SuggestionListGroupedOption<SuggestionListItemData>[];
|
|
65
|
+
/**
|
|
66
|
+
* Render the option, use `getOptionLabel` by default.
|
|
67
|
+
*
|
|
68
|
+
* @param {T} option The option to render.
|
|
69
|
+
* @param {object} state The state of the component.
|
|
70
|
+
* @returns {ReactNode}
|
|
71
|
+
*/
|
|
72
|
+
renderOption?: (option: T, state: AutocompleteRenderOptionState) => React.ReactNode;
|
|
73
|
+
/**
|
|
74
|
+
* Render the group title item, also with for toggle button props.
|
|
75
|
+
*
|
|
76
|
+
* > when you have set custom `renderOption`, the `renderGroup` must be set.
|
|
77
|
+
*
|
|
78
|
+
* @param {T} option The option to render.
|
|
79
|
+
* @param {object} state The state of the component.
|
|
80
|
+
* @returns {ReactNode}
|
|
81
|
+
*/
|
|
82
|
+
renderGroup?: (option: T, state: AutocompleteRenderOptionState) => React.ReactNode;
|
|
83
|
+
} & Pick<UseSuggestionListParams, 'groupVariant' | 'groupExpanded' | 'inputValue' | 'getOptionDisabled' | 'getOptionLabel'> & BaseSuggestionListProps<T, K>;
|
|
84
|
+
export declare const SuggestionList: React.ForwardRefExoticComponent<{
|
|
85
|
+
/**
|
|
86
|
+
* that virtual list container height,
|
|
87
|
+
*
|
|
88
|
+
* @default 100%
|
|
89
|
+
*/
|
|
90
|
+
maxContainerHeight?: number | "100%" | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* vertical padding of the list
|
|
93
|
+
*
|
|
94
|
+
* @default 8
|
|
95
|
+
*/
|
|
96
|
+
padding?: number | boolean | undefined;
|
|
97
|
+
/** is that menu virtualize */
|
|
98
|
+
virtualize?: boolean | undefined;
|
|
99
|
+
/** current highlightedIndex */
|
|
100
|
+
highlightedIndex: number;
|
|
101
|
+
/** select options */
|
|
102
|
+
options: SuggestionListItemData[];
|
|
103
|
+
/**
|
|
104
|
+
* Used to determine the selected state for a given option.
|
|
105
|
+
*
|
|
106
|
+
* @param {T} option The option to test.
|
|
107
|
+
* @returns {boolean}
|
|
108
|
+
*/
|
|
109
|
+
getOptionSelected?: ((option: SuggestionListItemData) => boolean) | undefined;
|
|
110
|
+
/** each item props getter */
|
|
111
|
+
getItemProps: (options: {
|
|
112
|
+
index?: number | undefined;
|
|
113
|
+
item: SuggestionListItemData;
|
|
114
|
+
}) => SuggestionListItemProps;
|
|
115
|
+
/** list wrapper props getter */
|
|
116
|
+
getSuggestionListProps: (restProps?: HTMLAttributes<HTMLDivElement> | undefined) => HTMLAttributes<HTMLDivElement>;
|
|
117
|
+
/** that reason that change highlighted */
|
|
118
|
+
changeHighlightedIndexReason?: SuggestionListHighlightChangeReason | undefined;
|
|
119
|
+
/** is that need keep highlighted index, that will be helpful when you need load more options when scroll */
|
|
120
|
+
isKeepHighlightedIndex?: boolean | undefined;
|
|
121
|
+
/** trigger when need update outside popper position */
|
|
122
|
+
onContainerHeightChange?: (() => void) | undefined;
|
|
123
|
+
/** options group list, use for calculate `aria-setsize` */
|
|
124
|
+
optionsGroupList?: SuggestionListGroupedOption<SuggestionListItemData>[] | undefined;
|
|
125
|
+
/**
|
|
126
|
+
* Render the option, use `getOptionLabel` by default.
|
|
127
|
+
*
|
|
128
|
+
* @param {T} option The option to render.
|
|
129
|
+
* @param {object} state The state of the component.
|
|
130
|
+
* @returns {ReactNode}
|
|
131
|
+
*/
|
|
132
|
+
renderOption?: ((option: SuggestionListItemData, state: AutocompleteRenderOptionState) => React.ReactNode) | undefined;
|
|
133
|
+
/**
|
|
134
|
+
* Render the group title item, also with for toggle button props.
|
|
135
|
+
*
|
|
136
|
+
* > when you have set custom `renderOption`, the `renderGroup` must be set.
|
|
137
|
+
*
|
|
138
|
+
* @param {T} option The option to render.
|
|
139
|
+
* @param {object} state The state of the component.
|
|
140
|
+
* @returns {ReactNode}
|
|
141
|
+
*/
|
|
142
|
+
renderGroup?: ((option: SuggestionListItemData, state: AutocompleteRenderOptionState) => React.ReactNode) | undefined;
|
|
143
|
+
} & Pick<UseSuggestionListParams<SuggestionListItemData>, "getOptionDisabled" | "groupExpanded" | "groupVariant" | "inputValue" | "getOptionLabel"> & Omit<Partial<VirtuosoProps<SuggestionListItemData, any>>, "data" | "color" | "itemContent" | "totalCount"> & ClassesProp<SuggestionListClassesKey> & HTMLDataAttribute & React.RefAttributes<VirtuosoHandle>>;
|
|
144
|
+
export { suggestionListStyles };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { DetailedHTMLProps, HTMLAttributes, PropsWithoutRef } from 'react';
|
|
2
|
+
import { ClassesProp } from '@ringcentral/spring-base';
|
|
3
|
+
import { IconButtonProps } from '../../IconButton';
|
|
4
|
+
import { SuggestionListClassesKey } from './SuggestionList.classes';
|
|
5
|
+
export declare type SuggestionListItemProps = {
|
|
6
|
+
id?: string;
|
|
7
|
+
label?: React.ReactNode;
|
|
8
|
+
expanded?: boolean;
|
|
9
|
+
expandable?: boolean;
|
|
10
|
+
isGroupTitle?: boolean;
|
|
11
|
+
isTitleMode?: boolean;
|
|
12
|
+
selected?: boolean;
|
|
13
|
+
highlighted?: boolean;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
expandIconProps?: Partial<IconButtonProps>;
|
|
16
|
+
} & PropsWithoutRef<DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>> & ClassesProp<SuggestionListClassesKey>;
|
|
17
|
+
export declare const SuggestionListItem: import("react").ForwardRefExoticComponent<{
|
|
18
|
+
id?: string | undefined;
|
|
19
|
+
label?: React.ReactNode;
|
|
20
|
+
expanded?: boolean | undefined;
|
|
21
|
+
expandable?: boolean | undefined;
|
|
22
|
+
isGroupTitle?: boolean | undefined;
|
|
23
|
+
isTitleMode?: boolean | undefined;
|
|
24
|
+
selected?: boolean | undefined;
|
|
25
|
+
highlighted?: boolean | undefined;
|
|
26
|
+
disabled?: boolean | undefined;
|
|
27
|
+
expandIconProps?: Partial<IconButtonProps<"button">> | undefined;
|
|
28
|
+
} & Pick<DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, "key" | keyof HTMLAttributes<HTMLElement>> & ClassesProp<SuggestionListClassesKey> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, DetailedHTMLProps, PropsWithoutRef } from 'react';
|
|
2
|
+
import { IconButtonProps } from '../../../IconButton';
|
|
3
|
+
export interface SuggestionListGroupedOption<T = SuggestionListItemData> {
|
|
4
|
+
options: T[];
|
|
5
|
+
/** group key */
|
|
6
|
+
key: number;
|
|
7
|
+
/** group index in all options */
|
|
8
|
+
index: number;
|
|
9
|
+
/** group order in all group */
|
|
10
|
+
order: number;
|
|
11
|
+
/** group title */
|
|
12
|
+
group: string;
|
|
13
|
+
/** expanded state */
|
|
14
|
+
expanded: boolean;
|
|
15
|
+
/** The props apply to apply to the underlying `IconButton` */
|
|
16
|
+
getExpandIconProps?: (additionalProps?: Omit<PropsWithoutRef<DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>>, 'color'> & Partial<IconButtonProps>) => Omit<PropsWithoutRef<DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>>, 'color'> | undefined | Partial<IconButtonProps>;
|
|
17
|
+
}
|
|
18
|
+
export declare type SuggestionListItemData = {
|
|
19
|
+
/** children item id */
|
|
20
|
+
id?: number | string;
|
|
21
|
+
/** display label */
|
|
22
|
+
label?: string;
|
|
23
|
+
/** is that item disabled */
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
/** is that item error */
|
|
26
|
+
error?: boolean;
|
|
27
|
+
/** is that come from freeSolo item */
|
|
28
|
+
freeSolo?: boolean;
|
|
29
|
+
/** that item belongs group */
|
|
30
|
+
group?: SuggestionListGroupedOption;
|
|
31
|
+
/** default styles */
|
|
32
|
+
className?: string;
|
|
33
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type UseDynamicHeightParams = {
|
|
3
|
+
/** total items count */
|
|
4
|
+
itemCount: number;
|
|
5
|
+
/** max-height of container */
|
|
6
|
+
maxContainerHeight?: number | '100%';
|
|
7
|
+
/** trigger when container height need change */
|
|
8
|
+
onContainerHeightChange?: (number: number) => void;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* auto calculate container height
|
|
12
|
+
*/
|
|
13
|
+
export declare const useDynamicHeight: ({ itemCount, maxContainerHeight, onContainerHeightChange, }: UseDynamicHeightParams) => {
|
|
14
|
+
containerHeighRef: import("react").MutableRefObject<number>;
|
|
15
|
+
totalListHeightChanged: (height: number) => void;
|
|
16
|
+
style: {
|
|
17
|
+
height: string | number;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FlatIndexLocationWithAlign, ListItem } from 'react-virtuoso';
|
|
3
|
+
declare type UseHighlightScrollParams = {
|
|
4
|
+
/** function to call to scroll to target index */
|
|
5
|
+
scrollToIndex: (location: FlatIndexLocationWithAlign) => void;
|
|
6
|
+
/** that scroll container height ref */
|
|
7
|
+
containerHeighRef: React.MutableRefObject<number>;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* scroll into current highlight index
|
|
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
|
+
*/
|
|
23
|
+
scrollToHighlightedIndex: (prevHighlightedIndex: number, currHighlightedIndex: number, topHighlightIndex?: number) => void;
|
|
24
|
+
/**
|
|
25
|
+
* set to virtuoso `scrollerRef` prop, auto bind inner `scrollerRef`
|
|
26
|
+
*/
|
|
27
|
+
scrollerRefFn: (elm: HTMLElement) => HTMLElement;
|
|
28
|
+
/**
|
|
29
|
+
* set to virtuoso `itemsRendered` prop, auto bind inner `renderedItemsRef`
|
|
30
|
+
*/
|
|
31
|
+
itemsRendered: (e: ListItem<unknown>[]) => ListItem<unknown>[];
|
|
32
|
+
};
|
|
33
|
+
export {};
|