@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/README.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# @ringcentral/spring-ui
|
|
2
|
+
|
|
3
|
+
Production-ready React component library built with Tailwind CSS.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Using yarn:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
yarn add @ringcentral/spring-ui
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Using npm:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm i @ringcentral/spring-ui
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Note: @ringcentral/spring-theme and @ringcentral/spring-base are included and re-exported by `@ringcentral/spring-ui`.
|
|
20
|
+
|
|
21
|
+
## Quick Start
|
|
22
|
+
|
|
23
|
+
```tsx
|
|
24
|
+
import React from 'react';
|
|
25
|
+
import { Button, ThemeProvider, suiLight } from '@ringcentral/spring-ui';
|
|
26
|
+
|
|
27
|
+
export default function App() {
|
|
28
|
+
return (
|
|
29
|
+
<ThemeProvider theme={suiLight}>
|
|
30
|
+
<Button variant="contained">Hello Spring</Button>
|
|
31
|
+
</ThemeProvider>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Prerequisite
|
|
37
|
+
|
|
38
|
+
Make sure Tailwind CSS is installed and configured with PostCSS in your project.
|
|
39
|
+
|
|
40
|
+
postcss.config.js:
|
|
41
|
+
```js
|
|
42
|
+
module.exports = {
|
|
43
|
+
plugins: {
|
|
44
|
+
tailwindcss: {},
|
|
45
|
+
autoprefixer: {},
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Global CSS (e.g., src/index.css or styles/globals.css):
|
|
51
|
+
```css
|
|
52
|
+
@tailwind base;
|
|
53
|
+
@tailwind components;
|
|
54
|
+
@tailwind utilities;
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
## Tailwind Setup
|
|
59
|
+
|
|
60
|
+
Add the Spring Tailwind plugin in your tailwind.config.js and include Spring UI in content scanning. See the `@ringcentral/spring-theme` README for full options.
|
|
61
|
+
|
|
62
|
+
```js
|
|
63
|
+
/** @type {import('tailwindcss').Config} */
|
|
64
|
+
module.exports = {
|
|
65
|
+
content: [
|
|
66
|
+
'./src/**/*.{js,ts,jsx,tsx}',
|
|
67
|
+
'node_modules/@ringcentral/spring-ui/**/*.js',
|
|
68
|
+
],
|
|
69
|
+
plugins: [require('@ringcentral/spring-theme/tailwind')],
|
|
70
|
+
};
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## License
|
|
74
|
+
|
|
75
|
+
MIT
|
|
76
|
+
|
package/Radio.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { useSwitch } from '@mui/base';
|
|
4
|
+
import { useClasses } from '@ringcentral/spring-base';
|
|
5
|
+
import { useThemeProps } from '@ringcentral/spring-theme';
|
|
6
|
+
import { u as useFormLabel } from './chunks/FormLabel.js';
|
|
7
|
+
import { u as useRadioGroup } from './chunks/RadioGroup.context.js';
|
|
8
|
+
|
|
9
|
+
var Radio$1 = {"sui-radio-root":"sui-radio-root","sui-focus-visible":"sui-focus-visible","sui-disabled":"sui-disabled","sui-radio-input":"sui-radio-input","sui-radio-dot":"sui-radio-dot","sui-checked":"sui-checked"};
|
|
10
|
+
|
|
11
|
+
const Radio = forwardRef((inProps, ref) => {
|
|
12
|
+
const props = useThemeProps({ props: inProps, name: 'Radio' });
|
|
13
|
+
const { name = '', classes, inputRef, rootProps, inputProps, className: rootClass, ...rest } = props;
|
|
14
|
+
const cls = useClasses('radio', classes, rootClass);
|
|
15
|
+
const { disabled, id, value } = useFormLabel({
|
|
16
|
+
value: rest.value,
|
|
17
|
+
id: inputProps?.id,
|
|
18
|
+
disabled: rest.disabled,
|
|
19
|
+
});
|
|
20
|
+
const { focusVisible, getInputProps, checked } = useSwitch(rest);
|
|
21
|
+
const { onChange, ...inputRest } = getInputProps({
|
|
22
|
+
role: undefined,
|
|
23
|
+
...inputProps,
|
|
24
|
+
});
|
|
25
|
+
const context = useRadioGroup({ name, value, checked, onChange });
|
|
26
|
+
return (jsxs("div", { ...rootProps, ref: ref, className: cls('root', {
|
|
27
|
+
disabled,
|
|
28
|
+
focusVisible,
|
|
29
|
+
checked: context.checked,
|
|
30
|
+
}), children: [jsx("span", { className: cls('dot') }), jsx("input", { ...inputRest, ...context, id: id, type: "radio", ref: inputRef, value: value, className: cls('input') })] }));
|
|
31
|
+
});
|
|
32
|
+
Radio.displayName = 'SuiRadio';
|
|
33
|
+
|
|
34
|
+
export { Radio, Radio$1 as radioStyle };
|
package/RadioGroup.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { R as RadioGroupContext, c as callbacksInSeries } from './chunks/RadioGroup.context.js';
|
|
2
|
+
export { u as useRadioGroup } from './chunks/RadioGroup.context.js';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
import { forwardRef, useMemo } from 'react';
|
|
5
|
+
import { useControlled, useClasses } from '@ringcentral/spring-base';
|
|
6
|
+
import { useThemeProps } from '@ringcentral/spring-theme';
|
|
7
|
+
|
|
8
|
+
var RadioGroup$1 = {"sui-radio-group-root":"sui-radio-group-root","sui-radio-group-row":"sui-radio-group-row"};
|
|
9
|
+
|
|
10
|
+
const RadioGroup = forwardRef((inProps, ref) => {
|
|
11
|
+
const props = useThemeProps({ props: inProps, name: 'RadioGroup' });
|
|
12
|
+
const { row, classes, className, children, value: controlled, name, defaultValue, onChange, ...rest } = props;
|
|
13
|
+
const [value, setValue] = useControlled({
|
|
14
|
+
name,
|
|
15
|
+
controlled,
|
|
16
|
+
default: defaultValue,
|
|
17
|
+
});
|
|
18
|
+
const radioGroupContext = useMemo(() => {
|
|
19
|
+
const handleChange = callbacksInSeries(onChange, (e) => {
|
|
20
|
+
setValue(e.target.value);
|
|
21
|
+
});
|
|
22
|
+
return { name, value, onChange: handleChange };
|
|
23
|
+
}, [name, value, setValue, onChange]);
|
|
24
|
+
const cls = useClasses('radio-group', classes, className);
|
|
25
|
+
return (jsx("div", { ...rest, ref: ref, role: "radiogroup", className: cls('root', { row }), children: jsx(RadioGroupContext.Provider, { value: radioGroupContext, children: children }) }));
|
|
26
|
+
});
|
|
27
|
+
RadioGroup.displayName = 'SuiRadioGroup';
|
|
28
|
+
|
|
29
|
+
export { RadioGroup, RadioGroupContext, callbacksInSeries, RadioGroup$1 as radioGroupStyle };
|
package/Rating.js
ADDED
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef, cloneElement, useState, useRef, useMemo } from 'react';
|
|
3
|
+
import clamp from 'lodash/clamp';
|
|
4
|
+
import { useId, useClasses, useControlled, useIsFocusVisible, useForkRef } from '@ringcentral/spring-base';
|
|
5
|
+
import { useThemeProps } from '@ringcentral/spring-theme';
|
|
6
|
+
import { S as Squircle } from './chunks/Squircle.js';
|
|
7
|
+
import { StarFilledMd, StarMd } from '@ringcentral/spring-icon';
|
|
8
|
+
import { I as Icon } from './chunks/Icon.js';
|
|
9
|
+
|
|
10
|
+
function getDecimalPrecision(num) {
|
|
11
|
+
const decimalPart = num.toString().split('.')[1];
|
|
12
|
+
return decimalPart ? decimalPart.length : 0;
|
|
13
|
+
}
|
|
14
|
+
function roundValueToPrecision(value, precision) {
|
|
15
|
+
if (value === null) {
|
|
16
|
+
return value;
|
|
17
|
+
}
|
|
18
|
+
const nearest = Math.round(value / precision) * precision;
|
|
19
|
+
return Number(nearest.toFixed(getDecimalPrecision(precision)));
|
|
20
|
+
}
|
|
21
|
+
const defaultIcon = jsx(Icon, { symbol: StarFilledMd, size: "large" });
|
|
22
|
+
const defaultEmptyIcon = jsx(Icon, { symbol: StarMd, size: "large" });
|
|
23
|
+
function defaultLabelText(value) {
|
|
24
|
+
return `${value || '0'} Star${value !== 1 ? 's' : ''}`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const RatingItem = forwardRef((inProps, ref) => {
|
|
28
|
+
const { classes, disabled, emptyIcon = defaultEmptyIcon, getLabelText = defaultLabelText, icon = defaultIcon, IconContainerComponent = 'div', size = 'large', focus, highlightSelectedOnly, hover, isActive, focusVisible, itemValue, name, onBlur, onChange, onClick, onFocus, readOnly, ratingValue, className, ratingValueRounded, style, } = inProps;
|
|
29
|
+
const isFilled = highlightSelectedOnly
|
|
30
|
+
? itemValue === ratingValue
|
|
31
|
+
: ratingValue && itemValue <= ratingValue;
|
|
32
|
+
const isFocused = itemValue <= focus;
|
|
33
|
+
const isChecked = itemValue === ratingValueRounded;
|
|
34
|
+
const id = useId();
|
|
35
|
+
const cls = useClasses('rating', classes, className);
|
|
36
|
+
const renderedIcon = emptyIcon && !isFilled ? emptyIcon : icon;
|
|
37
|
+
const container = (jsx("div", { className: cls('icon', {
|
|
38
|
+
'icon-empty': !isFilled,
|
|
39
|
+
'icon-filled': !!isFilled,
|
|
40
|
+
'icon-focus': isFocused,
|
|
41
|
+
'icon-active': isActive,
|
|
42
|
+
}), children: size
|
|
43
|
+
? cloneElement(renderedIcon, {
|
|
44
|
+
size,
|
|
45
|
+
})
|
|
46
|
+
: renderedIcon }));
|
|
47
|
+
if (readOnly) {
|
|
48
|
+
return (jsx("span", { style: style, className: cls('read-only'), children: jsx(IconContainerComponent, { className: cls('label-container'), children: container }) }));
|
|
49
|
+
}
|
|
50
|
+
return (jsxs(Fragment, { children: [jsxs("label", { ref: ref, htmlFor: id, className: cls('label', {
|
|
51
|
+
disabled,
|
|
52
|
+
focusVisible,
|
|
53
|
+
}), style: style, children: [jsxs(IconContainerComponent, { className: cls('label-container'), children: [jsx(Squircle, { classes: {
|
|
54
|
+
content: cls('squircle-content'),
|
|
55
|
+
}, interactive: true, focusVisible: isActive && focusVisible, className: cls('squircle', {
|
|
56
|
+
'icon-hover': Math.ceil(hover) === itemValue,
|
|
57
|
+
}) }), container] }), jsx("span", { className: cls('visually-hidden'), children: getLabelText(itemValue) })] }), jsx("input", { className: cls('visually-hidden'), onFocus: onFocus, onBlur: onBlur, onChange: onChange, onClick: onClick, disabled: disabled, value: itemValue, id: id, type: "radio", name: name, checked: isChecked })] }));
|
|
58
|
+
});
|
|
59
|
+
RatingItem.displayName = 'SuiRatingItem';
|
|
60
|
+
|
|
61
|
+
var Rating$1 = {"sui-rating-root":"sui-rating-root","sui-disabled":"sui-disabled","sui-rating-icon-empty":"sui-rating-icon-empty","sui-rating-squircle":"sui-rating-squircle","sui-rating-squircle-content":"sui-rating-squircle-content","sui-rating-icon-hover":"sui-rating-icon-hover","sui-active":"sui-active","sui-rating-read-only":"sui-rating-read-only","sui-rating-decimal":"sui-rating-decimal","sui-rating-label":"sui-rating-label","sui-rating-label-container":"sui-rating-label-container","sui-rating-label-empty-value":"sui-rating-label-empty-value","sui-rating-empty-value-focused":"sui-rating-empty-value-focused","sui-rating-visually-hidden":"sui-rating-visually-hidden","sui-rating-icon":"sui-rating-icon","sui-rating-icon-filled":"sui-rating-icon-filled"};
|
|
62
|
+
|
|
63
|
+
const Rating = forwardRef((inProps, ref) => {
|
|
64
|
+
const props = useThemeProps({ name: 'Rating', props: inProps });
|
|
65
|
+
const { className, classes, defaultValue = null, disabled = false, emptyLabelText = 'Empty', highlightSelectedOnly = false, icon, max = 5, name: nameProp, onChange, onChangeActive, onMouseLeave, onMouseMove, precision = 1, readOnly = false, emptyIcon, getLabelText = defaultLabelText, IconContainerComponent, value: valueProp, size, ...rest } = props;
|
|
66
|
+
const name = useId(nameProp);
|
|
67
|
+
const [valueDerived, setValueState] = useControlled({
|
|
68
|
+
controlled: valueProp,
|
|
69
|
+
default: defaultValue,
|
|
70
|
+
name: 'SuiRating',
|
|
71
|
+
});
|
|
72
|
+
const valueRounded = roundValueToPrecision(valueDerived, precision);
|
|
73
|
+
const [{ hover, focus }, setState] = useState({
|
|
74
|
+
hover: -1,
|
|
75
|
+
focus: -1,
|
|
76
|
+
});
|
|
77
|
+
let value = valueRounded;
|
|
78
|
+
if (hover !== -1) {
|
|
79
|
+
value = hover;
|
|
80
|
+
}
|
|
81
|
+
if (focus !== -1) {
|
|
82
|
+
value = focus;
|
|
83
|
+
}
|
|
84
|
+
const { isFocusVisibleRef, onBlur: handleBlurVisible, onFocus: handleFocusVisible, ref: focusVisibleRef, } = useIsFocusVisible();
|
|
85
|
+
const [focusVisible, setFocusVisible] = useState(false);
|
|
86
|
+
const rootRef = useRef();
|
|
87
|
+
const handleRef = useForkRef(focusVisibleRef, rootRef, ref);
|
|
88
|
+
const handleMouseMove = (event) => {
|
|
89
|
+
if (onMouseMove) {
|
|
90
|
+
onMouseMove(event);
|
|
91
|
+
}
|
|
92
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
93
|
+
const rootNode = rootRef.current;
|
|
94
|
+
const { right, left, width: containerWidth, } = rootNode.getBoundingClientRect();
|
|
95
|
+
let percent;
|
|
96
|
+
{
|
|
97
|
+
percent = (event.clientX - left) / containerWidth;
|
|
98
|
+
}
|
|
99
|
+
let newHover = roundValueToPrecision(max * percent + precision / 2, precision);
|
|
100
|
+
newHover = clamp(newHover, precision, max);
|
|
101
|
+
setState((prev) => prev.hover === newHover && prev.focus === newHover
|
|
102
|
+
? prev
|
|
103
|
+
: {
|
|
104
|
+
hover: newHover,
|
|
105
|
+
focus: newHover,
|
|
106
|
+
});
|
|
107
|
+
setFocusVisible(false);
|
|
108
|
+
if (onChangeActive && hover !== newHover) {
|
|
109
|
+
onChangeActive(event, newHover);
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
const handleMouseLeave = (event) => {
|
|
113
|
+
if (onMouseLeave) {
|
|
114
|
+
onMouseLeave(event);
|
|
115
|
+
}
|
|
116
|
+
const newHover = -1;
|
|
117
|
+
setState({
|
|
118
|
+
hover: newHover,
|
|
119
|
+
focus: newHover,
|
|
120
|
+
});
|
|
121
|
+
if (onChangeActive && hover !== newHover) {
|
|
122
|
+
onChangeActive(event, newHover);
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
const handleChange = (event) => {
|
|
126
|
+
let newValue = event.target.value === '' ? null : parseFloat(event.target.value);
|
|
127
|
+
// Give mouse priority over keyboard
|
|
128
|
+
// Fix https://github.com/mui/material-ui/issues/22827
|
|
129
|
+
if (hover !== -1) {
|
|
130
|
+
newValue = hover;
|
|
131
|
+
}
|
|
132
|
+
setValueState(newValue);
|
|
133
|
+
if (onChange) {
|
|
134
|
+
onChange(event, newValue);
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
const handleClear = (event) => {
|
|
138
|
+
// Ignore keyboard events
|
|
139
|
+
// https://github.com/facebook/react/issues/7407
|
|
140
|
+
if (event.clientX === 0 && event.clientY === 0) {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
setState({
|
|
144
|
+
hover: -1,
|
|
145
|
+
focus: -1,
|
|
146
|
+
});
|
|
147
|
+
setValueState(null);
|
|
148
|
+
if (onChange &&
|
|
149
|
+
parseFloat(event.target.value) === valueRounded) {
|
|
150
|
+
onChange(event, null);
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
const handleFocus = (event) => {
|
|
154
|
+
handleFocusVisible(event);
|
|
155
|
+
if (isFocusVisibleRef.current === true) {
|
|
156
|
+
setFocusVisible(true);
|
|
157
|
+
}
|
|
158
|
+
const newFocus = parseFloat(event.target.value);
|
|
159
|
+
setState((prev) => ({
|
|
160
|
+
hover: prev.hover,
|
|
161
|
+
focus: newFocus,
|
|
162
|
+
}));
|
|
163
|
+
};
|
|
164
|
+
const handleBlur = (event) => {
|
|
165
|
+
if (hover !== -1) {
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
handleBlurVisible(event);
|
|
169
|
+
if (isFocusVisibleRef.current === false) {
|
|
170
|
+
setFocusVisible(false);
|
|
171
|
+
}
|
|
172
|
+
const newFocus = -1;
|
|
173
|
+
setState((prev) => ({
|
|
174
|
+
hover: prev.hover,
|
|
175
|
+
focus: newFocus,
|
|
176
|
+
}));
|
|
177
|
+
};
|
|
178
|
+
const [emptyValueFocused, setEmptyValueFocused] = useState(false);
|
|
179
|
+
const cls = useClasses('rating', classes, className);
|
|
180
|
+
const ratingValues = useMemo(() => Array.from(new Array(max)), [max]);
|
|
181
|
+
return (jsxs("div", { ref: handleRef, onMouseMove: handleMouseMove, onMouseLeave: handleMouseLeave, className: cls('root', {
|
|
182
|
+
'read-only': readOnly,
|
|
183
|
+
disabled,
|
|
184
|
+
}), role: readOnly ? 'img' : undefined, "aria-label": readOnly ? getLabelText(value) : undefined, ...rest, children: [ratingValues.map((_, index) => {
|
|
185
|
+
const itemValue = index + 1;
|
|
186
|
+
const ratingItemProps = {
|
|
187
|
+
classes,
|
|
188
|
+
disabled,
|
|
189
|
+
emptyIcon,
|
|
190
|
+
focus,
|
|
191
|
+
highlightSelectedOnly,
|
|
192
|
+
hover,
|
|
193
|
+
icon,
|
|
194
|
+
name,
|
|
195
|
+
ratingValue: value,
|
|
196
|
+
ratingValueRounded: valueRounded,
|
|
197
|
+
readOnly,
|
|
198
|
+
size,
|
|
199
|
+
focusVisible,
|
|
200
|
+
getLabelText,
|
|
201
|
+
IconContainerComponent,
|
|
202
|
+
onBlur: handleBlur,
|
|
203
|
+
onChange: handleChange,
|
|
204
|
+
onClick: handleClear,
|
|
205
|
+
onFocus: handleFocus,
|
|
206
|
+
};
|
|
207
|
+
const isActive = itemValue === Math.ceil(value) &&
|
|
208
|
+
(hover !== -1 || focus !== -1);
|
|
209
|
+
if (precision < 1) {
|
|
210
|
+
const items = Array.from(new Array(1 / precision));
|
|
211
|
+
return (jsx("div", { className: cls('decimal', {
|
|
212
|
+
'icon-active': isActive,
|
|
213
|
+
focusVisible,
|
|
214
|
+
}), children: items.map(($, indexDecimal) => {
|
|
215
|
+
const itemDecimalValue = roundValueToPrecision(itemValue - 1 + (indexDecimal + 1) * precision, precision);
|
|
216
|
+
return (jsx(RatingItem, { ...ratingItemProps, isActive: isActive && Math.ceil(focus) === itemDecimalValue, itemValue: itemDecimalValue, style: items.length - 1 === indexDecimal
|
|
217
|
+
? undefined
|
|
218
|
+
: {
|
|
219
|
+
width: itemDecimalValue === value
|
|
220
|
+
? `${(indexDecimal + 1) * precision * 100}%`
|
|
221
|
+
: '0%',
|
|
222
|
+
overflow: 'hidden',
|
|
223
|
+
position: 'absolute',
|
|
224
|
+
zIndex: 1,
|
|
225
|
+
} }, itemDecimalValue));
|
|
226
|
+
}) }, itemValue));
|
|
227
|
+
}
|
|
228
|
+
return (jsx(RatingItem, { ...ratingItemProps, isActive: isActive, itemValue: itemValue }, itemValue));
|
|
229
|
+
}), !readOnly && !disabled && (jsxs("label", { className: cls('label', 'label-empty-value', {
|
|
230
|
+
'empty-value-focused': emptyValueFocused,
|
|
231
|
+
}), children: [jsx("input", { className: cls('visually-hidden'), value: "", id: `${name}-empty`, type: "radio", name: name, checked: valueRounded == null, onFocus: () => setEmptyValueFocused(true), onBlur: () => setEmptyValueFocused(false), onChange: handleChange }), jsx("span", { className: cls('visually-hidden'), children: emptyLabelText })] }))] }));
|
|
232
|
+
});
|
|
233
|
+
Rating.displayName = 'SuiRating';
|
|
234
|
+
|
|
235
|
+
export { Rating, RatingItem, defaultEmptyIcon, defaultIcon, defaultLabelText, Rating$1 as ratingStyle, roundValueToPrecision };
|
package/Select.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export { S as Select, u as useSelect } from './chunks/Select.js';
|
|
2
|
+
import 'react/jsx-runtime';
|
|
3
|
+
import 'react';
|
|
4
|
+
import '@ringcentral/spring-base';
|
|
5
|
+
import '@ringcentral/spring-theme';
|
|
6
|
+
import './chunks/ExpandCollapseCaret.js';
|
|
7
|
+
import 'framer-motion';
|
|
8
|
+
import './chunks/Icon.js';
|
|
9
|
+
import './chunks/useMotionSafeTransition.js';
|
|
10
|
+
import './chunks/usePrefersReducedMotion.js';
|
|
11
|
+
import './chunks/getGrow.js';
|
|
12
|
+
import './chunks/useHelperTextId.js';
|
|
13
|
+
import 'clsx';
|
|
14
|
+
import './chunks/Menu.js';
|
|
15
|
+
import './chunks/useNestedParentMenu.js';
|
|
16
|
+
import './chunks/Popover.js';
|
|
17
|
+
import '@floating-ui/react-dom';
|
|
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/useMenuItemSelect.js';
|
|
26
|
+
import '@ringcentral/spring-icon';
|
|
27
|
+
import './chunks/useNestedMenuItem.js';
|
|
28
|
+
import './VirtualizedList.js';
|
|
29
|
+
import 'react-virtuoso';
|
|
30
|
+
import './chunks/List.js';
|
|
31
|
+
import './chunks/useListNavigation.js';
|
|
32
|
+
import 'tabbable';
|
|
33
|
+
import './ListNavigation.js';
|
|
34
|
+
import './chunks/MenuList.js';
|
|
35
|
+
import './chunks/Squircle.js';
|
|
36
|
+
import './chunks/VirtualizedMenu.js';
|
|
37
|
+
|
|
38
|
+
var Select = {"sui-select-chevron":"sui-select-chevron","sui-select-placeholder":"sui-select-placeholder","sui-select-value":"sui-select-value","sui-select-error":"sui-select-error","sui-select-selector":"sui-select-selector","sui-select-menu":"sui-select-menu","sui-select-native-input":"sui-select-native-input","sui-select-content":"sui-select-content","sui-select-outlined-selector-xlarge":"sui-select-outlined-selector-xlarge","sui-select-contained-selector-xlarge":"sui-select-contained-selector-xlarge","sui-select-outlined-selector-large":"sui-select-outlined-selector-large","sui-select-contained-selector-large":"sui-select-contained-selector-large","sui-select-outlined-selector-medium":"sui-select-outlined-selector-medium","sui-select-contained-selector-medium":"sui-select-contained-selector-medium","sui-select-outlined-selector":"sui-select-outlined-selector","sui-select-contained-selector":"sui-select-contained-selector","sui-expanded":"sui-expanded","sui-select-standard-selector":"sui-select-standard-selector","sui-select-root":"sui-select-root","sui-disabled":"sui-disabled"};
|
|
39
|
+
|
|
40
|
+
export { Select as selectStyle };
|
package/SingleFilter.js
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef, useState, useEffect } from 'react';
|
|
3
|
+
import { useButton } from '@mui/base';
|
|
4
|
+
import { useClasses, useControlled } from '@ringcentral/spring-base';
|
|
5
|
+
import { useThemeProps } from '@ringcentral/spring-theme';
|
|
6
|
+
import { E as ExpandCollapseCaret } from './chunks/ExpandCollapseCaret.js';
|
|
7
|
+
import 'framer-motion';
|
|
8
|
+
import './chunks/Icon.js';
|
|
9
|
+
import { I as IconButton } from './chunks/IconButtonLabel.js';
|
|
10
|
+
import { M as Menu } from './chunks/Menu.js';
|
|
11
|
+
import { M as MenuItem } from './chunks/useMenuItemSelect.js';
|
|
12
|
+
import 'tabbable';
|
|
13
|
+
import './chunks/useListNavigation.js';
|
|
14
|
+
import './VirtualizedList.js';
|
|
15
|
+
import { M as MenuItemText } from './chunks/MenuItemText.js';
|
|
16
|
+
import { M as MenuList } from './chunks/MenuList.js';
|
|
17
|
+
import './chunks/useMotionSafeTransition.js';
|
|
18
|
+
import './chunks/usePrefersReducedMotion.js';
|
|
19
|
+
import './chunks/Squircle.js';
|
|
20
|
+
import './chunks/withTooltip.js';
|
|
21
|
+
import './chunks/Tooltip.js';
|
|
22
|
+
import 'clsx';
|
|
23
|
+
import './chunks/getFade.js';
|
|
24
|
+
import './Popper.js';
|
|
25
|
+
import '@floating-ui/react-dom';
|
|
26
|
+
import './chunks/Modal.js';
|
|
27
|
+
import './chunks/useFocusTrapStack.js';
|
|
28
|
+
import './chunks/Backdrop.js';
|
|
29
|
+
import './chunks/PopperPaper.js';
|
|
30
|
+
import './chunks/useNestedParentMenu.js';
|
|
31
|
+
import './chunks/Popover.js';
|
|
32
|
+
import './chunks/getGrow.js';
|
|
33
|
+
import '@ringcentral/spring-icon';
|
|
34
|
+
import './chunks/useNestedMenuItem.js';
|
|
35
|
+
import './ListNavigation.js';
|
|
36
|
+
import 'react-virtuoso';
|
|
37
|
+
import './chunks/List.js';
|
|
38
|
+
|
|
39
|
+
var FilterButton$1 = {"sui-filter-button-root":"sui-filter-button-root","sui-focus-visible":"sui-focus-visible","sui-selected":"sui-selected","sui-disabled":"sui-disabled"};
|
|
40
|
+
|
|
41
|
+
const FilterButton = forwardRef((props, ref) => {
|
|
42
|
+
const { classes, title, className, children, onClick, value = children, selected, disabled, ...rest } = props;
|
|
43
|
+
const cls = useClasses('filter-button', classes, className);
|
|
44
|
+
const { getRootProps, focusVisible } = useButton({
|
|
45
|
+
...props,
|
|
46
|
+
rootRef: ref,
|
|
47
|
+
});
|
|
48
|
+
const handleClick = (event) => {
|
|
49
|
+
if (onClick) {
|
|
50
|
+
onClick(event, value);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
return (jsx("button", { className: cls('root', {
|
|
54
|
+
disabled,
|
|
55
|
+
focusVisible,
|
|
56
|
+
selected,
|
|
57
|
+
}), title: title || children, value: value, "aria-current": selected, ...rest, ...getRootProps(), onClick: handleClick, children: children.toUpperCase() }));
|
|
58
|
+
});
|
|
59
|
+
FilterButton.displayName = 'SuiFilterButton';
|
|
60
|
+
|
|
61
|
+
var SingleFilter$1 = {"sui-single-filter-root":"sui-single-filter-root","sui-single-filter-more":"sui-single-filter-more"};
|
|
62
|
+
|
|
63
|
+
const SingleFilter = forwardRef((inProps, ref) => {
|
|
64
|
+
const props = useThemeProps({ props: inProps, name: 'SingleFilter' });
|
|
65
|
+
const { classes, className, children, defaultValue, value: valueProp, defaultData, data: dataProp, onSelect, onDataChange, visibleCount = 2, MoreButtonProps, ...rest } = props;
|
|
66
|
+
const [anchor, setAnchor] = useState(null);
|
|
67
|
+
const cls = useClasses('single-filter', classes, className);
|
|
68
|
+
const [currentValue, setCurrentValue] = useControlled({
|
|
69
|
+
controlled: valueProp,
|
|
70
|
+
default: defaultValue,
|
|
71
|
+
name: 'SuiSingleFilter',
|
|
72
|
+
state: 'value',
|
|
73
|
+
});
|
|
74
|
+
const [data, setData] = useControlled({
|
|
75
|
+
controlled: dataProp,
|
|
76
|
+
default: defaultData,
|
|
77
|
+
name: 'SuiSingleFilter',
|
|
78
|
+
state: 'data',
|
|
79
|
+
});
|
|
80
|
+
const buttonsData = data.slice(0, visibleCount);
|
|
81
|
+
const menuItemsData = data.slice(visibleCount);
|
|
82
|
+
const closeMenu = () => setAnchor(null);
|
|
83
|
+
const filterButtonClickHandler = (value) => {
|
|
84
|
+
setCurrentValue(value);
|
|
85
|
+
onSelect && onSelect(value);
|
|
86
|
+
};
|
|
87
|
+
const menuItemClickHandler = (value, index) => {
|
|
88
|
+
closeMenu();
|
|
89
|
+
setCurrentValue(value);
|
|
90
|
+
onSelect && onSelect(value);
|
|
91
|
+
};
|
|
92
|
+
const updateFilterItemsOrder = (menuIndex) => {
|
|
93
|
+
const lastVisibleItem = buttonsData.slice(-1);
|
|
94
|
+
const selectedItem = menuItemsData.slice(menuIndex, menuIndex + 1);
|
|
95
|
+
const newData = [
|
|
96
|
+
...buttonsData.slice(0, buttonsData.length - 1),
|
|
97
|
+
...selectedItem,
|
|
98
|
+
...lastVisibleItem,
|
|
99
|
+
...menuItemsData.slice(0, menuIndex),
|
|
100
|
+
...menuItemsData.slice(menuIndex + 1),
|
|
101
|
+
].filter((item) => item !== undefined);
|
|
102
|
+
setData(newData);
|
|
103
|
+
onDataChange && onDataChange(newData);
|
|
104
|
+
};
|
|
105
|
+
useEffect(() => {
|
|
106
|
+
const menuIndex = menuItemsData.findIndex(({ value }) => value === currentValue);
|
|
107
|
+
if (menuIndex >= 0) {
|
|
108
|
+
updateFilterItemsOrder(menuIndex);
|
|
109
|
+
}
|
|
110
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
111
|
+
}, [currentValue, data, visibleCount]);
|
|
112
|
+
return (jsxs("div", { className: cls('root'), ...rest, ref: ref, children: [buttonsData.map(({ label, value, ...rest }) => {
|
|
113
|
+
return (jsx(FilterButton, { value: value, selected: currentValue === value, onClick: () => {
|
|
114
|
+
filterButtonClickHandler(value || label);
|
|
115
|
+
}, ...rest, children: label }, value || label));
|
|
116
|
+
}), menuItemsData.length > 0 && (jsxs(Fragment, { children: [jsx(IconButton, { shape: 'squircle', variant: "contained", size: "small", color: 'secondary', background: false, className: cls('more'), onClick: (e) => {
|
|
117
|
+
setAnchor((pre) => {
|
|
118
|
+
if (pre)
|
|
119
|
+
return null;
|
|
120
|
+
return e.currentTarget;
|
|
121
|
+
});
|
|
122
|
+
}, "aria-expanded": Boolean(anchor), ...MoreButtonProps, children: jsx(ExpandCollapseCaret, { orientation: "vertical", expanded: Boolean(anchor) }) }), jsx(Menu, { open: Boolean(anchor), anchorEl: anchor, onClose: closeMenu, children: jsx(MenuList, { children: menuItemsData.map(({ label, value, ...rest }, index) => {
|
|
123
|
+
return (jsx(MenuItem, { onClick: () => {
|
|
124
|
+
menuItemClickHandler(value || label);
|
|
125
|
+
}, ...rest, children: jsx(MenuItemText, { children: label }) }, value || label));
|
|
126
|
+
}) }) })] }))] }));
|
|
127
|
+
});
|
|
128
|
+
SingleFilter.displayName = 'SuiSingleFilter';
|
|
129
|
+
|
|
130
|
+
export { FilterButton, SingleFilter, FilterButton$1 as filterButtonStyle, SingleFilter$1 as singleFilterStyle };
|
package/Skeleton.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
import { S as Squircle } from './chunks/Squircle.js';
|
|
6
|
+
|
|
7
|
+
var Skeleton$1 = {"sui-skeleton-circular":"sui-skeleton-circular","sui-skeleton-squircle":"sui-skeleton-squircle","sui-skeleton-rectangular":"sui-skeleton-rectangular","sui-skeleton-text":"sui-skeleton-text"};
|
|
8
|
+
|
|
9
|
+
const Skeleton = forwardRef((inProps, ref) => {
|
|
10
|
+
const props = useThemeProps({ props: inProps, name: 'Skeleton' });
|
|
11
|
+
const { classes, className, children, variant, ...rest } = props;
|
|
12
|
+
const cls = useClasses('skeleton', classes, className);
|
|
13
|
+
const SkeletonShape = variant === 'squircle' ? Squircle : 'div';
|
|
14
|
+
const squircleProps = {};
|
|
15
|
+
if (variant === 'squircle') {
|
|
16
|
+
squircleProps.interactive = false;
|
|
17
|
+
}
|
|
18
|
+
return (jsx(SkeletonShape, { className: cls('root', variant), ...rest, ...squircleProps, ref: ref, children: variant === 'text' ? jsx("span", { children: '\u00A0' }) : null }));
|
|
19
|
+
});
|
|
20
|
+
Skeleton.displayName = 'SuiSkeleton';
|
|
21
|
+
|
|
22
|
+
var SkeletonContainer$1 = {"sui-skeleton-container-root":"sui-skeleton-container-root","skeleton-wave":"skeleton-wave"};
|
|
23
|
+
|
|
24
|
+
const SkeletonContainer = forwardRef((inProps, ref) => {
|
|
25
|
+
const props = useThemeProps({ props: inProps, name: 'SkeletonContainer' });
|
|
26
|
+
const { component: SkeletonContainerRoot = 'div', classes, className, children, ...rest } = props;
|
|
27
|
+
const cls = useClasses('skeleton-container', classes, className);
|
|
28
|
+
return (jsx(SkeletonContainerRoot, { className: cls('root'), ...rest, ref: ref, children: children }));
|
|
29
|
+
});
|
|
30
|
+
SkeletonContainer.displayName = 'SuiSkeletonContainer';
|
|
31
|
+
|
|
32
|
+
export { Skeleton, SkeletonContainer, SkeletonContainer$1 as skeletonContainerStyle, Skeleton$1 as skeletonStyle };
|