rsuite 5.19.0 → 5.20.0-beta.6
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 +30 -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/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/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 +4 -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/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/mixin.less +0 -0
- package/Uploader/styles/mixin.less +0 -0
- package/Windowing/package.json +7 -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/Transition.d.ts +2 -2
- 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/MonthDropdown.d.ts +1 -0
- package/cjs/Calendar/MonthDropdown.js +27 -40
- package/cjs/Carousel/index.js +0 -0
- package/cjs/Cascader/Cascader.d.ts +2 -2
- package/cjs/Cascader/Cascader.js +10 -5
- package/cjs/Cascader/DropdownMenu.js +5 -2
- package/cjs/Cascader/index.js +0 -0
- package/cjs/Cascader/utils.d.ts +1 -0
- package/cjs/Cascader/utils.js +11 -1
- package/cjs/CheckPicker/CheckPicker.d.ts +2 -2
- package/cjs/CheckPicker/CheckPicker.js +4 -1
- package/cjs/CheckPicker/index.js +0 -0
- package/cjs/CheckTreePicker/CheckTreePicker.js +63 -67
- package/cjs/CheckTreePicker/index.js +0 -0
- package/cjs/CheckTreePicker/utils.d.ts +2 -2
- package/cjs/CheckTreePicker/utils.js +9 -10
- 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/FormattedDate.js +0 -0
- package/cjs/CustomProvider/index.js +0 -0
- package/cjs/DOMHelper/index.d.ts +3 -2
- package/cjs/DatePicker/DatePicker.js +9 -0
- package/cjs/DatePicker/PredefinedRanges.js +5 -0
- package/cjs/DatePicker/index.js +0 -0
- package/cjs/DateRangePicker/DateRangePicker.js +9 -7
- package/cjs/DateRangePicker/disabledDateUtils.js +0 -0
- package/cjs/Disclosure/Disclosure.d.ts +2 -2
- package/cjs/Disclosure/Disclosure.js +6 -6
- 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/Form/Form.js +44 -38
- 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.js +4 -1
- package/cjs/InputPicker/index.js +0 -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/DropdownMenu.js +5 -2
- package/cjs/MultiCascader/MultiCascader.js +10 -5
- package/cjs/MultiCascader/index.js +0 -0
- package/cjs/MultiCascader/utils.d.ts +1 -0
- package/cjs/MultiCascader/utils.js +10 -0
- package/cjs/Nav/index.js +0 -0
- package/cjs/Navbar/NavbarBody.js +0 -0
- package/cjs/Navbar/NavbarBrand.js +0 -0
- package/cjs/Navbar/NavbarDropdownMenu.js +16 -10
- package/cjs/Navbar/NavbarHeader.js +0 -0
- package/cjs/Notification/index.js +0 -0
- package/cjs/Overlay/OverlayTrigger.d.ts +12 -3
- package/cjs/Overlay/OverlayTrigger.js +26 -4
- package/cjs/Overlay/index.js +0 -0
- package/cjs/Pagination/index.js +0 -0
- package/cjs/Panel/index.js +0 -0
- package/cjs/PanelGroup/index.js +0 -0
- package/cjs/Picker/DropdownMenu.d.ts +2 -1
- package/cjs/Picker/DropdownMenu.js +39 -33
- package/cjs/Picker/PickerOverlay.d.ts +2 -2
- package/cjs/Picker/PickerToggle.d.ts +1 -0
- package/cjs/Picker/PickerToggle.js +27 -8
- package/cjs/Picker/PickerToggleTrigger.d.ts +3 -3
- package/cjs/Picker/PickerToggleTrigger.js +4 -2
- package/cjs/Picker/index.d.ts +3 -3
- package/cjs/Picker/types.d.ts +7 -5
- package/cjs/Picker/utils.d.ts +11 -12
- package/cjs/Picker/utils.js +4 -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 +6 -5
- package/cjs/SelectPicker/SelectPicker.js +4 -1
- 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 -5
- package/cjs/Tree/index.js +0 -0
- package/cjs/TreePicker/TreePicker.d.ts +0 -1
- package/cjs/TreePicker/TreePicker.js +47 -48
- package/cjs/TreePicker/index.js +0 -0
- package/cjs/TreePicker/test/TreePicker.test.js +14 -0
- package/cjs/Whisper/Whisper.d.ts +3 -3
- package/cjs/Whisper/index.js +0 -0
- package/cjs/Windowing/AutoSizer.d.ts +25 -0
- package/cjs/Windowing/AutoSizer.js +103 -0
- package/cjs/Windowing/List.d.ts +45 -0
- package/cjs/Windowing/List.js +72 -0
- package/cjs/Windowing/index.d.ts +5 -0
- package/cjs/Windowing/index.js +19 -0
- package/cjs/index.d.ts +1 -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/fr_FR.d.ts +105 -0
- package/cjs/locales/fr_FR.js +84 -0
- package/cjs/locales/index.d.ts +1 -0
- package/cjs/locales/index.js +6 -2
- 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/clone.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.d.ts +9 -3
- package/cjs/utils/treeUtils.js +24 -5
- package/cjs/utils/useClassNames.js +0 -0
- package/cjs/utils/useEnsuredRef.js +0 -0
- package/cjs/utils/useEventCallback.js +0 -0
- 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 +3 -0
- package/dist/rsuite-rtl.min.css +1 -1
- package/dist/rsuite-rtl.min.css.map +1 -1
- package/dist/rsuite.css +3 -0
- package/dist/rsuite.js +311 -570
- 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/Transition.d.ts +2 -2
- 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/MonthDropdown.d.ts +1 -0
- package/esm/Calendar/MonthDropdown.js +26 -41
- package/esm/Carousel/index.js +0 -0
- package/esm/Cascader/Cascader.d.ts +2 -2
- package/esm/Cascader/Cascader.js +10 -5
- package/esm/Cascader/DropdownMenu.js +5 -2
- package/esm/Cascader/index.js +0 -0
- package/esm/Cascader/utils.d.ts +1 -0
- package/esm/Cascader/utils.js +11 -1
- package/esm/CheckPicker/CheckPicker.d.ts +2 -2
- package/esm/CheckPicker/CheckPicker.js +4 -1
- package/esm/CheckPicker/index.js +0 -0
- package/esm/CheckTreePicker/CheckTreePicker.js +65 -67
- package/esm/CheckTreePicker/index.js +0 -0
- package/esm/CheckTreePicker/utils.d.ts +2 -2
- package/esm/CheckTreePicker/utils.js +11 -12
- 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/FormattedDate.js +0 -0
- package/esm/CustomProvider/index.js +0 -0
- package/esm/DOMHelper/index.d.ts +3 -2
- package/esm/DatePicker/DatePicker.js +8 -0
- package/esm/DatePicker/PredefinedRanges.js +5 -0
- package/esm/DatePicker/index.js +0 -0
- package/esm/DateRangePicker/DateRangePicker.js +9 -7
- package/esm/DateRangePicker/disabledDateUtils.js +0 -0
- package/esm/Disclosure/Disclosure.d.ts +2 -2
- package/esm/Disclosure/Disclosure.js +6 -6
- 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/Form/Form.js +44 -38
- 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.js +4 -1
- package/esm/InputPicker/index.js +0 -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/DropdownMenu.js +5 -2
- package/esm/MultiCascader/MultiCascader.js +10 -5
- package/esm/MultiCascader/index.js +0 -0
- package/esm/MultiCascader/utils.d.ts +1 -0
- package/esm/MultiCascader/utils.js +10 -0
- package/esm/Nav/index.js +0 -0
- package/esm/Navbar/NavbarBody.js +0 -0
- package/esm/Navbar/NavbarBrand.js +0 -0
- package/esm/Navbar/NavbarDropdownMenu.js +14 -8
- package/esm/Navbar/NavbarHeader.js +0 -0
- package/esm/Notification/index.js +0 -0
- package/esm/Overlay/OverlayTrigger.d.ts +12 -3
- package/esm/Overlay/OverlayTrigger.js +23 -3
- package/esm/Overlay/index.js +0 -0
- package/esm/Pagination/index.js +0 -0
- package/esm/Panel/index.js +0 -0
- package/esm/PanelGroup/index.js +0 -0
- package/esm/Picker/DropdownMenu.d.ts +2 -1
- package/esm/Picker/DropdownMenu.js +39 -35
- package/esm/Picker/PickerOverlay.d.ts +2 -2
- package/esm/Picker/PickerToggle.d.ts +1 -0
- package/esm/Picker/PickerToggle.js +25 -8
- package/esm/Picker/PickerToggleTrigger.d.ts +3 -3
- package/esm/Picker/PickerToggleTrigger.js +4 -2
- package/esm/Picker/index.d.ts +3 -3
- package/esm/Picker/types.d.ts +7 -5
- package/esm/Picker/utils.d.ts +11 -12
- package/esm/Picker/utils.js +4 -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 +6 -5
- package/esm/SelectPicker/SelectPicker.js +4 -1
- 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 -5
- package/esm/Tree/index.js +0 -0
- package/esm/TreePicker/TreePicker.d.ts +0 -1
- package/esm/TreePicker/TreePicker.js +46 -45
- package/esm/TreePicker/index.js +0 -0
- package/esm/TreePicker/test/TreePicker.test.js +14 -0
- package/esm/Whisper/Whisper.d.ts +3 -3
- package/esm/Whisper/index.js +0 -0
- package/esm/Windowing/AutoSizer.d.ts +25 -0
- package/esm/Windowing/AutoSizer.js +88 -0
- package/esm/Windowing/List.d.ts +45 -0
- package/esm/Windowing/List.js +58 -0
- package/esm/Windowing/index.d.ts +5 -0
- package/esm/Windowing/index.js +3 -0
- package/esm/index.d.ts +1 -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/fr_FR.d.ts +105 -0
- package/esm/locales/fr_FR.js +74 -0
- package/esm/locales/index.d.ts +1 -0
- package/esm/locales/index.js +2 -1
- 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/clone.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.d.ts +9 -3
- package/esm/utils/treeUtils.js +22 -5
- package/esm/utils/useClassNames.js +0 -0
- package/esm/utils/useEnsuredRef.js +0 -0
- package/esm/utils/useEventCallback.js +0 -0
- 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/locales/fr_FR/package.json +7 -0
- package/package.json +9 -9
- 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/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
- package/cjs/Picker/VirtualizedList.d.ts +0 -37
- package/cjs/Picker/VirtualizedList.js +0 -15
- package/esm/Picker/VirtualizedList.d.ts +0 -37
- package/esm/Picker/VirtualizedList.js +0 -4
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _isUndefined from "lodash/isUndefined";
|
|
3
3
|
import _isNil from "lodash/isNil";
|
|
4
|
-
import {
|
|
5
|
-
import { getChildrenByFlattenNodes } from '../utils/treeUtils';
|
|
4
|
+
import { CHECK_STATE } from '../utils';
|
|
5
|
+
import { getChildrenByFlattenNodes, getNodeFormattedRefKey } from '../utils/treeUtils';
|
|
6
6
|
import { attachParent } from '../utils/attachParent';
|
|
7
7
|
export function isEveryChildChecked(nodes, parent) {
|
|
8
8
|
if (_isNil(parent.refKey) || _isNil(nodes[parent.refKey])) {
|
|
@@ -98,7 +98,7 @@ export function isNodeUncheckable(node, props) {
|
|
|
98
98
|
uncheckableItemValues = _props$uncheckableIte === void 0 ? [] : _props$uncheckableIte,
|
|
99
99
|
valueKey = props.valueKey;
|
|
100
100
|
return uncheckableItemValues.some(function (value) {
|
|
101
|
-
return
|
|
101
|
+
return node[valueKey] === value;
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
104
|
export function getFormattedTree(data, nodes, props) {
|
|
@@ -142,7 +142,7 @@ export function getDisabledState(nodes, node, props) {
|
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
return disabledItemValues.some(function (value) {
|
|
145
|
-
return node.refKey &&
|
|
145
|
+
return node.refKey && nodes[node.refKey][valueKey] === value;
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
148
|
export function getCheckTreePickerDefaultValue(value, uncheckableItemValues) {
|
|
@@ -154,18 +154,17 @@ export function getCheckTreePickerDefaultValue(value, uncheckableItemValues) {
|
|
|
154
154
|
|
|
155
155
|
return [];
|
|
156
156
|
}
|
|
157
|
-
export function getSelectedItems(nodes,
|
|
158
|
-
var
|
|
159
|
-
|
|
157
|
+
export function getSelectedItems(nodes, values) {
|
|
158
|
+
var checkedItems = [];
|
|
159
|
+
values.forEach(function (value) {
|
|
160
|
+
var refKey = getNodeFormattedRefKey(value);
|
|
160
161
|
var node = nodes[refKey];
|
|
161
162
|
|
|
162
|
-
if (
|
|
163
|
-
|
|
164
|
-
})) {
|
|
165
|
-
checkItems.push(node);
|
|
163
|
+
if (!_isNil(node)) {
|
|
164
|
+
checkedItems.push(node);
|
|
166
165
|
}
|
|
167
166
|
});
|
|
168
|
-
return
|
|
167
|
+
return checkedItems;
|
|
169
168
|
}
|
|
170
169
|
export function getNodeCheckState(_ref) {
|
|
171
170
|
var nodes = _ref.nodes,
|
package/esm/Checkbox/index.js
CHANGED
|
File without changes
|
|
File without changes
|
package/esm/CloseButton/index.js
CHANGED
|
File without changes
|
package/esm/Col/index.js
CHANGED
|
File without changes
|
package/esm/Container/index.js
CHANGED
|
File without changes
|
package/esm/Content/Content.js
CHANGED
|
File without changes
|
package/esm/Content/index.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/esm/DOMHelper/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import * as helpers from 'dom-lib';
|
|
2
3
|
export * from 'dom-lib';
|
|
3
4
|
declare const DOMHelper: {
|
|
@@ -10,8 +11,8 @@ declare const DOMHelper: {
|
|
|
10
11
|
removeClass: (target: Element, className: string) => Element;
|
|
11
12
|
hasClass: (target: Element, className: string) => boolean;
|
|
12
13
|
toggleClass: (target: Element, className: string) => Element;
|
|
13
|
-
cancelAnimationFramePolyfill: typeof clearTimeout;
|
|
14
|
-
requestAnimationFramePolyfill: typeof requestAnimationFrame;
|
|
14
|
+
cancelAnimationFramePolyfill: typeof cancelAnimationFrame | typeof clearTimeout;
|
|
15
|
+
requestAnimationFramePolyfill: typeof requestAnimationFrame | ((callback: (t: number) => void) => NodeJS.Timeout);
|
|
15
16
|
getAnimationEnd: typeof helpers.getAnimationEnd;
|
|
16
17
|
ownerDocument: (node: Element | null) => Document;
|
|
17
18
|
ownerWindow: (componentOrElement: Element) => Window;
|
|
@@ -12,6 +12,7 @@ import useCalendarDate from '../Calendar/useCalendarDate';
|
|
|
12
12
|
import Toolbar from './Toolbar';
|
|
13
13
|
import { composeFunctions, createChainedFunction, DateUtils, mergeRefs, useClassNames, useControlled, useCustom } from '../utils';
|
|
14
14
|
import { PickerOverlay, pickerPropTypes, PickerToggle, PickerToggleTrigger, pickTriggerPropKeys, omitTriggerPropKeys, usePickerClassName, usePublicMethods, useToggleKeyDownEvent } from '../Picker';
|
|
15
|
+
import { OverlayCloseCause } from '../Overlay/OverlayTrigger';
|
|
15
16
|
var DatePicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
16
17
|
var _props$as = props.as,
|
|
17
18
|
Component = _props$as === void 0 ? 'div' : _props$as,
|
|
@@ -390,6 +391,13 @@ var DatePicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
390
391
|
pickerProps: pick(props, pickTriggerPropKeys),
|
|
391
392
|
ref: triggerRef,
|
|
392
393
|
placement: placement,
|
|
394
|
+
onClose: function onClose(cause) {
|
|
395
|
+
// Unless overlay is closing on user clicking "OK" button,
|
|
396
|
+
// reset the selected date on calendar panel
|
|
397
|
+
if (cause !== OverlayCloseCause.ImperativeHandle) {
|
|
398
|
+
resetCalendarDate();
|
|
399
|
+
}
|
|
400
|
+
},
|
|
393
401
|
onEntered: createChainedFunction(handleEntered, onEntered),
|
|
394
402
|
onExited: createChainedFunction(handleExited, onExited),
|
|
395
403
|
speaker: renderDropdownMenu
|
|
@@ -29,6 +29,11 @@ var PredefinedRanges = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
29
29
|
return item.label === key;
|
|
30
30
|
});
|
|
31
31
|
}, [calendarDate]);
|
|
32
|
+
|
|
33
|
+
if (ranges.length === 0) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
|
|
32
37
|
return /*#__PURE__*/React.createElement(Stack, _extends({
|
|
33
38
|
className: className,
|
|
34
39
|
ref: ref,
|
package/esm/DatePicker/index.js
CHANGED
|
File without changes
|
|
@@ -573,6 +573,12 @@ var DateRangePicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
573
573
|
onToggleMeridian: handleToggleMeridian,
|
|
574
574
|
renderTitle: renderTitle
|
|
575
575
|
};
|
|
576
|
+
var sideRanges = (ranges === null || ranges === void 0 ? void 0 : ranges.filter(function (range) {
|
|
577
|
+
return (range === null || range === void 0 ? void 0 : range.placement) === 'left';
|
|
578
|
+
})) || [];
|
|
579
|
+
var bottomRanges = ranges === null || ranges === void 0 ? void 0 : ranges.filter(function (range) {
|
|
580
|
+
return (range === null || range === void 0 ? void 0 : range.placement) === 'bottom' || (range === null || range === void 0 ? void 0 : range.placement) === undefined;
|
|
581
|
+
});
|
|
576
582
|
return /*#__PURE__*/React.createElement(PickerOverlay, {
|
|
577
583
|
role: "dialog",
|
|
578
584
|
className: classes,
|
|
@@ -583,13 +589,11 @@ var DateRangePicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
583
589
|
className: panelClasses
|
|
584
590
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
585
591
|
alignItems: "flex-start"
|
|
586
|
-
}, /*#__PURE__*/React.createElement(PredefinedRanges, {
|
|
592
|
+
}, sideRanges.length > 0 && /*#__PURE__*/React.createElement(PredefinedRanges, {
|
|
587
593
|
direction: "column",
|
|
588
594
|
spacing: 0,
|
|
589
595
|
className: prefix('daterange-predefined'),
|
|
590
|
-
ranges:
|
|
591
|
-
return (range === null || range === void 0 ? void 0 : range.placement) === 'left';
|
|
592
|
-
})) || [],
|
|
596
|
+
ranges: sideRanges,
|
|
593
597
|
calendarDate: calendarDate,
|
|
594
598
|
locale: locale,
|
|
595
599
|
disabledShortcut: disabledShortcutButton,
|
|
@@ -612,9 +616,7 @@ var DateRangePicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
612
616
|
hideOkBtn: oneTap,
|
|
613
617
|
onOk: handleOK,
|
|
614
618
|
onClickShortcut: handleShortcutPageDate,
|
|
615
|
-
ranges:
|
|
616
|
-
return (range === null || range === void 0 ? void 0 : range.placement) === 'bottom' || (range === null || range === void 0 ? void 0 : range.placement) === undefined;
|
|
617
|
-
})
|
|
619
|
+
ranges: bottomRanges
|
|
618
620
|
})))));
|
|
619
621
|
};
|
|
620
622
|
|
|
File without changes
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import DisclosureButton from './DisclosureButton';
|
|
3
3
|
import DisclosureContent from './DisclosureContent';
|
|
4
|
-
export declare type DisclosureTrigger = 'click' | '
|
|
5
|
-
export interface DisclosureRenderProps extends Pick<React.HTMLAttributes<HTMLElement>, '
|
|
4
|
+
export declare type DisclosureTrigger = 'click' | 'hover';
|
|
5
|
+
export interface DisclosureRenderProps extends Pick<React.HTMLAttributes<HTMLElement>, 'onMouseEnter' | 'onMouseLeave'> {
|
|
6
6
|
open: boolean;
|
|
7
7
|
}
|
|
8
8
|
export interface DisclosureProps {
|
|
@@ -59,7 +59,7 @@ var Disclosure = /*#__PURE__*/React.memo(function (props) {
|
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
|
-
var
|
|
62
|
+
var onMouseEnter = useCallback(function (event) {
|
|
63
63
|
if (!open) {
|
|
64
64
|
dispatch({
|
|
65
65
|
type: DisclosureActionTypes.Show
|
|
@@ -67,7 +67,7 @@ var Disclosure = /*#__PURE__*/React.memo(function (props) {
|
|
|
67
67
|
onToggle === null || onToggle === void 0 ? void 0 : onToggle(true, event);
|
|
68
68
|
}
|
|
69
69
|
}, [open, dispatch, onToggle]);
|
|
70
|
-
var
|
|
70
|
+
var onMouseLeave = useCallback(function (event) {
|
|
71
71
|
if (open) {
|
|
72
72
|
dispatch({
|
|
73
73
|
type: DisclosureActionTypes.Hide
|
|
@@ -98,13 +98,13 @@ var Disclosure = /*#__PURE__*/React.memo(function (props) {
|
|
|
98
98
|
open: open
|
|
99
99
|
};
|
|
100
100
|
|
|
101
|
-
if (trigger.includes('
|
|
102
|
-
renderProps.
|
|
103
|
-
renderProps.
|
|
101
|
+
if (trigger.includes('hover')) {
|
|
102
|
+
renderProps.onMouseEnter = onMouseEnter;
|
|
103
|
+
renderProps.onMouseLeave = onMouseLeave;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
return renderProps;
|
|
107
|
-
}, [open, trigger,
|
|
107
|
+
}, [open, trigger, onMouseEnter, onMouseLeave]);
|
|
108
108
|
return /*#__PURE__*/React.createElement(DisclosureContext.Provider, {
|
|
109
109
|
value: contextValue
|
|
110
110
|
}, children(renderProps, containerElementRef));
|
package/esm/Disclosure/index.js
CHANGED
|
File without changes
|
package/esm/Divider/index.js
CHANGED
|
File without changes
|
package/esm/Drawer/index.js
CHANGED
|
File without changes
|
|
File without changes
|
package/esm/Dropdown/index.js
CHANGED
|
File without changes
|
package/esm/FlexboxGrid/index.js
CHANGED
|
File without changes
|
package/esm/Footer/Footer.js
CHANGED
|
File without changes
|
package/esm/Footer/index.js
CHANGED
|
File without changes
|
package/esm/Form/Form.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
import React, { useMemo, useCallback,
|
|
3
|
+
import React, { useMemo, useCallback, useImperativeHandle, useRef } from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
|
-
import isUndefined from 'lodash/isUndefined';
|
|
6
5
|
import omit from 'lodash/omit';
|
|
7
6
|
import { SchemaModel } from 'schema-typed';
|
|
8
7
|
import FormContext, { FormValueContext } from './FormContext';
|
|
@@ -13,6 +12,7 @@ import FormGroup from '../FormGroup';
|
|
|
13
12
|
import FormHelpText from '../FormHelpText';
|
|
14
13
|
import { useFormClassNames } from './useFormClassNames';
|
|
15
14
|
import useSchemaModel from './useSchemaModel';
|
|
15
|
+
import { useControlled } from '../utils';
|
|
16
16
|
var Form = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
17
17
|
var _props$checkTrigger = props.checkTrigger,
|
|
18
18
|
checkTrigger = _props$checkTrigger === void 0 ? 'change' : _props$checkTrigger,
|
|
@@ -55,20 +55,18 @@ var Form = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
55
55
|
disabled: disabled
|
|
56
56
|
});
|
|
57
57
|
|
|
58
|
-
var
|
|
59
|
-
|
|
60
|
-
setFormValue =
|
|
58
|
+
var _useControlled = useControlled(formValue, formDefaultValue),
|
|
59
|
+
realFormValue = _useControlled[0],
|
|
60
|
+
setFormValue = _useControlled[1];
|
|
61
61
|
|
|
62
|
-
var
|
|
63
|
-
|
|
64
|
-
setFormError =
|
|
62
|
+
var _useControlled2 = useControlled(formError, {}),
|
|
63
|
+
realFormError = _useControlled2[0],
|
|
64
|
+
setFormError = _useControlled2[1];
|
|
65
65
|
|
|
66
|
-
var
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
return isUndefined(formError) ? _formError : formError;
|
|
71
|
-
}, [formError, _formError]);
|
|
66
|
+
var realFormValueRef = useRef(realFormValue);
|
|
67
|
+
realFormValueRef.current = realFormValue;
|
|
68
|
+
var realFormErrorRef = useRef(realFormError);
|
|
69
|
+
realFormErrorRef.current = realFormError;
|
|
72
70
|
/**
|
|
73
71
|
* Validate the form data and return a boolean.
|
|
74
72
|
* The error message after verification is returned in the callback.
|
|
@@ -76,7 +74,7 @@ var Form = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
76
74
|
*/
|
|
77
75
|
|
|
78
76
|
var check = useCallback(function (callback) {
|
|
79
|
-
var formValue =
|
|
77
|
+
var formValue = realFormValue || {};
|
|
80
78
|
var formError = {};
|
|
81
79
|
var errorCount = 0;
|
|
82
80
|
var model = getCombinedModel();
|
|
@@ -98,7 +96,7 @@ var Form = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
98
96
|
}
|
|
99
97
|
|
|
100
98
|
return true;
|
|
101
|
-
}, [
|
|
99
|
+
}, [realFormValue, getCombinedModel, setFormError, onCheck, onError]);
|
|
102
100
|
/**
|
|
103
101
|
* Check the data field
|
|
104
102
|
* @param fieldName
|
|
@@ -108,11 +106,11 @@ var Form = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
108
106
|
var checkForField = useCallback(function (fieldName, callback) {
|
|
109
107
|
var _extends2;
|
|
110
108
|
|
|
111
|
-
var formValue =
|
|
109
|
+
var formValue = realFormValue || {};
|
|
112
110
|
var model = getCombinedModel();
|
|
113
111
|
var checkResult = model.checkForField(fieldName, formValue);
|
|
114
112
|
|
|
115
|
-
var formError = _extends({},
|
|
113
|
+
var formError = _extends({}, realFormError, (_extends2 = {}, _extends2[fieldName] = (checkResult === null || checkResult === void 0 ? void 0 : checkResult.errorMessage) || checkResult, _extends2));
|
|
116
114
|
|
|
117
115
|
setFormError(formError);
|
|
118
116
|
onCheck === null || onCheck === void 0 ? void 0 : onCheck(formError);
|
|
@@ -123,13 +121,13 @@ var Form = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
123
121
|
}
|
|
124
122
|
|
|
125
123
|
return !checkResult.hasError;
|
|
126
|
-
}, [
|
|
124
|
+
}, [realFormValue, getCombinedModel, realFormError, setFormError, onCheck, onError]);
|
|
127
125
|
/**
|
|
128
126
|
* Check form data asynchronously and return a Promise
|
|
129
127
|
*/
|
|
130
128
|
|
|
131
129
|
var checkAsync = useCallback(function () {
|
|
132
|
-
var formValue =
|
|
130
|
+
var formValue = realFormValue || {};
|
|
133
131
|
var promises = [];
|
|
134
132
|
var keys = [];
|
|
135
133
|
var model = getCombinedModel();
|
|
@@ -160,19 +158,19 @@ var Form = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
160
158
|
formError: formError
|
|
161
159
|
};
|
|
162
160
|
});
|
|
163
|
-
}, [
|
|
161
|
+
}, [realFormValue, getCombinedModel, onCheck, setFormError, onError]);
|
|
164
162
|
/**
|
|
165
163
|
* Asynchronously check form fields and return Promise
|
|
166
164
|
* @param fieldName
|
|
167
165
|
*/
|
|
168
166
|
|
|
169
167
|
var checkForFieldAsync = useCallback(function (fieldName) {
|
|
170
|
-
var formValue =
|
|
168
|
+
var formValue = realFormValue || {};
|
|
171
169
|
var model = getCombinedModel();
|
|
172
170
|
return model.checkForFieldAsync(fieldName, formValue).then(function (checkResult) {
|
|
173
171
|
var _extends3;
|
|
174
172
|
|
|
175
|
-
var formError = _extends({},
|
|
173
|
+
var formError = _extends({}, realFormError, (_extends3 = {}, _extends3[fieldName] = checkResult.errorMessage, _extends3));
|
|
176
174
|
|
|
177
175
|
onCheck === null || onCheck === void 0 ? void 0 : onCheck(formError);
|
|
178
176
|
setFormError(formError);
|
|
@@ -183,20 +181,20 @@ var Form = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
183
181
|
|
|
184
182
|
return checkResult;
|
|
185
183
|
});
|
|
186
|
-
}, [
|
|
184
|
+
}, [realFormValue, getCombinedModel, realFormError, onCheck, setFormError, onError]);
|
|
187
185
|
var cleanErrors = useCallback(function () {
|
|
188
186
|
setFormError({});
|
|
189
|
-
}, []);
|
|
187
|
+
}, [setFormError]);
|
|
190
188
|
var cleanErrorForField = useCallback(function (fieldName) {
|
|
191
|
-
setFormError(omit(
|
|
192
|
-
}, [
|
|
189
|
+
setFormError(omit(realFormError, [fieldName]));
|
|
190
|
+
}, [realFormError, setFormError]);
|
|
193
191
|
var resetErrors = useCallback(function (formError) {
|
|
194
192
|
if (formError === void 0) {
|
|
195
193
|
formError = {};
|
|
196
194
|
}
|
|
197
195
|
|
|
198
196
|
setFormError(formError);
|
|
199
|
-
}, []);
|
|
197
|
+
}, [setFormError]);
|
|
200
198
|
useImperativeHandle(ref, function () {
|
|
201
199
|
return {
|
|
202
200
|
root: rootRef.current,
|
|
@@ -210,15 +208,23 @@ var Form = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
210
208
|
};
|
|
211
209
|
});
|
|
212
210
|
var removeFieldError = useCallback(function (name) {
|
|
213
|
-
|
|
211
|
+
/**
|
|
212
|
+
* when this function is called when the children component is unmount, it's an old render frame
|
|
213
|
+
* so use Ref to get future error
|
|
214
|
+
*/
|
|
215
|
+
var formError = omit(realFormErrorRef.current, [name]);
|
|
214
216
|
setFormError(formError);
|
|
215
217
|
onCheck === null || onCheck === void 0 ? void 0 : onCheck(formError);
|
|
216
|
-
}, [
|
|
218
|
+
}, [onCheck, setFormError]);
|
|
217
219
|
var removeFieldValue = useCallback(function (name) {
|
|
218
|
-
|
|
220
|
+
/**
|
|
221
|
+
* when this function is called when the children component is unmount, it's an old render frame
|
|
222
|
+
* so use Ref to get future value
|
|
223
|
+
*/
|
|
224
|
+
var formValue = omit(realFormValueRef.current, [name]);
|
|
219
225
|
setFormValue(formValue);
|
|
220
226
|
onChange === null || onChange === void 0 ? void 0 : onChange(formValue);
|
|
221
|
-
}, [
|
|
227
|
+
}, [onChange, setFormValue]);
|
|
222
228
|
var handleSubmit = useCallback(function (event) {
|
|
223
229
|
if (disabled || readOnly || plaintext) {
|
|
224
230
|
return;
|
|
@@ -232,25 +238,25 @@ var Form = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
232
238
|
var handleFieldError = useCallback(function (name, errorMessage) {
|
|
233
239
|
var _extends4;
|
|
234
240
|
|
|
235
|
-
var formError = _extends({},
|
|
241
|
+
var formError = _extends({}, realFormError, (_extends4 = {}, _extends4[name] = errorMessage, _extends4));
|
|
236
242
|
|
|
237
243
|
setFormError(formError);
|
|
238
244
|
onError === null || onError === void 0 ? void 0 : onError(formError);
|
|
239
245
|
onCheck === null || onCheck === void 0 ? void 0 : onCheck(formError);
|
|
240
|
-
}, [onError, onCheck
|
|
246
|
+
}, [realFormError, setFormError, onError, onCheck]);
|
|
241
247
|
var handleFieldSuccess = useCallback(function (name) {
|
|
242
248
|
removeFieldError(name);
|
|
243
249
|
}, [removeFieldError]);
|
|
244
250
|
var handleFieldChange = useCallback(function (name, value, event) {
|
|
245
251
|
var _extends5;
|
|
246
252
|
|
|
247
|
-
var formValue =
|
|
253
|
+
var formValue = realFormValue;
|
|
248
254
|
|
|
249
255
|
var nextFormValue = _extends({}, formValue, (_extends5 = {}, _extends5[name] = value, _extends5));
|
|
250
256
|
|
|
251
257
|
setFormValue(nextFormValue);
|
|
252
258
|
onChange === null || onChange === void 0 ? void 0 : onChange(nextFormValue, event);
|
|
253
|
-
}, [
|
|
259
|
+
}, [realFormValue, setFormValue, onChange]);
|
|
254
260
|
var rootRef = useRef(null);
|
|
255
261
|
var formContextValue = useMemo(function () {
|
|
256
262
|
return {
|
|
@@ -261,7 +267,7 @@ var Form = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
261
267
|
readOnly: readOnly,
|
|
262
268
|
plaintext: plaintext,
|
|
263
269
|
disabled: disabled,
|
|
264
|
-
formError:
|
|
270
|
+
formError: realFormError,
|
|
265
271
|
removeFieldValue: removeFieldValue,
|
|
266
272
|
removeFieldError: removeFieldError,
|
|
267
273
|
pushFieldRule: pushFieldRule,
|
|
@@ -270,7 +276,7 @@ var Form = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
270
276
|
onFieldError: handleFieldError,
|
|
271
277
|
onFieldSuccess: handleFieldSuccess
|
|
272
278
|
};
|
|
273
|
-
}, [getCombinedModel, checkTrigger, formDefaultValue, errorFromContext, readOnly, plaintext, disabled,
|
|
279
|
+
}, [getCombinedModel, checkTrigger, formDefaultValue, errorFromContext, readOnly, plaintext, disabled, realFormError, removeFieldValue, removeFieldError, pushFieldRule, removeFieldRule, handleFieldChange, handleFieldError, handleFieldSuccess]);
|
|
274
280
|
return /*#__PURE__*/React.createElement("form", _extends({}, rest, {
|
|
275
281
|
ref: rootRef,
|
|
276
282
|
onSubmit: handleSubmit,
|
package/esm/FormControl/index.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/esm/FormGroup/index.js
CHANGED
|
File without changes
|
|
File without changes
|
package/esm/Grid/Grid.js
CHANGED
|
File without changes
|
package/esm/Grid/index.js
CHANGED
|
File without changes
|
package/esm/Header/Header.js
CHANGED
|
File without changes
|
package/esm/Header/index.js
CHANGED
|
File without changes
|
package/esm/IconButton/index.js
CHANGED
|
File without changes
|
package/esm/Input/index.js
CHANGED
|
File without changes
|
|
File without changes
|
package/esm/InputGroup/index.js
CHANGED
|
File without changes
|
package/esm/InputNumber/index.js
CHANGED
|
File without changes
|
|
@@ -112,6 +112,7 @@ var InputPicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
112
112
|
var targetRef = useRef(null);
|
|
113
113
|
var triggerRef = useRef(null);
|
|
114
114
|
var inputRef = useRef();
|
|
115
|
+
var listRef = useRef(null);
|
|
115
116
|
|
|
116
117
|
var _useCustom = useCustom(['Picker', 'InputPicker'], overrideLocale),
|
|
117
118
|
locale = _useCustom.locale;
|
|
@@ -403,7 +404,8 @@ var InputPicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
403
404
|
usePublicMethods(ref, {
|
|
404
405
|
triggerRef: triggerRef,
|
|
405
406
|
overlayRef: overlayRef,
|
|
406
|
-
targetRef: targetRef
|
|
407
|
+
targetRef: targetRef,
|
|
408
|
+
listRef: listRef
|
|
407
409
|
});
|
|
408
410
|
/**
|
|
409
411
|
* Remove the last item, after pressing the back key on the keyboard.
|
|
@@ -605,6 +607,7 @@ var InputPicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
605
607
|
var menu = items.length ? /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
606
608
|
id: id ? id + "-listbox" : undefined,
|
|
607
609
|
listProps: listProps,
|
|
610
|
+
listRef: listRef,
|
|
608
611
|
disabledItemValues: disabledItemValues,
|
|
609
612
|
valueKey: valueKey,
|
|
610
613
|
labelKey: labelKey,
|
package/esm/InputPicker/index.js
CHANGED
|
File without changes
|
package/esm/List/index.js
CHANGED
|
File without changes
|
package/esm/Loader/index.js
CHANGED
|
File without changes
|
package/esm/Menu/MenuContext.js
CHANGED
|
File without changes
|
package/esm/Menu/index.js
CHANGED
|
File without changes
|
package/esm/Message/index.js
CHANGED
|
File without changes
|
package/esm/Modal/ModalFooter.js
CHANGED
|
File without changes
|
package/esm/Modal/index.js
CHANGED
|
File without changes
|
|
@@ -50,7 +50,10 @@ var DropdownMenu = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
50
50
|
prefix = _useClassNames.prefix;
|
|
51
51
|
|
|
52
52
|
var classes = merge(className, prefix('items'));
|
|
53
|
-
|
|
53
|
+
|
|
54
|
+
var _useCustom = useCustom('DropdownMenu'),
|
|
55
|
+
rtl = _useCustom.rtl;
|
|
56
|
+
|
|
54
57
|
var getCascadePaths = useCallback(function (layer, node) {
|
|
55
58
|
var paths = [];
|
|
56
59
|
|
|
@@ -77,7 +80,7 @@ var DropdownMenu = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
77
80
|
}); // Use `value` in keys when If `value` is string or number
|
|
78
81
|
|
|
79
82
|
var onlyKey = typeof value === 'number' || typeof value === 'string' ? value : index;
|
|
80
|
-
var Icon = node.loading ? SpinnerIcon : rtl ?
|
|
83
|
+
var Icon = node.loading ? SpinnerIcon : rtl ? AngleLeftIcon : AngleRightIcon;
|
|
81
84
|
var active = value.some(function (v) {
|
|
82
85
|
return v === nodeValue;
|
|
83
86
|
});
|
|
@@ -103,6 +103,7 @@ var MultiCascader = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
103
103
|
columnData = _useColumnData.columnData,
|
|
104
104
|
setColumnData = _useColumnData.setColumnData,
|
|
105
105
|
addColumn = _useColumnData.addColumn,
|
|
106
|
+
romoveColumnByIndex = _useColumnData.romoveColumnByIndex,
|
|
106
107
|
enforceUpdateColumnData = _useColumnData.enforceUpdateColumnData;
|
|
107
108
|
|
|
108
109
|
useUpdateEffect(function () {
|
|
@@ -186,7 +187,8 @@ var MultiCascader = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
186
187
|
var _node$childrenKey, _node$childrenKey2, _triggerRef$current, _triggerRef$current$u;
|
|
187
188
|
|
|
188
189
|
setSelectedPaths(cascadePaths);
|
|
189
|
-
onSelect === null || onSelect === void 0 ? void 0 : onSelect(node, cascadePaths, event);
|
|
190
|
+
onSelect === null || onSelect === void 0 ? void 0 : onSelect(node, cascadePaths, event);
|
|
191
|
+
var columnIndex = cascadePaths.length; // Lazy load node's children
|
|
190
192
|
|
|
191
193
|
if (typeof getChildren === 'function' && ((_node$childrenKey = node[childrenKey]) === null || _node$childrenKey === void 0 ? void 0 : _node$childrenKey.length) === 0) {
|
|
192
194
|
node.loading = true;
|
|
@@ -199,21 +201,24 @@ var MultiCascader = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
199
201
|
|
|
200
202
|
if (targetRef.current) {
|
|
201
203
|
addFlattenData(data, node);
|
|
202
|
-
addColumn(data,
|
|
204
|
+
addColumn(data, columnIndex);
|
|
203
205
|
}
|
|
204
206
|
});
|
|
205
207
|
} else {
|
|
206
208
|
node.loading = false;
|
|
207
209
|
node[childrenKey] = children;
|
|
208
210
|
addFlattenData(children, node);
|
|
209
|
-
addColumn(children,
|
|
211
|
+
addColumn(children, columnIndex);
|
|
210
212
|
}
|
|
211
213
|
} else if ((_node$childrenKey2 = node[childrenKey]) !== null && _node$childrenKey2 !== void 0 && _node$childrenKey2.length) {
|
|
212
|
-
addColumn(node[childrenKey],
|
|
214
|
+
addColumn(node[childrenKey], columnIndex);
|
|
215
|
+
} else {
|
|
216
|
+
// Removes subsequent columns of the current column when the clicked node is a leaf node.
|
|
217
|
+
romoveColumnByIndex(columnIndex);
|
|
213
218
|
}
|
|
214
219
|
|
|
215
220
|
(_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 ? void 0 : (_triggerRef$current$u = _triggerRef$current.updatePosition) === null || _triggerRef$current$u === void 0 ? void 0 : _triggerRef$current$u.call(_triggerRef$current);
|
|
216
|
-
}, [onSelect, getChildren, childrenKey, addColumn,
|
|
221
|
+
}, [onSelect, getChildren, childrenKey, addFlattenData, addColumn, romoveColumnByIndex]);
|
|
217
222
|
var handleCheck = useCallback(function (node, event, checked) {
|
|
218
223
|
var nodeValue = node[valueKey];
|
|
219
224
|
var nextValue = [];
|
|
File without changes
|
|
@@ -48,6 +48,7 @@ export declare function useFlattenData(data: ItemDataType[], itemKeys: ItemKeys)
|
|
|
48
48
|
export declare function useColumnData(flattenData: ItemType[]): {
|
|
49
49
|
columnData: ItemDataType<string | number>[][];
|
|
50
50
|
addColumn: (column: ItemDataType[], index: number) => void;
|
|
51
|
+
romoveColumnByIndex: (index: number) => void;
|
|
51
52
|
setColumnData: import("react").Dispatch<import("react").SetStateAction<ItemDataType<string | number>[][]>>;
|
|
52
53
|
enforceUpdateColumnData: (nextData: ItemDataType[]) => void;
|
|
53
54
|
};
|