rsuite 5.74.2 → 5.75.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/CHANGELOG.md +16 -0
- package/Card/package.json +7 -0
- package/Card/styles/index.css +105 -0
- package/Card/styles/index.less +62 -0
- package/CardBody/package.json +7 -0
- package/CardFooter/package.json +7 -0
- package/CardGroup/package.json +7 -0
- package/CardGroup/styles/index.css +7 -0
- package/CardGroup/styles/index.less +8 -0
- package/CardHeader/package.json +7 -0
- package/List/styles/index.css +10 -12
- package/List/styles/index.less +12 -4
- package/Stat/package.json +7 -0
- package/Stat/styles/index.css +1749 -0
- package/Stat/styles/index.less +106 -0
- package/StatGroup/package.json +7 -0
- package/StatGroup/styles/index.css +7 -0
- package/StatGroup/styles/index.less +8 -0
- package/StatHelpText/package.json +7 -0
- package/StatLabel/package.json +7 -0
- package/StatTrend/package.json +7 -0
- package/StatValue/package.json +7 -0
- package/StatValueUnit/package.json +7 -0
- package/cjs/Affix/Affix.js +2 -2
- package/cjs/Animation/Transition.js +7 -7
- package/cjs/AutoComplete/AutoComplete.js +7 -7
- package/cjs/Avatar/useImage.js +1 -1
- package/cjs/Breadcrumb/Breadcrumb.js +1 -1
- package/cjs/Calendar/Calendar.js +3 -3
- package/cjs/Calendar/CalendarContainer.js +1 -1
- package/cjs/Calendar/Grid/GridRow.js +3 -3
- package/cjs/Calendar/MonthDropdown/MonthDropdownItem.js +1 -1
- package/cjs/Calendar/TimeDropdown/TimeDropdown.js +3 -3
- package/cjs/Calendar/hooks/useCalendarState.js +6 -6
- package/cjs/Card/Card.d.ts +33 -0
- package/cjs/Card/Card.js +63 -0
- package/cjs/Card/CardBody.d.ts +4 -0
- package/cjs/Card/CardBody.js +11 -0
- package/cjs/Card/CardFooter.d.ts +4 -0
- package/cjs/Card/CardFooter.js +11 -0
- package/cjs/Card/CardHeader.d.ts +4 -0
- package/cjs/Card/CardHeader.js +11 -0
- package/cjs/Card/index.d.ts +6 -0
- package/cjs/Card/index.js +8 -0
- package/cjs/CardGroup/CardGroup.d.ts +13 -0
- package/cjs/CardGroup/CardGroup.js +47 -0
- package/cjs/CardGroup/index.d.ts +3 -0
- package/cjs/CardGroup/index.js +8 -0
- package/cjs/Carousel/Carousel.js +4 -4
- package/cjs/CascadeTree/CascadeTree.js +1 -1
- package/cjs/CascadeTree/TreeView.js +1 -1
- package/cjs/CascadeTree/hooks/useSearch.js +4 -4
- package/cjs/CascadeTree/hooks/useSelect.js +2 -2
- package/cjs/Cascader/Cascader.js +13 -13
- package/cjs/Cascader/useActive.js +4 -4
- package/cjs/CheckPicker/CheckPicker.js +5 -5
- package/cjs/CheckTree/CheckTree.js +1 -1
- package/cjs/CheckTree/CheckTreeNode.js +3 -3
- package/cjs/CheckTree/CheckTreeView.js +7 -7
- package/cjs/CheckTree/utils.js +3 -3
- package/cjs/CheckTreePicker/CheckTreePicker.js +2 -2
- package/cjs/CheckTreePicker/hooks/useFocusState.js +3 -3
- package/cjs/Checkbox/Checkbox.js +2 -2
- package/cjs/CheckboxGroup/CheckboxGroup.js +1 -1
- package/cjs/CustomProvider/FormattedNumber.d.ts +7 -0
- package/cjs/CustomProvider/FormattedNumber.js +19 -0
- package/cjs/CustomProvider/index.d.ts +1 -0
- package/cjs/CustomProvider/index.js +3 -1
- package/cjs/CustomProvider/types.d.ts +8 -0
- package/cjs/CustomProvider/useCustom.d.ts +1 -0
- package/cjs/CustomProvider/useCustom.js +3 -1
- package/cjs/DateInput/DateField.js +2 -2
- package/cjs/DateInput/DateInput.js +2 -2
- package/cjs/DateInput/hooks/useDateInputState.js +2 -2
- package/cjs/DateInput/hooks/useIsFocused.js +2 -2
- package/cjs/DateInput/hooks/useKeyboardInputEvent.js +5 -5
- package/cjs/DatePicker/DatePicker.js +14 -14
- package/cjs/DatePicker/PredefinedRanges.js +1 -1
- package/cjs/DatePicker/hooks/useFocus.js +1 -1
- package/cjs/DatePicker/hooks/useMonthView.js +1 -1
- package/cjs/DateRangeInput/DateRangeInput.js +4 -4
- package/cjs/DateRangePicker/DateRangePicker.js +8 -8
- package/cjs/DateRangePicker/hooks/useCalendarHandlers.js +5 -5
- package/cjs/Dropdown/Dropdown.js +3 -3
- package/cjs/Dropdown/DropdownItem.js +2 -2
- package/cjs/Dropdown/DropdownMenu.js +1 -1
- package/cjs/Form/Form.js +8 -8
- package/cjs/Form/hooks/useFormValidate.js +19 -19
- package/cjs/FormControl/FormControl.js +5 -5
- package/cjs/FormControl/hooks/useField.js +1 -1
- package/cjs/FormControl/hooks/useRegisterModel.js +2 -2
- package/cjs/InlineEdit/renderChildren.js +1 -1
- package/cjs/InlineEdit/useEditState.js +7 -7
- package/cjs/InlineEdit/useFocusEvent.js +5 -5
- package/cjs/Input/Input.js +3 -3
- package/cjs/InputGroup/InputGroup.js +2 -2
- package/cjs/InputNumber/InputNumber.js +3 -3
- package/cjs/InputPicker/InputAutosize.js +1 -1
- package/cjs/InputPicker/InputPicker.js +13 -13
- package/cjs/InputPicker/InputSearch.js +1 -1
- package/cjs/InputPicker/hooks/useData.js +1 -1
- package/cjs/InputPicker/hooks/useInput.js +2 -2
- package/cjs/List/List.d.ts +19 -1
- package/cjs/List/List.js +11 -7
- package/cjs/List/ListItem.d.ts +1 -1
- package/cjs/List/helper/useSortHelper.js +10 -10
- package/cjs/MaskedInput/TextMask.js +3 -3
- package/cjs/Message/Message.js +1 -1
- package/cjs/Modal/Modal.js +6 -6
- package/cjs/Modal/utils.js +2 -2
- package/cjs/MultiCascadeTree/SearchView.js +1 -1
- package/cjs/MultiCascadeTree/TreeView.js +1 -1
- package/cjs/MultiCascadeTree/hooks/useCascadeValue.js +5 -5
- package/cjs/MultiCascadeTree/hooks/useSearch.js +1 -1
- package/cjs/MultiCascadeTree/hooks/useSelect.js +1 -1
- package/cjs/MultiCascadeTree/utils.js +9 -9
- package/cjs/MultiCascader/MultiCascader.js +5 -5
- package/cjs/Nav/Nav.js +2 -2
- package/cjs/Nav/NavDropdown.js +3 -3
- package/cjs/Nav/NavDropdownItem.js +2 -2
- package/cjs/Nav/NavDropdownMenu.js +1 -1
- package/cjs/Nav/NavItem.js +3 -3
- package/cjs/Navbar/NavbarDropdown.js +3 -3
- package/cjs/Navbar/NavbarDropdownItem.js +4 -4
- package/cjs/Navbar/NavbarItem.js +3 -3
- package/cjs/Notification/Notification.js +1 -1
- package/cjs/Pagination/PaginationButton.js +1 -1
- package/cjs/Pagination/PaginationGroup.js +3 -3
- package/cjs/Panel/Panel.js +2 -2
- package/cjs/PanelGroup/PanelGroup.js +1 -1
- package/cjs/Placeholder/PlaceholderGrid.js +2 -2
- package/cjs/Placeholder/PlaceholderParagraph.js +1 -1
- package/cjs/Radio/Radio.js +2 -2
- package/cjs/RadioGroup/RadioGroup.js +1 -1
- package/cjs/RadioTile/RadioTile.js +2 -2
- package/cjs/RadioTileGroup/RadioTileGroup.js +1 -1
- package/cjs/RangeSlider/RangeSlider.js +5 -5
- package/cjs/Rate/Character.js +2 -2
- package/cjs/Rate/Rate.js +3 -3
- package/cjs/SafeAnchor/SafeAnchor.js +1 -1
- package/cjs/SelectPicker/SelectPicker.js +7 -7
- package/cjs/Sidebar/Sidebar.js +1 -1
- package/cjs/Sidenav/ExpandedSidenavDropdown.js +4 -4
- package/cjs/Sidenav/ExpandedSidenavDropdownItem.js +3 -3
- package/cjs/Sidenav/ExpandedSidenavDropdownMenu.js +2 -2
- package/cjs/Sidenav/Sidenav.js +1 -1
- package/cjs/Sidenav/SidenavDropdown.js +4 -4
- package/cjs/Sidenav/SidenavDropdownItem.js +2 -2
- package/cjs/Sidenav/SidenavDropdownMenu.js +1 -1
- package/cjs/Sidenav/SidenavItem.js +4 -4
- package/cjs/Sidenav/SidenavToggle.js +1 -1
- package/cjs/Slider/Graduated.js +1 -1
- package/cjs/Slider/Slider.js +3 -3
- package/cjs/Slider/useDrag.js +6 -6
- package/cjs/Stack/HStack.d.ts +6 -3
- package/cjs/Stack/HStack.js +1 -0
- package/cjs/Stack/Stack.d.ts +6 -2
- package/cjs/Stack/Stack.js +1 -1
- package/cjs/Stack/VStack.d.ts +6 -3
- package/cjs/Stack/VStack.js +1 -0
- package/cjs/Stat/Stat.d.ts +26 -0
- package/cjs/Stat/Stat.js +57 -0
- package/cjs/Stat/StatHelpText.d.ts +4 -0
- package/cjs/Stat/StatHelpText.js +11 -0
- package/cjs/Stat/StatLabel.d.ts +14 -0
- package/cjs/Stat/StatLabel.js +53 -0
- package/cjs/Stat/StatTrend.d.ts +7 -0
- package/cjs/Stat/StatTrend.js +68 -0
- package/cjs/Stat/StatValue.d.ts +7 -0
- package/cjs/Stat/StatValue.js +41 -0
- package/cjs/Stat/StatValueUnit.d.ts +4 -0
- package/cjs/Stat/StatValueUnit.js +11 -0
- package/cjs/Stat/index.d.ts +3 -0
- package/cjs/Stat/index.js +8 -0
- package/cjs/StatGroup/StatGroup.d.ts +13 -0
- package/cjs/StatGroup/StatGroup.js +47 -0
- package/cjs/StatGroup/index.d.ts +3 -0
- package/cjs/StatGroup/index.js +8 -0
- package/cjs/Tabs/Tabs.js +1 -1
- package/cjs/Timeline/Timeline.js +1 -1
- package/cjs/Toggle/Toggle.js +1 -1
- package/cjs/Tree/Tree.js +1 -1
- package/cjs/Tree/TreeNode.js +9 -9
- package/cjs/Tree/TreeView.js +7 -7
- package/cjs/Tree/hooks/useExpandTree.js +1 -1
- package/cjs/Tree/hooks/useFlattenTree.js +1 -1
- package/cjs/Tree/hooks/useFocusTree.js +6 -6
- package/cjs/Tree/hooks/useTreeDrag.js +17 -17
- package/cjs/Tree/hooks/useTreeSearch.js +1 -1
- package/cjs/Tree/utils/flattenTree.js +6 -6
- package/cjs/Tree/utils/focusableTree.js +6 -6
- package/cjs/Tree/utils/getNodeParentKeys.js +4 -4
- package/cjs/Tree/utils/treeKeyboardInteractions.js +2 -2
- package/cjs/TreePicker/TreePicker.js +5 -5
- package/cjs/TreePicker/hooks/useFocusState.js +4 -4
- package/cjs/Uploader/UploadFileItem.js +5 -5
- package/cjs/Uploader/UploadTrigger.js +11 -11
- package/cjs/Uploader/Uploader.js +16 -16
- package/cjs/Uploader/utils/ajaxUpload.js +5 -5
- package/cjs/index.d.ts +8 -0
- package/cjs/index.js +10 -2
- package/cjs/internals/Disclosure/Disclosure.js +3 -3
- package/cjs/internals/Disclosure/DisclosureButton.js +2 -2
- package/cjs/internals/Menu/Menu.js +3 -3
- package/cjs/internals/Menu/MenuItem.js +1 -1
- package/cjs/internals/Menu/Menubar.js +2 -2
- package/cjs/internals/Overlay/Modal.js +7 -7
- package/cjs/internals/Overlay/Overlay.js +1 -1
- package/cjs/internals/Overlay/OverlayTrigger.js +3 -3
- package/cjs/internals/Overlay/Position.js +5 -5
- package/cjs/internals/Picker/ListCheckItem.js +3 -3
- package/cjs/internals/Picker/ListItem.js +1 -1
- package/cjs/internals/Picker/Listbox.js +4 -4
- package/cjs/internals/Picker/PickerToggle.js +2 -2
- package/cjs/internals/Picker/SelectedElement.js +1 -1
- package/cjs/internals/Picker/hooks/useFocusItemValue.js +2 -2
- package/cjs/internals/Picker/hooks/usePickerRef.js +4 -4
- package/cjs/internals/Picker/hooks/useSearch.js +1 -1
- package/cjs/internals/Picker/hooks/useToggleKeyDownEvent.js +9 -9
- package/cjs/internals/Picker/utils.js +8 -8
- package/cjs/internals/Ripple/Ripple.js +2 -2
- package/cjs/internals/ScrollView/hooks/useScrollState.js +1 -1
- package/cjs/internals/Tree/utils/filterNodesOfTree.js +3 -3
- package/cjs/internals/Tree/utils/findNodeOfTree.js +3 -3
- package/cjs/internals/Tree/utils/getParentMap.js +3 -3
- package/cjs/internals/Windowing/AutoSizer.js +1 -1
- package/cjs/internals/Windowing/List.js +4 -4
- package/cjs/internals/hooks/useClickOutside.js +1 -1
- package/cjs/internals/hooks/useElementResize.js +1 -1
- package/cjs/internals/hooks/useEventListener.js +1 -1
- package/cjs/internals/hooks/useFocus.js +2 -2
- package/cjs/internals/hooks/useMount.js +1 -1
- package/cjs/internals/hooks/useRootClose.js +4 -4
- package/cjs/internals/hooks/useTimeout.js +1 -1
- package/cjs/internals/utils/stringifyReactNode.js +5 -5
- package/cjs/toaster/ToastContainer.d.ts +1 -0
- package/cjs/toaster/ToastContainer.js +19 -14
- package/cjs/toaster/hooks/useDelayedClosure.js +2 -2
- package/cjs/toaster/toaster.js +7 -7
- package/cjs/useToaster/useToaster.js +1 -1
- package/dist/rsuite-no-reset-rtl.css +240 -36
- package/dist/rsuite-no-reset-rtl.min.css +1 -1
- package/dist/rsuite-no-reset-rtl.min.css.map +1 -1
- package/dist/rsuite-no-reset.css +240 -36
- package/dist/rsuite-no-reset.min.css +1 -1
- package/dist/rsuite-no-reset.min.css.map +1 -1
- package/dist/rsuite-rtl.css +240 -36
- package/dist/rsuite-rtl.min.css +1 -1
- package/dist/rsuite-rtl.min.css.map +1 -1
- package/dist/rsuite.css +240 -36
- package/dist/rsuite.js +384 -175
- package/dist/rsuite.js.map +1 -1
- package/dist/rsuite.min.css +1 -1
- package/dist/rsuite.min.css.map +1 -1
- package/dist/rsuite.min.js +1 -1
- package/dist/rsuite.min.js.map +1 -1
- package/esm/Affix/Affix.js +2 -2
- package/esm/Animation/Transition.js +7 -7
- package/esm/AutoComplete/AutoComplete.js +7 -7
- package/esm/Avatar/useImage.js +1 -1
- package/esm/Breadcrumb/Breadcrumb.js +1 -1
- package/esm/Calendar/Calendar.js +3 -3
- package/esm/Calendar/CalendarContainer.js +1 -1
- package/esm/Calendar/Grid/GridRow.js +3 -3
- package/esm/Calendar/MonthDropdown/MonthDropdownItem.js +1 -1
- package/esm/Calendar/TimeDropdown/TimeDropdown.js +3 -3
- package/esm/Calendar/hooks/useCalendarState.js +6 -6
- package/esm/Card/Card.d.ts +33 -0
- package/esm/Card/Card.js +58 -0
- package/esm/Card/CardBody.d.ts +4 -0
- package/esm/Card/CardBody.js +7 -0
- package/esm/Card/CardFooter.d.ts +4 -0
- package/esm/Card/CardFooter.js +7 -0
- package/esm/Card/CardHeader.d.ts +4 -0
- package/esm/Card/CardHeader.js +7 -0
- package/esm/Card/index.d.ts +6 -0
- package/esm/Card/index.js +3 -0
- package/esm/CardGroup/CardGroup.d.ts +13 -0
- package/esm/CardGroup/CardGroup.js +42 -0
- package/esm/CardGroup/index.d.ts +3 -0
- package/esm/CardGroup/index.js +3 -0
- package/esm/Carousel/Carousel.js +4 -4
- package/esm/CascadeTree/CascadeTree.js +1 -1
- package/esm/CascadeTree/TreeView.js +1 -1
- package/esm/CascadeTree/hooks/useSearch.js +4 -4
- package/esm/CascadeTree/hooks/useSelect.js +2 -2
- package/esm/Cascader/Cascader.js +13 -13
- package/esm/Cascader/useActive.js +4 -4
- package/esm/CheckPicker/CheckPicker.js +5 -5
- package/esm/CheckTree/CheckTree.js +1 -1
- package/esm/CheckTree/CheckTreeNode.js +3 -3
- package/esm/CheckTree/CheckTreeView.js +7 -7
- package/esm/CheckTree/utils.js +3 -3
- package/esm/CheckTreePicker/CheckTreePicker.js +2 -2
- package/esm/CheckTreePicker/hooks/useFocusState.js +3 -3
- package/esm/Checkbox/Checkbox.js +2 -2
- package/esm/CheckboxGroup/CheckboxGroup.js +1 -1
- package/esm/CustomProvider/FormattedNumber.d.ts +7 -0
- package/esm/CustomProvider/FormattedNumber.js +13 -0
- package/esm/CustomProvider/index.d.ts +1 -0
- package/esm/CustomProvider/index.js +1 -0
- package/esm/CustomProvider/types.d.ts +8 -0
- package/esm/CustomProvider/useCustom.d.ts +1 -0
- package/esm/CustomProvider/useCustom.js +3 -1
- package/esm/DateInput/DateField.js +2 -2
- package/esm/DateInput/DateInput.js +2 -2
- package/esm/DateInput/hooks/useDateInputState.js +2 -2
- package/esm/DateInput/hooks/useIsFocused.js +2 -2
- package/esm/DateInput/hooks/useKeyboardInputEvent.js +5 -5
- package/esm/DatePicker/DatePicker.js +14 -14
- package/esm/DatePicker/PredefinedRanges.js +1 -1
- package/esm/DatePicker/hooks/useFocus.js +1 -1
- package/esm/DatePicker/hooks/useMonthView.js +1 -1
- package/esm/DateRangeInput/DateRangeInput.js +4 -4
- package/esm/DateRangePicker/DateRangePicker.js +8 -8
- package/esm/DateRangePicker/hooks/useCalendarHandlers.js +5 -5
- package/esm/Dropdown/Dropdown.js +3 -3
- package/esm/Dropdown/DropdownItem.js +2 -2
- package/esm/Dropdown/DropdownMenu.js +1 -1
- package/esm/Form/Form.js +8 -8
- package/esm/Form/hooks/useFormValidate.js +19 -19
- package/esm/FormControl/FormControl.js +5 -5
- package/esm/FormControl/hooks/useField.js +1 -1
- package/esm/FormControl/hooks/useRegisterModel.js +2 -2
- package/esm/InlineEdit/renderChildren.js +1 -1
- package/esm/InlineEdit/useEditState.js +7 -7
- package/esm/InlineEdit/useFocusEvent.js +5 -5
- package/esm/Input/Input.js +3 -3
- package/esm/InputGroup/InputGroup.js +2 -2
- package/esm/InputNumber/InputNumber.js +3 -3
- package/esm/InputPicker/InputAutosize.js +1 -1
- package/esm/InputPicker/InputPicker.js +13 -13
- package/esm/InputPicker/InputSearch.js +1 -1
- package/esm/InputPicker/hooks/useData.js +1 -1
- package/esm/InputPicker/hooks/useInput.js +2 -2
- package/esm/List/List.d.ts +19 -1
- package/esm/List/List.js +11 -7
- package/esm/List/ListItem.d.ts +1 -1
- package/esm/List/helper/useSortHelper.js +10 -10
- package/esm/MaskedInput/TextMask.js +3 -3
- package/esm/Message/Message.js +1 -1
- package/esm/Modal/Modal.js +6 -6
- package/esm/Modal/utils.js +2 -2
- package/esm/MultiCascadeTree/SearchView.js +1 -1
- package/esm/MultiCascadeTree/TreeView.js +1 -1
- package/esm/MultiCascadeTree/hooks/useCascadeValue.js +5 -5
- package/esm/MultiCascadeTree/hooks/useSearch.js +1 -1
- package/esm/MultiCascadeTree/hooks/useSelect.js +1 -1
- package/esm/MultiCascadeTree/utils.js +13 -10
- package/esm/MultiCascader/MultiCascader.js +5 -5
- package/esm/Nav/Nav.js +2 -2
- package/esm/Nav/NavDropdown.js +3 -3
- package/esm/Nav/NavDropdownItem.js +2 -2
- package/esm/Nav/NavDropdownMenu.js +1 -1
- package/esm/Nav/NavItem.js +3 -3
- package/esm/Navbar/NavbarDropdown.js +3 -3
- package/esm/Navbar/NavbarDropdownItem.js +4 -4
- package/esm/Navbar/NavbarItem.js +3 -3
- package/esm/Notification/Notification.js +1 -1
- package/esm/Pagination/PaginationButton.js +1 -1
- package/esm/Pagination/PaginationGroup.js +3 -3
- package/esm/Panel/Panel.js +2 -2
- package/esm/PanelGroup/PanelGroup.js +1 -1
- package/esm/Placeholder/PlaceholderGrid.js +2 -2
- package/esm/Placeholder/PlaceholderParagraph.js +1 -1
- package/esm/Radio/Radio.js +2 -2
- package/esm/RadioGroup/RadioGroup.js +1 -1
- package/esm/RadioTile/RadioTile.js +2 -2
- package/esm/RadioTileGroup/RadioTileGroup.js +1 -1
- package/esm/RangeSlider/RangeSlider.js +5 -5
- package/esm/Rate/Character.js +2 -2
- package/esm/Rate/Rate.js +3 -3
- package/esm/SafeAnchor/SafeAnchor.js +1 -1
- package/esm/SelectPicker/SelectPicker.js +7 -7
- package/esm/Sidebar/Sidebar.js +1 -1
- package/esm/Sidenav/ExpandedSidenavDropdown.js +4 -4
- package/esm/Sidenav/ExpandedSidenavDropdownItem.js +3 -3
- package/esm/Sidenav/ExpandedSidenavDropdownMenu.js +2 -2
- package/esm/Sidenav/Sidenav.js +1 -1
- package/esm/Sidenav/SidenavDropdown.js +4 -4
- package/esm/Sidenav/SidenavDropdownItem.js +2 -2
- package/esm/Sidenav/SidenavDropdownMenu.js +1 -1
- package/esm/Sidenav/SidenavItem.js +4 -4
- package/esm/Sidenav/SidenavToggle.js +1 -1
- package/esm/Slider/Graduated.js +1 -1
- package/esm/Slider/Slider.js +3 -3
- package/esm/Slider/useDrag.js +6 -6
- package/esm/Stack/HStack.d.ts +6 -3
- package/esm/Stack/HStack.js +1 -0
- package/esm/Stack/Stack.d.ts +6 -2
- package/esm/Stack/Stack.js +1 -1
- package/esm/Stack/VStack.d.ts +6 -3
- package/esm/Stack/VStack.js +1 -0
- package/esm/Stat/Stat.d.ts +26 -0
- package/esm/Stat/Stat.js +52 -0
- package/esm/Stat/StatHelpText.d.ts +4 -0
- package/esm/Stat/StatHelpText.js +7 -0
- package/esm/Stat/StatLabel.d.ts +14 -0
- package/esm/Stat/StatLabel.js +48 -0
- package/esm/Stat/StatTrend.d.ts +7 -0
- package/esm/Stat/StatTrend.js +63 -0
- package/esm/Stat/StatValue.d.ts +7 -0
- package/esm/Stat/StatValue.js +36 -0
- package/esm/Stat/StatValueUnit.d.ts +4 -0
- package/esm/Stat/StatValueUnit.js +7 -0
- package/esm/Stat/index.d.ts +3 -0
- package/esm/Stat/index.js +3 -0
- package/esm/StatGroup/StatGroup.d.ts +13 -0
- package/esm/StatGroup/StatGroup.js +42 -0
- package/esm/StatGroup/index.d.ts +3 -0
- package/esm/StatGroup/index.js +3 -0
- package/esm/Tabs/Tabs.js +1 -1
- package/esm/Timeline/Timeline.js +1 -1
- package/esm/Toggle/Toggle.js +1 -1
- package/esm/Tree/Tree.js +1 -1
- package/esm/Tree/TreeNode.js +9 -9
- package/esm/Tree/TreeView.js +7 -7
- package/esm/Tree/hooks/useExpandTree.js +1 -1
- package/esm/Tree/hooks/useFlattenTree.js +1 -1
- package/esm/Tree/hooks/useFocusTree.js +6 -6
- package/esm/Tree/hooks/useTreeDrag.js +17 -17
- package/esm/Tree/hooks/useTreeSearch.js +1 -1
- package/esm/Tree/utils/flattenTree.js +6 -6
- package/esm/Tree/utils/focusableTree.js +6 -6
- package/esm/Tree/utils/getNodeParentKeys.js +4 -4
- package/esm/Tree/utils/treeKeyboardInteractions.js +2 -2
- package/esm/TreePicker/TreePicker.js +5 -5
- package/esm/TreePicker/hooks/useFocusState.js +4 -4
- package/esm/Uploader/UploadFileItem.js +5 -5
- package/esm/Uploader/UploadTrigger.js +11 -11
- package/esm/Uploader/Uploader.js +16 -16
- package/esm/Uploader/utils/ajaxUpload.js +5 -5
- package/esm/index.d.ts +8 -0
- package/esm/index.js +4 -0
- package/esm/internals/Disclosure/Disclosure.js +3 -3
- package/esm/internals/Disclosure/DisclosureButton.js +2 -2
- package/esm/internals/Menu/Menu.js +3 -3
- package/esm/internals/Menu/MenuItem.js +1 -1
- package/esm/internals/Menu/Menubar.js +2 -2
- package/esm/internals/Overlay/Modal.js +7 -7
- package/esm/internals/Overlay/Overlay.js +1 -1
- package/esm/internals/Overlay/OverlayTrigger.js +3 -3
- package/esm/internals/Overlay/Position.js +5 -5
- package/esm/internals/Picker/ListCheckItem.js +3 -3
- package/esm/internals/Picker/ListItem.js +1 -1
- package/esm/internals/Picker/Listbox.js +4 -4
- package/esm/internals/Picker/PickerToggle.js +2 -2
- package/esm/internals/Picker/SelectedElement.js +1 -1
- package/esm/internals/Picker/hooks/useFocusItemValue.js +2 -2
- package/esm/internals/Picker/hooks/usePickerRef.js +4 -4
- package/esm/internals/Picker/hooks/useSearch.js +1 -1
- package/esm/internals/Picker/hooks/useToggleKeyDownEvent.js +9 -9
- package/esm/internals/Picker/utils.js +8 -8
- package/esm/internals/Ripple/Ripple.js +2 -2
- package/esm/internals/ScrollView/hooks/useScrollState.js +1 -1
- package/esm/internals/Tree/utils/filterNodesOfTree.js +3 -3
- package/esm/internals/Tree/utils/findNodeOfTree.js +3 -3
- package/esm/internals/Tree/utils/getParentMap.js +3 -3
- package/esm/internals/Windowing/AutoSizer.js +1 -1
- package/esm/internals/Windowing/List.js +4 -4
- package/esm/internals/hooks/useClickOutside.js +1 -1
- package/esm/internals/hooks/useElementResize.js +1 -1
- package/esm/internals/hooks/useEventListener.js +1 -1
- package/esm/internals/hooks/useFocus.js +2 -2
- package/esm/internals/hooks/useMount.js +1 -1
- package/esm/internals/hooks/useRootClose.js +4 -4
- package/esm/internals/hooks/useTimeout.js +1 -1
- package/esm/internals/utils/stringifyReactNode.js +5 -5
- package/esm/toaster/ToastContainer.d.ts +1 -0
- package/esm/toaster/ToastContainer.js +19 -14
- package/esm/toaster/hooks/useDelayedClosure.js +2 -2
- package/esm/toaster/toaster.js +7 -7
- package/esm/useToaster/useToaster.js +1 -1
- package/package.json +1 -1
- package/styles/color-modes/dark.less +6 -0
- package/styles/color-modes/high-contrast.less +6 -0
- package/styles/color-modes/light.less +6 -0
- package/styles/index.less +4 -0
- package/toaster/styles/index.css +24 -24
- package/toaster/styles/index.less +29 -29
- package/useToaster/styles/index.css +24 -24
package/esm/Stack/VStack.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import Stack, { StackProps } from './Stack';
|
|
2
|
+
import { RsRefForwardingComponent } from '../internals/types';
|
|
3
3
|
export interface VStackProps extends Omit<StackProps, 'direction'> {
|
|
4
4
|
reverse?: boolean;
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
export interface StackComponent extends RsRefForwardingComponent<'div', VStackProps> {
|
|
7
|
+
Item: typeof Stack.Item;
|
|
8
|
+
}
|
|
9
|
+
declare const VStack: StackComponent;
|
|
7
10
|
export default VStack;
|
package/esm/Stack/VStack.js
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import StatLabel from './StatLabel';
|
|
3
|
+
import StatValue from './StatValue';
|
|
4
|
+
import StatValueUnit from './StatValueUnit';
|
|
5
|
+
import StatHelpText from './StatHelpText';
|
|
6
|
+
import StatTrend from './StatTrend';
|
|
7
|
+
import type { WithAsProps, RsRefForwardingComponent } from '../internals/types';
|
|
8
|
+
export interface StatProps extends WithAsProps {
|
|
9
|
+
/**
|
|
10
|
+
* Add a border to the component.
|
|
11
|
+
*/
|
|
12
|
+
bordered?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* The icon displayed on the left side of the component.
|
|
15
|
+
*/
|
|
16
|
+
icon?: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
interface StatComponent extends RsRefForwardingComponent<'div', StatProps> {
|
|
19
|
+
Label: typeof StatLabel;
|
|
20
|
+
Value: typeof StatValue;
|
|
21
|
+
Trend: typeof StatTrend;
|
|
22
|
+
ValueUnit: typeof StatValueUnit;
|
|
23
|
+
HelpText: typeof StatHelpText;
|
|
24
|
+
}
|
|
25
|
+
declare const Stat: StatComponent;
|
|
26
|
+
export default Stat;
|
package/esm/Stat/Stat.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
|
+
var _excluded = ["as", "classPrefix", "className", "children", "bordered", "icon"];
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import PropTypes from 'prop-types';
|
|
7
|
+
import StatLabel from "./StatLabel.js";
|
|
8
|
+
import StatValue from "./StatValue.js";
|
|
9
|
+
import StatValueUnit from "./StatValueUnit.js";
|
|
10
|
+
import StatHelpText from "./StatHelpText.js";
|
|
11
|
+
import StatTrend from "./StatTrend.js";
|
|
12
|
+
import { useClassNames } from "../internals/hooks/index.js";
|
|
13
|
+
import { useCustom } from "../CustomProvider/index.js";
|
|
14
|
+
var Stat = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
15
|
+
var _useCustom = useCustom('Stat', props),
|
|
16
|
+
propsWithDefaults = _useCustom.propsWithDefaults;
|
|
17
|
+
var _propsWithDefaults$as = propsWithDefaults.as,
|
|
18
|
+
Component = _propsWithDefaults$as === void 0 ? 'div' : _propsWithDefaults$as,
|
|
19
|
+
_propsWithDefaults$cl = propsWithDefaults.classPrefix,
|
|
20
|
+
classPrefix = _propsWithDefaults$cl === void 0 ? 'stat' : _propsWithDefaults$cl,
|
|
21
|
+
className = propsWithDefaults.className,
|
|
22
|
+
children = propsWithDefaults.children,
|
|
23
|
+
bordered = propsWithDefaults.bordered,
|
|
24
|
+
icon = propsWithDefaults.icon,
|
|
25
|
+
rest = _objectWithoutPropertiesLoose(propsWithDefaults, _excluded);
|
|
26
|
+
var _useClassNames = useClassNames(classPrefix),
|
|
27
|
+
merge = _useClassNames.merge,
|
|
28
|
+
prefix = _useClassNames.prefix,
|
|
29
|
+
withClassPrefix = _useClassNames.withClassPrefix;
|
|
30
|
+
var classes = merge(className, withClassPrefix({
|
|
31
|
+
bordered: bordered
|
|
32
|
+
}));
|
|
33
|
+
return /*#__PURE__*/React.createElement(Component, _extends({
|
|
34
|
+
className: classes,
|
|
35
|
+
ref: ref
|
|
36
|
+
}, rest), icon && /*#__PURE__*/React.createElement("div", {
|
|
37
|
+
className: prefix('icon')
|
|
38
|
+
}, icon), /*#__PURE__*/React.createElement("dl", {
|
|
39
|
+
className: prefix('body')
|
|
40
|
+
}, children));
|
|
41
|
+
});
|
|
42
|
+
Stat.displayName = 'Stat';
|
|
43
|
+
Stat.propTypes = {
|
|
44
|
+
bordered: PropTypes.bool,
|
|
45
|
+
icon: PropTypes.node
|
|
46
|
+
};
|
|
47
|
+
Stat.Label = StatLabel;
|
|
48
|
+
Stat.Value = StatValue;
|
|
49
|
+
Stat.Trend = StatTrend;
|
|
50
|
+
Stat.ValueUnit = StatValueUnit;
|
|
51
|
+
Stat.HelpText = StatHelpText;
|
|
52
|
+
export default Stat;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WithAsProps, RsRefForwardingComponent } from '../internals/types';
|
|
3
|
+
interface StatLabelProps extends WithAsProps {
|
|
4
|
+
/**
|
|
5
|
+
* The info tip of the label
|
|
6
|
+
*/
|
|
7
|
+
info?: React.ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Uppercase the label
|
|
10
|
+
*/
|
|
11
|
+
uppercase?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare const StatLabel: RsRefForwardingComponent<'dt', StatLabelProps>;
|
|
14
|
+
export default StatLabel;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
|
+
var _excluded = ["as", "classPrefix", "className", "children", "info", "uppercase"];
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import PropTypes from 'prop-types';
|
|
7
|
+
import InfoOutlineIcon from '@rsuite/icons/InfoOutline';
|
|
8
|
+
import Whisper from "../Whisper/index.js";
|
|
9
|
+
import Tooltip from "../Tooltip/index.js";
|
|
10
|
+
import IconButton from "../IconButton/index.js";
|
|
11
|
+
import { useClassNames } from "../internals/hooks/index.js";
|
|
12
|
+
var StatLabel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
13
|
+
var _props$as = props.as,
|
|
14
|
+
Component = _props$as === void 0 ? 'dt' : _props$as,
|
|
15
|
+
_props$classPrefix = props.classPrefix,
|
|
16
|
+
classPrefix = _props$classPrefix === void 0 ? 'stat-label' : _props$classPrefix,
|
|
17
|
+
className = props.className,
|
|
18
|
+
children = props.children,
|
|
19
|
+
info = props.info,
|
|
20
|
+
uppercase = props.uppercase,
|
|
21
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded);
|
|
22
|
+
var _useClassNames = useClassNames(classPrefix),
|
|
23
|
+
merge = _useClassNames.merge,
|
|
24
|
+
withClassPrefix = _useClassNames.withClassPrefix;
|
|
25
|
+
var classes = merge(className, withClassPrefix({
|
|
26
|
+
uppercase: uppercase
|
|
27
|
+
}));
|
|
28
|
+
return /*#__PURE__*/React.createElement(Component, _extends({
|
|
29
|
+
ref: ref,
|
|
30
|
+
className: classes
|
|
31
|
+
}, rest), children, info && /*#__PURE__*/React.createElement(Whisper, {
|
|
32
|
+
placement: "top",
|
|
33
|
+
trigger: 'click',
|
|
34
|
+
enterable: true,
|
|
35
|
+
speaker: /*#__PURE__*/React.createElement(Tooltip, null, info)
|
|
36
|
+
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
37
|
+
circle: true,
|
|
38
|
+
size: "xs",
|
|
39
|
+
appearance: "subtle",
|
|
40
|
+
icon: /*#__PURE__*/React.createElement(InfoOutlineIcon, null)
|
|
41
|
+
})));
|
|
42
|
+
});
|
|
43
|
+
StatLabel.displayName = 'StatLabel';
|
|
44
|
+
StatLabel.propTypes = {
|
|
45
|
+
info: PropTypes.node,
|
|
46
|
+
uppercase: PropTypes.bool
|
|
47
|
+
};
|
|
48
|
+
export default StatLabel;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { WithAsProps, RsRefForwardingComponent } from '../internals/types';
|
|
2
|
+
interface StatTrendProps extends WithAsProps {
|
|
3
|
+
indicator?: 'up' | 'down';
|
|
4
|
+
appearance?: 'default' | 'subtle';
|
|
5
|
+
}
|
|
6
|
+
declare const StatTrend: RsRefForwardingComponent<'dd', StatTrendProps>;
|
|
7
|
+
export default StatTrend;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
var _excluded = ["as", "appearance", "classPrefix", "indicator", "className", "children"];
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { useClassNames } from "../internals/hooks/index.js";
|
|
7
|
+
import { oneOf } from "../internals/propTypes/index.js";
|
|
8
|
+
var svgProps = {
|
|
9
|
+
xmlns: 'http://www.w3.org/2000/svg',
|
|
10
|
+
width: 16,
|
|
11
|
+
height: 16,
|
|
12
|
+
viewBox: '0 0 24 24',
|
|
13
|
+
fill: 'none',
|
|
14
|
+
stroke: 'currentColor',
|
|
15
|
+
strokeWidth: '1.5',
|
|
16
|
+
strokeLinecap: 'round',
|
|
17
|
+
strokeLinejoin: 'round'
|
|
18
|
+
};
|
|
19
|
+
var ArrowUp = function ArrowUp(props) {
|
|
20
|
+
return /*#__PURE__*/React.createElement("svg", _extends({}, svgProps, props), /*#__PURE__*/React.createElement("path", {
|
|
21
|
+
d: "M17 7l-10 10"
|
|
22
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
23
|
+
d: "M8 7l9 0l0 9"
|
|
24
|
+
}));
|
|
25
|
+
};
|
|
26
|
+
var ArrowDown = function ArrowDown(props) {
|
|
27
|
+
return /*#__PURE__*/React.createElement("svg", _extends({}, svgProps, props), /*#__PURE__*/React.createElement("path", {
|
|
28
|
+
d: "M7 7l10 10"
|
|
29
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
30
|
+
d: "M17 8l0 9l-9 0"
|
|
31
|
+
}));
|
|
32
|
+
};
|
|
33
|
+
var StatTrend = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
34
|
+
var _props$as = props.as,
|
|
35
|
+
Component = _props$as === void 0 ? 'span' : _props$as,
|
|
36
|
+
_props$appearance = props.appearance,
|
|
37
|
+
appearance = _props$appearance === void 0 ? 'default' : _props$appearance,
|
|
38
|
+
_props$classPrefix = props.classPrefix,
|
|
39
|
+
classPrefix = _props$classPrefix === void 0 ? 'stat-trend' : _props$classPrefix,
|
|
40
|
+
_props$indicator = props.indicator,
|
|
41
|
+
indicator = _props$indicator === void 0 ? 'up' : _props$indicator,
|
|
42
|
+
className = props.className,
|
|
43
|
+
children = props.children,
|
|
44
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded);
|
|
45
|
+
var _useClassNames = useClassNames(classPrefix),
|
|
46
|
+
merge = _useClassNames.merge,
|
|
47
|
+
prefix = _useClassNames.prefix,
|
|
48
|
+
withClassPrefix = _useClassNames.withClassPrefix;
|
|
49
|
+
var classes = merge(className, withClassPrefix(appearance, indicator));
|
|
50
|
+
var IndicatorIcon = indicator === 'up' ? ArrowUp : ArrowDown;
|
|
51
|
+
return /*#__PURE__*/React.createElement(Component, _extends({
|
|
52
|
+
ref: ref,
|
|
53
|
+
className: classes
|
|
54
|
+
}, rest), children, /*#__PURE__*/React.createElement(IndicatorIcon, {
|
|
55
|
+
className: prefix('indicator')
|
|
56
|
+
}));
|
|
57
|
+
});
|
|
58
|
+
StatTrend.displayName = 'StatTrend';
|
|
59
|
+
StatTrend.propTypes = {
|
|
60
|
+
indicator: oneOf(['up', 'down']),
|
|
61
|
+
appearance: oneOf(['default', 'subtle'])
|
|
62
|
+
};
|
|
63
|
+
export default StatTrend;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { WithAsProps, RsRefForwardingComponent } from '../internals/types';
|
|
2
|
+
interface StatValueProps extends WithAsProps {
|
|
3
|
+
value?: number;
|
|
4
|
+
formatOptions?: Intl.NumberFormatOptions;
|
|
5
|
+
}
|
|
6
|
+
declare const StatValue: RsRefForwardingComponent<'dd', StatValueProps>;
|
|
7
|
+
export default StatValue;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
|
+
var _excluded = ["as", "classPrefix", "className", "children", "value", "formatOptions"];
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import PropTypes from 'prop-types';
|
|
7
|
+
import { useClassNames } from "../internals/hooks/index.js";
|
|
8
|
+
import { FormattedNumber } from "../CustomProvider/index.js";
|
|
9
|
+
var StatValue = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
10
|
+
var _props$as = props.as,
|
|
11
|
+
Component = _props$as === void 0 ? 'dd' : _props$as,
|
|
12
|
+
_props$classPrefix = props.classPrefix,
|
|
13
|
+
classPrefix = _props$classPrefix === void 0 ? 'stat-value' : _props$classPrefix,
|
|
14
|
+
className = props.className,
|
|
15
|
+
children = props.children,
|
|
16
|
+
value = props.value,
|
|
17
|
+
formatOptions = props.formatOptions,
|
|
18
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded);
|
|
19
|
+
var _useClassNames = useClassNames(classPrefix),
|
|
20
|
+
merge = _useClassNames.merge,
|
|
21
|
+
withClassPrefix = _useClassNames.withClassPrefix;
|
|
22
|
+
var classes = merge(className, withClassPrefix());
|
|
23
|
+
return /*#__PURE__*/React.createElement(Component, _extends({
|
|
24
|
+
ref: ref,
|
|
25
|
+
className: classes
|
|
26
|
+
}, rest), value && /*#__PURE__*/React.createElement(FormattedNumber, {
|
|
27
|
+
value: value,
|
|
28
|
+
formatOptions: formatOptions
|
|
29
|
+
}), children);
|
|
30
|
+
});
|
|
31
|
+
StatValue.displayName = 'StatValue';
|
|
32
|
+
StatValue.propTypes = {
|
|
33
|
+
value: PropTypes.number,
|
|
34
|
+
formatOptions: PropTypes.object
|
|
35
|
+
};
|
|
36
|
+
export default StatValue;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { WithAsProps, RsRefForwardingComponent } from '../internals/types';
|
|
2
|
+
export interface StatGroupProps extends WithAsProps {
|
|
3
|
+
/**
|
|
4
|
+
* The number of columns in the group
|
|
5
|
+
*/
|
|
6
|
+
columns?: number;
|
|
7
|
+
/**
|
|
8
|
+
* Spacing between columns
|
|
9
|
+
*/
|
|
10
|
+
spacing?: number | string;
|
|
11
|
+
}
|
|
12
|
+
declare const StatGroup: RsRefForwardingComponent<'div', StatGroupProps>;
|
|
13
|
+
export default StatGroup;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
|
+
var _excluded = ["as", "classPrefix", "className", "children", "columns", "spacing", "style"];
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import PropTypes from 'prop-types';
|
|
7
|
+
import { useClassNames } from "../internals/hooks/index.js";
|
|
8
|
+
import { useCustom } from "../CustomProvider/index.js";
|
|
9
|
+
var StatGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
10
|
+
var _useCustom = useCustom('StatGroup', props),
|
|
11
|
+
propsWithDefaults = _useCustom.propsWithDefaults;
|
|
12
|
+
var _propsWithDefaults$as = propsWithDefaults.as,
|
|
13
|
+
Component = _propsWithDefaults$as === void 0 ? 'div' : _propsWithDefaults$as,
|
|
14
|
+
_propsWithDefaults$cl = propsWithDefaults.classPrefix,
|
|
15
|
+
classPrefix = _propsWithDefaults$cl === void 0 ? 'stat-group' : _propsWithDefaults$cl,
|
|
16
|
+
className = propsWithDefaults.className,
|
|
17
|
+
children = propsWithDefaults.children,
|
|
18
|
+
columns = propsWithDefaults.columns,
|
|
19
|
+
_propsWithDefaults$sp = propsWithDefaults.spacing,
|
|
20
|
+
spacing = _propsWithDefaults$sp === void 0 ? 6 : _propsWithDefaults$sp,
|
|
21
|
+
style = propsWithDefaults.style,
|
|
22
|
+
rest = _objectWithoutPropertiesLoose(propsWithDefaults, _excluded);
|
|
23
|
+
var _useClassNames = useClassNames(classPrefix),
|
|
24
|
+
merge = _useClassNames.merge,
|
|
25
|
+
withClassPrefix = _useClassNames.withClassPrefix;
|
|
26
|
+
var classes = merge(className, withClassPrefix());
|
|
27
|
+
var styles = _extends({}, style, {
|
|
28
|
+
'--rs-columns': columns,
|
|
29
|
+
'--rs-spacing': typeof spacing === 'number' ? spacing + "px" : spacing
|
|
30
|
+
});
|
|
31
|
+
return /*#__PURE__*/React.createElement(Component, _extends({
|
|
32
|
+
ref: ref,
|
|
33
|
+
className: classes,
|
|
34
|
+
style: styles
|
|
35
|
+
}, rest), children);
|
|
36
|
+
});
|
|
37
|
+
StatGroup.displayName = 'StatGroup';
|
|
38
|
+
StatGroup.propTypes = {
|
|
39
|
+
columns: PropTypes.number,
|
|
40
|
+
spacing: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
|
41
|
+
};
|
|
42
|
+
export default StatGroup;
|
package/esm/Tabs/Tabs.js
CHANGED
|
@@ -138,7 +138,7 @@ var Tabs = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
138
138
|
var tablistRef = React.useRef(null);
|
|
139
139
|
var handleSelect = useEventCallback(function (eventKey, event) {
|
|
140
140
|
setActiveKey(eventKey);
|
|
141
|
-
onSelect === null || onSelect === void 0
|
|
141
|
+
onSelect === null || onSelect === void 0 || onSelect(eventKey, event);
|
|
142
142
|
});
|
|
143
143
|
var handleKeyDown = useEventCallback(function (event) {
|
|
144
144
|
var _getFocusableTabs;
|
package/esm/Timeline/Timeline.js
CHANGED
|
@@ -36,7 +36,7 @@ var Timeline = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
36
36
|
var count = ReactChildren.count(children);
|
|
37
37
|
var withTime = some(React.Children.toArray(children), function (item) {
|
|
38
38
|
var _item$props;
|
|
39
|
-
return item === null || item === void 0
|
|
39
|
+
return item === null || item === void 0 || (_item$props = item.props) === null || _item$props === void 0 ? void 0 : _item$props.time;
|
|
40
40
|
});
|
|
41
41
|
var classes = merge(className, withClassPrefix("align-" + align, {
|
|
42
42
|
endless: endless,
|
package/esm/Toggle/Toggle.js
CHANGED
|
@@ -65,7 +65,7 @@ var Toggle = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
65
65
|
}
|
|
66
66
|
var checked = e.target.checked;
|
|
67
67
|
setChecked(checked);
|
|
68
|
-
onChange === null || onChange === void 0
|
|
68
|
+
onChange === null || onChange === void 0 || onChange(checked, e);
|
|
69
69
|
});
|
|
70
70
|
if (plaintext) {
|
|
71
71
|
return /*#__PURE__*/React.createElement(Plaintext, null, inner || label);
|
package/esm/Tree/Tree.js
CHANGED
|
@@ -65,7 +65,7 @@ var Tree = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
65
65
|
handleExpandTreeNode = _useExpandTree.handleExpandTreeNode;
|
|
66
66
|
var handleChange = useEventCallback(function (nextValue, event) {
|
|
67
67
|
setValue(nextValue);
|
|
68
|
-
onChange === null || onChange === void 0
|
|
68
|
+
onChange === null || onChange === void 0 || onChange(nextValue, event);
|
|
69
69
|
});
|
|
70
70
|
var treeContext = useMemo(function () {
|
|
71
71
|
return {
|
package/esm/Tree/TreeNode.js
CHANGED
|
@@ -59,41 +59,41 @@ var TreeNode = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
59
59
|
var handleExpand = useEventCallback(function (event) {
|
|
60
60
|
var _event$nativeEvent, _event$nativeEvent$st;
|
|
61
61
|
// Stop propagation when using custom loading icon
|
|
62
|
-
event === null || event === void 0
|
|
62
|
+
event === null || event === void 0 || (_event$nativeEvent = event.nativeEvent) === null || _event$nativeEvent === void 0 || (_event$nativeEvent$st = _event$nativeEvent.stopImmediatePropagation) === null || _event$nativeEvent$st === void 0 || _event$nativeEvent$st.call(_event$nativeEvent);
|
|
63
63
|
event.stopPropagation();
|
|
64
|
-
onExpand === null || onExpand === void 0
|
|
64
|
+
onExpand === null || onExpand === void 0 || onExpand(nodeData, expanded);
|
|
65
65
|
});
|
|
66
66
|
var handleSelect = useEventCallback(function (event) {
|
|
67
67
|
if (disabled) {
|
|
68
68
|
return;
|
|
69
69
|
}
|
|
70
|
-
onSelect === null || onSelect === void 0
|
|
70
|
+
onSelect === null || onSelect === void 0 || onSelect(nodeData, event);
|
|
71
71
|
});
|
|
72
72
|
var handleDragStart = useEventCallback(function (event) {
|
|
73
|
-
onDragStart === null || onDragStart === void 0
|
|
73
|
+
onDragStart === null || onDragStart === void 0 || onDragStart(nodeData, event);
|
|
74
74
|
});
|
|
75
75
|
var handleDragEnter = useEventCallback(function (event) {
|
|
76
76
|
event.preventDefault();
|
|
77
77
|
event.stopPropagation();
|
|
78
|
-
onDragEnter === null || onDragEnter === void 0
|
|
78
|
+
onDragEnter === null || onDragEnter === void 0 || onDragEnter(nodeData, event);
|
|
79
79
|
});
|
|
80
80
|
var handleDragOver = useEventCallback(function (event) {
|
|
81
81
|
event.preventDefault();
|
|
82
82
|
event.stopPropagation();
|
|
83
|
-
onDragOver === null || onDragOver === void 0
|
|
83
|
+
onDragOver === null || onDragOver === void 0 || onDragOver(nodeData, event);
|
|
84
84
|
});
|
|
85
85
|
var handleDragLeave = useEventCallback(function (event) {
|
|
86
86
|
event.stopPropagation();
|
|
87
|
-
onDragLeave === null || onDragLeave === void 0
|
|
87
|
+
onDragLeave === null || onDragLeave === void 0 || onDragLeave(nodeData, event);
|
|
88
88
|
});
|
|
89
89
|
var handleDragEnd = useEventCallback(function (event) {
|
|
90
90
|
event.stopPropagation();
|
|
91
|
-
onDragEnd === null || onDragEnd === void 0
|
|
91
|
+
onDragEnd === null || onDragEnd === void 0 || onDragEnd(nodeData, event);
|
|
92
92
|
});
|
|
93
93
|
var handleDrop = useEventCallback(function (event) {
|
|
94
94
|
event.preventDefault();
|
|
95
95
|
event.stopPropagation();
|
|
96
|
-
onDrop === null || onDrop === void 0
|
|
96
|
+
onDrop === null || onDrop === void 0 || onDrop(nodeData, event);
|
|
97
97
|
});
|
|
98
98
|
var classes = merge(className, withClassPrefix({
|
|
99
99
|
disabled: disabled,
|
package/esm/Tree/TreeView.js
CHANGED
|
@@ -87,7 +87,7 @@ var TreeView = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
87
87
|
merge = _useClassNames.merge,
|
|
88
88
|
withClassPrefix = _useClassNames.withClassPrefix;
|
|
89
89
|
var handleSearchCallback = useEventCallback(function (value, _data, event) {
|
|
90
|
-
onSearch === null || onSearch === void 0
|
|
90
|
+
onSearch === null || onSearch === void 0 || onSearch(value, event);
|
|
91
91
|
});
|
|
92
92
|
var _useTreeSearch = useTreeSearch({
|
|
93
93
|
callback: handleSearchCallback,
|
|
@@ -178,9 +178,9 @@ var TreeView = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
178
178
|
return itemParentMap.get(item[valueKey]);
|
|
179
179
|
});
|
|
180
180
|
setFocusItemValue(nextValue);
|
|
181
|
-
onChange === null || onChange === void 0
|
|
182
|
-
onSelect === null || onSelect === void 0
|
|
183
|
-
onSelectItem === null || onSelectItem === void 0
|
|
181
|
+
onChange === null || onChange === void 0 || onChange(nextValue, event);
|
|
182
|
+
onSelect === null || onSelect === void 0 || onSelect(nodeData, nextValue, event);
|
|
183
|
+
onSelectItem === null || onSelectItem === void 0 || onSelectItem(nodeData, path);
|
|
184
184
|
});
|
|
185
185
|
var selectActiveItem = useEventCallback(function (event) {
|
|
186
186
|
if (isNil(focusItemValue)) return;
|
|
@@ -193,7 +193,7 @@ var TreeView = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
193
193
|
enter: selectActiveItem
|
|
194
194
|
});
|
|
195
195
|
});
|
|
196
|
-
var
|
|
196
|
+
var _renderNode = function renderNode(node, index, layer) {
|
|
197
197
|
var visible = node.visible;
|
|
198
198
|
if (!visible) {
|
|
199
199
|
return null;
|
|
@@ -223,7 +223,7 @@ var TreeView = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
223
223
|
className: prefix('group'),
|
|
224
224
|
role: "group"
|
|
225
225
|
}, children === null || children === void 0 ? void 0 : children.map(function (child, i) {
|
|
226
|
-
return
|
|
226
|
+
return _renderNode(child, i, layer);
|
|
227
227
|
}), showIndentLine && /*#__PURE__*/React.createElement(IndentLine, null)));
|
|
228
228
|
}
|
|
229
229
|
return /*#__PURE__*/React.createElement(TreeViewNode, _extends({
|
|
@@ -261,7 +261,7 @@ var TreeView = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
261
261
|
var classes = merge(withClassPrefix({
|
|
262
262
|
virtualized: virtualized
|
|
263
263
|
}), className);
|
|
264
|
-
var formattedNodes = getFormattedNodes(
|
|
264
|
+
var formattedNodes = getFormattedNodes(_renderNode);
|
|
265
265
|
return /*#__PURE__*/React.createElement(Component, {
|
|
266
266
|
ref: ref,
|
|
267
267
|
className: classes,
|
|
@@ -54,7 +54,7 @@ function useExpandTree(data, props) {
|
|
|
54
54
|
valueKey: valueKey
|
|
55
55
|
});
|
|
56
56
|
setExpandItemValues(nextExpandItemValues);
|
|
57
|
-
onExpand === null || onExpand === void 0
|
|
57
|
+
onExpand === null || onExpand === void 0 || onExpand(nextExpandItemValues, node, createConcatChildrenFunction(node, node[valueKey], {
|
|
58
58
|
valueKey: valueKey,
|
|
59
59
|
childrenKey: childrenKey
|
|
60
60
|
}));
|
|
@@ -71,7 +71,7 @@ function useFlattenTree(data, options) {
|
|
|
71
71
|
}
|
|
72
72
|
flattenTreeData(node[childrenKey], node, layer + 1);
|
|
73
73
|
});
|
|
74
|
-
callback === null || callback === void 0
|
|
74
|
+
callback === null || callback === void 0 || callback(flattenedNodes.current);
|
|
75
75
|
forceUpdate();
|
|
76
76
|
}, [callback, forceUpdate, valueKey, labelKey, uncheckableItemValues, childrenKey]);
|
|
77
77
|
useEffect(function () {
|
|
@@ -58,7 +58,7 @@ function useFocusTree(props) {
|
|
|
58
58
|
}
|
|
59
59
|
if (focusedValue) {
|
|
60
60
|
setFocusItemValue(focusedValue);
|
|
61
|
-
onFocused === null || onFocused === void 0
|
|
61
|
+
onFocused === null || onFocused === void 0 || onFocused(focusedValue);
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
64
|
var handleLeftArrowEvent = useEventCallback(function () {
|
|
@@ -69,10 +69,10 @@ function useFocusTree(props) {
|
|
|
69
69
|
var expand = expandItemValues.includes(focusItem === null || focusItem === void 0 ? void 0 : focusItem[valueKey]);
|
|
70
70
|
var onFocusItem = function onFocusItem() {
|
|
71
71
|
var _focusItem$parent, _focusItem$parent2;
|
|
72
|
-
var focusedValue = focusItem === null || focusItem === void 0
|
|
72
|
+
var focusedValue = focusItem === null || focusItem === void 0 || (_focusItem$parent = focusItem.parent) === null || _focusItem$parent === void 0 ? void 0 : _focusItem$parent[valueKey];
|
|
73
73
|
setFocusItemValue(focusedValue);
|
|
74
|
-
onFocused === null || onFocused === void 0
|
|
75
|
-
focusTreeNode(focusItem === null || focusItem === void 0
|
|
74
|
+
onFocused === null || onFocused === void 0 || onFocused(focusedValue);
|
|
75
|
+
focusTreeNode(focusItem === null || focusItem === void 0 || (_focusItem$parent2 = focusItem.parent) === null || _focusItem$parent2 === void 0 ? void 0 : _focusItem$parent2.refKey, treeNodesRefs);
|
|
76
76
|
};
|
|
77
77
|
handleLeftArrow({
|
|
78
78
|
focusItem: focusItem,
|
|
@@ -123,7 +123,7 @@ function useFocusTree(props) {
|
|
|
123
123
|
var node = (_flattenedNodesRef$cu = flattenedNodesRef.current) === null || _flattenedNodesRef$cu === void 0 ? void 0 : _flattenedNodesRef$cu[refKey];
|
|
124
124
|
if (node) {
|
|
125
125
|
setFocusItemValue(node[valueKey]);
|
|
126
|
-
onFocused === null || onFocused === void 0
|
|
126
|
+
onFocused === null || onFocused === void 0 || onFocused(node[valueKey]);
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
}, [onFocused, valueKey]);
|
|
@@ -133,7 +133,7 @@ function useFocusTree(props) {
|
|
|
133
133
|
focusTreeActiveNode: focusTreeActiveNode
|
|
134
134
|
});
|
|
135
135
|
return function () {
|
|
136
|
-
unregister === null || unregister === void 0
|
|
136
|
+
unregister === null || unregister === void 0 || unregister();
|
|
137
137
|
};
|
|
138
138
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
139
139
|
}, []);
|