@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
package/TrayMenu.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useThemeProps } from '@ringcentral/spring-theme';
|
|
3
|
+
import { forwardRef, useRef } from 'react';
|
|
4
|
+
import { M as Menu } from './chunks/Menu.js';
|
|
5
|
+
import { T as Tray, d as useTrayNavigate } from './chunks/useTrayNavigate.js';
|
|
6
|
+
import '@ringcentral/spring-base';
|
|
7
|
+
import { M as MenuItem } from './chunks/useMenuItemSelect.js';
|
|
8
|
+
import 'tabbable';
|
|
9
|
+
import './chunks/useListNavigation.js';
|
|
10
|
+
import './VirtualizedList.js';
|
|
11
|
+
import './chunks/useNestedParentMenu.js';
|
|
12
|
+
import './chunks/Popover.js';
|
|
13
|
+
import '@floating-ui/react-dom';
|
|
14
|
+
import 'framer-motion';
|
|
15
|
+
import './chunks/Icon.js';
|
|
16
|
+
import './chunks/usePrefersReducedMotion.js';
|
|
17
|
+
import './chunks/getGrow.js';
|
|
18
|
+
import './chunks/Modal.js';
|
|
19
|
+
import '@mui/base';
|
|
20
|
+
import './chunks/getFade.js';
|
|
21
|
+
import './chunks/useFocusTrapStack.js';
|
|
22
|
+
import './chunks/Backdrop.js';
|
|
23
|
+
import './Popper.js';
|
|
24
|
+
import './chunks/PopperPaper.js';
|
|
25
|
+
import './chunks/useMotionSafeTransition.js';
|
|
26
|
+
import '@ringcentral/spring-icon';
|
|
27
|
+
import './chunks/useNestedMenuItem.js';
|
|
28
|
+
import './ListNavigation.js';
|
|
29
|
+
import 'react-virtuoso';
|
|
30
|
+
import './chunks/List.js';
|
|
31
|
+
|
|
32
|
+
const TrayMenu = forwardRef((inProps, ref) => {
|
|
33
|
+
const props = useThemeProps({ props: inProps, name: 'TrayMenu' });
|
|
34
|
+
const { defaultValue, value, onChange, children, ...rest } = props;
|
|
35
|
+
const trayActionsRef = useRef(null);
|
|
36
|
+
return (jsx(Menu, { ...rest, ref: ref, autoFocus: false, children: jsx(Tray, { value: value, defaultValue: defaultValue, onChange: onChange, actions: trayActionsRef, onKeyDown: (e) => {
|
|
37
|
+
if (e.key === 'ArrowLeft') {
|
|
38
|
+
trayActionsRef.current?.navigateTo(null);
|
|
39
|
+
}
|
|
40
|
+
}, children: children }) }));
|
|
41
|
+
});
|
|
42
|
+
TrayMenu.displayName = 'SuiTrayMenu';
|
|
43
|
+
|
|
44
|
+
const TrayMenuItem = forwardRef((inProps, ref) => {
|
|
45
|
+
const props = useThemeProps({ props: inProps, name: 'TrayMenuItem' });
|
|
46
|
+
const { value, onClick, onKeyDown } = props;
|
|
47
|
+
const { navigateTo } = useTrayNavigate();
|
|
48
|
+
return (jsx(MenuItem, { ...props, onClick: (e) => {
|
|
49
|
+
navigateTo(value, e);
|
|
50
|
+
onClick?.(e);
|
|
51
|
+
}, onKeyDown: (e) => {
|
|
52
|
+
if (e.key === 'ArrowRight') {
|
|
53
|
+
navigateTo(value, e);
|
|
54
|
+
}
|
|
55
|
+
onKeyDown?.(e);
|
|
56
|
+
}, ref: ref, autoClose: false }));
|
|
57
|
+
});
|
|
58
|
+
TrayMenuItem.displayName = 'SuiTrayItem';
|
|
59
|
+
|
|
60
|
+
export { TrayMenu, TrayMenuItem };
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
import { createContext, useContext, forwardRef, isValidElement, useRef, useState, useImperativeHandle, useEffect } from 'react';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { useForkRef, useEventCallback, useWindowContext, logInDev } from '@ringcentral/spring-base';
|
|
4
|
+
import { useThemeProps } from '@ringcentral/spring-theme';
|
|
5
|
+
import { Virtuoso } from 'react-virtuoso';
|
|
6
|
+
import { L as List } from './chunks/List.js';
|
|
7
|
+
import './chunks/useListNavigation.js';
|
|
8
|
+
import 'tabbable';
|
|
9
|
+
|
|
10
|
+
const VirtualizedItemPropsContext = createContext(null);
|
|
11
|
+
const useVirtualizedItemPropsContext = () => useContext(VirtualizedItemPropsContext);
|
|
12
|
+
|
|
13
|
+
const VirtuosoList = forwardRef((props, ref) => {
|
|
14
|
+
const { children: childrenProp, context, style, ...rest } = props;
|
|
15
|
+
const { searchAndFocusItemHandler, isScrolling, ListProps, listActions, listRef, itemContentRenderer, data, keepInvisibleItems, computeItemKey,
|
|
16
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
17
|
+
} = context;
|
|
18
|
+
const handleListRef = useForkRef(listRef, ref);
|
|
19
|
+
let rangeStart = null;
|
|
20
|
+
let rangeEnd = null;
|
|
21
|
+
let children = childrenProp;
|
|
22
|
+
if (keepInvisibleItems && computeItemKey && Array.isArray(childrenProp)) {
|
|
23
|
+
const firstChild = childrenProp[0];
|
|
24
|
+
if (firstChild && isValidElement(firstChild)) {
|
|
25
|
+
const index = Number(firstChild.props?.['data-item-index']);
|
|
26
|
+
rangeStart = Number.isNaN(index) ? null : index;
|
|
27
|
+
}
|
|
28
|
+
const lastChild = childrenProp.at(-1);
|
|
29
|
+
if (lastChild && isValidElement(lastChild)) {
|
|
30
|
+
const index = Number(lastChild.props?.['data-item-index']);
|
|
31
|
+
rangeEnd = Number.isNaN(index) ? null : index;
|
|
32
|
+
}
|
|
33
|
+
children = [
|
|
34
|
+
...(rangeStart !== null
|
|
35
|
+
? keepInvisibleItems
|
|
36
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
37
|
+
.filter((itemIndex) => itemIndex < rangeStart)
|
|
38
|
+
.map((itemIndex) => {
|
|
39
|
+
const itemData = data ? data[itemIndex] : itemIndex;
|
|
40
|
+
return (jsx(InnerItem, { "data-sticky-index": itemIndex, style: {
|
|
41
|
+
left: 0,
|
|
42
|
+
top: 0,
|
|
43
|
+
position: 'absolute',
|
|
44
|
+
}, children: itemContentRenderer(itemIndex, itemData, context) }, computeItemKey(itemIndex, itemData, context)));
|
|
45
|
+
})
|
|
46
|
+
: []),
|
|
47
|
+
...childrenProp,
|
|
48
|
+
...(rangeEnd !== null
|
|
49
|
+
? keepInvisibleItems
|
|
50
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
51
|
+
.filter((itemIndex) => itemIndex > rangeEnd)
|
|
52
|
+
.map((itemIndex) => {
|
|
53
|
+
const itemData = data ? data[itemIndex] : itemIndex;
|
|
54
|
+
return (jsx(InnerItem, { "data-sticky-index": itemIndex, style: {
|
|
55
|
+
left: 0,
|
|
56
|
+
bottom: 0,
|
|
57
|
+
position: 'absolute',
|
|
58
|
+
}, children: itemContentRenderer(itemIndex, itemData, context) }, computeItemKey(itemIndex, itemData, context)));
|
|
59
|
+
})
|
|
60
|
+
: []),
|
|
61
|
+
];
|
|
62
|
+
}
|
|
63
|
+
return (jsx(List, { ...ListProps, ...rest, actions: listActions, style: {
|
|
64
|
+
...ListProps?.style,
|
|
65
|
+
...style,
|
|
66
|
+
// optimize list scrolling
|
|
67
|
+
...(isScrolling ? { pointerEvents: 'none' } : undefined),
|
|
68
|
+
// for prop `keepInvisibleItems`
|
|
69
|
+
position: 'relative',
|
|
70
|
+
}, preventContainerScroll: false, ref: handleListRef, searchAndFocusItemHandler: searchAndFocusItemHandler, children: children }));
|
|
71
|
+
});
|
|
72
|
+
const Scroller = forwardRef((props, ref) => {
|
|
73
|
+
const { children, context, ...rest } = props;
|
|
74
|
+
const handleRef = useForkRef(ref, context?.scrollerRef);
|
|
75
|
+
return (jsx("div", { ...rest, ref: handleRef, tabIndex: undefined, children: children }));
|
|
76
|
+
});
|
|
77
|
+
const InnerItem = (props) => {
|
|
78
|
+
const { children, ...rest } = props;
|
|
79
|
+
return (jsx(VirtualizedItemPropsContext.Provider, { value: rest, children: children }));
|
|
80
|
+
};
|
|
81
|
+
const Item = InnerItem;
|
|
82
|
+
const VirtuosoComponents = { Item, Scroller, List: VirtuosoList };
|
|
83
|
+
|
|
84
|
+
const VirtualizedList = forwardRef((inProps, ref) => {
|
|
85
|
+
const props = useThemeProps({ props: inProps, name: 'VirtualizedList' });
|
|
86
|
+
const { children, totalCount, data, isScrolling: handleScroll, rangeChanged: handleRangeChanged, virtuosoActions, actions, ListProps, isItemDisabled, infinite = false, isReady = true, context, components, keepInvisibleItems, computeItemKey, firstFocusIndex = 0, ...rest } = props;
|
|
87
|
+
const listRangeRef = useRef({ startIndex: -1, endIndex: -1 });
|
|
88
|
+
const [isScrolling, setIsScrolling] = useState(false);
|
|
89
|
+
const listRef = useRef(null);
|
|
90
|
+
const virtuosoRef = useRef(null);
|
|
91
|
+
const handleVirtuosoRef = useForkRef(virtuosoRef, virtuosoActions);
|
|
92
|
+
const initialFocusItemByIndexPromiseRef = useRef(null);
|
|
93
|
+
const itemRenderedPromiseRef = useRef(null);
|
|
94
|
+
const isItemRendered = (index) => {
|
|
95
|
+
const { startIndex, endIndex } = listRangeRef.current;
|
|
96
|
+
return index <= endIndex && index >= startIndex;
|
|
97
|
+
};
|
|
98
|
+
const focusItemByIndex = (index) => {
|
|
99
|
+
/**
|
|
100
|
+
* If the component isn't ready, we need to defer the focus action until the component is ready.
|
|
101
|
+
* This is necessary if a parent component is waiting for some height calculation of the list to
|
|
102
|
+
* be performed before it actually renders the list. If we didn't do this the component would not
|
|
103
|
+
* know where to scroll to/would scroll to an incorrect position as it has not yet fully rendered.
|
|
104
|
+
*/
|
|
105
|
+
if (!isReady) {
|
|
106
|
+
new Promise((resolve) => {
|
|
107
|
+
initialFocusItemByIndexPromiseRef.current = resolve;
|
|
108
|
+
}).then(() => {
|
|
109
|
+
// Wrap in rAF to ensure height has truly settled before focusing
|
|
110
|
+
requestAnimationFrame(() => focusByIndexAction(index));
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
const focusTarget = () => {
|
|
115
|
+
const targetItem = listRef.current?.querySelector(`[data-item-index="${index}"]`);
|
|
116
|
+
if (process.env.NODE_ENV !== 'production' && !targetItem) {
|
|
117
|
+
logInDev({
|
|
118
|
+
scope: 'VirtualizedList',
|
|
119
|
+
level: 'warn',
|
|
120
|
+
message: `Can't find the target item with index \`${index}\`. Please ensure \`getSelectedIndex\` can find the index in your data array.`,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
targetItem?.focus();
|
|
124
|
+
};
|
|
125
|
+
if (!isItemRendered(index)) {
|
|
126
|
+
new Promise((resolve) => {
|
|
127
|
+
itemRenderedPromiseRef.current = { resolve, itemIndex: index };
|
|
128
|
+
}).then(() => {
|
|
129
|
+
focusTarget();
|
|
130
|
+
});
|
|
131
|
+
virtuosoRef.current?.scrollToIndex({ index, align: 'center' });
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
focusTarget();
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
const isDisabled = (index) => {
|
|
139
|
+
if (!isItemDisabled)
|
|
140
|
+
return false;
|
|
141
|
+
return isItemDisabled(index);
|
|
142
|
+
};
|
|
143
|
+
const searchAndFocusItemHandler = (searchElementOption) => {
|
|
144
|
+
const firstItemIndex = 0;
|
|
145
|
+
const lastItemIndex = (() => {
|
|
146
|
+
if (data) {
|
|
147
|
+
return data.length - 1;
|
|
148
|
+
}
|
|
149
|
+
return totalCount ? totalCount - 1 : -1;
|
|
150
|
+
})();
|
|
151
|
+
let direction;
|
|
152
|
+
let startIndex;
|
|
153
|
+
if (typeof searchElementOption === 'string') {
|
|
154
|
+
if (searchElementOption === 'first') {
|
|
155
|
+
startIndex = firstFocusIndex;
|
|
156
|
+
direction = 'down';
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
startIndex = lastItemIndex;
|
|
160
|
+
direction = 'up';
|
|
161
|
+
}
|
|
162
|
+
if (!isDisabled(startIndex)) {
|
|
163
|
+
focusItemByIndex(startIndex);
|
|
164
|
+
return { focused: true };
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
startIndex = Number(searchElementOption.baseElement.dataset['itemIndex']);
|
|
169
|
+
direction = searchElementOption.direction;
|
|
170
|
+
}
|
|
171
|
+
let pointer = startIndex;
|
|
172
|
+
let isAfterBaseElement = true;
|
|
173
|
+
if (direction === 'up') {
|
|
174
|
+
do {
|
|
175
|
+
if (pointer - 1 < firstItemIndex) {
|
|
176
|
+
// disabled focus loop when infinite is true
|
|
177
|
+
if (infinite) {
|
|
178
|
+
pointer = startIndex;
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
pointer = lastItemIndex;
|
|
182
|
+
}
|
|
183
|
+
isAfterBaseElement = false;
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
pointer--;
|
|
187
|
+
}
|
|
188
|
+
if (!isDisabled(pointer)) {
|
|
189
|
+
break;
|
|
190
|
+
}
|
|
191
|
+
} while (pointer !== startIndex);
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
do {
|
|
195
|
+
if (pointer + 1 > lastItemIndex) {
|
|
196
|
+
// disabled focus loop when infinite is true
|
|
197
|
+
if (infinite) {
|
|
198
|
+
pointer = startIndex;
|
|
199
|
+
}
|
|
200
|
+
else {
|
|
201
|
+
pointer = firstItemIndex;
|
|
202
|
+
}
|
|
203
|
+
isAfterBaseElement = false;
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
pointer++;
|
|
207
|
+
}
|
|
208
|
+
if (!isDisabled(pointer)) {
|
|
209
|
+
break;
|
|
210
|
+
}
|
|
211
|
+
} while (pointer !== startIndex);
|
|
212
|
+
}
|
|
213
|
+
if (isDisabled(pointer)) {
|
|
214
|
+
return { focused: false };
|
|
215
|
+
}
|
|
216
|
+
focusItemByIndex(pointer);
|
|
217
|
+
return typeof searchElementOption === 'string'
|
|
218
|
+
? { focused: true }
|
|
219
|
+
: { focused: true, isAfterBaseElement };
|
|
220
|
+
};
|
|
221
|
+
const listActions = useRef(null);
|
|
222
|
+
const focusByIndexAction = useEventCallback((i) => {
|
|
223
|
+
if (isDisabled(i)) {
|
|
224
|
+
listActions.current?.focus();
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
focusItemByIndex(i);
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
useImperativeHandle(actions, () => ({
|
|
231
|
+
focus: () => {
|
|
232
|
+
listActions.current?.focus();
|
|
233
|
+
},
|
|
234
|
+
focusByIndex: focusByIndexAction,
|
|
235
|
+
}), [focusByIndexAction]);
|
|
236
|
+
useEffect(() => {
|
|
237
|
+
// Execute the initial focus item by index promise when the list is ready
|
|
238
|
+
if (isReady) {
|
|
239
|
+
initialFocusItemByIndexPromiseRef.current?.();
|
|
240
|
+
}
|
|
241
|
+
}, [isReady]);
|
|
242
|
+
const virtuosoContext = {
|
|
243
|
+
listRef,
|
|
244
|
+
scrollerRef: ref,
|
|
245
|
+
isScrolling,
|
|
246
|
+
searchAndFocusItemHandler,
|
|
247
|
+
listActions,
|
|
248
|
+
ListProps,
|
|
249
|
+
data,
|
|
250
|
+
keepInvisibleItems,
|
|
251
|
+
itemContentRenderer: children,
|
|
252
|
+
computeItemKey: computeItemKey,
|
|
253
|
+
};
|
|
254
|
+
const { externalWindow } = useWindowContext();
|
|
255
|
+
/**
|
|
256
|
+
* The 'externalWindow' prop exists only in the forked version of Virtuoso.
|
|
257
|
+
*
|
|
258
|
+
* Passing 'externalWindow' to the original Virtuoso component will result in a React error.
|
|
259
|
+
*
|
|
260
|
+
* If 'externalWindow' is present in the context, it indicates that the user is using the forked version.
|
|
261
|
+
*
|
|
262
|
+
* Therefore, we only pass 'externalWindow' to Virtuoso when it exists and is not the same as the global window, ensuring compatibility.
|
|
263
|
+
*/
|
|
264
|
+
const externalProps = externalWindow &&
|
|
265
|
+
// window is not the same as the global window, we need to pass the externalWindow to Virtuoso for fork virtuoso
|
|
266
|
+
externalWindow !== (window || globalThis.window)
|
|
267
|
+
? {
|
|
268
|
+
externalWindow,
|
|
269
|
+
}
|
|
270
|
+
: undefined;
|
|
271
|
+
return (jsx(Virtuoso, { className: "sui-virtualized-list", ...externalProps, ref: handleVirtuosoRef,
|
|
272
|
+
// pre-render, make scroll smooth when move focus
|
|
273
|
+
increaseViewportBy: 200, ...(computeItemKey ? { computeItemKey } : undefined), ...rest, context: { ...context, ...virtuosoContext }, components: { ...VirtuosoComponents, ...components }, totalCount: totalCount, data: data, rangeChanged: (range) => {
|
|
274
|
+
listRangeRef.current = range;
|
|
275
|
+
const itemRenderedPromise = itemRenderedPromiseRef.current;
|
|
276
|
+
if (itemRenderedPromise) {
|
|
277
|
+
const { itemIndex, resolve } = itemRenderedPromise;
|
|
278
|
+
if (isItemRendered(itemIndex)) {
|
|
279
|
+
resolve();
|
|
280
|
+
itemRenderedPromiseRef.current = null;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
handleRangeChanged?.(range);
|
|
284
|
+
}, isScrolling: (isScrolling) => {
|
|
285
|
+
setIsScrolling(isScrolling);
|
|
286
|
+
handleScroll?.(isScrolling);
|
|
287
|
+
}, itemContent: children }));
|
|
288
|
+
});
|
|
289
|
+
VirtualizedList.displayName = 'SuiVirtualizedList';
|
|
290
|
+
|
|
291
|
+
export { VirtualizedItemPropsContext, VirtualizedList, VirtuosoComponents, useVirtualizedItemPropsContext };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export { a as VirtualizedMenu, V as VirtualizedMenuContext, b as VirtualizedMenuList, u as useVirtualizedMenuContext } from './chunks/VirtualizedMenu.js';
|
|
2
|
+
import 'react/jsx-runtime';
|
|
3
|
+
import 'react';
|
|
4
|
+
import '@ringcentral/spring-base';
|
|
5
|
+
import '@ringcentral/spring-theme';
|
|
6
|
+
import 'clsx';
|
|
7
|
+
import './chunks/Popover.js';
|
|
8
|
+
import '@floating-ui/react-dom';
|
|
9
|
+
import 'framer-motion';
|
|
10
|
+
import './chunks/Icon.js';
|
|
11
|
+
import './chunks/usePrefersReducedMotion.js';
|
|
12
|
+
import './chunks/getGrow.js';
|
|
13
|
+
import './chunks/Modal.js';
|
|
14
|
+
import '@mui/base';
|
|
15
|
+
import './chunks/getFade.js';
|
|
16
|
+
import './chunks/useFocusTrapStack.js';
|
|
17
|
+
import './chunks/Backdrop.js';
|
|
18
|
+
import './Popper.js';
|
|
19
|
+
import './chunks/PopperPaper.js';
|
|
20
|
+
import './VirtualizedList.js';
|
|
21
|
+
import 'react-virtuoso';
|
|
22
|
+
import './chunks/List.js';
|
|
23
|
+
import './chunks/useListNavigation.js';
|
|
24
|
+
import 'tabbable';
|
|
25
|
+
|
|
26
|
+
var VirtualizedMenu = {"sui-virtualized-menu-paper":"sui-virtualized-menu-paper","sui-virtualized-menu-paper-content-container":"sui-virtualized-menu-paper-content-container"};
|
|
27
|
+
|
|
28
|
+
export { VirtualizedMenu as virtualizedMenuStyle };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { V as VisuallyHidden } from './chunks/VisuallyHidden.js';
|
|
2
|
+
import 'react/jsx-runtime';
|
|
3
|
+
import 'react';
|
|
4
|
+
import '@ringcentral/spring-base';
|
|
5
|
+
|
|
6
|
+
var VisuallyHidden = {"sui-visually-hidden-root":"sui-visually-hidden-root"};
|
|
7
|
+
|
|
8
|
+
export { VisuallyHidden as visuallyHiddenStyle };
|
package/chunks/Alert.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef, isValidElement } from 'react';
|
|
3
|
+
import { useClasses } from '@ringcentral/spring-base';
|
|
4
|
+
import { Xmd, InfoMd, AlertMd, SuccessMd } from '@ringcentral/spring-icon';
|
|
5
|
+
import { useThemeProps } from '@ringcentral/spring-theme';
|
|
6
|
+
import clsx from 'clsx';
|
|
7
|
+
import { I as Icon } from './Icon.js';
|
|
8
|
+
import { I as IconButton } from './IconButtonLabel.js';
|
|
9
|
+
|
|
10
|
+
const DEFAULT_ICON_MAP = {
|
|
11
|
+
info: InfoMd,
|
|
12
|
+
error: AlertMd,
|
|
13
|
+
success: SuccessMd,
|
|
14
|
+
warning: AlertMd,
|
|
15
|
+
neutral: InfoMd,
|
|
16
|
+
};
|
|
17
|
+
const Alert = forwardRef((inProps, ref) => {
|
|
18
|
+
const props = useThemeProps({ props: inProps, name: 'Alert' });
|
|
19
|
+
const { action, classes, className, component: AlertRoot = 'div', closeText = 'close', children, icon: iconProp, startSlot, onClose, severity = 'info', CloseButtonProps, ...rest } = props;
|
|
20
|
+
const cls = useClasses('alert', classes, className);
|
|
21
|
+
const renderIcon = (icon, severity) => {
|
|
22
|
+
return (jsx("div", { className: cls('icon', `${severity}-icon`), children: isValidElement(icon) ? (icon) : (jsx(Icon, { size: "medium", symbol: icon })) }));
|
|
23
|
+
};
|
|
24
|
+
let startSlotContent = null;
|
|
25
|
+
if (startSlot) {
|
|
26
|
+
startSlotContent = renderIcon(startSlot, severity);
|
|
27
|
+
}
|
|
28
|
+
else if (iconProp) {
|
|
29
|
+
const iconComponent = iconProp === true ? DEFAULT_ICON_MAP[severity] : iconProp;
|
|
30
|
+
startSlotContent = renderIcon(iconComponent, severity);
|
|
31
|
+
}
|
|
32
|
+
let closeSlot = null;
|
|
33
|
+
if (onClose) {
|
|
34
|
+
closeSlot = (jsx(IconButton, { symbol: Xmd, variant: "icon", shape: 'squircle', color: 'secondary', size: "small", background: false, title: closeText, "aria-label": closeText, onClick: onClose, ...CloseButtonProps, className: clsx(cls('close'), CloseButtonProps?.className) }));
|
|
35
|
+
}
|
|
36
|
+
let actionSlot = null;
|
|
37
|
+
if (action) {
|
|
38
|
+
actionSlot = jsx("div", { className: cls('action'), children: action });
|
|
39
|
+
}
|
|
40
|
+
return (jsxs(AlertRoot, { ...rest, ref: ref, className: cls('root', severity), children: [startSlotContent, jsxs("div", { className: cls('body'), children: [jsx("div", { className: cls('content'), role: "alert", children: children }), actionSlot] }), closeSlot] }));
|
|
41
|
+
});
|
|
42
|
+
const AlertTitle = ({ className, classes, ...rest }) => {
|
|
43
|
+
const cls = useClasses('alert-title', classes, className);
|
|
44
|
+
return jsx("div", { className: cls('root'), ...rest });
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export { Alert as A, AlertTitle as a };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { createContext, forwardRef, Children } from 'react';
|
|
3
|
+
import { useClasses, logInDev } from '@ringcentral/spring-base';
|
|
4
|
+
import { useThemeProps } from '@ringcentral/spring-theme';
|
|
5
|
+
|
|
6
|
+
const AvatarGroupContext = createContext({});
|
|
7
|
+
const AvatarGroup = forwardRef((inProps, ref) => {
|
|
8
|
+
const props = useThemeProps({ props: inProps, name: 'AvatarGroup' });
|
|
9
|
+
const { component: AvatarGroupRoot = 'div', classes, className, children, ...rest } = props;
|
|
10
|
+
const cls = useClasses('avatar-group', classes, className);
|
|
11
|
+
const childrenLength = Children.toArray(children).filter(Boolean).length;
|
|
12
|
+
if (process.env.NODE_ENV !== 'production' && childrenLength !== 2) {
|
|
13
|
+
logInDev({
|
|
14
|
+
scope: 'AvatarGroup',
|
|
15
|
+
message: 'AvatarGroup only accept 2 valid child components as its children',
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return (jsx(AvatarGroupContext.Provider, { value: { size: 'small', className: cls('item') }, children: jsx(AvatarGroupRoot, { className: cls('root'), ...rest, ref: ref, children: children }) }));
|
|
19
|
+
});
|
|
20
|
+
AvatarGroup.displayName = 'SuiAvatarGroup';
|
|
21
|
+
|
|
22
|
+
export { AvatarGroupContext as A, AvatarGroup as a };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { useClasses } from '@ringcentral/spring-base';
|
|
4
|
+
import { useThemeProps } from '@ringcentral/spring-theme';
|
|
5
|
+
|
|
6
|
+
const Backdrop = forwardRef((inProps, ref) => {
|
|
7
|
+
const props = useThemeProps({ props: inProps, name: 'Backdrop' });
|
|
8
|
+
const { classes, className, children, isTransparent = false, onClick, ...rest } = props;
|
|
9
|
+
const cls = useClasses('backdrop', classes, className);
|
|
10
|
+
const handleClick = (e) => {
|
|
11
|
+
e.stopPropagation();
|
|
12
|
+
onClick?.(e);
|
|
13
|
+
};
|
|
14
|
+
return (jsx("div", { className: cls('root', { transparent: isTransparent }), "aria-hidden": true, tabIndex: -1, ...rest, ref: ref, onClick: handleClick, children: children }));
|
|
15
|
+
});
|
|
16
|
+
Backdrop.displayName = 'SuiBackdrop';
|
|
17
|
+
|
|
18
|
+
export { Backdrop as B };
|
package/chunks/Badge.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { AnimatePresence, motion } from 'framer-motion';
|
|
4
|
+
import isNumber from 'lodash/isNumber';
|
|
5
|
+
import kebabCase from 'lodash/kebabCase';
|
|
6
|
+
import { useClasses } from '@ringcentral/spring-base';
|
|
7
|
+
import { useThemeProps, motionTransition } from '@ringcentral/spring-theme';
|
|
8
|
+
import './Icon.js';
|
|
9
|
+
import { u as useMotionSafeTransition } from './useMotionSafeTransition.js';
|
|
10
|
+
|
|
11
|
+
const Badge = (inProps) => {
|
|
12
|
+
const props = useThemeProps({ props: inProps, name: 'Badge' });
|
|
13
|
+
const { count, classes, showZero, className, invisible, forceOverlap, type = 'standard', max = 999, size = 'small', color = 'primary', variant = 'contained', children, anchorOrigin = 'topRight', overlap = 'rectangular', ...rest } = props;
|
|
14
|
+
const cls = useClasses('badge', classes, className);
|
|
15
|
+
const transition = useMotionSafeTransition(motionTransition['haste-01-fast']);
|
|
16
|
+
const numeric = isNumber(count);
|
|
17
|
+
const content = type === 'standard'
|
|
18
|
+
? numeric && count > max
|
|
19
|
+
? `${max}+`
|
|
20
|
+
: count
|
|
21
|
+
: undefined;
|
|
22
|
+
const toOrigin = useMemo(() => kebabCase(anchorOrigin), [anchorOrigin]);
|
|
23
|
+
const overlapMode = children || forceOverlap;
|
|
24
|
+
return (jsxs("span", { className: cls('root', {
|
|
25
|
+
absolute: !children && forceOverlap,
|
|
26
|
+
}), ...rest, children: [children, jsx(AnimatePresence, { initial: false, children: invisible ||
|
|
27
|
+
(!showZero && count === 0) ||
|
|
28
|
+
(content === undefined && type === 'standard') ? null : (jsx(motion.span, { initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: transition, className: cls('content', color, size, type, variant, toOrigin, `${type}-${size}`, `${type}-${color}`, `${type}-${variant}`, `${type}-${variant}-${size}`, overlapMode && overlap, overlapMode && `${overlap}-${toOrigin}`), children: content })) })] }));
|
|
29
|
+
};
|
|
30
|
+
Badge.displayName = 'SuiBadge';
|
|
31
|
+
|
|
32
|
+
export { Badge as B };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { createContext, useContext, forwardRef } from 'react';
|
|
3
|
+
import { useClasses, combineClasses } from '@ringcentral/spring-base';
|
|
4
|
+
import { useThemeProps } from '@ringcentral/spring-theme';
|
|
5
|
+
import { B as Badge } from './Badge.js';
|
|
6
|
+
import { I as IconButton } from './IconButtonLabel.js';
|
|
7
|
+
import { T as Tooltip } from './Tooltip.js';
|
|
8
|
+
import { u as useTooltipForceHide } from './useTooltipForceHide.js';
|
|
9
|
+
|
|
10
|
+
const BottomNavigationContext = createContext(null);
|
|
11
|
+
const useBottomNavigationContext = () => useContext(BottomNavigationContext);
|
|
12
|
+
|
|
13
|
+
const BottomNavigationItem = forwardRef((inProps, ref) => {
|
|
14
|
+
const props = useThemeProps({ props: inProps, name: 'BottomNavigationItem' });
|
|
15
|
+
const { classes, symbol, activatedSymbol, count, value: valueProp, activated: activatedProp, expanded: expandedProp, onClick, BadgeProps = {}, TooltipProps = {}, ButtonProps = {}, label, className, } = props;
|
|
16
|
+
const cls = useClasses('bottom-navigation-item', classes, className);
|
|
17
|
+
const { value: selectedValue, expanded: isExpanded, onSelected, animationComplete, } = useBottomNavigationContext() || {};
|
|
18
|
+
// close tooltip temporarily during animation
|
|
19
|
+
const tooltipOpenProps = useTooltipForceHide(animationComplete === false);
|
|
20
|
+
const selected = selectedValue === valueProp;
|
|
21
|
+
const activated = activatedProp !== undefined ? activatedProp : selected;
|
|
22
|
+
const expanded = expandedProp !== undefined ? expandedProp : isExpanded;
|
|
23
|
+
const handleClick = (event) => {
|
|
24
|
+
if (valueProp !== undefined && !selected) {
|
|
25
|
+
onSelected?.(event, valueProp);
|
|
26
|
+
}
|
|
27
|
+
onClick?.(event);
|
|
28
|
+
};
|
|
29
|
+
let buttonClasses = { root: cls('button', { activated, expanded }) };
|
|
30
|
+
if (ButtonProps.classes) {
|
|
31
|
+
buttonClasses = combineClasses(buttonClasses, ButtonProps.classes);
|
|
32
|
+
}
|
|
33
|
+
return (jsx(Badge, { variant: "outlined", count: count, className: cls('root'), ...BadgeProps, children: jsx(Tooltip, { ...TooltipProps, title: label, PopperProps: { offset: 8 }, motionProps: null, ...tooltipOpenProps, children: jsx(IconButton, { shape: 'squircle', variant: "contained", size: "small", color: 'secondary', symbol: activated && activatedSymbol ? activatedSymbol : symbol, onClick: handleClick, "aria-label": label, ...ButtonProps, classes: buttonClasses, ref: ref }) }) }));
|
|
34
|
+
});
|
|
35
|
+
BottomNavigationItem.displayName = 'SuiBottomNavigationItem';
|
|
36
|
+
|
|
37
|
+
export { BottomNavigationItem as B, BottomNavigationContext as a, useBottomNavigationContext as u };
|
package/chunks/Button.js
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import React, { forwardRef } from 'react';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { useButton } from '@mui/base';
|
|
5
|
+
import { useClasses } from '@ringcentral/spring-base';
|
|
6
|
+
import { useThemeProps } from '@ringcentral/spring-theme';
|
|
7
|
+
import { C as CircularProgressIndicator } from './CircularProgressIndicator.js';
|
|
8
|
+
import { I as Icon } from './Icon.js';
|
|
9
|
+
import './Tooltip.js';
|
|
10
|
+
import { w as withTooltip } from './withTooltip.js';
|
|
11
|
+
|
|
12
|
+
const buttonIconSizeMap = {
|
|
13
|
+
xlarge: 'large',
|
|
14
|
+
large: 'medium',
|
|
15
|
+
medium: 'small',
|
|
16
|
+
small: 'small',
|
|
17
|
+
xsmall: 'xsmall',
|
|
18
|
+
};
|
|
19
|
+
const CircularProgressIndicatorSizeMap = {
|
|
20
|
+
xlarge: 'medium',
|
|
21
|
+
large: 'medium',
|
|
22
|
+
medium: 'small',
|
|
23
|
+
small: 'small',
|
|
24
|
+
xsmall: 'xsmall',
|
|
25
|
+
};
|
|
26
|
+
const CircularProgressIndicatorColorMap = {
|
|
27
|
+
primary: 'primary',
|
|
28
|
+
secondary: 'primary',
|
|
29
|
+
danger: 'danger',
|
|
30
|
+
warning: 'warning',
|
|
31
|
+
success: 'success',
|
|
32
|
+
neutral: 'primary',
|
|
33
|
+
};
|
|
34
|
+
const START_SLOT = 'start-slot';
|
|
35
|
+
const END_SLOT = 'end-slot';
|
|
36
|
+
const Button = withTooltip(forwardRef((inProps, ref) => {
|
|
37
|
+
const props = useThemeProps({ props: inProps, name: 'Button' });
|
|
38
|
+
const { component = 'button', children, size = 'medium', variant = 'contained', color = 'primary', background = true, fullWidth = false, loading = false, title: titleProp, CircularProgressIndicatorProps, startIcon, endIcon, classes, className, disabled: disabledProp, focusableWhenDisabled, ...rest } = props;
|
|
39
|
+
const cls = useClasses('button', classes, className);
|
|
40
|
+
const disableInteractions = disabledProp || loading;
|
|
41
|
+
const { getRootProps, focusVisible } = useButton({
|
|
42
|
+
...props,
|
|
43
|
+
focusableWhenDisabled,
|
|
44
|
+
disabled: disableInteractions,
|
|
45
|
+
rootRef: ref,
|
|
46
|
+
});
|
|
47
|
+
const ButtonRoot = component;
|
|
48
|
+
const isTextContent = typeof children === 'string';
|
|
49
|
+
const title = (() => {
|
|
50
|
+
// * if title is not provided and children is string, use children as title
|
|
51
|
+
if (titleProp === undefined && isTextContent) {
|
|
52
|
+
return children;
|
|
53
|
+
}
|
|
54
|
+
return titleProp;
|
|
55
|
+
})();
|
|
56
|
+
let startSlot = null;
|
|
57
|
+
let endSlot = null;
|
|
58
|
+
const startSlotClassName = cls(START_SLOT, `${size}-start-slot`, `${variant}-${size}-start-slot`);
|
|
59
|
+
const endSlotClassName = cls(END_SLOT, `${size}-end-slot`, `${variant}-${size}-end-slot`);
|
|
60
|
+
if (loading) {
|
|
61
|
+
startSlot = (jsx(CircularProgressIndicator, { className: clsx(startSlotClassName, cls('loading-indicator')), variant: "indeterminate", size: CircularProgressIndicatorSizeMap[size], color: CircularProgressIndicatorColorMap[color], ...CircularProgressIndicatorProps }));
|
|
62
|
+
}
|
|
63
|
+
else if (startIcon) {
|
|
64
|
+
if (React.isValidElement(startIcon)) {
|
|
65
|
+
startSlot = React.cloneElement(startIcon, {
|
|
66
|
+
className: clsx(startSlotClassName, startIcon.props.className),
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
startSlot = (jsx(Icon, { className: startSlotClassName, symbol: startIcon, size: buttonIconSizeMap[size] }));
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
if (React.isValidElement(endIcon)) {
|
|
74
|
+
endSlot = React.cloneElement(endIcon, {
|
|
75
|
+
className: clsx(endSlotClassName, endIcon.props.className),
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
else if (endIcon) {
|
|
79
|
+
endSlot = (jsx(Icon, { className: endSlotClassName, symbol: endIcon, size: buttonIconSizeMap[size] }));
|
|
80
|
+
}
|
|
81
|
+
return (jsxs(ButtonRoot, { className: cls('root', variant, color, size, `${variant}-${color}`, `${variant}-${size}`, !background && 'hide-background', !background && `${variant}-hide-background`, startSlot && 'has-start-slot', endSlot && 'has-end-slot', fullWidth && 'full-width', {
|
|
82
|
+
disabled: disabledProp,
|
|
83
|
+
focusVisible,
|
|
84
|
+
loading,
|
|
85
|
+
}), title: title, ...rest, ...getRootProps(), "aria-disabled": disableInteractions, children: [startSlot, isTextContent ? (jsx("span", { className: cls('content'), children: children })) : (children), endSlot] }));
|
|
86
|
+
}));
|
|
87
|
+
Button.displayName = 'SuiButton';
|
|
88
|
+
|
|
89
|
+
export { Button as B, buttonIconSizeMap as b };
|