rsuite 5.16.1 → 5.17.0-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Animation/styles/animation.less +0 -0
- package/Animation/styles/index.less +0 -0
- package/Animation/styles/mixin.less +0 -0
- package/AutoComplete/styles/index.less +0 -0
- package/Avatar/styles/mixin.less +0 -0
- package/Badge/styles/index.less +0 -0
- package/Breadcrumb/styles/index.less +0 -0
- package/Button/styles/mixin.less +0 -0
- package/CHANGELOG.md +21 -0
- package/Calendar/styles/index.less +0 -0
- package/Cascader/styles/index.less +0 -0
- package/CheckPicker/styles/index.less +0 -0
- package/Checkbox/styles/index.less +0 -0
- package/Checkbox/styles/mixin.less +0 -0
- package/CheckboxGroup/styles/index.less +0 -0
- package/CloseButton/styles/index.less +0 -0
- package/Container/styles/index.less +0 -0
- package/Content/styles/index.less +0 -0
- package/DatePicker/styles/index.less +0 -0
- package/DateRangePicker/styles/index.less +0 -0
- package/Divider/styles/index.less +0 -0
- package/Drawer/styles/mixin.less +0 -0
- package/FlexboxGrid/styles/index.less +0 -0
- package/Footer/styles/index.less +0 -0
- package/Form/styles/index.less +0 -0
- package/FormControl/styles/index.less +0 -0
- package/FormControlLabel/styles/index.less +0 -0
- package/FormErrorMessage/styles/animation.less +0 -0
- package/FormErrorMessage/styles/index.less +0 -0
- package/FormGroup/styles/index.less +0 -0
- package/FormHelpText/styles/index.less +0 -0
- package/Grid/styles/grid-framework.less +0 -0
- package/Grid/styles/mixin.less +0 -0
- package/Header/styles/index.less +0 -0
- package/Input/styles/index.less +0 -0
- package/InputNumber/styles/index.less +0 -0
- package/InputNumber/styles/mixin.less +0 -0
- package/InputPicker/styles/index.less +0 -0
- package/LICENSE +0 -0
- package/List/styles/index.less +0 -0
- package/Loader/styles/index.less +0 -0
- package/Loader/styles/mixin.less +0 -0
- package/Message/styles/index.less +0 -0
- package/Message/styles/mixin.less +0 -0
- package/Modal/styles/animation.less +0 -0
- package/Notification/styles/index.less +0 -0
- package/Notification/styles/mixin.less +0 -0
- package/Pagination/styles/index.less +0 -0
- package/Pagination/styles/mixin.less +0 -0
- package/Pagination/styles/pagination-group.less +0 -0
- package/Panel/styles/index.less +0 -0
- package/Picker/styles/index.less +2 -0
- package/Placeholder/styles/index.less +0 -0
- package/Popover/styles/index.less +0 -0
- package/Popover/styles/mixins.less +0 -0
- package/Progress/styles/animation.less +0 -0
- package/Progress/styles/index.less +0 -0
- package/Radio/styles/mixin.less +0 -0
- package/RadioGroup/styles/index.less +0 -0
- package/Rate/styles/index.less +0 -0
- package/Ripple/styles/index.less +0 -0
- package/Ripple/styles/mixins.less +0 -0
- package/Row/styles/index.less +0 -0
- package/SelectPicker/styles/index.less +0 -0
- package/Sidebar/styles/index.less +0 -0
- package/Sidenav/styles/mixin.less +0 -0
- package/Slider/styles/index.less +2 -1
- package/Steps/styles/index.less +0 -0
- package/Table/styles/mixin.less +0 -0
- package/Tag/styles/index.less +0 -0
- package/TagInput/styles/index.less +0 -0
- package/TagPicker/styles/index.less +0 -0
- package/Timeline/styles/index.less +0 -0
- package/Timeline/styles/mixin.less +0 -0
- package/Tooltip/styles/mixins.less +0 -0
- package/TreePicker/styles/index.less +0 -3
- package/TreePicker/styles/mixin.less +0 -0
- package/Uploader/styles/mixin.less +0 -0
- package/cjs/@types/global.d.ts +0 -0
- package/cjs/Affix/index.js +0 -0
- package/cjs/Animation/Bounce.js +0 -0
- package/cjs/Animation/Fade.js +0 -0
- package/cjs/Animation/Slide.js +0 -0
- package/cjs/Animation/index.js +0 -0
- package/cjs/Animation/utils.js +0 -0
- package/cjs/AutoComplete/index.js +0 -0
- package/cjs/Avatar/index.js +0 -0
- package/cjs/Badge/index.js +0 -0
- package/cjs/Breadcrumb/index.js +0 -0
- package/cjs/Button/index.js +0 -0
- package/cjs/ButtonToolbar/ButtonToolbar.js +0 -0
- package/cjs/ButtonToolbar/index.js +0 -0
- package/cjs/Calendar/index.js +0 -0
- package/cjs/Carousel/index.js +0 -0
- package/cjs/Cascader/index.js +0 -0
- package/cjs/Cascader/utils.js +3 -5
- package/cjs/CheckPicker/CheckPicker.d.ts +1 -1
- package/cjs/CheckPicker/index.js +0 -0
- package/cjs/CheckPicker/test/CheckPicker.test.js +8 -0
- package/cjs/CheckTreePicker/CheckTreePicker.d.ts +2 -2
- package/cjs/CheckTreePicker/CheckTreePicker.js +5 -0
- package/cjs/CheckTreePicker/index.js +0 -0
- package/cjs/CheckTreePicker/test/CheckTreePicker.test.d.ts +1 -0
- package/cjs/CheckTreePicker/test/CheckTreePicker.test.js +15 -0
- package/cjs/CheckTreePicker/utils.js +3 -1
- package/cjs/Checkbox/index.js +0 -0
- package/cjs/CloseButton/CloseButton.js +0 -0
- package/cjs/CloseButton/index.js +0 -0
- package/cjs/Col/index.js +0 -0
- package/cjs/Container/index.js +0 -0
- package/cjs/Content/Content.js +0 -0
- package/cjs/Content/index.js +0 -0
- package/cjs/CustomProvider/CustomProvider.js +6 -3
- package/cjs/CustomProvider/FormattedDate.js +0 -0
- package/cjs/CustomProvider/index.js +0 -0
- package/cjs/DatePicker/DatePicker.d.ts +1 -1
- package/cjs/DatePicker/Toolbar.js +1 -1
- package/cjs/DatePicker/index.js +0 -0
- package/cjs/DateRangePicker/Calendar.d.ts +0 -1
- package/cjs/DateRangePicker/Calendar.js +1 -39
- package/cjs/DateRangePicker/DateRangePicker.d.ts +1 -1
- package/cjs/DateRangePicker/DateRangePicker.js +22 -22
- package/cjs/DateRangePicker/disabledDateUtils.js +0 -0
- package/cjs/DateRangePicker/utils.d.ts +2 -1
- package/cjs/DateRangePicker/utils.js +12 -3
- package/cjs/Disclosure/index.js +0 -0
- package/cjs/Divider/index.js +0 -0
- package/cjs/Drawer/index.js +0 -0
- package/cjs/Dropdown/DropdownState.js +0 -0
- package/cjs/Dropdown/index.js +0 -0
- package/cjs/FlexboxGrid/index.js +0 -0
- package/cjs/Footer/Footer.js +0 -0
- package/cjs/Footer/index.js +0 -0
- package/cjs/FormControl/index.js +0 -0
- package/cjs/FormControlLabel/FormControlLabel.js +0 -0
- package/cjs/FormControlLabel/index.js +0 -0
- package/cjs/FormErrorMessage/FormErrorMessage.js +0 -0
- package/cjs/FormErrorMessage/index.js +0 -0
- package/cjs/FormGroup/index.js +0 -0
- package/cjs/FormHelpText/index.js +0 -0
- package/cjs/Grid/Grid.js +0 -0
- package/cjs/Grid/index.js +0 -0
- package/cjs/Header/Header.js +0 -0
- package/cjs/Header/index.js +0 -0
- package/cjs/IconButton/index.js +0 -0
- package/cjs/Input/index.js +0 -0
- package/cjs/InputGroup/InputGroupButton.js +0 -0
- package/cjs/InputGroup/index.js +0 -0
- package/cjs/InputNumber/index.js +0 -0
- package/cjs/InputPicker/InputPicker.d.ts +2 -2
- package/cjs/InputPicker/index.js +0 -0
- package/cjs/InputPicker/test/InputPicker.test.d.ts +1 -0
- package/cjs/InputPicker/test/InputPicker.test.js +15 -0
- package/cjs/List/index.js +0 -0
- package/cjs/Loader/index.js +0 -0
- package/cjs/Menu/MenuContext.js +0 -0
- package/cjs/Menu/index.js +0 -0
- package/cjs/Message/index.js +0 -0
- package/cjs/Modal/ModalFooter.js +0 -0
- package/cjs/Modal/index.js +0 -0
- package/cjs/MultiCascader/index.js +0 -0
- package/cjs/MultiCascader/utils.js +3 -2
- package/cjs/Nav/index.js +0 -0
- package/cjs/Navbar/NavbarBody.js +0 -0
- package/cjs/Navbar/NavbarBrand.js +0 -0
- package/cjs/Navbar/NavbarHeader.js +0 -0
- package/cjs/Notification/index.js +0 -0
- package/cjs/Overlay/OverlayTrigger.js +1 -1
- package/cjs/Overlay/index.js +0 -0
- package/cjs/Pagination/index.js +0 -0
- package/cjs/Panel/Panel.js +8 -7
- package/cjs/Panel/index.js +0 -0
- package/cjs/PanelGroup/index.js +0 -0
- package/cjs/Picker/DropdownMenu.d.ts +1 -1
- package/cjs/Picker/types.js +0 -0
- package/cjs/Placeholder/Placeholder.js +0 -0
- package/cjs/Placeholder/index.js +0 -0
- package/cjs/Plaintext/index.js +0 -0
- package/cjs/Popover/index.js +0 -0
- package/cjs/Progress/Progress.js +0 -0
- package/cjs/Progress/index.js +0 -0
- package/cjs/Radio/index.js +0 -0
- package/cjs/RadioGroup/index.js +0 -0
- package/cjs/RangeSlider/index.js +0 -0
- package/cjs/Rate/index.js +0 -0
- package/cjs/Ripple/index.js +0 -0
- package/cjs/Row/Row.js +0 -0
- package/cjs/Row/index.js +0 -0
- package/cjs/SafeAnchor/index.js +0 -0
- package/cjs/Schema/Schema.js +0 -0
- package/cjs/Schema/index.js +0 -0
- package/cjs/SelectPicker/SelectPicker.d.ts +9 -3
- package/cjs/SelectPicker/test/SelectPicker.test.js +33 -0
- package/cjs/Sidebar/index.js +0 -0
- package/cjs/Sidenav/SidenavBody.js +0 -0
- package/cjs/Sidenav/SidenavHeader.js +0 -0
- package/cjs/Sidenav/index.js +0 -0
- package/cjs/Slider/index.js +0 -0
- package/cjs/Steps/index.js +0 -0
- package/cjs/Table/index.js +0 -0
- package/cjs/Tag/Tag.js +0 -0
- package/cjs/Tag/index.js +0 -0
- package/cjs/TagGroup/TagGroup.js +0 -0
- package/cjs/TagGroup/index.js +0 -0
- package/cjs/Timeline/index.js +0 -0
- package/cjs/Toggle/index.js +0 -0
- package/cjs/Tooltip/index.js +0 -0
- package/cjs/Tree/Tree.d.ts +2 -2
- package/cjs/Tree/index.js +0 -0
- package/cjs/Tree/test/Tree.test.d.ts +1 -0
- package/cjs/Tree/test/Tree.test.js +18 -0
- package/cjs/TreePicker/TreePicker.d.ts +2 -2
- package/cjs/TreePicker/index.js +0 -0
- package/cjs/TreePicker/test/TreePicker.test.d.ts +1 -0
- package/cjs/TreePicker/test/TreePicker.test.js +15 -0
- package/cjs/Whisper/index.js +0 -0
- package/cjs/locales/ar_EG.js +0 -0
- package/cjs/locales/da_DK.js +0 -0
- package/cjs/locales/de_DE.js +0 -0
- package/cjs/locales/default.js +0 -0
- package/cjs/locales/en_GB.js +0 -0
- package/cjs/locales/en_US.js +0 -0
- package/cjs/locales/es_AR.js +0 -0
- package/cjs/locales/es_ES.js +0 -0
- package/cjs/locales/fi_FI.js +0 -0
- package/cjs/locales/it_IT.js +0 -0
- package/cjs/locales/ko_KR.js +0 -0
- package/cjs/locales/pt_BR.js +0 -0
- package/cjs/locales/ru_RU.js +0 -0
- package/cjs/locales/sv_SE.js +0 -0
- package/cjs/locales/zh_CN.js +0 -0
- package/cjs/locales/zh_TW.js +0 -0
- package/cjs/toaster/ToastContainer.d.ts +2 -1
- package/cjs/toaster/ToastContainer.js +27 -26
- package/cjs/toaster/toaster.d.ts +1 -1
- package/cjs/toaster/toaster.js +43 -13
- package/cjs/toaster/useToaster.d.ts +1 -1
- package/cjs/utils/attachParent.d.ts +1 -0
- package/cjs/utils/attachParent.js +15 -0
- package/cjs/utils/clone.js +0 -0
- package/cjs/utils/dateUtils.js +0 -0
- package/cjs/utils/events.js +0 -0
- package/cjs/utils/getDOMNode.js +0 -0
- package/cjs/utils/getSafeRegExpString.js +0 -0
- package/cjs/utils/guid.js +0 -0
- package/cjs/utils/htmlPropsUtils.js +0 -0
- package/cjs/utils/index.d.ts +1 -0
- package/cjs/utils/index.js +6 -1
- package/cjs/utils/isOneOf.js +0 -0
- package/cjs/utils/prefix.js +0 -0
- package/cjs/utils/render.d.ts +3 -0
- package/cjs/utils/render.js +49 -0
- package/cjs/utils/shallowEqual.js +0 -0
- package/cjs/utils/shallowEqualArray.js +0 -0
- package/cjs/utils/statusIcons.js +0 -0
- package/cjs/utils/stringToObject.js +0 -0
- package/cjs/utils/tplTransform.js +0 -0
- package/cjs/utils/treeUtils.js +3 -2
- package/cjs/utils/useClassNames.js +0 -0
- package/cjs/utils/useEnsuredRef.js +0 -0
- package/cjs/utils/useEventCallback.js +0 -0
- package/cjs/utils/usePortal.d.ts +4 -2
- package/cjs/utils/usePortal.js +40 -14
- package/cjs/utils/useToggleCaret.js +0 -0
- package/cjs/utils/useUniqueId.js +10 -2
- package/cjs/utils/useUpdateEffect.js +0 -0
- package/cjs/utils/useUpdatedRef.js +0 -0
- package/cjs/utils/useWillUnmount.js +0 -0
- package/dist/rsuite-rtl.css +8 -9
- package/dist/rsuite-rtl.min.css +1 -1
- package/dist/rsuite-rtl.min.css.map +1 -1
- package/dist/rsuite.css +8 -9
- package/dist/rsuite.js +249 -187
- 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.LICENSE.txt +2 -0
- package/dist/rsuite.min.js.map +1 -1
- package/esm/@types/global.d.ts +0 -0
- package/esm/Affix/index.js +0 -0
- package/esm/Animation/Bounce.js +0 -0
- package/esm/Animation/Fade.js +0 -0
- package/esm/Animation/Slide.js +0 -0
- package/esm/Animation/index.js +0 -0
- package/esm/Animation/utils.js +0 -0
- package/esm/AutoComplete/index.js +0 -0
- package/esm/Avatar/index.js +0 -0
- package/esm/Badge/index.js +0 -0
- package/esm/Breadcrumb/index.js +0 -0
- package/esm/Button/index.js +0 -0
- package/esm/ButtonToolbar/ButtonToolbar.js +0 -0
- package/esm/ButtonToolbar/index.js +0 -0
- package/esm/Calendar/index.js +0 -0
- package/esm/Carousel/index.js +0 -0
- package/esm/Cascader/index.js +0 -0
- package/esm/Cascader/utils.js +2 -4
- package/esm/CheckPicker/CheckPicker.d.ts +1 -1
- package/esm/CheckPicker/index.js +0 -0
- package/esm/CheckPicker/test/CheckPicker.test.js +8 -0
- package/esm/CheckTreePicker/CheckTreePicker.d.ts +2 -2
- package/esm/CheckTreePicker/CheckTreePicker.js +5 -0
- package/esm/CheckTreePicker/index.js +0 -0
- package/esm/CheckTreePicker/test/CheckTreePicker.test.d.ts +1 -0
- package/esm/CheckTreePicker/test/CheckTreePicker.test.js +10 -0
- package/esm/CheckTreePicker/utils.js +2 -1
- package/esm/Checkbox/index.js +0 -0
- package/esm/CloseButton/CloseButton.js +0 -0
- package/esm/CloseButton/index.js +0 -0
- package/esm/Col/index.js +0 -0
- package/esm/Container/index.js +0 -0
- package/esm/Content/Content.js +0 -0
- package/esm/Content/index.js +0 -0
- package/esm/CustomProvider/CustomProvider.js +6 -3
- package/esm/CustomProvider/FormattedDate.js +0 -0
- package/esm/CustomProvider/index.js +0 -0
- package/esm/DatePicker/DatePicker.d.ts +1 -1
- package/esm/DatePicker/Toolbar.js +1 -1
- package/esm/DatePicker/index.js +0 -0
- package/esm/DateRangePicker/Calendar.d.ts +0 -1
- package/esm/DateRangePicker/Calendar.js +2 -41
- package/esm/DateRangePicker/DateRangePicker.d.ts +1 -1
- package/esm/DateRangePicker/DateRangePicker.js +22 -22
- package/esm/DateRangePicker/disabledDateUtils.js +0 -0
- package/esm/DateRangePicker/utils.d.ts +2 -1
- package/esm/DateRangePicker/utils.js +12 -3
- package/esm/Disclosure/index.js +0 -0
- package/esm/Divider/index.js +0 -0
- package/esm/Drawer/index.js +0 -0
- package/esm/Dropdown/DropdownState.js +0 -0
- package/esm/Dropdown/index.js +0 -0
- package/esm/FlexboxGrid/index.js +0 -0
- package/esm/Footer/Footer.js +0 -0
- package/esm/Footer/index.js +0 -0
- package/esm/FormControl/index.js +0 -0
- package/esm/FormControlLabel/FormControlLabel.js +0 -0
- package/esm/FormControlLabel/index.js +0 -0
- package/esm/FormErrorMessage/FormErrorMessage.js +0 -0
- package/esm/FormErrorMessage/index.js +0 -0
- package/esm/FormGroup/index.js +0 -0
- package/esm/FormHelpText/index.js +0 -0
- package/esm/Grid/Grid.js +0 -0
- package/esm/Grid/index.js +0 -0
- package/esm/Header/Header.js +0 -0
- package/esm/Header/index.js +0 -0
- package/esm/IconButton/index.js +0 -0
- package/esm/Input/index.js +0 -0
- package/esm/InputGroup/InputGroupButton.js +0 -0
- package/esm/InputGroup/index.js +0 -0
- package/esm/InputNumber/index.js +0 -0
- package/esm/InputPicker/InputPicker.d.ts +2 -2
- package/esm/InputPicker/index.js +0 -0
- package/esm/InputPicker/test/InputPicker.test.d.ts +1 -0
- package/esm/InputPicker/test/InputPicker.test.js +10 -0
- package/esm/List/index.js +0 -0
- package/esm/Loader/index.js +0 -0
- package/esm/Menu/MenuContext.js +0 -0
- package/esm/Menu/index.js +0 -0
- package/esm/Message/index.js +0 -0
- package/esm/Modal/ModalFooter.js +0 -0
- package/esm/Modal/index.js +0 -0
- package/esm/MultiCascader/index.js +0 -0
- package/esm/MultiCascader/utils.js +2 -2
- package/esm/Nav/index.js +0 -0
- package/esm/Navbar/NavbarBody.js +0 -0
- package/esm/Navbar/NavbarBrand.js +0 -0
- package/esm/Navbar/NavbarHeader.js +0 -0
- package/esm/Notification/index.js +0 -0
- package/esm/Overlay/OverlayTrigger.js +1 -1
- package/esm/Overlay/index.js +0 -0
- package/esm/Pagination/index.js +0 -0
- package/esm/Panel/Panel.js +8 -7
- package/esm/Panel/index.js +0 -0
- package/esm/PanelGroup/index.js +0 -0
- package/esm/Picker/DropdownMenu.d.ts +1 -1
- package/esm/Picker/types.js +0 -0
- package/esm/Placeholder/Placeholder.js +0 -0
- package/esm/Placeholder/index.js +0 -0
- package/esm/Plaintext/index.js +0 -0
- package/esm/Popover/index.js +0 -0
- package/esm/Progress/Progress.js +0 -0
- package/esm/Progress/index.js +0 -0
- package/esm/Radio/index.js +0 -0
- package/esm/RadioGroup/index.js +0 -0
- package/esm/RangeSlider/index.js +0 -0
- package/esm/Rate/index.js +0 -0
- package/esm/Ripple/index.js +0 -0
- package/esm/Row/Row.js +0 -0
- package/esm/Row/index.js +0 -0
- package/esm/SafeAnchor/index.js +0 -0
- package/esm/Schema/Schema.js +0 -0
- package/esm/Schema/index.js +0 -0
- package/esm/SelectPicker/SelectPicker.d.ts +9 -3
- package/esm/SelectPicker/test/SelectPicker.test.js +32 -0
- package/esm/Sidebar/index.js +0 -0
- package/esm/Sidenav/SidenavBody.js +0 -0
- package/esm/Sidenav/SidenavHeader.js +0 -0
- package/esm/Sidenav/index.js +0 -0
- package/esm/Slider/index.js +0 -0
- package/esm/Steps/index.js +0 -0
- package/esm/Table/index.js +0 -0
- package/esm/Tag/Tag.js +0 -0
- package/esm/Tag/index.js +0 -0
- package/esm/TagGroup/TagGroup.js +0 -0
- package/esm/TagGroup/index.js +0 -0
- package/esm/Timeline/index.js +0 -0
- package/esm/Toggle/index.js +0 -0
- package/esm/Tooltip/index.js +0 -0
- package/esm/Tree/Tree.d.ts +2 -2
- package/esm/Tree/index.js +0 -0
- package/esm/Tree/test/Tree.test.d.ts +1 -0
- package/esm/Tree/test/Tree.test.js +11 -0
- package/esm/TreePicker/TreePicker.d.ts +2 -2
- package/esm/TreePicker/index.js +0 -0
- package/esm/TreePicker/test/TreePicker.test.d.ts +1 -0
- package/esm/TreePicker/test/TreePicker.test.js +10 -0
- package/esm/Whisper/index.js +0 -0
- package/esm/locales/ar_EG.js +0 -0
- package/esm/locales/da_DK.js +0 -0
- package/esm/locales/de_DE.js +0 -0
- package/esm/locales/default.js +0 -0
- package/esm/locales/en_GB.js +0 -0
- package/esm/locales/en_US.js +0 -0
- package/esm/locales/es_AR.js +0 -0
- package/esm/locales/es_ES.js +0 -0
- package/esm/locales/fi_FI.js +0 -0
- package/esm/locales/it_IT.js +0 -0
- package/esm/locales/ko_KR.js +0 -0
- package/esm/locales/pt_BR.js +0 -0
- package/esm/locales/ru_RU.js +0 -0
- package/esm/locales/sv_SE.js +0 -0
- package/esm/locales/zh_CN.js +0 -0
- package/esm/locales/zh_TW.js +0 -0
- package/esm/toaster/ToastContainer.d.ts +2 -1
- package/esm/toaster/ToastContainer.js +28 -26
- package/esm/toaster/toaster.d.ts +1 -1
- package/esm/toaster/toaster.js +41 -13
- package/esm/toaster/useToaster.d.ts +1 -1
- package/esm/utils/attachParent.d.ts +1 -0
- package/esm/utils/attachParent.js +10 -0
- package/esm/utils/clone.js +0 -0
- package/esm/utils/dateUtils.js +0 -0
- package/esm/utils/events.js +0 -0
- package/esm/utils/getDOMNode.js +0 -0
- package/esm/utils/getSafeRegExpString.js +0 -0
- package/esm/utils/guid.js +0 -0
- package/esm/utils/htmlPropsUtils.js +0 -0
- package/esm/utils/index.d.ts +1 -0
- package/esm/utils/index.js +1 -0
- package/esm/utils/isOneOf.js +0 -0
- package/esm/utils/prefix.js +0 -0
- package/esm/utils/render.d.ts +3 -0
- package/esm/utils/render.js +37 -0
- package/esm/utils/shallowEqual.js +0 -0
- package/esm/utils/shallowEqualArray.js +0 -0
- package/esm/utils/statusIcons.js +0 -0
- package/esm/utils/stringToObject.js +0 -0
- package/esm/utils/tplTransform.js +0 -0
- package/esm/utils/treeUtils.js +2 -2
- package/esm/utils/useClassNames.js +0 -0
- package/esm/utils/useEnsuredRef.js +0 -0
- package/esm/utils/useEventCallback.js +0 -0
- package/esm/utils/usePortal.d.ts +4 -2
- package/esm/utils/usePortal.js +36 -14
- package/esm/utils/useToggleCaret.js +0 -0
- package/esm/utils/useUniqueId.js +7 -2
- package/esm/utils/useUpdateEffect.js +0 -0
- package/esm/utils/useUpdatedRef.js +0 -0
- package/esm/utils/useWillUnmount.js +0 -0
- package/package.json +2 -2
- package/styles/color-modes.less +0 -0
- package/styles/colors/light.less +0 -0
- package/styles/common.less +0 -0
- package/styles/mixins/color-modes.less +0 -0
- package/styles/mixins/hacks.less +0 -0
- package/styles/mixins/listbox.less +0 -0
- package/styles/mixins/menu.less +0 -0
- package/styles/normalize.less +0 -0
- package/styles/scaffolding.less +0 -0
- package/styles/typography.less +0 -0
- package/toaster/styles/animation.less +0 -0
- package/toaster/styles/index.less +0 -0
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/Avatar/styles/mixin.less
CHANGED
|
File without changes
|
package/Badge/styles/index.less
CHANGED
|
File without changes
|
|
File without changes
|
package/Button/styles/mixin.less
CHANGED
|
File without changes
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
## [5.16.3](https://github.com/rsuite/rsuite/compare/v5.16.2...v5.16.3) (2022-07-29)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
- **DateRangePicker:** fix predefined `ranges` cannot close picker ([#2614](https://github.com/rsuite/rsuite/issues/2614)) ([7773899](https://github.com/rsuite/rsuite/commit/7773899d5cda5ce53d556be85abc76f23166fc28))
|
|
6
|
+
- **listProps:** fix properties in listProps to be optional ([#2622](https://github.com/rsuite/rsuite/issues/2622)) ([650abbd](https://github.com/rsuite/rsuite/commit/650abbdd7b1073fb1a5a3d3ca761127ac2dcdd08))
|
|
7
|
+
|
|
8
|
+
## [5.16.2](https://github.com/rsuite/rsuite/compare/v5.16.1...v5.16.2) (2022-07-28)
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
- **CustomProvider:** fix warnings caused by server-side rendering ([#2599](https://github.com/rsuite/rsuite/issues/2599)) ([ea05efb](https://github.com/rsuite/rsuite/commit/ea05efba3c53bf7e04ea4caa7b378a762b85af93))
|
|
13
|
+
- **DateRangePicker:** improved experience for date range selection ([#2618](https://github.com/rsuite/rsuite/issues/2618)) ([225fc08](https://github.com/rsuite/rsuite/commit/225fc08e21d43c41d92c1514f67c05eb660bf9dd))
|
|
14
|
+
- **focus:** fix outline style for form components when focused ([#2601](https://github.com/rsuite/rsuite/issues/2601)) ([0e2f9df](https://github.com/rsuite/rsuite/commit/0e2f9dffe5e882fc56727eb8ba8901aaf1b7d7b3))
|
|
15
|
+
- **OverlayTrigger:** fix invalid rendering without followCursor ([#2600](https://github.com/rsuite/rsuite/issues/2600)) ([08abc8e](https://github.com/rsuite/rsuite/commit/08abc8e825af55d8334a6e6057d4f5582a3197ac))
|
|
16
|
+
- **Panel:** allow custom header in collapsible panels ([#2611](https://github.com/rsuite/rsuite/issues/2611)) ([6372d44](https://github.com/rsuite/rsuite/commit/6372d441235b5b65036c257608098df01f93bf6d))
|
|
17
|
+
- **Picker:** add missing caretAs prop declaration ([#2592](https://github.com/rsuite/rsuite/issues/2592)) ([faabba4](https://github.com/rsuite/rsuite/commit/faabba4b32d82f819b5c5431c3d7040798db1765))
|
|
18
|
+
- **Picker:** fix style dependency ([#2612](https://github.com/rsuite/rsuite/issues/2612)) ([0b5b1d6](https://github.com/rsuite/rsuite/commit/0b5b1d60909a069c317f069e9ab235da70eb4aa3))
|
|
19
|
+
- **SelectPicker:** make controlled value nullable ([#2591](https://github.com/rsuite/rsuite/issues/2591)) ([6619a75](https://github.com/rsuite/rsuite/commit/6619a75eca9eabf9bf08dd84dee78f1df0e094ca))
|
|
20
|
+
- **treelike:** fix data item stringify throw error ([#2606](https://github.com/rsuite/rsuite/issues/2606)) ([3a586d2](https://github.com/rsuite/rsuite/commit/3a586d28e075b5bdd95d8df948ce4887570fab1d))
|
|
21
|
+
|
|
1
22
|
## [5.16.1](https://github.com/rsuite/rsuite/compare/v5.16.0...v5.16.1) (2022-07-15)
|
|
2
23
|
|
|
3
24
|
### Bug Fixes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/Drawer/styles/mixin.less
CHANGED
|
File without changes
|
|
File without changes
|
package/Footer/styles/index.less
CHANGED
|
File without changes
|
package/Form/styles/index.less
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/Grid/styles/mixin.less
CHANGED
|
File without changes
|
package/Header/styles/index.less
CHANGED
|
File without changes
|
package/Input/styles/index.less
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/LICENSE
CHANGED
|
File without changes
|
package/List/styles/index.less
CHANGED
|
File without changes
|
package/Loader/styles/index.less
CHANGED
|
File without changes
|
package/Loader/styles/mixin.less
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/Panel/styles/index.less
CHANGED
|
File without changes
|
package/Picker/styles/index.less
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/Radio/styles/mixin.less
CHANGED
|
File without changes
|
|
File without changes
|
package/Rate/styles/index.less
CHANGED
|
File without changes
|
package/Ripple/styles/index.less
CHANGED
|
File without changes
|
|
File without changes
|
package/Row/styles/index.less
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/Slider/styles/index.less
CHANGED
package/Steps/styles/index.less
CHANGED
|
File without changes
|
package/Table/styles/mixin.less
CHANGED
|
File without changes
|
package/Tag/styles/index.less
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/cjs/@types/global.d.ts
CHANGED
|
File without changes
|
package/cjs/Affix/index.js
CHANGED
|
File without changes
|
package/cjs/Animation/Bounce.js
CHANGED
|
File without changes
|
package/cjs/Animation/Fade.js
CHANGED
|
File without changes
|
package/cjs/Animation/Slide.js
CHANGED
|
File without changes
|
package/cjs/Animation/index.js
CHANGED
|
File without changes
|
package/cjs/Animation/utils.js
CHANGED
|
File without changes
|
|
File without changes
|
package/cjs/Avatar/index.js
CHANGED
|
File without changes
|
package/cjs/Badge/index.js
CHANGED
|
File without changes
|
package/cjs/Breadcrumb/index.js
CHANGED
|
File without changes
|
package/cjs/Button/index.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/cjs/Calendar/index.js
CHANGED
|
File without changes
|
package/cjs/Carousel/index.js
CHANGED
|
File without changes
|
package/cjs/Cascader/index.js
CHANGED
|
File without changes
|
package/cjs/Cascader/utils.js
CHANGED
|
@@ -6,8 +6,6 @@ exports.__esModule = true;
|
|
|
6
6
|
exports.getColumnsAndPaths = getColumnsAndPaths;
|
|
7
7
|
exports.usePaths = usePaths;
|
|
8
8
|
|
|
9
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
-
|
|
11
9
|
var _react = require("react");
|
|
12
10
|
|
|
13
11
|
var _slice = _interopRequireDefault(require("lodash/slice"));
|
|
@@ -16,6 +14,8 @@ var _utils = require("../utils");
|
|
|
16
14
|
|
|
17
15
|
var _treeUtils = require("../utils/treeUtils");
|
|
18
16
|
|
|
17
|
+
var _attachParent = require("../utils/attachParent");
|
|
18
|
+
|
|
19
19
|
function getColumnsAndPaths(data, value, options) {
|
|
20
20
|
var childrenKey = options.childrenKey,
|
|
21
21
|
valueKey = options.valueKey,
|
|
@@ -39,9 +39,7 @@ function getColumnsAndPaths(data, value, options) {
|
|
|
39
39
|
|
|
40
40
|
if (node) {
|
|
41
41
|
columns.push(children.map(function (item) {
|
|
42
|
-
return (0,
|
|
43
|
-
parent: items[i]
|
|
44
|
-
});
|
|
42
|
+
return (0, _attachParent.attachParent)(item, items[i]);
|
|
45
43
|
}));
|
|
46
44
|
paths.push(node.active);
|
|
47
45
|
return {
|
|
@@ -4,7 +4,7 @@ import { PickerInstance, PickerToggleProps } from '../Picker';
|
|
|
4
4
|
import { ItemDataType, FormControlPickerProps } from '../@types/common';
|
|
5
5
|
import type { MultipleSelectProps } from '../SelectPicker';
|
|
6
6
|
export declare type ValueType = (number | string)[];
|
|
7
|
-
export interface CheckPickerProps<T> extends FormControlPickerProps<T[], PickerLocale, ItemDataType<T>>, MultipleSelectProps<T>, Pick<PickerToggleProps, 'label'> {
|
|
7
|
+
export interface CheckPickerProps<T> extends FormControlPickerProps<T[], PickerLocale, ItemDataType<T>>, MultipleSelectProps<T>, Pick<PickerToggleProps, 'label' | 'caretAs'> {
|
|
8
8
|
/** Top the selected option in the options */
|
|
9
9
|
sticky?: boolean;
|
|
10
10
|
/** A picker that can be counted */
|
package/cjs/CheckPicker/index.js
CHANGED
|
File without changes
|
|
@@ -88,4 +88,12 @@ _react.default.createElement(_CheckPicker.default, {
|
|
|
88
88
|
_react.default.createElement(_CheckPicker.default, {
|
|
89
89
|
label: "User",
|
|
90
90
|
data: []
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
/*#__PURE__*/
|
|
94
|
+
_react.default.createElement(_CheckPicker.default, {
|
|
95
|
+
caretAs: function caretAs() {
|
|
96
|
+
return /*#__PURE__*/_react.default.createElement("div", null);
|
|
97
|
+
},
|
|
98
|
+
data: []
|
|
91
99
|
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PickerLocale } from '../locales';
|
|
3
|
-
import { PickerComponent } from '../Picker';
|
|
3
|
+
import { PickerComponent, PickerToggleProps } from '../Picker';
|
|
4
4
|
import { TreeBaseProps } from '../Tree/Tree';
|
|
5
5
|
import { FormControlPickerProps, ItemDataType } from '../@types/common';
|
|
6
6
|
export declare type ValueType = (string | number)[];
|
|
7
|
-
export interface CheckTreePickerProps<T = ValueType> extends TreeBaseProps<T, ItemDataType>, FormControlPickerProps<T, PickerLocale, ItemDataType> {
|
|
7
|
+
export interface CheckTreePickerProps<T = ValueType> extends TreeBaseProps<T, ItemDataType>, FormControlPickerProps<T, PickerLocale, ItemDataType>, Pick<PickerToggleProps, 'caretAs'> {
|
|
8
8
|
/** Tree node cascade */
|
|
9
9
|
cascade?: boolean;
|
|
10
10
|
/** A picker that can be counted */
|
|
@@ -592,6 +592,11 @@ var CheckTreePicker = /*#__PURE__*/_react.default.forwardRef(function (props, re
|
|
|
592
592
|
var children = node[childrenKey];
|
|
593
593
|
var visibleChildren = (0, _isUndefined2.default)(searchKeywordState) || searchKeywordState.length === 0 ? !!children : (0, _treeUtils.hasVisibleChildren)(node, childrenKey);
|
|
594
594
|
var nodeProps = (0, _extends2.default)({}, getTreeNodeProps((0, _extends2.default)({}, node, {
|
|
595
|
+
/**
|
|
596
|
+
* spread operator dont copy unenumerable properties
|
|
597
|
+
* so we need to copy them manually
|
|
598
|
+
*/
|
|
599
|
+
parent: node.parent,
|
|
595
600
|
expand: expand
|
|
596
601
|
}), layer), {
|
|
597
602
|
hasChildren: visibleChildren
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _react = _interopRequireDefault(require("react"));
|
|
6
|
+
|
|
7
|
+
var _CheckTreePicker = _interopRequireDefault(require("../CheckTreePicker"));
|
|
8
|
+
|
|
9
|
+
/*#__PURE__*/
|
|
10
|
+
_react.default.createElement(_CheckTreePicker.default, {
|
|
11
|
+
caretAs: function caretAs() {
|
|
12
|
+
return /*#__PURE__*/_react.default.createElement("div", null);
|
|
13
|
+
},
|
|
14
|
+
data: []
|
|
15
|
+
});
|
|
@@ -25,6 +25,8 @@ var _utils = require("../utils");
|
|
|
25
25
|
|
|
26
26
|
var _treeUtils = require("../utils/treeUtils");
|
|
27
27
|
|
|
28
|
+
var _attachParent = require("../utils/attachParent");
|
|
29
|
+
|
|
28
30
|
function isEveryChildChecked(nodes, parent) {
|
|
29
31
|
if ((0, _isNil2.default)(parent.refKey) || (0, _isNil2.default)(nodes[parent.refKey])) {
|
|
30
32
|
return false;
|
|
@@ -147,7 +149,7 @@ function getFormattedTree(data, nodes, props) {
|
|
|
147
149
|
formatted.check = curNode.check;
|
|
148
150
|
formatted.expand = curNode.expand;
|
|
149
151
|
formatted.uncheckable = curNode.uncheckable;
|
|
150
|
-
formatted
|
|
152
|
+
(0, _attachParent.attachParent)(formatted, curNode.parent);
|
|
151
153
|
formatted.checkState = checkState;
|
|
152
154
|
|
|
153
155
|
if (((_node$childrenKey = node[childrenKey]) === null || _node$childrenKey === void 0 ? void 0 : _node$childrenKey.length) > 0) {
|
package/cjs/Checkbox/index.js
CHANGED
|
File without changes
|
|
File without changes
|
package/cjs/CloseButton/index.js
CHANGED
|
File without changes
|
package/cjs/Col/index.js
CHANGED
|
File without changes
|
package/cjs/Container/index.js
CHANGED
|
File without changes
|
package/cjs/Content/Content.js
CHANGED
|
File without changes
|
package/cjs/Content/index.js
CHANGED
|
File without changes
|
|
@@ -40,7 +40,8 @@ var CustomProvider = function CustomProvider(props) {
|
|
|
40
40
|
var toasters = _react.default.useRef(new Map());
|
|
41
41
|
|
|
42
42
|
var _usePortal = (0, _utils.usePortal)({
|
|
43
|
-
container: container
|
|
43
|
+
container: container,
|
|
44
|
+
waitMount: true
|
|
44
45
|
}),
|
|
45
46
|
Portal = _usePortal.Portal;
|
|
46
47
|
|
|
@@ -65,7 +66,9 @@ var CustomProvider = function CustomProvider(props) {
|
|
|
65
66
|
}, [classPrefix, theme]);
|
|
66
67
|
return /*#__PURE__*/_react.default.createElement(Provider, {
|
|
67
68
|
value: value
|
|
68
|
-
}, children, /*#__PURE__*/_react.default.createElement(Portal, null,
|
|
69
|
+
}, children, /*#__PURE__*/_react.default.createElement(Portal, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
70
|
+
className: "rs-toast-provider"
|
|
71
|
+
}, _ToastContainer.toastPlacements.map(function (placement) {
|
|
69
72
|
return /*#__PURE__*/_react.default.createElement(_ToastContainer.default, {
|
|
70
73
|
key: placement,
|
|
71
74
|
placement: placement,
|
|
@@ -73,7 +76,7 @@ var CustomProvider = function CustomProvider(props) {
|
|
|
73
76
|
toasters.current.set(placement, _ref);
|
|
74
77
|
}
|
|
75
78
|
});
|
|
76
|
-
})));
|
|
79
|
+
}))));
|
|
77
80
|
};
|
|
78
81
|
|
|
79
82
|
var _default = CustomProvider;
|
|
File without changes
|
|
File without changes
|
|
@@ -5,7 +5,7 @@ import { PickerToggleProps } from '../Picker';
|
|
|
5
5
|
import { FormControlBaseProps, PickerBaseProps, RsRefForwardingComponent } from '../@types/common';
|
|
6
6
|
export type { RangeType } from './Toolbar';
|
|
7
7
|
export interface DatePickerProps extends PickerBaseProps<DatePickerLocale>, FormControlBaseProps<Date | null>, Pick<PickerToggleProps, 'caretAs' | 'readOnly' | 'plaintext'> {
|
|
8
|
-
/**
|
|
8
|
+
/** Predefined date Ranges */
|
|
9
9
|
ranges?: RangeType<Date>[];
|
|
10
10
|
/** Calendar panel default presentation date and time */
|
|
11
11
|
calendarDefaultDate?: Date;
|
|
@@ -95,7 +95,7 @@ var Toolbar = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
95
95
|
return;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
onClickShortcut === null || onClickShortcut === void 0 ? void 0 : onClickShortcut(value, closeOverlay !==
|
|
98
|
+
onClickShortcut === null || onClickShortcut === void 0 ? void 0 : onClickShortcut(value, closeOverlay !== false ? true : false, event);
|
|
99
99
|
};
|
|
100
100
|
|
|
101
101
|
return /*#__PURE__*/_react.default.createElement(_Button.default, {
|
package/cjs/DatePicker/index.js
CHANGED
|
File without changes
|
|
@@ -19,7 +19,6 @@ export interface CalendarProps extends WithAsProps, Omit<CalendarCoreProps, Omit
|
|
|
19
19
|
onToggleMeridian: (index: number, event: React.MouseEvent) => void;
|
|
20
20
|
onMouseMove?: (date: Date) => void;
|
|
21
21
|
onSelect?: (date: Date, event: React.SyntheticEvent) => void;
|
|
22
|
-
showOneCalendar?: boolean;
|
|
23
22
|
showWeekNumbers?: boolean;
|
|
24
23
|
value?: [] | [Date] | [Date, Date];
|
|
25
24
|
}
|
|
@@ -21,14 +21,6 @@ var _Calendar = _interopRequireWildcard(require("../Calendar/Calendar"));
|
|
|
21
21
|
|
|
22
22
|
var _utils = require("../utils");
|
|
23
23
|
|
|
24
|
-
/**
|
|
25
|
-
* Omit the time in the date, which is used to compare and judge the date.
|
|
26
|
-
* eg: isAfter/isBefore
|
|
27
|
-
*/
|
|
28
|
-
function omitTime(date) {
|
|
29
|
-
return new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
|
30
|
-
}
|
|
31
|
-
|
|
32
24
|
var Calendar = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
33
25
|
var _props$as = props.as,
|
|
34
26
|
Component = _props$as === void 0 ? _Calendar.default : _props$as,
|
|
@@ -43,10 +35,9 @@ var Calendar = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
43
35
|
onChangeCalendarDate = props.onChangeCalendarDate,
|
|
44
36
|
onChangeCalendarTime = props.onChangeCalendarTime,
|
|
45
37
|
onToggleMeridian = props.onToggleMeridian,
|
|
46
|
-
showOneCalendar = props.showOneCalendar,
|
|
47
38
|
_props$value = props.value,
|
|
48
39
|
value = _props$value === void 0 ? [] : _props$value,
|
|
49
|
-
rest = (0, _objectWithoutPropertiesLoose2.default)(props, ["as", "calendarDate", "format", "disabledDate", "index", "limitEndYear", "onChangeCalendarDate", "onChangeCalendarTime", "onToggleMeridian", "
|
|
40
|
+
rest = (0, _objectWithoutPropertiesLoose2.default)(props, ["as", "calendarDate", "format", "disabledDate", "index", "limitEndYear", "onChangeCalendarDate", "onChangeCalendarTime", "onToggleMeridian", "value"]);
|
|
50
41
|
|
|
51
42
|
var _useState = (0, _react.useState)(),
|
|
52
43
|
calendarState = _useState[0],
|
|
@@ -86,33 +77,6 @@ var Calendar = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
86
77
|
var handleMoveBackward = (0, _react.useCallback)(function () {
|
|
87
78
|
onMoveBackward === null || onMoveBackward === void 0 ? void 0 : onMoveBackward((0, _dateUtils.addMonths)(getCalendarDate(), -1));
|
|
88
79
|
}, [getCalendarDate, onMoveBackward]);
|
|
89
|
-
var disabledBackward = (0, _react.useCallback)(function () {
|
|
90
|
-
// Do not disable the Backward button on the first calendar.
|
|
91
|
-
if (index === 0) {
|
|
92
|
-
return false;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
var startDate = (0, _dateUtils.setDate)((0, _dateUtils.addMonths)(calendarDate[0], 1), 1);
|
|
96
|
-
var endDate = (0, _dateUtils.setDate)(omitTime(calendarDate[1]), 1);
|
|
97
|
-
var after = (0, _dateUtils.isAfter)(endDate, startDate);
|
|
98
|
-
return !after;
|
|
99
|
-
}, [calendarDate, index]);
|
|
100
|
-
var disabledForward = (0, _react.useCallback)(function () {
|
|
101
|
-
// If only one calendar is displayed, do not disable
|
|
102
|
-
if (showOneCalendar) {
|
|
103
|
-
return false;
|
|
104
|
-
} // Do not disable the Forward button on the second calendar.
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
if (index === 1) {
|
|
108
|
-
return false;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
var startDate = (0, _dateUtils.setDate)((0, _dateUtils.addMonths)(omitTime(calendarDate[0]), 1), 1);
|
|
112
|
-
var endDate = (0, _dateUtils.setDate)(omitTime(calendarDate[1]), 1);
|
|
113
|
-
var after = (0, _dateUtils.isAfter)(endDate, startDate);
|
|
114
|
-
return !after;
|
|
115
|
-
}, [calendarDate, index, showOneCalendar]);
|
|
116
80
|
var disabledMonth = (0, _react.useCallback)(function (date) {
|
|
117
81
|
return disabledDate === null || disabledDate === void 0 ? void 0 : disabledDate(date, value, _utils.DATERANGE_DISABLED_TARGET.CALENDAR);
|
|
118
82
|
}, [disabledDate, value]);
|
|
@@ -120,9 +84,7 @@ var Calendar = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
120
84
|
format: format,
|
|
121
85
|
calendarState: calendarState,
|
|
122
86
|
dateRange: value,
|
|
123
|
-
disabledBackward: disabledBackward(),
|
|
124
87
|
disabledDate: disabledMonth,
|
|
125
|
-
disabledForward: disabledForward(),
|
|
126
88
|
inSameMonth: inSameMonth,
|
|
127
89
|
index: index,
|
|
128
90
|
limitEndYear: limitEndYear,
|
|
@@ -3,7 +3,7 @@ import { FormControlBaseProps, PickerBaseProps } from '../@types/common';
|
|
|
3
3
|
import { PickerComponent, PickerToggleProps } from '../Picker';
|
|
4
4
|
import { DisabledDateFunction, RangeType, DateRange } from './types';
|
|
5
5
|
export interface DateRangePickerProps extends PickerBaseProps, FormControlBaseProps<DateRange | null>, Pick<PickerToggleProps, 'caretAs' | 'readOnly' | 'plaintext'> {
|
|
6
|
-
/**
|
|
6
|
+
/** Predefined date ranges */
|
|
7
7
|
ranges?: RangeType[];
|
|
8
8
|
/** Format date */
|
|
9
9
|
format?: string;
|