@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/Slider.js
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { motion } from 'framer-motion';
|
|
4
|
+
import { useSlider } from '@mui/base';
|
|
5
|
+
import { useHover, useClasses, combineProps, useEventCallback } from '@ringcentral/spring-base';
|
|
6
|
+
import { useThemeProps, motionTransition } from '@ringcentral/spring-theme';
|
|
7
|
+
import './chunks/Icon.js';
|
|
8
|
+
import { u as useMotionSafeTransition } from './chunks/useMotionSafeTransition.js';
|
|
9
|
+
import { T as Tooltip } from './chunks/Tooltip.js';
|
|
10
|
+
import './chunks/usePrefersReducedMotion.js';
|
|
11
|
+
import 'clsx';
|
|
12
|
+
import './chunks/getFade.js';
|
|
13
|
+
import './Popper.js';
|
|
14
|
+
import '@floating-ui/react-dom';
|
|
15
|
+
import './chunks/Modal.js';
|
|
16
|
+
import './chunks/useFocusTrapStack.js';
|
|
17
|
+
import './chunks/Backdrop.js';
|
|
18
|
+
import './chunks/PopperPaper.js';
|
|
19
|
+
|
|
20
|
+
const valueToPercent = (value, min, max) => ((value - min) * 100) / (max - min);
|
|
21
|
+
|
|
22
|
+
const Identity = (x) => x;
|
|
23
|
+
const SliderThumb = (props) => {
|
|
24
|
+
const { value, min, max, axis, axisProps, focusVisible, valueLabelDisplay, valueLabelFormat, valueLabelTooltipProps, orientation, scale = Identity, classes, transition, dragging, 'aria-label': ariaLabel, 'aria-valuetext': ariaValuetext, getThumbProps, getAriaValueText, getHiddenInputProps, index, } = props;
|
|
25
|
+
const { hover, hoverHandlers } = useHover();
|
|
26
|
+
const thumbProps = getThumbProps(hoverHandlers);
|
|
27
|
+
const cls = useClasses('slider', classes);
|
|
28
|
+
const percent = valueToPercent(value, min, max);
|
|
29
|
+
const style = axisProps[axis].offset(percent);
|
|
30
|
+
const scaledValue = scale(value);
|
|
31
|
+
// Format value label for tooltip display
|
|
32
|
+
const valueLabel = typeof valueLabelFormat === 'function'
|
|
33
|
+
? valueLabelFormat(scaledValue)
|
|
34
|
+
: typeof valueLabelFormat === 'string'
|
|
35
|
+
? valueLabelFormat
|
|
36
|
+
: scaledValue;
|
|
37
|
+
// Calculate aria-valuetext
|
|
38
|
+
const ariaValueText = getAriaValueText
|
|
39
|
+
? getAriaValueText(scaledValue)
|
|
40
|
+
: typeof valueLabelFormat === 'function' ||
|
|
41
|
+
typeof valueLabelFormat === 'string'
|
|
42
|
+
? String(valueLabel)
|
|
43
|
+
: ariaValuetext;
|
|
44
|
+
return (jsxs(motion.div, { className: cls('thumb', `thumb-${orientation}`, {
|
|
45
|
+
focusVisible,
|
|
46
|
+
}), ...thumbProps, initial: false, animate: style, transition: transition, children: [jsx("span", { className: cls('thumb-inner') }), jsx(Tooltip, { open: valueLabelDisplay === 'on' ||
|
|
47
|
+
(valueLabelDisplay === 'auto' && (hover || focusVisible || dragging)), title: valueLabel, ...combineProps({
|
|
48
|
+
placement: orientation === 'vertical' ? 'left' : 'top',
|
|
49
|
+
className: cls('value-label', {
|
|
50
|
+
'show-on-hover-only': valueLabelDisplay === 'auto', // kept for backward compatibility
|
|
51
|
+
}),
|
|
52
|
+
classes: {
|
|
53
|
+
paper: cls('value-label-paper'),
|
|
54
|
+
paperContent: 'justify-center',
|
|
55
|
+
},
|
|
56
|
+
PopperProps: {
|
|
57
|
+
disablePortal: true,
|
|
58
|
+
autoUpdate: {
|
|
59
|
+
ancestorScroll: true,
|
|
60
|
+
ancestorResize: true,
|
|
61
|
+
elementResize: true,
|
|
62
|
+
animationFrame: true,
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
}, valueLabelTooltipProps), children: jsx("input", { "data-index": index, role: 'slider', "aria-label": ariaLabel, "aria-valuenow": scale(value), "aria-valuetext": ariaValueText, value: value, ...getHiddenInputProps() }) })] }));
|
|
66
|
+
};
|
|
67
|
+
SliderThumb.displayName = 'SuiSliderThumb';
|
|
68
|
+
|
|
69
|
+
var Slider$1 = {"sui-slider-root":"sui-slider-root","sui-disabled":"sui-disabled","sui-slider-thumb":"sui-slider-thumb","sui-slider-mark":"sui-slider-mark","sui-slider-mark-label":"sui-slider-mark-label","sui-slider-value-label-paper":"sui-slider-value-label-paper","sui-slider-show-color-at-rest":"sui-slider-show-color-at-rest","sui-slider-neutral":"sui-slider-neutral","sui-slider-success":"sui-slider-success","sui-slider-danger":"sui-slider-danger","sui-slider-warning":"sui-slider-warning","sui-slider-horizontal":"sui-slider-horizontal","sui-slider-vertical":"sui-slider-vertical","sui-slider-has-marks":"sui-slider-has-marks","sui-slider-rail":"sui-slider-rail","sui-slider-track":"sui-slider-track","sui-slider-rail-horizontal":"sui-slider-rail-horizontal","sui-slider-rail-vertical":"sui-slider-rail-vertical","sui-slider-track-horizontal":"sui-slider-track-horizontal","sui-slider-track-vertical":"sui-slider-track-vertical","sui-focus-visible":"sui-focus-visible","sui-slider-thumb-horizontal":"sui-slider-thumb-horizontal","sui-slider-thumb-vertical":"sui-slider-thumb-vertical","sui-slider-thumb-inner":"sui-slider-thumb-inner","sui-slider-marks":"sui-slider-marks","sui-slider-marks-horizontal":"sui-slider-marks-horizontal","sui-slider-marks-vertical":"sui-slider-marks-vertical","sui-slider-mark-container":"sui-slider-mark-container","sui-slider-mark-container-horizontal":"sui-slider-mark-container-horizontal","sui-slider-mark-container-vertical":"sui-slider-mark-container-vertical","sui-slider-mark-vertical":"sui-slider-mark-vertical","sui-slider-mark-horizontal":"sui-slider-mark-horizontal"};
|
|
70
|
+
|
|
71
|
+
const InnerSlider = (inProps, ref) => {
|
|
72
|
+
const props = useThemeProps({ props: inProps, name: 'Slider' });
|
|
73
|
+
const { classes, className, children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-valuetext': ariaValuetext, disabled = false, defaultValue, getAriaValueText, max = 100, min = 0, name, disableSwap, color = 'neutral', marks: marksProp = false, onChange, onChangeCommitted, onMouseDown, scale, step, tabIndex, valueLabelDisplay = 'off', valueLabelFormat, valueLabelTooltipProps, value: valueProp, shiftStep, orientation = 'horizontal', showColorAtRest = false, ...rest } = props;
|
|
74
|
+
const handleChange = useEventCallback((event, value, activeThumb) => {
|
|
75
|
+
onChange?.(event, value, activeThumb);
|
|
76
|
+
});
|
|
77
|
+
const { dragging, axisProps, getRootProps, getHiddenInputProps, getThumbProps, axis = orientation, focusedThumbIndex, values, trackOffset, trackLeap, marks, } = useSlider({
|
|
78
|
+
...props,
|
|
79
|
+
onChangeCommitted: onChangeCommitted,
|
|
80
|
+
marks: marksProp,
|
|
81
|
+
onChange: handleChange,
|
|
82
|
+
rootRef: ref,
|
|
83
|
+
orientation,
|
|
84
|
+
});
|
|
85
|
+
const cls = useClasses('slider', classes, className);
|
|
86
|
+
const hasMarks = marks.length > 0;
|
|
87
|
+
const isEmpty = values.every((value) => value === min);
|
|
88
|
+
const transition = useMotionSafeTransition(dragging ? motionTransition['instant'] : motionTransition['haste-01-fast']);
|
|
89
|
+
return (jsxs("span", { className: cls('root', color, orientation, {
|
|
90
|
+
disabled,
|
|
91
|
+
empty: isEmpty,
|
|
92
|
+
'has-marks': hasMarks,
|
|
93
|
+
'show-color-at-rest': showColorAtRest,
|
|
94
|
+
}), "aria-disabled": disabled, ...rest, ...getRootProps({
|
|
95
|
+
onMouseDown,
|
|
96
|
+
}), children: [jsx("span", { className: cls('rail', `rail-${orientation}`) }), jsx(motion.span, { className: cls('track', `track-${orientation}`, {
|
|
97
|
+
'track-empty': isEmpty,
|
|
98
|
+
}), initial: false, animate: {
|
|
99
|
+
...axisProps[axis].offset(trackOffset),
|
|
100
|
+
...axisProps[axis].leap(trackLeap),
|
|
101
|
+
}, transition: transition }), values.map((value, index) => (jsx(SliderThumb, { value: value, index: index, min: min, max: max, axis: axis, axisProps: axisProps, focusVisible: focusedThumbIndex === index, dragging: dragging, valueLabelDisplay: valueLabelDisplay, valueLabelFormat: valueLabelFormat, valueLabelTooltipProps: valueLabelTooltipProps, orientation: orientation, scale: scale, classes: classes, transition: transition, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, getThumbProps: getThumbProps, getAriaValueText: getAriaValueText, getHiddenInputProps: getHiddenInputProps }, `value-${index}`))), hasMarks && (jsx("span", { className: cls('marks', `marks-${orientation}`), children: marks.map((mark, index) => {
|
|
102
|
+
return (jsxs("span", { "data-index": index, className: cls('mark-container', `mark-container-${orientation}`), style: axisProps[axis].offset(valueToPercent(mark.value, min, max)), children: [jsx("span", { className: cls('mark', `mark-${orientation}`) }), mark.label &&
|
|
103
|
+
(typeof mark.label === 'string' ? (jsx("span", { className: cls('mark-label'), children: mark.label })) : (mark.label))] }, `${mark.value}`));
|
|
104
|
+
}) }))] }));
|
|
105
|
+
};
|
|
106
|
+
// forwardRef doesn't handle generic types well, so we need to cast through an intermediate variable
|
|
107
|
+
const Slider = forwardRef(InnerSlider);
|
|
108
|
+
Slider.displayName = 'SuiSlider';
|
|
109
|
+
|
|
110
|
+
export { Slider, Slider$1 as sliderStyle };
|
package/Snackbar.js
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { useWindowContext, useClasses, useTimeout } from '@ringcentral/spring-base';
|
|
2
|
+
import { useTheme, useThemeProps } from '@ringcentral/spring-theme';
|
|
3
|
+
import { useMemo, forwardRef, isValidElement, cloneElement } from 'react';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
import { Portal } from '@mui/base';
|
|
6
|
+
import { A as Alert } from './chunks/Alert.js';
|
|
7
|
+
import '@ringcentral/spring-icon';
|
|
8
|
+
import 'clsx';
|
|
9
|
+
import './chunks/Icon.js';
|
|
10
|
+
import './chunks/IconButtonLabel.js';
|
|
11
|
+
import './chunks/Squircle.js';
|
|
12
|
+
import './chunks/withTooltip.js';
|
|
13
|
+
import './chunks/Tooltip.js';
|
|
14
|
+
import 'framer-motion';
|
|
15
|
+
import './chunks/usePrefersReducedMotion.js';
|
|
16
|
+
import './chunks/getFade.js';
|
|
17
|
+
import './Popper.js';
|
|
18
|
+
import '@floating-ui/react-dom';
|
|
19
|
+
import './chunks/Modal.js';
|
|
20
|
+
import './chunks/useFocusTrapStack.js';
|
|
21
|
+
import './chunks/Backdrop.js';
|
|
22
|
+
import './chunks/PopperPaper.js';
|
|
23
|
+
|
|
24
|
+
const WRAPPER_ID = 'sui-snackbar-wrapper';
|
|
25
|
+
const useSnackbarWrapper = (className) => {
|
|
26
|
+
const { document } = useWindowContext();
|
|
27
|
+
const { scopeProps } = useTheme();
|
|
28
|
+
/**
|
|
29
|
+
* We must memoize the container otherwise other components that
|
|
30
|
+
* are a child of the wrapper which are conditionally rendered
|
|
31
|
+
* can throw a "Cannot update a component while rendering a different component" error.
|
|
32
|
+
*/
|
|
33
|
+
return useMemo(() => {
|
|
34
|
+
const container = document?.getElementById(WRAPPER_ID) ?? document?.createElement('div');
|
|
35
|
+
if (container) {
|
|
36
|
+
Object.entries({
|
|
37
|
+
class: className,
|
|
38
|
+
id: WRAPPER_ID,
|
|
39
|
+
}).forEach(([key, value]) => container.setAttribute(key, value));
|
|
40
|
+
// create one more div wrapper to wrap the container
|
|
41
|
+
if (document) {
|
|
42
|
+
const wrapper = document.createElement('div');
|
|
43
|
+
// Apply the scope props directly to the wrapper
|
|
44
|
+
Object.entries({
|
|
45
|
+
...scopeProps,
|
|
46
|
+
}).forEach(([key, value]) => {
|
|
47
|
+
/**
|
|
48
|
+
* Map the key to an attribute. scopeProps is set on a ReactElement so
|
|
49
|
+
* setting a key like className will automatically be set to class,
|
|
50
|
+
* but as we're mutating the DOM element directly we need to manually
|
|
51
|
+
* map the key name to the DOM attribute name.
|
|
52
|
+
*/
|
|
53
|
+
let attribute = key;
|
|
54
|
+
if (attribute === 'className') {
|
|
55
|
+
attribute = 'class';
|
|
56
|
+
}
|
|
57
|
+
wrapper.setAttribute(attribute, value);
|
|
58
|
+
});
|
|
59
|
+
wrapper?.appendChild(container);
|
|
60
|
+
document.body.appendChild(wrapper);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return container;
|
|
64
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
65
|
+
}, [className, scopeProps]);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
var SnackbarContent$1 = {"sui-snackbar-content-root":"sui-snackbar-content-root","sui-snackbar-content-icon":"sui-snackbar-content-icon","sui-snackbar-content-close":"sui-snackbar-content-close","sui-snackbar-content-action":"sui-snackbar-content-action","sui-snackbar-content-body":"sui-snackbar-content-body","sui-snackbar-content-info":"sui-snackbar-content-info","sui-snackbar-content-error":"sui-snackbar-content-error","sui-snackbar-content-warning":"sui-snackbar-content-warning","sui-snackbar-content-success":"sui-snackbar-content-success","sui-snackbar-content-neutral":"sui-snackbar-content-neutral"};
|
|
69
|
+
|
|
70
|
+
const SnackbarContent = forwardRef((inProps, ref) => {
|
|
71
|
+
const props = useThemeProps({ props: inProps, name: 'Snackbar' });
|
|
72
|
+
const { classes, className, severity = 'neutral', ...rest } = props;
|
|
73
|
+
const cls = useClasses('snackbar-content', classes, className);
|
|
74
|
+
return (jsx(Alert, { ref: ref, ...rest, severity: severity, className: cls('root'), classes: {
|
|
75
|
+
body: cls('body'),
|
|
76
|
+
icon: cls('icon'),
|
|
77
|
+
close: cls('close'),
|
|
78
|
+
action: cls('action'),
|
|
79
|
+
[severity]: cls(severity),
|
|
80
|
+
} }));
|
|
81
|
+
});
|
|
82
|
+
SnackbarContent.displayName = 'SuiSnackbarContent';
|
|
83
|
+
|
|
84
|
+
var Snackbar$1 = {"sui-snackbar-root":"sui-snackbar-root"};
|
|
85
|
+
|
|
86
|
+
const Snackbar = forwardRef((inProps, ref) => {
|
|
87
|
+
const props = useThemeProps({ props: inProps, name: 'Snackbar' });
|
|
88
|
+
const { onClose, classes, className, open = true, autoHideDuration = 5000, disablePortal, closeButton, children, ...rest } = props;
|
|
89
|
+
const cls = useClasses('snackbar', classes, className);
|
|
90
|
+
const wrapper = useSnackbarWrapper(cls('root'));
|
|
91
|
+
useTimeout(() => onClose?.(), open ? autoHideDuration : null);
|
|
92
|
+
const content = useMemo(() => {
|
|
93
|
+
if (!children)
|
|
94
|
+
return null;
|
|
95
|
+
const isSnackbarContent = isValidElement(children) && children.type === SnackbarContent;
|
|
96
|
+
if (!isSnackbarContent) {
|
|
97
|
+
return (jsx(SnackbarContent, { ...rest, classes: classes, className: className, ref: ref, onClose: closeButton ? onClose : undefined, children: children }));
|
|
98
|
+
}
|
|
99
|
+
return cloneElement(children, {
|
|
100
|
+
...rest,
|
|
101
|
+
classes,
|
|
102
|
+
className,
|
|
103
|
+
...(children.props || {}),
|
|
104
|
+
ref,
|
|
105
|
+
onClose: 'onClose' in children.props
|
|
106
|
+
? children.props.onClose
|
|
107
|
+
: closeButton
|
|
108
|
+
? onClose
|
|
109
|
+
: undefined,
|
|
110
|
+
});
|
|
111
|
+
}, [children, rest, classes, className, ref, onClose, closeButton]);
|
|
112
|
+
if (!open)
|
|
113
|
+
return null;
|
|
114
|
+
return (jsx(Portal, { container: wrapper, disablePortal: disablePortal, children: content }));
|
|
115
|
+
});
|
|
116
|
+
Snackbar.displayName = 'SuiSnackbar';
|
|
117
|
+
|
|
118
|
+
export { Snackbar, SnackbarContent, SnackbarContent$1 as snackbarContentStyles, Snackbar$1 as snackbarStyle, useSnackbarWrapper };
|
package/SortableList.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { SortableContext } from '@dnd-kit/sortable';
|
|
3
|
+
import { useThemeProps } from '@ringcentral/spring-theme';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
5
|
+
import { L as List } from './chunks/List.js';
|
|
6
|
+
import '@ringcentral/spring-base';
|
|
7
|
+
import './chunks/useListNavigation.js';
|
|
8
|
+
import 'tabbable';
|
|
9
|
+
|
|
10
|
+
const SortableList = forwardRef((inProps, ref) => {
|
|
11
|
+
const props = useThemeProps({ props: inProps, name: 'SortableList' });
|
|
12
|
+
const { children, data, ...rest } = props;
|
|
13
|
+
return (jsx(SortableContext, { items: data, children: jsx(List, { ...rest, ref: ref, children: data.map((itemData, index) => children(itemData, index)) }) }));
|
|
14
|
+
});
|
|
15
|
+
SortableList.displayName = 'SuiSortableList';
|
|
16
|
+
|
|
17
|
+
export { SortableList };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { useDndContext, KeyboardCode, useSensors, useSensor, PointerSensor, KeyboardSensor, DndContext } from '@dnd-kit/core';
|
|
2
|
+
import { ownerDocument } from '@ringcentral/spring-base';
|
|
3
|
+
import { useEffect } from 'react';
|
|
4
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
|
+
import { sortableKeyboardCoordinates } from '@dnd-kit/sortable';
|
|
6
|
+
export { arrayMove } from '@dnd-kit/sortable';
|
|
7
|
+
import { useThemeProps } from '@ringcentral/spring-theme';
|
|
8
|
+
|
|
9
|
+
const DndKeyboardBlocker = () => {
|
|
10
|
+
const { activeNode } = useDndContext();
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
if (activeNode) {
|
|
13
|
+
const externalDocument = ownerDocument(activeNode);
|
|
14
|
+
const listener = (e) => {
|
|
15
|
+
if (e.key === 'Tab') {
|
|
16
|
+
e.preventDefault();
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
externalDocument.addEventListener('keydown', listener);
|
|
20
|
+
return () => externalDocument.removeEventListener('keydown', listener);
|
|
21
|
+
}
|
|
22
|
+
return undefined;
|
|
23
|
+
}, [activeNode]);
|
|
24
|
+
return null;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const pointerSensorOpts = { activationConstraint: { distance: 10 } };
|
|
28
|
+
const keyboardSensorOpts = {
|
|
29
|
+
coordinateGetter: sortableKeyboardCoordinates,
|
|
30
|
+
keyboardCodes: {
|
|
31
|
+
start: [KeyboardCode.Space],
|
|
32
|
+
cancel: [KeyboardCode.Esc],
|
|
33
|
+
end: [KeyboardCode.Space, KeyboardCode.Enter],
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
const SortableListDndContext = (inProps) => {
|
|
37
|
+
const props = useThemeProps({
|
|
38
|
+
props: inProps,
|
|
39
|
+
name: 'SortableListDndContext',
|
|
40
|
+
});
|
|
41
|
+
const { children, ...rest } = props;
|
|
42
|
+
const sensors = useSensors(useSensor(PointerSensor, pointerSensorOpts), useSensor(KeyboardSensor, keyboardSensorOpts));
|
|
43
|
+
return (jsxs(DndContext, { sensors: sensors, ...rest, children: [jsx(DndKeyboardBlocker, {}), children] }));
|
|
44
|
+
};
|
|
45
|
+
SortableListDndContext.displayName = 'SortableListDndContext';
|
|
46
|
+
|
|
47
|
+
const useSortableListDndContext = useDndContext;
|
|
48
|
+
|
|
49
|
+
export { DndKeyboardBlocker, SortableListDndContext, useSortableListDndContext };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useSortable } from '@dnd-kit/sortable';
|
|
3
|
+
import { CSS } from '@dnd-kit/utilities';
|
|
4
|
+
import { useForkRef, combineProps } from '@ringcentral/spring-base';
|
|
5
|
+
import { forwardRef } from 'react';
|
|
6
|
+
import '@ringcentral/spring-theme';
|
|
7
|
+
import 'framer-motion';
|
|
8
|
+
import './chunks/Icon.js';
|
|
9
|
+
import { L as ListItem } from './chunks/ListItem.js';
|
|
10
|
+
import { useDndContext, DragOverlay } from '@dnd-kit/core';
|
|
11
|
+
import './chunks/Divider.js';
|
|
12
|
+
import './ListNavigation.js';
|
|
13
|
+
import './chunks/useListNavigation.js';
|
|
14
|
+
import 'tabbable';
|
|
15
|
+
import './VirtualizedList.js';
|
|
16
|
+
import 'react-virtuoso';
|
|
17
|
+
import './chunks/List.js';
|
|
18
|
+
import './chunks/useMotionSafeTransition.js';
|
|
19
|
+
import './chunks/usePrefersReducedMotion.js';
|
|
20
|
+
import './chunks/SlideIn.js';
|
|
21
|
+
import './chunks/getSlideIn.js';
|
|
22
|
+
|
|
23
|
+
const SortableListItem = forwardRef((props, ref) => {
|
|
24
|
+
const { style, children, dragId, role = 'listitem', ...rest } = props;
|
|
25
|
+
const { setNodeRef, setActivatorNodeRef, listeners, attributes, transform, transition, isDragging, isSorting, } = useSortable({
|
|
26
|
+
id: dragId,
|
|
27
|
+
attributes: {
|
|
28
|
+
tabIndex: -1,
|
|
29
|
+
role,
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
const handleRef = useForkRef(ref, setNodeRef, setActivatorNodeRef);
|
|
33
|
+
return (jsx(ListItem, { ...combineProps(combineProps(rest, {
|
|
34
|
+
onKeyDown: (e) => {
|
|
35
|
+
// prevent trigger keyboard navigation
|
|
36
|
+
if (isSorting &&
|
|
37
|
+
['End', 'Home', 'ArrowUp', 'ArrowDown'].includes(e.key)) {
|
|
38
|
+
e.preventDefault();
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
onKeyUp: (e) => {
|
|
42
|
+
if (e.target === e.currentTarget && e.key === ' ') {
|
|
43
|
+
e.preventDefault();
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
}), listeners), ...attributes, style: {
|
|
47
|
+
...style,
|
|
48
|
+
transform: CSS.Transform.toString(transform),
|
|
49
|
+
opacity: isDragging ? 0 : 1,
|
|
50
|
+
touchAction: 'none',
|
|
51
|
+
transition,
|
|
52
|
+
}, ref: handleRef, hoverable: !isSorting, children: children }));
|
|
53
|
+
});
|
|
54
|
+
SortableListItem.displayName = 'SuiSortableListItem';
|
|
55
|
+
|
|
56
|
+
const SortableListItemOverlay = forwardRef((props, ref) => {
|
|
57
|
+
const { children, OverlayProps, ...rest } = props;
|
|
58
|
+
const { active, activatorEvent } = useDndContext();
|
|
59
|
+
return (jsx(DragOverlay, { ...OverlayProps, style: {
|
|
60
|
+
pointerEvents: activatorEvent instanceof PointerEvent &&
|
|
61
|
+
activatorEvent.pointerType === 'mouse'
|
|
62
|
+
? 'none'
|
|
63
|
+
: 'auto',
|
|
64
|
+
touchAction: 'none',
|
|
65
|
+
}, children: active && (jsx(ListItem, { ...rest, ref: ref, dragged: true, tabIndex: undefined, children: typeof children === 'function' ? children(active.id) : children })) }));
|
|
66
|
+
});
|
|
67
|
+
SortableListItemOverlay.displayName = 'SortableListItemOverlay';
|
|
68
|
+
|
|
69
|
+
export { SortableListItem, SortableListItemOverlay };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useDndContext } from '@dnd-kit/core';
|
|
3
|
+
import { SortableContext } from '@dnd-kit/sortable';
|
|
4
|
+
import { useThemeProps } from '@ringcentral/spring-theme';
|
|
5
|
+
import { forwardRef, useMemo } from 'react';
|
|
6
|
+
import { VirtualizedList } from './VirtualizedList.js';
|
|
7
|
+
import '@ringcentral/spring-base';
|
|
8
|
+
import 'react-virtuoso';
|
|
9
|
+
import './chunks/List.js';
|
|
10
|
+
import './chunks/useListNavigation.js';
|
|
11
|
+
import 'tabbable';
|
|
12
|
+
|
|
13
|
+
const SortableVirtualizedList = forwardRef((inProps, ref) => {
|
|
14
|
+
const props = useThemeProps({
|
|
15
|
+
props: inProps,
|
|
16
|
+
name: 'SortableVirtualizedList',
|
|
17
|
+
});
|
|
18
|
+
const { children, data, ...rest } = props;
|
|
19
|
+
const { active } = useDndContext();
|
|
20
|
+
const keepInvisibleItems = useMemo(() => {
|
|
21
|
+
return active
|
|
22
|
+
? [
|
|
23
|
+
data.findIndex((value) => {
|
|
24
|
+
if (typeof value === 'object') {
|
|
25
|
+
return value.id === active.id;
|
|
26
|
+
}
|
|
27
|
+
return value === active.id;
|
|
28
|
+
}),
|
|
29
|
+
]
|
|
30
|
+
: undefined;
|
|
31
|
+
}, [active, data]);
|
|
32
|
+
return (jsx(SortableContext, { items: data, children: jsx(VirtualizedList, { ...rest, data: data, keepInvisibleItems: keepInvisibleItems, computeItemKey: (_, item) => typeof item === 'object' ? item.id : item, ref: ref, children: (index, data) => children(data, index) }) }));
|
|
33
|
+
});
|
|
34
|
+
SortableVirtualizedList.displayName = 'SuiSortableVirtualizedList';
|
|
35
|
+
|
|
36
|
+
export { SortableVirtualizedList };
|
package/SplitButton.js
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import React, { forwardRef, useState, useRef, useEffect, useMemo, isValidElement } from 'react';
|
|
3
|
+
import { useEventCallback, useClasses, combineProps, logInDev } from '@ringcentral/spring-base';
|
|
4
|
+
import { useThemeProps } from '@ringcentral/spring-theme';
|
|
5
|
+
import clsx from 'clsx';
|
|
6
|
+
import { E as ExpandCollapseCaret } from './chunks/ExpandCollapseCaret.js';
|
|
7
|
+
import 'framer-motion';
|
|
8
|
+
import { I as Icon } from './chunks/Icon.js';
|
|
9
|
+
import { b as buttonIconSizeMap, B as Button } from './chunks/Button.js';
|
|
10
|
+
import { D as Divider } from './chunks/Divider.js';
|
|
11
|
+
import { I as IconButton } from './chunks/IconButtonLabel.js';
|
|
12
|
+
import { M as Menu } from './chunks/Menu.js';
|
|
13
|
+
import { M as MenuList } from './chunks/MenuList.js';
|
|
14
|
+
import './chunks/useMenuItemSelect.js';
|
|
15
|
+
import { u as useSelect } from './chunks/Select.js';
|
|
16
|
+
import { w as withTooltip } from './chunks/withTooltip.js';
|
|
17
|
+
import './chunks/useMotionSafeTransition.js';
|
|
18
|
+
import './chunks/usePrefersReducedMotion.js';
|
|
19
|
+
import '@mui/base';
|
|
20
|
+
import './chunks/CircularProgressIndicator.js';
|
|
21
|
+
import './chunks/Tooltip.js';
|
|
22
|
+
import './chunks/getFade.js';
|
|
23
|
+
import './Popper.js';
|
|
24
|
+
import '@floating-ui/react-dom';
|
|
25
|
+
import './chunks/Modal.js';
|
|
26
|
+
import './chunks/useFocusTrapStack.js';
|
|
27
|
+
import './chunks/Backdrop.js';
|
|
28
|
+
import './chunks/PopperPaper.js';
|
|
29
|
+
import './chunks/Squircle.js';
|
|
30
|
+
import './chunks/useNestedParentMenu.js';
|
|
31
|
+
import './chunks/Popover.js';
|
|
32
|
+
import './chunks/getGrow.js';
|
|
33
|
+
import './chunks/List.js';
|
|
34
|
+
import './chunks/useListNavigation.js';
|
|
35
|
+
import 'tabbable';
|
|
36
|
+
import './VirtualizedList.js';
|
|
37
|
+
import 'react-virtuoso';
|
|
38
|
+
import '@ringcentral/spring-icon';
|
|
39
|
+
import './chunks/useNestedMenuItem.js';
|
|
40
|
+
import './ListNavigation.js';
|
|
41
|
+
import './chunks/useHelperTextId.js';
|
|
42
|
+
import './chunks/VirtualizedMenu.js';
|
|
43
|
+
|
|
44
|
+
var SplitButton$1 = {"sui-split-button-root":"sui-split-button-root","sui-split-button-bg":"sui-split-button-bg","sui-button-outlined":"sui-button-outlined","sui-split-button-action-button-root":"sui-split-button-action-button-root","sui-focus-visible":"sui-focus-visible","sui-split-button-divider-contained-primary":"sui-split-button-divider-contained-primary","sui-split-button-divider-contained-danger":"sui-split-button-divider-contained-danger","sui-split-button-divider-contained-warning":"sui-split-button-divider-contained-warning","sui-split-button-divider-contained-success":"sui-split-button-divider-contained-success","sui-split-button-divider-contained-secondary":"sui-split-button-divider-contained-secondary","sui-split-button-divider-contained-neutral":"sui-split-button-divider-contained-neutral","sui-split-button-divider-inverted-primary":"sui-split-button-divider-inverted-primary","sui-split-button-divider-outlined-primary":"sui-split-button-divider-outlined-primary","sui-split-button-divider-inverted-danger":"sui-split-button-divider-inverted-danger","sui-split-button-divider-outlined-danger":"sui-split-button-divider-outlined-danger","sui-split-button-divider-inverted-warning":"sui-split-button-divider-inverted-warning","sui-split-button-divider-outlined-warning":"sui-split-button-divider-outlined-warning","sui-split-button-divider-inverted-success":"sui-split-button-divider-inverted-success","sui-split-button-divider-outlined-success":"sui-split-button-divider-outlined-success","sui-split-button-divider-inverted-secondary":"sui-split-button-divider-inverted-secondary","sui-split-button-divider-inverted-neutral":"sui-split-button-divider-inverted-neutral","sui-disabled":"sui-disabled","sui-split-button-divider-outlined-secondary":"sui-split-button-divider-outlined-secondary","sui-split-button-divider-outlined-neutral":"sui-split-button-divider-outlined-neutral","sui-split-button-divider-text":"sui-split-button-divider-text","sui-split-button-menu-button-root":"sui-split-button-menu-button-root"};
|
|
45
|
+
|
|
46
|
+
const ButtonVariantIconButtonVariantMap = {
|
|
47
|
+
contained: 'contained',
|
|
48
|
+
outlined: 'outlined',
|
|
49
|
+
text: 'icon',
|
|
50
|
+
inverted: 'inverted',
|
|
51
|
+
};
|
|
52
|
+
const ExpandCollapseCaretSizeMap = {
|
|
53
|
+
xlarge: 'large',
|
|
54
|
+
large: 'medium',
|
|
55
|
+
medium: 'small',
|
|
56
|
+
small: 'small',
|
|
57
|
+
xsmall: 'xsmall',
|
|
58
|
+
};
|
|
59
|
+
const SplitButton = withTooltip(forwardRef((inProps, ref) => {
|
|
60
|
+
const props = useThemeProps({ props: inProps, name: 'SplitButton' });
|
|
61
|
+
const { classes, className, size = 'medium', variant = 'contained', color, background = true, loading, disabled, MenuProps, ActionButtonProps: actionButtonPropsProp, MenuButtonProps: menuButtonPropsProp, children: childrenProp, ...rest } = props;
|
|
62
|
+
const [menuAnchorEl, setMenuAnchorEl] = useState(null);
|
|
63
|
+
const [open, setOpen] = useState(false);
|
|
64
|
+
const menuButtonRef = useRef(null);
|
|
65
|
+
const handleOpen = useEventCallback((newOpen) => {
|
|
66
|
+
setOpen(newOpen);
|
|
67
|
+
});
|
|
68
|
+
const { getButtonProps, getListboxProps } = useSelect({
|
|
69
|
+
open: false,
|
|
70
|
+
handleOpen,
|
|
71
|
+
});
|
|
72
|
+
const handleMenuClose = useEventCallback(() => {
|
|
73
|
+
handleOpen(false);
|
|
74
|
+
});
|
|
75
|
+
useEffect(() => {
|
|
76
|
+
setMenuAnchorEl(menuButtonRef.current);
|
|
77
|
+
}, []);
|
|
78
|
+
const cls = useClasses('split-button', classes, className);
|
|
79
|
+
const actionButtonCls = useClasses('button');
|
|
80
|
+
const menuButtonProps = combineProps({
|
|
81
|
+
variant: ButtonVariantIconButtonVariantMap[variant],
|
|
82
|
+
size,
|
|
83
|
+
color,
|
|
84
|
+
disabled,
|
|
85
|
+
background: false,
|
|
86
|
+
shape: 'rectangular',
|
|
87
|
+
classes: {
|
|
88
|
+
root: cls('menu-button-root', {
|
|
89
|
+
disabled,
|
|
90
|
+
active: open,
|
|
91
|
+
}),
|
|
92
|
+
},
|
|
93
|
+
}, menuButtonPropsProp);
|
|
94
|
+
const { actionButtonProps, menuItems } = useMemo(() => {
|
|
95
|
+
let _actionButtonProps = {};
|
|
96
|
+
const menuItems = [];
|
|
97
|
+
React.Children.forEach(childrenProp, (child, i) => {
|
|
98
|
+
if (!isValidElement(child) || child.type === React.Fragment) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
const childProps = child.props;
|
|
102
|
+
let hasIconChild = false;
|
|
103
|
+
if (i === 0) {
|
|
104
|
+
let actionButtonContent = actionButtonPropsProp?.title ??
|
|
105
|
+
childProps.title ??
|
|
106
|
+
childProps.children;
|
|
107
|
+
if (React.isValidElement(childProps.children) &&
|
|
108
|
+
childProps.children.type === Icon) {
|
|
109
|
+
hasIconChild = true;
|
|
110
|
+
actionButtonContent = React.cloneElement(childProps.children, {
|
|
111
|
+
size: buttonIconSizeMap[size],
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
_actionButtonProps = combineProps({
|
|
115
|
+
size,
|
|
116
|
+
variant,
|
|
117
|
+
color,
|
|
118
|
+
loading,
|
|
119
|
+
disabled,
|
|
120
|
+
background: false,
|
|
121
|
+
children: actionButtonContent,
|
|
122
|
+
onClick: childProps.onClick,
|
|
123
|
+
classes: {
|
|
124
|
+
root: clsx(cls('action-button-root'),
|
|
125
|
+
// Reduces the padding when only an icon is provided
|
|
126
|
+
actionButtonCls(hasIconChild && 'has-start-slot', hasIconChild && 'has-end-slot')),
|
|
127
|
+
},
|
|
128
|
+
}, actionButtonPropsProp);
|
|
129
|
+
if (process.env.NODE_ENV !== 'production' &&
|
|
130
|
+
_actionButtonProps.children === undefined) {
|
|
131
|
+
logInDev({
|
|
132
|
+
scope: 'SplitButton',
|
|
133
|
+
level: 'error',
|
|
134
|
+
message: 'The first MenuItem must either have children, a title prop or ActionButtonProps.title must be provided',
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
menuItems.push(React.cloneElement(child, {
|
|
140
|
+
...child.props,
|
|
141
|
+
...combineProps({
|
|
142
|
+
onClick: handleMenuClose,
|
|
143
|
+
}, {
|
|
144
|
+
onClick: childProps.onClick,
|
|
145
|
+
}),
|
|
146
|
+
key: `${i}`,
|
|
147
|
+
}));
|
|
148
|
+
});
|
|
149
|
+
return { actionButtonProps: _actionButtonProps, menuItems: menuItems };
|
|
150
|
+
}, [
|
|
151
|
+
childrenProp,
|
|
152
|
+
handleMenuClose,
|
|
153
|
+
actionButtonPropsProp,
|
|
154
|
+
size,
|
|
155
|
+
variant,
|
|
156
|
+
color,
|
|
157
|
+
loading,
|
|
158
|
+
disabled,
|
|
159
|
+
cls,
|
|
160
|
+
actionButtonCls,
|
|
161
|
+
]);
|
|
162
|
+
return (jsxs("div", { className: cls('root'), role: "group", ...rest, ref: ref, children: [jsx("div", { className: clsx(cls('bg'), actionButtonCls('root', variant, color, size, !background && 'hide-background', !background && `${variant}-hide-background`, `${variant}-${color}`, `${variant}-${size}`, {
|
|
163
|
+
loading,
|
|
164
|
+
disabled,
|
|
165
|
+
})) }), jsx(Button, { ...actionButtonProps }), jsx(Divider, { className: cls('divider', `divider-${variant}`, `divider-${variant}-${color}`, `divider-${color}`, {
|
|
166
|
+
disabled,
|
|
167
|
+
}), orientation: "vertical", flexItem: true }), jsx(IconButton, { ...combineProps(menuButtonProps, getButtonProps()), ref: menuButtonRef, children: jsx(ExpandCollapseCaret, { expanded: open, size: ExpandCollapseCaretSizeMap[size] }) }), menuAnchorEl && (jsx(Menu, { placement: "bottom", variant: "pointed", ...combineProps(MenuProps, {
|
|
168
|
+
onClose: handleMenuClose,
|
|
169
|
+
}), anchorEl: menuAnchorEl, open: open, children: jsx(MenuList, { nowrap: false, widget: "select", ...getListboxProps(), children: menuItems }) }))] }));
|
|
170
|
+
}));
|
|
171
|
+
SplitButton.displayName = 'SuiSplitButton';
|
|
172
|
+
|
|
173
|
+
export { SplitButton, SplitButton$1 as splitButtonStyle };
|
package/Squircle.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { S as Squircle } from './chunks/Squircle.js';
|
|
2
|
+
import 'react/jsx-runtime';
|
|
3
|
+
import 'react';
|
|
4
|
+
import '@ringcentral/spring-base';
|
|
5
|
+
import '@ringcentral/spring-theme';
|
|
6
|
+
|
|
7
|
+
var squircle = {"sui-squircle-root":"sui-squircle-root","sui-squircle-interactive":"sui-squircle-interactive","sui-active":"sui-active","sui-squircle-content":"sui-squircle-content","sui-squircle-ring":"sui-squircle-ring"};
|
|
8
|
+
|
|
9
|
+
export { squircle as squircleStyle };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { S as StatusIndicator } from './chunks/StatusIndicator.js';
|
|
2
|
+
import 'react/jsx-runtime';
|
|
3
|
+
import '@ringcentral/spring-base';
|
|
4
|
+
import '@ringcentral/spring-icon';
|
|
5
|
+
import '@ringcentral/spring-theme';
|
|
6
|
+
import './chunks/Icon.js';
|
|
7
|
+
import 'react';
|
|
8
|
+
|
|
9
|
+
var StatusIndicator = {"sui-status-indicator-root":"sui-status-indicator-root","sui-status-indicator-large":"sui-status-indicator-large","sui-status-indicator-medium":"sui-status-indicator-medium","sui-status-indicator-dnd":"sui-status-indicator-dnd","sui-status-indicator-busy":"sui-status-indicator-busy","sui-status-indicator-available":"sui-status-indicator-available","sui-status-indicator-unavailable":"sui-status-indicator-unavailable"};
|
|
10
|
+
|
|
11
|
+
export { StatusIndicator as statusIndicatorStyle };
|