rsuite 5.46.1 → 5.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/CloseButton/styles/index.less +13 -7
- package/DateInput/package.json +7 -0
- package/Message/styles/mixin.less +8 -0
- package/Notification/styles/index.less +8 -0
- package/Picker/styles/index.less +0 -9
- package/Tag/styles/index.less +2 -5
- package/Uploader/styles/index.less +1 -2
- package/cjs/Affix/Affix.d.ts +6 -0
- package/cjs/Affix/Affix.js +7 -0
- package/cjs/Animation/Bounce.d.ts +4 -0
- package/cjs/Animation/Bounce.js +4 -0
- package/cjs/Animation/Collapse.d.ts +4 -0
- package/cjs/Animation/Collapse.js +5 -0
- package/cjs/Animation/Fade.d.ts +4 -0
- package/cjs/Animation/Fade.js +4 -0
- package/cjs/Animation/Slide.d.ts +4 -0
- package/cjs/Animation/Slide.js +4 -0
- package/cjs/Animation/Transition.d.ts +4 -0
- package/cjs/Animation/Transition.js +4 -0
- package/cjs/AutoComplete/AutoComplete.d.ts +3 -0
- package/cjs/AutoComplete/AutoComplete.js +3 -0
- package/cjs/Avatar/Avatar.d.ts +4 -0
- package/cjs/Avatar/Avatar.js +4 -0
- package/cjs/AvatarGroup/AvatarGroup.d.ts +4 -0
- package/cjs/AvatarGroup/AvatarGroup.js +5 -0
- package/cjs/Badge/Badge.d.ts +4 -0
- package/cjs/Badge/Badge.js +4 -0
- package/cjs/Breadcrumb/Breadcrumb.d.ts +4 -0
- package/cjs/Breadcrumb/Breadcrumb.js +4 -0
- package/cjs/Breadcrumb/BreadcrumbItem.d.ts +4 -0
- package/cjs/Breadcrumb/BreadcrumbItem.js +4 -0
- package/cjs/Button/Button.d.ts +4 -0
- package/cjs/Button/Button.js +4 -0
- package/cjs/ButtonGroup/ButtonGroup.d.ts +4 -0
- package/cjs/ButtonGroup/ButtonGroup.js +4 -0
- package/cjs/ButtonToolbar/ButtonToolbar.d.ts +4 -0
- package/cjs/ButtonToolbar/ButtonToolbar.js +4 -0
- package/cjs/Calendar/Calendar.d.ts +4 -0
- package/cjs/Calendar/Calendar.js +4 -0
- package/cjs/Carousel/Carousel.d.ts +4 -0
- package/cjs/Carousel/Carousel.js +4 -0
- package/cjs/Cascader/Cascader.d.ts +4 -0
- package/cjs/Cascader/Cascader.js +5 -0
- package/cjs/CheckPicker/CheckPicker.d.ts +4 -0
- package/cjs/CheckPicker/CheckPicker.js +4 -0
- package/cjs/CheckTree/index.d.ts +4 -0
- package/cjs/CheckTree/index.js +4 -0
- package/cjs/CheckTreePicker/CheckTreePicker.d.ts +5 -0
- package/cjs/CheckTreePicker/CheckTreePicker.js +6 -0
- package/cjs/Checkbox/Checkbox.d.ts +6 -0
- package/cjs/Checkbox/Checkbox.js +4 -0
- package/cjs/CheckboxGroup/CheckboxGroup.d.ts +4 -0
- package/cjs/CheckboxGroup/CheckboxGroup.js +4 -0
- package/cjs/CloseButton/CloseButton.js +3 -5
- package/cjs/Col/Col.d.ts +4 -0
- package/cjs/Col/Col.js +4 -0
- package/cjs/Container/Container.d.ts +4 -0
- package/cjs/Container/Container.js +4 -0
- package/cjs/Content/Content.d.ts +3 -0
- package/cjs/Content/Content.js +3 -0
- package/cjs/CustomProvider/CustomProvider.d.ts +8 -3
- package/cjs/CustomProvider/CustomProvider.js +6 -0
- package/cjs/DOMHelper/index.d.ts +4 -0
- package/cjs/DOMHelper/index.js +4 -0
- package/cjs/DateInput/DateField.d.ts +180 -0
- package/cjs/DateInput/DateField.js +151 -0
- package/cjs/DateInput/DateInput.d.ts +18 -0
- package/cjs/DateInput/DateInput.js +222 -0
- package/cjs/DateInput/index.d.ts +3 -0
- package/cjs/DateInput/index.js +9 -0
- package/cjs/DateInput/useDateInputState.d.ts +165 -0
- package/cjs/DateInput/useDateInputState.js +105 -0
- package/cjs/DateInput/utils.d.ts +41 -0
- package/cjs/DateInput/utils.js +159 -0
- package/cjs/DatePicker/DatePicker.d.ts +5 -0
- package/cjs/DatePicker/DatePicker.js +5 -0
- package/cjs/DateRangePicker/DateRangePicker.d.ts +5 -0
- package/cjs/DateRangePicker/DateRangePicker.js +5 -0
- package/cjs/Divider/Divider.d.ts +4 -0
- package/cjs/Divider/Divider.js +4 -0
- package/cjs/Drawer/Drawer.d.ts +4 -0
- package/cjs/Drawer/Drawer.js +4 -0
- package/cjs/Dropdown/Dropdown.d.ts +6 -3
- package/cjs/Dropdown/Dropdown.js +6 -3
- package/cjs/Dropdown/DropdownItem.d.ts +3 -3
- package/cjs/Dropdown/DropdownItem.js +3 -3
- package/cjs/Dropdown/DropdownMenu.d.ts +3 -3
- package/cjs/Dropdown/DropdownMenu.js +3 -3
- package/cjs/Dropdown/DropdownSeparator.d.ts +1 -1
- package/cjs/Dropdown/DropdownSeparator.js +1 -1
- package/cjs/FlexboxGrid/FlexboxGrid.d.ts +4 -0
- package/cjs/FlexboxGrid/FlexboxGrid.js +4 -0
- package/cjs/FlexboxGrid/FlexboxGridItem.d.ts +4 -0
- package/cjs/FlexboxGrid/FlexboxGridItem.js +4 -0
- package/cjs/Footer/Footer.d.ts +4 -0
- package/cjs/Footer/Footer.js +4 -0
- package/cjs/Form/Form.d.ts +4 -0
- package/cjs/Form/Form.js +4 -0
- package/cjs/FormControl/FormControl.d.ts +4 -0
- package/cjs/FormControl/FormControl.js +4 -0
- package/cjs/FormControlLabel/FormControlLabel.d.ts +4 -0
- package/cjs/FormControlLabel/FormControlLabel.js +4 -0
- package/cjs/FormErrorMessage/FormErrorMessage.d.ts +4 -0
- package/cjs/FormErrorMessage/FormErrorMessage.js +4 -0
- package/cjs/FormGroup/FormGroup.d.ts +4 -0
- package/cjs/FormGroup/FormGroup.js +5 -0
- package/cjs/FormHelpText/FormHelpText.d.ts +4 -0
- package/cjs/FormHelpText/FormHelpText.js +4 -0
- package/cjs/Grid/Grid.d.ts +4 -0
- package/cjs/Grid/Grid.js +4 -0
- package/cjs/Header/Header.d.ts +4 -0
- package/cjs/Header/Header.js +4 -0
- package/cjs/IconButton/IconButton.d.ts +4 -0
- package/cjs/IconButton/IconButton.js +4 -0
- package/cjs/Input/Input.d.ts +4 -0
- package/cjs/Input/Input.js +4 -0
- package/cjs/InputGroup/InputGroup.d.ts +4 -0
- package/cjs/InputGroup/InputGroup.js +4 -0
- package/cjs/InputGroup/InputGroupAddon.d.ts +4 -0
- package/cjs/InputGroup/InputGroupAddon.js +4 -0
- package/cjs/InputGroup/InputGroupButton.d.ts +4 -0
- package/cjs/InputGroup/InputGroupButton.js +4 -0
- package/cjs/InputNumber/InputNumber.d.ts +4 -0
- package/cjs/InputNumber/InputNumber.js +5 -0
- package/cjs/InputPicker/InputPicker.d.ts +8 -22
- package/cjs/InputPicker/InputPicker.js +13 -8
- package/cjs/InputPicker/InputPickerContext.d.ts +26 -0
- package/cjs/InputPicker/InputPickerContext.js +13 -0
- package/cjs/List/List.d.ts +4 -0
- package/cjs/List/List.js +4 -0
- package/cjs/List/ListItem.d.ts +4 -0
- package/cjs/List/ListItem.js +4 -0
- package/cjs/Loader/Loader.d.ts +4 -0
- package/cjs/Loader/Loader.js +4 -0
- package/cjs/MaskedInput/TextMask.d.ts +4 -0
- package/cjs/MaskedInput/TextMask.js +5 -0
- package/cjs/MaskedInput/createTextMaskInputElement.js +6 -16
- package/cjs/Message/Message.d.ts +4 -0
- package/cjs/Message/Message.js +4 -0
- package/cjs/Modal/Modal.d.ts +4 -0
- package/cjs/Modal/Modal.js +4 -0
- package/cjs/MultiCascader/MultiCascader.d.ts +4 -0
- package/cjs/MultiCascader/MultiCascader.js +5 -0
- package/cjs/Nav/Nav.d.ts +4 -0
- package/cjs/Nav/Nav.js +4 -0
- package/cjs/Nav/NavDropdown.d.ts +2 -1
- package/cjs/Nav/NavDropdown.js +2 -1
- package/cjs/Nav/NavItem.d.ts +6 -3
- package/cjs/Nav/NavItem.js +6 -3
- package/cjs/Nav/NavMenu.d.ts +6 -3
- package/cjs/Nav/NavMenu.js +6 -3
- package/cjs/Navbar/Navbar.d.ts +4 -0
- package/cjs/Navbar/Navbar.js +4 -0
- package/cjs/Notification/Notification.d.ts +5 -0
- package/cjs/Notification/Notification.js +5 -0
- package/cjs/Overlay/Overlay.d.ts +4 -0
- package/cjs/Overlay/Overlay.js +5 -0
- package/cjs/Overlay/OverlayTrigger.d.ts +4 -0
- package/cjs/Overlay/OverlayTrigger.js +16 -11
- package/cjs/Overlay/Position.d.ts +4 -0
- package/cjs/Overlay/Position.js +4 -0
- package/cjs/Pagination/Pagination.d.ts +5 -0
- package/cjs/Pagination/Pagination.js +5 -0
- package/cjs/Panel/Panel.d.ts +4 -0
- package/cjs/Panel/Panel.js +4 -0
- package/cjs/PanelGroup/PanelGroup.d.ts +4 -0
- package/cjs/PanelGroup/PanelGroup.js +5 -0
- package/cjs/Picker/DropdownMenu.d.ts +1 -0
- package/cjs/Picker/DropdownMenu.js +7 -3
- package/cjs/Picker/DropdownMenuCheckItem.d.ts +2 -0
- package/cjs/Picker/DropdownMenuCheckItem.js +18 -14
- package/cjs/Picker/PickerToggle.js +3 -1
- package/cjs/Placeholder/Placeholder.d.ts +4 -0
- package/cjs/Placeholder/Placeholder.js +4 -0
- package/cjs/Placeholder/PlaceholderGraph.d.ts +4 -0
- package/cjs/Placeholder/PlaceholderGraph.js +4 -0
- package/cjs/Placeholder/PlaceholderGrid.d.ts +4 -0
- package/cjs/Placeholder/PlaceholderGrid.js +4 -0
- package/cjs/Placeholder/PlaceholderParagraph.d.ts +4 -0
- package/cjs/Placeholder/PlaceholderParagraph.js +4 -0
- package/cjs/Plaintext/Plaintext.d.ts +2 -1
- package/cjs/Plaintext/Plaintext.js +5 -2
- package/cjs/Popover/Popover.d.ts +4 -0
- package/cjs/Popover/Popover.js +4 -0
- package/cjs/Progress/Progress.d.ts +4 -0
- package/cjs/Progress/Progress.js +4 -0
- package/cjs/Progress/ProgressCircle.d.ts +4 -0
- package/cjs/Progress/ProgressCircle.js +4 -0
- package/cjs/Progress/ProgressLine.d.ts +4 -0
- package/cjs/Progress/ProgressLine.js +4 -0
- package/cjs/Radio/Radio.d.ts +4 -0
- package/cjs/Radio/Radio.js +4 -0
- package/cjs/RadioGroup/RadioGroup.d.ts +4 -0
- package/cjs/RadioGroup/RadioGroup.js +5 -0
- package/cjs/RadioTile/RadioTile.d.ts +5 -0
- package/cjs/RadioTile/RadioTile.js +5 -0
- package/cjs/RadioTileGroup/RadioTileGroup.d.ts +5 -0
- package/cjs/RadioTileGroup/RadioTileGroup.js +6 -0
- package/cjs/RangeSlider/RangeSlider.d.ts +4 -0
- package/cjs/RangeSlider/RangeSlider.js +5 -0
- package/cjs/Rate/Rate.d.ts +4 -0
- package/cjs/Rate/Rate.js +4 -0
- package/cjs/Ripple/Ripple.d.ts +4 -0
- package/cjs/Ripple/Ripple.js +5 -0
- package/cjs/Row/Row.d.ts +4 -0
- package/cjs/Row/Row.js +4 -0
- package/cjs/SafeAnchor/SafeAnchor.d.ts +4 -0
- package/cjs/SafeAnchor/SafeAnchor.js +5 -0
- package/cjs/Schema/Schema.d.ts +6 -0
- package/cjs/Schema/Schema.js +6 -0
- package/cjs/SelectPicker/SelectPicker.d.ts +4 -0
- package/cjs/SelectPicker/SelectPicker.js +4 -0
- package/cjs/Sidebar/Sidebar.d.ts +4 -0
- package/cjs/Sidebar/Sidebar.js +4 -0
- package/cjs/Sidenav/Sidenav.d.ts +4 -0
- package/cjs/Sidenav/Sidenav.js +5 -0
- package/cjs/Sidenav/SidenavBody.d.ts +5 -0
- package/cjs/Sidenav/SidenavBody.js +5 -0
- package/cjs/Sidenav/SidenavHeader.d.ts +5 -0
- package/cjs/Sidenav/SidenavHeader.js +5 -0
- package/cjs/Slider/Slider.d.ts +5 -0
- package/cjs/Slider/Slider.js +6 -0
- package/cjs/Stack/Stack.d.ts +6 -0
- package/cjs/Stack/Stack.js +6 -0
- package/cjs/Stack/StackItem.d.ts +5 -0
- package/cjs/Stack/StackItem.js +5 -0
- package/cjs/Steps/StepItem.d.ts +5 -0
- package/cjs/Steps/StepItem.js +5 -0
- package/cjs/Steps/Steps.d.ts +5 -0
- package/cjs/Steps/Steps.js +5 -0
- package/cjs/Table/Table.d.ts +19 -2
- package/cjs/Table/Table.js +20 -1
- package/cjs/Tag/Tag.d.ts +6 -0
- package/cjs/Tag/Tag.js +13 -1
- package/cjs/TagGroup/TagGroup.d.ts +5 -0
- package/cjs/TagGroup/TagGroup.js +5 -0
- package/cjs/TagInput/index.d.ts +8 -15
- package/cjs/TagInput/index.js +8 -2
- package/cjs/TagPicker/index.d.ts +13 -10
- package/cjs/TagPicker/index.js +13 -5
- package/cjs/Timeline/Timeline.d.ts +5 -0
- package/cjs/Timeline/Timeline.js +5 -0
- package/cjs/Timeline/TimelineItem.d.ts +5 -0
- package/cjs/Timeline/TimelineItem.js +5 -0
- package/cjs/Toggle/Toggle.d.ts +5 -0
- package/cjs/Toggle/Toggle.js +5 -0
- package/cjs/Tooltip/Tooltip.d.ts +5 -0
- package/cjs/Tooltip/Tooltip.js +5 -0
- package/cjs/Tree/Tree.d.ts +5 -0
- package/cjs/Tree/Tree.js +5 -0
- package/cjs/TreePicker/TreePicker.d.ts +5 -0
- package/cjs/TreePicker/TreePicker.js +6 -0
- package/cjs/Uploader/UploadFileItem.js +19 -5
- package/cjs/Uploader/Uploader.d.ts +5 -0
- package/cjs/Uploader/Uploader.js +6 -0
- package/cjs/Whisper/Whisper.d.ts +6 -0
- package/cjs/Whisper/Whisper.js +6 -0
- package/cjs/Windowing/AutoSizer.d.ts +5 -0
- package/cjs/Windowing/AutoSizer.js +5 -0
- package/cjs/Windowing/List.d.ts +6 -1
- package/cjs/Windowing/List.js +5 -0
- package/cjs/index.d.ts +3 -0
- package/cjs/index.js +6 -2
- package/cjs/locales/ar_EG.d.ts +3 -0
- package/cjs/locales/ar_EG.js +5 -2
- package/cjs/locales/da_DK.d.ts +3 -0
- package/cjs/locales/da_DK.js +5 -2
- package/cjs/locales/de_DE.d.ts +3 -0
- package/cjs/locales/de_DE.js +5 -2
- package/cjs/locales/default.d.ts +3 -0
- package/cjs/locales/default.js +5 -2
- package/cjs/locales/en_US.d.ts +3 -0
- package/cjs/locales/en_US.js +5 -2
- package/cjs/locales/es_AR.d.ts +3 -0
- package/cjs/locales/es_AR.js +5 -2
- package/cjs/locales/es_ES.d.ts +3 -0
- package/cjs/locales/es_ES.js +5 -2
- package/cjs/locales/fa_IR.d.ts +3 -0
- package/cjs/locales/fa_IR.js +5 -2
- package/cjs/locales/fi_FI.d.ts +3 -0
- package/cjs/locales/fi_FI.js +5 -2
- package/cjs/locales/fr_FR.d.ts +3 -0
- package/cjs/locales/fr_FR.js +5 -2
- package/cjs/locales/hu_HU.d.ts +3 -0
- package/cjs/locales/hu_HU.js +5 -2
- package/cjs/locales/index.d.ts +1 -1
- package/cjs/locales/it_IT.d.ts +3 -0
- package/cjs/locales/it_IT.js +5 -2
- package/cjs/locales/ja_JP.d.ts +3 -0
- package/cjs/locales/ja_JP.js +5 -2
- package/cjs/locales/kk_KZ.d.ts +3 -0
- package/cjs/locales/kk_KZ.js +5 -2
- package/cjs/locales/ko_KR.d.ts +3 -0
- package/cjs/locales/ko_KR.js +5 -2
- package/cjs/locales/ne_NP.d.ts +3 -0
- package/cjs/locales/ne_NP.js +5 -2
- package/cjs/locales/nl_NL.d.ts +3 -0
- package/cjs/locales/nl_NL.js +5 -2
- package/cjs/locales/pt_BR.d.ts +3 -0
- package/cjs/locales/pt_BR.js +5 -2
- package/cjs/locales/ru_RU.d.ts +3 -0
- package/cjs/locales/ru_RU.js +6 -3
- package/cjs/locales/sv_SE.d.ts +3 -0
- package/cjs/locales/sv_SE.js +5 -2
- package/cjs/locales/tr_TR.d.ts +3 -0
- package/cjs/locales/tr_TR.js +5 -2
- package/cjs/locales/zh_CN.d.ts +3 -0
- package/cjs/locales/zh_CN.js +5 -2
- package/cjs/locales/zh_TW.d.ts +3 -0
- package/cjs/locales/zh_TW.js +5 -2
- package/cjs/toaster/toaster.d.ts +9 -7
- package/cjs/toaster/useToaster.d.ts +19 -1
- package/cjs/toaster/useToaster.js +19 -1
- package/cjs/useMediaQuery/index.d.ts +2 -0
- package/cjs/useMediaQuery/index.js +9 -0
- package/cjs/useMediaQuery/useMediaQuery.d.ts +23 -0
- package/cjs/useMediaQuery/useMediaQuery.js +123 -0
- package/cjs/utils/BrowserDetection.d.ts +1 -0
- package/cjs/utils/BrowserDetection.js +5 -1
- package/cjs/utils/dateUtils.d.ts +6 -0
- package/cjs/utils/dateUtils.js +13 -1
- package/cjs/utils/index.d.ts +1 -0
- package/cjs/utils/index.js +4 -1
- package/cjs/utils/safeSetSelection.d.ts +2 -0
- package/cjs/utils/safeSetSelection.js +21 -0
- package/cjs/utils/treeUtils.d.ts +2 -2
- package/dist/rsuite-no-reset-rtl.css +54 -25
- 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 +54 -25
- package/dist/rsuite-no-reset.min.css +1 -1
- package/dist/rsuite-no-reset.min.css.map +1 -1
- package/dist/rsuite-rtl.css +54 -25
- package/dist/rsuite-rtl.min.css +1 -1
- package/dist/rsuite-rtl.min.css.map +1 -1
- package/dist/rsuite.css +54 -25
- package/dist/rsuite.js +354 -129
- package/dist/rsuite.js.map +1 -1
- package/dist/rsuite.min.css +1 -1
- package/dist/rsuite.min.css.map +1 -1
- package/dist/rsuite.min.js +1 -1
- package/dist/rsuite.min.js.map +1 -1
- package/esm/Affix/Affix.d.ts +6 -0
- package/esm/Affix/Affix.js +7 -0
- package/esm/Animation/Bounce.d.ts +4 -0
- package/esm/Animation/Bounce.js +4 -0
- package/esm/Animation/Collapse.d.ts +4 -0
- package/esm/Animation/Collapse.js +5 -0
- package/esm/Animation/Fade.d.ts +4 -0
- package/esm/Animation/Fade.js +4 -0
- package/esm/Animation/Slide.d.ts +4 -0
- package/esm/Animation/Slide.js +4 -0
- package/esm/Animation/Transition.d.ts +4 -0
- package/esm/Animation/Transition.js +4 -0
- package/esm/AutoComplete/AutoComplete.d.ts +3 -0
- package/esm/AutoComplete/AutoComplete.js +3 -0
- package/esm/Avatar/Avatar.d.ts +4 -0
- package/esm/Avatar/Avatar.js +4 -0
- package/esm/AvatarGroup/AvatarGroup.d.ts +4 -0
- package/esm/AvatarGroup/AvatarGroup.js +5 -0
- package/esm/Badge/Badge.d.ts +4 -0
- package/esm/Badge/Badge.js +4 -0
- package/esm/Breadcrumb/Breadcrumb.d.ts +4 -0
- package/esm/Breadcrumb/Breadcrumb.js +4 -0
- package/esm/Breadcrumb/BreadcrumbItem.d.ts +4 -0
- package/esm/Breadcrumb/BreadcrumbItem.js +4 -0
- package/esm/Button/Button.d.ts +4 -0
- package/esm/Button/Button.js +4 -0
- package/esm/ButtonGroup/ButtonGroup.d.ts +4 -0
- package/esm/ButtonGroup/ButtonGroup.js +4 -0
- package/esm/ButtonToolbar/ButtonToolbar.d.ts +4 -0
- package/esm/ButtonToolbar/ButtonToolbar.js +4 -0
- package/esm/Calendar/Calendar.d.ts +4 -0
- package/esm/Calendar/Calendar.js +4 -0
- package/esm/Carousel/Carousel.d.ts +4 -0
- package/esm/Carousel/Carousel.js +4 -0
- package/esm/Cascader/Cascader.d.ts +4 -0
- package/esm/Cascader/Cascader.js +5 -0
- package/esm/CheckPicker/CheckPicker.d.ts +4 -0
- package/esm/CheckPicker/CheckPicker.js +4 -0
- package/esm/CheckTree/index.d.ts +4 -0
- package/esm/CheckTree/index.js +4 -0
- package/esm/CheckTreePicker/CheckTreePicker.d.ts +5 -0
- package/esm/CheckTreePicker/CheckTreePicker.js +6 -0
- package/esm/Checkbox/Checkbox.d.ts +6 -0
- package/esm/Checkbox/Checkbox.js +4 -0
- package/esm/CheckboxGroup/CheckboxGroup.d.ts +4 -0
- package/esm/CheckboxGroup/CheckboxGroup.js +4 -0
- package/esm/CloseButton/CloseButton.js +3 -5
- package/esm/Col/Col.d.ts +4 -0
- package/esm/Col/Col.js +4 -0
- package/esm/Container/Container.d.ts +4 -0
- package/esm/Container/Container.js +4 -0
- package/esm/Content/Content.d.ts +3 -0
- package/esm/Content/Content.js +3 -0
- package/esm/CustomProvider/CustomProvider.d.ts +8 -3
- package/esm/CustomProvider/CustomProvider.js +6 -0
- package/esm/DOMHelper/index.d.ts +4 -0
- package/esm/DOMHelper/index.js +5 -0
- package/esm/DateInput/DateField.d.ts +180 -0
- package/esm/DateInput/DateField.js +144 -0
- package/esm/DateInput/DateInput.d.ts +18 -0
- package/esm/DateInput/DateInput.js +215 -0
- package/esm/DateInput/index.d.ts +3 -0
- package/esm/DateInput/index.js +3 -0
- package/esm/DateInput/useDateInputState.d.ts +165 -0
- package/esm/DateInput/useDateInputState.js +99 -0
- package/esm/DateInput/utils.d.ts +41 -0
- package/esm/DateInput/utils.js +151 -0
- package/esm/DatePicker/DatePicker.d.ts +5 -0
- package/esm/DatePicker/DatePicker.js +5 -0
- package/esm/DateRangePicker/DateRangePicker.d.ts +5 -0
- package/esm/DateRangePicker/DateRangePicker.js +5 -0
- package/esm/Divider/Divider.d.ts +4 -0
- package/esm/Divider/Divider.js +4 -0
- package/esm/Drawer/Drawer.d.ts +4 -0
- package/esm/Drawer/Drawer.js +4 -0
- package/esm/Dropdown/Dropdown.d.ts +6 -3
- package/esm/Dropdown/Dropdown.js +6 -3
- package/esm/Dropdown/DropdownItem.d.ts +3 -3
- package/esm/Dropdown/DropdownItem.js +3 -3
- package/esm/Dropdown/DropdownMenu.d.ts +3 -3
- package/esm/Dropdown/DropdownMenu.js +3 -3
- package/esm/Dropdown/DropdownSeparator.d.ts +1 -1
- package/esm/Dropdown/DropdownSeparator.js +1 -1
- package/esm/FlexboxGrid/FlexboxGrid.d.ts +4 -0
- package/esm/FlexboxGrid/FlexboxGrid.js +4 -0
- package/esm/FlexboxGrid/FlexboxGridItem.d.ts +4 -0
- package/esm/FlexboxGrid/FlexboxGridItem.js +4 -0
- package/esm/Footer/Footer.d.ts +4 -0
- package/esm/Footer/Footer.js +4 -0
- package/esm/Form/Form.d.ts +4 -0
- package/esm/Form/Form.js +4 -0
- package/esm/FormControl/FormControl.d.ts +4 -0
- package/esm/FormControl/FormControl.js +4 -0
- package/esm/FormControlLabel/FormControlLabel.d.ts +4 -0
- package/esm/FormControlLabel/FormControlLabel.js +4 -0
- package/esm/FormErrorMessage/FormErrorMessage.d.ts +4 -0
- package/esm/FormErrorMessage/FormErrorMessage.js +4 -0
- package/esm/FormGroup/FormGroup.d.ts +4 -0
- package/esm/FormGroup/FormGroup.js +5 -0
- package/esm/FormHelpText/FormHelpText.d.ts +4 -0
- package/esm/FormHelpText/FormHelpText.js +4 -0
- package/esm/Grid/Grid.d.ts +4 -0
- package/esm/Grid/Grid.js +4 -0
- package/esm/Header/Header.d.ts +4 -0
- package/esm/Header/Header.js +4 -0
- package/esm/IconButton/IconButton.d.ts +4 -0
- package/esm/IconButton/IconButton.js +4 -0
- package/esm/Input/Input.d.ts +4 -0
- package/esm/Input/Input.js +4 -0
- package/esm/InputGroup/InputGroup.d.ts +4 -0
- package/esm/InputGroup/InputGroup.js +4 -0
- package/esm/InputGroup/InputGroupAddon.d.ts +4 -0
- package/esm/InputGroup/InputGroupAddon.js +4 -0
- package/esm/InputGroup/InputGroupButton.d.ts +4 -0
- package/esm/InputGroup/InputGroupButton.js +5 -0
- package/esm/InputNumber/InputNumber.d.ts +4 -0
- package/esm/InputNumber/InputNumber.js +5 -0
- package/esm/InputPicker/InputPicker.d.ts +8 -22
- package/esm/InputPicker/InputPicker.js +11 -5
- package/esm/InputPicker/InputPickerContext.d.ts +26 -0
- package/esm/InputPicker/InputPickerContext.js +7 -0
- package/esm/List/List.d.ts +4 -0
- package/esm/List/List.js +4 -0
- package/esm/List/ListItem.d.ts +4 -0
- package/esm/List/ListItem.js +4 -0
- package/esm/Loader/Loader.d.ts +4 -0
- package/esm/Loader/Loader.js +4 -0
- package/esm/MaskedInput/TextMask.d.ts +4 -0
- package/esm/MaskedInput/TextMask.js +5 -0
- package/esm/MaskedInput/createTextMaskInputElement.js +6 -16
- package/esm/Message/Message.d.ts +4 -0
- package/esm/Message/Message.js +4 -0
- package/esm/Modal/Modal.d.ts +4 -0
- package/esm/Modal/Modal.js +4 -0
- package/esm/MultiCascader/MultiCascader.d.ts +4 -0
- package/esm/MultiCascader/MultiCascader.js +5 -0
- package/esm/Nav/Nav.d.ts +4 -0
- package/esm/Nav/Nav.js +4 -0
- package/esm/Nav/NavDropdown.d.ts +2 -1
- package/esm/Nav/NavDropdown.js +2 -1
- package/esm/Nav/NavItem.d.ts +6 -3
- package/esm/Nav/NavItem.js +6 -3
- package/esm/Nav/NavMenu.d.ts +6 -3
- package/esm/Nav/NavMenu.js +6 -3
- package/esm/Navbar/Navbar.d.ts +4 -0
- package/esm/Navbar/Navbar.js +4 -0
- package/esm/Notification/Notification.d.ts +5 -0
- package/esm/Notification/Notification.js +5 -0
- package/esm/Overlay/Overlay.d.ts +4 -0
- package/esm/Overlay/Overlay.js +5 -0
- package/esm/Overlay/OverlayTrigger.d.ts +4 -0
- package/esm/Overlay/OverlayTrigger.js +16 -11
- package/esm/Overlay/Position.d.ts +4 -0
- package/esm/Overlay/Position.js +4 -0
- package/esm/Pagination/Pagination.d.ts +5 -0
- package/esm/Pagination/Pagination.js +5 -0
- package/esm/Panel/Panel.d.ts +4 -0
- package/esm/Panel/Panel.js +4 -0
- package/esm/PanelGroup/PanelGroup.d.ts +4 -0
- package/esm/PanelGroup/PanelGroup.js +5 -0
- package/esm/Picker/DropdownMenu.d.ts +1 -0
- package/esm/Picker/DropdownMenu.js +7 -3
- package/esm/Picker/DropdownMenuCheckItem.d.ts +2 -0
- package/esm/Picker/DropdownMenuCheckItem.js +18 -14
- package/esm/Picker/PickerToggle.js +4 -2
- package/esm/Placeholder/Placeholder.d.ts +4 -0
- package/esm/Placeholder/Placeholder.js +4 -0
- package/esm/Placeholder/PlaceholderGraph.d.ts +4 -0
- package/esm/Placeholder/PlaceholderGraph.js +4 -0
- package/esm/Placeholder/PlaceholderGrid.d.ts +4 -0
- package/esm/Placeholder/PlaceholderGrid.js +4 -0
- package/esm/Placeholder/PlaceholderParagraph.d.ts +4 -0
- package/esm/Placeholder/PlaceholderParagraph.js +4 -0
- package/esm/Plaintext/Plaintext.d.ts +2 -1
- package/esm/Plaintext/Plaintext.js +5 -2
- package/esm/Popover/Popover.d.ts +4 -0
- package/esm/Popover/Popover.js +4 -0
- package/esm/Progress/Progress.d.ts +4 -0
- package/esm/Progress/Progress.js +4 -0
- package/esm/Progress/ProgressCircle.d.ts +4 -0
- package/esm/Progress/ProgressCircle.js +4 -0
- package/esm/Progress/ProgressLine.d.ts +4 -0
- package/esm/Progress/ProgressLine.js +4 -0
- package/esm/Radio/Radio.d.ts +4 -0
- package/esm/Radio/Radio.js +4 -0
- package/esm/RadioGroup/RadioGroup.d.ts +4 -0
- package/esm/RadioGroup/RadioGroup.js +5 -0
- package/esm/RadioTile/RadioTile.d.ts +5 -0
- package/esm/RadioTile/RadioTile.js +5 -0
- package/esm/RadioTileGroup/RadioTileGroup.d.ts +5 -0
- package/esm/RadioTileGroup/RadioTileGroup.js +6 -0
- package/esm/RangeSlider/RangeSlider.d.ts +4 -0
- package/esm/RangeSlider/RangeSlider.js +5 -0
- package/esm/Rate/Rate.d.ts +4 -0
- package/esm/Rate/Rate.js +4 -0
- package/esm/Ripple/Ripple.d.ts +4 -0
- package/esm/Ripple/Ripple.js +5 -0
- package/esm/Row/Row.d.ts +4 -0
- package/esm/Row/Row.js +4 -0
- package/esm/SafeAnchor/SafeAnchor.d.ts +4 -0
- package/esm/SafeAnchor/SafeAnchor.js +5 -0
- package/esm/Schema/Schema.d.ts +6 -0
- package/esm/Schema/Schema.js +7 -0
- package/esm/SelectPicker/SelectPicker.d.ts +4 -0
- package/esm/SelectPicker/SelectPicker.js +4 -0
- package/esm/Sidebar/Sidebar.d.ts +4 -0
- package/esm/Sidebar/Sidebar.js +4 -0
- package/esm/Sidenav/Sidenav.d.ts +4 -0
- package/esm/Sidenav/Sidenav.js +5 -0
- package/esm/Sidenav/SidenavBody.d.ts +5 -0
- package/esm/Sidenav/SidenavBody.js +5 -0
- package/esm/Sidenav/SidenavHeader.d.ts +5 -0
- package/esm/Sidenav/SidenavHeader.js +5 -0
- package/esm/Slider/Slider.d.ts +5 -0
- package/esm/Slider/Slider.js +6 -0
- package/esm/Stack/Stack.d.ts +6 -0
- package/esm/Stack/Stack.js +6 -0
- package/esm/Stack/StackItem.d.ts +5 -0
- package/esm/Stack/StackItem.js +5 -0
- package/esm/Steps/StepItem.d.ts +5 -0
- package/esm/Steps/StepItem.js +5 -0
- package/esm/Steps/Steps.d.ts +5 -0
- package/esm/Steps/Steps.js +5 -0
- package/esm/Table/Table.d.ts +19 -2
- package/esm/Table/Table.js +23 -4
- package/esm/Tag/Tag.d.ts +6 -0
- package/esm/Tag/Tag.js +14 -2
- package/esm/TagGroup/TagGroup.d.ts +5 -0
- package/esm/TagGroup/TagGroup.js +5 -0
- package/esm/TagInput/index.d.ts +8 -15
- package/esm/TagInput/index.js +7 -1
- package/esm/TagPicker/index.d.ts +13 -10
- package/esm/TagPicker/index.js +12 -4
- package/esm/Timeline/Timeline.d.ts +5 -0
- package/esm/Timeline/Timeline.js +5 -0
- package/esm/Timeline/TimelineItem.d.ts +5 -0
- package/esm/Timeline/TimelineItem.js +5 -0
- package/esm/Toggle/Toggle.d.ts +5 -0
- package/esm/Toggle/Toggle.js +5 -0
- package/esm/Tooltip/Tooltip.d.ts +5 -0
- package/esm/Tooltip/Tooltip.js +5 -0
- package/esm/Tree/Tree.d.ts +5 -0
- package/esm/Tree/Tree.js +5 -0
- package/esm/TreePicker/TreePicker.d.ts +5 -0
- package/esm/TreePicker/TreePicker.js +6 -0
- package/esm/Uploader/UploadFileItem.js +19 -5
- package/esm/Uploader/Uploader.d.ts +5 -0
- package/esm/Uploader/Uploader.js +6 -0
- package/esm/Whisper/Whisper.d.ts +6 -0
- package/esm/Whisper/Whisper.js +6 -0
- package/esm/Windowing/AutoSizer.d.ts +5 -0
- package/esm/Windowing/AutoSizer.js +5 -0
- package/esm/Windowing/List.d.ts +6 -1
- package/esm/Windowing/List.js +5 -0
- package/esm/index.d.ts +3 -0
- package/esm/index.js +3 -1
- package/esm/locales/ar_EG.d.ts +3 -0
- package/esm/locales/ar_EG.js +5 -2
- package/esm/locales/da_DK.d.ts +3 -0
- package/esm/locales/da_DK.js +5 -2
- package/esm/locales/de_DE.d.ts +3 -0
- package/esm/locales/de_DE.js +5 -2
- package/esm/locales/default.d.ts +3 -0
- package/esm/locales/default.js +5 -2
- package/esm/locales/en_US.d.ts +3 -0
- package/esm/locales/en_US.js +5 -2
- package/esm/locales/es_AR.d.ts +3 -0
- package/esm/locales/es_AR.js +5 -2
- package/esm/locales/es_ES.d.ts +3 -0
- package/esm/locales/es_ES.js +5 -2
- package/esm/locales/fa_IR.d.ts +3 -0
- package/esm/locales/fa_IR.js +5 -2
- package/esm/locales/fi_FI.d.ts +3 -0
- package/esm/locales/fi_FI.js +5 -2
- package/esm/locales/fr_FR.d.ts +3 -0
- package/esm/locales/fr_FR.js +5 -2
- package/esm/locales/hu_HU.d.ts +3 -0
- package/esm/locales/hu_HU.js +5 -2
- package/esm/locales/index.d.ts +1 -1
- package/esm/locales/it_IT.d.ts +3 -0
- package/esm/locales/it_IT.js +5 -2
- package/esm/locales/ja_JP.d.ts +3 -0
- package/esm/locales/ja_JP.js +5 -2
- package/esm/locales/kk_KZ.d.ts +3 -0
- package/esm/locales/kk_KZ.js +5 -2
- package/esm/locales/ko_KR.d.ts +3 -0
- package/esm/locales/ko_KR.js +5 -2
- package/esm/locales/ne_NP.d.ts +3 -0
- package/esm/locales/ne_NP.js +5 -2
- package/esm/locales/nl_NL.d.ts +3 -0
- package/esm/locales/nl_NL.js +5 -2
- package/esm/locales/pt_BR.d.ts +3 -0
- package/esm/locales/pt_BR.js +5 -2
- package/esm/locales/ru_RU.d.ts +3 -0
- package/esm/locales/ru_RU.js +6 -3
- package/esm/locales/sv_SE.d.ts +3 -0
- package/esm/locales/sv_SE.js +5 -2
- package/esm/locales/tr_TR.d.ts +3 -0
- package/esm/locales/tr_TR.js +5 -2
- package/esm/locales/zh_CN.d.ts +3 -0
- package/esm/locales/zh_CN.js +5 -2
- package/esm/locales/zh_TW.d.ts +3 -0
- package/esm/locales/zh_TW.js +5 -2
- package/esm/toaster/toaster.d.ts +9 -7
- package/esm/toaster/useToaster.d.ts +19 -1
- package/esm/toaster/useToaster.js +19 -1
- package/esm/useMediaQuery/index.d.ts +2 -0
- package/esm/useMediaQuery/index.js +3 -0
- package/esm/useMediaQuery/useMediaQuery.d.ts +23 -0
- package/esm/useMediaQuery/useMediaQuery.js +113 -0
- package/esm/utils/BrowserDetection.d.ts +1 -0
- package/esm/utils/BrowserDetection.js +3 -0
- package/esm/utils/dateUtils.d.ts +6 -0
- package/esm/utils/dateUtils.js +6 -0
- package/esm/utils/index.d.ts +1 -0
- package/esm/utils/index.js +1 -0
- package/esm/utils/safeSetSelection.d.ts +2 -0
- package/esm/utils/safeSetSelection.js +16 -0
- package/esm/utils/treeUtils.d.ts +2 -2
- package/package.json +1 -1
- package/styles/color-modes/dark.less +3 -1
- package/styles/color-modes/high-contrast.less +3 -1
- package/styles/color-modes/light.less +3 -1
- package/useMediaQuery/package.json +7 -0
|
@@ -5,11 +5,9 @@ import isNumber from 'lodash/isNumber';
|
|
|
5
5
|
import adjustCaretPosition from './adjustCaretPosition';
|
|
6
6
|
import conformToMask from './conformToMask';
|
|
7
7
|
import { convertMaskToPlaceholder, processCaretTraps, defaultPlaceholderChar } from './utilities';
|
|
8
|
+
import safeSetSelection from '../utils/safeSetSelection';
|
|
8
9
|
var emptyString = '';
|
|
9
|
-
var strNone = 'none';
|
|
10
10
|
var strObject = 'object';
|
|
11
|
-
var isAndroid = typeof navigator !== 'undefined' && /Android/i.test(navigator.userAgent);
|
|
12
|
-
var defer = typeof requestAnimationFrame !== 'undefined' ? requestAnimationFrame : setTimeout;
|
|
13
11
|
export default function createTextMaskInputElement(config) {
|
|
14
12
|
// Anything that we will need to keep between `update` calls, we will store in this `state` object.
|
|
15
13
|
var state = {
|
|
@@ -141,7 +139,7 @@ export default function createTextMaskInputElement(config) {
|
|
|
141
139
|
// indicate rejection. Or return just a string when there are no piped characters.
|
|
142
140
|
// If the `pipe` returns `false` or a string, the block below turns it into an object that the rest
|
|
143
141
|
// of the code can work with.
|
|
144
|
-
if (pipeResults === false) {
|
|
142
|
+
if (typeof pipeResults === 'boolean' && pipeResults === false) {
|
|
145
143
|
// If the `pipe` rejects `conformedValue`, we use the `previousConformedValue`, and set `rejected` to `true`.
|
|
146
144
|
pipeResults = {
|
|
147
145
|
value: previousConformedValue,
|
|
@@ -186,22 +184,14 @@ export default function createTextMaskInputElement(config) {
|
|
|
186
184
|
return;
|
|
187
185
|
}
|
|
188
186
|
inputElement.value = inputElementValue; // set the input value
|
|
189
|
-
|
|
187
|
+
|
|
188
|
+
if (typeof adjustedCaretPosition === 'number') {
|
|
189
|
+
safeSetSelection(inputElement, adjustedCaretPosition, adjustedCaretPosition); // adjust caret position
|
|
190
|
+
}
|
|
190
191
|
}
|
|
191
192
|
};
|
|
192
193
|
}
|
|
193
194
|
|
|
194
|
-
function safeSetSelection(element, selectionPosition) {
|
|
195
|
-
if (document.activeElement === element) {
|
|
196
|
-
if (isAndroid) {
|
|
197
|
-
defer(function () {
|
|
198
|
-
return element.setSelectionRange(selectionPosition, selectionPosition, strNone);
|
|
199
|
-
}, 0);
|
|
200
|
-
} else {
|
|
201
|
-
element.setSelectionRange(selectionPosition, selectionPosition, strNone);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
195
|
function getSafeRawValue(inputValue) {
|
|
206
196
|
if (isString(inputValue)) {
|
|
207
197
|
return inputValue;
|
package/esm/Message/Message.d.ts
CHANGED
|
@@ -24,5 +24,9 @@ export interface MessageProps extends WithAsProps {
|
|
|
24
24
|
/** Callback after the message is removed */
|
|
25
25
|
onClose?: (event?: React.MouseEvent<HTMLButtonElement>) => void;
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* The `Message` component is used to display important messages to users.
|
|
29
|
+
* @see https://rsuitejs.com/components/message
|
|
30
|
+
*/
|
|
27
31
|
declare const Message: RsRefForwardingComponent<'div', MessageProps>;
|
|
28
32
|
export default Message;
|
package/esm/Message/Message.js
CHANGED
|
@@ -8,6 +8,10 @@ import PropTypes from 'prop-types';
|
|
|
8
8
|
import { useClassNames, useTimeout, MESSAGE_STATUS_ICONS, STATUS, useIsMounted } from '../utils';
|
|
9
9
|
import CloseButton from '../CloseButton';
|
|
10
10
|
import ToastContext from '../toaster/ToastContext';
|
|
11
|
+
/**
|
|
12
|
+
* The `Message` component is used to display important messages to users.
|
|
13
|
+
* @see https://rsuitejs.com/components/message
|
|
14
|
+
*/
|
|
11
15
|
var Message = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
12
16
|
var _withClassPrefix;
|
|
13
17
|
var _props$as = props.as,
|
package/esm/Modal/Modal.d.ts
CHANGED
|
@@ -35,5 +35,9 @@ interface ModalComponent extends RsRefForwardingComponent<'div', ModalProps> {
|
|
|
35
35
|
Footer: typeof ModalFooter;
|
|
36
36
|
Dialog: typeof ModalDialog;
|
|
37
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* The `Modal` component is used to show content in a layer above the app.
|
|
40
|
+
* @see https://rsuitejs.com/components/modal
|
|
41
|
+
*/
|
|
38
42
|
declare const Modal: ModalComponent;
|
|
39
43
|
export default Modal;
|
package/esm/Modal/Modal.js
CHANGED
|
@@ -22,6 +22,10 @@ import useUniqueId from '../utils/useUniqueId';
|
|
|
22
22
|
import deprecatePropType from '../utils/deprecatePropType';
|
|
23
23
|
import DrawerContext from '../Drawer/DrawerContext';
|
|
24
24
|
var modalSizes = ['xs', 'sm', 'md', 'lg', 'full'];
|
|
25
|
+
/**
|
|
26
|
+
* The `Modal` component is used to show content in a layer above the app.
|
|
27
|
+
* @see https://rsuitejs.com/components/modal
|
|
28
|
+
*/
|
|
25
29
|
var Modal = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
26
30
|
var _prefix;
|
|
27
31
|
var className = props.className,
|
|
@@ -34,5 +34,9 @@ export interface MultiCascaderProps<T = ValueType> extends FormControlPickerProp
|
|
|
34
34
|
/** Asynchronously load the children of the tree node. */
|
|
35
35
|
getChildren?: (node: ItemDataType) => ItemDataType[] | Promise<ItemDataType[]>;
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* The `MultiCascader` component is used to select multiple values from cascading options.
|
|
39
|
+
* @see https://rsuitejs.com/components/multi-cascader/
|
|
40
|
+
*/
|
|
37
41
|
declare const MultiCascader: PickerComponent<MultiCascaderProps>;
|
|
38
42
|
export default MultiCascader;
|
|
@@ -15,6 +15,11 @@ import { getColumnsAndPaths } from '../Cascader/utils';
|
|
|
15
15
|
import { createChainedFunction, mergeRefs, getSafeRegExpString, useClassNames, useCustom, useUpdateEffect } from '../utils';
|
|
16
16
|
import { PickerToggle, PickerOverlay, SearchBar, SelectedElement, PickerToggleTrigger, usePickerClassName, usePublicMethods, useToggleKeyDownEvent, useFocusItemValue, pickTriggerPropKeys, omitTriggerPropKeys, listPickerPropTypes } from '../Picker';
|
|
17
17
|
var emptyArray = [];
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The `MultiCascader` component is used to select multiple values from cascading options.
|
|
21
|
+
* @see https://rsuitejs.com/components/multi-cascader/
|
|
22
|
+
*/
|
|
18
23
|
var MultiCascader = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
19
24
|
var _selectedPaths;
|
|
20
25
|
var _props$as = props.as,
|
package/esm/Nav/Nav.d.ts
CHANGED
|
@@ -27,5 +27,9 @@ interface NavComponent extends RsRefForwardingComponent<'div', NavProps> {
|
|
|
27
27
|
Item: typeof NavItem;
|
|
28
28
|
Menu: typeof NavMenu;
|
|
29
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* The `Nav` component is used to create navigation links.
|
|
32
|
+
* @see https://rsuitejs.com/components/nav
|
|
33
|
+
*/
|
|
30
34
|
declare const Nav: NavComponent;
|
|
31
35
|
export default Nav;
|
package/esm/Nav/Nav.js
CHANGED
|
@@ -20,6 +20,10 @@ import SidenavDropdownItem from '../Sidenav/SidenavDropdownItem';
|
|
|
20
20
|
import NavbarItem from '../Navbar/NavbarItem';
|
|
21
21
|
import SidenavItem from '../Sidenav/SidenavItem';
|
|
22
22
|
import useInternalId from '../utils/useInternalId';
|
|
23
|
+
/**
|
|
24
|
+
* The `Nav` component is used to create navigation links.
|
|
25
|
+
* @see https://rsuitejs.com/components/nav
|
|
26
|
+
*/
|
|
23
27
|
var Nav = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
24
28
|
var _props$as = props.as,
|
|
25
29
|
Component = _props$as === void 0 ? 'div' : _props$as,
|
package/esm/Nav/NavDropdown.d.ts
CHANGED
|
@@ -60,8 +60,9 @@ export interface NavDropdownComponent extends RsRefForwardingComponent<'div', Na
|
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
62
|
* @private this component is not supposed to be used directly
|
|
63
|
-
* Instead it's rendered by a
|
|
63
|
+
* Instead it's rendered by a `<Nav.Menu>` call
|
|
64
64
|
*
|
|
65
|
+
* @example
|
|
65
66
|
* <Nav>
|
|
66
67
|
* <Nav.Menu> -> This will render <NavDropdown> component
|
|
67
68
|
* </Nav.Menu>
|
package/esm/Nav/NavDropdown.js
CHANGED
|
@@ -16,8 +16,9 @@ import NavDropdownMenu from './NavDropdownMenu';
|
|
|
16
16
|
import NavDropdownToggle from './NavDropdownToggle';
|
|
17
17
|
/**
|
|
18
18
|
* @private this component is not supposed to be used directly
|
|
19
|
-
* Instead it's rendered by a
|
|
19
|
+
* Instead it's rendered by a `<Nav.Menu>` call
|
|
20
20
|
*
|
|
21
|
+
* @example
|
|
21
22
|
* <Nav>
|
|
22
23
|
* <Nav.Menu> -> This will render <NavDropdown> component
|
|
23
24
|
* </Nav.Menu>
|
package/esm/Nav/NavItem.d.ts
CHANGED
|
@@ -20,9 +20,12 @@ export interface NavItemProps<T = string> extends WithAsProps, Omit<React.HTMLAt
|
|
|
20
20
|
onSelect?: (eventKey: T | undefined, event: React.SyntheticEvent) => void;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* The
|
|
24
|
-
*
|
|
25
|
-
* When used
|
|
23
|
+
* The `Nav.Item` component is used to create navigation links.
|
|
24
|
+
*
|
|
25
|
+
* - When used as direct child of `<Nav>`, render the NavItem
|
|
26
|
+
* - When used within a `<Nav.Menu>`, render the NavDropdownItem
|
|
27
|
+
* @see https://rsuitejs.com/components/nav
|
|
28
|
+
*
|
|
26
29
|
*/
|
|
27
30
|
declare const NavItem: RsRefForwardingComponent<'a', NavItemProps>;
|
|
28
31
|
export default NavItem;
|
package/esm/Nav/NavItem.js
CHANGED
|
@@ -9,9 +9,12 @@ import SafeAnchor from '../SafeAnchor';
|
|
|
9
9
|
import { shallowEqual, useClassNames } from '../utils';
|
|
10
10
|
import NavContext from './NavContext';
|
|
11
11
|
/**
|
|
12
|
-
* The
|
|
13
|
-
*
|
|
14
|
-
* When used
|
|
12
|
+
* The `Nav.Item` component is used to create navigation links.
|
|
13
|
+
*
|
|
14
|
+
* - When used as direct child of `<Nav>`, render the NavItem
|
|
15
|
+
* - When used within a `<Nav.Menu>`, render the NavDropdownItem
|
|
16
|
+
* @see https://rsuitejs.com/components/nav
|
|
17
|
+
*
|
|
15
18
|
*/
|
|
16
19
|
var NavItem = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
17
20
|
var nav = useContext(NavContext);
|
package/esm/Nav/NavMenu.d.ts
CHANGED
|
@@ -30,9 +30,12 @@ export declare type NavMenuAction = {
|
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
32
|
/**
|
|
33
|
-
* The
|
|
34
|
-
*
|
|
35
|
-
* When used
|
|
33
|
+
* The `Nav.Menu` component is used to create navigation menus.
|
|
34
|
+
*
|
|
35
|
+
* - When used as direct child of `<Nav>`, render the NavDropdown
|
|
36
|
+
* - When used within another `<Nav.Menu>`, render the NavDropdownMenu
|
|
37
|
+
*
|
|
38
|
+
* @see https://rsuitejs.com/components/nav
|
|
36
39
|
*/
|
|
37
40
|
declare const NavMenu: React.ForwardRefExoticComponent<NavMenuProps & React.RefAttributes<any>>;
|
|
38
41
|
export default NavMenu;
|
package/esm/Nav/NavMenu.js
CHANGED
|
@@ -39,9 +39,12 @@ var reducer = function reducer(state, action) {
|
|
|
39
39
|
};
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
|
-
* The
|
|
43
|
-
*
|
|
44
|
-
* When used
|
|
42
|
+
* The `Nav.Menu` component is used to create navigation menus.
|
|
43
|
+
*
|
|
44
|
+
* - When used as direct child of `<Nav>`, render the NavDropdown
|
|
45
|
+
* - When used within another `<Nav.Menu>`, render the NavDropdownMenu
|
|
46
|
+
*
|
|
47
|
+
* @see https://rsuitejs.com/components/nav
|
|
45
48
|
*/
|
|
46
49
|
var NavMenu = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
47
50
|
var parentNavMenu = useContext(NavMenuContext);
|
package/esm/Navbar/Navbar.d.ts
CHANGED
|
@@ -20,5 +20,9 @@ interface NavbarComponent extends RsRefForwardingComponent<'div', NavbarProps> {
|
|
|
20
20
|
Body: typeof NavbarBody;
|
|
21
21
|
Brand: typeof NavbarBrand;
|
|
22
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* The `Navbar` component is used to create a navigation header.
|
|
25
|
+
* @see https://rsuitejs.com/components/navbar
|
|
26
|
+
*/
|
|
23
27
|
declare const Navbar: NavbarComponent;
|
|
24
28
|
export default Navbar;
|
package/esm/Navbar/Navbar.js
CHANGED
|
@@ -7,6 +7,10 @@ import NavbarHeader from './NavbarHeader';
|
|
|
7
7
|
import NavbarBrand from './NavbarBrand';
|
|
8
8
|
import { useClassNames } from '../utils';
|
|
9
9
|
export var NavbarContext = /*#__PURE__*/React.createContext(false);
|
|
10
|
+
/**
|
|
11
|
+
* The `Navbar` component is used to create a navigation header.
|
|
12
|
+
* @see https://rsuitejs.com/components/navbar
|
|
13
|
+
*/
|
|
10
14
|
var Navbar = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
11
15
|
var className = props.className,
|
|
12
16
|
_props$as = props.as,
|
|
@@ -22,5 +22,10 @@ export interface NotificationProps extends WithAsProps {
|
|
|
22
22
|
/** Callback after the message is removed */
|
|
23
23
|
onClose?: (event?: React.MouseEvent<HTMLButtonElement>) => void;
|
|
24
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* The `Notification` component is used to display global messages and notifications.
|
|
27
|
+
*
|
|
28
|
+
* @see https://rsuitejs.com/components/notification
|
|
29
|
+
*/
|
|
25
30
|
declare const Notification: RsRefForwardingComponent<'div', NotificationProps>;
|
|
26
31
|
export default Notification;
|
|
@@ -8,6 +8,11 @@ import PropTypes from 'prop-types';
|
|
|
8
8
|
import { useClassNames, useTimeout, MESSAGE_STATUS_ICONS, useIsMounted } from '../utils';
|
|
9
9
|
import CloseButton from '../CloseButton';
|
|
10
10
|
import ToastContext from '../toaster/ToastContext';
|
|
11
|
+
/**
|
|
12
|
+
* The `Notification` component is used to display global messages and notifications.
|
|
13
|
+
*
|
|
14
|
+
* @see https://rsuitejs.com/components/notification
|
|
15
|
+
*/
|
|
11
16
|
var Notification = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
12
17
|
var _props$as = props.as,
|
|
13
18
|
Component = _props$as === void 0 ? 'div' : _props$as,
|
package/esm/Overlay/Overlay.d.ts
CHANGED
|
@@ -38,5 +38,9 @@ export declare const overlayPropTypes: {
|
|
|
38
38
|
onExiting: PropTypes.Requireable<(...args: any[]) => any>;
|
|
39
39
|
onExited: PropTypes.Requireable<(...args: any[]) => any>;
|
|
40
40
|
};
|
|
41
|
+
/**
|
|
42
|
+
* Overlay is a powerful component that helps you create floating components.
|
|
43
|
+
* @private
|
|
44
|
+
*/
|
|
41
45
|
declare const Overlay: React.ForwardRefExoticComponent<OverlayProps & React.RefAttributes<unknown>>;
|
|
42
46
|
export default Overlay;
|
package/esm/Overlay/Overlay.js
CHANGED
|
@@ -27,6 +27,11 @@ export var overlayPropTypes = {
|
|
|
27
27
|
onExiting: PropTypes.func,
|
|
28
28
|
onExited: PropTypes.func
|
|
29
29
|
};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Overlay is a powerful component that helps you create floating components.
|
|
33
|
+
* @private
|
|
34
|
+
*/
|
|
30
35
|
var Overlay = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
31
36
|
var _useContext = useContext(OverlayContext),
|
|
32
37
|
overlayContainer = _useContext.overlayContainer;
|
|
@@ -78,5 +78,9 @@ export interface OverlayTriggerHandle {
|
|
|
78
78
|
open: (delay?: number) => void;
|
|
79
79
|
close: (delay?: number) => void;
|
|
80
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* OverlayTrigger is used to display floating elements on another component.
|
|
83
|
+
* @private
|
|
84
|
+
*/
|
|
81
85
|
declare const OverlayTrigger: React.ForwardRefExoticComponent<OverlayTriggerProps & React.RefAttributes<OverlayTriggerHandle>>;
|
|
82
86
|
export default OverlayTrigger;
|
|
@@ -52,6 +52,11 @@ function onMouseEventHandler(handler, event, delay) {
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
var defaultTrigger = ['hover', 'focus'];
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* OverlayTrigger is used to display floating elements on another component.
|
|
58
|
+
* @private
|
|
59
|
+
*/
|
|
55
60
|
var OverlayTrigger = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
56
61
|
var _useContext = useContext(OverlayContext),
|
|
57
62
|
overlayContainer = _useContext.overlayContainer;
|
|
@@ -182,17 +187,6 @@ var OverlayTrigger = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
182
187
|
handleClose();
|
|
183
188
|
}
|
|
184
189
|
}, [handleClose]);
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* Toggle open and closed state.
|
|
188
|
-
*/
|
|
189
|
-
var handleOpenState = useCallback(function () {
|
|
190
|
-
if (open) {
|
|
191
|
-
handleCloseWhenLeave();
|
|
192
|
-
} else {
|
|
193
|
-
handleOpen();
|
|
194
|
-
}
|
|
195
|
-
}, [open, handleCloseWhenLeave, handleOpen]);
|
|
196
190
|
var handleDelayedOpen = useCallback(function () {
|
|
197
191
|
mouseEnter.current = true;
|
|
198
192
|
if (!enterable) {
|
|
@@ -209,6 +203,17 @@ var OverlayTrigger = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
209
203
|
}
|
|
210
204
|
handleOpen();
|
|
211
205
|
}, [enterable, open, handleOpen]);
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Toggle open and closed state.
|
|
209
|
+
*/
|
|
210
|
+
var handleOpenState = useCallback(function () {
|
|
211
|
+
if (open) {
|
|
212
|
+
handleCloseWhenLeave();
|
|
213
|
+
} else {
|
|
214
|
+
handleDelayedOpen();
|
|
215
|
+
}
|
|
216
|
+
}, [open, handleCloseWhenLeave, handleDelayedOpen]);
|
|
212
217
|
var handleDelayedClose = useCallback(function () {
|
|
213
218
|
mouseEnter.current = false;
|
|
214
219
|
if (!enterable) {
|
|
@@ -22,5 +22,9 @@ export interface PositionInstance {
|
|
|
22
22
|
updatePosition?: () => void;
|
|
23
23
|
child?: Element;
|
|
24
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* The `Position` component calculates the position of the child element.
|
|
27
|
+
* @private
|
|
28
|
+
*/
|
|
25
29
|
declare const Position: React.ForwardRefExoticComponent<PositionProps & React.RefAttributes<unknown>>;
|
|
26
30
|
export default Position;
|
package/esm/Overlay/Position.js
CHANGED
|
@@ -121,6 +121,10 @@ var usePosition = function usePosition(props, ref) {
|
|
|
121
121
|
}, [updatePosition, placement]);
|
|
122
122
|
return [position, updatePosition];
|
|
123
123
|
};
|
|
124
|
+
/**
|
|
125
|
+
* The `Position` component calculates the position of the child element.
|
|
126
|
+
* @private
|
|
127
|
+
*/
|
|
124
128
|
var Position = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
125
129
|
var children = props.children,
|
|
126
130
|
className = props.className,
|
|
@@ -33,5 +33,10 @@ export interface PaginationProps extends WithAsProps {
|
|
|
33
33
|
/** callback function for pagination clicked */
|
|
34
34
|
onSelect?: (eventKey: string | number, event: React.MouseEvent) => void;
|
|
35
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Pagination component for displaying page numbers.
|
|
38
|
+
*
|
|
39
|
+
* @see https://rsuitejs.com/components/pagination
|
|
40
|
+
*/
|
|
36
41
|
declare const Pagination: RsRefForwardingComponent<'div', PaginationProps>;
|
|
37
42
|
export default Pagination;
|
|
@@ -19,6 +19,11 @@ var PAGINATION_ICONS = {
|
|
|
19
19
|
first: /*#__PURE__*/React.createElement(PageTop, null),
|
|
20
20
|
last: /*#__PURE__*/React.createElement(PageEnd, null)
|
|
21
21
|
};
|
|
22
|
+
/**
|
|
23
|
+
* Pagination component for displaying page numbers.
|
|
24
|
+
*
|
|
25
|
+
* @see https://rsuitejs.com/components/pagination
|
|
26
|
+
*/
|
|
22
27
|
var Pagination = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
23
28
|
var _props$as = props.as,
|
|
24
29
|
Component = _props$as === void 0 ? 'div' : _props$as,
|
package/esm/Panel/Panel.d.ts
CHANGED
|
@@ -26,5 +26,9 @@ export interface PanelProps<T = string | number> extends WithAsProps, AnimationE
|
|
|
26
26
|
/** callback function for the panel clicked */
|
|
27
27
|
onSelect?: (eventKey: T | undefined, event: React.SyntheticEvent) => void;
|
|
28
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* The `Panel` component is used to display content that can be collapsed.
|
|
31
|
+
* @see https://rsuitejs.com/components/panel
|
|
32
|
+
*/
|
|
29
33
|
declare const Panel: RsRefForwardingComponent<'div', PanelProps>;
|
|
30
34
|
export default Panel;
|
package/esm/Panel/Panel.js
CHANGED
|
@@ -8,6 +8,10 @@ import AngleDownIcon from '@rsuite/icons/legacy/AngleDown';
|
|
|
8
8
|
import Collapse from '../Animation/Collapse';
|
|
9
9
|
import { useClassNames, useControlled } from '../utils';
|
|
10
10
|
import { PanelGroupContext } from '../PanelGroup';
|
|
11
|
+
/**
|
|
12
|
+
* The `Panel` component is used to display content that can be collapsed.
|
|
13
|
+
* @see https://rsuitejs.com/components/panel
|
|
14
|
+
*/
|
|
11
15
|
var Panel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
12
16
|
var _props$as = props.as,
|
|
13
17
|
Component = _props$as === void 0 ? 'div' : _props$as,
|
|
@@ -21,5 +21,9 @@ interface PanelGroupContext {
|
|
|
21
21
|
onGroupSelect?: (activeKey: KeyType | undefined, event: React.MouseEvent) => void;
|
|
22
22
|
}
|
|
23
23
|
export declare const PanelGroupContext: React.Context<PanelGroupContext>;
|
|
24
|
+
/**
|
|
25
|
+
* The `PanelGroup` component is used to display content that can be collapsed.
|
|
26
|
+
* @see https://rsuitejs.com/components/panel
|
|
27
|
+
*/
|
|
24
28
|
declare const PanelGroup: React.ForwardRefExoticComponent<PanelGroupProps<KeyType> & React.RefAttributes<unknown>>;
|
|
25
29
|
export default PanelGroup;
|
|
@@ -5,6 +5,11 @@ import React, { useCallback, useMemo } from 'react';
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { useClassNames, useControlled } from '../utils';
|
|
7
7
|
export var PanelGroupContext = /*#__PURE__*/React.createContext({});
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The `PanelGroup` component is used to display content that can be collapsed.
|
|
11
|
+
* @see https://rsuitejs.com/components/panel
|
|
12
|
+
*/
|
|
8
13
|
var PanelGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
9
14
|
var _props$as = props.as,
|
|
10
15
|
Component = _props$as === void 0 ? 'div' : _props$as,
|
|
@@ -17,6 +17,7 @@ export interface DropdownMenuProps<Multiple = false> extends StandardProps, Omit
|
|
|
17
17
|
style?: React.CSSProperties;
|
|
18
18
|
dropdownMenuItemAs: React.ElementType | string;
|
|
19
19
|
dropdownMenuItemClassPrefix?: string;
|
|
20
|
+
dropdownMenuItemProps?: any;
|
|
20
21
|
rowHeight?: number;
|
|
21
22
|
rowGroupHeight?: number;
|
|
22
23
|
virtualized?: boolean;
|
|
@@ -9,6 +9,7 @@ import isUndefined from 'lodash/isUndefined';
|
|
|
9
9
|
import isString from 'lodash/isString';
|
|
10
10
|
import isNumber from 'lodash/isNumber';
|
|
11
11
|
import findIndex from 'lodash/findIndex';
|
|
12
|
+
import pickBy from 'lodash/pickBy';
|
|
12
13
|
import getPosition from 'dom-lib/getPosition';
|
|
13
14
|
import scrollTop from 'dom-lib/scrollTop';
|
|
14
15
|
import getHeight from 'dom-lib/getHeight';
|
|
@@ -43,6 +44,7 @@ var DropdownMenu = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
43
44
|
focusItemValue = props.focusItemValue,
|
|
44
45
|
dropdownMenuItemClassPrefix = props.dropdownMenuItemClassPrefix,
|
|
45
46
|
DropdownMenuItem = props.dropdownMenuItemAs,
|
|
47
|
+
dropdownMenuItemProps = props.dropdownMenuItemProps,
|
|
46
48
|
_props$rowHeight = props.rowHeight,
|
|
47
49
|
rowHeight = _props$rowHeight === void 0 ? 36 : _props$rowHeight,
|
|
48
50
|
_props$rowGroupHeight = props.rowGroupHeight,
|
|
@@ -51,7 +53,7 @@ var DropdownMenu = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
51
53
|
renderMenuItem = props.renderMenuItem,
|
|
52
54
|
onGroupTitleClick = props.onGroupTitleClick,
|
|
53
55
|
onSelect = props.onSelect,
|
|
54
|
-
rest = _objectWithoutPropertiesLoose(props, ["data", "group", "groupBy", "maxHeight", "activeItemValues", "disabledItemValues", "classPrefix", "valueKey", "labelKey", "virtualized", "listProps", "listRef", "className", "style", "focusItemValue", "dropdownMenuItemClassPrefix", "dropdownMenuItemAs", "rowHeight", "rowGroupHeight", "renderMenuGroup", "renderMenuItem", "onGroupTitleClick", "onSelect"]);
|
|
56
|
+
rest = _objectWithoutPropertiesLoose(props, ["data", "group", "groupBy", "maxHeight", "activeItemValues", "disabledItemValues", "classPrefix", "valueKey", "labelKey", "virtualized", "listProps", "listRef", "className", "style", "focusItemValue", "dropdownMenuItemClassPrefix", "dropdownMenuItemAs", "dropdownMenuItemProps", "rowHeight", "rowGroupHeight", "renderMenuGroup", "renderMenuItem", "onGroupTitleClick", "onSelect"]);
|
|
55
57
|
var _useClassNames = useClassNames(classPrefix),
|
|
56
58
|
withClassPrefix = _useClassNames.withClassPrefix,
|
|
57
59
|
prefix = _useClassNames.prefix,
|
|
@@ -149,7 +151,7 @@ var DropdownMenu = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
149
151
|
return shallowEqual(v, value);
|
|
150
152
|
});
|
|
151
153
|
var focus = !isUndefined(focusItemValue) && shallowEqual(focusItemValue, value);
|
|
152
|
-
return /*#__PURE__*/React.createElement(DropdownMenuItem, {
|
|
154
|
+
return /*#__PURE__*/React.createElement(DropdownMenuItem, _extends({
|
|
153
155
|
style: style,
|
|
154
156
|
key: itemKey,
|
|
155
157
|
disabled: disabled,
|
|
@@ -158,7 +160,9 @@ var DropdownMenu = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
158
160
|
value: value,
|
|
159
161
|
classPrefix: dropdownMenuItemClassPrefix,
|
|
160
162
|
onSelect: handleSelect.bind(null, item)
|
|
161
|
-
},
|
|
163
|
+
}, pickBy(dropdownMenuItemProps, function (v) {
|
|
164
|
+
return v !== undefined;
|
|
165
|
+
})), renderMenuItem ? renderMenuItem(label, item) : label);
|
|
162
166
|
};
|
|
163
167
|
var filteredItems = group ? data.filter(function (item) {
|
|
164
168
|
var _item$parent;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { CheckboxProps } from '../Checkbox';
|
|
2
3
|
import { WithAsProps, RsRefForwardingComponent } from '../@types/common';
|
|
3
4
|
export interface DropdownMenuCheckItemProps extends WithAsProps {
|
|
4
5
|
active?: boolean;
|
|
@@ -16,6 +17,7 @@ export interface DropdownMenuCheckItemProps extends WithAsProps {
|
|
|
16
17
|
onCheck?: (value: any, event: React.SyntheticEvent, checked: boolean) => void;
|
|
17
18
|
onSelectItem?: (value: any, event: React.SyntheticEvent, checked: boolean) => void;
|
|
18
19
|
onKeyDown?: (event: React.KeyboardEvent) => void;
|
|
20
|
+
renderMenuItemCheckbox?: (checkboxProps: CheckboxProps) => React.ReactNode;
|
|
19
21
|
}
|
|
20
22
|
declare const DropdownMenuCheckItem: RsRefForwardingComponent<'div', DropdownMenuCheckItemProps>;
|
|
21
23
|
export default DropdownMenuCheckItem;
|
|
@@ -26,7 +26,8 @@ var DropdownMenuCheckItem = /*#__PURE__*/React.forwardRef(function (props, ref)
|
|
|
26
26
|
onSelect = props.onSelect,
|
|
27
27
|
onCheck = props.onCheck,
|
|
28
28
|
onSelectItem = props.onSelectItem,
|
|
29
|
-
|
|
29
|
+
renderMenuItemCheckbox = props.renderMenuItemCheckbox,
|
|
30
|
+
rest = _objectWithoutPropertiesLoose(props, ["active", "as", "checkboxAs", "classPrefix", "checkable", "disabled", "value", "focus", "children", "className", "indeterminate", "onKeyDown", "onSelect", "onCheck", "onSelectItem", "renderMenuItemCheckbox"]);
|
|
30
31
|
var handleChange = useCallback(function (value, checked, event) {
|
|
31
32
|
onSelect === null || onSelect === void 0 ? void 0 : onSelect(value, event, checked);
|
|
32
33
|
}, [onSelect]);
|
|
@@ -45,6 +46,19 @@ var DropdownMenuCheckItem = /*#__PURE__*/React.forwardRef(function (props, ref)
|
|
|
45
46
|
var checkboxItemClasses = withClassPrefix({
|
|
46
47
|
focus: focus
|
|
47
48
|
});
|
|
49
|
+
var checkboxProps = {
|
|
50
|
+
value: value,
|
|
51
|
+
disabled: disabled,
|
|
52
|
+
indeterminate: indeterminate,
|
|
53
|
+
checkable: checkable,
|
|
54
|
+
children: children,
|
|
55
|
+
checked: active,
|
|
56
|
+
className: checkboxItemClasses,
|
|
57
|
+
onKeyDown: disabled ? undefined : onKeyDown,
|
|
58
|
+
onChange: handleChange,
|
|
59
|
+
onClick: handleSelectItem,
|
|
60
|
+
onCheckboxClick: handleCheck
|
|
61
|
+
};
|
|
48
62
|
return /*#__PURE__*/React.createElement(Component, _extends({
|
|
49
63
|
role: "option",
|
|
50
64
|
"aria-selected": active,
|
|
@@ -54,19 +68,9 @@ var DropdownMenuCheckItem = /*#__PURE__*/React.forwardRef(function (props, ref)
|
|
|
54
68
|
ref: ref,
|
|
55
69
|
className: className,
|
|
56
70
|
tabIndex: -1
|
|
57
|
-
}), /*#__PURE__*/React.createElement(CheckboxItem, {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
disabled: disabled,
|
|
61
|
-
checked: active,
|
|
62
|
-
checkable: checkable,
|
|
63
|
-
indeterminate: indeterminate,
|
|
64
|
-
className: checkboxItemClasses,
|
|
65
|
-
onKeyDown: disabled ? null : onKeyDown,
|
|
66
|
-
onChange: handleChange,
|
|
67
|
-
onClick: handleSelectItem,
|
|
68
|
-
onCheckboxClick: handleCheck
|
|
69
|
-
}, children));
|
|
71
|
+
}), renderMenuItemCheckbox ? renderMenuItemCheckbox(checkboxProps) : /*#__PURE__*/React.createElement(CheckboxItem, _extends({
|
|
72
|
+
role: "checkbox"
|
|
73
|
+
}, checkboxProps)));
|
|
70
74
|
});
|
|
71
75
|
DropdownMenuCheckItem.displayName = 'DropdownMenuCheckItem';
|
|
72
76
|
DropdownMenuCheckItem.propTypes = {
|
|
@@ -8,7 +8,7 @@ import PropTypes from 'prop-types';
|
|
|
8
8
|
import debounce from 'lodash/debounce';
|
|
9
9
|
import ToggleButton from './ToggleButton';
|
|
10
10
|
import CloseButton from '../CloseButton';
|
|
11
|
-
import { useClassNames, KEY_VALUES, mergeRefs } from '../utils';
|
|
11
|
+
import { useClassNames, useCustom, KEY_VALUES, mergeRefs } from '../utils';
|
|
12
12
|
import Plaintext from '../Plaintext';
|
|
13
13
|
import useToggleCaret from '../utils/useToggleCaret';
|
|
14
14
|
import TextMask from '../MaskedInput/TextMask';
|
|
@@ -58,6 +58,8 @@ var PickerToggle = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
58
58
|
label = props.label,
|
|
59
59
|
name = props.name,
|
|
60
60
|
rest = _objectWithoutPropertiesLoose(props, ["active", "as", "classPrefix", "children", "caret", "className", "disabled", "readOnly", "plaintext", "hasValue", "editable", "loading", "cleanable", "tabIndex", "id", "value", "inputPlaceholder", "inputValue", "inputMask", "onInputChange", "onInputPressEnter", "onInputBackspace", "onInputBlur", "onInputFocus", "onClean", "onFocus", "onBlur", "placement", "caretComponent", "caretAs", "label", "name"]);
|
|
61
|
+
var _useCustom = useCustom(),
|
|
62
|
+
locale = _useCustom.locale;
|
|
61
63
|
var inputRef = useRef(null);
|
|
62
64
|
var comboboxRef = useRef(null);
|
|
63
65
|
var _useState = useState(false),
|
|
@@ -218,7 +220,7 @@ var PickerToggle = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
218
220
|
className: prefix(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["clean"]))),
|
|
219
221
|
tabIndex: -1,
|
|
220
222
|
locale: {
|
|
221
|
-
closeLabel:
|
|
223
|
+
closeLabel: locale === null || locale === void 0 ? void 0 : locale.clear
|
|
222
224
|
},
|
|
223
225
|
onClick: handleClean
|
|
224
226
|
}), caret && !showCleanButton && /*#__PURE__*/React.createElement(Caret, {
|
|
@@ -7,5 +7,9 @@ export interface Placeholder extends RsRefForwardingComponent<'div', Placeholder
|
|
|
7
7
|
Grid: typeof PlaceholderGrid;
|
|
8
8
|
Graph: typeof PlaceholderGraph;
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* The `Placeholder` component is used to display the loading state of the block.
|
|
12
|
+
* @see https://rsuitejs.com/components/placeholder
|
|
13
|
+
*/
|
|
10
14
|
declare const Placeholder: Placeholder;
|
|
11
15
|
export default Placeholder;
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
import PlaceholderGraph from './PlaceholderGraph';
|
|
3
3
|
import PlaceholderGrid from './PlaceholderGrid';
|
|
4
4
|
import PlaceholderParagraph from './PlaceholderParagraph';
|
|
5
|
+
/**
|
|
6
|
+
* The `Placeholder` component is used to display the loading state of the block.
|
|
7
|
+
* @see https://rsuitejs.com/components/placeholder
|
|
8
|
+
*/
|
|
5
9
|
var Placeholder = PlaceholderParagraph;
|
|
6
10
|
Placeholder.Paragraph = PlaceholderParagraph;
|
|
7
11
|
Placeholder.Grid = PlaceholderGrid;
|