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
|
@@ -7,6 +7,7 @@ import PropTypes from 'prop-types';
|
|
|
7
7
|
import { useClassNames } from "../internals/hooks/index.js";
|
|
8
8
|
import { highlightText } from "./utils/highlightText.js";
|
|
9
9
|
import { stringifyReactNode } from "../internals/utils/index.js";
|
|
10
|
+
import { useCustom } from "../CustomProvider/index.js";
|
|
10
11
|
function defaultRenderMark(match, index) {
|
|
11
12
|
return /*#__PURE__*/React.createElement("mark", {
|
|
12
13
|
key: index,
|
|
@@ -21,16 +22,18 @@ function defaultRenderMark(match, index) {
|
|
|
21
22
|
* @see https://rsuitejs.com/components/highlight
|
|
22
23
|
*/
|
|
23
24
|
var Highlight = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
25
|
+
var _useCustom = useCustom('Highlight', 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 ? 'highlight' : _propsWithDefaults$cl,
|
|
31
|
+
className = propsWithDefaults.className,
|
|
32
|
+
children = propsWithDefaults.children,
|
|
33
|
+
query = propsWithDefaults.query,
|
|
34
|
+
_propsWithDefaults$re = propsWithDefaults.renderMark,
|
|
35
|
+
renderMark = _propsWithDefaults$re === void 0 ? defaultRenderMark : _propsWithDefaults$re,
|
|
36
|
+
rest = _objectWithoutPropertiesLoose(propsWithDefaults, _excluded);
|
|
34
37
|
var _useClassNames = useClassNames(classPrefix),
|
|
35
38
|
withClassPrefix = _useClassNames.withClassPrefix,
|
|
36
39
|
merge = _useClassNames.merge;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import Button, { ButtonProps } from '../Button';
|
|
2
3
|
import { IconProps } from '@rsuite/icons/Icon';
|
|
3
4
|
import { RsRefForwardingComponent } from '../internals/types';
|
|
4
|
-
import Button, { ButtonProps } from '../Button';
|
|
5
5
|
export interface IconButtonProps extends ButtonProps {
|
|
6
6
|
/** Set the icon */
|
|
7
7
|
icon?: React.ReactElement<IconProps>;
|
|
@@ -4,23 +4,26 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
4
4
|
var _excluded = ["icon", "placement", "children", "circle", "classPrefix", "className"];
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
|
+
import Button from "../Button/index.js";
|
|
7
8
|
import { oneOf } from "../internals/propTypes/index.js";
|
|
8
9
|
import { useClassNames } from "../internals/hooks/index.js";
|
|
9
|
-
import
|
|
10
|
+
import { useCustom } from "../CustomProvider/index.js";
|
|
10
11
|
/**
|
|
11
12
|
* The `IconButton` component is used to specify a button with icon.
|
|
12
13
|
* @see https://rsuitejs.com/components/button
|
|
13
14
|
*/
|
|
14
15
|
var IconButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
var _useCustom = useCustom('IconButton', props),
|
|
17
|
+
propsWithDefaults = _useCustom.propsWithDefaults;
|
|
18
|
+
var icon = propsWithDefaults.icon,
|
|
19
|
+
_propsWithDefaults$pl = propsWithDefaults.placement,
|
|
20
|
+
placement = _propsWithDefaults$pl === void 0 ? 'left' : _propsWithDefaults$pl,
|
|
21
|
+
children = propsWithDefaults.children,
|
|
22
|
+
circle = propsWithDefaults.circle,
|
|
23
|
+
_propsWithDefaults$cl = propsWithDefaults.classPrefix,
|
|
24
|
+
classPrefix = _propsWithDefaults$cl === void 0 ? 'btn-icon' : _propsWithDefaults$cl,
|
|
25
|
+
className = propsWithDefaults.className,
|
|
26
|
+
rest = _objectWithoutPropertiesLoose(propsWithDefaults, _excluded);
|
|
24
27
|
var _useClassNames = useClassNames(classPrefix),
|
|
25
28
|
merge = _useClassNames.merge,
|
|
26
29
|
withClassPrefix = _useClassNames.withClassPrefix;
|
|
@@ -11,22 +11,25 @@ import EditableControls from "./EditableControls.js";
|
|
|
11
11
|
import useFocusEvent from "./useFocusEvent.js";
|
|
12
12
|
import useEditState from "./useEditState.js";
|
|
13
13
|
import { renderChildren, defaultRenderInput } from "./renderChildren.js";
|
|
14
|
+
import { useCustom } from "../CustomProvider/index.js";
|
|
14
15
|
var InlineEdit = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
16
|
+
var _useCustom = useCustom('InlineEdit', props),
|
|
17
|
+
propsWithDefaults = _useCustom.propsWithDefaults;
|
|
18
|
+
var _propsWithDefaults$as = propsWithDefaults.as,
|
|
19
|
+
Component = _propsWithDefaults$as === void 0 ? 'div' : _propsWithDefaults$as,
|
|
20
|
+
_propsWithDefaults$ch = propsWithDefaults.children,
|
|
21
|
+
children = _propsWithDefaults$ch === void 0 ? defaultRenderInput : _propsWithDefaults$ch,
|
|
22
|
+
_propsWithDefaults$cl = propsWithDefaults.classPrefix,
|
|
23
|
+
classPrefix = _propsWithDefaults$cl === void 0 ? 'inline-edit' : _propsWithDefaults$cl,
|
|
24
|
+
className = propsWithDefaults.className,
|
|
25
|
+
disabled = propsWithDefaults.disabled,
|
|
26
|
+
size = propsWithDefaults.size,
|
|
27
|
+
_propsWithDefaults$sh = propsWithDefaults.showControls,
|
|
28
|
+
showControls = _propsWithDefaults$sh === void 0 ? true : _propsWithDefaults$sh,
|
|
29
|
+
_propsWithDefaults$st = propsWithDefaults.stateOnBlur,
|
|
30
|
+
stateOnBlur = _propsWithDefaults$st === void 0 ? 'save' : _propsWithDefaults$st,
|
|
31
|
+
placeholder = propsWithDefaults.placeholder,
|
|
32
|
+
rest = _objectWithoutPropertiesLoose(propsWithDefaults, _excluded);
|
|
30
33
|
var _useClassNames = useClassNames(classPrefix),
|
|
31
34
|
withClassPrefix = _useClassNames.withClassPrefix,
|
|
32
35
|
merge = _useClassNames.merge,
|
package/esm/Input/Input.js
CHANGED
|
@@ -11,35 +11,38 @@ import { KEY_VALUES } from "../internals/constants/index.js";
|
|
|
11
11
|
import { useClassNames } from "../internals/hooks/index.js";
|
|
12
12
|
import { createChainedFunction, mergeRefs } from "../internals/utils/index.js";
|
|
13
13
|
import { refType, oneOf } from "../internals/propTypes/index.js";
|
|
14
|
+
import { useCustom } from "../CustomProvider/index.js";
|
|
14
15
|
/**
|
|
15
16
|
* The `<Input>` component is used to get user input in a text field.
|
|
16
17
|
*
|
|
17
18
|
* @see https://rsuitejs.com/components/input
|
|
18
19
|
*/
|
|
19
20
|
var Input = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
21
|
+
var _useCustom = useCustom('Input', props),
|
|
22
|
+
propsWithDefaults = _useCustom.propsWithDefaults;
|
|
23
|
+
var className = propsWithDefaults.className,
|
|
24
|
+
_propsWithDefaults$cl = propsWithDefaults.classPrefix,
|
|
25
|
+
classPrefix = _propsWithDefaults$cl === void 0 ? 'input' : _propsWithDefaults$cl,
|
|
26
|
+
_propsWithDefaults$as = propsWithDefaults.as,
|
|
27
|
+
Component = _propsWithDefaults$as === void 0 ? 'input' : _propsWithDefaults$as,
|
|
28
|
+
_propsWithDefaults$ty = propsWithDefaults.type,
|
|
29
|
+
type = _propsWithDefaults$ty === void 0 ? 'text' : _propsWithDefaults$ty,
|
|
30
|
+
disabled = propsWithDefaults.disabled,
|
|
31
|
+
value = propsWithDefaults.value,
|
|
32
|
+
defaultValue = propsWithDefaults.defaultValue,
|
|
33
|
+
inputRef = propsWithDefaults.inputRef,
|
|
34
|
+
id = propsWithDefaults.id,
|
|
35
|
+
size = propsWithDefaults.size,
|
|
36
|
+
htmlSize = propsWithDefaults.htmlSize,
|
|
37
|
+
plaintext = propsWithDefaults.plaintext,
|
|
38
|
+
placeholder = propsWithDefaults.placeholder,
|
|
39
|
+
readOnly = propsWithDefaults.readOnly,
|
|
40
|
+
onPressEnter = propsWithDefaults.onPressEnter,
|
|
41
|
+
onFocus = propsWithDefaults.onFocus,
|
|
42
|
+
onBlur = propsWithDefaults.onBlur,
|
|
43
|
+
onKeyDown = propsWithDefaults.onKeyDown,
|
|
44
|
+
onChange = propsWithDefaults.onChange,
|
|
45
|
+
rest = _objectWithoutPropertiesLoose(propsWithDefaults, _excluded);
|
|
43
46
|
var handleKeyDown = function handleKeyDown(event) {
|
|
44
47
|
if (event.key === KEY_VALUES.ENTER) {
|
|
45
48
|
onPressEnter === null || onPressEnter === void 0 ? void 0 : onPressEnter(event);
|
|
@@ -8,22 +8,25 @@ import InputGroupAddon from "./InputGroupAddon.js";
|
|
|
8
8
|
import InputGroupButton from "./InputGroupButton.js";
|
|
9
9
|
import { useClassNames } from "../internals/hooks/index.js";
|
|
10
10
|
import { oneOf } from "../internals/propTypes/index.js";
|
|
11
|
+
import { useCustom } from "../CustomProvider/index.js";
|
|
11
12
|
export var InputGroupContext = /*#__PURE__*/React.createContext(null);
|
|
12
13
|
/**
|
|
13
14
|
* The `InputGroup` component is used to specify an input field with an add-on.
|
|
14
15
|
* @see https://rsuitejs.com/components/input/#input-group
|
|
15
16
|
*/
|
|
16
17
|
var InputGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
var _useCustom = useCustom('InputGroup', props),
|
|
19
|
+
propsWithDefaults = _useCustom.propsWithDefaults;
|
|
20
|
+
var _propsWithDefaults$as = propsWithDefaults.as,
|
|
21
|
+
Component = _propsWithDefaults$as === void 0 ? 'div' : _propsWithDefaults$as,
|
|
22
|
+
_propsWithDefaults$cl = propsWithDefaults.classPrefix,
|
|
23
|
+
classPrefix = _propsWithDefaults$cl === void 0 ? 'input-group' : _propsWithDefaults$cl,
|
|
24
|
+
className = propsWithDefaults.className,
|
|
25
|
+
disabled = propsWithDefaults.disabled,
|
|
26
|
+
inside = propsWithDefaults.inside,
|
|
27
|
+
size = propsWithDefaults.size,
|
|
28
|
+
children = propsWithDefaults.children,
|
|
29
|
+
rest = _objectWithoutPropertiesLoose(propsWithDefaults, _excluded);
|
|
27
30
|
var _useState = useState(false),
|
|
28
31
|
focus = _useState[0],
|
|
29
32
|
setFocus = _useState[1];
|
|
@@ -5,9 +5,9 @@ var _excluded = ["as", "className", "classPrefix", "disabled", "decimalSeparator
|
|
|
5
5
|
import React, { useEffect, useRef, useState, useMemo, useCallback } from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import isNil from 'lodash/isNil';
|
|
8
|
-
import AngleUpIcon from '@rsuite/icons/legacy/AngleUp';
|
|
9
|
-
import AngleDownIcon from '@rsuite/icons/legacy/AngleDown';
|
|
10
8
|
import on from 'dom-lib/on';
|
|
9
|
+
import ArrowUpLineIcon from '@rsuite/icons/ArrowUpLine';
|
|
10
|
+
import ArrowDownLineIcon from '@rsuite/icons/ArrowDownLine';
|
|
11
11
|
import InputGroup from "../InputGroup/InputGroup.js";
|
|
12
12
|
import InputGroupAddon from "../InputGroup/InputGroupAddon.js";
|
|
13
13
|
import Input from "../Input/index.js";
|
|
@@ -16,6 +16,7 @@ import { useClassNames, useControlled, useEventCallback } from "../internals/hoo
|
|
|
16
16
|
import { KEY_VALUES } from "../internals/constants/index.js";
|
|
17
17
|
import { partitionHTMLProps, createChainedFunction } from "../internals/utils/index.js";
|
|
18
18
|
import { oneOf } from "../internals/propTypes/index.js";
|
|
19
|
+
import { useCustom } from "../CustomProvider/index.js";
|
|
19
20
|
/**
|
|
20
21
|
* Check if the value is a number.
|
|
21
22
|
* @param value
|
|
@@ -76,34 +77,36 @@ function valueReachesMin(value, min) {
|
|
|
76
77
|
* @see https://rsuitejs.com/components/input-number
|
|
77
78
|
*/
|
|
78
79
|
var InputNumber = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
79
|
-
var
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
80
|
+
var _useCustom = useCustom('InputNumber', props),
|
|
81
|
+
propsWithDefaults = _useCustom.propsWithDefaults;
|
|
82
|
+
var _propsWithDefaults$as = propsWithDefaults.as,
|
|
83
|
+
Component = _propsWithDefaults$as === void 0 ? InputGroup : _propsWithDefaults$as,
|
|
84
|
+
className = propsWithDefaults.className,
|
|
85
|
+
_propsWithDefaults$cl = propsWithDefaults.classPrefix,
|
|
86
|
+
classPrefix = _propsWithDefaults$cl === void 0 ? 'input-number' : _propsWithDefaults$cl,
|
|
87
|
+
disabled = propsWithDefaults.disabled,
|
|
88
|
+
decimalSeparator = propsWithDefaults.decimalSeparator,
|
|
89
|
+
formatter = propsWithDefaults.formatter,
|
|
90
|
+
readOnly = propsWithDefaults.readOnly,
|
|
91
|
+
plaintext = propsWithDefaults.plaintext,
|
|
92
|
+
valueProp = propsWithDefaults.value,
|
|
93
|
+
defaultValue = propsWithDefaults.defaultValue,
|
|
94
|
+
size = propsWithDefaults.size,
|
|
95
|
+
prefixElement = propsWithDefaults.prefix,
|
|
96
|
+
postfix = propsWithDefaults.postfix,
|
|
97
|
+
_propsWithDefaults$st = propsWithDefaults.step,
|
|
98
|
+
step = _propsWithDefaults$st === void 0 ? 1 : _propsWithDefaults$st,
|
|
99
|
+
_propsWithDefaults$bu = propsWithDefaults.buttonAppearance,
|
|
100
|
+
buttonAppearance = _propsWithDefaults$bu === void 0 ? 'subtle' : _propsWithDefaults$bu,
|
|
101
|
+
minProp = propsWithDefaults.min,
|
|
102
|
+
maxProp = propsWithDefaults.max,
|
|
103
|
+
_propsWithDefaults$sc = propsWithDefaults.scrollable,
|
|
104
|
+
scrollable = _propsWithDefaults$sc === void 0 ? true : _propsWithDefaults$sc,
|
|
105
|
+
onChange = propsWithDefaults.onChange,
|
|
106
|
+
onWheel = propsWithDefaults.onWheel,
|
|
107
|
+
onBlur = propsWithDefaults.onBlur,
|
|
108
|
+
onFocus = propsWithDefaults.onFocus,
|
|
109
|
+
restProps = _objectWithoutPropertiesLoose(propsWithDefaults, _excluded);
|
|
107
110
|
var min = minProp !== null && minProp !== void 0 ? minProp : -Infinity;
|
|
108
111
|
var max = maxProp !== null && maxProp !== void 0 ? maxProp : Infinity;
|
|
109
112
|
var _useControlled = useControlled(valueProp, defaultValue),
|
|
@@ -287,14 +290,14 @@ var InputNumber = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
287
290
|
onClick: handleStepUp,
|
|
288
291
|
disabled: stepUpDisabled,
|
|
289
292
|
"aria-label": "Increment"
|
|
290
|
-
}, /*#__PURE__*/React.createElement(
|
|
293
|
+
}, /*#__PURE__*/React.createElement(ArrowUpLineIcon, null)), /*#__PURE__*/React.createElement(Button, {
|
|
291
294
|
tabIndex: -1,
|
|
292
295
|
appearance: buttonAppearance,
|
|
293
296
|
className: prefix('touchspin-down'),
|
|
294
297
|
onClick: handleStepDown,
|
|
295
298
|
disabled: stepDownDisabled,
|
|
296
299
|
"aria-label": "Decrement"
|
|
297
|
-
}, /*#__PURE__*/React.createElement(
|
|
300
|
+
}, /*#__PURE__*/React.createElement(ArrowDownLineIcon, null))), postfix && /*#__PURE__*/React.createElement(InputGroupAddon, null, postfix));
|
|
298
301
|
});
|
|
299
302
|
InputNumber.displayName = 'InputNumber';
|
|
300
303
|
InputNumber.propTypes = {
|
|
@@ -17,18 +17,19 @@ import pick from 'lodash/pick';
|
|
|
17
17
|
import { shallowEqual, getDataGroupBy } from "../internals/utils/index.js";
|
|
18
18
|
import { filterNodesOfTree } from "../internals/Tree/utils/index.js";
|
|
19
19
|
import Plaintext from "../internals/Plaintext/index.js";
|
|
20
|
-
import { useClassNames,
|
|
20
|
+
import { useClassNames, useControlled, useEventCallback } from "../internals/hooks/index.js";
|
|
21
21
|
import { KEY_VALUES } from "../internals/constants/index.js";
|
|
22
22
|
import { createChainedFunction, tplTransform, mergeRefs, isOneOf } from "../internals/utils/index.js";
|
|
23
23
|
import { oneOf } from "../internals/propTypes/index.js";
|
|
24
24
|
import { Listbox, ListItem, ListCheckItem, PickerToggle, PickerPopup, PickerToggleTrigger, useFocusItemValue, usePickerClassName, useSearch, usePickerRef, useToggleKeyDownEvent, pickTriggerPropKeys, omitTriggerPropKeys, listPickerPropTypes } from "../internals/Picker/index.js";
|
|
25
25
|
import Tag from "../Tag/index.js";
|
|
26
26
|
import TextBox from "./TextBox.js";
|
|
27
|
-
import { useTagContext } from "./InputPickerContext.js";
|
|
28
27
|
import Stack from "../Stack/index.js";
|
|
29
28
|
import useInput from "./hooks/useInput.js";
|
|
30
29
|
import useData from "./hooks/useData.js";
|
|
30
|
+
import { useTagContext } from "./InputPickerContext.js";
|
|
31
31
|
import { convertSize } from "./utils.js";
|
|
32
|
+
import { useCustom } from "../CustomProvider/index.js";
|
|
32
33
|
/**
|
|
33
34
|
* Single item selector with text box input.
|
|
34
35
|
*
|
|
@@ -36,73 +37,75 @@ import { convertSize } from "./utils.js";
|
|
|
36
37
|
*/
|
|
37
38
|
var InputPicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
38
39
|
var _merge;
|
|
39
|
-
var
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
40
|
+
var _useCustom = useCustom('InputPicker', props),
|
|
41
|
+
propsWithDefaults = _useCustom.propsWithDefaults;
|
|
42
|
+
var _propsWithDefaults$as = propsWithDefaults.as,
|
|
43
|
+
Component = _propsWithDefaults$as === void 0 ? 'div' : _propsWithDefaults$as,
|
|
44
|
+
_propsWithDefaults$ap = propsWithDefaults.appearance,
|
|
45
|
+
appearance = _propsWithDefaults$ap === void 0 ? 'default' : _propsWithDefaults$ap,
|
|
46
|
+
_propsWithDefaults$cl = propsWithDefaults.cleanable,
|
|
47
|
+
cleanable = _propsWithDefaults$cl === void 0 ? true : _propsWithDefaults$cl,
|
|
48
|
+
_propsWithDefaults$ca = propsWithDefaults.cacheData,
|
|
49
|
+
cacheData = _propsWithDefaults$ca === void 0 ? [] : _propsWithDefaults$ca,
|
|
50
|
+
_propsWithDefaults$cl2 = propsWithDefaults.classPrefix,
|
|
51
|
+
classPrefix = _propsWithDefaults$cl2 === void 0 ? 'picker' : _propsWithDefaults$cl2,
|
|
52
|
+
_propsWithDefaults$da = propsWithDefaults.data,
|
|
53
|
+
controlledData = _propsWithDefaults$da === void 0 ? [] : _propsWithDefaults$da,
|
|
54
|
+
disabled = propsWithDefaults.disabled,
|
|
55
|
+
readOnly = propsWithDefaults.readOnly,
|
|
56
|
+
plaintext = propsWithDefaults.plaintext,
|
|
57
|
+
defaultValue = propsWithDefaults.defaultValue,
|
|
58
|
+
_propsWithDefaults$de = propsWithDefaults.defaultOpen,
|
|
59
|
+
defaultOpen = _propsWithDefaults$de === void 0 ? false : _propsWithDefaults$de,
|
|
60
|
+
_propsWithDefaults$di = propsWithDefaults.disabledItemValues,
|
|
61
|
+
disabledItemValues = _propsWithDefaults$di === void 0 ? [] : _propsWithDefaults$di,
|
|
62
|
+
locale = propsWithDefaults.locale,
|
|
63
|
+
toggleAs = propsWithDefaults.toggleAs,
|
|
64
|
+
style = propsWithDefaults.style,
|
|
65
|
+
size = propsWithDefaults.size,
|
|
66
|
+
_propsWithDefaults$se = propsWithDefaults.searchable,
|
|
67
|
+
searchable = _propsWithDefaults$se === void 0 ? true : _propsWithDefaults$se,
|
|
68
|
+
controlledOpen = propsWithDefaults.open,
|
|
69
|
+
placeholder = propsWithDefaults.placeholder,
|
|
70
|
+
_propsWithDefaults$pl = propsWithDefaults.placement,
|
|
71
|
+
placement = _propsWithDefaults$pl === void 0 ? 'bottomStart' : _propsWithDefaults$pl,
|
|
72
|
+
groupBy = propsWithDefaults.groupBy,
|
|
73
|
+
menuClassName = propsWithDefaults.menuClassName,
|
|
74
|
+
menuStyle = propsWithDefaults.menuStyle,
|
|
75
|
+
_propsWithDefaults$me = propsWithDefaults.menuAutoWidth,
|
|
76
|
+
menuAutoWidth = _propsWithDefaults$me === void 0 ? true : _propsWithDefaults$me,
|
|
77
|
+
_propsWithDefaults$me2 = propsWithDefaults.menuMaxHeight,
|
|
78
|
+
menuMaxHeight = _propsWithDefaults$me2 === void 0 ? 320 : _propsWithDefaults$me2,
|
|
79
|
+
creatable = propsWithDefaults.creatable,
|
|
80
|
+
shouldDisplayCreateOption = propsWithDefaults.shouldDisplayCreateOption,
|
|
81
|
+
valueProp = propsWithDefaults.value,
|
|
82
|
+
_propsWithDefaults$va = propsWithDefaults.valueKey,
|
|
83
|
+
valueKey = _propsWithDefaults$va === void 0 ? 'value' : _propsWithDefaults$va,
|
|
84
|
+
virtualized = propsWithDefaults.virtualized,
|
|
85
|
+
_propsWithDefaults$la = propsWithDefaults.labelKey,
|
|
86
|
+
labelKey = _propsWithDefaults$la === void 0 ? 'label' : _propsWithDefaults$la,
|
|
87
|
+
listProps = propsWithDefaults.listProps,
|
|
88
|
+
id = propsWithDefaults.id,
|
|
89
|
+
tabIndex = propsWithDefaults.tabIndex,
|
|
90
|
+
sort = propsWithDefaults.sort,
|
|
91
|
+
renderMenu = propsWithDefaults.renderMenu,
|
|
92
|
+
renderExtraFooter = propsWithDefaults.renderExtraFooter,
|
|
93
|
+
renderValue = propsWithDefaults.renderValue,
|
|
94
|
+
renderMenuItem = propsWithDefaults.renderMenuItem,
|
|
95
|
+
renderMenuGroup = propsWithDefaults.renderMenuGroup,
|
|
96
|
+
onEnter = propsWithDefaults.onEnter,
|
|
97
|
+
onEntered = propsWithDefaults.onEntered,
|
|
98
|
+
onExit = propsWithDefaults.onExit,
|
|
99
|
+
onExited = propsWithDefaults.onExited,
|
|
100
|
+
onChange = propsWithDefaults.onChange,
|
|
101
|
+
onClean = propsWithDefaults.onClean,
|
|
102
|
+
onCreate = propsWithDefaults.onCreate,
|
|
103
|
+
onSearch = propsWithDefaults.onSearch,
|
|
104
|
+
onSelect = propsWithDefaults.onSelect,
|
|
105
|
+
onBlur = propsWithDefaults.onBlur,
|
|
106
|
+
onFocus = propsWithDefaults.onFocus,
|
|
107
|
+
searchBy = propsWithDefaults.searchBy,
|
|
108
|
+
rest = _objectWithoutPropertiesLoose(propsWithDefaults, _excluded);
|
|
106
109
|
var _useTagContext = useTagContext(),
|
|
107
110
|
multi = _useTagContext.multi,
|
|
108
111
|
tagProps = _useTagContext.tagProps,
|
|
@@ -119,8 +122,6 @@ var InputPicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
119
122
|
target = _usePickerRef.target,
|
|
120
123
|
overlay = _usePickerRef.overlay,
|
|
121
124
|
list = _usePickerRef.list;
|
|
122
|
-
var _useCustom = useCustom(['Picker', 'InputPicker'], overrideLocale),
|
|
123
|
-
locale = _useCustom.locale;
|
|
124
125
|
var _useClassNames = useClassNames(classPrefix),
|
|
125
126
|
prefix = _useClassNames.prefix,
|
|
126
127
|
merge = _useClassNames.merge;
|
|
@@ -458,7 +459,7 @@ var InputPicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
458
459
|
});
|
|
459
460
|
var renderListItem = function renderListItem(label, item) {
|
|
460
461
|
// 'Create option "{0}"' => Create option "xxxxx"
|
|
461
|
-
var newLabel = item.create ? /*#__PURE__*/React.createElement("span", null, tplTransform(locale.createOption, label)) : label;
|
|
462
|
+
var newLabel = item.create ? /*#__PURE__*/React.createElement("span", null, tplTransform((locale === null || locale === void 0 ? void 0 : locale.createOption) || '', label)) : label;
|
|
462
463
|
return renderMenuItem ? renderMenuItem(newLabel, item) : newLabel;
|
|
463
464
|
};
|
|
464
465
|
var checkValue = function checkValue() {
|
package/esm/List/List.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SortConfig } from './helper/useSortHelper';
|
|
2
|
-
import { RsRefForwardingComponent, WithAsProps } from '../internals/types';
|
|
3
2
|
import ListItem from './ListItem';
|
|
3
|
+
import { RsRefForwardingComponent, WithAsProps } from '../internals/types';
|
|
4
4
|
export interface ListProps extends WithAsProps, SortConfig {
|
|
5
5
|
size?: 'lg' | 'md' | 'sm';
|
|
6
6
|
bordered?: boolean;
|
package/esm/List/List.js
CHANGED
|
@@ -5,38 +5,41 @@ var _excluded = ["as", "classPrefix", "className", "bordered", "hover", "size",
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import React, { useMemo } from 'react';
|
|
7
7
|
import useSortHelper from "./helper/useSortHelper.js";
|
|
8
|
-
import { useClassNames } from "../internals/hooks/index.js";
|
|
9
|
-
import { mergeRefs } from "../internals/utils/index.js";
|
|
10
8
|
import ListContext from "./ListContext.js";
|
|
11
9
|
import ListItem from "./ListItem.js";
|
|
10
|
+
import { useClassNames } from "../internals/hooks/index.js";
|
|
11
|
+
import { mergeRefs } from "../internals/utils/index.js";
|
|
12
12
|
import { oneOf } from "../internals/propTypes/index.js";
|
|
13
|
+
import { useCustom } from "../CustomProvider/index.js";
|
|
13
14
|
/**
|
|
14
15
|
* The `List` component is used to specify the layout of the list.
|
|
15
16
|
* @see https://rsuitejs.com/components/list
|
|
16
17
|
*/
|
|
17
18
|
var List = /*#__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('List', props),
|
|
20
|
+
propsWithDefaults = _useCustom.propsWithDefaults;
|
|
21
|
+
var _propsWithDefaults$as = propsWithDefaults.as,
|
|
22
|
+
Component = _propsWithDefaults$as === void 0 ? 'div' : _propsWithDefaults$as,
|
|
23
|
+
_propsWithDefaults$cl = propsWithDefaults.classPrefix,
|
|
24
|
+
classPrefix = _propsWithDefaults$cl === void 0 ? 'list' : _propsWithDefaults$cl,
|
|
25
|
+
className = propsWithDefaults.className,
|
|
26
|
+
bordered = propsWithDefaults.bordered,
|
|
27
|
+
hover = propsWithDefaults.hover,
|
|
28
|
+
_propsWithDefaults$si = propsWithDefaults.size,
|
|
29
|
+
size = _propsWithDefaults$si === void 0 ? 'md' : _propsWithDefaults$si,
|
|
30
|
+
sortable = propsWithDefaults.sortable,
|
|
31
|
+
_propsWithDefaults$au = propsWithDefaults.autoScroll,
|
|
32
|
+
autoScroll = _propsWithDefaults$au === void 0 ? true : _propsWithDefaults$au,
|
|
33
|
+
_propsWithDefaults$pr = propsWithDefaults.pressDelay,
|
|
34
|
+
pressDelay = _propsWithDefaults$pr === void 0 ? 0 : _propsWithDefaults$pr,
|
|
35
|
+
_propsWithDefaults$tr = propsWithDefaults.transitionDuration,
|
|
36
|
+
transitionDuration = _propsWithDefaults$tr === void 0 ? 300 : _propsWithDefaults$tr,
|
|
37
|
+
children = propsWithDefaults.children,
|
|
38
|
+
onSort = propsWithDefaults.onSort,
|
|
39
|
+
onSortEnd = propsWithDefaults.onSortEnd,
|
|
40
|
+
onSortMove = propsWithDefaults.onSortMove,
|
|
41
|
+
onSortStart = propsWithDefaults.onSortStart,
|
|
42
|
+
rest = _objectWithoutPropertiesLoose(propsWithDefaults, _excluded);
|
|
40
43
|
var _useClassNames = useClassNames(classPrefix),
|
|
41
44
|
withClassPrefix = _useClassNames.withClassPrefix,
|
|
42
45
|
merge = _useClassNames.merge;
|