rsuite 5.2.4 → 5.4.2
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/Avatar/styles/index.less +2 -2
- package/AvatarGroup/package.json +7 -0
- package/AvatarGroup/styles/index.less +19 -0
- package/ButtonGroup/styles/index.less +0 -18
- package/CHANGELOG.md +61 -0
- package/CheckTreePicker/styles/index.less +14 -1
- package/Dropdown/styles/index.less +4 -3
- package/Modal/styles/index.less +23 -22
- package/Nav/styles/index.less +1 -0
- package/Navbar/styles/index.less +19 -5
- package/Radio/styles/index.less +6 -0
- package/Sidenav/styles/index.less +2 -2
- package/Stack/package.json +7 -0
- package/Stack/styles/index.less +5 -0
- package/TreePicker/styles/index.less +10 -14
- package/cjs/@types/common.d.ts +13 -12
- package/cjs/@types/utils.d.ts +12 -0
- package/cjs/Affix/Affix.js +8 -6
- package/cjs/Animation/Transition.d.ts +21 -12
- package/cjs/Animation/Transition.js +4 -1
- package/cjs/AutoComplete/AutoComplete.js +1 -1
- package/cjs/AutoComplete/utils.d.ts +1 -1
- package/cjs/Avatar/Avatar.js +10 -3
- package/cjs/AvatarGroup/AvatarGroup.d.ts +15 -0
- package/cjs/AvatarGroup/AvatarGroup.js +76 -0
- package/cjs/AvatarGroup/index.d.ts +3 -0
- package/cjs/AvatarGroup/index.js +11 -0
- package/cjs/Breadcrumb/Breadcrumb.js +1 -1
- package/cjs/Button/Button.js +8 -2
- package/cjs/ButtonGroup/ButtonGroup.js +14 -3
- package/cjs/ButtonGroup/ButtonGroupContext.d.ts +7 -0
- package/cjs/ButtonGroup/ButtonGroupContext.js +13 -0
- package/cjs/ButtonGroup/index.d.ts +2 -0
- package/cjs/ButtonGroup/index.js +3 -0
- package/cjs/Calendar/Calendar.d.ts +4 -4
- package/cjs/Calendar/Calendar.js +26 -22
- package/cjs/Calendar/CalendarContext.js +1 -1
- package/cjs/Calendar/Header.js +1 -3
- package/cjs/Calendar/Table.js +1 -1
- package/cjs/Calendar/TableRow.js +13 -8
- package/cjs/Calendar/TimeDropdown.js +6 -5
- package/cjs/Calendar/View.js +9 -5
- package/cjs/Calendar/types.d.ts +2 -2
- package/cjs/Calendar/useCalendarDate.d.ts +2 -2
- package/cjs/Carousel/Carousel.d.ts +1 -1
- package/cjs/Carousel/Carousel.js +1 -1
- package/cjs/Cascader/Cascader.d.ts +1 -1
- package/cjs/Cascader/Cascader.js +10 -10
- package/cjs/Cascader/DropdownMenu.d.ts +5 -4
- package/cjs/Cascader/utils.d.ts +10 -10
- package/cjs/CheckPicker/CheckPicker.d.ts +9 -4
- package/cjs/CheckPicker/CheckPicker.js +4 -4
- package/cjs/CheckPicker/test/CheckPicker.test.d.ts +1 -0
- package/cjs/CheckPicker/test/CheckPicker.test.js +76 -0
- package/cjs/CheckTree/index.js +6 -5
- package/cjs/CheckTreePicker/CheckTreeNode.d.ts +1 -1
- package/cjs/CheckTreePicker/CheckTreeNode.js +7 -9
- package/cjs/CheckTreePicker/CheckTreePicker.js +29 -25
- package/cjs/CheckTreePicker/utils.d.ts +3 -1
- package/cjs/CheckTreePicker/utils.js +12 -10
- package/cjs/Checkbox/Checkbox.d.ts +1 -1
- package/cjs/Container/Container.js +6 -3
- package/cjs/CustomProvider/CustomProvider.d.ts +31 -57
- package/cjs/DOMHelper/index.d.ts +12 -12
- package/cjs/DatePicker/DatePicker.d.ts +1 -1
- package/cjs/DatePicker/DatePicker.js +19 -11
- package/cjs/DatePicker/Toolbar.d.ts +12 -9
- package/cjs/DatePicker/Toolbar.js +6 -8
- package/cjs/DatePicker/types.d.ts +4 -4
- package/cjs/DatePicker/utils.d.ts +4 -3
- package/cjs/DateRangePicker/Calendar.d.ts +8 -7
- package/cjs/DateRangePicker/Calendar.js +1 -1
- package/cjs/DateRangePicker/DateRangePicker.d.ts +6 -6
- package/cjs/DateRangePicker/DateRangePicker.js +112 -111
- package/cjs/DateRangePicker/types.d.ts +2 -1
- package/cjs/DateRangePicker/utils.d.ts +6 -6
- package/cjs/DateRangePicker/utils.js +7 -2
- package/cjs/Disclosure/Disclosure.d.ts +8 -5
- package/cjs/Disclosure/Disclosure.js +55 -13
- package/cjs/Disclosure/DisclosureButton.d.ts +2 -2
- package/cjs/Disclosure/DisclosureButton.js +9 -7
- package/cjs/Disclosure/DisclosureContent.js +4 -6
- package/cjs/Disclosure/DisclosureContext.d.ts +8 -3
- package/cjs/Disclosure/useDisclosureContext.d.ts +2 -0
- package/cjs/Disclosure/useDisclosureContext.js +20 -0
- package/cjs/Dropdown/Dropdown.d.ts +1 -1
- package/cjs/Dropdown/Dropdown.js +1 -1
- package/cjs/Dropdown/DropdownContext.d.ts +2 -2
- package/cjs/Dropdown/DropdownItem.js +10 -11
- package/cjs/Dropdown/DropdownMenu.d.ts +3 -3
- package/cjs/Dropdown/DropdownMenu.js +81 -23
- package/cjs/Dropdown/DropdownState.d.ts +1 -1
- package/cjs/Dropdown/DropdownToggle.js +10 -2
- package/cjs/Dropdown/useRenderDropdownItem.d.ts +1 -1
- package/cjs/Form/Form.js +1 -1
- package/cjs/Form/FormContext.d.ts +1 -1
- package/cjs/FormControl/FormControl.d.ts +1 -1
- package/cjs/FormControl/FormControl.js +5 -4
- package/cjs/FormGroup/FormGroup.d.ts +1 -1
- package/cjs/FormGroup/FormGroup.js +9 -4
- package/cjs/Input/Input.d.ts +3 -2
- package/cjs/InputGroup/InputGroup.d.ts +1 -1
- package/cjs/InputNumber/InputNumber.js +6 -2
- package/cjs/InputPicker/InputAutosize.js +4 -4
- package/cjs/InputPicker/InputPicker.d.ts +2 -2
- package/cjs/InputPicker/InputPicker.js +15 -10
- package/cjs/List/ListContext.d.ts +1 -1
- package/cjs/List/ListContext.js +8 -1
- package/cjs/List/helper/AutoScroller.js +4 -2
- package/cjs/List/helper/useManager.d.ts +3 -3
- package/cjs/List/helper/useManager.js +1 -1
- package/cjs/List/helper/useSortHelper.d.ts +3 -3
- package/cjs/List/helper/useSortHelper.js +6 -4
- package/cjs/List/helper/utils.d.ts +2 -2
- package/cjs/MaskedInput/TextMask.d.ts +5 -5
- package/cjs/MaskedInput/adjustCaretPosition.d.ts +6 -6
- package/cjs/MaskedInput/conformToMask.js +5 -4
- package/cjs/MaskedInput/createTextMaskInputElement.d.ts +2 -2
- package/cjs/MaskedInput/utilities.d.ts +1 -1
- package/cjs/Menu/Menu.js +14 -7
- package/cjs/Menu/MenuContext.d.ts +1 -1
- package/cjs/Menu/MenuItem.d.ts +1 -1
- package/cjs/Menu/MenuItem.js +19 -15
- package/cjs/Menu/Menubar.js +8 -8
- package/cjs/Menu/useMenu.js +17 -7
- package/cjs/Modal/Modal.js +39 -21
- package/cjs/Modal/ModalContext.d.ts +2 -2
- package/cjs/Modal/utils.d.ts +1 -1
- package/cjs/Modal/utils.js +3 -5
- package/cjs/MultiCascader/DropdownMenu.d.ts +4 -4
- package/cjs/MultiCascader/MultiCascader.js +6 -6
- package/cjs/MultiCascader/utils.d.ts +17 -17
- package/cjs/Nav/Nav.d.ts +1 -1
- package/cjs/Nav/Nav.js +10 -12
- package/cjs/Nav/NavContext.d.ts +7 -1
- package/cjs/Nav/NavContext.js +1 -0
- package/cjs/Nav/NavItem.d.ts +1 -1
- package/cjs/Navbar/Navbar.js +1 -1
- package/cjs/Navbar/NavbarItem.d.ts +1 -1
- package/cjs/Navbar/index.d.ts +1 -0
- package/cjs/Navbar/index.js +4 -3
- package/cjs/Overlay/Modal.d.ts +2 -2
- package/cjs/Overlay/Modal.js +71 -63
- package/cjs/Overlay/ModalManager.d.ts +17 -8
- package/cjs/Overlay/ModalManager.js +11 -20
- package/cjs/Overlay/Overlay.d.ts +3 -3
- package/cjs/Overlay/Overlay.js +8 -2
- package/cjs/Overlay/OverlayContext.d.ts +6 -0
- package/cjs/Overlay/OverlayContext.js +14 -0
- package/cjs/Overlay/OverlayTrigger.d.ts +11 -11
- package/cjs/Overlay/OverlayTrigger.js +21 -7
- package/cjs/Overlay/Position.d.ts +4 -4
- package/cjs/Overlay/Position.js +14 -8
- package/cjs/Overlay/positionUtils.d.ts +1 -1
- package/cjs/Overlay/positionUtils.js +8 -8
- package/cjs/Pagination/Pagination.d.ts +1 -1
- package/cjs/Pagination/PaginationButton.d.ts +3 -3
- package/cjs/Pagination/PaginationGroup.js +5 -3
- package/cjs/Panel/Panel.d.ts +1 -1
- package/cjs/Panel/Panel.js +2 -2
- package/cjs/PanelGroup/PanelGroup.d.ts +2 -2
- package/cjs/PanelGroup/PanelGroup.js +8 -5
- package/cjs/Picker/DropdownMenu.d.ts +8 -5
- package/cjs/Picker/DropdownMenu.js +5 -5
- package/cjs/Picker/PickerOverlay.js +4 -3
- package/cjs/Picker/PickerToggle.js +4 -3
- package/cjs/Picker/PickerToggleTrigger.d.ts +2 -6
- package/cjs/Picker/SearchBar.d.ts +1 -1
- package/cjs/Picker/SelectedElement.js +2 -1
- package/cjs/Picker/propTypes.d.ts +5 -7
- package/cjs/Picker/propTypes.js +4 -3
- package/cjs/Picker/utils.d.ts +11 -11
- package/cjs/Picker/utils.js +22 -18
- package/cjs/Placeholder/PlaceholderGrid.js +1 -1
- package/cjs/Plaintext/Plaintext.js +2 -1
- package/cjs/Radio/Radio.d.ts +1 -1
- package/cjs/RadioGroup/RadioGroup.d.ts +2 -2
- package/cjs/RadioGroup/RadioGroup.js +1 -1
- package/cjs/RangeSlider/RangeSlider.d.ts +2 -2
- package/cjs/RangeSlider/RangeSlider.js +6 -4
- package/cjs/Rate/Character.js +4 -2
- package/cjs/Rate/Rate.js +2 -1
- package/cjs/Ripple/Ripple.js +1 -1
- package/cjs/SelectPicker/SelectPicker.d.ts +12 -5
- package/cjs/SelectPicker/SelectPicker.js +8 -8
- package/cjs/SelectPicker/index.d.ts +1 -1
- package/cjs/SelectPicker/test/SelectPicker.test.d.ts +1 -0
- package/cjs/SelectPicker/test/SelectPicker.test.js +62 -0
- package/cjs/Sidenav/Node.d.ts +1 -1
- package/cjs/Sidenav/Sidenav.d.ts +4 -4
- package/cjs/Sidenav/Sidenav.js +5 -2
- package/cjs/Sidenav/SidenavDropdown.js +11 -8
- package/cjs/Sidenav/SidenavDropdownItem.js +10 -5
- package/cjs/Sidenav/SidenavDropdownMenu.js +9 -5
- package/cjs/Sidenav/SidenavItem.d.ts +1 -1
- package/cjs/Sidenav/SidenavItem.js +4 -0
- package/cjs/Slider/Graduated.d.ts +5 -5
- package/cjs/Slider/Handle.d.ts +1 -1
- package/cjs/Slider/Handle.js +10 -6
- package/cjs/Slider/Mark.d.ts +1 -1
- package/cjs/Slider/Slider.d.ts +1 -1
- package/cjs/Slider/Slider.js +2 -2
- package/cjs/Slider/utils.d.ts +2 -1
- package/cjs/Slider/utils.js +4 -5
- package/cjs/Stack/Stack.d.ts +26 -0
- package/cjs/Stack/Stack.js +86 -0
- package/cjs/Stack/index.d.ts +3 -0
- package/cjs/Stack/index.js +11 -0
- package/cjs/Steps/StepItem.js +1 -1
- package/cjs/TagInput/index.js +1 -1
- package/cjs/Toggle/Toggle.js +5 -4
- package/cjs/Tree/Tree.d.ts +3 -2
- package/cjs/Tree/Tree.js +6 -5
- package/cjs/Tree/TreeContext.d.ts +0 -1
- package/cjs/TreePicker/TreeNode.js +7 -22
- package/cjs/TreePicker/TreePicker.js +32 -52
- package/cjs/Uploader/UploadFileItem.d.ts +1 -1
- package/cjs/Uploader/UploadFileItem.js +2 -2
- package/cjs/Uploader/UploadTrigger.d.ts +1 -1
- package/cjs/Uploader/UploadTrigger.js +2 -3
- package/cjs/Uploader/Uploader.d.ts +5 -5
- package/cjs/Uploader/Uploader.js +1 -2
- package/cjs/index.d.ts +6 -2
- package/cjs/index.js +13 -5
- package/cjs/locales/index.d.ts +3 -3
- package/cjs/toaster/ToastContainer.d.ts +1 -1
- package/cjs/toaster/ToastContainer.js +1 -1
- package/cjs/toaster/toaster.js +3 -1
- package/cjs/utils/BrowserDetection.js +1 -1
- package/cjs/utils/ReactChildren.d.ts +2 -2
- package/cjs/utils/ajaxUpload.d.ts +1 -1
- package/cjs/utils/ajaxUpload.js +5 -4
- package/cjs/utils/appendTooltip.d.ts +1 -1
- package/cjs/utils/constants.d.ts +4 -4
- package/cjs/utils/createChainedFunction.d.ts +1 -1
- package/cjs/utils/getDataGroupBy.d.ts +1 -1
- package/cjs/utils/index.d.ts +1 -0
- package/cjs/utils/index.js +7 -2
- package/cjs/utils/mergeRefs.d.ts +2 -2
- package/cjs/utils/previewFile.d.ts +1 -1
- package/cjs/utils/propTypeChecker.d.ts +6 -2
- package/cjs/utils/propTypeChecker.js +7 -6
- package/cjs/utils/reactToString.d.ts +2 -1
- package/cjs/utils/statusIcons.d.ts +1 -1
- package/cjs/utils/stringToObject.d.ts +1 -1
- package/cjs/utils/treeUtils.d.ts +35 -32
- package/cjs/utils/treeUtils.js +46 -23
- package/cjs/utils/useControlled.d.ts +6 -1
- package/cjs/utils/useControlled.js +0 -8
- package/cjs/utils/useCustom.js +6 -4
- package/cjs/utils/useFocus.d.ts +2 -2
- package/cjs/utils/useMount.d.ts +2 -0
- package/cjs/utils/useMount.js +19 -0
- package/cjs/utils/usePortal.d.ts +2 -2
- package/cjs/utils/useRootClose.d.ts +2 -2
- package/cjs/utils/useTimeout.d.ts +1 -1
- package/cjs/utils/useTimeout.js +5 -3
- package/dist/rsuite-rtl.css +95 -210
- package/dist/rsuite-rtl.min.css +1 -1
- package/dist/rsuite-rtl.min.css.map +1 -1
- package/dist/rsuite.css +95 -210
- package/dist/rsuite.js +214 -115
- package/dist/rsuite.js.map +1 -1
- package/dist/rsuite.min.css +1 -1
- package/dist/rsuite.min.css.map +1 -1
- package/dist/rsuite.min.js +1 -1
- package/dist/rsuite.min.js.map +1 -1
- package/esm/@types/common.d.ts +13 -12
- package/esm/@types/utils.d.ts +12 -0
- package/esm/Affix/Affix.js +9 -7
- package/esm/Animation/Transition.d.ts +21 -12
- package/esm/Animation/Transition.js +4 -1
- package/esm/AutoComplete/AutoComplete.js +1 -1
- package/esm/AutoComplete/utils.d.ts +1 -1
- package/esm/Avatar/Avatar.js +7 -3
- package/esm/AvatarGroup/AvatarGroup.d.ts +15 -0
- package/esm/AvatarGroup/AvatarGroup.js +57 -0
- package/esm/AvatarGroup/index.d.ts +3 -0
- package/esm/AvatarGroup/index.js +2 -0
- package/esm/Breadcrumb/Breadcrumb.js +1 -1
- package/esm/Button/Button.js +6 -2
- package/esm/ButtonGroup/ButtonGroup.js +11 -3
- package/esm/ButtonGroup/ButtonGroupContext.d.ts +7 -0
- package/esm/ButtonGroup/ButtonGroupContext.js +3 -0
- package/esm/ButtonGroup/index.d.ts +2 -0
- package/esm/ButtonGroup/index.js +2 -0
- package/esm/Calendar/Calendar.d.ts +4 -4
- package/esm/Calendar/Calendar.js +27 -23
- package/esm/Calendar/CalendarContext.js +1 -1
- package/esm/Calendar/Header.js +1 -3
- package/esm/Calendar/Table.js +1 -1
- package/esm/Calendar/TableRow.js +14 -9
- package/esm/Calendar/TimeDropdown.js +5 -4
- package/esm/Calendar/View.js +10 -6
- package/esm/Calendar/types.d.ts +2 -2
- package/esm/Calendar/useCalendarDate.d.ts +2 -2
- package/esm/Carousel/Carousel.d.ts +1 -1
- package/esm/Carousel/Carousel.js +1 -1
- package/esm/Cascader/Cascader.d.ts +1 -1
- package/esm/Cascader/Cascader.js +10 -10
- package/esm/Cascader/DropdownMenu.d.ts +5 -4
- package/esm/Cascader/utils.d.ts +10 -10
- package/esm/CheckPicker/CheckPicker.d.ts +9 -4
- package/esm/CheckPicker/CheckPicker.js +4 -4
- package/esm/CheckPicker/test/CheckPicker.test.d.ts +1 -0
- package/esm/CheckPicker/test/CheckPicker.test.js +64 -0
- package/esm/CheckTree/index.js +7 -6
- package/esm/CheckTreePicker/CheckTreeNode.d.ts +1 -1
- package/esm/CheckTreePicker/CheckTreeNode.js +4 -7
- package/esm/CheckTreePicker/CheckTreePicker.js +28 -23
- package/esm/CheckTreePicker/utils.d.ts +3 -1
- package/esm/CheckTreePicker/utils.js +12 -10
- package/esm/Checkbox/Checkbox.d.ts +1 -1
- package/esm/Container/Container.js +7 -4
- package/esm/CustomProvider/CustomProvider.d.ts +31 -57
- package/esm/DOMHelper/index.d.ts +12 -12
- package/esm/DatePicker/DatePicker.d.ts +1 -1
- package/esm/DatePicker/DatePicker.js +18 -11
- package/esm/DatePicker/Toolbar.d.ts +12 -9
- package/esm/DatePicker/Toolbar.js +6 -8
- package/esm/DatePicker/types.d.ts +4 -4
- package/esm/DatePicker/utils.d.ts +4 -3
- package/esm/DateRangePicker/Calendar.d.ts +8 -7
- package/esm/DateRangePicker/Calendar.js +1 -1
- package/esm/DateRangePicker/DateRangePicker.d.ts +6 -6
- package/esm/DateRangePicker/DateRangePicker.js +112 -111
- package/esm/DateRangePicker/types.d.ts +2 -1
- package/esm/DateRangePicker/utils.d.ts +6 -6
- package/esm/DateRangePicker/utils.js +6 -2
- package/esm/Disclosure/Disclosure.d.ts +8 -5
- package/esm/Disclosure/Disclosure.js +56 -15
- package/esm/Disclosure/DisclosureButton.d.ts +2 -2
- package/esm/Disclosure/DisclosureButton.js +8 -7
- package/esm/Disclosure/DisclosureContent.js +5 -7
- package/esm/Disclosure/DisclosureContext.d.ts +8 -3
- package/esm/Disclosure/useDisclosureContext.d.ts +2 -0
- package/esm/Disclosure/useDisclosureContext.js +11 -0
- package/esm/Dropdown/Dropdown.d.ts +1 -1
- package/esm/Dropdown/Dropdown.js +1 -1
- package/esm/Dropdown/DropdownContext.d.ts +2 -2
- package/esm/Dropdown/DropdownItem.js +10 -10
- package/esm/Dropdown/DropdownMenu.d.ts +3 -3
- package/esm/Dropdown/DropdownMenu.js +82 -24
- package/esm/Dropdown/DropdownState.d.ts +1 -1
- package/esm/Dropdown/DropdownToggle.js +9 -2
- package/esm/Dropdown/useRenderDropdownItem.d.ts +1 -1
- package/esm/Form/Form.js +1 -1
- package/esm/Form/FormContext.d.ts +1 -1
- package/esm/FormControl/FormControl.d.ts +1 -1
- package/esm/FormControl/FormControl.js +5 -4
- package/esm/FormGroup/FormGroup.d.ts +1 -1
- package/esm/FormGroup/FormGroup.js +7 -4
- package/esm/Input/Input.d.ts +3 -2
- package/esm/InputGroup/InputGroup.d.ts +1 -1
- package/esm/InputNumber/InputNumber.js +6 -2
- package/esm/InputPicker/InputAutosize.js +4 -4
- package/esm/InputPicker/InputPicker.d.ts +2 -2
- package/esm/InputPicker/InputPicker.js +15 -10
- package/esm/List/ListContext.d.ts +1 -1
- package/esm/List/ListContext.js +7 -1
- package/esm/List/helper/AutoScroller.js +4 -2
- package/esm/List/helper/useManager.d.ts +3 -3
- package/esm/List/helper/useManager.js +1 -1
- package/esm/List/helper/useSortHelper.d.ts +3 -3
- package/esm/List/helper/useSortHelper.js +6 -4
- package/esm/List/helper/utils.d.ts +2 -2
- package/esm/MaskedInput/TextMask.d.ts +5 -5
- package/esm/MaskedInput/adjustCaretPosition.d.ts +6 -6
- package/esm/MaskedInput/conformToMask.js +5 -4
- package/esm/MaskedInput/createTextMaskInputElement.d.ts +2 -2
- package/esm/MaskedInput/utilities.d.ts +1 -1
- package/esm/Menu/Menu.js +13 -7
- package/esm/Menu/MenuContext.d.ts +1 -1
- package/esm/Menu/MenuItem.d.ts +1 -1
- package/esm/Menu/MenuItem.js +18 -15
- package/esm/Menu/Menubar.js +7 -8
- package/esm/Menu/useMenu.js +17 -7
- package/esm/Modal/Modal.js +41 -23
- package/esm/Modal/ModalContext.d.ts +2 -2
- package/esm/Modal/utils.d.ts +1 -1
- package/esm/Modal/utils.js +3 -5
- package/esm/MultiCascader/DropdownMenu.d.ts +4 -4
- package/esm/MultiCascader/MultiCascader.js +6 -6
- package/esm/MultiCascader/utils.d.ts +17 -17
- package/esm/Nav/Nav.d.ts +1 -1
- package/esm/Nav/Nav.js +11 -13
- package/esm/Nav/NavContext.d.ts +7 -1
- package/esm/Nav/NavContext.js +1 -0
- package/esm/Nav/NavItem.d.ts +1 -1
- package/esm/Navbar/Navbar.js +1 -1
- package/esm/Navbar/NavbarItem.d.ts +1 -1
- package/esm/Navbar/index.d.ts +1 -0
- package/esm/Navbar/index.js +1 -0
- package/esm/Overlay/Modal.d.ts +2 -2
- package/esm/Overlay/Modal.js +72 -64
- package/esm/Overlay/ModalManager.d.ts +17 -8
- package/esm/Overlay/ModalManager.js +11 -20
- package/esm/Overlay/Overlay.d.ts +3 -3
- package/esm/Overlay/Overlay.js +8 -3
- package/esm/Overlay/OverlayContext.d.ts +6 -0
- package/esm/Overlay/OverlayContext.js +4 -0
- package/esm/Overlay/OverlayTrigger.d.ts +11 -11
- package/esm/Overlay/OverlayTrigger.js +21 -8
- package/esm/Overlay/Position.d.ts +4 -4
- package/esm/Overlay/Position.js +14 -8
- package/esm/Overlay/positionUtils.d.ts +1 -1
- package/esm/Overlay/positionUtils.js +6 -6
- package/esm/Pagination/Pagination.d.ts +1 -1
- package/esm/Pagination/PaginationButton.d.ts +3 -3
- package/esm/Pagination/PaginationGroup.js +5 -3
- package/esm/Panel/Panel.d.ts +1 -1
- package/esm/Panel/Panel.js +2 -2
- package/esm/PanelGroup/PanelGroup.d.ts +2 -2
- package/esm/PanelGroup/PanelGroup.js +9 -6
- package/esm/Picker/DropdownMenu.d.ts +8 -5
- package/esm/Picker/DropdownMenu.js +5 -5
- package/esm/Picker/PickerOverlay.js +4 -3
- package/esm/Picker/PickerToggle.js +4 -3
- package/esm/Picker/PickerToggleTrigger.d.ts +2 -6
- package/esm/Picker/SearchBar.d.ts +1 -1
- package/esm/Picker/SelectedElement.js +2 -1
- package/esm/Picker/propTypes.d.ts +5 -7
- package/esm/Picker/propTypes.js +4 -3
- package/esm/Picker/utils.d.ts +11 -11
- package/esm/Picker/utils.js +21 -18
- package/esm/Placeholder/PlaceholderGrid.js +1 -1
- package/esm/Plaintext/Plaintext.js +2 -1
- package/esm/Radio/Radio.d.ts +1 -1
- package/esm/RadioGroup/RadioGroup.d.ts +2 -2
- package/esm/RadioGroup/RadioGroup.js +1 -1
- package/esm/RangeSlider/RangeSlider.d.ts +2 -2
- package/esm/RangeSlider/RangeSlider.js +5 -4
- package/esm/Rate/Character.js +3 -2
- package/esm/Rate/Rate.js +2 -1
- package/esm/Ripple/Ripple.js +1 -1
- package/esm/SelectPicker/SelectPicker.d.ts +12 -5
- package/esm/SelectPicker/SelectPicker.js +8 -8
- package/esm/SelectPicker/index.d.ts +1 -1
- package/esm/SelectPicker/test/SelectPicker.test.d.ts +1 -0
- package/esm/SelectPicker/test/SelectPicker.test.js +52 -0
- package/esm/Sidenav/Node.d.ts +1 -1
- package/esm/Sidenav/Sidenav.d.ts +4 -4
- package/esm/Sidenav/Sidenav.js +5 -2
- package/esm/Sidenav/SidenavDropdown.js +11 -7
- package/esm/Sidenav/SidenavDropdownItem.js +11 -5
- package/esm/Sidenav/SidenavDropdownMenu.js +9 -5
- package/esm/Sidenav/SidenavItem.d.ts +1 -1
- package/esm/Sidenav/SidenavItem.js +4 -0
- package/esm/Slider/Graduated.d.ts +5 -5
- package/esm/Slider/Handle.d.ts +1 -1
- package/esm/Slider/Handle.js +10 -6
- package/esm/Slider/Mark.d.ts +1 -1
- package/esm/Slider/Slider.d.ts +1 -1
- package/esm/Slider/Slider.js +2 -2
- package/esm/Slider/utils.d.ts +2 -1
- package/esm/Slider/utils.js +5 -2
- package/esm/Stack/Stack.d.ts +26 -0
- package/esm/Stack/Stack.js +71 -0
- package/esm/Stack/index.d.ts +3 -0
- package/esm/Stack/index.js +2 -0
- package/esm/Steps/StepItem.js +1 -1
- package/esm/TagInput/index.js +1 -1
- package/esm/Toggle/Toggle.js +5 -4
- package/esm/Tree/Tree.d.ts +3 -2
- package/esm/Tree/Tree.js +7 -6
- package/esm/Tree/TreeContext.d.ts +0 -1
- package/esm/TreePicker/TreeNode.js +6 -21
- package/esm/TreePicker/TreePicker.js +31 -50
- package/esm/Uploader/UploadFileItem.d.ts +1 -1
- package/esm/Uploader/UploadFileItem.js +2 -2
- package/esm/Uploader/UploadTrigger.d.ts +1 -1
- package/esm/Uploader/UploadTrigger.js +2 -3
- package/esm/Uploader/Uploader.d.ts +5 -5
- package/esm/Uploader/Uploader.js +1 -2
- package/esm/index.d.ts +6 -2
- package/esm/index.js +3 -1
- package/esm/locales/index.d.ts +3 -3
- package/esm/toaster/ToastContainer.d.ts +1 -1
- package/esm/toaster/ToastContainer.js +1 -1
- package/esm/toaster/toaster.js +3 -1
- package/esm/utils/BrowserDetection.js +1 -1
- package/esm/utils/ReactChildren.d.ts +2 -2
- package/esm/utils/ajaxUpload.d.ts +1 -1
- package/esm/utils/ajaxUpload.js +5 -4
- package/esm/utils/appendTooltip.d.ts +1 -1
- package/esm/utils/constants.d.ts +4 -4
- package/esm/utils/createChainedFunction.d.ts +1 -1
- package/esm/utils/getDataGroupBy.d.ts +1 -1
- package/esm/utils/index.d.ts +1 -0
- package/esm/utils/index.js +2 -1
- package/esm/utils/mergeRefs.d.ts +2 -2
- package/esm/utils/previewFile.d.ts +1 -1
- package/esm/utils/propTypeChecker.d.ts +6 -2
- package/esm/utils/propTypeChecker.js +7 -6
- package/esm/utils/reactToString.d.ts +2 -1
- package/esm/utils/statusIcons.d.ts +1 -1
- package/esm/utils/stringToObject.d.ts +1 -1
- package/esm/utils/treeUtils.d.ts +35 -32
- package/esm/utils/treeUtils.js +45 -21
- package/esm/utils/useControlled.d.ts +6 -1
- package/esm/utils/useControlled.js +0 -8
- package/esm/utils/useCustom.js +6 -4
- package/esm/utils/useFocus.d.ts +2 -2
- package/esm/utils/useMount.d.ts +2 -0
- package/esm/utils/useMount.js +13 -0
- package/esm/utils/usePortal.d.ts +2 -2
- package/esm/utils/useRootClose.d.ts +2 -2
- package/esm/utils/useTimeout.d.ts +1 -1
- package/esm/utils/useTimeout.js +5 -3
- package/package.json +2 -2
- package/styles/index.less +2 -0
package/Avatar/styles/index.less
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
align-items: center;
|
|
10
10
|
border-radius: 4px;
|
|
11
11
|
overflow: hidden;
|
|
12
|
+
position: relative;
|
|
13
|
+
|
|
12
14
|
.avatar-md();
|
|
13
15
|
|
|
14
16
|
& > .rs-icon {
|
|
@@ -16,8 +18,6 @@
|
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
&-image {
|
|
19
|
-
position: relative;
|
|
20
|
-
|
|
21
21
|
&::before {
|
|
22
22
|
content: attr(alt);
|
|
23
23
|
position: absolute;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@import '../../styles/common';
|
|
2
|
+
|
|
3
|
+
.rs-avatar-group {
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: flex-end;
|
|
6
|
+
&-stack {
|
|
7
|
+
.rs-avatar {
|
|
8
|
+
box-sizing: content-box;
|
|
9
|
+
margin-right: -10px;
|
|
10
|
+
transition: margin 0.15s;
|
|
11
|
+
&:last-child {
|
|
12
|
+
margin-right: 0;
|
|
13
|
+
}
|
|
14
|
+
&:hover {
|
|
15
|
+
margin-right: 0;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
@import '../../styles/common';
|
|
2
|
-
@import '../../Button/styles/mixin';
|
|
3
2
|
|
|
4
3
|
//
|
|
5
4
|
// Button groups
|
|
@@ -78,20 +77,3 @@
|
|
|
78
77
|
.ellipsis-basic();
|
|
79
78
|
}
|
|
80
79
|
}
|
|
81
|
-
|
|
82
|
-
// Sizes
|
|
83
|
-
.rs-btn-group-lg .rs-btn {
|
|
84
|
-
.button-size-lg();
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.rs-btn-group-md .rs-btn {
|
|
88
|
-
.button-size-md();
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.rs-btn-group-sm .rs-btn {
|
|
92
|
-
.button-size-sm();
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.rs-btn-group-xs .rs-btn {
|
|
96
|
-
.button-size-xs();
|
|
97
|
-
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,64 @@
|
|
|
1
|
+
## [5.4.2](https://github.com/rsuite/rsuite/compare/v5.4.1...v5.4.2) (2021-12-24)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
- **Affix:** fix unupdated position after window size change ([#2256](https://github.com/rsuite/rsuite/issues/2256)) ([61c7b27](https://github.com/rsuite/rsuite/commit/61c7b279f136ae44b9470046344cd6e163d02589))
|
|
6
|
+
- **Modal:** improve the mouse scrolling experience on Modal ([#2254](https://github.com/rsuite/rsuite/issues/2254)) ([137d57e](https://github.com/rsuite/rsuite/commit/137d57ef1e79ca0055b3af8d6cd5cff2a9c4ef55))
|
|
7
|
+
- **Navbar:** fix dropdown submenu throwing error ([#2250](https://github.com/rsuite/rsuite/issues/2250)) ([875130d](https://github.com/rsuite/rsuite/commit/875130d342f58e4078babe428913640e0b2faa04))
|
|
8
|
+
|
|
9
|
+
## [5.4.1](https://github.com/rsuite/rsuite/compare/v5.4.0...v5.4.1) (2021-12-23)
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
- **Dropdown:** reduce padding in noCaret variant ([#2236](https://github.com/rsuite/rsuite/issues/2236)) ([682f883](https://github.com/rsuite/rsuite/commit/682f8830601d784452c10729a369ebe91057eddb))
|
|
14
|
+
- **Sidenav:** fix missing highlight on selected dropdown items ([#2216](https://github.com/rsuite/rsuite/issues/2216)) ([8f79d4a](https://github.com/rsuite/rsuite/commit/8f79d4a8aafb123f75f420a3adf3f680386aae68))
|
|
15
|
+
- **Sidenav:** prevent text wrapping when collapsing ([#2245](https://github.com/rsuite/rsuite/issues/2245)) ([4094233](https://github.com/rsuite/rsuite/commit/409423360a5226c8a0e11bbeecea0a4316c5c8e0))
|
|
16
|
+
- **Toggle:** dismiss uncontrolled input warning ([#2243](https://github.com/rsuite/rsuite/issues/2243)) ([c4737d5](https://github.com/rsuite/rsuite/commit/c4737d5af2fabf88312c7ee2b84d4e9139e743f1))
|
|
17
|
+
|
|
18
|
+
### Performance Improvements
|
|
19
|
+
|
|
20
|
+
- **Context:** use `useMemo` to memozie the values returned to the Context Provider ([#2244](https://github.com/rsuite/rsuite/issues/2244)) ([d25a719](https://github.com/rsuite/rsuite/commit/d25a71920d38bceefcf100248173121d54be8313))
|
|
21
|
+
- **DatePicker:** improve date grid a11y ([#2220](https://github.com/rsuite/rsuite/issues/2220)) ([655178e](https://github.com/rsuite/rsuite/commit/655178e05afe5e4b4619bda3a222dc753766e13b))
|
|
22
|
+
|
|
23
|
+
# [5.4.0](https://github.com/rsuite/rsuite/compare/v5.3.0...v5.4.0) (2021-12-17)
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
- **DatePicker,DateRangePicker:** suppress depreated caretComponent warning ([#2233](https://github.com/rsuite/rsuite/issues/2233)) ([3a79d48](https://github.com/rsuite/rsuite/commit/3a79d486268ff31ad6a620dfc17165c3be259219))
|
|
28
|
+
- **DateRangePicker:** fix selecting ending date not working ([#2217](https://github.com/rsuite/rsuite/issues/2217)) ([2136aa3](https://github.com/rsuite/rsuite/commit/2136aa3327f914a910fb5805b2d11a036e0f6601))
|
|
29
|
+
- **Modal:** fix Modal focus being reset on re-rendering ([#2208](https://github.com/rsuite/rsuite/issues/2208)) ([a931b06](https://github.com/rsuite/rsuite/commit/a931b06942e7fc011ab77e70b105f5790a33e55b))
|
|
30
|
+
- **Nav:** fix incorrect Dropdown button background ([#2227](https://github.com/rsuite/rsuite/issues/2227)) ([421de83](https://github.com/rsuite/rsuite/commit/421de838ed13694254cc6a178d0369e12b666202))
|
|
31
|
+
- **Navbar:** fix icon style in Navbar items ([#2229](https://github.com/rsuite/rsuite/issues/2229)) ([560df61](https://github.com/rsuite/rsuite/commit/560df61a44c0338b153b2c09a50e946c207c684a))
|
|
32
|
+
- **Overlay:** overlay is rendered inside Modal by default ([#2230](https://github.com/rsuite/rsuite/issues/2230)) ([4fac628](https://github.com/rsuite/rsuite/commit/4fac628e23e41db097ec63c2ac348a7345f3ee31))
|
|
33
|
+
- **Radio:** fix unclickable without children ([#2190](https://github.com/rsuite/rsuite/issues/2190)) ([cef5946](https://github.com/rsuite/rsuite/commit/cef59463e281d6aa6b4b9576204d16eed58087c8))
|
|
34
|
+
- **SelectPicker:** fix onChange argument type ([#2193](https://github.com/rsuite/rsuite/issues/2193)) ([db0efa9](https://github.com/rsuite/rsuite/commit/db0efa94ad33de5d02bfd81e926cf622c40ecce7))
|
|
35
|
+
- **Steps:** step item not rendering number ([#2202](https://github.com/rsuite/rsuite/issues/2202)) ([413880b](https://github.com/rsuite/rsuite/commit/413880be99972d8a58d5f0a0c9b6b08017ad33a2))
|
|
36
|
+
- **Toggle:** fix Toggle is still clickable in loading state ([#2219](https://github.com/rsuite/rsuite/issues/2219)) ([e5661fd](https://github.com/rsuite/rsuite/commit/e5661fdb4ef659527ca97c2ea2231b4025e904d3))
|
|
37
|
+
- **Tree:** remove dragNode Element when drag node ([#2185](https://github.com/rsuite/rsuite/issues/2185)) ([#2237](https://github.com/rsuite/rsuite/issues/2237)) ([f6e959f](https://github.com/rsuite/rsuite/commit/f6e959f4aa24f0fa87b5fa1bbc6e1aa775fecd2b))
|
|
38
|
+
|
|
39
|
+
### Features
|
|
40
|
+
|
|
41
|
+
- **Stack:** add Stack support to the layout ([#2199](https://github.com/rsuite/rsuite/issues/2199)) ([1ac132e](https://github.com/rsuite/rsuite/commit/1ac132e0fc98a6739dee07d9e6281202530d80fa))
|
|
42
|
+
|
|
43
|
+
### Performance Improvements
|
|
44
|
+
|
|
45
|
+
- **CheckPicker:** infer value and onChange types from data prop ([#2228](https://github.com/rsuite/rsuite/issues/2228)) ([eb4f9a8](https://github.com/rsuite/rsuite/commit/eb4f9a8f4c84cf30b3521532d95f4dc2490d0699))
|
|
46
|
+
|
|
47
|
+
# [5.3.0](https://github.com/rsuite/rsuite/compare/5.2.4...5.3.0) (2021-12-10)
|
|
48
|
+
|
|
49
|
+
### Bug Fixes
|
|
50
|
+
|
|
51
|
+
- **Breadcrumb:** avoid separator key conflict with item key ([#2186](https://github.com/rsuite/rsuite/issues/2186)) ([428529a](https://github.com/rsuite/rsuite/commit/428529afb4f1c746ccebe06db3dd10438be8aa31))
|
|
52
|
+
- **Button:** apply size from parent ButtonGroup ([#2194](https://github.com/rsuite/rsuite/issues/2194)) ([85e9a21](https://github.com/rsuite/rsuite/commit/85e9a21d5cbc5c4fd4e92d591a8fe0cce5f43a15))
|
|
53
|
+
- **dts:** fix declaration errors in typescript strict mode ([#2130](https://github.com/rsuite/rsuite/issues/2130)) ([c31f080](https://github.com/rsuite/rsuite/commit/c31f080ea290d8420df77b406c29b89be44bef01))
|
|
54
|
+
- **Modal:** fix Modal not focused when opened ([#2180](https://github.com/rsuite/rsuite/issues/2180)) ([383ea12](https://github.com/rsuite/rsuite/commit/383ea129b315590700301ef823e7a24309e8237b))
|
|
55
|
+
|
|
56
|
+
### Features
|
|
57
|
+
|
|
58
|
+
- **AvatarGroup:** add support for AvatarGroup ([#2195](https://github.com/rsuite/rsuite/issues/2195)) ([2647bea](https://github.com/rsuite/rsuite/commit/2647bea5fcbe7148049ed5b6fa3118e86971572e))
|
|
59
|
+
- **FormControl:** allow explicit default value ([#2182](https://github.com/rsuite/rsuite/issues/2182)) ([691ee38](https://github.com/rsuite/rsuite/commit/691ee3807d567a379b3e82195d2b2d303449a466))
|
|
60
|
+
- **Tree,CheckTree:** support showIndentLine on <Tree> and <CheckTree> ([#2181](https://github.com/rsuite/rsuite/issues/2181)) ([720768e](https://github.com/rsuite/rsuite/commit/720768e7ac89752f11b5387f76b1e5e36c54221d))
|
|
61
|
+
|
|
1
62
|
## [5.2.4](https://github.com/rsuite/rsuite/compare/v5.2.3...v5.2.4) (2021-12-03)
|
|
2
63
|
|
|
3
64
|
### Bug Fixes
|
|
@@ -59,7 +59,10 @@
|
|
|
59
59
|
&::before {
|
|
60
60
|
content: '';
|
|
61
61
|
position: absolute;
|
|
62
|
-
width: (
|
|
62
|
+
width: (
|
|
63
|
+
@picker-tree-arrow-down-width + @picker-tree-arrow-down-gap + 30px
|
|
64
|
+
); // checkbox-spacing = 30
|
|
65
|
+
|
|
63
66
|
height: 100%;
|
|
64
67
|
top: 0;
|
|
65
68
|
margin-left: -58px; // 10px + 36px + 12px
|
|
@@ -141,6 +144,7 @@
|
|
|
141
144
|
// node children
|
|
142
145
|
.rs-check-tree-node-children {
|
|
143
146
|
> .rs-check-tree-children {
|
|
147
|
+
position: relative;
|
|
144
148
|
display: none;
|
|
145
149
|
|
|
146
150
|
.rs-check-tree-open& {
|
|
@@ -149,6 +153,15 @@
|
|
|
149
153
|
}
|
|
150
154
|
}
|
|
151
155
|
|
|
156
|
+
.rs-check-tree-indent-line {
|
|
157
|
+
height: 100%;
|
|
158
|
+
width: 1px;
|
|
159
|
+
position: absolute;
|
|
160
|
+
top: 0;
|
|
161
|
+
margin-left: -13px;
|
|
162
|
+
border-left: 1px solid rgba(0, 0, 0, 0.1);
|
|
163
|
+
}
|
|
164
|
+
|
|
152
165
|
.rs-picker-menu {
|
|
153
166
|
display: flex;
|
|
154
167
|
flex-direction: column;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@import '../../styles/common';
|
|
2
2
|
@import '../../styles/mixins/menu';
|
|
3
3
|
@import 'mixin';
|
|
4
|
+
@import '../../Button/styles/index.less';
|
|
4
5
|
|
|
5
6
|
//
|
|
6
7
|
// Dropdown menus
|
|
@@ -80,10 +81,10 @@
|
|
|
80
81
|
// Force set style even if has `.btn`.
|
|
81
82
|
.dropdown-toggle();
|
|
82
83
|
}
|
|
83
|
-
}
|
|
84
84
|
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
&.rs-dropdown-toggle-no-caret {
|
|
86
|
+
padding-right: @padding-x;
|
|
87
|
+
}
|
|
87
88
|
}
|
|
88
89
|
|
|
89
90
|
// The dropdown menu (ul)
|
package/Modal/styles/index.less
CHANGED
|
@@ -5,6 +5,27 @@
|
|
|
5
5
|
// Modals
|
|
6
6
|
// --------------------------------------------------
|
|
7
7
|
|
|
8
|
+
// Modal background
|
|
9
|
+
.rs-modal-backdrop {
|
|
10
|
+
position: fixed;
|
|
11
|
+
top: 0;
|
|
12
|
+
left: 0;
|
|
13
|
+
width: 100vw;
|
|
14
|
+
height: 100vh;
|
|
15
|
+
z-index: @zindex-modal - 1;
|
|
16
|
+
background-color: var(--rs-bg-backdrop);
|
|
17
|
+
|
|
18
|
+
// Fade for backdrop
|
|
19
|
+
&.rs-anim-fade {
|
|
20
|
+
opacity: 0;
|
|
21
|
+
transition: opacity 0.3s ease-in;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&.rs-anim-in {
|
|
25
|
+
opacity: 1;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
8
29
|
// Kill the scroll on the body
|
|
9
30
|
.rs-modal-open {
|
|
10
31
|
overflow: hidden;
|
|
@@ -15,9 +36,9 @@
|
|
|
15
36
|
overflow: auto;
|
|
16
37
|
z-index: @zindex-modal;
|
|
17
38
|
top: 0;
|
|
18
|
-
bottom: 0;
|
|
19
|
-
right: 0;
|
|
20
39
|
left: 0;
|
|
40
|
+
width: 100%;
|
|
41
|
+
height: 100%;
|
|
21
42
|
}
|
|
22
43
|
|
|
23
44
|
// Container that the modal scrolls within
|
|
@@ -71,26 +92,6 @@
|
|
|
71
92
|
padding: @modal-content-padding;
|
|
72
93
|
}
|
|
73
94
|
|
|
74
|
-
// Modal background
|
|
75
|
-
.rs-modal-backdrop {
|
|
76
|
-
position: fixed;
|
|
77
|
-
top: 0;
|
|
78
|
-
right: 0;
|
|
79
|
-
bottom: 0;
|
|
80
|
-
left: 0;
|
|
81
|
-
background-color: var(--rs-bg-backdrop);
|
|
82
|
-
|
|
83
|
-
// Fade for backdrop
|
|
84
|
-
&.rs-anim-fade {
|
|
85
|
-
opacity: 0;
|
|
86
|
-
transition: opacity 0.3s ease-in;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
&.rs-anim-in {
|
|
90
|
-
opacity: 1;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
95
|
// Modal header
|
|
95
96
|
// Top section of the modal w/ title and dismiss
|
|
96
97
|
.rs-modal-header {
|
package/Nav/styles/index.less
CHANGED
package/Navbar/styles/index.less
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@import '../../styles/common';
|
|
2
|
+
@import '../../Dropdown/styles/index';
|
|
2
3
|
|
|
3
4
|
// NavBar
|
|
4
5
|
// --------------------------------------------------
|
|
@@ -59,6 +60,13 @@
|
|
|
59
60
|
background-color: transparent;
|
|
60
61
|
position: relative;
|
|
61
62
|
overflow: hidden;
|
|
63
|
+
display: flex;
|
|
64
|
+
align-items: center;
|
|
65
|
+
|
|
66
|
+
> .rs-icon {
|
|
67
|
+
font-size: 16px;
|
|
68
|
+
margin-right: 5px;
|
|
69
|
+
}
|
|
62
70
|
}
|
|
63
71
|
|
|
64
72
|
// Focus style
|
|
@@ -90,7 +98,13 @@
|
|
|
90
98
|
margin: 0 !important;
|
|
91
99
|
}
|
|
92
100
|
|
|
93
|
-
|
|
101
|
+
.rs-navbar-item.rs-navbar-item-active {
|
|
102
|
+
.high-contrast-mode({
|
|
103
|
+
text-decoration: underline;
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// Dropdown
|
|
94
108
|
.rs-navbar-nav > .rs-dropdown .rs-dropdown-toggle {
|
|
95
109
|
&:extend(.rs-navbar-item);
|
|
96
110
|
|
|
@@ -110,10 +124,10 @@
|
|
|
110
124
|
}
|
|
111
125
|
}
|
|
112
126
|
|
|
113
|
-
.rs-navbar
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
127
|
+
.rs-navbar .rs-dropdown-item {
|
|
128
|
+
&:hover {
|
|
129
|
+
.menuitem-active();
|
|
130
|
+
}
|
|
117
131
|
}
|
|
118
132
|
|
|
119
133
|
// Default Navbar
|
package/Radio/styles/index.less
CHANGED
|
@@ -378,6 +378,7 @@
|
|
|
378
378
|
.rs-dropdown .rs-dropdown-toggle,
|
|
379
379
|
.rs-dropdown-item,
|
|
380
380
|
.rs-dropdown-item-submenu > .rs-dropdown-menu-toggle {
|
|
381
|
+
white-space: nowrap;
|
|
381
382
|
text-overflow: clip;
|
|
382
383
|
}
|
|
383
384
|
}
|
|
@@ -436,7 +437,6 @@
|
|
|
436
437
|
|
|
437
438
|
.rs-sidenav-default.rs-sidenav-collapse-in,
|
|
438
439
|
.rs-sidenav-default.rs-sidenav-collapsing {
|
|
439
|
-
.rs-dropdown-item:not(.rs-dropdown-item-submenu),
|
|
440
440
|
.rs-dropdown-item > .rs-dropdown-menu-toggle,
|
|
441
441
|
.rs-dropdown-item > .rs-dropdown-item-toggle {
|
|
442
442
|
color: var(--rs-sidenav-default-text);
|
|
@@ -543,6 +543,7 @@
|
|
|
543
543
|
|
|
544
544
|
// Active
|
|
545
545
|
.rs-sidenav-item.rs-sidenav-item-active,
|
|
546
|
+
.rs-dropdown-item.rs-dropdown-item-active,
|
|
546
547
|
.rs-dropdown.rs-dropdown-selected-within .rs-dropdown-toggle {
|
|
547
548
|
color: var(--rs-sidenav-subtle-selected-text);
|
|
548
549
|
}
|
|
@@ -559,7 +560,6 @@
|
|
|
559
560
|
|
|
560
561
|
.rs-sidenav-subtle.rs-sidenav-collapse-in,
|
|
561
562
|
.rs-sidenav-subtle.rs-sidenav-collapsing {
|
|
562
|
-
.rs-dropdown-item:not(.rs-dropdown-item-submenu),
|
|
563
563
|
.rs-dropdown-item > .rs-dropdown-menu-toggle,
|
|
564
564
|
.rs-dropdown-item > .rs-dropdown-item-toggle {
|
|
565
565
|
color: var(--rs-sidenav-subtle-text);
|
|
@@ -13,20 +13,6 @@
|
|
|
13
13
|
overflow-y: auto;
|
|
14
14
|
flex: 1 1 auto;
|
|
15
15
|
|
|
16
|
-
&-drag-node-mover {
|
|
17
|
-
position: absolute;
|
|
18
|
-
top: -1000px;
|
|
19
|
-
color: var(--rs-text-primary);
|
|
20
|
-
background-color: var(--rs-bg-overlay);
|
|
21
|
-
display: inline-block;
|
|
22
|
-
margin: 0;
|
|
23
|
-
padding: @picker-tree-node-padding-vertical @picker-tree-node-padding-horizontal;
|
|
24
|
-
border-radius: 6px;
|
|
25
|
-
box-shadow: 0 1px 8px rgba(0, 0, 0, 0.12);
|
|
26
|
-
z-index: 1060;
|
|
27
|
-
cursor: move;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
16
|
&.rs-tree-virtualized {
|
|
31
17
|
overflow: hidden;
|
|
32
18
|
|
|
@@ -202,6 +188,7 @@
|
|
|
202
188
|
// node children
|
|
203
189
|
.rs-tree-node-children {
|
|
204
190
|
> .rs-tree-children {
|
|
191
|
+
position: relative;
|
|
205
192
|
display: none;
|
|
206
193
|
|
|
207
194
|
.rs-tree-open& {
|
|
@@ -210,6 +197,15 @@
|
|
|
210
197
|
}
|
|
211
198
|
}
|
|
212
199
|
|
|
200
|
+
.rs-tree-indent-line {
|
|
201
|
+
height: 100%;
|
|
202
|
+
width: 1px;
|
|
203
|
+
position: absolute;
|
|
204
|
+
top: 0;
|
|
205
|
+
margin-left: -13px;
|
|
206
|
+
border-left: 1px solid rgba(0, 0, 0, 0.1);
|
|
207
|
+
}
|
|
208
|
+
|
|
213
209
|
.rs-picker-menu {
|
|
214
210
|
display: flex;
|
|
215
211
|
flex-direction: column;
|
package/cjs/@types/common.d.ts
CHANGED
|
@@ -22,23 +22,23 @@ export interface RsRefForwardingComponent<T extends React.ElementType, P = unkno
|
|
|
22
22
|
}
|
|
23
23
|
export interface AnimationEventProps {
|
|
24
24
|
/** Callback fired before the Modal transitions in */
|
|
25
|
-
onEnter?: (node
|
|
25
|
+
onEnter?: (node: HTMLElement) => void;
|
|
26
26
|
/** Callback fired as the Modal begins to transition in */
|
|
27
|
-
onEntering?: (node
|
|
27
|
+
onEntering?: (node: HTMLElement) => void;
|
|
28
28
|
/** Callback fired after the Modal finishes transitioning in */
|
|
29
|
-
onEntered?: (node
|
|
29
|
+
onEntered?: (node: HTMLElement) => void;
|
|
30
30
|
/** Callback fired right before the Modal transitions out */
|
|
31
|
-
onExit?: (node
|
|
31
|
+
onExit?: (node: HTMLElement) => void;
|
|
32
32
|
/** Callback fired as the Modal begins to transition out */
|
|
33
|
-
onExiting?: (node
|
|
33
|
+
onExiting?: (node: HTMLElement) => void;
|
|
34
34
|
/** Callback fired after the Modal finishes transitioning out */
|
|
35
|
-
onExited?: (node
|
|
35
|
+
onExited?: (node: HTMLElement) => void;
|
|
36
36
|
}
|
|
37
37
|
export declare type PickerAppearance = 'default' | 'subtle';
|
|
38
38
|
export interface PickerBaseProps<LocaleType = any> extends WithAsProps, AnimationEventProps {
|
|
39
39
|
id?: string;
|
|
40
40
|
/** Custom locale */
|
|
41
|
-
locale?: LocaleType
|
|
41
|
+
locale?: Partial<LocaleType>;
|
|
42
42
|
/** A picker can have different appearances. */
|
|
43
43
|
appearance?: PickerAppearance;
|
|
44
44
|
/** Format picker to appear inside a content block */
|
|
@@ -111,7 +111,7 @@ export interface FormControlPickerProps<ValueType = any, LocaleType = any, DataT
|
|
|
111
111
|
/** Set children key in data */
|
|
112
112
|
childrenKey?: string;
|
|
113
113
|
/** Disabled items */
|
|
114
|
-
disabledItemValues?: ToArray<ValueType
|
|
114
|
+
disabledItemValues?: ToArray<NonNullable<ValueType>>;
|
|
115
115
|
/** Initial value */
|
|
116
116
|
defaultValue?: ValueType;
|
|
117
117
|
/** Current value of the component. Creates a controlled component */
|
|
@@ -134,12 +134,12 @@ export interface SVGIcon {
|
|
|
134
134
|
viewBox: string;
|
|
135
135
|
id: string;
|
|
136
136
|
}
|
|
137
|
-
export interface ItemDataType extends Record<string, any> {
|
|
137
|
+
export interface ItemDataType<T = number | string> extends Record<string, any> {
|
|
138
138
|
label?: string | React.ReactNode;
|
|
139
|
-
value?:
|
|
139
|
+
value?: T;
|
|
140
140
|
groupBy?: string;
|
|
141
|
-
parent?: ItemDataType
|
|
142
|
-
children?: ItemDataType[];
|
|
141
|
+
parent?: ItemDataType<T>;
|
|
142
|
+
children?: ItemDataType<T>[];
|
|
143
143
|
loading?: boolean;
|
|
144
144
|
}
|
|
145
145
|
export interface Offset {
|
|
@@ -148,4 +148,5 @@ export interface Offset {
|
|
|
148
148
|
width?: number;
|
|
149
149
|
height?: number;
|
|
150
150
|
}
|
|
151
|
+
export declare type OnChangeCallback<T, E = React.SyntheticEvent> = (value: T, event: E) => void;
|
|
151
152
|
export {};
|
package/cjs/@types/utils.d.ts
CHANGED
|
@@ -9,3 +9,15 @@ export declare type Pick<T, K extends keyof T> = {
|
|
|
9
9
|
export declare type Exclude<T, U> = T extends U ? never : T;
|
|
10
10
|
export declare type Omit<T, U> = Pick<T, Exclude<keyof T, keyof U>>;
|
|
11
11
|
export declare type ReplaceProps<Inner extends React.ElementType, P> = Omit<React.ComponentPropsWithRef<Inner>, P> & P;
|
|
12
|
+
/**
|
|
13
|
+
* Prepend arguments to function
|
|
14
|
+
* Useful for prepend `newValue` arg to native `onChange` callbacks
|
|
15
|
+
*
|
|
16
|
+
* @see https://stackoverflow.com/a/69668215
|
|
17
|
+
* @example
|
|
18
|
+
*
|
|
19
|
+
* type SomeFunc = (a: string, b: number, c: someCustomType) => number;
|
|
20
|
+
* type SomeFuncAltered = PrependParameters<SomeFunc, [d: number]>;
|
|
21
|
+
* // SomeFuncAltered = (d: number, a:string, b:number, c:someCustomType) => number;
|
|
22
|
+
*/
|
|
23
|
+
export declare type PrependParameters<TFunction extends (...args: any) => any, TParameters extends [...args: any]> = (...args: [...TParameters, ...Parameters<TFunction>]) => ReturnType<TFunction>;
|
package/cjs/Affix/Affix.js
CHANGED
|
@@ -35,7 +35,9 @@ function useOffset(mountRef) {
|
|
|
35
35
|
return mountRef.current;
|
|
36
36
|
}, updateOffset); // Initialize after the first render
|
|
37
37
|
|
|
38
|
-
(0,
|
|
38
|
+
(0, _utils.useMount)(updateOffset); // Update after window size changes
|
|
39
|
+
|
|
40
|
+
(0, _utils.useEventListener)(window, 'resize', updateOffset, false);
|
|
39
41
|
return offset;
|
|
40
42
|
}
|
|
41
43
|
/**
|
|
@@ -78,11 +80,11 @@ function useFixed(offset, containerOffset, props) {
|
|
|
78
80
|
|
|
79
81
|
var scrollY = window.scrollY || window.pageYOffset; // When the scroll distance exceeds the element's top value, it is fixed.
|
|
80
82
|
|
|
81
|
-
var nextFixed = scrollY - (offset.top - top) >= 0; // If the current element is specified in the container,
|
|
83
|
+
var nextFixed = scrollY - (Number(offset.top) - Number(top)) >= 0; // If the current element is specified in the container,
|
|
82
84
|
// add to determine whether the current container is in the window range.
|
|
83
85
|
|
|
84
86
|
if (containerOffset) {
|
|
85
|
-
nextFixed = nextFixed && scrollY < containerOffset.top + containerOffset.height;
|
|
87
|
+
nextFixed = nextFixed && scrollY < Number(containerOffset.top) + Number(containerOffset.height);
|
|
86
88
|
}
|
|
87
89
|
|
|
88
90
|
if (nextFixed !== fixed) {
|
|
@@ -123,8 +125,8 @@ var Affix = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
123
125
|
|
|
124
126
|
var classes = merge(className, (_merge = {}, _merge[withClassPrefix()] = fixed, _merge));
|
|
125
127
|
var placeholderStyles = fixed ? {
|
|
126
|
-
width: offset.width,
|
|
127
|
-
height: offset.height
|
|
128
|
+
width: offset === null || offset === void 0 ? void 0 : offset.width,
|
|
129
|
+
height: offset === null || offset === void 0 ? void 0 : offset.height
|
|
128
130
|
} : undefined;
|
|
129
131
|
var fixedStyles = {
|
|
130
132
|
position: 'fixed',
|
|
@@ -133,7 +135,7 @@ var Affix = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
133
135
|
width: offset === null || offset === void 0 ? void 0 : offset.width,
|
|
134
136
|
zIndex: 10
|
|
135
137
|
};
|
|
136
|
-
var affixStyles = fixed ? fixedStyles :
|
|
138
|
+
var affixStyles = fixed ? fixedStyles : undefined;
|
|
137
139
|
return /*#__PURE__*/_react.default.createElement(Component, (0, _extends2.default)({}, rest, {
|
|
138
140
|
ref: (0, _utils.mergeRefs)(mountRef, ref)
|
|
139
141
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -36,7 +36,7 @@ interface TransitionState {
|
|
|
36
36
|
}
|
|
37
37
|
export declare const transitionPropTypes: {
|
|
38
38
|
animation: PropTypes.Requireable<boolean>;
|
|
39
|
-
children: PropTypes.Requireable<PropTypes.
|
|
39
|
+
children: PropTypes.Requireable<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
|
|
40
40
|
className: PropTypes.Requireable<string>;
|
|
41
41
|
in: PropTypes.Requireable<boolean>;
|
|
42
42
|
unmountOnExit: PropTypes.Requireable<boolean>;
|
|
@@ -53,10 +53,13 @@ export declare const transitionPropTypes: {
|
|
|
53
53
|
onExiting: PropTypes.Requireable<(...args: any[]) => any>;
|
|
54
54
|
onExited: PropTypes.Requireable<(...args: any[]) => any>;
|
|
55
55
|
};
|
|
56
|
+
declare type EventToken = {
|
|
57
|
+
off: () => void;
|
|
58
|
+
};
|
|
56
59
|
declare class Transition extends React.Component<TransitionProps, TransitionState> {
|
|
57
60
|
static propTypes: {
|
|
58
61
|
animation: PropTypes.Requireable<boolean>;
|
|
59
|
-
children: PropTypes.Requireable<PropTypes.
|
|
62
|
+
children: PropTypes.Requireable<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
|
|
60
63
|
className: PropTypes.Requireable<string>;
|
|
61
64
|
in: PropTypes.Requireable<boolean>;
|
|
62
65
|
unmountOnExit: PropTypes.Requireable<boolean>;
|
|
@@ -77,26 +80,32 @@ declare class Transition extends React.Component<TransitionProps, TransitionStat
|
|
|
77
80
|
static defaultProps: {
|
|
78
81
|
timeout: number;
|
|
79
82
|
};
|
|
80
|
-
animationEventListener:
|
|
81
|
-
instanceElement:
|
|
82
|
-
nextCallback:
|
|
83
|
-
|
|
83
|
+
animationEventListener: EventToken | null;
|
|
84
|
+
instanceElement: HTMLElement | null;
|
|
85
|
+
nextCallback: {
|
|
86
|
+
(event?: React.AnimationEvent): void;
|
|
87
|
+
cancel: () => any;
|
|
88
|
+
} | null;
|
|
89
|
+
needsUpdate: boolean | null;
|
|
84
90
|
childRef: React.RefObject<any>;
|
|
85
91
|
constructor(props: TransitionProps);
|
|
86
92
|
static getDerivedStateFromProps(nextProps: TransitionProps, prevState: TransitionState): {
|
|
87
93
|
status: STATUS;
|
|
88
|
-
};
|
|
89
|
-
getSnapshotBeforeUpdate():
|
|
94
|
+
} | null;
|
|
95
|
+
getSnapshotBeforeUpdate(): null;
|
|
90
96
|
componentDidMount(): void;
|
|
91
97
|
componentDidUpdate(): void;
|
|
92
98
|
componentWillUnmount(): void;
|
|
93
|
-
onTransitionEnd(node: HTMLElement, handler: React.
|
|
94
|
-
setNextCallback(callback: React.
|
|
95
|
-
|
|
99
|
+
onTransitionEnd(node: HTMLElement, handler: (event?: React.AnimationEvent) => void): void;
|
|
100
|
+
setNextCallback(callback: (event?: React.AnimationEvent) => void): {
|
|
101
|
+
(event?: React.AnimationEvent<Element> | undefined): void;
|
|
102
|
+
cancel: () => any;
|
|
103
|
+
};
|
|
104
|
+
getChildElement(): HTMLElement;
|
|
96
105
|
performEnter(props: TransitionProps): void;
|
|
97
106
|
performExit(props: TransitionProps): void;
|
|
98
107
|
cancelNextCallback(): void;
|
|
99
|
-
safeSetState(nextState: TransitionState, callback: React.
|
|
108
|
+
safeSetState(nextState: TransitionState, callback: (event?: React.AnimationEvent) => void): void;
|
|
100
109
|
render(): React.ReactNode;
|
|
101
110
|
}
|
|
102
111
|
export default Transition;
|
|
@@ -271,7 +271,10 @@ var Transition = /*#__PURE__*/function (_React$Component) {
|
|
|
271
271
|
|
|
272
272
|
_proto.safeSetState = function safeSetState(nextState, callback) {
|
|
273
273
|
if (this.instanceElement) {
|
|
274
|
-
|
|
274
|
+
var nextCallback = this.setNextCallback(callback);
|
|
275
|
+
this.setState(nextState, function () {
|
|
276
|
+
return nextCallback();
|
|
277
|
+
});
|
|
275
278
|
}
|
|
276
279
|
};
|
|
277
280
|
|
|
@@ -171,7 +171,7 @@ var AutoComplete = /*#__PURE__*/_react.default.forwardRef(function (props, ref)
|
|
|
171
171
|
var classes = merge(className, withClassPrefix({
|
|
172
172
|
disabled: disabled
|
|
173
173
|
}));
|
|
174
|
-
var triggerRef = (0, _react.useRef)();
|
|
174
|
+
var triggerRef = (0, _react.useRef)(null);
|
|
175
175
|
(0, _Picker.usePublicMethods)(ref, {
|
|
176
176
|
triggerRef: triggerRef,
|
|
177
177
|
overlayRef: overlayRef
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ItemDataType } from '../@types/common';
|
|
2
2
|
export declare function transformData(data: any[]): any[];
|
|
3
|
-
export declare const shouldDisplay: (filterBy: (value: string, item: ItemDataType) => boolean, value: any) => (item: any) => boolean;
|
|
3
|
+
export declare const shouldDisplay: (filterBy: ((value: string, item: ItemDataType) => boolean) | undefined, value: any) => (item: any) => boolean;
|