rsuite 5.18.0-beta.3 → 5.18.1
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 +12 -0
- package/Calendar/styles/index.less +30 -11
- 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/DateRangePicker/styles/index.less +1 -1
- 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/Nav/styles/index.less +1 -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/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/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/Calendar.d.ts +20 -55
- package/cjs/Calendar/Calendar.js +84 -163
- package/cjs/Calendar/CalendarBody.d.ts +4 -0
- package/cjs/Calendar/{View.js → CalendarBody.js} +5 -5
- package/cjs/Calendar/CalendarContainer.d.ts +61 -0
- package/cjs/Calendar/CalendarContainer.js +233 -0
- package/{esm/Calendar/Header.d.ts → cjs/Calendar/CalendarHeader.d.ts} +9 -7
- package/cjs/Calendar/{Header.js → CalendarHeader.js} +4 -4
- package/cjs/Calendar/MonthDropdown.d.ts +0 -1
- package/cjs/Calendar/MonthDropdown.js +40 -27
- package/cjs/Calendar/Table.js +1 -1
- package/cjs/Calendar/TableHeaderRow.js +1 -1
- package/cjs/Calendar/TableRow.js +1 -1
- package/cjs/Calendar/index.d.ts +6 -5
- package/cjs/Calendar/index.js +8 -7
- package/cjs/Calendar/useCalendarState.d.ts +11 -0
- package/cjs/Calendar/useCalendarState.js +39 -0
- package/cjs/Carousel/index.js +0 -0
- package/cjs/Cascader/Cascader.d.ts +2 -2
- package/cjs/Cascader/DropdownMenu.js +2 -5
- package/cjs/Cascader/index.js +0 -0
- package/cjs/CheckPicker/CheckPicker.d.ts +2 -2
- package/cjs/CheckPicker/CheckPicker.js +1 -4
- package/cjs/CheckPicker/index.js +0 -0
- package/cjs/CheckTreePicker/CheckTreePicker.js +31 -31
- package/cjs/CheckTreePicker/index.js +0 -0
- 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/DatePicker/DatePicker.js +10 -47
- package/cjs/DatePicker/index.js +0 -0
- package/cjs/DatePicker/utils.d.ts +1 -8
- package/cjs/DatePicker/utils.js +24 -64
- package/cjs/DateRangePicker/Calendar.d.ts +1 -1
- package/cjs/DateRangePicker/Calendar.js +2 -17
- package/cjs/DateRangePicker/DateRangePicker.js +3 -3
- package/cjs/DateRangePicker/disabledDateUtils.js +0 -0
- package/cjs/DateRangePicker/utils.d.ts +1 -3
- package/cjs/DateRangePicker/utils.js +14 -42
- 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/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 +1 -4
- package/cjs/InputPicker/index.js +0 -0
- package/cjs/List/ListItem.d.ts +1 -0
- package/cjs/List/ListItem.js +5 -2
- 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 +2 -5
- package/cjs/MultiCascader/index.js +0 -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 +10 -16
- package/cjs/Navbar/NavbarHeader.js +0 -0
- package/cjs/Notification/index.js +0 -0
- package/cjs/Overlay/OverlayTrigger.d.ts +2 -2
- 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 +1 -2
- package/cjs/Picker/DropdownMenu.js +33 -39
- package/cjs/Picker/PickerOverlay.d.ts +2 -2
- package/cjs/Picker/PickerToggleTrigger.d.ts +2 -2
- package/cjs/Picker/VirtualizedList.d.ts +37 -0
- package/cjs/Picker/VirtualizedList.js +15 -0
- package/cjs/Picker/index.d.ts +3 -3
- package/cjs/Picker/types.d.ts +5 -7
- package/cjs/Picker/utils.d.ts +12 -11
- package/cjs/Picker/utils.js +0 -4
- 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 +5 -4
- package/cjs/SelectPicker/SelectPicker.js +1 -4
- 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/Stack/Stack.js +1 -1
- 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 +5 -2
- package/cjs/Tree/index.js +0 -0
- package/cjs/TreePicker/TreePicker.js +34 -34
- package/cjs/TreePicker/index.js +0 -0
- package/cjs/TreePicker/test/TreePicker.test.js +0 -14
- package/cjs/Whisper/Whisper.d.ts +3 -3
- package/cjs/Whisper/index.js +0 -0
- package/cjs/index.d.ts +1 -2
- 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 +1 -2
- package/cjs/toaster/ToastContainer.js +26 -27
- package/cjs/toaster/toaster.d.ts +1 -1
- package/cjs/toaster/toaster.js +13 -43
- package/cjs/toaster/useToaster.d.ts +1 -1
- package/cjs/utils/BrowserDetection.d.ts +7 -0
- package/cjs/utils/BrowserDetection.js +52 -2
- package/cjs/utils/clone.js +0 -0
- package/cjs/utils/dateUtils.d.ts +4 -4
- package/cjs/utils/dateUtils.js +9 -9
- 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 +0 -1
- package/cjs/utils/index.js +1 -6
- package/cjs/utils/isOneOf.js +0 -0
- package/cjs/utils/prefix.js +0 -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 +2 -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/useToggleCaret.js +0 -0
- package/cjs/utils/useUniqueId.js +2 -10
- 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 +43 -20
- package/dist/rsuite-rtl.min.css +1 -1
- package/dist/rsuite-rtl.min.css.map +1 -1
- package/dist/rsuite.css +43 -20
- package/dist/rsuite.js +562 -302
- 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 +0 -2
- 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/Calendar.d.ts +20 -55
- package/esm/Calendar/Calendar.js +82 -154
- package/esm/Calendar/CalendarBody.d.ts +4 -0
- package/esm/Calendar/{View.js → CalendarBody.js} +5 -5
- package/esm/Calendar/CalendarContainer.d.ts +61 -0
- package/esm/Calendar/CalendarContainer.js +208 -0
- package/{cjs/Calendar/Header.d.ts → esm/Calendar/CalendarHeader.d.ts} +9 -7
- package/esm/Calendar/{Header.js → CalendarHeader.js} +4 -4
- package/esm/Calendar/MonthDropdown.d.ts +0 -1
- package/esm/Calendar/MonthDropdown.js +41 -26
- package/esm/Calendar/Table.js +1 -1
- package/esm/Calendar/TableHeaderRow.js +1 -1
- package/esm/Calendar/TableRow.js +1 -1
- package/esm/Calendar/index.d.ts +6 -5
- package/esm/Calendar/index.js +5 -4
- package/esm/Calendar/useCalendarState.d.ts +11 -0
- package/esm/Calendar/useCalendarState.js +31 -0
- package/esm/Carousel/index.js +0 -0
- package/esm/Cascader/Cascader.d.ts +2 -2
- package/esm/Cascader/DropdownMenu.js +2 -5
- package/esm/Cascader/index.js +0 -0
- package/esm/CheckPicker/CheckPicker.d.ts +2 -2
- package/esm/CheckPicker/CheckPicker.js +1 -4
- package/esm/CheckPicker/index.js +0 -0
- package/esm/CheckTreePicker/CheckTreePicker.js +30 -31
- package/esm/CheckTreePicker/index.js +0 -0
- 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/DatePicker/DatePicker.js +10 -46
- package/esm/DatePicker/index.js +0 -0
- package/esm/DatePicker/utils.d.ts +1 -8
- package/esm/DatePicker/utils.js +23 -57
- package/esm/DateRangePicker/Calendar.d.ts +1 -1
- package/esm/DateRangePicker/Calendar.js +2 -16
- package/esm/DateRangePicker/DateRangePicker.js +5 -5
- package/esm/DateRangePicker/disabledDateUtils.js +0 -0
- package/esm/DateRangePicker/utils.d.ts +1 -3
- package/esm/DateRangePicker/utils.js +13 -33
- 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/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 +1 -4
- package/esm/InputPicker/index.js +0 -0
- package/esm/List/ListItem.d.ts +1 -0
- package/esm/List/ListItem.js +5 -2
- 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 +2 -5
- package/esm/MultiCascader/index.js +0 -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 +8 -14
- package/esm/Navbar/NavbarHeader.js +0 -0
- package/esm/Notification/index.js +0 -0
- package/esm/Overlay/OverlayTrigger.d.ts +2 -2
- 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 +1 -2
- package/esm/Picker/DropdownMenu.js +35 -39
- package/esm/Picker/PickerOverlay.d.ts +2 -2
- package/esm/Picker/PickerToggleTrigger.d.ts +2 -2
- package/esm/Picker/VirtualizedList.d.ts +37 -0
- package/esm/Picker/VirtualizedList.js +4 -0
- package/esm/Picker/index.d.ts +3 -3
- package/esm/Picker/types.d.ts +5 -7
- package/esm/Picker/utils.d.ts +12 -11
- package/esm/Picker/utils.js +0 -4
- 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 +5 -4
- package/esm/SelectPicker/SelectPicker.js +1 -4
- 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/Stack/Stack.js +2 -2
- 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 +5 -2
- package/esm/Tree/index.js +0 -0
- package/esm/TreePicker/TreePicker.js +32 -33
- package/esm/TreePicker/index.js +0 -0
- package/esm/TreePicker/test/TreePicker.test.js +0 -14
- package/esm/Whisper/Whisper.d.ts +3 -3
- package/esm/Whisper/index.js +0 -0
- package/esm/index.d.ts +1 -2
- 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 +1 -2
- package/esm/toaster/ToastContainer.js +26 -28
- package/esm/toaster/toaster.d.ts +1 -1
- package/esm/toaster/toaster.js +13 -41
- package/esm/toaster/useToaster.d.ts +1 -1
- package/esm/utils/BrowserDetection.d.ts +7 -0
- package/esm/utils/BrowserDetection.js +41 -0
- package/esm/utils/clone.js +0 -0
- package/esm/utils/dateUtils.d.ts +4 -4
- package/esm/utils/dateUtils.js +4 -4
- 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 +0 -1
- package/esm/utils/index.js +0 -1
- package/esm/utils/isOneOf.js +0 -0
- package/esm/utils/prefix.js +0 -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 +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/useToggleCaret.js +0 -0
- package/esm/utils/useUniqueId.js +2 -7
- package/esm/utils/useUpdateEffect.js +0 -0
- package/esm/utils/useUpdatedRef.js +0 -0
- package/esm/utils/useWillUnmount.js +0 -0
- package/package.json +4 -4
- 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
- package/Windowing/package.json +0 -7
- package/cjs/Calendar/CalendarPanel.d.ts +0 -26
- package/cjs/Calendar/CalendarPanel.js +0 -139
- package/cjs/Calendar/View.d.ts +0 -4
- package/cjs/Windowing/AutoSizer.d.ts +0 -25
- package/cjs/Windowing/AutoSizer.js +0 -107
- package/cjs/Windowing/List.d.ts +0 -45
- package/cjs/Windowing/List.js +0 -72
- package/cjs/Windowing/index.d.ts +0 -5
- package/cjs/Windowing/index.js +0 -19
- package/cjs/utils/render.d.ts +0 -3
- package/cjs/utils/render.js +0 -49
- package/esm/Calendar/CalendarPanel.d.ts +0 -26
- package/esm/Calendar/CalendarPanel.js +0 -119
- package/esm/Calendar/View.d.ts +0 -4
- package/esm/Windowing/AutoSizer.d.ts +0 -25
- package/esm/Windowing/AutoSizer.js +0 -92
- package/esm/Windowing/List.d.ts +0 -45
- package/esm/Windowing/List.js +0 -58
- package/esm/Windowing/index.d.ts +0 -5
- package/esm/Windowing/index.js +0 -3
- package/esm/utils/render.d.ts +0 -3
- package/esm/utils/render.js +0 -37
package/cjs/Steps/index.js
CHANGED
|
File without changes
|
package/cjs/Table/index.js
CHANGED
|
File without changes
|
package/cjs/Tag/Tag.js
CHANGED
|
File without changes
|
package/cjs/Tag/index.js
CHANGED
|
File without changes
|
package/cjs/TagGroup/TagGroup.js
CHANGED
|
File without changes
|
package/cjs/TagGroup/index.js
CHANGED
|
File without changes
|
package/cjs/Timeline/index.js
CHANGED
|
File without changes
|
package/cjs/Toggle/index.js
CHANGED
|
File without changes
|
package/cjs/Tooltip/index.js
CHANGED
|
File without changes
|
package/cjs/Tree/Tree.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StandardProps, ItemDataType, RsRefForwardingComponent } from '../@types/common';
|
|
3
|
-
import { ListProps } from '../
|
|
3
|
+
import { ListProps } from '../Picker/VirtualizedList';
|
|
4
4
|
/**
|
|
5
5
|
* Tree Node Drag Type
|
|
6
6
|
*/
|
|
@@ -46,7 +46,10 @@ export interface TreeBaseProps<ValueType = string | number, ItemDataType = Recor
|
|
|
46
46
|
showIndentLine?: boolean;
|
|
47
47
|
/** Whether using virtualized list */
|
|
48
48
|
virtualized?: boolean;
|
|
49
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* List-related properties in `react-virtualized`
|
|
51
|
+
* https://github.com/bvaughn/react-virtualized/blob/master/docs/List.md#prop-types
|
|
52
|
+
*/
|
|
50
53
|
listProps?: Partial<ListProps>;
|
|
51
54
|
/** Expand all nodes By default */
|
|
52
55
|
defaultExpandAll?: boolean;
|
package/cjs/Tree/index.js
CHANGED
|
File without changes
|
|
@@ -25,7 +25,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
25
25
|
|
|
26
26
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _VirtualizedList = require("../Picker/VirtualizedList");
|
|
29
29
|
|
|
30
30
|
var _TreeNode = _interopRequireDefault(require("./TreeNode"));
|
|
31
31
|
|
|
@@ -42,10 +42,6 @@ var maxTreeHeight = 320;
|
|
|
42
42
|
exports.maxTreeHeight = maxTreeHeight;
|
|
43
43
|
var emptyArray = [];
|
|
44
44
|
|
|
45
|
-
var itemSize = function itemSize() {
|
|
46
|
-
return 36;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
45
|
var TreePicker = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
50
46
|
var _props$as = props.as,
|
|
51
47
|
Component = _props$as === void 0 ? 'div' : _props$as,
|
|
@@ -601,30 +597,33 @@ var TreePicker = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
601
597
|
}, nodeProps));
|
|
602
598
|
};
|
|
603
599
|
|
|
604
|
-
var renderVirtualListNode = function renderVirtualListNode(
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
var nodeProps = (0, _extends2.default)({}, getTreeNodeProps((0, _extends2.default)({}, node, {
|
|
618
|
-
expand: expand
|
|
619
|
-
}), layer), {
|
|
620
|
-
style: style,
|
|
621
|
-
hasChildren: node.hasChildren
|
|
622
|
-
});
|
|
623
|
-
return visible && /*#__PURE__*/_react.default.createElement(_TreeNode.default, (0, _extends2.default)({
|
|
624
|
-
ref: function ref(_ref4) {
|
|
625
|
-
return saveTreeNodeRef(_ref4, node.refKey);
|
|
600
|
+
var renderVirtualListNode = function renderVirtualListNode(nodes) {
|
|
601
|
+
return function (_ref3) {
|
|
602
|
+
var key = _ref3.key,
|
|
603
|
+
index = _ref3.index,
|
|
604
|
+
style = _ref3.style;
|
|
605
|
+
var node = nodes[index];
|
|
606
|
+
var layer = node.layer,
|
|
607
|
+
visible = node.visible;
|
|
608
|
+
var expand = (0, _treeUtils.getExpandWhenSearching)(searchKeywordState, expandItemValues.includes(node[valueKey]));
|
|
609
|
+
|
|
610
|
+
if (!node.visible) {
|
|
611
|
+
return null;
|
|
626
612
|
}
|
|
627
|
-
|
|
613
|
+
|
|
614
|
+
var nodeProps = (0, _extends2.default)({}, getTreeNodeProps((0, _extends2.default)({}, node, {
|
|
615
|
+
expand: expand
|
|
616
|
+
}), layer), {
|
|
617
|
+
style: style,
|
|
618
|
+
hasChildren: node.hasChildren
|
|
619
|
+
});
|
|
620
|
+
return visible && /*#__PURE__*/_react.default.createElement(_TreeNode.default, (0, _extends2.default)({
|
|
621
|
+
ref: function ref(_ref4) {
|
|
622
|
+
return saveTreeNodeRef(_ref4, node.refKey);
|
|
623
|
+
},
|
|
624
|
+
key: key
|
|
625
|
+
}, nodeProps));
|
|
626
|
+
};
|
|
628
627
|
};
|
|
629
628
|
|
|
630
629
|
var renderTree = function renderTree() {
|
|
@@ -644,7 +643,7 @@ var TreePicker = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
644
643
|
onKeyDown: inline ? handleTreeKeyDown : undefined
|
|
645
644
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
646
645
|
className: treePrefix('nodes')
|
|
647
|
-
}, virtualized ? /*#__PURE__*/_react.default.createElement(
|
|
646
|
+
}, virtualized ? /*#__PURE__*/_react.default.createElement(_VirtualizedList.AutoSizer, {
|
|
648
647
|
defaultHeight: inline ? height : maxTreeHeight,
|
|
649
648
|
style: {
|
|
650
649
|
width: 'auto',
|
|
@@ -653,14 +652,15 @@ var TreePicker = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
653
652
|
}, function (_ref5) {
|
|
654
653
|
var height = _ref5.height,
|
|
655
654
|
width = _ref5.width;
|
|
656
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
655
|
+
return /*#__PURE__*/_react.default.createElement(_VirtualizedList.List, (0, _extends2.default)({
|
|
657
656
|
ref: listRef,
|
|
658
657
|
width: width,
|
|
659
658
|
height: height,
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
659
|
+
rowHeight: 36,
|
|
660
|
+
rowCount: formattedNodes.length,
|
|
661
|
+
rowRenderer: renderVirtualListNode(formattedNodes),
|
|
662
|
+
scrollToAlignment: "center"
|
|
663
|
+
}, listProps));
|
|
664
664
|
}) : formattedNodes));
|
|
665
665
|
};
|
|
666
666
|
|
package/cjs/TreePicker/index.js
CHANGED
|
File without changes
|
|
@@ -12,18 +12,4 @@ _react.default.createElement(_TreePicker.default, {
|
|
|
12
12
|
return /*#__PURE__*/_react.default.createElement("div", null);
|
|
13
13
|
},
|
|
14
14
|
data: []
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
/*#__PURE__*/
|
|
18
|
-
_react.default.createElement(_TreePicker.default, {
|
|
19
|
-
data: [],
|
|
20
|
-
listProps: {
|
|
21
|
-
itemSize: 30,
|
|
22
|
-
onItemsRendered: function onItemsRendered() {
|
|
23
|
-
console.log('onItemsRendered');
|
|
24
|
-
},
|
|
25
|
-
onScroll: function onScroll() {
|
|
26
|
-
console.log('onScroll');
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
15
|
});
|
package/cjs/Whisper/Whisper.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { OverlayTriggerInstance } from '../Overlay/OverlayTrigger';
|
|
3
3
|
import { OverlayTriggerProps } from '../Overlay/OverlayTrigger';
|
|
4
4
|
export declare type WhisperProps = OverlayTriggerProps;
|
|
5
|
-
export declare type WhisperInstance =
|
|
6
|
-
declare const Whisper: React.ForwardRefExoticComponent<OverlayTriggerProps & React.RefAttributes<
|
|
5
|
+
export declare type WhisperInstance = OverlayTriggerInstance;
|
|
6
|
+
declare const Whisper: React.ForwardRefExoticComponent<OverlayTriggerProps & React.RefAttributes<OverlayTriggerInstance>>;
|
|
7
7
|
export default Whisper;
|
package/cjs/Whisper/index.js
CHANGED
|
File without changes
|
package/cjs/index.d.ts
CHANGED
|
@@ -121,7 +121,7 @@ export type { TagGroupProps } from './TagGroup';
|
|
|
121
121
|
export { default as List } from './List';
|
|
122
122
|
export type { ListProps, ListItemProps } from './List';
|
|
123
123
|
export { default as Calendar } from './Calendar';
|
|
124
|
-
export type {
|
|
124
|
+
export type { CalendarProps } from './Calendar';
|
|
125
125
|
export { default as Carousel } from './Carousel';
|
|
126
126
|
export type { CarouselProps } from './Carousel';
|
|
127
127
|
export { default as Grid } from './Grid';
|
|
@@ -155,4 +155,3 @@ export type { AffixProps } from './Affix';
|
|
|
155
155
|
export { default as CustomProvider } from './CustomProvider';
|
|
156
156
|
export type { CustomProviderProps } from './CustomProvider';
|
|
157
157
|
export type { Locale, CalendarLocale, PlaintextLocale, PaginationLocale, TableLocale, DatePickerLocale, DateRangePickerLocale, PickerLocale, InputPickerLocale, UploaderLocale, BreadcrumbLocale, ToggleLocale } from './locales';
|
|
158
|
-
export type { PickerHandle } from './Picker';
|
package/cjs/locales/ar_EG.js
CHANGED
|
File without changes
|
package/cjs/locales/da_DK.js
CHANGED
|
File without changes
|
package/cjs/locales/de_DE.js
CHANGED
|
File without changes
|
package/cjs/locales/default.js
CHANGED
|
File without changes
|
package/cjs/locales/en_GB.js
CHANGED
|
File without changes
|
package/cjs/locales/en_US.js
CHANGED
|
File without changes
|
package/cjs/locales/es_AR.js
CHANGED
|
File without changes
|
package/cjs/locales/es_ES.js
CHANGED
|
File without changes
|
package/cjs/locales/fi_FI.js
CHANGED
|
File without changes
|
package/cjs/locales/it_IT.js
CHANGED
|
File without changes
|
package/cjs/locales/ko_KR.js
CHANGED
|
File without changes
|
package/cjs/locales/pt_BR.js
CHANGED
|
File without changes
|
package/cjs/locales/ru_RU.js
CHANGED
|
File without changes
|
package/cjs/locales/sv_SE.js
CHANGED
|
File without changes
|
package/cjs/locales/zh_CN.js
CHANGED
|
File without changes
|
package/cjs/locales/zh_TW.js
CHANGED
|
File without changes
|
|
@@ -7,7 +7,6 @@ export interface ToastContainerProps extends WithAsProps {
|
|
|
7
7
|
placement?: PlacementType;
|
|
8
8
|
/** Set the message to appear in the specified container */
|
|
9
9
|
container?: HTMLElement | (() => HTMLElement);
|
|
10
|
-
callback?: (ref: React.RefObject<ToastContainerInstance>) => void;
|
|
11
10
|
}
|
|
12
11
|
export interface ToastContainerInstance {
|
|
13
12
|
root: HTMLElement;
|
|
@@ -20,7 +19,7 @@ export interface NodeProps extends WithAsProps {
|
|
|
20
19
|
onClose?: (event?: React.MouseEvent<HTMLDivElement>) => void;
|
|
21
20
|
}
|
|
22
21
|
interface ToastContainerComponent extends RsRefForwardingComponent<'div', ToastContainerProps> {
|
|
23
|
-
getInstance: (props: ToastContainerProps) =>
|
|
22
|
+
getInstance: (props: ToastContainerProps) => [React.RefObject<ToastContainerInstance>, () => void];
|
|
24
23
|
}
|
|
25
24
|
declare const ToastContainer: ToastContainerComponent;
|
|
26
25
|
export default ToastContainer;
|
|
@@ -13,6 +13,8 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
13
13
|
|
|
14
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
15
|
|
|
16
|
+
var _reactDom = require("react-dom");
|
|
17
|
+
|
|
16
18
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
17
19
|
|
|
18
20
|
var _kebabCase = _interopRequireDefault(require("lodash/kebabCase"));
|
|
@@ -38,15 +40,13 @@ var useMessages = function useMessages() {
|
|
|
38
40
|
}, [messages]);
|
|
39
41
|
var push = (0, _react.useCallback)(function (message) {
|
|
40
42
|
var key = (0, _utils.guid)();
|
|
41
|
-
setMessages(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}]);
|
|
47
|
-
});
|
|
43
|
+
setMessages([].concat(messages, [{
|
|
44
|
+
key: key,
|
|
45
|
+
visible: true,
|
|
46
|
+
node: message
|
|
47
|
+
}]));
|
|
48
48
|
return key;
|
|
49
|
-
}, []);
|
|
49
|
+
}, [messages]);
|
|
50
50
|
var clear = (0, _react.useCallback)(function () {
|
|
51
51
|
// Set all existing messages to be invisible.
|
|
52
52
|
setMessages(messages.map(function (msg) {
|
|
@@ -93,8 +93,7 @@ var ToastContainer = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
93
93
|
classPrefix = _props$classPrefix === void 0 ? 'toast-container' : _props$classPrefix,
|
|
94
94
|
_props$placement = props.placement,
|
|
95
95
|
placement = _props$placement === void 0 ? 'topCenter' : _props$placement,
|
|
96
|
-
|
|
97
|
-
rest = (0, _objectWithoutPropertiesLoose2.default)(props, ["as", "className", "classPrefix", "placement", "callback"]);
|
|
96
|
+
rest = (0, _objectWithoutPropertiesLoose2.default)(props, ["as", "className", "classPrefix", "placement"]);
|
|
98
97
|
|
|
99
98
|
var _useClassNames = (0, _utils.useClassNames)(classPrefix),
|
|
100
99
|
withClassPrefix = _useClassNames.withClassPrefix,
|
|
@@ -142,10 +141,7 @@ var ToastContainer = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
142
141
|
});
|
|
143
142
|
});
|
|
144
143
|
return /*#__PURE__*/_react.default.createElement(Component, (0, _extends2.default)({}, rest, {
|
|
145
|
-
ref:
|
|
146
|
-
rootRef.current = selfRef;
|
|
147
|
-
callback === null || callback === void 0 ? void 0 : callback(selfRef);
|
|
148
|
-
},
|
|
144
|
+
ref: rootRef,
|
|
149
145
|
className: classes
|
|
150
146
|
}), elements);
|
|
151
147
|
});
|
|
@@ -156,18 +152,22 @@ ToastContainer.getInstance = function (props) {
|
|
|
156
152
|
|
|
157
153
|
var containerRef = /*#__PURE__*/_react.default.createRef();
|
|
158
154
|
|
|
159
|
-
var
|
|
160
|
-
|
|
161
|
-
var renderCallback = function renderCallback() {
|
|
162
|
-
resolve([containerRef, unmount]);
|
|
163
|
-
};
|
|
155
|
+
var mountElement = document.createElement('div');
|
|
156
|
+
var containerElement = typeof container === 'function' ? container() : container; // Parent is document.body or the existing dom element
|
|
164
157
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
158
|
+
var parentElement = containerElement || document.body; // Add the detached element to the parent
|
|
159
|
+
|
|
160
|
+
parentElement.appendChild(mountElement);
|
|
161
|
+
|
|
162
|
+
function destroy() {
|
|
163
|
+
(0, _reactDom.unmountComponentAtNode)(mountElement);
|
|
164
|
+
parentElement.removeChild(mountElement);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
(0, _reactDom.render)( /*#__PURE__*/_react.default.createElement(ToastContainer, (0, _extends2.default)({}, rest, {
|
|
168
|
+
ref: containerRef
|
|
169
|
+
})), mountElement);
|
|
170
|
+
return [containerRef, destroy];
|
|
171
171
|
};
|
|
172
172
|
|
|
173
173
|
ToastContainer.displayName = 'ToastContainer';
|
|
@@ -175,8 +175,7 @@ ToastContainer.propTypes = {
|
|
|
175
175
|
className: _propTypes.default.string,
|
|
176
176
|
classPrefix: _propTypes.default.string,
|
|
177
177
|
placement: _propTypes.default.elementType,
|
|
178
|
-
container: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func])
|
|
179
|
-
callback: _propTypes.default.func
|
|
178
|
+
container: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func])
|
|
180
179
|
};
|
|
181
180
|
var _default = ToastContainer;
|
|
182
181
|
exports.default = _default;
|
package/cjs/toaster/toaster.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export interface Toaster {
|
|
|
7
7
|
* @param message
|
|
8
8
|
* @param options
|
|
9
9
|
*/
|
|
10
|
-
push(message: React.ReactNode, options?: ToastContainerProps): string | undefined
|
|
10
|
+
push(message: React.ReactNode, options?: ToastContainerProps): string | undefined;
|
|
11
11
|
/**
|
|
12
12
|
* Remove a message by key
|
|
13
13
|
* @param key
|
package/cjs/toaster/toaster.js
CHANGED
|
@@ -5,10 +5,6 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
exports.__esModule = true;
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
|
-
|
|
10
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
|
-
|
|
12
8
|
var _ToastContainer = _interopRequireDefault(require("./ToastContainer"));
|
|
13
9
|
|
|
14
10
|
var defaultContainerId = 'default';
|
|
@@ -19,8 +15,12 @@ var containers = new Map();
|
|
|
19
15
|
* @param options
|
|
20
16
|
*/
|
|
21
17
|
|
|
22
|
-
function createContainer(
|
|
23
|
-
|
|
18
|
+
function createContainer(containerId, props) {
|
|
19
|
+
var _ToastContainer$getIn = _ToastContainer.default.getInstance(props),
|
|
20
|
+
container = _ToastContainer$getIn[0];
|
|
21
|
+
|
|
22
|
+
containers.set(containerId || defaultContainerId, container);
|
|
23
|
+
return container;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* Get the container by ID. Use default ID when ID is not available.
|
|
@@ -28,33 +28,6 @@ function createContainer(_x, _x2) {
|
|
|
28
28
|
*/
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
function _createContainer() {
|
|
32
|
-
_createContainer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(containerId, props) {
|
|
33
|
-
var _yield$ToastContainer, container;
|
|
34
|
-
|
|
35
|
-
return _regenerator.default.wrap(function _callee$(_context) {
|
|
36
|
-
while (1) {
|
|
37
|
-
switch (_context.prev = _context.next) {
|
|
38
|
-
case 0:
|
|
39
|
-
_context.next = 2;
|
|
40
|
-
return _ToastContainer.default.getInstance(props);
|
|
41
|
-
|
|
42
|
-
case 2:
|
|
43
|
-
_yield$ToastContainer = _context.sent;
|
|
44
|
-
container = _yield$ToastContainer[0];
|
|
45
|
-
containers.set(containerId || defaultContainerId, container);
|
|
46
|
-
return _context.abrupt("return", container);
|
|
47
|
-
|
|
48
|
-
case 6:
|
|
49
|
-
case "end":
|
|
50
|
-
return _context.stop();
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}, _callee);
|
|
54
|
-
}));
|
|
55
|
-
return _createContainer.apply(this, arguments);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
31
|
function getContainer(containerId) {
|
|
59
32
|
if (containers.size == 0) {
|
|
60
33
|
return null;
|
|
@@ -68,24 +41,21 @@ var toaster = function toaster(message) {
|
|
|
68
41
|
};
|
|
69
42
|
|
|
70
43
|
toaster.push = function (message, options) {
|
|
71
|
-
var
|
|
44
|
+
var _container$current;
|
|
72
45
|
|
|
73
46
|
if (options === void 0) {
|
|
74
47
|
options = {};
|
|
75
48
|
}
|
|
76
49
|
|
|
77
|
-
var
|
|
78
|
-
var container = getContainer(containerId);
|
|
50
|
+
var container = getContainer(options.placement);
|
|
79
51
|
|
|
80
|
-
if (container
|
|
81
|
-
|
|
82
|
-
}
|
|
52
|
+
if (!container) {
|
|
53
|
+
var _options$placement;
|
|
83
54
|
|
|
84
|
-
|
|
85
|
-
|
|
55
|
+
container = createContainer((_options$placement = options.placement) !== null && _options$placement !== void 0 ? _options$placement : '', options);
|
|
56
|
+
}
|
|
86
57
|
|
|
87
|
-
|
|
88
|
-
});
|
|
58
|
+
return (_container$current = container.current) === null || _container$current === void 0 ? void 0 : _container$current.push(message);
|
|
89
59
|
};
|
|
90
60
|
|
|
91
61
|
toaster.remove = function (key) {
|
|
@@ -5,7 +5,7 @@ import { ToastContainerProps } from './ToastContainer';
|
|
|
5
5
|
* @returns toaster { push, remove, clear }
|
|
6
6
|
*/
|
|
7
7
|
declare const useToaster: () => {
|
|
8
|
-
push: (message: React.ReactNode, options?: ToastContainerProps) => string |
|
|
8
|
+
push: (message: React.ReactNode, options?: ToastContainerProps) => string | undefined;
|
|
9
9
|
remove: (key: string) => void;
|
|
10
10
|
clear: () => void;
|
|
11
11
|
};
|
|
@@ -2,3 +2,10 @@ export declare const isIE: () => boolean;
|
|
|
2
2
|
export declare const isIE10: () => boolean;
|
|
3
3
|
export declare const isIE11: () => boolean;
|
|
4
4
|
export declare const isEdge: () => boolean;
|
|
5
|
+
export declare const getChromeVersion: () => number | false;
|
|
6
|
+
export declare const getSafariVersion: () => number | false;
|
|
7
|
+
/**
|
|
8
|
+
* flexbox-gap compatibility
|
|
9
|
+
* @see https://caniuse.com/flexbox-gap
|
|
10
|
+
*/
|
|
11
|
+
export declare const isSupportFlexGap: () => boolean;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
5
|
exports.__esModule = true;
|
|
6
|
-
exports.isEdge = exports.isIE11 = exports.isIE10 = exports.isIE = void 0;
|
|
6
|
+
exports.isSupportFlexGap = exports.getSafariVersion = exports.getChromeVersion = exports.isEdge = exports.isIE11 = exports.isIE10 = exports.isIE = void 0;
|
|
7
7
|
|
|
8
8
|
var _canUseDOM = _interopRequireDefault(require("dom-lib/canUseDOM"));
|
|
9
9
|
|
|
@@ -32,4 +32,54 @@ var isEdge = function isEdge() {
|
|
|
32
32
|
return _canUseDOM.default && !isIE() && 'styleMedia' in window;
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
-
exports.isEdge = isEdge;
|
|
35
|
+
exports.isEdge = isEdge;
|
|
36
|
+
|
|
37
|
+
var getChromeVersion = function getChromeVersion() {
|
|
38
|
+
if (_canUseDOM.default) {
|
|
39
|
+
var match = window.navigator.userAgent.match(/Chrom(e|ium)\/([\d\.]+)\./);
|
|
40
|
+
return match ? parseFloat(match[2]) : false;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return false;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
exports.getChromeVersion = getChromeVersion;
|
|
47
|
+
|
|
48
|
+
var getSafariVersion = function getSafariVersion() {
|
|
49
|
+
if (_canUseDOM.default) {
|
|
50
|
+
var match = window.navigator.userAgent.match(/Version\/([\d\.]+).*Safari/);
|
|
51
|
+
return match ? parseFloat(match[1]) : false;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return false;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* flexbox-gap compatibility
|
|
58
|
+
* @see https://caniuse.com/flexbox-gap
|
|
59
|
+
*/
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
exports.getSafariVersion = getSafariVersion;
|
|
63
|
+
|
|
64
|
+
var isSupportFlexGap = function isSupportFlexGap() {
|
|
65
|
+
if (isIE()) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
var chromeVersion = getChromeVersion();
|
|
70
|
+
var safariVersion = getSafariVersion(); // edge consider as chrome
|
|
71
|
+
|
|
72
|
+
if (chromeVersion) {
|
|
73
|
+
// flex-gap is support in Chrome 84+
|
|
74
|
+
return chromeVersion >= 84;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (safariVersion) {
|
|
78
|
+
// flex-gap is support in Safari 14.1+
|
|
79
|
+
return safariVersion >= 14.1;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return true;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
exports.isSupportFlexGap = isSupportFlexGap;
|
package/cjs/utils/clone.js
CHANGED
|
File without changes
|
package/cjs/utils/dateUtils.d.ts
CHANGED
|
@@ -45,10 +45,10 @@ export declare const calendarOnlyProps: CalendarOnlyPropsType[];
|
|
|
45
45
|
*/
|
|
46
46
|
export declare function disabledTime(props: any, date: Date): boolean;
|
|
47
47
|
export declare const omitHideDisabledProps: <T extends Record<string, any>>(props: T) => Partial<Omit<T, CalendarOnlyPropsType>>;
|
|
48
|
-
export declare const
|
|
49
|
-
export declare const
|
|
50
|
-
export declare const
|
|
51
|
-
export declare const
|
|
48
|
+
export declare const shouldRenderTime: (format: string) => boolean;
|
|
49
|
+
export declare const shouldRenderMonth: (format: string) => boolean;
|
|
50
|
+
export declare const shouldRenderDate: (format: string) => boolean;
|
|
51
|
+
export declare const shouldOnlyRenderTime: (format: string) => boolean;
|
|
52
52
|
/**
|
|
53
53
|
* Get all weeks of this month
|
|
54
54
|
* @params monthDate
|
package/cjs/utils/dateUtils.js
CHANGED
|
@@ -6,7 +6,7 @@ exports.__esModule = true;
|
|
|
6
6
|
exports.disabledTime = disabledTime;
|
|
7
7
|
exports.getMonthView = getMonthView;
|
|
8
8
|
exports.getDateMask = getDateMask;
|
|
9
|
-
exports.
|
|
9
|
+
exports.shouldOnlyRenderTime = exports.shouldRenderDate = exports.shouldRenderMonth = exports.shouldRenderTime = exports.omitHideDisabledProps = exports.calendarOnlyProps = exports.set = exports.isValid = exports.isMatch = exports.subDays = exports.startOfWeek = exports.startOfMonth = exports.startOfISOWeek = exports.startOfDay = exports.setYear = exports.setSeconds = exports.setMonth = exports.setMinutes = exports.setHours = exports.setDate = exports.parseISO = exports.parse = exports.isSameSecond = exports.isSameMonth = exports.isSameDay = exports.isEqual = exports.isBefore = exports.isAfter = exports.getYear = exports.getSeconds = exports.getMonth = exports.getMinutes = exports.getHours = exports.getDaysInMonth = exports.getDay = exports.getDate = exports.format = exports.endOfWeek = exports.endOfMonth = exports.endOfISOWeek = exports.endOfDay = exports.compareAsc = exports.addMonths = exports.addDays = void 0;
|
|
10
10
|
|
|
11
11
|
var _pick = _interopRequireDefault(require("lodash/pick"));
|
|
12
12
|
|
|
@@ -209,26 +209,26 @@ var omitHideDisabledProps = function omitHideDisabledProps(props) {
|
|
|
209
209
|
|
|
210
210
|
exports.omitHideDisabledProps = omitHideDisabledProps;
|
|
211
211
|
|
|
212
|
-
var
|
|
212
|
+
var shouldRenderTime = function shouldRenderTime(format) {
|
|
213
213
|
return /([Hhms])/.test(format);
|
|
214
214
|
};
|
|
215
215
|
|
|
216
|
-
exports.
|
|
216
|
+
exports.shouldRenderTime = shouldRenderTime;
|
|
217
217
|
|
|
218
|
-
var
|
|
218
|
+
var shouldRenderMonth = function shouldRenderMonth(format) {
|
|
219
219
|
return /[Yy]/.test(format) && /[ML]/.test(format);
|
|
220
220
|
};
|
|
221
221
|
|
|
222
|
-
exports.
|
|
222
|
+
exports.shouldRenderMonth = shouldRenderMonth;
|
|
223
223
|
|
|
224
|
-
var
|
|
224
|
+
var shouldRenderDate = function shouldRenderDate(format) {
|
|
225
225
|
return /[Yy]/.test(format) && /[ML]/.test(format) && /[Dd]/.test(format);
|
|
226
226
|
}; // for date-fns v1 and v2
|
|
227
227
|
|
|
228
228
|
|
|
229
|
-
exports.
|
|
229
|
+
exports.shouldRenderDate = shouldRenderDate;
|
|
230
230
|
|
|
231
|
-
var
|
|
231
|
+
var shouldOnlyRenderTime = function shouldOnlyRenderTime(format) {
|
|
232
232
|
return /([Hhms])/.test(format) && !/([YyMDd])/.test(format);
|
|
233
233
|
}; // for date-fns v1 and v2
|
|
234
234
|
|
|
@@ -239,7 +239,7 @@ var shouldOnlyTime = function shouldOnlyTime(format) {
|
|
|
239
239
|
*/
|
|
240
240
|
|
|
241
241
|
|
|
242
|
-
exports.
|
|
242
|
+
exports.shouldOnlyRenderTime = shouldOnlyRenderTime;
|
|
243
243
|
|
|
244
244
|
function getMonthView(monthDate, isoWeek) {
|
|
245
245
|
var firstDayOfMonth = (0, _getDay.default)(monthDate);
|
package/cjs/utils/events.js
CHANGED
|
File without changes
|
package/cjs/utils/getDOMNode.js
CHANGED
|
File without changes
|
|
File without changes
|
package/cjs/utils/guid.js
CHANGED
|
File without changes
|
|
File without changes
|
package/cjs/utils/index.d.ts
CHANGED
|
@@ -23,7 +23,6 @@ export { default as composeFunctions } from './composeFunctions';
|
|
|
23
23
|
export { default as reactToString } from './reactToString';
|
|
24
24
|
export { default as scrollTopAnimation } from './scrollTopAnimation';
|
|
25
25
|
export { default as appendTooltip } from './appendTooltip';
|
|
26
|
-
export { default as render } from './render';
|
|
27
26
|
/** Hooks **/
|
|
28
27
|
export { default as useClassNames } from './useClassNames';
|
|
29
28
|
export { default as useEventListener } from './useEventListener';
|