rsuite 5.73.0 → 5.74.0-beta.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/Animation/styles/animation.less +0 -0
- package/Animation/styles/mixin.less +0 -0
- package/Badge/styles/index.css +0 -0
- package/Badge/styles/index.less +0 -0
- package/ButtonGroup/styles/index.css +0 -0
- package/ButtonGroup/styles/index.less +0 -0
- package/Carousel/styles/index.css +0 -0
- package/Carousel/styles/index.less +0 -0
- package/CheckTree/styles/index.css +0 -1
- package/CheckTree/styles/index.less +0 -1
- package/CheckTreePicker/styles/index.css +0 -1
- package/Checkbox/styles/mixin.less +1 -1
- package/Container/styles/index.css +0 -0
- package/Container/styles/index.less +0 -0
- package/Content/styles/index.css +0 -0
- package/Content/styles/index.less +0 -0
- package/DatePicker/styles/mixin.less +0 -0
- package/Drawer/styles/mixin.less +0 -0
- package/FlexboxGrid/styles/index.css +0 -0
- package/FlexboxGrid/styles/index.less +0 -0
- package/Footer/styles/index.css +0 -0
- package/Footer/styles/index.less +0 -0
- package/Form/styles/index.css +0 -0
- package/Form/styles/index.less +0 -0
- package/FormControl/styles/index.css +0 -0
- package/FormControl/styles/index.less +0 -0
- package/FormControlLabel/styles/index.css +0 -0
- package/FormControlLabel/styles/index.less +0 -0
- package/FormErrorMessage/styles/animation.less +0 -0
- package/FormErrorMessage/styles/index.css +0 -0
- package/FormErrorMessage/styles/index.less +0 -0
- package/FormHelpText/styles/index.css +0 -0
- package/FormHelpText/styles/index.less +0 -0
- package/Grid/styles/grid-framework.less +0 -0
- package/Grid/styles/mixin.less +0 -0
- package/Header/styles/index.css +0 -0
- package/Header/styles/index.less +0 -0
- package/IconButton/styles/index.css +0 -0
- package/IconButton/styles/index.less +0 -0
- package/Input/styles/index.css +0 -0
- package/Input/styles/index.less +0 -0
- package/InputNumber/styles/index.css +0 -0
- package/InputNumber/styles/index.less +0 -0
- package/InputNumber/styles/mixin.less +0 -0
- package/List/styles/index.css +0 -0
- package/List/styles/index.less +0 -0
- package/Modal/styles/animation.less +0 -0
- package/Modal/styles/mixin.less +0 -0
- package/Notification/styles/mixin.less +0 -0
- package/Pagination/styles/mixin.less +0 -0
- package/PanelGroup/styles/index.css +0 -0
- package/PanelGroup/styles/index.less +0 -0
- package/Popover/styles/mixins.less +0 -0
- package/Progress/styles/animation.less +0 -0
- package/Radio/styles/mixin.less +0 -0
- package/RadioTile/styles/index.css +69 -0
- package/RadioTile/styles/index.less +3 -1
- package/Rate/styles/index.less +1 -1
- package/Row/styles/index.css +0 -0
- package/Row/styles/index.less +0 -0
- package/Sidebar/styles/index.css +0 -0
- package/Sidebar/styles/index.less +0 -0
- package/Sidenav/styles/mixin.less +0 -0
- package/Slider/styles/index.less +1 -1
- package/Stack/styles/index.css +0 -0
- package/Stack/styles/index.less +0 -0
- package/Table/styles/mixin.less +0 -0
- package/TagInput/styles/index.css +0 -3
- package/TagPicker/styles/index.css +0 -3
- package/TagPicker/styles/index.less +0 -2
- package/Timeline/styles/mixin.less +0 -0
- package/Tooltip/styles/index.css +0 -0
- package/Tooltip/styles/index.less +0 -0
- package/Tooltip/styles/mixins.less +0 -0
- package/Tree/styles/index.css +0 -3
- package/Tree/styles/index.less +0 -6
- package/TreePicker/styles/index.css +0 -3
- package/Uploader/styles/mixin.less +0 -0
- package/cjs/Accordion/Accordion.js +4 -1
- package/cjs/Affix/Affix.js +15 -12
- package/cjs/Affix/index.js +0 -0
- package/cjs/Animation/Bounce.js +4 -1
- package/cjs/Animation/Collapse.js +20 -17
- package/cjs/Animation/Fade.js +4 -1
- package/cjs/Animation/Slide.js +4 -1
- package/cjs/Animation/index.js +0 -0
- package/cjs/Animation/utils.js +0 -0
- package/cjs/AutoComplete/AutoComplete.d.ts +1 -2
- package/cjs/AutoComplete/AutoComplete.js +38 -35
- package/cjs/AutoComplete/index.js +0 -0
- package/cjs/Avatar/Avatar.js +23 -21
- package/cjs/Avatar/index.js +0 -0
- package/cjs/AvatarGroup/AvatarGroup.js +14 -11
- package/cjs/AvatarGroup/index.js +0 -0
- package/cjs/Badge/Badge.js +14 -11
- package/cjs/Badge/index.js +0 -0
- package/cjs/Breadcrumb/Breadcrumb.js +21 -20
- package/cjs/Breadcrumb/index.js +0 -0
- package/cjs/Button/Button.js +23 -20
- package/cjs/Button/index.js +0 -0
- package/cjs/ButtonGroup/ButtonGroup.js +16 -13
- package/cjs/ButtonGroup/index.js +0 -0
- package/cjs/ButtonToolbar/ButtonToolbar.js +11 -8
- package/cjs/ButtonToolbar/index.js +0 -0
- package/cjs/Calendar/Calendar.js +25 -25
- package/cjs/Calendar/CalendarBody.d.ts +1 -1
- package/cjs/Calendar/CalendarBody.js +5 -3
- package/cjs/Calendar/CalendarContainer.d.ts +1 -1
- package/cjs/Calendar/CalendarProvider.d.ts +1 -1
- package/cjs/Calendar/Grid/GridCell.js +8 -4
- package/cjs/Calendar/MonthDropdown/MonthDropdown.js +1 -1
- package/cjs/Calendar/MonthDropdown/MonthDropdownItem.d.ts +1 -1
- package/cjs/Calendar/MonthDropdown/MonthDropdownItem.js +7 -4
- package/cjs/Calendar/hooks/useCalendarState.d.ts +1 -1
- package/cjs/Calendar/hooks/useCalendarState.js +15 -8
- package/cjs/Carousel/Carousel.js +24 -22
- package/cjs/Carousel/index.js +0 -0
- package/cjs/CascadeTree/CascadeTree.d.ts +1 -1
- package/cjs/CascadeTree/CascadeTree.js +33 -30
- package/cjs/CascadeTree/SearchView.js +10 -6
- package/cjs/CascadeTree/TreeView.d.ts +2 -2
- package/cjs/CascadeTree/TreeView.js +5 -4
- package/cjs/CascadeTree/types.d.ts +1 -1
- package/cjs/Cascader/Cascader.js +59 -57
- package/cjs/Cascader/index.js +0 -0
- package/cjs/CheckPicker/CheckPicker.d.ts +1 -1
- package/cjs/CheckPicker/CheckPicker.js +59 -58
- package/cjs/CheckPicker/index.js +0 -0
- package/cjs/CheckTree/CheckTree.js +28 -25
- package/cjs/CheckTree/CheckTreeNode.js +4 -3
- package/cjs/CheckTree/CheckTreeView.js +15 -11
- package/cjs/CheckTreePicker/CheckTreePicker.js +82 -81
- package/cjs/CheckTreePicker/index.js +0 -0
- package/cjs/Checkbox/Checkbox.js +38 -35
- package/cjs/Checkbox/index.js +0 -0
- package/cjs/CheckboxGroup/CheckboxGroup.js +19 -16
- package/cjs/CheckboxGroup/CheckboxGroupContext.js +0 -0
- package/cjs/CheckboxGroup/index.js +0 -0
- package/cjs/Col/Col.js +9 -6
- package/cjs/Col/index.js +0 -0
- package/cjs/Container/Container.js +10 -7
- package/cjs/Container/index.js +0 -0
- package/cjs/Content/index.js +0 -0
- package/cjs/CustomProvider/CustomProvider.d.ts +69 -64
- package/cjs/CustomProvider/CustomProvider.js +9 -7
- package/cjs/CustomProvider/FormattedDate.js +2 -2
- package/cjs/CustomProvider/index.d.ts +1 -0
- package/cjs/CustomProvider/index.js +3 -1
- package/cjs/CustomProvider/types.d.ts +212 -0
- package/cjs/CustomProvider/types.js +4 -0
- package/cjs/CustomProvider/useCustom.d.ts +21 -0
- package/cjs/CustomProvider/useCustom.js +115 -0
- package/cjs/DOMHelper/isElement.js +0 -0
- package/cjs/DateInput/DateInput.js +19 -15
- package/cjs/DateInput/hooks/useDateInputState.js +3 -3
- package/cjs/DatePicker/DatePicker.js +71 -70
- package/cjs/DatePicker/PredefinedRanges.d.ts +1 -1
- package/cjs/DatePicker/hooks/useFocus.js +7 -3
- package/cjs/DateRangeInput/DateRangeInput.js +25 -21
- package/cjs/DateRangePicker/Calendar.d.ts +2 -2
- package/cjs/DateRangePicker/DateRangePicker.js +77 -76
- package/cjs/Divider/Divider.js +11 -8
- package/cjs/Divider/index.js +0 -0
- package/cjs/Drawer/Drawer.js +19 -25
- package/cjs/Drawer/index.js +0 -0
- package/cjs/Dropdown/Dropdown.js +33 -32
- package/cjs/Dropdown/DropdownContext.js +0 -0
- package/cjs/Dropdown/DropdownMenu.d.ts +2 -2
- package/cjs/Dropdown/DropdownMenu.js +21 -20
- package/cjs/Dropdown/DropdownState.js +0 -0
- package/cjs/Dropdown/index.js +0 -0
- package/cjs/Dropdown/useRenderDropdownItem.js +0 -0
- package/cjs/FlexboxGrid/FlexboxGrid.js +14 -11
- package/cjs/FlexboxGrid/index.js +0 -0
- package/cjs/Footer/index.js +0 -0
- package/cjs/Form/Form.js +32 -29
- package/cjs/FormControl/FormControl.js +33 -30
- package/cjs/FormControl/hooks/useField.js +3 -0
- package/cjs/FormControl/index.js +0 -0
- package/cjs/FormControlLabel/FormControlLabel.js +13 -10
- package/cjs/FormControlLabel/index.js +0 -0
- package/cjs/FormErrorMessage/FormErrorMessage.js +12 -9
- package/cjs/FormErrorMessage/index.js +0 -0
- package/cjs/FormGroup/FormGroup.js +10 -7
- package/cjs/FormHelpText/FormHelpText.js +14 -11
- package/cjs/FormHelpText/index.js +0 -0
- package/cjs/Grid/Grid.js +10 -7
- package/cjs/Grid/index.js +0 -0
- package/cjs/Header/index.js +0 -0
- package/cjs/Heading/Heading.js +10 -7
- package/cjs/Highlight/Highlight.js +13 -10
- package/cjs/IconButton/IconButton.d.ts +1 -1
- package/cjs/IconButton/IconButton.js +13 -10
- package/cjs/IconButton/index.js +0 -0
- package/cjs/InlineEdit/InlineEdit.js +18 -15
- package/cjs/Input/Input.js +26 -23
- package/cjs/Input/index.js +0 -0
- package/cjs/InputGroup/InputGroup.js +13 -10
- package/cjs/InputGroup/index.js +0 -0
- package/cjs/InputNumber/InputNumber.js +31 -28
- package/cjs/InputNumber/index.js +0 -0
- package/cjs/InputPicker/InputPicker.js +72 -71
- package/cjs/List/List.d.ts +1 -1
- package/cjs/List/List.js +27 -24
- package/cjs/List/helper/AutoScroller.js +0 -0
- package/cjs/List/index.js +0 -0
- package/cjs/Loader/Loader.js +17 -14
- package/cjs/Loader/index.js +0 -0
- package/cjs/MaskedInput/MaskedInput.d.ts +1 -1
- package/cjs/MaskedInput/MaskedInput.js +6 -3
- package/cjs/MaskedInput/adjustCaretPosition.js +0 -0
- package/cjs/MaskedInput/conformToMask.js +0 -0
- package/cjs/MaskedInput/index.js +0 -0
- package/cjs/MaskedInput/types.js +0 -0
- package/cjs/MaskedInput/utilities.js +0 -0
- package/cjs/Message/Message.js +23 -20
- package/cjs/Message/index.js +0 -0
- package/cjs/Modal/Modal.d.ts +4 -0
- package/cjs/Modal/Modal.js +51 -49
- package/cjs/Modal/ModalBody.js +6 -5
- package/cjs/Modal/ModalContext.d.ts +4 -0
- package/cjs/Modal/ModalHeader.js +4 -4
- package/cjs/MultiCascadeTree/MultiCascadeTree.js +37 -34
- package/cjs/MultiCascadeTree/SearchView.d.ts +1 -1
- package/cjs/MultiCascadeTree/SearchView.js +9 -5
- package/cjs/MultiCascadeTree/TreeView.d.ts +1 -1
- package/cjs/MultiCascadeTree/TreeView.js +2 -1
- package/cjs/MultiCascadeTree/types.d.ts +1 -1
- package/cjs/MultiCascader/MultiCascader.d.ts +1 -1
- package/cjs/MultiCascader/MultiCascader.js +64 -63
- package/cjs/MultiCascader/index.js +0 -0
- package/cjs/Nav/Nav.d.ts +1 -1
- package/cjs/Nav/Nav.js +24 -21
- package/cjs/Nav/NavDropdownMenu.js +5 -4
- package/cjs/Nav/index.js +0 -0
- package/cjs/Navbar/Navbar.js +11 -8
- package/cjs/Navbar/NavbarDropdownMenu.js +4 -3
- package/cjs/Navbar/index.js +0 -0
- package/cjs/Notification/Notification.js +18 -15
- package/cjs/Notification/index.js +0 -0
- package/cjs/Pagination/Pagination.d.ts +2 -2
- package/cjs/Pagination/Pagination.js +27 -26
- package/cjs/Pagination/PaginationGroup.d.ts +1 -1
- package/cjs/Pagination/PaginationGroup.js +5 -3
- package/cjs/Pagination/index.js +0 -0
- package/cjs/Panel/Panel.d.ts +1 -1
- package/cjs/Panel/Panel.js +35 -32
- package/cjs/Panel/index.js +0 -0
- package/cjs/PanelGroup/PanelGroup.d.ts +1 -1
- package/cjs/PanelGroup/PanelGroup.js +15 -12
- package/cjs/PanelGroup/index.js +0 -0
- package/cjs/Placeholder/PlaceholderGraph.d.ts +1 -1
- package/cjs/Placeholder/PlaceholderGraph.js +14 -11
- package/cjs/Placeholder/PlaceholderGrid.d.ts +1 -1
- package/cjs/Placeholder/PlaceholderGrid.js +20 -17
- package/cjs/Placeholder/PlaceholderParagraph.d.ts +1 -1
- package/cjs/Placeholder/PlaceholderParagraph.js +19 -16
- package/cjs/Placeholder/index.js +0 -0
- package/cjs/Popover/Popover.d.ts +1 -1
- package/cjs/Popover/Popover.js +17 -14
- package/cjs/Popover/index.js +0 -0
- package/cjs/Progress/ProgressCircle.d.ts +1 -1
- package/cjs/Progress/ProgressCircle.js +27 -24
- package/cjs/Progress/ProgressLine.d.ts +1 -1
- package/cjs/Progress/ProgressLine.js +19 -16
- package/cjs/Progress/index.js +0 -0
- package/cjs/Radio/Radio.d.ts +1 -1
- package/cjs/Radio/Radio.js +31 -28
- package/cjs/Radio/index.js +0 -0
- package/cjs/RadioGroup/RadioGroup.d.ts +2 -2
- package/cjs/RadioGroup/RadioGroup.js +21 -18
- package/cjs/RadioGroup/index.js +0 -0
- package/cjs/RadioTile/RadioTile.d.ts +1 -1
- package/cjs/RadioTile/RadioTile.js +22 -19
- package/cjs/RadioTileGroup/RadioTileGroup.d.ts +2 -2
- package/cjs/RadioTileGroup/RadioTileGroup.js +17 -14
- package/cjs/RangeSlider/RangeSlider.js +43 -40
- package/cjs/RangeSlider/index.js +0 -0
- package/cjs/Rate/Rate.d.ts +1 -1
- package/cjs/Rate/Rate.js +32 -29
- package/cjs/Rate/index.js +0 -0
- package/cjs/Rate/utils.js +0 -0
- package/cjs/Row/Row.d.ts +1 -1
- package/cjs/Row/Row.js +12 -9
- package/cjs/Row/index.js +0 -0
- package/cjs/SafeAnchor/SafeAnchor.d.ts +1 -1
- package/cjs/SafeAnchor/SafeAnchor.js +9 -6
- package/cjs/SafeAnchor/index.js +0 -0
- package/cjs/Schema/index.js +0 -0
- package/cjs/SelectPicker/SelectPicker.d.ts +3 -3
- package/cjs/SelectPicker/SelectPicker.js +56 -55
- package/cjs/SelectPicker/index.js +0 -0
- package/cjs/Sidebar/Sidebar.d.ts +1 -1
- package/cjs/Sidebar/Sidebar.js +13 -10
- package/cjs/Sidebar/index.js +0 -0
- package/cjs/Sidenav/ExpandedSidenavDropdownMenu.js +8 -7
- package/cjs/Sidenav/Node.js +0 -0
- package/cjs/Sidenav/Sidenav.d.ts +1 -1
- package/cjs/Sidenav/Sidenav.js +19 -16
- package/cjs/Sidenav/SidenavDropdownMenu.d.ts +2 -2
- package/cjs/Sidenav/SidenavDropdownMenu.js +7 -6
- package/cjs/Sidenav/index.js +0 -0
- package/cjs/Slider/Input.js +0 -0
- package/cjs/Slider/Slider.d.ts +1 -1
- package/cjs/Slider/Slider.js +42 -39
- package/cjs/Slider/index.js +0 -0
- package/cjs/Stack/Stack.d.ts +1 -1
- package/cjs/Stack/Stack.js +21 -19
- package/cjs/Steps/Steps.d.ts +1 -1
- package/cjs/Steps/Steps.js +17 -14
- package/cjs/Steps/index.js +0 -0
- package/cjs/Table/Table.d.ts +1 -1
- package/cjs/Table/Table.js +8 -8
- package/cjs/Table/index.d.ts +3 -1
- package/cjs/Tabs/Tabs.d.ts +1 -1
- package/cjs/Tabs/Tabs.js +21 -19
- package/cjs/Tag/Tag.d.ts +4 -1
- package/cjs/Tag/Tag.js +23 -18
- package/cjs/Tag/index.js +0 -0
- package/cjs/TagGroup/index.js +0 -0
- package/cjs/TagInput/index.js +11 -8
- package/cjs/TagPicker/index.js +10 -7
- package/cjs/Text/Text.d.ts +1 -1
- package/cjs/Text/Text.js +17 -14
- package/cjs/TimePicker/TimePicker.js +8 -6
- package/cjs/TimeRangePicker/TimeRangePicker.js +8 -5
- package/cjs/Timeline/Timeline.d.ts +1 -1
- package/cjs/Timeline/Timeline.js +15 -12
- package/cjs/Timeline/index.js +0 -0
- package/cjs/Toggle/Toggle.d.ts +2 -2
- package/cjs/Toggle/Toggle.js +26 -25
- package/cjs/Toggle/index.js +0 -0
- package/cjs/Tooltip/Tooltip.d.ts +1 -1
- package/cjs/Tooltip/Tooltip.js +14 -11
- package/cjs/Tooltip/index.js +0 -0
- package/cjs/Tree/Tree.d.ts +1 -1
- package/cjs/Tree/Tree.js +28 -25
- package/cjs/Tree/TreeNode.js +3 -2
- package/cjs/Tree/TreeNodeToggle.js +2 -1
- package/cjs/Tree/TreeView.js +14 -10
- package/cjs/Tree/hooks/useFocusTree.js +3 -2
- package/cjs/Tree/index.js +0 -0
- package/cjs/TreePicker/TreePicker.d.ts +1 -1
- package/cjs/TreePicker/TreePicker.js +89 -88
- package/cjs/TreePicker/index.js +0 -0
- package/cjs/Uploader/UploadFileItem.d.ts +3 -3
- package/cjs/Uploader/UploadFileItem.js +1 -1
- package/cjs/Uploader/UploadTrigger.d.ts +1 -1
- package/cjs/Uploader/UploadTrigger.js +1 -1
- package/cjs/Uploader/Uploader.d.ts +3 -3
- package/cjs/Uploader/Uploader.js +60 -59
- package/cjs/Uploader/index.js +0 -0
- package/cjs/Whisper/Whisper.js +13 -13
- package/cjs/Whisper/index.js +0 -0
- package/cjs/internals/CloseButton/CloseButton.js +6 -3
- package/cjs/internals/Menu/Menu.js +3 -2
- package/cjs/internals/Menu/Menubar.js +3 -3
- package/cjs/internals/Overlay/OverlayTrigger.d.ts +2 -2
- package/cjs/internals/Overlay/OverlayTrigger.js +4 -4
- package/cjs/internals/Picker/PickerIndicator.js +7 -4
- package/cjs/internals/Picker/PickerToggleTrigger.d.ts +1 -1
- package/cjs/internals/Picker/PickerToggleTrigger.js +2 -1
- package/cjs/internals/Picker/SelectedElement.d.ts +1 -1
- package/cjs/internals/Plaintext/Plaintext.js +4 -3
- package/cjs/internals/Ripple/Ripple.d.ts +1 -1
- package/cjs/internals/Ripple/Ripple.js +3 -2
- package/cjs/internals/Windowing/List.d.ts +1 -1
- package/cjs/internals/Windowing/List.js +3 -3
- package/cjs/internals/hooks/index.d.ts +0 -1
- package/cjs/internals/hooks/index.js +1 -3
- package/cjs/internals/hooks/useFocusVirtualListItem.d.ts +5 -2
- package/cjs/internals/hooks/useFocusVirtualListItem.js +23 -7
- package/cjs/internals/hooks/useToggleCaret.js +2 -2
- package/cjs/internals/utils/createComponent.js +10 -7
- package/cjs/internals/utils/date/types.d.ts +53 -0
- package/cjs/locales/ar_EG.d.ts +34 -1
- package/cjs/locales/ar_EG.js +16 -12
- package/cjs/locales/ca_ES.d.ts +38 -1
- package/cjs/locales/ca_ES.js +16 -12
- package/cjs/locales/cs_CZ.d.ts +38 -1
- package/cjs/locales/cs_CZ.js +16 -12
- package/cjs/locales/da_DK.d.ts +38 -1
- package/cjs/locales/da_DK.js +16 -12
- package/cjs/locales/de_DE.d.ts +38 -1
- package/cjs/locales/de_DE.js +16 -12
- package/cjs/locales/en_GB.d.ts +38 -1
- package/cjs/locales/en_GB.js +16 -12
- package/cjs/locales/en_US.d.ts +34 -1
- package/cjs/locales/en_US.js +16 -12
- package/cjs/locales/es_AR.d.ts +38 -1
- package/cjs/locales/es_AR.js +16 -12
- package/cjs/locales/es_ES.d.ts +38 -1
- package/cjs/locales/es_ES.js +16 -12
- package/cjs/locales/fa_IR.d.ts +34 -1
- package/cjs/locales/fa_IR.js +16 -12
- package/cjs/locales/fi_FI.d.ts +38 -5
- package/cjs/locales/fi_FI.js +16 -16
- package/cjs/locales/fr_FR.d.ts +34 -1
- package/cjs/locales/fr_FR.js +16 -12
- package/cjs/locales/hu_HU.d.ts +38 -1
- package/cjs/locales/hu_HU.js +16 -12
- package/cjs/locales/index.d.ts +1 -1
- package/cjs/locales/it_IT.d.ts +38 -1
- package/cjs/locales/it_IT.js +16 -12
- package/cjs/locales/ja_JP.d.ts +38 -1
- package/cjs/locales/ja_JP.js +16 -12
- package/cjs/locales/kk_KZ.d.ts +34 -1
- package/cjs/locales/kk_KZ.js +16 -12
- package/cjs/locales/ko_KR.d.ts +38 -1
- package/cjs/locales/ko_KR.js +16 -12
- package/cjs/locales/ne_NP.d.ts +38 -1
- package/cjs/locales/ne_NP.js +16 -12
- package/cjs/locales/nl_NL.d.ts +34 -1
- package/cjs/locales/nl_NL.js +16 -12
- package/cjs/locales/pt_BR.d.ts +34 -1
- package/cjs/locales/pt_BR.js +16 -12
- package/cjs/locales/ru_RU.d.ts +34 -1
- package/cjs/locales/ru_RU.js +16 -12
- package/cjs/locales/sv_SE.d.ts +38 -1
- package/cjs/locales/sv_SE.js +16 -12
- package/cjs/locales/tr_TR.d.ts +34 -1
- package/cjs/locales/tr_TR.js +16 -12
- package/cjs/locales/zh_CN.d.ts +34 -1
- package/cjs/locales/zh_CN.js +16 -12
- package/cjs/locales/zh_TW.d.ts +34 -1
- package/cjs/locales/zh_TW.js +16 -12
- package/cjs/useToaster/useToaster.js +3 -3
- package/dist/rsuite-no-reset-rtl.css +0 -7
- 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 +0 -7
- package/dist/rsuite-no-reset.min.css +1 -1
- package/dist/rsuite-no-reset.min.css.map +1 -1
- package/dist/rsuite-rtl.css +0 -7
- package/dist/rsuite-rtl.min.css +1 -1
- package/dist/rsuite-rtl.min.css.map +1 -1
- package/dist/rsuite.css +0 -7
- package/dist/rsuite.js +261 -262
- 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/Accordion/Accordion.js +4 -1
- package/esm/Affix/Affix.js +15 -12
- package/esm/Affix/index.js +0 -0
- package/esm/Animation/Bounce.js +4 -1
- package/esm/Animation/Collapse.js +20 -17
- package/esm/Animation/Fade.js +4 -1
- package/esm/Animation/Slide.js +4 -1
- package/esm/Animation/index.js +0 -0
- package/esm/Animation/utils.js +0 -0
- package/esm/AutoComplete/AutoComplete.d.ts +1 -2
- package/esm/AutoComplete/AutoComplete.js +38 -35
- package/esm/AutoComplete/index.js +0 -0
- package/esm/Avatar/Avatar.js +24 -22
- package/esm/Avatar/index.js +0 -0
- package/esm/AvatarGroup/AvatarGroup.js +14 -11
- package/esm/AvatarGroup/index.js +0 -0
- package/esm/Badge/Badge.js +14 -11
- package/esm/Badge/index.js +0 -0
- package/esm/Breadcrumb/Breadcrumb.js +22 -21
- package/esm/Breadcrumb/index.js +0 -0
- package/esm/Button/Button.js +23 -20
- package/esm/Button/index.js +0 -0
- package/esm/ButtonGroup/ButtonGroup.js +16 -13
- package/esm/ButtonGroup/index.js +0 -0
- package/esm/ButtonToolbar/ButtonToolbar.js +11 -8
- package/esm/ButtonToolbar/index.js +0 -0
- package/esm/Calendar/Calendar.js +27 -26
- package/esm/Calendar/CalendarBody.d.ts +1 -1
- package/esm/Calendar/CalendarBody.js +6 -4
- package/esm/Calendar/CalendarContainer.d.ts +1 -1
- package/esm/Calendar/CalendarProvider.d.ts +1 -1
- package/esm/Calendar/Grid/GridCell.js +9 -5
- package/esm/Calendar/MonthDropdown/MonthDropdown.js +1 -1
- package/esm/Calendar/MonthDropdown/MonthDropdownItem.d.ts +1 -1
- package/esm/Calendar/MonthDropdown/MonthDropdownItem.js +7 -4
- package/esm/Calendar/hooks/useCalendarState.d.ts +1 -1
- package/esm/Calendar/hooks/useCalendarState.js +16 -9
- package/esm/Carousel/Carousel.js +25 -23
- package/esm/Carousel/index.js +0 -0
- package/esm/CascadeTree/CascadeTree.d.ts +1 -1
- package/esm/CascadeTree/CascadeTree.js +33 -30
- package/esm/CascadeTree/SearchView.js +10 -6
- package/esm/CascadeTree/TreeView.d.ts +2 -2
- package/esm/CascadeTree/TreeView.js +4 -3
- package/esm/CascadeTree/types.d.ts +1 -1
- package/esm/Cascader/Cascader.js +60 -58
- package/esm/Cascader/index.js +0 -0
- package/esm/CheckPicker/CheckPicker.d.ts +1 -1
- package/esm/CheckPicker/CheckPicker.js +60 -59
- package/esm/CheckPicker/index.js +0 -0
- package/esm/CheckTree/CheckTree.js +28 -25
- package/esm/CheckTree/CheckTreeNode.js +4 -3
- package/esm/CheckTree/CheckTreeView.js +15 -11
- package/esm/CheckTreePicker/CheckTreePicker.js +83 -82
- package/esm/CheckTreePicker/index.js +0 -0
- package/esm/Checkbox/Checkbox.js +38 -35
- package/esm/Checkbox/index.js +0 -0
- package/esm/CheckboxGroup/CheckboxGroup.js +19 -16
- package/esm/CheckboxGroup/CheckboxGroupContext.js +0 -0
- package/esm/CheckboxGroup/index.js +0 -0
- package/esm/Col/Col.js +9 -6
- package/esm/Col/index.js +0 -0
- package/esm/Container/Container.js +10 -7
- package/esm/Container/index.js +0 -0
- package/esm/Content/index.js +0 -0
- package/esm/CustomProvider/CustomProvider.d.ts +69 -64
- package/esm/CustomProvider/CustomProvider.js +8 -8
- package/esm/CustomProvider/FormattedDate.js +1 -1
- package/esm/CustomProvider/index.d.ts +1 -0
- package/esm/CustomProvider/index.js +1 -0
- package/esm/CustomProvider/types.d.ts +212 -0
- package/esm/CustomProvider/types.js +2 -0
- package/esm/CustomProvider/useCustom.d.ts +21 -0
- package/esm/CustomProvider/useCustom.js +109 -0
- package/esm/DOMHelper/isElement.js +0 -0
- package/esm/DateInput/DateInput.js +20 -16
- package/esm/DateInput/hooks/useDateInputState.js +2 -2
- package/esm/DatePicker/DatePicker.js +72 -71
- package/esm/DatePicker/PredefinedRanges.d.ts +1 -1
- package/esm/DatePicker/hooks/useFocus.js +8 -4
- package/esm/DateRangeInput/DateRangeInput.js +26 -22
- package/esm/DateRangePicker/Calendar.d.ts +2 -2
- package/esm/DateRangePicker/DateRangePicker.js +77 -76
- package/esm/Divider/Divider.js +11 -8
- package/esm/Divider/index.js +0 -0
- package/esm/Drawer/Drawer.js +19 -23
- package/esm/Drawer/index.js +0 -0
- package/esm/Dropdown/Dropdown.js +33 -32
- package/esm/Dropdown/DropdownContext.js +0 -0
- package/esm/Dropdown/DropdownMenu.d.ts +2 -2
- package/esm/Dropdown/DropdownMenu.js +6 -5
- package/esm/Dropdown/DropdownState.js +0 -0
- package/esm/Dropdown/index.js +0 -0
- package/esm/Dropdown/useRenderDropdownItem.js +0 -0
- package/esm/FlexboxGrid/FlexboxGrid.js +14 -11
- package/esm/FlexboxGrid/index.js +0 -0
- package/esm/Footer/index.js +0 -0
- package/esm/Form/Form.js +32 -29
- package/esm/FormControl/FormControl.js +34 -31
- package/esm/FormControl/hooks/useField.js +4 -1
- package/esm/FormControl/index.js +0 -0
- package/esm/FormControlLabel/FormControlLabel.js +13 -10
- package/esm/FormControlLabel/index.js +0 -0
- package/esm/FormErrorMessage/FormErrorMessage.js +12 -9
- package/esm/FormErrorMessage/index.js +0 -0
- package/esm/FormGroup/FormGroup.js +10 -7
- package/esm/FormHelpText/FormHelpText.js +14 -11
- package/esm/FormHelpText/index.js +0 -0
- package/esm/Grid/Grid.js +10 -7
- package/esm/Grid/index.js +0 -0
- package/esm/Header/index.js +0 -0
- package/esm/Heading/Heading.js +10 -7
- package/esm/Highlight/Highlight.js +13 -10
- package/esm/IconButton/IconButton.d.ts +1 -1
- package/esm/IconButton/IconButton.js +13 -10
- package/esm/IconButton/index.js +0 -0
- package/esm/InlineEdit/InlineEdit.js +18 -15
- package/esm/Input/Input.js +26 -23
- package/esm/Input/index.js +0 -0
- package/esm/InputGroup/InputGroup.js +13 -10
- package/esm/InputGroup/index.js +0 -0
- package/esm/InputNumber/InputNumber.js +31 -28
- package/esm/InputNumber/index.js +0 -0
- package/esm/InputPicker/InputPicker.js +73 -72
- package/esm/List/List.d.ts +1 -1
- package/esm/List/List.js +27 -24
- package/esm/List/helper/AutoScroller.js +0 -0
- package/esm/List/index.js +0 -0
- package/esm/Loader/Loader.js +17 -14
- package/esm/Loader/index.js +0 -0
- package/esm/MaskedInput/MaskedInput.d.ts +1 -1
- package/esm/MaskedInput/MaskedInput.js +6 -3
- package/esm/MaskedInput/adjustCaretPosition.js +0 -0
- package/esm/MaskedInput/conformToMask.js +0 -0
- package/esm/MaskedInput/index.js +0 -0
- package/esm/MaskedInput/types.js +0 -0
- package/esm/MaskedInput/utilities.js +0 -0
- package/esm/Message/Message.js +23 -20
- package/esm/Message/index.js +0 -0
- package/esm/Modal/Modal.d.ts +4 -0
- package/esm/Modal/Modal.js +52 -50
- package/esm/Modal/ModalBody.js +6 -5
- package/esm/Modal/ModalContext.d.ts +4 -0
- package/esm/Modal/ModalHeader.js +4 -4
- package/esm/MultiCascadeTree/MultiCascadeTree.js +37 -34
- package/esm/MultiCascadeTree/SearchView.d.ts +1 -1
- package/esm/MultiCascadeTree/SearchView.js +9 -5
- package/esm/MultiCascadeTree/TreeView.d.ts +1 -1
- package/esm/MultiCascadeTree/TreeView.js +2 -1
- package/esm/MultiCascadeTree/types.d.ts +1 -1
- package/esm/MultiCascader/MultiCascader.d.ts +1 -1
- package/esm/MultiCascader/MultiCascader.js +66 -65
- package/esm/MultiCascader/index.js +0 -0
- package/esm/Nav/Nav.d.ts +1 -1
- package/esm/Nav/Nav.js +24 -21
- package/esm/Nav/NavDropdownMenu.js +5 -4
- package/esm/Nav/index.js +0 -0
- package/esm/Navbar/Navbar.js +11 -8
- package/esm/Navbar/NavbarDropdownMenu.js +5 -4
- package/esm/Navbar/index.js +0 -0
- package/esm/Notification/Notification.js +18 -15
- package/esm/Notification/index.js +0 -0
- package/esm/Pagination/Pagination.d.ts +2 -2
- package/esm/Pagination/Pagination.js +28 -27
- package/esm/Pagination/PaginationGroup.d.ts +1 -1
- package/esm/Pagination/PaginationGroup.js +6 -4
- package/esm/Pagination/index.js +0 -0
- package/esm/Panel/Panel.d.ts +1 -1
- package/esm/Panel/Panel.js +35 -32
- package/esm/Panel/index.js +0 -0
- package/esm/PanelGroup/PanelGroup.d.ts +1 -1
- package/esm/PanelGroup/PanelGroup.js +15 -12
- package/esm/PanelGroup/index.js +0 -0
- package/esm/Placeholder/PlaceholderGraph.d.ts +1 -1
- package/esm/Placeholder/PlaceholderGraph.js +14 -11
- package/esm/Placeholder/PlaceholderGrid.d.ts +1 -1
- package/esm/Placeholder/PlaceholderGrid.js +20 -17
- package/esm/Placeholder/PlaceholderParagraph.d.ts +1 -1
- package/esm/Placeholder/PlaceholderParagraph.js +19 -16
- package/esm/Placeholder/index.js +0 -0
- package/esm/Popover/Popover.d.ts +1 -1
- package/esm/Popover/Popover.js +17 -14
- package/esm/Popover/index.js +0 -0
- package/esm/Progress/ProgressCircle.d.ts +1 -1
- package/esm/Progress/ProgressCircle.js +27 -24
- package/esm/Progress/ProgressLine.d.ts +1 -1
- package/esm/Progress/ProgressLine.js +19 -16
- package/esm/Progress/index.js +0 -0
- package/esm/Radio/Radio.d.ts +1 -1
- package/esm/Radio/Radio.js +31 -28
- package/esm/Radio/index.js +0 -0
- package/esm/RadioGroup/RadioGroup.d.ts +2 -2
- package/esm/RadioGroup/RadioGroup.js +21 -18
- package/esm/RadioGroup/index.js +0 -0
- package/esm/RadioTile/RadioTile.d.ts +1 -1
- package/esm/RadioTile/RadioTile.js +22 -19
- package/esm/RadioTileGroup/RadioTileGroup.d.ts +2 -2
- package/esm/RadioTileGroup/RadioTileGroup.js +17 -14
- package/esm/RangeSlider/RangeSlider.js +43 -40
- package/esm/RangeSlider/index.js +0 -0
- package/esm/Rate/Rate.d.ts +1 -1
- package/esm/Rate/Rate.js +32 -29
- package/esm/Rate/index.js +0 -0
- package/esm/Rate/utils.js +0 -0
- package/esm/Row/Row.d.ts +1 -1
- package/esm/Row/Row.js +12 -9
- package/esm/Row/index.js +0 -0
- package/esm/SafeAnchor/SafeAnchor.d.ts +1 -1
- package/esm/SafeAnchor/SafeAnchor.js +9 -6
- package/esm/SafeAnchor/index.js +0 -0
- package/esm/Schema/index.js +0 -0
- package/esm/SelectPicker/SelectPicker.d.ts +3 -3
- package/esm/SelectPicker/SelectPicker.js +57 -56
- package/esm/SelectPicker/index.js +0 -0
- package/esm/Sidebar/Sidebar.d.ts +1 -1
- package/esm/Sidebar/Sidebar.js +13 -10
- package/esm/Sidebar/index.js +0 -0
- package/esm/Sidenav/ExpandedSidenavDropdownMenu.js +8 -7
- package/esm/Sidenav/Node.js +0 -0
- package/esm/Sidenav/Sidenav.d.ts +1 -1
- package/esm/Sidenav/Sidenav.js +19 -16
- package/esm/Sidenav/SidenavDropdownMenu.d.ts +2 -2
- package/esm/Sidenav/SidenavDropdownMenu.js +7 -6
- package/esm/Sidenav/index.js +0 -0
- package/esm/Slider/Input.js +0 -0
- package/esm/Slider/Slider.d.ts +1 -1
- package/esm/Slider/Slider.js +43 -40
- package/esm/Slider/index.js +0 -0
- package/esm/Stack/Stack.d.ts +1 -1
- package/esm/Stack/Stack.js +22 -20
- package/esm/Steps/Steps.d.ts +1 -1
- package/esm/Steps/Steps.js +17 -14
- package/esm/Steps/index.js +0 -0
- package/esm/Table/Table.d.ts +1 -1
- package/esm/Table/Table.js +8 -8
- package/esm/Table/index.d.ts +3 -1
- package/esm/Tabs/Tabs.d.ts +1 -1
- package/esm/Tabs/Tabs.js +21 -19
- package/esm/Tag/Tag.d.ts +4 -1
- package/esm/Tag/Tag.js +23 -18
- package/esm/Tag/index.js +0 -0
- package/esm/TagGroup/index.js +0 -0
- package/esm/TagInput/index.js +11 -8
- package/esm/TagPicker/index.js +10 -7
- package/esm/Text/Text.d.ts +1 -1
- package/esm/Text/Text.js +17 -14
- package/esm/TimePicker/TimePicker.js +8 -6
- package/esm/TimeRangePicker/TimeRangePicker.js +8 -5
- package/esm/Timeline/Timeline.d.ts +1 -1
- package/esm/Timeline/Timeline.js +15 -12
- package/esm/Timeline/index.js +0 -0
- package/esm/Toggle/Toggle.d.ts +2 -2
- package/esm/Toggle/Toggle.js +27 -26
- package/esm/Toggle/index.js +0 -0
- package/esm/Tooltip/Tooltip.d.ts +1 -1
- package/esm/Tooltip/Tooltip.js +14 -11
- package/esm/Tooltip/index.js +0 -0
- package/esm/Tree/Tree.d.ts +1 -1
- package/esm/Tree/Tree.js +28 -25
- package/esm/Tree/TreeNode.js +3 -2
- package/esm/Tree/TreeNodeToggle.js +2 -1
- package/esm/Tree/TreeView.js +14 -10
- package/esm/Tree/hooks/useFocusTree.js +3 -2
- package/esm/Tree/index.js +0 -0
- package/esm/TreePicker/TreePicker.d.ts +1 -1
- package/esm/TreePicker/TreePicker.js +89 -88
- package/esm/TreePicker/index.js +0 -0
- package/esm/Uploader/UploadFileItem.d.ts +3 -3
- package/esm/Uploader/UploadFileItem.js +1 -1
- package/esm/Uploader/UploadTrigger.d.ts +1 -1
- package/esm/Uploader/UploadTrigger.js +1 -1
- package/esm/Uploader/Uploader.d.ts +3 -3
- package/esm/Uploader/Uploader.js +61 -60
- package/esm/Uploader/index.js +0 -0
- package/esm/Whisper/Whisper.js +14 -12
- package/esm/Whisper/index.js +0 -0
- package/esm/internals/CloseButton/CloseButton.js +7 -4
- package/esm/internals/Menu/Menu.js +4 -3
- package/esm/internals/Menu/Menubar.js +3 -3
- package/esm/internals/Overlay/OverlayTrigger.d.ts +2 -2
- package/esm/internals/Overlay/OverlayTrigger.js +4 -4
- package/esm/internals/Picker/PickerIndicator.js +6 -3
- package/esm/internals/Picker/PickerToggleTrigger.d.ts +1 -1
- package/esm/internals/Picker/PickerToggleTrigger.js +2 -1
- package/esm/internals/Picker/SelectedElement.d.ts +1 -1
- package/esm/internals/Plaintext/Plaintext.js +5 -4
- package/esm/internals/Ripple/Ripple.d.ts +1 -1
- package/esm/internals/Ripple/Ripple.js +2 -1
- package/esm/internals/Windowing/List.d.ts +1 -1
- package/esm/internals/Windowing/List.js +2 -2
- package/esm/internals/hooks/index.d.ts +0 -1
- package/esm/internals/hooks/index.js +0 -1
- package/esm/internals/hooks/useFocusVirtualListItem.d.ts +5 -2
- package/esm/internals/hooks/useFocusVirtualListItem.js +23 -7
- package/esm/internals/hooks/useToggleCaret.js +2 -2
- package/esm/internals/utils/createComponent.js +10 -7
- package/esm/internals/utils/date/types.d.ts +53 -0
- package/esm/locales/ar_EG.d.ts +34 -1
- package/esm/locales/ar_EG.js +16 -12
- package/esm/locales/ca_ES.d.ts +38 -1
- package/esm/locales/ca_ES.js +16 -12
- package/esm/locales/cs_CZ.d.ts +38 -1
- package/esm/locales/cs_CZ.js +16 -12
- package/esm/locales/da_DK.d.ts +38 -1
- package/esm/locales/da_DK.js +16 -12
- package/esm/locales/de_DE.d.ts +38 -1
- package/esm/locales/de_DE.js +16 -12
- package/esm/locales/en_GB.d.ts +38 -1
- package/esm/locales/en_GB.js +16 -12
- package/esm/locales/en_US.d.ts +34 -1
- package/esm/locales/en_US.js +16 -12
- package/esm/locales/es_AR.d.ts +38 -1
- package/esm/locales/es_AR.js +16 -12
- package/esm/locales/es_ES.d.ts +38 -1
- package/esm/locales/es_ES.js +16 -12
- package/esm/locales/fa_IR.d.ts +34 -1
- package/esm/locales/fa_IR.js +16 -12
- package/esm/locales/fi_FI.d.ts +38 -5
- package/esm/locales/fi_FI.js +16 -16
- package/esm/locales/fr_FR.d.ts +34 -1
- package/esm/locales/fr_FR.js +16 -12
- package/esm/locales/hu_HU.d.ts +38 -1
- package/esm/locales/hu_HU.js +16 -12
- package/esm/locales/index.d.ts +1 -1
- package/esm/locales/it_IT.d.ts +38 -1
- package/esm/locales/it_IT.js +16 -12
- package/esm/locales/ja_JP.d.ts +38 -1
- package/esm/locales/ja_JP.js +16 -12
- package/esm/locales/kk_KZ.d.ts +34 -1
- package/esm/locales/kk_KZ.js +16 -12
- package/esm/locales/ko_KR.d.ts +38 -1
- package/esm/locales/ko_KR.js +16 -12
- package/esm/locales/ne_NP.d.ts +38 -1
- package/esm/locales/ne_NP.js +16 -12
- package/esm/locales/nl_NL.d.ts +34 -1
- package/esm/locales/nl_NL.js +16 -12
- package/esm/locales/pt_BR.d.ts +34 -1
- package/esm/locales/pt_BR.js +16 -12
- package/esm/locales/ru_RU.d.ts +34 -1
- package/esm/locales/ru_RU.js +16 -12
- package/esm/locales/sv_SE.d.ts +38 -1
- package/esm/locales/sv_SE.js +16 -12
- package/esm/locales/tr_TR.d.ts +34 -1
- package/esm/locales/tr_TR.js +16 -12
- package/esm/locales/zh_CN.d.ts +34 -1
- package/esm/locales/zh_CN.js +16 -12
- package/esm/locales/zh_TW.d.ts +34 -1
- package/esm/locales/zh_TW.js +16 -12
- package/esm/useToaster/useToaster.js +4 -4
- package/package.json +1 -1
- package/styles/mixins/hacks.less +0 -0
- package/styles/mixins/menu.less +0 -0
- package/styles/mixins/utilities.less +0 -0
- package/styles/scaffolding.less +0 -0
- package/styles/typography.less +0 -0
- package/toaster/styles/animation.less +0 -0
- package/cjs/Drawer/DrawerContext.d.ts +0 -9
- package/cjs/Drawer/DrawerContext.js +0 -9
- package/cjs/internals/hooks/useCustom.d.ts +0 -7
- package/cjs/internals/hooks/useCustom.js +0 -80
- package/esm/Drawer/DrawerContext.d.ts +0 -9
- package/esm/Drawer/DrawerContext.js +0 -4
- package/esm/internals/hooks/useCustom.d.ts +0 -7
- package/esm/internals/hooks/useCustom.js +0 -74
package/esm/TagInput/index.js
CHANGED
|
@@ -5,20 +5,23 @@ var _excluded = ["tagProps", "trigger", "value", "defaultValue", "onTagRemove"];
|
|
|
5
5
|
import React, { useMemo } from 'react';
|
|
6
6
|
import InputPicker from "../InputPicker/InputPicker.js";
|
|
7
7
|
import { TagProvider } from "../InputPicker/InputPickerContext.js";
|
|
8
|
+
import { useCustom } from "../CustomProvider/index.js";
|
|
8
9
|
/**
|
|
9
10
|
* The `TagInput` component is an enhancement of Input and supports input tags and management tags.
|
|
10
11
|
*
|
|
11
12
|
* @see https://rsuitejs.com/components/tag-input
|
|
12
13
|
*/
|
|
13
14
|
var TagInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
var _useCustom = useCustom('TagInput', props),
|
|
16
|
+
propsWithDefaults = _useCustom.propsWithDefaults;
|
|
17
|
+
var _propsWithDefaults$ta = propsWithDefaults.tagProps,
|
|
18
|
+
tagProps = _propsWithDefaults$ta === void 0 ? {} : _propsWithDefaults$ta,
|
|
19
|
+
_propsWithDefaults$tr = propsWithDefaults.trigger,
|
|
20
|
+
trigger = _propsWithDefaults$tr === void 0 ? 'Enter' : _propsWithDefaults$tr,
|
|
21
|
+
value = propsWithDefaults.value,
|
|
22
|
+
defaultValue = propsWithDefaults.defaultValue,
|
|
23
|
+
onTagRemove = propsWithDefaults.onTagRemove,
|
|
24
|
+
rest = _objectWithoutPropertiesLoose(propsWithDefaults, _excluded);
|
|
22
25
|
var contextValue = useMemo(function () {
|
|
23
26
|
return {
|
|
24
27
|
multi: true,
|
package/esm/TagPicker/index.js
CHANGED
|
@@ -5,19 +5,22 @@ var _excluded = ["tagProps", "trigger", "onTagRemove", "renderMenuItemCheckbox"]
|
|
|
5
5
|
import React, { useMemo } from 'react';
|
|
6
6
|
import InputPicker from "../InputPicker/InputPicker.js";
|
|
7
7
|
import { TagProvider } from "../InputPicker/InputPickerContext.js";
|
|
8
|
+
import { useCustom } from "../CustomProvider/index.js";
|
|
8
9
|
/**
|
|
9
10
|
* `TagPicker` component enables multi-selection by tags and supports new options.
|
|
10
11
|
*
|
|
11
12
|
* @see https://rsuitejs.com/components/tag-picker/
|
|
12
13
|
*/
|
|
13
14
|
var TagPicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
var _useCustom = useCustom('TagPicker', props),
|
|
16
|
+
propsWithDefaults = _useCustom.propsWithDefaults;
|
|
17
|
+
var _propsWithDefaults$ta = propsWithDefaults.tagProps,
|
|
18
|
+
tagProps = _propsWithDefaults$ta === void 0 ? {} : _propsWithDefaults$ta,
|
|
19
|
+
_propsWithDefaults$tr = propsWithDefaults.trigger,
|
|
20
|
+
trigger = _propsWithDefaults$tr === void 0 ? 'Enter' : _propsWithDefaults$tr,
|
|
21
|
+
onTagRemove = propsWithDefaults.onTagRemove,
|
|
22
|
+
renderMenuItemCheckbox = propsWithDefaults.renderMenuItemCheckbox,
|
|
23
|
+
rest = _objectWithoutPropertiesLoose(propsWithDefaults, _excluded);
|
|
21
24
|
var contextValue = useMemo(function () {
|
|
22
25
|
return {
|
|
23
26
|
multi: true,
|
package/esm/Text/Text.d.ts
CHANGED
package/esm/Text/Text.js
CHANGED
|
@@ -5,6 +5,7 @@ var _excluded = ["as", "align", "classPrefix", "color", "className", "maxLines",
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import { useClassNames } from "../internals/hooks/index.js";
|
|
8
|
+
import { useCustom } from "../CustomProvider/index.js";
|
|
8
9
|
import { oneOf } from "../internals/propTypes/index.js";
|
|
9
10
|
var fontSizeMap = {
|
|
10
11
|
sm: 12,
|
|
@@ -20,20 +21,22 @@ var fontSizeMap = {
|
|
|
20
21
|
* @see https://rsuitejs.com/components/text
|
|
21
22
|
*/
|
|
22
23
|
var Text = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
24
|
+
var _useCustom = useCustom('Text', props),
|
|
25
|
+
propsWithDefaults = _useCustom.propsWithDefaults;
|
|
26
|
+
var _propsWithDefaults$as = propsWithDefaults.as,
|
|
27
|
+
Component = _propsWithDefaults$as === void 0 ? 'p' : _propsWithDefaults$as,
|
|
28
|
+
align = propsWithDefaults.align,
|
|
29
|
+
_propsWithDefaults$cl = propsWithDefaults.classPrefix,
|
|
30
|
+
classPrefix = _propsWithDefaults$cl === void 0 ? 'text' : _propsWithDefaults$cl,
|
|
31
|
+
color = propsWithDefaults.color,
|
|
32
|
+
className = propsWithDefaults.className,
|
|
33
|
+
maxLines = propsWithDefaults.maxLines,
|
|
34
|
+
weight = propsWithDefaults.weight,
|
|
35
|
+
muted = propsWithDefaults.muted,
|
|
36
|
+
transform = propsWithDefaults.transform,
|
|
37
|
+
size = propsWithDefaults.size,
|
|
38
|
+
style = propsWithDefaults.style,
|
|
39
|
+
rest = _objectWithoutPropertiesLoose(propsWithDefaults, _excluded);
|
|
37
40
|
var _useClassNames = useClassNames(classPrefix),
|
|
38
41
|
withClassPrefix = _useClassNames.withClassPrefix,
|
|
39
42
|
merge = _useClassNames.merge;
|
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
import React, { useMemo } from 'react';
|
|
4
4
|
import DatePicker from "../DatePicker/index.js";
|
|
5
|
-
import { useCustom } from "../
|
|
5
|
+
import { useCustom } from "../CustomProvider/index.js";
|
|
6
6
|
var TimePicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
7
|
-
var _useCustom = useCustom('
|
|
8
|
-
|
|
7
|
+
var _useCustom = useCustom('TimePicker', props),
|
|
8
|
+
propsWithDefaults = _useCustom.propsWithDefaults,
|
|
9
|
+
getLocale = _useCustom.getLocale;
|
|
10
|
+
var locale = getLocale('DateTimeFormats');
|
|
9
11
|
var defaultRanges = useMemo(function () {
|
|
10
12
|
return [{
|
|
11
|
-
label: locale.now,
|
|
13
|
+
label: locale === null || locale === void 0 ? void 0 : locale.now,
|
|
12
14
|
value: function value() {
|
|
13
15
|
return new Date();
|
|
14
16
|
}
|
|
@@ -16,9 +18,9 @@ var TimePicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
16
18
|
}, [locale]);
|
|
17
19
|
return /*#__PURE__*/React.createElement(DatePicker, _extends({
|
|
18
20
|
ref: ref,
|
|
19
|
-
format: locale.shortTimeFormat,
|
|
21
|
+
format: locale === null || locale === void 0 ? void 0 : locale.shortTimeFormat,
|
|
20
22
|
ranges: defaultRanges
|
|
21
|
-
},
|
|
23
|
+
}, propsWithDefaults));
|
|
22
24
|
});
|
|
23
25
|
TimePicker.displayName = 'TimePicker';
|
|
24
26
|
export default TimePicker;
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { useCustom } from "../internals/hooks/index.js";
|
|
5
4
|
import DateRangePicker from "../DateRangePicker/index.js";
|
|
5
|
+
import { useCustom } from "../CustomProvider/index.js";
|
|
6
6
|
var defaultRanges = [];
|
|
7
7
|
var TimeRangePicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
8
|
-
var _useCustom = useCustom('
|
|
9
|
-
|
|
8
|
+
var _useCustom = useCustom('TimeRangePicker', props),
|
|
9
|
+
propsWithDefaults = _useCustom.propsWithDefaults,
|
|
10
|
+
getLocale = _useCustom.getLocale;
|
|
11
|
+
var _getLocale = getLocale('DateTimeFormats'),
|
|
12
|
+
shortTimeFormat = _getLocale.shortTimeFormat;
|
|
10
13
|
return /*#__PURE__*/React.createElement(DateRangePicker, _extends({
|
|
11
14
|
ref: ref,
|
|
12
15
|
showHeader: false,
|
|
13
|
-
format:
|
|
16
|
+
format: shortTimeFormat,
|
|
14
17
|
ranges: defaultRanges
|
|
15
|
-
},
|
|
18
|
+
}, propsWithDefaults));
|
|
16
19
|
});
|
|
17
20
|
TimeRangePicker.displayName = 'TimeRangePicker';
|
|
18
21
|
export default TimeRangePicker;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import TimelineItem from './TimelineItem';
|
|
3
|
-
import { WithAsProps, RsRefForwardingComponent } from '../internals/types';
|
|
3
|
+
import type { WithAsProps, RsRefForwardingComponent } from '../internals/types';
|
|
4
4
|
export interface TimelineProps extends WithAsProps {
|
|
5
5
|
/** The content of the component */
|
|
6
6
|
children?: React.ReactNode;
|
package/esm/Timeline/Timeline.js
CHANGED
|
@@ -7,6 +7,7 @@ import PropTypes from 'prop-types';
|
|
|
7
7
|
import some from 'lodash/some';
|
|
8
8
|
import TimelineItem from "./TimelineItem.js";
|
|
9
9
|
import { useClassNames } from "../internals/hooks/index.js";
|
|
10
|
+
import { useCustom } from "../CustomProvider/index.js";
|
|
10
11
|
import { ReactChildren } from "../internals/utils/index.js";
|
|
11
12
|
import { oneOf } from "../internals/propTypes/index.js";
|
|
12
13
|
/**
|
|
@@ -15,18 +16,20 @@ import { oneOf } from "../internals/propTypes/index.js";
|
|
|
15
16
|
* @see https://rsuitejs.com/components/timeline
|
|
16
17
|
*/
|
|
17
18
|
var Timeline = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
var _useCustom = useCustom('Timeline', props),
|
|
20
|
+
propsWithDefaults = _useCustom.propsWithDefaults;
|
|
21
|
+
var children = propsWithDefaults.children,
|
|
22
|
+
_propsWithDefaults$as = propsWithDefaults.as,
|
|
23
|
+
Component = _propsWithDefaults$as === void 0 ? 'ul' : _propsWithDefaults$as,
|
|
24
|
+
_propsWithDefaults$cl = propsWithDefaults.classPrefix,
|
|
25
|
+
classPrefix = _propsWithDefaults$cl === void 0 ? 'timeline' : _propsWithDefaults$cl,
|
|
26
|
+
className = propsWithDefaults.className,
|
|
27
|
+
_propsWithDefaults$al = propsWithDefaults.align,
|
|
28
|
+
align = _propsWithDefaults$al === void 0 ? 'left' : _propsWithDefaults$al,
|
|
29
|
+
endless = propsWithDefaults.endless,
|
|
30
|
+
_propsWithDefaults$is = propsWithDefaults.isItemActive,
|
|
31
|
+
isItemActive = _propsWithDefaults$is === void 0 ? Timeline.ACTIVE_LAST : _propsWithDefaults$is,
|
|
32
|
+
rest = _objectWithoutPropertiesLoose(propsWithDefaults, _excluded);
|
|
30
33
|
var _useClassNames = useClassNames(classPrefix),
|
|
31
34
|
merge = _useClassNames.merge,
|
|
32
35
|
withClassPrefix = _useClassNames.withClassPrefix;
|
package/esm/Timeline/index.js
CHANGED
|
File without changes
|
package/esm/Toggle/Toggle.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { WithAsProps, TypeAttributes, RsRefForwardingComponent } from '../internals/types';
|
|
3
|
-
import { ToggleLocale } from '../locales';
|
|
2
|
+
import type { WithAsProps, TypeAttributes, RsRefForwardingComponent } from '../internals/types';
|
|
3
|
+
import type { ToggleLocale } from '../locales';
|
|
4
4
|
export interface ToggleProps extends WithAsProps, Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'onChange'> {
|
|
5
5
|
/**
|
|
6
6
|
* The color of the toggle.
|
package/esm/Toggle/Toggle.js
CHANGED
|
@@ -4,43 +4,44 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
4
4
|
var _excluded = ["as", "disabled", "readOnly", "loading", "plaintext", "children", "className", "color", "checkedChildren", "unCheckedChildren", "classPrefix", "checked", "defaultChecked", "size", "locale", "onChange"];
|
|
5
5
|
import React, { useRef } from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
|
-
import { useClassNames, useControlled, useCustom, useUniqueId, useEventCallback } from "../internals/hooks/index.js";
|
|
8
|
-
import { partitionHTMLProps } from "../internals/utils/index.js";
|
|
9
|
-
import { oneOf } from "../internals/propTypes/index.js";
|
|
10
7
|
import Plaintext from "../internals/Plaintext/index.js";
|
|
11
8
|
import Loader from "../Loader/index.js";
|
|
9
|
+
import { useClassNames, useControlled, useUniqueId, useEventCallback } from "../internals/hooks/index.js";
|
|
10
|
+
import { partitionHTMLProps } from "../internals/utils/index.js";
|
|
11
|
+
import { oneOf } from "../internals/propTypes/index.js";
|
|
12
|
+
import { useCustom } from "../CustomProvider/index.js";
|
|
12
13
|
/**
|
|
13
14
|
* The `Toggle` component is used to activate or deactivate an element.
|
|
14
15
|
*
|
|
15
16
|
* @see https://rsuitejs.com/components/toggle
|
|
16
17
|
*/
|
|
17
18
|
var Toggle = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
19
|
+
var _useCustom = useCustom('Toggle', props),
|
|
20
|
+
propsWithDefaults = _useCustom.propsWithDefaults;
|
|
21
|
+
var _propsWithDefaults$as = propsWithDefaults.as,
|
|
22
|
+
Component = _propsWithDefaults$as === void 0 ? 'span' : _propsWithDefaults$as,
|
|
23
|
+
disabled = propsWithDefaults.disabled,
|
|
24
|
+
readOnly = propsWithDefaults.readOnly,
|
|
25
|
+
_propsWithDefaults$lo = propsWithDefaults.loading,
|
|
26
|
+
loading = _propsWithDefaults$lo === void 0 ? false : _propsWithDefaults$lo,
|
|
27
|
+
plaintext = propsWithDefaults.plaintext,
|
|
28
|
+
children = propsWithDefaults.children,
|
|
29
|
+
className = propsWithDefaults.className,
|
|
30
|
+
color = propsWithDefaults.color,
|
|
31
|
+
checkedChildren = propsWithDefaults.checkedChildren,
|
|
32
|
+
unCheckedChildren = propsWithDefaults.unCheckedChildren,
|
|
33
|
+
_propsWithDefaults$cl = propsWithDefaults.classPrefix,
|
|
34
|
+
classPrefix = _propsWithDefaults$cl === void 0 ? 'toggle' : _propsWithDefaults$cl,
|
|
35
|
+
checkedProp = propsWithDefaults.checked,
|
|
36
|
+
defaultChecked = propsWithDefaults.defaultChecked,
|
|
37
|
+
size = propsWithDefaults.size,
|
|
38
|
+
locale = propsWithDefaults.locale,
|
|
39
|
+
onChange = propsWithDefaults.onChange,
|
|
40
|
+
rest = _objectWithoutPropertiesLoose(propsWithDefaults, _excluded);
|
|
38
41
|
var inputRef = useRef(null);
|
|
39
42
|
var _useControlled = useControlled(checkedProp, defaultChecked),
|
|
40
43
|
checked = _useControlled[0],
|
|
41
44
|
setChecked = _useControlled[1];
|
|
42
|
-
var _useCustom = useCustom('Toggle', localeProp),
|
|
43
|
-
locale = _useCustom.locale;
|
|
44
45
|
var _useClassNames = useClassNames(classPrefix),
|
|
45
46
|
merge = _useClassNames.merge,
|
|
46
47
|
withClassPrefix = _useClassNames.withClassPrefix,
|
|
@@ -51,7 +52,7 @@ var Toggle = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
51
52
|
loading: loading
|
|
52
53
|
}));
|
|
53
54
|
var inner = checked ? checkedChildren : unCheckedChildren;
|
|
54
|
-
var label = checked ? locale.on : locale.off;
|
|
55
|
+
var label = checked ? locale === null || locale === void 0 ? void 0 : locale.on : locale === null || locale === void 0 ? void 0 : locale.off;
|
|
55
56
|
var labelId = useUniqueId('rs-label');
|
|
56
57
|
var innerId = inner ? labelId + '-inner' : undefined;
|
|
57
58
|
var labelledby = children ? labelId : innerId;
|
package/esm/Toggle/index.js
CHANGED
|
File without changes
|
package/esm/Tooltip/Tooltip.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TypeAttributes, WithAsProps, RsRefForwardingComponent } from '../internals/types';
|
|
2
|
+
import type { TypeAttributes, WithAsProps, RsRefForwardingComponent } from '../internals/types';
|
|
3
3
|
export interface TooltipProps extends WithAsProps {
|
|
4
4
|
/** Dispaly placement */
|
|
5
5
|
placement?: TypeAttributes.Placement;
|
package/esm/Tooltip/Tooltip.js
CHANGED
|
@@ -5,23 +5,26 @@ var _excluded = ["as", "className", "classPrefix", "children", "style", "visible
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import { useClassNames } from "../internals/hooks/index.js";
|
|
8
|
+
import { useCustom } from "../CustomProvider/index.js";
|
|
8
9
|
/**
|
|
9
10
|
* The `Tooltip` component is used to describe a element.
|
|
10
11
|
*
|
|
11
12
|
* @see https://rsuitejs.com/components/tooltip
|
|
12
13
|
*/
|
|
13
14
|
var Tooltip = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
15
|
+
var _useCustom = useCustom('Tooltip', props),
|
|
16
|
+
propsWithDefaults = _useCustom.propsWithDefaults;
|
|
17
|
+
var _propsWithDefaults$as = propsWithDefaults.as,
|
|
18
|
+
Component = _propsWithDefaults$as === void 0 ? 'div' : _propsWithDefaults$as,
|
|
19
|
+
className = propsWithDefaults.className,
|
|
20
|
+
_propsWithDefaults$cl = propsWithDefaults.classPrefix,
|
|
21
|
+
classPrefix = _propsWithDefaults$cl === void 0 ? 'tooltip' : _propsWithDefaults$cl,
|
|
22
|
+
children = propsWithDefaults.children,
|
|
23
|
+
style = propsWithDefaults.style,
|
|
24
|
+
visible = propsWithDefaults.visible,
|
|
25
|
+
_propsWithDefaults$ar = propsWithDefaults.arrow,
|
|
26
|
+
arrow = _propsWithDefaults$ar === void 0 ? true : _propsWithDefaults$ar,
|
|
27
|
+
rest = _objectWithoutPropertiesLoose(propsWithDefaults, _excluded);
|
|
25
28
|
var _useClassNames = useClassNames(classPrefix),
|
|
26
29
|
merge = _useClassNames.merge,
|
|
27
30
|
withClassPrefix = _useClassNames.withClassPrefix;
|
package/esm/Tooltip/index.js
CHANGED
|
File without changes
|
package/esm/Tree/Tree.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RsRefForwardingComponent } from '../internals/types';
|
|
2
1
|
import { type TreeViewProps } from './TreeView';
|
|
2
|
+
import type { RsRefForwardingComponent } from '../internals/types';
|
|
3
3
|
import type { TreeExtraProps } from './types';
|
|
4
4
|
export interface TreeProps<T = string | number | null> extends TreeViewProps<T>, TreeExtraProps {
|
|
5
5
|
/**
|
package/esm/Tree/Tree.js
CHANGED
|
@@ -3,40 +3,43 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
3
3
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
4
|
var _excluded = ["value", "defaultValue", "childrenKey", "labelKey", "valueKey", "data", "defaultExpandAll", "defaultExpandItemValues", "expandItemValues", "virtualized", "scrollShadow", "renderTreeIcon", "renderTreeNode", "getChildren", "onChange", "onExpand"];
|
|
5
5
|
import React, { useMemo } from 'react';
|
|
6
|
-
import TreeView from "./TreeView.js";
|
|
7
|
-
import { useControlled, useEventCallback } from "../internals/hooks/index.js";
|
|
8
|
-
import { TreeProvider } from "../internals/Tree/TreeProvider.js";
|
|
9
6
|
import useFlattenTree from "./hooks/useFlattenTree.js";
|
|
10
7
|
import useTreeWithChildren from "./hooks/useTreeWithChildren.js";
|
|
11
8
|
import useExpandTree from "./hooks/useExpandTree.js";
|
|
9
|
+
import TreeView from "./TreeView.js";
|
|
10
|
+
import { useControlled, useEventCallback } from "../internals/hooks/index.js";
|
|
11
|
+
import { TreeProvider } from "../internals/Tree/TreeProvider.js";
|
|
12
|
+
import { useCustom } from "../CustomProvider/index.js";
|
|
12
13
|
/**
|
|
13
14
|
* The `Tree` component is used to display hierarchical data.
|
|
14
15
|
*
|
|
15
16
|
* @see https://rsuitejs.com/components/tree
|
|
16
17
|
*/
|
|
17
18
|
var Tree = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
19
|
+
var _useCustom = useCustom('Tree', props),
|
|
20
|
+
propsWithDefaults = _useCustom.propsWithDefaults;
|
|
21
|
+
var controlledValue = propsWithDefaults.value,
|
|
22
|
+
defaultValue = propsWithDefaults.defaultValue,
|
|
23
|
+
_propsWithDefaults$ch = propsWithDefaults.childrenKey,
|
|
24
|
+
childrenKey = _propsWithDefaults$ch === void 0 ? 'children' : _propsWithDefaults$ch,
|
|
25
|
+
_propsWithDefaults$la = propsWithDefaults.labelKey,
|
|
26
|
+
labelKey = _propsWithDefaults$la === void 0 ? 'label' : _propsWithDefaults$la,
|
|
27
|
+
_propsWithDefaults$va = propsWithDefaults.valueKey,
|
|
28
|
+
valueKey = _propsWithDefaults$va === void 0 ? 'value' : _propsWithDefaults$va,
|
|
29
|
+
data = propsWithDefaults.data,
|
|
30
|
+
_propsWithDefaults$de = propsWithDefaults.defaultExpandAll,
|
|
31
|
+
defaultExpandAll = _propsWithDefaults$de === void 0 ? false : _propsWithDefaults$de,
|
|
32
|
+
_propsWithDefaults$de2 = propsWithDefaults.defaultExpandItemValues,
|
|
33
|
+
defaultExpandItemValues = _propsWithDefaults$de2 === void 0 ? [] : _propsWithDefaults$de2,
|
|
34
|
+
controlledExpandItemValues = propsWithDefaults.expandItemValues,
|
|
35
|
+
virtualized = propsWithDefaults.virtualized,
|
|
36
|
+
scrollShadow = propsWithDefaults.scrollShadow,
|
|
37
|
+
renderTreeIcon = propsWithDefaults.renderTreeIcon,
|
|
38
|
+
renderTreeNode = propsWithDefaults.renderTreeNode,
|
|
39
|
+
getChildren = propsWithDefaults.getChildren,
|
|
40
|
+
onChange = propsWithDefaults.onChange,
|
|
41
|
+
onExpand = propsWithDefaults.onExpand,
|
|
42
|
+
rest = _objectWithoutPropertiesLoose(propsWithDefaults, _excluded);
|
|
40
43
|
var _useControlled = useControlled(controlledValue, defaultValue),
|
|
41
44
|
value = _useControlled[0],
|
|
42
45
|
setValue = _useControlled[1];
|
package/esm/Tree/TreeNode.js
CHANGED
|
@@ -3,11 +3,12 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
3
3
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
4
|
var _excluded = ["as", "label", "layer", "active", "loading", "nodeData", "className", "classPrefix", "disabled", "visible", "draggable", "expanded", "focus", "style", "hasChildren", "dragging", "dragStatus", "onSelect", "onDragStart", "onDragOver", "onDragEnter", "onDragLeave", "onDragEnd", "onDrop", "onExpand"];
|
|
5
5
|
import React, { forwardRef, useMemo } from 'react';
|
|
6
|
-
import { mergeRefs, stringifyReactNode } from "../internals/utils/index.js";
|
|
7
|
-
import { useFocusVirtualListItem, useClassNames, useEventCallback, useCustom } from "../internals/hooks/index.js";
|
|
8
6
|
import TreeNodeToggle from "./TreeNodeToggle.js";
|
|
7
|
+
import { mergeRefs, stringifyReactNode } from "../internals/utils/index.js";
|
|
8
|
+
import { useFocusVirtualListItem, useClassNames, useEventCallback } from "../internals/hooks/index.js";
|
|
9
9
|
import { useTreeContextProps } from "../internals/Tree/TreeProvider.js";
|
|
10
10
|
import { indentTreeNode } from "./utils/index.js";
|
|
11
|
+
import { useCustom } from "../CustomProvider/index.js";
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Props for the TreeNode component.
|
|
@@ -7,8 +7,9 @@ import ArrowDownIcon from '@rsuite/icons/ArrowDown';
|
|
|
7
7
|
import ArrowRightIcon from '@rsuite/icons/ArrowRight';
|
|
8
8
|
import ArrowLeftIcon from '@rsuite/icons/ArrowLeft';
|
|
9
9
|
import Spinner from '@rsuite/icons/legacy/Spinner';
|
|
10
|
-
import { useClassNames
|
|
10
|
+
import { useClassNames } from "../internals/hooks/index.js";
|
|
11
11
|
import { useTreeCustomRenderer } from "../internals/Tree/TreeProvider.js";
|
|
12
|
+
import { useCustom } from "../CustomProvider/index.js";
|
|
12
13
|
function TreeNodeToggle(props) {
|
|
13
14
|
var data = props.data,
|
|
14
15
|
loading = props.loading,
|
package/esm/Tree/TreeView.js
CHANGED
|
@@ -4,21 +4,22 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
4
4
|
var _excluded = ["as", "data", "style", "showIndentLine", "value", "locale", "height", "className", "searchable", "classPrefix", "searchKeyword", "searchBy", "draggable", "disabledItemValues", "loadingNodeValues", "flattenedNodes", "listProps", "listRef", "searchInputRef", "expandItemValues", "onSearch", "onSelect", "onSelectItem", "onChange", "onDragEnd", "onDragStart", "onDragEnter", "onDragLeave", "onDragOver", "onDrop", "onExpand", "onFocusItem", "onScroll"];
|
|
5
5
|
import React, { useEffect, useMemo } from 'react';
|
|
6
6
|
import isNil from 'lodash/isNil';
|
|
7
|
-
import { List, AutoSizer, defaultItemSize } from "../internals/Windowing/index.js";
|
|
8
7
|
import TreeViewNode from "./TreeNode.js";
|
|
9
8
|
import IndentLine from "./IndentLine.js";
|
|
10
|
-
import { getPathTowardsItem, getKeyParentMap } from "../internals/Tree/utils/index.js";
|
|
11
|
-
import { useClassNames, useCustom, useEventCallback } from "../internals/hooks/index.js";
|
|
12
|
-
import { isExpand, hasVisibleChildren, getActiveItem } from "./utils/index.js";
|
|
13
|
-
import { onMenuKeyDown } from "../internals/Picker/index.js";
|
|
14
|
-
import { TreeView as BaseTreeView } from "../internals/Tree/index.js";
|
|
15
9
|
import useTreeSearch from "./hooks/useTreeSearch.js";
|
|
16
10
|
import useTreeDrag from "./hooks/useTreeDrag.js";
|
|
17
11
|
import useFocusTree from "./hooks/useFocusTree.js";
|
|
18
12
|
import useVirtualizedTreeData from "./hooks/useVirtualizedTreeData.js";
|
|
19
13
|
import useTreeNodeProps from "./hooks/useTreeNodeProps.js";
|
|
20
14
|
import SearchBox from "../internals/SearchBox/index.js";
|
|
15
|
+
import { List, AutoSizer, defaultItemSize } from "../internals/Windowing/index.js";
|
|
16
|
+
import { getPathTowardsItem, getKeyParentMap } from "../internals/Tree/utils/index.js";
|
|
17
|
+
import { useClassNames, useEventCallback } from "../internals/hooks/index.js";
|
|
18
|
+
import { isExpand, hasVisibleChildren, getActiveItem } from "./utils/index.js";
|
|
19
|
+
import { onMenuKeyDown } from "../internals/Picker/index.js";
|
|
20
|
+
import { TreeView as BaseTreeView } from "../internals/Tree/index.js";
|
|
21
21
|
import { useTreeContextProps } from "../internals/Tree/TreeProvider.js";
|
|
22
|
+
import { useCustom } from "../CustomProvider/index.js";
|
|
22
23
|
|
|
23
24
|
/**
|
|
24
25
|
* Props for the TreeViewInner component.
|
|
@@ -71,8 +72,11 @@ var TreeView = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
71
72
|
onFocusItem = props.onFocusItem,
|
|
72
73
|
onScroll = props.onScroll,
|
|
73
74
|
rest = _objectWithoutPropertiesLoose(props, _excluded);
|
|
74
|
-
var _useCustom = useCustom(
|
|
75
|
-
|
|
75
|
+
var _useCustom = useCustom(),
|
|
76
|
+
getLocale = _useCustom.getLocale;
|
|
77
|
+
var _getLocale = getLocale('Combobox', overrideLocale),
|
|
78
|
+
searchPlaceholder = _getLocale.searchPlaceholder,
|
|
79
|
+
noResultsText = _getLocale.noResultsText;
|
|
76
80
|
var _useTreeContextProps = useTreeContextProps(),
|
|
77
81
|
valueKey = _useTreeContextProps.valueKey,
|
|
78
82
|
childrenKey = _useTreeContextProps.childrenKey,
|
|
@@ -263,13 +267,13 @@ var TreeView = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
263
267
|
className: classes,
|
|
264
268
|
style: style
|
|
265
269
|
}, searchable ? /*#__PURE__*/React.createElement(SearchBox, {
|
|
266
|
-
placeholder:
|
|
270
|
+
placeholder: searchPlaceholder,
|
|
267
271
|
onChange: handleSearch,
|
|
268
272
|
value: keyword,
|
|
269
273
|
inputRef: searchInputRef
|
|
270
274
|
}) : null, keyword && formattedNodes.length === 0 ? /*#__PURE__*/React.createElement("div", {
|
|
271
275
|
className: prefix('empty')
|
|
272
|
-
},
|
|
276
|
+
}, noResultsText) : null, /*#__PURE__*/React.createElement(BaseTreeView, _extends({}, rest, {
|
|
273
277
|
ref: treeViewRef,
|
|
274
278
|
treeRootClassName: prefix('root'),
|
|
275
279
|
onScroll: onScroll,
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
3
2
|
import isNil from 'lodash/isNil';
|
|
3
|
+
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
4
4
|
import { KEY_VALUES } from "../../internals/constants/index.js";
|
|
5
|
-
import { useEventCallback
|
|
5
|
+
import { useEventCallback } from "../../internals/hooks/index.js";
|
|
6
6
|
import { onMenuKeyDown } from "../../internals/Picker/index.js";
|
|
7
7
|
import { useItemDataKeys, useRegisterTreeMethods } from "../../internals/Tree/TreeProvider.js";
|
|
8
8
|
import { isSearching, focusNextItem, getFocusableItems, getActiveItem, focusPreviousItem, focusCurrentItem, focusTreeNode, handleLeftArrow, handleRightArrow } from "../utils/index.js";
|
|
9
|
+
import { useCustom } from "../../CustomProvider/index.js";
|
|
9
10
|
import useTreeNodeRefs from "./useTreeNodeRefs.js";
|
|
10
11
|
/**
|
|
11
12
|
* Custom hook that manages the focus behavior of a tree component.
|
package/esm/Tree/index.js
CHANGED
|
File without changes
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { type TreeViewProps } from '../Tree/TreeView';
|
|
2
3
|
import { PickerLocale } from '../locales';
|
|
3
4
|
import { PickerComponent, PickerToggleProps } from '../internals/Picker';
|
|
4
5
|
import { TreeNode } from '../internals/Tree/types';
|
|
5
|
-
import { type TreeViewProps } from '../Tree/TreeView';
|
|
6
6
|
import type { FormControlPickerProps, DeprecatedPickerProps } from '../internals/types';
|
|
7
7
|
import type { TreeExtraProps } from '../Tree/types';
|
|
8
8
|
export interface TreePickerProps<V = number | string | null> extends TreeViewProps<V>, TreeExtraProps, DeprecatedPickerProps, FormControlPickerProps<V, PickerLocale, TreeNode>, Pick<PickerToggleProps, 'caretAs' | 'loading'> {
|