rsuite 5.73.1 → 5.74.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/AutoComplete/styles/index.css +1 -0
- package/CHANGELOG.md +14 -0
- package/CascadeTree/styles/index.css +1 -0
- package/CascadeTree/styles/index.less +2 -0
- package/Cascader/styles/index.css +2 -0
- package/CheckPicker/styles/index.css +1 -0
- package/CheckTree/styles/index.css +1 -0
- package/CheckTreePicker/styles/index.css +1 -0
- package/DatePicker/styles/index.css +1 -0
- package/DateRangePicker/styles/index.css +1 -0
- package/InputNumber/styles/index.css +8 -0
- package/InputNumber/styles/mixin.less +1 -0
- package/InputPicker/styles/index.css +1 -0
- package/MultiCascadeTree/styles/index.css +2 -0
- package/MultiCascader/styles/index.css +2 -0
- package/Pagination/styles/index.css +1 -0
- package/SelectPicker/styles/index.css +1 -0
- package/TagInput/styles/index.css +1 -0
- package/TagPicker/styles/index.css +1 -0
- package/TimePicker/styles/index.css +1 -0
- package/TimeRangePicker/styles/index.css +1 -0
- package/cjs/Accordion/Accordion.js +4 -1
- package/cjs/Affix/Affix.js +15 -12
- 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/AutoComplete/AutoComplete.d.ts +1 -2
- package/cjs/AutoComplete/AutoComplete.js +38 -35
- package/cjs/Avatar/Avatar.js +23 -21
- package/cjs/AvatarGroup/AvatarGroup.js +14 -11
- package/cjs/Badge/Badge.js +14 -11
- package/cjs/Breadcrumb/Breadcrumb.js +21 -20
- package/cjs/Button/Button.js +23 -20
- package/cjs/ButtonGroup/ButtonGroup.js +16 -13
- package/cjs/ButtonToolbar/ButtonToolbar.js +11 -8
- 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/Carousel/Carousel.js +24 -22
- 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 +8 -7
- package/cjs/CascadeTree/types.d.ts +1 -1
- package/cjs/Cascader/Cascader.js +59 -57
- package/cjs/CheckPicker/CheckPicker.d.ts +1 -1
- package/cjs/CheckPicker/CheckPicker.js +59 -58
- 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/Checkbox/Checkbox.js +38 -35
- package/cjs/CheckboxGroup/CheckboxGroup.js +19 -16
- package/cjs/Col/Col.js +9 -6
- package/cjs/Container/Container.js +10 -7
- 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 +2 -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/DateInput/DateInput.js +19 -15
- package/cjs/DateInput/hooks/useDateInputState.js +3 -3
- package/cjs/DatePicker/DatePicker.js +73 -72
- 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/Drawer/Drawer.js +13 -10
- package/cjs/Dropdown/Dropdown.js +33 -32
- package/cjs/Dropdown/DropdownMenu.d.ts +2 -2
- package/cjs/Dropdown/DropdownMenu.js +21 -20
- package/cjs/FlexboxGrid/FlexboxGrid.js +14 -11
- package/cjs/Form/Form.js +33 -30
- package/cjs/FormControl/FormControl.js +33 -30
- package/cjs/FormControlLabel/FormControlLabel.js +13 -10
- package/cjs/FormErrorMessage/FormErrorMessage.js +12 -9
- package/cjs/FormGroup/FormGroup.js +10 -7
- package/cjs/FormHelpText/FormHelpText.js +14 -11
- package/cjs/Grid/Grid.js +10 -7
- 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/InlineEdit/InlineEdit.js +18 -15
- package/cjs/Input/Input.js +26 -23
- package/cjs/InputGroup/InputGroup.js +13 -10
- package/cjs/InputNumber/InputNumber.js +35 -32
- package/cjs/InputPicker/InputPicker.js +72 -71
- package/cjs/List/List.d.ts +1 -1
- package/cjs/List/List.js +27 -24
- package/cjs/Loader/Loader.js +17 -14
- package/cjs/MaskedInput/MaskedInput.d.ts +1 -1
- package/cjs/MaskedInput/MaskedInput.js +6 -3
- package/cjs/Message/Message.js +23 -20
- package/cjs/Modal/Modal.js +42 -39
- 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 +6 -5
- 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/Nav/Nav.d.ts +1 -1
- package/cjs/Nav/Nav.js +24 -21
- package/cjs/Nav/NavDropdownMenu.js +5 -4
- package/cjs/Navbar/Navbar.js +11 -8
- package/cjs/Navbar/NavbarDropdownMenu.js +4 -3
- package/cjs/Notification/Notification.js +18 -15
- 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/Panel/AccordionButton.js +2 -2
- package/cjs/Panel/Panel.d.ts +1 -1
- package/cjs/Panel/Panel.js +35 -32
- package/cjs/PanelGroup/PanelGroup.d.ts +1 -1
- package/cjs/PanelGroup/PanelGroup.js +15 -12
- 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/Popover/Popover.d.ts +1 -1
- package/cjs/Popover/Popover.js +17 -14
- 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/Radio/Radio.d.ts +1 -1
- package/cjs/Radio/Radio.js +31 -28
- package/cjs/RadioGroup/RadioGroup.d.ts +2 -2
- package/cjs/RadioGroup/RadioGroup.js +21 -18
- 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/Rate/Rate.d.ts +1 -1
- package/cjs/Rate/Rate.js +33 -30
- package/cjs/Row/Row.d.ts +1 -1
- package/cjs/Row/Row.js +12 -9
- package/cjs/SafeAnchor/SafeAnchor.d.ts +1 -1
- package/cjs/SafeAnchor/SafeAnchor.js +9 -6
- package/cjs/SelectPicker/SelectPicker.d.ts +3 -3
- package/cjs/SelectPicker/SelectPicker.js +56 -55
- package/cjs/Sidebar/Sidebar.d.ts +1 -1
- package/cjs/Sidebar/Sidebar.js +13 -10
- package/cjs/Sidenav/ExpandedSidenavDropdownMenu.js +8 -7
- 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/Slider/Slider.d.ts +1 -1
- package/cjs/Slider/Slider.js +42 -39
- 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/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/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/Toggle/Toggle.d.ts +2 -2
- package/cjs/Toggle/Toggle.js +26 -25
- package/cjs/Tooltip/Tooltip.d.ts +1 -1
- package/cjs/Tooltip/Tooltip.js +14 -11
- 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 +3 -2
- package/cjs/Tree/TreeView.js +14 -10
- package/cjs/Tree/hooks/useFocusTree.js +3 -2
- package/cjs/TreePicker/TreePicker.d.ts +1 -1
- package/cjs/TreePicker/TreePicker.js +89 -88
- package/cjs/Uploader/UploadFileItem.d.ts +3 -3
- package/cjs/Uploader/UploadFileItem.js +2 -2
- 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/Whisper/Whisper.js +13 -13
- 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 +9 -5
- 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/useToggleCaret.js +10 -10
- 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 +10 -0
- 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 +10 -0
- package/dist/rsuite-no-reset.min.css +1 -1
- package/dist/rsuite-no-reset.min.css.map +1 -1
- package/dist/rsuite-rtl.css +10 -0
- package/dist/rsuite-rtl.min.css +1 -1
- package/dist/rsuite-rtl.min.css.map +1 -1
- package/dist/rsuite.css +10 -0
- package/dist/rsuite.js +492 -526
- 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/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/AutoComplete/AutoComplete.d.ts +1 -2
- package/esm/AutoComplete/AutoComplete.js +38 -35
- package/esm/Avatar/Avatar.js +24 -22
- package/esm/AvatarGroup/AvatarGroup.js +14 -11
- package/esm/Badge/Badge.js +14 -11
- package/esm/Breadcrumb/Breadcrumb.js +22 -21
- package/esm/Button/Button.js +23 -20
- package/esm/ButtonGroup/ButtonGroup.js +16 -13
- package/esm/ButtonToolbar/ButtonToolbar.js +11 -8
- 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/Carousel/Carousel.js +25 -23
- 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 +8 -7
- package/esm/CascadeTree/types.d.ts +1 -1
- package/esm/Cascader/Cascader.js +60 -58
- package/esm/CheckPicker/CheckPicker.d.ts +1 -1
- package/esm/CheckPicker/CheckPicker.js +60 -59
- 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/Checkbox/Checkbox.js +38 -35
- package/esm/CheckboxGroup/CheckboxGroup.js +19 -16
- package/esm/Col/Col.js +9 -6
- package/esm/Container/Container.js +10 -7
- 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 +2 -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/DateInput/DateInput.js +20 -16
- package/esm/DateInput/hooks/useDateInputState.js +2 -2
- package/esm/DatePicker/DatePicker.js +74 -73
- 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/Drawer/Drawer.js +13 -10
- package/esm/Dropdown/Dropdown.js +33 -32
- package/esm/Dropdown/DropdownMenu.d.ts +2 -2
- package/esm/Dropdown/DropdownMenu.js +6 -5
- package/esm/FlexboxGrid/FlexboxGrid.js +14 -11
- package/esm/Form/Form.js +33 -30
- package/esm/FormControl/FormControl.js +34 -31
- package/esm/FormControlLabel/FormControlLabel.js +13 -10
- package/esm/FormErrorMessage/FormErrorMessage.js +12 -9
- package/esm/FormGroup/FormGroup.js +10 -7
- package/esm/FormHelpText/FormHelpText.js +14 -11
- package/esm/Grid/Grid.js +10 -7
- 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/InlineEdit/InlineEdit.js +18 -15
- package/esm/Input/Input.js +26 -23
- package/esm/InputGroup/InputGroup.js +13 -10
- package/esm/InputNumber/InputNumber.js +35 -32
- package/esm/InputPicker/InputPicker.js +73 -72
- package/esm/List/List.d.ts +1 -1
- package/esm/List/List.js +27 -24
- package/esm/Loader/Loader.js +17 -14
- package/esm/MaskedInput/MaskedInput.d.ts +1 -1
- package/esm/MaskedInput/MaskedInput.js +6 -3
- package/esm/Message/Message.js +23 -20
- package/esm/Modal/Modal.js +42 -39
- 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 +6 -5
- 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/Nav/Nav.d.ts +1 -1
- package/esm/Nav/Nav.js +24 -21
- package/esm/Nav/NavDropdownMenu.js +5 -4
- package/esm/Navbar/Navbar.js +11 -8
- package/esm/Navbar/NavbarDropdownMenu.js +5 -4
- package/esm/Notification/Notification.js +18 -15
- 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/Panel/AccordionButton.js +2 -2
- package/esm/Panel/Panel.d.ts +1 -1
- package/esm/Panel/Panel.js +35 -32
- package/esm/PanelGroup/PanelGroup.d.ts +1 -1
- package/esm/PanelGroup/PanelGroup.js +15 -12
- 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/Popover/Popover.d.ts +1 -1
- package/esm/Popover/Popover.js +17 -14
- 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/Radio/Radio.d.ts +1 -1
- package/esm/Radio/Radio.js +31 -28
- package/esm/RadioGroup/RadioGroup.d.ts +2 -2
- package/esm/RadioGroup/RadioGroup.js +21 -18
- 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/Rate/Rate.d.ts +1 -1
- package/esm/Rate/Rate.js +33 -30
- package/esm/Row/Row.d.ts +1 -1
- package/esm/Row/Row.js +12 -9
- package/esm/SafeAnchor/SafeAnchor.d.ts +1 -1
- package/esm/SafeAnchor/SafeAnchor.js +9 -6
- package/esm/SelectPicker/SelectPicker.d.ts +3 -3
- package/esm/SelectPicker/SelectPicker.js +57 -56
- package/esm/Sidebar/Sidebar.d.ts +1 -1
- package/esm/Sidebar/Sidebar.js +13 -10
- package/esm/Sidenav/ExpandedSidenavDropdownMenu.js +8 -7
- 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/Slider/Slider.d.ts +1 -1
- package/esm/Slider/Slider.js +43 -40
- 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/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/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/Toggle/Toggle.d.ts +2 -2
- package/esm/Toggle/Toggle.js +27 -26
- package/esm/Tooltip/Tooltip.d.ts +1 -1
- package/esm/Tooltip/Tooltip.js +14 -11
- 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 +3 -2
- package/esm/Tree/TreeView.js +14 -10
- package/esm/Tree/hooks/useFocusTree.js +3 -2
- package/esm/TreePicker/TreePicker.d.ts +1 -1
- package/esm/TreePicker/TreePicker.js +89 -88
- package/esm/Uploader/UploadFileItem.d.ts +3 -3
- package/esm/Uploader/UploadFileItem.js +2 -2
- 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/Whisper/Whisper.js +14 -12
- 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 +8 -4
- 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/useToggleCaret.js +10 -10
- 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/internals/Picker/styles/index.less +1 -0
- package/package.json +3 -2
- package/cjs/internals/hooks/useCustom.d.ts +0 -7
- package/cjs/internals/hooks/useCustom.js +0 -80
- package/esm/internals/hooks/useCustom.d.ts +0 -7
- package/esm/internals/hooks/useCustom.js +0 -74
package/esm/Nav/Nav.js
CHANGED
|
@@ -4,39 +4,42 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
4
4
|
var _excluded = ["as", "classPrefix", "appearance", "vertical", "justified", "reversed", "pullRight", "className", "children", "activeKey", "defaultActiveKey", "onSelect"];
|
|
5
5
|
import React, { useContext, useMemo } from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
|
-
import { useClassNames, useEnsuredRef, useControlled } from "../internals/hooks/index.js";
|
|
8
|
-
import { NavbarContext } from "../Navbar/Navbar.js";
|
|
9
|
-
import { SidenavContext } from "../Sidenav/Sidenav.js";
|
|
10
7
|
import NavContext from "./NavContext.js";
|
|
11
8
|
import Menubar from "../internals/Menu/Menubar.js";
|
|
12
|
-
import { oneOf } from "../internals/propTypes/index.js";
|
|
13
|
-
import { deprecateComponent } from "../internals/utils/index.js";
|
|
14
9
|
import NavDropdown from "./NavDropdown.js";
|
|
15
10
|
import NavMenu from "./NavMenu.js";
|
|
16
11
|
import NavDropdownItem from "./NavDropdownItem.js";
|
|
17
12
|
import NavDropdownMenu from "./NavDropdownMenu.js";
|
|
18
13
|
import AdaptiveNavItem from "./AdaptiveNavItem.js";
|
|
14
|
+
import { useClassNames, useEnsuredRef, useControlled } from "../internals/hooks/index.js";
|
|
15
|
+
import { NavbarContext } from "../Navbar/Navbar.js";
|
|
16
|
+
import { SidenavContext } from "../Sidenav/Sidenav.js";
|
|
17
|
+
import { oneOf } from "../internals/propTypes/index.js";
|
|
18
|
+
import { deprecateComponent } from "../internals/utils/index.js";
|
|
19
|
+
import { useCustom } from "../CustomProvider/index.js";
|
|
19
20
|
/**
|
|
20
21
|
* The `Nav` component is used to create navigation links.
|
|
21
22
|
* @see https://rsuitejs.com/components/nav
|
|
22
23
|
*/
|
|
23
24
|
var Nav = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
25
|
+
var _useCustom = useCustom('Nav', props),
|
|
26
|
+
propsWithDefaults = _useCustom.propsWithDefaults;
|
|
27
|
+
var _propsWithDefaults$as = propsWithDefaults.as,
|
|
28
|
+
Component = _propsWithDefaults$as === void 0 ? 'div' : _propsWithDefaults$as,
|
|
29
|
+
_propsWithDefaults$cl = propsWithDefaults.classPrefix,
|
|
30
|
+
classPrefix = _propsWithDefaults$cl === void 0 ? 'nav' : _propsWithDefaults$cl,
|
|
31
|
+
_propsWithDefaults$ap = propsWithDefaults.appearance,
|
|
32
|
+
appearance = _propsWithDefaults$ap === void 0 ? 'default' : _propsWithDefaults$ap,
|
|
33
|
+
vertical = propsWithDefaults.vertical,
|
|
34
|
+
justified = propsWithDefaults.justified,
|
|
35
|
+
reversed = propsWithDefaults.reversed,
|
|
36
|
+
pullRight = propsWithDefaults.pullRight,
|
|
37
|
+
className = propsWithDefaults.className,
|
|
38
|
+
children = propsWithDefaults.children,
|
|
39
|
+
activeKeyProp = propsWithDefaults.activeKey,
|
|
40
|
+
defaultActiveKey = propsWithDefaults.defaultActiveKey,
|
|
41
|
+
onSelectProp = propsWithDefaults.onSelect,
|
|
42
|
+
rest = _objectWithoutPropertiesLoose(propsWithDefaults, _excluded);
|
|
40
43
|
var sidenav = useContext(SidenavContext);
|
|
41
44
|
|
|
42
45
|
// Whether inside a <Navbar>
|
|
@@ -10,16 +10,17 @@ var _excluded = ["onToggle", "eventKey", "title", "classPrefix", "children", "op
|
|
|
10
10
|
_excluded5 = ["open"],
|
|
11
11
|
_excluded6 = ["open"];
|
|
12
12
|
import React, { useCallback, useContext } from 'react';
|
|
13
|
+
import PropTypes from 'prop-types';
|
|
13
14
|
import omit from 'lodash/omit';
|
|
14
15
|
import Menu from "../internals/Menu/Menu.js";
|
|
15
16
|
import MenuItem from "../internals/Menu/MenuItem.js";
|
|
16
|
-
import { useClassNames, useCustom } from "../internals/hooks/index.js";
|
|
17
|
-
import { mergeRefs } from "../internals/utils/index.js";
|
|
18
|
-
import PropTypes from 'prop-types';
|
|
19
17
|
import PagePreviousIcon from '@rsuite/icons/PagePrevious';
|
|
20
18
|
import PageNextIcon from '@rsuite/icons/PageNext';
|
|
21
19
|
import NavContext from "./NavContext.js";
|
|
20
|
+
import { useClassNames } from "../internals/hooks/index.js";
|
|
21
|
+
import { mergeRefs } from "../internals/utils/index.js";
|
|
22
22
|
import { deprecatePropType, oneOf } from "../internals/propTypes/index.js";
|
|
23
|
+
import { useCustom } from "../CustomProvider/index.js";
|
|
23
24
|
/**
|
|
24
25
|
* @private
|
|
25
26
|
*/
|
|
@@ -38,7 +39,7 @@ var NavDropdownMenu = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
38
39
|
openDirection = _props$openDirection === void 0 ? 'end' : _props$openDirection,
|
|
39
40
|
noCaret = props.noCaret,
|
|
40
41
|
rest = _objectWithoutPropertiesLoose(props, _excluded);
|
|
41
|
-
var _useCustom = useCustom(
|
|
42
|
+
var _useCustom = useCustom(),
|
|
42
43
|
rtl = _useCustom.rtl;
|
|
43
44
|
var handleToggleSubmenu = useCallback(function (open, event) {
|
|
44
45
|
onToggle === null || onToggle === void 0 ? void 0 : onToggle(open, eventKey, event);
|
package/esm/Navbar/Navbar.js
CHANGED
|
@@ -7,20 +7,23 @@ import NavbarBody from "./NavbarBody.js";
|
|
|
7
7
|
import NavbarHeader from "./NavbarHeader.js";
|
|
8
8
|
import NavbarBrand from "./NavbarBrand.js";
|
|
9
9
|
import { useClassNames } from "../internals/hooks/index.js";
|
|
10
|
+
import { useCustom } from "../CustomProvider/index.js";
|
|
10
11
|
export var NavbarContext = /*#__PURE__*/React.createContext(false);
|
|
11
12
|
/**
|
|
12
13
|
* The `Navbar` component is used to create a navigation header.
|
|
13
14
|
* @see https://rsuitejs.com/components/navbar
|
|
14
15
|
*/
|
|
15
16
|
var Navbar = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
var _useCustom = useCustom('Navbar', props),
|
|
18
|
+
propsWithDefaults = _useCustom.propsWithDefaults;
|
|
19
|
+
var className = propsWithDefaults.className,
|
|
20
|
+
_propsWithDefaults$as = propsWithDefaults.as,
|
|
21
|
+
Component = _propsWithDefaults$as === void 0 ? 'nav' : _propsWithDefaults$as,
|
|
22
|
+
_propsWithDefaults$cl = propsWithDefaults.classPrefix,
|
|
23
|
+
classPrefix = _propsWithDefaults$cl === void 0 ? 'navbar' : _propsWithDefaults$cl,
|
|
24
|
+
_propsWithDefaults$ap = propsWithDefaults.appearance,
|
|
25
|
+
appearance = _propsWithDefaults$ap === void 0 ? 'default' : _propsWithDefaults$ap,
|
|
26
|
+
rest = _objectWithoutPropertiesLoose(propsWithDefaults, _excluded);
|
|
24
27
|
var _useClassNames = useClassNames(classPrefix),
|
|
25
28
|
withClassPrefix = _useClassNames.withClassPrefix,
|
|
26
29
|
merge = _useClassNames.merge;
|
|
@@ -13,12 +13,13 @@ import omit from 'lodash/omit';
|
|
|
13
13
|
import isNil from 'lodash/isNil';
|
|
14
14
|
import PagePreviousIcon from '@rsuite/icons/PagePrevious';
|
|
15
15
|
import PageNextIcon from '@rsuite/icons/PageNext';
|
|
16
|
-
import { mergeRefs } from "../internals/utils/index.js";
|
|
17
|
-
import { useClassNames, useCustom } from "../internals/hooks/index.js";
|
|
18
|
-
import { NavbarContext } from '.';
|
|
19
16
|
import Disclosure from "../internals/Disclosure/index.js";
|
|
20
17
|
import NavContext from "../Nav/NavContext.js";
|
|
18
|
+
import { mergeRefs } from "../internals/utils/index.js";
|
|
19
|
+
import { useClassNames } from "../internals/hooks/index.js";
|
|
20
|
+
import { NavbarContext } from '.';
|
|
21
21
|
import { deprecatePropType, oneOf } from "../internals/propTypes/index.js";
|
|
22
|
+
import { useCustom } from "../CustomProvider/index.js";
|
|
22
23
|
/**
|
|
23
24
|
* @private this component is not supposed to be used directly
|
|
24
25
|
* Instead it's rendered by a <Nav.Menu> within a <Navbar>
|
|
@@ -47,7 +48,7 @@ var NavbarDropdownMenu = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
47
48
|
_props$openDirection = props.openDirection,
|
|
48
49
|
openDirection = _props$openDirection === void 0 ? 'end' : _props$openDirection,
|
|
49
50
|
rest = _objectWithoutPropertiesLoose(props, _excluded);
|
|
50
|
-
var _useCustom = useCustom(
|
|
51
|
+
var _useCustom = useCustom(),
|
|
51
52
|
rtl = _useCustom.rtl;
|
|
52
53
|
var _useClassNames = useClassNames(classPrefix),
|
|
53
54
|
prefix = _useClassNames.prefix;
|
|
@@ -6,31 +6,34 @@ var _templateObject, _templateObject2;
|
|
|
6
6
|
var _excluded = ["as", "classPrefix", "closable", "duration", "className", "type", "header", "children", "onClose"];
|
|
7
7
|
import React, { useState } from 'react';
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
|
+
import useDelayedClosure from "../toaster/hooks/useDelayedClosure.js";
|
|
10
|
+
import CloseButton from "../internals/CloseButton/index.js";
|
|
9
11
|
import { MESSAGE_STATUS_ICONS } from "../internals/constants/statusIcons.js";
|
|
10
12
|
import { useClassNames, useIsMounted, useEventCallback } from "../internals/hooks/index.js";
|
|
11
13
|
import { oneOf } from "../internals/propTypes/index.js";
|
|
12
|
-
import CloseButton from "../internals/CloseButton/index.js";
|
|
13
14
|
import { mergeRefs } from "../internals/utils/index.js";
|
|
14
|
-
import
|
|
15
|
+
import { useCustom } from "../CustomProvider/index.js";
|
|
15
16
|
/**
|
|
16
17
|
* The `Notification` component is used to display global messages and notifications.
|
|
17
18
|
*
|
|
18
19
|
* @see https://rsuitejs.com/components/notification
|
|
19
20
|
*/
|
|
20
21
|
var Notification = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
21
|
-
var
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
var _useCustom = useCustom('Notification', props),
|
|
23
|
+
propsWithDefaults = _useCustom.propsWithDefaults;
|
|
24
|
+
var _propsWithDefaults$as = propsWithDefaults.as,
|
|
25
|
+
Component = _propsWithDefaults$as === void 0 ? 'div' : _propsWithDefaults$as,
|
|
26
|
+
_propsWithDefaults$cl = propsWithDefaults.classPrefix,
|
|
27
|
+
classPrefix = _propsWithDefaults$cl === void 0 ? 'notification' : _propsWithDefaults$cl,
|
|
28
|
+
closable = propsWithDefaults.closable,
|
|
29
|
+
_propsWithDefaults$du = propsWithDefaults.duration,
|
|
30
|
+
duration = _propsWithDefaults$du === void 0 ? 4500 : _propsWithDefaults$du,
|
|
31
|
+
className = propsWithDefaults.className,
|
|
32
|
+
type = propsWithDefaults.type,
|
|
33
|
+
header = propsWithDefaults.header,
|
|
34
|
+
children = propsWithDefaults.children,
|
|
35
|
+
onClose = propsWithDefaults.onClose,
|
|
36
|
+
rest = _objectWithoutPropertiesLoose(propsWithDefaults, _excluded);
|
|
34
37
|
var _useState = useState('show'),
|
|
35
38
|
display = _useState[0],
|
|
36
39
|
setDisplay = _useState[1];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { RsRefForwardingComponent, WithAsProps, TypeAttributes } from '../internals/types';
|
|
3
|
-
import { PaginationLocale } from '../locales';
|
|
2
|
+
import type { RsRefForwardingComponent, WithAsProps, TypeAttributes } from '../internals/types';
|
|
3
|
+
import type { PaginationLocale } from '../locales';
|
|
4
4
|
export interface PaginationProps extends WithAsProps {
|
|
5
5
|
/** Current page number */
|
|
6
6
|
activePage?: number;
|
|
@@ -13,7 +13,8 @@ import PageTopIcon from '@rsuite/icons/PageTop';
|
|
|
13
13
|
import PageNextIcon from '@rsuite/icons/PageNext';
|
|
14
14
|
import PageEndIcon from '@rsuite/icons/PageEnd';
|
|
15
15
|
import PaginationButton from "./PaginationButton.js";
|
|
16
|
-
import { useClassNames
|
|
16
|
+
import { useClassNames } from "../internals/hooks/index.js";
|
|
17
|
+
import { useCustom } from "../CustomProvider/index.js";
|
|
17
18
|
var PAGINATION_ICONS = {
|
|
18
19
|
more: /*#__PURE__*/React.createElement(MoreIcon, null),
|
|
19
20
|
prev: /*#__PURE__*/React.createElement(PagePreviousIcon, null),
|
|
@@ -27,36 +28,36 @@ var PAGINATION_ICONS = {
|
|
|
27
28
|
* @see https://rsuitejs.com/components/pagination
|
|
28
29
|
*/
|
|
29
30
|
var Pagination = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
31
|
+
var _useCustom = useCustom('Pagination', props),
|
|
32
|
+
propsWithDefaults = _useCustom.propsWithDefaults;
|
|
33
|
+
var _propsWithDefaults$as = propsWithDefaults.as,
|
|
34
|
+
Component = _propsWithDefaults$as === void 0 ? 'div' : _propsWithDefaults$as,
|
|
35
|
+
className = propsWithDefaults.className,
|
|
36
|
+
_propsWithDefaults$cl = propsWithDefaults.classPrefix,
|
|
37
|
+
classPrefix = _propsWithDefaults$cl === void 0 ? 'pagination' : _propsWithDefaults$cl,
|
|
38
|
+
disabledProp = propsWithDefaults.disabled,
|
|
39
|
+
locale = propsWithDefaults.locale,
|
|
40
|
+
_propsWithDefaults$ac = propsWithDefaults.activePage,
|
|
41
|
+
activePage = _propsWithDefaults$ac === void 0 ? 1 : _propsWithDefaults$ac,
|
|
42
|
+
maxButtons = propsWithDefaults.maxButtons,
|
|
43
|
+
_propsWithDefaults$pa = propsWithDefaults.pages,
|
|
44
|
+
pages = _propsWithDefaults$pa === void 0 ? 1 : _propsWithDefaults$pa,
|
|
45
|
+
ellipsis = propsWithDefaults.ellipsis,
|
|
46
|
+
boundaryLinks = propsWithDefaults.boundaryLinks,
|
|
47
|
+
first = propsWithDefaults.first,
|
|
48
|
+
prev = propsWithDefaults.prev,
|
|
49
|
+
next = propsWithDefaults.next,
|
|
50
|
+
last = propsWithDefaults.last,
|
|
51
|
+
_propsWithDefaults$si = propsWithDefaults.size,
|
|
52
|
+
size = _propsWithDefaults$si === void 0 ? 'xs' : _propsWithDefaults$si,
|
|
53
|
+
linkAs = propsWithDefaults.linkAs,
|
|
54
|
+
linkProps = propsWithDefaults.linkProps,
|
|
55
|
+
onSelect = propsWithDefaults.onSelect,
|
|
56
|
+
rest = _objectWithoutPropertiesLoose(propsWithDefaults, _excluded);
|
|
54
57
|
var _useClassNames = useClassNames(classPrefix),
|
|
55
58
|
merge = _useClassNames.merge,
|
|
56
59
|
withClassPrefix = _useClassNames.withClassPrefix,
|
|
57
60
|
prefix = _useClassNames.prefix;
|
|
58
|
-
var _useCustom = useCustom('Pagination', overrideLocale),
|
|
59
|
-
locale = _useCustom.locale;
|
|
60
61
|
var renderItem = function renderItem(key, itemProps) {
|
|
61
62
|
var eventKey = itemProps.eventKey,
|
|
62
63
|
disabled = itemProps.disabled,
|
|
@@ -8,9 +8,10 @@ import classNames from 'classnames';
|
|
|
8
8
|
import Pagination from "./Pagination.js";
|
|
9
9
|
import Divider from "../Divider/index.js";
|
|
10
10
|
import Input from "../Input/index.js";
|
|
11
|
-
import { useClassNames, useCustom, useControlled, useEventCallback } from "../internals/hooks/index.js";
|
|
12
|
-
import { tplTransform } from "../internals/utils/index.js";
|
|
13
11
|
import LimitPicker from "./LimitPicker.js";
|
|
12
|
+
import { useClassNames, useControlled, useEventCallback } from "../internals/hooks/index.js";
|
|
13
|
+
import { tplTransform } from "../internals/utils/index.js";
|
|
14
|
+
import { useCustom } from "../CustomProvider/index.js";
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* The layout of the paging component.
|
|
@@ -59,10 +60,11 @@ var PaginationGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
59
60
|
var _useControlled2 = useControlled(activePageProp, 1),
|
|
60
61
|
activePage = _useControlled2[0],
|
|
61
62
|
setActivePage = _useControlled2[1];
|
|
62
|
-
var _useCustom = useCustom('Pagination', localeProp),
|
|
63
|
-
locale = _useCustom.locale;
|
|
64
63
|
var pages = Math.floor(total / limit) + (total % limit ? 1 : 0);
|
|
65
64
|
var classes = merge(className, withClassPrefix(size));
|
|
65
|
+
var _useCustom = useCustom(),
|
|
66
|
+
getLocale = _useCustom.getLocale;
|
|
67
|
+
var locale = getLocale('Pagination', localeProp);
|
|
66
68
|
var handleInputBlur = useEventCallback(function (event) {
|
|
67
69
|
var value = parseInt(event.target.value);
|
|
68
70
|
if (value > 0 && value <= pages) {
|
|
@@ -6,7 +6,7 @@ var _templateObject;
|
|
|
6
6
|
var _excluded = ["classPrefix", "expanded", "id", "className", "controlId", "children", "disabled", "caretAs"];
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import Icon from '@rsuite/icons/Icon';
|
|
9
|
-
import
|
|
9
|
+
import ArrowDownLineIcon from '@rsuite/icons/ArrowDownLine';
|
|
10
10
|
import { useClassNames } from "../internals/hooks/index.js";
|
|
11
11
|
var AccordionButton = function AccordionButton(props) {
|
|
12
12
|
var _props$classPrefix = props.classPrefix,
|
|
@@ -18,7 +18,7 @@ var AccordionButton = function AccordionButton(props) {
|
|
|
18
18
|
children = props.children,
|
|
19
19
|
disabled = props.disabled,
|
|
20
20
|
_props$caretAs = props.caretAs,
|
|
21
|
-
caretAs = _props$caretAs === void 0 ?
|
|
21
|
+
caretAs = _props$caretAs === void 0 ? ArrowDownLineIcon : _props$caretAs,
|
|
22
22
|
rest = _objectWithoutPropertiesLoose(props, _excluded);
|
|
23
23
|
var _useClassNames = useClassNames(classPrefix),
|
|
24
24
|
prefix = _useClassNames.prefix,
|
package/esm/Panel/Panel.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { AnimationEventProps, RsRefForwardingComponent, WithAsProps } from '../internals/types';
|
|
2
|
+
import type { AnimationEventProps, RsRefForwardingComponent, WithAsProps } from '../internals/types';
|
|
3
3
|
export interface PanelProps<T = string | number> extends WithAsProps, AnimationEventProps {
|
|
4
4
|
/**
|
|
5
5
|
* Show border
|
package/esm/Panel/Panel.js
CHANGED
|
@@ -4,46 +4,49 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
4
4
|
var _excluded = ["as", "bodyFill", "bodyProps", "bordered", "children", "className", "classPrefix", "caretAs", "collapsible", "defaultExpanded", "disabled", "eventKey", "expanded", "header", "headerRole", "panelRole", "shaded", "scrollShadow", "id", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "onSelect"];
|
|
5
5
|
import React, { useContext } from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
|
-
import { useClassNames, useUniqueId, useEventCallback } from "../internals/hooks/index.js";
|
|
8
|
-
import { PanelGroupContext } from "../PanelGroup/index.js";
|
|
9
7
|
import PanelHeader from "./PanelHeader.js";
|
|
10
8
|
import PanelBody from "./PanelBody.js";
|
|
11
9
|
import useExpanded from "./hooks/useExpanded.js";
|
|
10
|
+
import { useClassNames, useUniqueId, useEventCallback } from "../internals/hooks/index.js";
|
|
11
|
+
import { useCustom } from "../CustomProvider/index.js";
|
|
12
|
+
import { PanelGroupContext } from "../PanelGroup/index.js";
|
|
12
13
|
/**
|
|
13
14
|
* The `Panel` component is used to display content that can be collapsed.
|
|
14
15
|
* @see https://rsuitejs.com/components/panel
|
|
15
16
|
*/
|
|
16
17
|
var Panel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
18
|
+
var _useCustom = useCustom('Panel', props),
|
|
19
|
+
propsWithDefaults = _useCustom.propsWithDefaults;
|
|
20
|
+
var _propsWithDefaults$as = propsWithDefaults.as,
|
|
21
|
+
Component = _propsWithDefaults$as === void 0 ? 'div' : _propsWithDefaults$as,
|
|
22
|
+
bodyFill = propsWithDefaults.bodyFill,
|
|
23
|
+
bodyProps = propsWithDefaults.bodyProps,
|
|
24
|
+
bordered = propsWithDefaults.bordered,
|
|
25
|
+
children = propsWithDefaults.children,
|
|
26
|
+
className = propsWithDefaults.className,
|
|
27
|
+
_propsWithDefaults$cl = propsWithDefaults.classPrefix,
|
|
28
|
+
classPrefix = _propsWithDefaults$cl === void 0 ? 'panel' : _propsWithDefaults$cl,
|
|
29
|
+
caretAs = propsWithDefaults.caretAs,
|
|
30
|
+
collapsibleProp = propsWithDefaults.collapsible,
|
|
31
|
+
defaultExpanded = propsWithDefaults.defaultExpanded,
|
|
32
|
+
disabled = propsWithDefaults.disabled,
|
|
33
|
+
eventKey = propsWithDefaults.eventKey,
|
|
34
|
+
expandedProp = propsWithDefaults.expanded,
|
|
35
|
+
header = propsWithDefaults.header,
|
|
36
|
+
headerRole = propsWithDefaults.headerRole,
|
|
37
|
+
_propsWithDefaults$pa = propsWithDefaults.panelRole,
|
|
38
|
+
panelRole = _propsWithDefaults$pa === void 0 ? 'region' : _propsWithDefaults$pa,
|
|
39
|
+
shaded = propsWithDefaults.shaded,
|
|
40
|
+
scrollShadow = propsWithDefaults.scrollShadow,
|
|
41
|
+
idProp = propsWithDefaults.id,
|
|
42
|
+
onEnter = propsWithDefaults.onEnter,
|
|
43
|
+
onEntered = propsWithDefaults.onEntered,
|
|
44
|
+
onEntering = propsWithDefaults.onEntering,
|
|
45
|
+
onExit = propsWithDefaults.onExit,
|
|
46
|
+
onExited = propsWithDefaults.onExited,
|
|
47
|
+
onExiting = propsWithDefaults.onExiting,
|
|
48
|
+
onSelect = propsWithDefaults.onSelect,
|
|
49
|
+
rest = _objectWithoutPropertiesLoose(propsWithDefaults, _excluded);
|
|
47
50
|
var id = useUniqueId('rs-', idProp);
|
|
48
51
|
var bodyId = id + "-panel";
|
|
49
52
|
var buttonId = id + "-btn";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { WithAsProps } from '../internals/types';
|
|
2
|
+
import type { WithAsProps } from '../internals/types';
|
|
3
3
|
type KeyType = string | number;
|
|
4
4
|
export interface PanelGroupProps<T = KeyType> extends WithAsProps {
|
|
5
5
|
/** Whether it is a collapsible panel. */
|
|
@@ -5,6 +5,7 @@ var _excluded = ["as", "accordion", "defaultActiveKey", "bordered", "className",
|
|
|
5
5
|
import React, { useMemo } from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import { useClassNames, useControlled, useEventCallback } from "../internals/hooks/index.js";
|
|
8
|
+
import { useCustom } from "../CustomProvider/index.js";
|
|
8
9
|
export var PanelGroupContext = /*#__PURE__*/React.createContext({});
|
|
9
10
|
|
|
10
11
|
/**
|
|
@@ -12,18 +13,20 @@ export var PanelGroupContext = /*#__PURE__*/React.createContext({});
|
|
|
12
13
|
* @see https://rsuitejs.com/components/panel
|
|
13
14
|
*/
|
|
14
15
|
var PanelGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
16
|
+
var _useCustom = useCustom('PanelGroup', props),
|
|
17
|
+
propsWithDefaults = _useCustom.propsWithDefaults;
|
|
18
|
+
var _propsWithDefaults$as = propsWithDefaults.as,
|
|
19
|
+
Component = _propsWithDefaults$as === void 0 ? 'div' : _propsWithDefaults$as,
|
|
20
|
+
accordion = propsWithDefaults.accordion,
|
|
21
|
+
defaultActiveKey = propsWithDefaults.defaultActiveKey,
|
|
22
|
+
bordered = propsWithDefaults.bordered,
|
|
23
|
+
className = propsWithDefaults.className,
|
|
24
|
+
_propsWithDefaults$cl = propsWithDefaults.classPrefix,
|
|
25
|
+
classPrefix = _propsWithDefaults$cl === void 0 ? 'panel-group' : _propsWithDefaults$cl,
|
|
26
|
+
children = propsWithDefaults.children,
|
|
27
|
+
activeProp = propsWithDefaults.activeKey,
|
|
28
|
+
onSelect = propsWithDefaults.onSelect,
|
|
29
|
+
rest = _objectWithoutPropertiesLoose(propsWithDefaults, _excluded);
|
|
27
30
|
var _useClassNames = useClassNames(classPrefix),
|
|
28
31
|
withClassPrefix = _useClassNames.withClassPrefix,
|
|
29
32
|
merge = _useClassNames.merge;
|
|
@@ -5,22 +5,25 @@ var _excluded = ["as", "className", "width", "height", "style", "active", "class
|
|
|
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 `Placeholder.Graph` component is used to display the loading state of the block.
|
|
10
11
|
* @see https://rsuitejs.com/components/placeholder
|
|
11
12
|
*/
|
|
12
13
|
var PlaceholderGraph = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
14
|
+
var _useCustom = useCustom('PlaceholderGraph', props),
|
|
15
|
+
propsWithDefaults = _useCustom.propsWithDefaults;
|
|
16
|
+
var _propsWithDefaults$as = propsWithDefaults.as,
|
|
17
|
+
Component = _propsWithDefaults$as === void 0 ? 'div' : _propsWithDefaults$as,
|
|
18
|
+
className = propsWithDefaults.className,
|
|
19
|
+
width = propsWithDefaults.width,
|
|
20
|
+
_propsWithDefaults$he = propsWithDefaults.height,
|
|
21
|
+
height = _propsWithDefaults$he === void 0 ? 200 : _propsWithDefaults$he,
|
|
22
|
+
style = propsWithDefaults.style,
|
|
23
|
+
active = propsWithDefaults.active,
|
|
24
|
+
_propsWithDefaults$cl = propsWithDefaults.classPrefix,
|
|
25
|
+
classPrefix = _propsWithDefaults$cl === void 0 ? 'placeholder' : _propsWithDefaults$cl,
|
|
26
|
+
rest = _objectWithoutPropertiesLoose(propsWithDefaults, _excluded);
|
|
24
27
|
var _useClassNames = useClassNames(classPrefix),
|
|
25
28
|
merge = _useClassNames.merge,
|
|
26
29
|
withClassPrefix = _useClassNames.withClassPrefix;
|
|
@@ -8,28 +8,31 @@ import React from 'react';
|
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
9
|
import classNames from 'classnames';
|
|
10
10
|
import { useClassNames } from "../internals/hooks/index.js";
|
|
11
|
+
import { useCustom } from "../CustomProvider/index.js";
|
|
11
12
|
/**
|
|
12
13
|
* The `Placeholder.Grid` component is used to display the loading state of the block.
|
|
13
14
|
* @see https://rsuitejs.com/components/placeholder
|
|
14
15
|
*/
|
|
15
16
|
var PlaceholderGrid = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
17
|
+
var _useCustom = useCustom('PlaceholderGrid', props),
|
|
18
|
+
propsWithDefaults = _useCustom.propsWithDefaults;
|
|
19
|
+
var _propsWithDefaults$as = propsWithDefaults.as,
|
|
20
|
+
Component = _propsWithDefaults$as === void 0 ? 'div' : _propsWithDefaults$as,
|
|
21
|
+
className = propsWithDefaults.className,
|
|
22
|
+
_propsWithDefaults$cl = propsWithDefaults.classPrefix,
|
|
23
|
+
classPrefix = _propsWithDefaults$cl === void 0 ? 'placeholder' : _propsWithDefaults$cl,
|
|
24
|
+
_propsWithDefaults$ro = propsWithDefaults.rows,
|
|
25
|
+
rows = _propsWithDefaults$ro === void 0 ? 5 : _propsWithDefaults$ro,
|
|
26
|
+
_propsWithDefaults$co = propsWithDefaults.columns,
|
|
27
|
+
columns = _propsWithDefaults$co === void 0 ? 5 : _propsWithDefaults$co,
|
|
28
|
+
_propsWithDefaults$ro2 = propsWithDefaults.rowHeight,
|
|
29
|
+
rowHeight = _propsWithDefaults$ro2 === void 0 ? 10 : _propsWithDefaults$ro2,
|
|
30
|
+
_propsWithDefaults$ro3 = propsWithDefaults.rowMargin,
|
|
31
|
+
rowMargin = _propsWithDefaults$ro3 === void 0 ? 20 : _propsWithDefaults$ro3,
|
|
32
|
+
_propsWithDefaults$ro4 = propsWithDefaults.rowSpacing,
|
|
33
|
+
rowSpacing = _propsWithDefaults$ro4 === void 0 ? rowMargin : _propsWithDefaults$ro4,
|
|
34
|
+
active = propsWithDefaults.active,
|
|
35
|
+
rest = _objectWithoutPropertiesLoose(propsWithDefaults, _excluded);
|
|
33
36
|
var _useClassNames = useClassNames(classPrefix),
|
|
34
37
|
merge = _useClassNames.merge,
|
|
35
38
|
prefix = _useClassNames.prefix,
|