rsuite 6.0.0-canary-20250416 → 6.0.0-canary-20250507
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/AutoComplete/styles/index.css +32 -71
- package/Button/styles/index.css +4 -6
- package/CHANGELOG.md +15 -0
- package/Calendar/styles/index.css +8 -16
- package/CascadeTree/styles/index.css +8 -16
- package/Cascader/styles/index.css +36 -79
- package/CheckPicker/styles/index.css +32 -66
- package/CheckTree/styles/index.css +34 -70
- package/CheckTreePicker/styles/index.css +34 -70
- package/Checkbox/styles/index.css +7 -9
- package/Checkbox/styles/index.less +1 -1
- package/DateInput/styles/index.css +6 -9
- package/DatePicker/styles/index.css +38 -81
- package/DateRangeInput/styles/index.css +6 -9
- package/DateRangePicker/styles/index.css +38 -81
- package/Dropdown/styles/index.css +6 -10
- package/FormControl/styles/index.css +2 -2
- package/FormControl/styles/index.less +2 -2
- package/IconButton/styles/index.css +4 -6
- package/Input/styles/index.css +6 -9
- package/Input/styles/mixin.less +2 -3
- package/InputGroup/styles/index.css +7 -13
- package/InputGroup/styles/index.less +3 -4
- package/InputNumber/styles/index.css +36 -35
- package/InputNumber/styles/index.less +1 -67
- package/InputPicker/styles/index.css +32 -71
- package/Message/styles/index.css +5 -15
- package/Message/styles/index.less +4 -3
- package/MultiCascadeTree/styles/index.css +38 -80
- package/MultiCascader/styles/index.css +38 -80
- package/Nav/styles/index.css +8 -14
- package/Navbar/styles/index.css +16 -40
- package/NumberInput/package.json +7 -0
- package/NumberInput/styles/index.css +1402 -0
- package/NumberInput/styles/index.less +74 -0
- package/{InputNumber → NumberInput}/styles/mixin.less +0 -0
- package/Pagination/styles/index.css +34 -75
- package/PasswordInput/styles/index.css +6 -9
- package/PinInput/package.json +7 -0
- package/PinInput/styles/index.css +212 -0
- package/PinInput/styles/index.less +66 -0
- package/Radio/styles/index.css +7 -9
- package/Radio/styles/index.less +1 -1
- package/RangeSlider/styles/index.css +2 -0
- package/SelectPicker/styles/index.css +32 -71
- package/Sidenav/styles/index.css +30 -67
- package/Slider/styles/index.css +2 -0
- package/Slider/styles/index.less +2 -0
- package/Stat/styles/index.css +4 -6
- package/Tabs/styles/index.css +8 -14
- package/Tag/styles/index.css +0 -15
- package/TagInput/styles/index.css +34 -72
- package/TagPicker/styles/index.css +34 -72
- package/TimePicker/styles/index.css +38 -81
- package/TimeRangePicker/styles/index.css +38 -81
- package/Toggle/styles/index.css +9 -13
- package/Toggle/styles/index.less +3 -4
- package/Tree/styles/index.css +34 -75
- package/TreePicker/styles/index.css +34 -75
- package/Uploader/styles/index.css +6 -10
- package/cjs/Accordion/Accordion.js +2 -2
- package/cjs/Affix/Affix.js +1 -2
- package/cjs/Animation/Bounce.js +1 -2
- package/cjs/Animation/Collapse.js +1 -2
- package/cjs/Animation/Fade.js +1 -2
- package/cjs/Animation/Slide.js +1 -2
- package/cjs/AutoComplete/AutoComplete.d.ts +2 -2
- package/cjs/AutoComplete/AutoComplete.js +1 -2
- package/cjs/Avatar/Avatar.js +1 -2
- package/cjs/AvatarGroup/AvatarGroup.js +1 -2
- package/cjs/Badge/Badge.js +1 -2
- package/cjs/Breadcrumb/Breadcrumb.js +1 -2
- package/cjs/Button/Button.d.ts +2 -2
- package/cjs/Button/Button.js +1 -2
- package/cjs/ButtonGroup/ButtonGroup.d.ts +2 -2
- package/cjs/ButtonGroup/ButtonGroup.js +1 -2
- package/cjs/ButtonToolbar/ButtonToolbar.js +1 -2
- package/cjs/Calendar/Calendar.js +4 -4
- package/cjs/Calendar/CalendarBody.js +1 -4
- package/cjs/Calendar/CalendarContainer.js +1 -1
- package/cjs/Calendar/CalendarHeader.js +3 -3
- package/cjs/Calendar/CalendarProvider.d.ts +1 -1
- package/cjs/Calendar/Grid/GridCell.js +1 -2
- package/cjs/Calendar/Grid/GridHeaderRow.js +1 -2
- package/cjs/Calendar/Grid/GridRow.d.ts +2 -0
- package/cjs/Calendar/Grid/GridRow.js +5 -4
- package/cjs/Calendar/MonthDropdown/MonthDropdownItem.js +1 -2
- package/cjs/Calendar/hooks/useCalendar.d.ts +24 -2
- package/cjs/Calendar/hooks/useCalendar.js +34 -1
- package/cjs/Card/Card.js +1 -2
- package/cjs/CardGroup/CardGroup.js +1 -2
- package/cjs/Carousel/Carousel.js +1 -2
- package/cjs/CascadeTree/CascadeTree.js +1 -2
- package/cjs/CascadeTree/SearchView.js +1 -2
- package/cjs/CascadeTree/TreeView.js +1 -2
- package/cjs/Cascader/Cascader.js +1 -2
- package/cjs/CheckPicker/CheckPicker.js +1 -2
- package/cjs/CheckTree/CheckTree.js +1 -2
- package/cjs/CheckTree/CheckTreeNode.js +1 -2
- package/cjs/CheckTree/CheckTreeView.js +1 -2
- package/cjs/CheckTreePicker/CheckTreePicker.js +1 -2
- package/cjs/Checkbox/Checkbox.js +1 -2
- package/cjs/CheckboxGroup/CheckboxGroup.js +1 -2
- package/cjs/Container/Container.js +1 -2
- package/cjs/CustomProvider/CustomProvider.d.ts +1 -271
- package/cjs/CustomProvider/CustomProvider.js +2 -3
- package/cjs/CustomProvider/index.d.ts +1 -6
- package/cjs/CustomProvider/index.js +3 -12
- package/cjs/DateInput/DateInput.js +1 -2
- package/cjs/DateInput/hooks/useDateInputState.js +2 -2
- package/cjs/DatePicker/DatePicker.js +2 -3
- package/cjs/DatePicker/hooks/useFocus.js +1 -2
- package/cjs/DateRangeInput/DateRangeInput.js +1 -2
- package/cjs/DateRangePicker/DateRangePicker.js +2 -3
- package/cjs/DateRangePicker/Header.js +3 -3
- package/cjs/DateRangePicker/utils.d.ts +1 -1
- package/cjs/DateRangePicker/utils.js +1 -1
- package/cjs/Divider/Divider.js +1 -2
- package/cjs/Drawer/Drawer.js +1 -2
- package/cjs/Dropdown/Dropdown.js +1 -2
- package/cjs/Dropdown/DropdownMenu.js +1 -2
- package/cjs/FlexboxGrid/FlexboxGrid.js +1 -2
- package/cjs/Form/Form.js +1 -2
- package/cjs/Form/FormContext.d.ts +1 -1
- package/cjs/Form/hooks/useFormValidate.js +5 -5
- package/cjs/FormControl/FormControl.js +54 -86
- package/cjs/FormControlLabel/FormControlLabel.js +1 -2
- package/cjs/FormErrorMessage/FormErrorMessage.js +1 -2
- package/cjs/FormGroup/FormGroup.js +1 -2
- package/cjs/FormHelpText/FormHelpText.js +1 -2
- package/cjs/FormStack/FormStack.js +1 -2
- package/cjs/Grid/Col.js +1 -2
- package/cjs/Grid/Grid.js +1 -2
- package/cjs/Grid/Row.js +1 -2
- package/cjs/Heading/Heading.js +1 -2
- package/cjs/Highlight/Highlight.js +2 -3
- package/cjs/IconButton/IconButton.js +1 -2
- package/cjs/Image/Image.js +2 -3
- package/cjs/InlineEdit/InlineEdit.js +1 -2
- package/cjs/Input/Input.js +3 -3
- package/cjs/InputGroup/InputGroup.js +1 -2
- package/cjs/InputNumber/index.d.ts +12 -2
- package/cjs/InputNumber/index.js +11 -4
- package/cjs/InputPicker/InputPicker.js +1 -2
- package/cjs/InputPicker/utils.d.ts +1 -1
- package/cjs/Kbd/Kbd.js +1 -2
- package/cjs/Link/Link.js +1 -2
- package/cjs/List/List.js +1 -2
- package/cjs/Loader/Loader.js +1 -2
- package/cjs/MaskedInput/MaskedInput.js +2 -2
- package/cjs/Message/Message.js +1 -2
- package/cjs/Modal/Modal.js +1 -2
- package/cjs/Modal/ModalHeader.js +1 -2
- package/cjs/MultiCascadeTree/MultiCascadeTree.js +1 -2
- package/cjs/MultiCascadeTree/SearchView.js +1 -2
- package/cjs/MultiCascadeTree/TreeView.js +1 -2
- package/cjs/MultiCascader/MultiCascader.js +1 -2
- package/cjs/Nav/Nav.js +1 -2
- package/cjs/Nav/NavDropdownMenu.js +1 -2
- package/cjs/Navbar/Navbar.d.ts +1 -1
- package/cjs/Navbar/Navbar.js +1 -2
- package/cjs/Navbar/NavbarDropdownMenu.js +1 -2
- package/cjs/Navbar/NavbarToggle.d.ts +8 -3
- package/cjs/Navbar/NavbarToggle.js +9 -14
- package/cjs/Notification/Notification.js +1 -2
- package/{esm/InputNumber/InputNumber.d.ts → cjs/NumberInput/NumberInput.d.ts} +20 -8
- package/cjs/NumberInput/NumberInput.js +162 -0
- package/cjs/NumberInput/hooks/useEvents.d.ts +22 -0
- package/cjs/NumberInput/hooks/useEvents.js +114 -0
- package/cjs/NumberInput/hooks/useNumberInputValue.d.ts +7 -0
- package/cjs/NumberInput/hooks/useNumberInputValue.js +34 -0
- package/cjs/NumberInput/hooks/useWheelHandler.d.ts +5 -0
- package/cjs/NumberInput/hooks/useWheelHandler.js +25 -0
- package/cjs/NumberInput/index.d.ts +4 -0
- package/cjs/NumberInput/index.js +11 -0
- package/cjs/NumberInput/utils/number.d.ts +17 -0
- package/cjs/NumberInput/utils/number.js +67 -0
- package/cjs/Pagination/LimitPicker.d.ts +2 -2
- package/cjs/Pagination/Pagination.d.ts +2 -2
- package/cjs/Pagination/Pagination.js +1 -2
- package/cjs/Pagination/PaginationGroup.js +1 -2
- package/cjs/Panel/Panel.js +1 -2
- package/cjs/PanelGroup/PanelGroup.js +1 -2
- package/cjs/PasswordInput/PasswordInput.d.ts +4 -0
- package/cjs/PasswordInput/PasswordInput.js +5 -4
- package/cjs/PasswordStrengthMeter/PasswordStrengthMeter.js +1 -2
- package/cjs/PinInput/PinInput.d.ts +36 -0
- package/cjs/PinInput/PinInput.js +224 -0
- package/cjs/PinInput/hooks/usePinInputRefs.d.ts +12 -0
- package/cjs/PinInput/hooks/usePinInputRefs.js +62 -0
- package/cjs/PinInput/hooks/usePinValue.d.ts +14 -0
- package/cjs/PinInput/hooks/usePinValue.js +73 -0
- package/cjs/PinInput/index.d.ts +4 -0
- package/cjs/PinInput/index.js +9 -0
- package/cjs/Placeholder/PlaceholderGraph.js +1 -2
- package/cjs/Placeholder/PlaceholderGrid.js +1 -2
- package/cjs/Placeholder/PlaceholderParagraph.js +1 -2
- package/cjs/Popover/Popover.js +1 -2
- package/cjs/Progress/ProgressCircle.js +1 -2
- package/cjs/Progress/ProgressLine.js +1 -2
- package/cjs/Radio/Radio.js +1 -2
- package/cjs/RadioGroup/RadioGroup.js +1 -2
- package/cjs/RadioTile/RadioTile.js +1 -2
- package/cjs/RadioTileGroup/RadioTileGroup.js +1 -2
- package/cjs/RangeSlider/RangeSlider.js +2 -3
- package/cjs/Rate/Rate.js +1 -2
- package/cjs/SelectPicker/SelectPicker.js +1 -2
- package/cjs/Sidebar/Sidebar.js +1 -2
- package/cjs/Sidenav/ExpandedSidenavDropdownMenu.js +1 -2
- package/cjs/Sidenav/Sidenav.js +1 -2
- package/cjs/Sidenav/SidenavDropdownMenu.js +1 -2
- package/cjs/Slider/Slider.d.ts +5 -1
- package/cjs/Slider/Slider.js +13 -14
- package/cjs/Stack/Stack.js +1 -2
- package/cjs/Stat/Stat.js +1 -2
- package/cjs/Stat/StatValue.js +2 -2
- package/cjs/StatGroup/StatGroup.js +1 -2
- package/cjs/Steps/Steps.js +1 -2
- package/cjs/Table/Table.js +2 -2
- package/cjs/Tabs/Tabs.js +1 -2
- package/cjs/Tag/Tag.js +1 -2
- package/cjs/TagInput/TagInput.js +2 -2
- package/cjs/TagPicker/TagPicker.js +2 -2
- package/cjs/Text/Text.js +1 -2
- package/cjs/Textarea/Textarea.js +1 -2
- package/cjs/TimePicker/TimePicker.d.ts +1 -2
- package/cjs/TimePicker/TimePicker.js +2 -2
- package/cjs/TimeRangePicker/TimeRangePicker.js +2 -2
- package/cjs/Timeline/Timeline.js +1 -2
- package/cjs/Toggle/Toggle.js +1 -2
- package/cjs/Tooltip/Tooltip.js +1 -2
- package/cjs/Tree/Tree.js +1 -2
- package/cjs/Tree/TreeNode.js +1 -2
- package/cjs/Tree/TreeNodeToggle.js +1 -2
- package/cjs/Tree/TreeView.js +1 -2
- package/cjs/Tree/hooks/useFocusTree.js +1 -2
- package/cjs/TreePicker/TreePicker.js +1 -2
- package/cjs/Uploader/Uploader.js +1 -2
- package/cjs/Whisper/Whisper.js +2 -2
- package/cjs/index.d.ts +3 -0
- package/cjs/index.js +18 -0
- package/cjs/internals/Box/index.d.ts +1 -0
- package/cjs/internals/Box/index.js +1 -0
- package/cjs/internals/Burger/Burger.d.ts +16 -0
- package/cjs/internals/Burger/Burger.js +46 -0
- package/cjs/internals/Burger/index.d.ts +4 -0
- package/cjs/internals/Burger/index.js +11 -0
- package/cjs/internals/CloseButton/CloseButton.js +1 -2
- package/cjs/internals/Menu/Menu.js +1 -2
- package/cjs/internals/Menu/Menubar.js +2 -2
- package/cjs/internals/Picker/PickerIndicator.js +1 -2
- package/cjs/internals/Picker/hooks/useCombobox.d.ts +1 -1
- package/cjs/internals/Plaintext/Plaintext.js +1 -2
- package/cjs/internals/Provider/CustomContext.d.ts +253 -0
- package/cjs/internals/Provider/CustomContext.js +8 -0
- package/cjs/internals/Provider/types.d.ts +236 -0
- package/cjs/internals/Ripple/Ripple.js +1 -2
- package/cjs/internals/SafeAnchor/SafeAnchor.js +2 -2
- package/cjs/internals/Windowing/List.js +2 -2
- package/cjs/internals/hooks/index.d.ts +1 -0
- package/cjs/internals/hooks/index.js +3 -1
- package/cjs/{CustomProvider → internals/hooks}/useCustom.d.ts +4 -4
- package/cjs/{CustomProvider → internals/hooks}/useCustom.js +5 -5
- package/cjs/internals/hooks/useStyles.js +2 -2
- package/cjs/internals/hooks/useToggleCaret.js +2 -2
- package/cjs/{CustomProvider → internals/intl}/FormattedDate.js +2 -2
- package/cjs/{CustomProvider → internals/intl}/FormattedNumber.js +2 -2
- package/cjs/internals/types/picker.d.ts +2 -2
- package/cjs/internals/types/sizes.d.ts +2 -0
- package/cjs/internals/types/sizes.js +2 -1
- package/cjs/internals/utils/date/getWeekStartDates.d.ts +0 -1
- package/cjs/internals/utils/date/getWeekStartDates.js +2 -4
- package/cjs/internals/utils/react/createComponent.js +15 -4
- package/cjs/{FormControl → useFormControl}/hooks/useField.d.ts +3 -3
- package/cjs/{FormControl → useFormControl}/hooks/useField.js +5 -6
- package/cjs/useFormControl/hooks/useRegisterModel.d.ts +2 -0
- package/cjs/{FormControl → useFormControl}/hooks/useRegisterModel.js +2 -3
- package/cjs/useFormControl/index.d.ts +4 -0
- package/cjs/useFormControl/index.js +11 -0
- package/cjs/useFormControl/useFormControl.d.ts +38 -0
- package/cjs/useFormControl/useFormControl.js +138 -0
- package/cjs/{FormControl/utils.js → useFormControl/utils/nameToPath.js} +0 -0
- package/cjs/useToaster/useToaster.js +2 -5
- package/dist/rsuite-no-reset-rtl.css +246 -265
- package/dist/rsuite-no-reset-rtl.min.css +1 -1
- package/dist/rsuite-no-reset-rtl.min.css.map +1 -1
- package/dist/rsuite-no-reset.css +246 -265
- package/dist/rsuite-no-reset.min.css +1 -1
- package/dist/rsuite-no-reset.min.css.map +1 -1
- package/dist/rsuite-rtl.css +246 -265
- package/dist/rsuite-rtl.min.css +1 -1
- package/dist/rsuite-rtl.min.css.map +1 -1
- package/dist/rsuite.css +246 -265
- package/dist/rsuite.js +389 -257
- 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/Accordion/Accordion.js +1 -1
- package/esm/Affix/Affix.js +1 -2
- package/esm/Animation/Bounce.js +1 -2
- package/esm/Animation/Collapse.js +1 -2
- package/esm/Animation/Fade.js +1 -2
- package/esm/Animation/Slide.js +1 -2
- package/esm/AutoComplete/AutoComplete.d.ts +2 -2
- package/esm/AutoComplete/AutoComplete.js +1 -2
- package/esm/Avatar/Avatar.js +1 -2
- package/esm/AvatarGroup/AvatarGroup.js +1 -2
- package/esm/Badge/Badge.js +1 -2
- package/esm/Breadcrumb/Breadcrumb.js +1 -2
- package/esm/Button/Button.d.ts +2 -2
- package/esm/Button/Button.js +1 -2
- package/esm/ButtonGroup/ButtonGroup.d.ts +2 -2
- package/esm/ButtonGroup/ButtonGroup.js +1 -2
- package/esm/ButtonToolbar/ButtonToolbar.js +1 -2
- package/esm/Calendar/Calendar.js +3 -4
- package/esm/Calendar/CalendarBody.js +1 -4
- package/esm/Calendar/CalendarContainer.js +1 -1
- package/esm/Calendar/CalendarHeader.js +1 -1
- package/esm/Calendar/CalendarProvider.d.ts +1 -1
- package/esm/Calendar/Grid/GridCell.js +1 -2
- package/esm/Calendar/Grid/GridHeaderRow.js +1 -2
- package/esm/Calendar/Grid/GridRow.d.ts +2 -0
- package/esm/Calendar/Grid/GridRow.js +5 -4
- package/esm/Calendar/MonthDropdown/MonthDropdownItem.js +1 -2
- package/esm/Calendar/hooks/useCalendar.d.ts +24 -2
- package/esm/Calendar/hooks/useCalendar.js +35 -2
- package/esm/Card/Card.js +1 -2
- package/esm/CardGroup/CardGroup.js +1 -2
- package/esm/Carousel/Carousel.js +1 -2
- package/esm/CascadeTree/CascadeTree.js +1 -2
- package/esm/CascadeTree/SearchView.js +1 -2
- package/esm/CascadeTree/TreeView.js +1 -2
- package/esm/Cascader/Cascader.js +1 -2
- package/esm/CheckPicker/CheckPicker.js +1 -2
- package/esm/CheckTree/CheckTree.js +1 -2
- package/esm/CheckTree/CheckTreeNode.js +1 -2
- package/esm/CheckTree/CheckTreeView.js +1 -2
- package/esm/CheckTreePicker/CheckTreePicker.js +1 -2
- package/esm/Checkbox/Checkbox.js +1 -2
- package/esm/CheckboxGroup/CheckboxGroup.js +1 -2
- package/esm/Container/Container.js +1 -2
- package/esm/CustomProvider/CustomProvider.d.ts +1 -271
- package/esm/CustomProvider/CustomProvider.js +1 -1
- package/esm/CustomProvider/index.d.ts +1 -6
- package/esm/CustomProvider/index.js +0 -6
- package/esm/DateInput/DateInput.js +1 -2
- package/esm/DateInput/hooks/useDateInputState.js +1 -1
- package/esm/DatePicker/DatePicker.js +2 -3
- package/esm/DatePicker/hooks/useFocus.js +1 -2
- package/esm/DateRangeInput/DateRangeInput.js +1 -2
- package/esm/DateRangePicker/DateRangePicker.js +2 -3
- package/esm/DateRangePicker/Header.js +1 -1
- package/esm/DateRangePicker/utils.d.ts +1 -1
- package/esm/DateRangePicker/utils.js +1 -1
- package/esm/Divider/Divider.js +1 -2
- package/esm/Drawer/Drawer.js +1 -2
- package/esm/Dropdown/Dropdown.js +1 -2
- package/esm/Dropdown/DropdownMenu.js +1 -2
- package/esm/FlexboxGrid/FlexboxGrid.js +1 -2
- package/esm/Form/Form.js +1 -2
- package/esm/Form/FormContext.d.ts +1 -1
- package/esm/Form/hooks/useFormValidate.js +1 -1
- package/esm/FormControl/FormControl.js +54 -85
- package/esm/FormControlLabel/FormControlLabel.js +1 -2
- package/esm/FormErrorMessage/FormErrorMessage.js +1 -2
- package/esm/FormGroup/FormGroup.js +1 -2
- package/esm/FormHelpText/FormHelpText.js +1 -2
- package/esm/FormStack/FormStack.js +1 -2
- package/esm/Grid/Col.js +1 -2
- package/esm/Grid/Grid.js +1 -2
- package/esm/Grid/Row.js +1 -2
- package/esm/Heading/Heading.js +1 -2
- package/esm/Highlight/Highlight.js +2 -3
- package/esm/IconButton/IconButton.js +1 -2
- package/esm/Image/Image.js +2 -3
- package/esm/InlineEdit/InlineEdit.js +1 -2
- package/esm/Input/Input.js +2 -2
- package/esm/InputGroup/InputGroup.js +1 -2
- package/esm/InputNumber/index.d.ts +12 -2
- package/esm/InputNumber/index.js +8 -1
- package/esm/InputPicker/InputPicker.js +1 -2
- package/esm/InputPicker/utils.d.ts +1 -1
- package/esm/Kbd/Kbd.js +1 -2
- package/esm/Link/Link.js +1 -2
- package/esm/List/List.js +1 -2
- package/esm/Loader/Loader.js +1 -2
- package/esm/MaskedInput/MaskedInput.js +1 -1
- package/esm/Message/Message.js +1 -2
- package/esm/Modal/Modal.js +1 -2
- package/esm/Modal/ModalHeader.js +1 -2
- package/esm/MultiCascadeTree/MultiCascadeTree.js +1 -2
- package/esm/MultiCascadeTree/SearchView.js +1 -2
- package/esm/MultiCascadeTree/TreeView.js +1 -2
- package/esm/MultiCascader/MultiCascader.js +1 -2
- package/esm/Nav/Nav.js +1 -2
- package/esm/Nav/NavDropdownMenu.js +1 -2
- package/esm/Navbar/Navbar.d.ts +1 -1
- package/esm/Navbar/Navbar.js +1 -2
- package/esm/Navbar/NavbarDropdownMenu.js +1 -2
- package/esm/Navbar/NavbarToggle.d.ts +8 -3
- package/esm/Navbar/NavbarToggle.js +10 -15
- package/esm/Notification/Notification.js +1 -2
- package/{cjs/InputNumber/InputNumber.d.ts → esm/NumberInput/NumberInput.d.ts} +20 -8
- package/esm/NumberInput/NumberInput.js +157 -0
- package/esm/NumberInput/hooks/useEvents.d.ts +22 -0
- package/esm/NumberInput/hooks/useEvents.js +110 -0
- package/esm/NumberInput/hooks/useNumberInputValue.d.ts +7 -0
- package/esm/NumberInput/hooks/useNumberInputValue.js +29 -0
- package/esm/NumberInput/hooks/useWheelHandler.d.ts +5 -0
- package/esm/NumberInput/hooks/useWheelHandler.js +21 -0
- package/esm/NumberInput/index.d.ts +4 -0
- package/esm/NumberInput/index.js +8 -0
- package/esm/NumberInput/utils/number.d.ts +17 -0
- package/esm/NumberInput/utils/number.js +59 -0
- package/esm/Pagination/LimitPicker.d.ts +2 -2
- package/esm/Pagination/Pagination.d.ts +2 -2
- package/esm/Pagination/Pagination.js +1 -2
- package/esm/Pagination/PaginationGroup.js +1 -2
- package/esm/Panel/Panel.js +1 -2
- package/esm/PanelGroup/PanelGroup.js +1 -2
- package/esm/PasswordInput/PasswordInput.d.ts +4 -0
- package/esm/PasswordInput/PasswordInput.js +5 -4
- package/esm/PasswordStrengthMeter/PasswordStrengthMeter.js +1 -2
- package/esm/PinInput/PinInput.d.ts +36 -0
- package/esm/PinInput/PinInput.js +219 -0
- package/esm/PinInput/hooks/usePinInputRefs.d.ts +12 -0
- package/esm/PinInput/hooks/usePinInputRefs.js +58 -0
- package/esm/PinInput/hooks/usePinValue.d.ts +14 -0
- package/esm/PinInput/hooks/usePinValue.js +69 -0
- package/esm/PinInput/index.d.ts +4 -0
- package/esm/PinInput/index.js +4 -0
- package/esm/Placeholder/PlaceholderGraph.js +1 -2
- package/esm/Placeholder/PlaceholderGrid.js +1 -2
- package/esm/Placeholder/PlaceholderParagraph.js +1 -2
- package/esm/Popover/Popover.js +1 -2
- package/esm/Progress/ProgressCircle.js +1 -2
- package/esm/Progress/ProgressLine.js +1 -2
- package/esm/Radio/Radio.js +1 -2
- package/esm/RadioGroup/RadioGroup.js +1 -2
- package/esm/RadioTile/RadioTile.js +1 -2
- package/esm/RadioTileGroup/RadioTileGroup.js +1 -2
- package/esm/RangeSlider/RangeSlider.js +1 -2
- package/esm/Rate/Rate.js +1 -2
- package/esm/SelectPicker/SelectPicker.js +1 -2
- package/esm/Sidebar/Sidebar.js +1 -2
- package/esm/Sidenav/ExpandedSidenavDropdownMenu.js +1 -2
- package/esm/Sidenav/Sidenav.js +1 -2
- package/esm/Sidenav/SidenavDropdownMenu.js +1 -2
- package/esm/Slider/Slider.d.ts +5 -1
- package/esm/Slider/Slider.js +12 -13
- package/esm/Stack/Stack.js +1 -2
- package/esm/Stat/Stat.js +1 -2
- package/esm/Stat/StatValue.js +1 -1
- package/esm/StatGroup/StatGroup.js +1 -2
- package/esm/Steps/Steps.js +1 -2
- package/esm/Table/Table.js +1 -1
- package/esm/Tabs/Tabs.js +1 -2
- package/esm/Tag/Tag.js +1 -2
- package/esm/TagInput/TagInput.js +1 -1
- package/esm/TagPicker/TagPicker.js +1 -1
- package/esm/Text/Text.js +1 -2
- package/esm/Textarea/Textarea.js +1 -2
- package/esm/TimePicker/TimePicker.d.ts +1 -2
- package/esm/TimePicker/TimePicker.js +1 -1
- package/esm/TimeRangePicker/TimeRangePicker.js +1 -1
- package/esm/Timeline/Timeline.js +1 -2
- package/esm/Toggle/Toggle.js +1 -2
- package/esm/Tooltip/Tooltip.js +1 -2
- package/esm/Tree/Tree.js +1 -2
- package/esm/Tree/TreeNode.js +1 -2
- package/esm/Tree/TreeNodeToggle.js +1 -2
- package/esm/Tree/TreeView.js +1 -2
- package/esm/Tree/hooks/useFocusTree.js +1 -2
- package/esm/TreePicker/TreePicker.js +1 -2
- package/esm/Uploader/Uploader.js +1 -2
- package/esm/Whisper/Whisper.js +1 -1
- package/esm/index.d.ts +3 -0
- package/esm/index.js +3 -0
- package/esm/internals/Box/index.d.ts +1 -0
- package/esm/internals/Box/index.js +1 -0
- package/esm/internals/Burger/Burger.d.ts +16 -0
- package/esm/internals/Burger/Burger.js +41 -0
- package/esm/internals/Burger/index.d.ts +4 -0
- package/esm/internals/Burger/index.js +8 -0
- package/esm/internals/CloseButton/CloseButton.js +1 -2
- package/esm/internals/Menu/Menu.js +1 -1
- package/esm/internals/Menu/Menubar.js +1 -1
- package/esm/internals/Picker/PickerIndicator.js +1 -2
- package/esm/internals/Picker/hooks/useCombobox.d.ts +1 -1
- package/esm/internals/Plaintext/Plaintext.js +1 -2
- package/esm/internals/Provider/CustomContext.d.ts +253 -0
- package/esm/internals/Provider/CustomContext.js +3 -0
- package/esm/internals/Provider/types.d.ts +236 -0
- package/esm/internals/Ripple/Ripple.js +1 -2
- package/esm/internals/SafeAnchor/SafeAnchor.js +1 -1
- package/esm/internals/Windowing/List.js +1 -1
- package/esm/internals/hooks/index.d.ts +1 -0
- package/esm/internals/hooks/index.js +1 -0
- package/esm/{CustomProvider → internals/hooks}/useCustom.d.ts +4 -4
- package/esm/{CustomProvider → internals/hooks}/useCustom.js +4 -4
- package/esm/internals/hooks/useStyles.js +1 -1
- package/esm/internals/hooks/useToggleCaret.js +1 -1
- package/esm/{CustomProvider → internals/intl}/FormattedDate.js +1 -1
- package/esm/{CustomProvider → internals/intl}/FormattedNumber.js +1 -1
- package/esm/internals/types/picker.d.ts +2 -2
- package/esm/internals/types/sizes.d.ts +2 -0
- package/esm/internals/types/sizes.js +3 -1
- package/esm/internals/utils/date/getWeekStartDates.d.ts +0 -1
- package/esm/internals/utils/date/getWeekStartDates.js +2 -4
- package/esm/internals/utils/react/createComponent.js +12 -2
- package/esm/{FormControl → useFormControl}/hooks/useField.d.ts +3 -3
- package/esm/{FormControl → useFormControl}/hooks/useField.js +4 -5
- package/esm/useFormControl/hooks/useRegisterModel.d.ts +2 -0
- package/esm/{FormControl → useFormControl}/hooks/useRegisterModel.js +2 -3
- package/esm/useFormControl/index.d.ts +4 -0
- package/esm/useFormControl/index.js +8 -0
- package/esm/useFormControl/useFormControl.d.ts +38 -0
- package/esm/useFormControl/useFormControl.js +133 -0
- package/esm/{FormControl/utils.js → useFormControl/utils/nameToPath.js} +0 -0
- package/esm/useToaster/useToaster.js +1 -3
- package/internals/Burger/styles/index.less +67 -0
- package/internals/CloseButton/styles/index.less +0 -10
- package/internals/Picker/styles/index.less +13 -10
- package/internals/Picker/styles/mixin.less +3 -3
- package/package.json +3 -3
- package/styles/color-modes/dark.less +7 -10
- package/styles/color-modes/high-contrast.less +3 -6
- package/styles/color-modes/light.less +5 -8
- package/styles/index.less +3 -1
- package/styles/mixins/utilities.less +2 -5
- package/useFormControl/package.json +7 -0
- package/cjs/CustomProvider/types.d.ts +0 -234
- package/cjs/FormControl/hooks/useRegisterModel.d.ts +0 -3
- package/cjs/InputNumber/InputNumber.js +0 -300
- package/esm/CustomProvider/types.d.ts +0 -234
- package/esm/FormControl/hooks/useRegisterModel.d.ts +0 -3
- package/esm/InputNumber/InputNumber.js +0 -293
- /package/cjs/{CustomProvider → internals/Provider}/types.js +0 -0
- /package/cjs/{CustomProvider → internals/intl}/FormattedDate.d.ts +0 -0
- /package/cjs/{CustomProvider → internals/intl}/FormattedNumber.d.ts +0 -0
- /package/cjs/{FormControl/utils.d.ts → useFormControl/utils/nameToPath.d.ts} +0 -0
- /package/esm/{CustomProvider → internals/Provider}/types.js +0 -0
- /package/esm/{CustomProvider → internals/intl}/FormattedDate.d.ts +0 -0
- /package/esm/{CustomProvider → internals/intl}/FormattedNumber.d.ts +0 -0
- /package/esm/{FormControl/utils.d.ts → useFormControl/utils/nameToPath.d.ts} +0 -0
|
@@ -4,7 +4,7 @@ import React from 'react';
|
|
|
4
4
|
import PanelGroup from "../PanelGroup/index.js";
|
|
5
5
|
import AccordionPanel from "./AccordionPanel.js";
|
|
6
6
|
import { forwardRef } from "../internals/utils/index.js";
|
|
7
|
-
import { useCustom } from "../
|
|
7
|
+
import { useCustom } from "../internals/hooks/index.js";
|
|
8
8
|
const Subcomponents = {
|
|
9
9
|
Panel: AccordionPanel
|
|
10
10
|
};
|
package/esm/Affix/Affix.js
CHANGED
|
@@ -4,9 +4,8 @@ import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
|
4
4
|
import debounce from 'lodash/debounce';
|
|
5
5
|
import getOffset from 'dom-lib/getOffset';
|
|
6
6
|
import Box from "../internals/Box/index.js";
|
|
7
|
-
import { useStyles, useElementResize, useEventListener, useMount } from "../internals/hooks/index.js";
|
|
7
|
+
import { useStyles, useElementResize, useEventListener, useCustom, useMount } from "../internals/hooks/index.js";
|
|
8
8
|
import { mergeRefs, forwardRef } from "../internals/utils/index.js";
|
|
9
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
10
9
|
/**
|
|
11
10
|
* Get the layout size and offset of the mount element
|
|
12
11
|
*/
|
package/esm/Animation/Bounce.js
CHANGED
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import Transition from "./Transition.js";
|
|
5
|
-
import { useStyles } from "../internals/hooks/index.js";
|
|
6
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
5
|
+
import { useStyles, useCustom } from "../internals/hooks/index.js";
|
|
7
6
|
/**
|
|
8
7
|
* Bounce animation component
|
|
9
8
|
* @see https://rsuitejs.com/components/animation/#bounce
|
|
@@ -6,9 +6,8 @@ import addStyle from 'dom-lib/addStyle';
|
|
|
6
6
|
import get from 'lodash/get';
|
|
7
7
|
import capitalize from 'lodash/capitalize';
|
|
8
8
|
import Transition from "./Transition.js";
|
|
9
|
-
import { useStyles } from "../internals/hooks/index.js";
|
|
9
|
+
import { useStyles, useCustom } from "../internals/hooks/index.js";
|
|
10
10
|
import { createChainedFunction } from "../internals/utils/index.js";
|
|
11
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
12
11
|
export let DIMENSION = /*#__PURE__*/function (DIMENSION) {
|
|
13
12
|
DIMENSION["HEIGHT"] = "height";
|
|
14
13
|
DIMENSION["WIDTH"] = "width";
|
package/esm/Animation/Fade.js
CHANGED
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import Transition from "./Transition.js";
|
|
5
|
-
import { useStyles } from "../internals/hooks/index.js";
|
|
6
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
5
|
+
import { useStyles, useCustom } from "../internals/hooks/index.js";
|
|
7
6
|
/**
|
|
8
7
|
* Fade animation component
|
|
9
8
|
* @see https://rsuitejs.com/components/animation/#fade
|
package/esm/Animation/Slide.js
CHANGED
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import Transition from "./Transition.js";
|
|
5
|
-
import { useStyles } from "../internals/hooks/index.js";
|
|
6
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
5
|
+
import { useStyles, useCustom } from "../internals/hooks/index.js";
|
|
7
6
|
/**
|
|
8
7
|
* Slide animation component
|
|
9
8
|
* @see https://rsuitejs.com/components/animation/#slide
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { FormControlPickerProps, Placement, Option,
|
|
2
|
+
import type { FormControlPickerProps, Placement, Option, BasicSize, ListboxProps, PopupProps } from '../internals/types';
|
|
3
3
|
import type { BoxProps } from '../internals/Box';
|
|
4
4
|
export interface AutoCompleteProps<T = string> extends BoxProps, FormControlPickerProps<T, any, Option | string>, ListboxProps, PopupProps {
|
|
5
5
|
/** The placement of component */
|
|
@@ -7,7 +7,7 @@ export interface AutoCompleteProps<T = string> extends BoxProps, FormControlPick
|
|
|
7
7
|
/** When set to false, the Enter key selection function is invalid */
|
|
8
8
|
selectOnEnter?: boolean;
|
|
9
9
|
/** A component can have different sizes */
|
|
10
|
-
size?:
|
|
10
|
+
size?: BasicSize;
|
|
11
11
|
/** Open the menu and control it */
|
|
12
12
|
open?: boolean;
|
|
13
13
|
/** Placeholder text */
|
|
@@ -5,10 +5,9 @@ import pick from 'lodash/pick';
|
|
|
5
5
|
import omit from 'lodash/omit';
|
|
6
6
|
import Combobox from "./Combobox.js";
|
|
7
7
|
import Plaintext from "../internals/Plaintext/index.js";
|
|
8
|
-
import { useStyles, useControlled, useIsMounted, useEventCallback } from "../internals/hooks/index.js";
|
|
8
|
+
import { useStyles, useCustom, useControlled, useIsMounted, useEventCallback } from "../internals/hooks/index.js";
|
|
9
9
|
import { forwardRef, mergeRefs, partitionHTMLProps } from "../internals/utils/index.js";
|
|
10
10
|
import { transformData, shouldDisplay } from "./utils.js";
|
|
11
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
12
11
|
import { PickerToggleTrigger, onMenuKeyDown, Listbox, ListItem, PickerPopup, useFocusItemValue, usePickerRef, triggerPropKeys } from "../internals/Picker/index.js";
|
|
13
12
|
/**
|
|
14
13
|
* Autocomplete function of input field.
|
package/esm/Avatar/Avatar.js
CHANGED
|
@@ -4,10 +4,9 @@ import React, { useContext, useMemo } from 'react';
|
|
|
4
4
|
import StyledBox from "../internals/StyledBox/index.js";
|
|
5
5
|
import AvatarIcon from "./AvatarIcon.js";
|
|
6
6
|
import useImage from "./useImage.js";
|
|
7
|
-
import { useStyles } from "../internals/hooks/index.js";
|
|
7
|
+
import { useStyles, useCustom } from "../internals/hooks/index.js";
|
|
8
8
|
import { forwardRef } from "../internals/utils/index.js";
|
|
9
9
|
import { AvatarGroupContext } from "../AvatarGroup/AvatarGroup.js";
|
|
10
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
11
10
|
/**
|
|
12
11
|
* The Avatar component is used to represent user or brand.
|
|
13
12
|
* @see https://rsuitejs.com/components/avatar
|
|
@@ -3,8 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
3
3
|
import React, { useMemo } from 'react';
|
|
4
4
|
import Box from "../internals/Box/index.js";
|
|
5
5
|
import { forwardRef, getCssValue, mergeStyles } from "../internals/utils/index.js";
|
|
6
|
-
import { useStyles } from "../internals/hooks/index.js";
|
|
7
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
6
|
+
import { useStyles, useCustom } from "../internals/hooks/index.js";
|
|
8
7
|
export const AvatarGroupContext = /*#__PURE__*/React.createContext({});
|
|
9
8
|
|
|
10
9
|
/**
|
package/esm/Badge/Badge.js
CHANGED
|
@@ -3,8 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
3
3
|
import React, { useMemo } from 'react';
|
|
4
4
|
import kebabCase from 'lodash/kebabCase';
|
|
5
5
|
import Box from "../internals/Box/index.js";
|
|
6
|
-
import { useStyles } from "../internals/hooks/index.js";
|
|
7
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
6
|
+
import { useStyles, useCustom } from "../internals/hooks/index.js";
|
|
8
7
|
import { forwardRef, mergeStyles, createOffsetStyles, isPresetColor, createColorVariables } from "../internals/utils/index.js";
|
|
9
8
|
/**
|
|
10
9
|
* The Badge component is usually used to mark or highlight the status or quantity of an object.
|
|
@@ -3,9 +3,8 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
3
3
|
import React, { useState, useMemo } from 'react';
|
|
4
4
|
import BreadcrumbItem from "./BreadcrumbItem.js";
|
|
5
5
|
import StyledBox from "../internals/StyledBox/index.js";
|
|
6
|
-
import { useStyles, useEventCallback } from "../internals/hooks/index.js";
|
|
6
|
+
import { useStyles, useCustom, useEventCallback } from "../internals/hooks/index.js";
|
|
7
7
|
import { forwardRef, rch, createComponent } from "../internals/utils/index.js";
|
|
8
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
9
8
|
const Subcomponents = {
|
|
10
9
|
Item: BreadcrumbItem
|
|
11
10
|
};
|
package/esm/Button/Button.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BoxProps } from '../internals/Box';
|
|
3
|
-
import { Color,
|
|
3
|
+
import { Color, BasicSize, AppearanceType } from '../internals/types';
|
|
4
4
|
export interface ButtonProps extends BoxProps, Omit<React.HTMLAttributes<HTMLElement>, 'onToggle'> {
|
|
5
5
|
/** A button can have different appearances. */
|
|
6
6
|
appearance?: AppearanceType;
|
|
7
7
|
/** A button can show it is currently the active user selection */
|
|
8
8
|
active?: boolean;
|
|
9
9
|
/** A button can have different sizes */
|
|
10
|
-
size?:
|
|
10
|
+
size?: BasicSize;
|
|
11
11
|
/** A button can have different colors */
|
|
12
12
|
color?: Color;
|
|
13
13
|
/** Format button to appear inside a content block */
|
package/esm/Button/Button.js
CHANGED
|
@@ -6,8 +6,7 @@ import Box from "../internals/Box/index.js";
|
|
|
6
6
|
import SafeAnchor from "../internals/SafeAnchor/index.js";
|
|
7
7
|
import { ButtonGroupContext } from "../ButtonGroup/index.js";
|
|
8
8
|
import { forwardRef, isOneOf, isDisableableElement } from "../internals/utils/index.js";
|
|
9
|
-
import { useStyles, useControlled, useEventCallback } from "../internals/hooks/index.js";
|
|
10
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
9
|
+
import { useStyles, useCustom, useControlled, useEventCallback } from "../internals/hooks/index.js";
|
|
11
10
|
/**
|
|
12
11
|
* The Button component is used to trigger a custom action.
|
|
13
12
|
* @see https://rsuitejs.com/components/button
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BoxProps } from '../internals/Box';
|
|
2
|
-
import type {
|
|
2
|
+
import type { BasicSize } from '../internals/types';
|
|
3
3
|
export interface ButtonGroupProps extends BoxProps {
|
|
4
4
|
/** Display block buttongroups */
|
|
5
5
|
block?: boolean;
|
|
@@ -18,7 +18,7 @@ export interface ButtonGroupProps extends BoxProps {
|
|
|
18
18
|
*/
|
|
19
19
|
role?: string;
|
|
20
20
|
/** A button group can have different sizes */
|
|
21
|
-
size?:
|
|
21
|
+
size?: BasicSize;
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* The ButtonGroup component is used to group a series of buttons together in a single line or column.
|
|
@@ -4,8 +4,7 @@ import React, { useMemo } from 'react';
|
|
|
4
4
|
import ButtonGroupContext from "./ButtonGroupContext.js";
|
|
5
5
|
import Box from "../internals/Box/index.js";
|
|
6
6
|
import { forwardRef } from "../internals/utils/index.js";
|
|
7
|
-
import { useStyles } from "../internals/hooks/index.js";
|
|
8
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
7
|
+
import { useStyles, useCustom } from "../internals/hooks/index.js";
|
|
9
8
|
/**
|
|
10
9
|
* The ButtonGroup component is used to group a series of buttons together in a single line or column.
|
|
11
10
|
* @see https://rsuitejs.com/components/button/#button-group
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import Stack from "../Stack/index.js";
|
|
5
|
-
import { useStyles } from "../internals/hooks/index.js";
|
|
5
|
+
import { useStyles, useCustom } from "../internals/hooks/index.js";
|
|
6
6
|
import { forwardRef } from "../internals/utils/index.js";
|
|
7
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
8
7
|
/**
|
|
9
8
|
* The ButtonToolbar component is used to group a series of buttons together in a single line.
|
|
10
9
|
* @see https://rsuitejs.com/components/button/#button-toolbar
|
package/esm/Calendar/Calendar.js
CHANGED
|
@@ -6,10 +6,9 @@ import Button from "../Button/index.js";
|
|
|
6
6
|
import Box from "../internals/Box/index.js";
|
|
7
7
|
import { forwardRef } from "../internals/utils/index.js";
|
|
8
8
|
import { isSameMonth, startOfDay } from "../internals/utils/date/index.js";
|
|
9
|
-
import { FormattedDate } from "../
|
|
10
|
-
import { useStyles, useEventCallback } from "../internals/hooks/index.js";
|
|
9
|
+
import { FormattedDate } from "../internals/intl/FormattedDate.js";
|
|
10
|
+
import { useStyles, useCustom, useEventCallback } from "../internals/hooks/index.js";
|
|
11
11
|
import { useCalendarDate } from "./hooks/index.js";
|
|
12
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
13
12
|
/**
|
|
14
13
|
* The Calendar component is used to select dates.
|
|
15
14
|
* @see https://rsuitejs.com/components/calendar
|
|
@@ -26,7 +25,7 @@ const Calendar = forwardRef((props, ref) => {
|
|
|
26
25
|
compact,
|
|
27
26
|
defaultValue = startOfDay(new Date()),
|
|
28
27
|
isoWeek,
|
|
29
|
-
weekStart
|
|
28
|
+
weekStart,
|
|
30
29
|
locale,
|
|
31
30
|
cellClassName,
|
|
32
31
|
onChange,
|
|
@@ -4,9 +4,8 @@ import React from 'react';
|
|
|
4
4
|
import Grid from "./Grid/index.js";
|
|
5
5
|
import { forwardRef } from "../internals/utils/index.js";
|
|
6
6
|
import { getWeekStartDates, setDate } from "../internals/utils/date/index.js";
|
|
7
|
-
import { useStyles } from "../internals/hooks/index.js";
|
|
7
|
+
import { useStyles, useCustom } from "../internals/hooks/index.js";
|
|
8
8
|
import { useCalendar } from "./hooks/index.js";
|
|
9
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
10
9
|
const CalendarBody = forwardRef((props, ref) => {
|
|
11
10
|
const {
|
|
12
11
|
as: Component = 'div',
|
|
@@ -16,7 +15,6 @@ const CalendarBody = forwardRef((props, ref) => {
|
|
|
16
15
|
} = props;
|
|
17
16
|
const {
|
|
18
17
|
date = new Date(),
|
|
19
|
-
isoWeek,
|
|
20
18
|
locale: overrideLocale,
|
|
21
19
|
weekStart
|
|
22
20
|
} = useCalendar();
|
|
@@ -36,7 +34,6 @@ const CalendarBody = forwardRef((props, ref) => {
|
|
|
36
34
|
className: classes
|
|
37
35
|
}), /*#__PURE__*/React.createElement(Grid, {
|
|
38
36
|
rows: getWeekStartDates(thisMonthDate, {
|
|
39
|
-
isoWeek,
|
|
40
37
|
weekStart,
|
|
41
38
|
locale: locale === null || locale === void 0 ? void 0 : locale.dateLocale
|
|
42
39
|
}),
|
|
@@ -8,7 +8,7 @@ import Button from "../Button/index.js";
|
|
|
8
8
|
import { forwardRef } from "../internals/utils/index.js";
|
|
9
9
|
import { useStyles } from "../internals/hooks/index.js";
|
|
10
10
|
import { extractTimeFormat } from "../internals/utils/date/index.js";
|
|
11
|
-
import { FormattedDate } from "../
|
|
11
|
+
import { FormattedDate } from "../internals/intl/FormattedDate.js";
|
|
12
12
|
import { useCalendar } from "./hooks/index.js";
|
|
13
13
|
import { useDateRangePicker } from "../DateRangePicker/hooks/index.js";
|
|
14
14
|
const CalendarHeader = forwardRef((props, ref) => {
|
|
@@ -34,7 +34,7 @@ export interface CalendarInnerContextValue {
|
|
|
34
34
|
* The start day of the week in the calendar.
|
|
35
35
|
* 0 - Sunday, 1 - Monday, 2 - Tuesday, 3 - Wednesday, 4 - Thursday, 5 - Friday, 6 - Saturday
|
|
36
36
|
*/
|
|
37
|
-
weekStart
|
|
37
|
+
weekStart?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
38
38
|
/**
|
|
39
39
|
* Indicates whether week numbers should be shown in the calendar.
|
|
40
40
|
*/
|
|
@@ -4,8 +4,7 @@ import React from 'react';
|
|
|
4
4
|
import partial from 'lodash/partial';
|
|
5
5
|
import { forwardRef } from "../../internals/utils/index.js";
|
|
6
6
|
import { isSameDay, getDate } from "../../internals/utils/date/index.js";
|
|
7
|
-
import { useStyles } from "../../internals/hooks/index.js";
|
|
8
|
-
import { useCustom } from "../../CustomProvider/index.js";
|
|
7
|
+
import { useStyles, useCustom } from "../../internals/hooks/index.js";
|
|
9
8
|
import { useCalendar } from "../hooks/index.js";
|
|
10
9
|
import { getAriaLabel } from "../utils/index.js";
|
|
11
10
|
const GridCell = forwardRef((props, ref) => {
|
|
@@ -16,7 +16,6 @@ const GridHeaderRow = forwardRef((props, ref) => {
|
|
|
16
16
|
const {
|
|
17
17
|
locale,
|
|
18
18
|
showWeekNumbers,
|
|
19
|
-
isoWeek,
|
|
20
19
|
weekStart
|
|
21
20
|
} = useCalendar();
|
|
22
21
|
const {
|
|
@@ -24,7 +23,7 @@ const GridHeaderRow = forwardRef((props, ref) => {
|
|
|
24
23
|
prefix
|
|
25
24
|
} = useStyles(classPrefix);
|
|
26
25
|
const classes = merge(className, prefix('row', 'header-row'));
|
|
27
|
-
const weeks = getWeekKeys(
|
|
26
|
+
const weeks = getWeekKeys(weekStart);
|
|
28
27
|
return /*#__PURE__*/React.createElement(Component, _extends({
|
|
29
28
|
role: "row"
|
|
30
29
|
}, rest, {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { WithAsProps } from '../../internals/types';
|
|
2
2
|
export interface GridRowProps extends WithAsProps {
|
|
3
|
+
/** The weekend: Sunday */
|
|
3
4
|
weekendDate?: Date;
|
|
5
|
+
/** The index of the row */
|
|
4
6
|
rowIndex?: number;
|
|
5
7
|
}
|
|
6
8
|
declare const GridRow: import("../../internals/types").InternalRefForwardingComponent<"div", GridRowProps, never> & Record<string, never>;
|
|
@@ -90,13 +90,14 @@ const GridRow = forwardRef((props, ref) => {
|
|
|
90
90
|
};
|
|
91
91
|
const classes = merge(className, prefix('row'));
|
|
92
92
|
const {
|
|
93
|
-
firstWeekContainsDate
|
|
94
|
-
weekStartsOn
|
|
93
|
+
firstWeekContainsDate
|
|
95
94
|
} = (_locale$dateLocale$op = locale === null || locale === void 0 || (_locale$dateLocale = locale.dateLocale) === null || _locale$dateLocale === void 0 ? void 0 : _locale$dateLocale.options) !== null && _locale$dateLocale$op !== void 0 ? _locale$dateLocale$op : {};
|
|
96
|
-
|
|
95
|
+
// ISO week starts on Monday
|
|
96
|
+
const date = isoWeek ? addDays(weekendDate, 1) : weekendDate;
|
|
97
|
+
const week = format(date, isoWeek ? 'I' : 'w', {
|
|
97
98
|
locale: locale === null || locale === void 0 ? void 0 : locale.dateLocale,
|
|
98
99
|
firstWeekContainsDate,
|
|
99
|
-
weekStartsOn: weekStart
|
|
100
|
+
weekStartsOn: weekStart
|
|
100
101
|
});
|
|
101
102
|
return /*#__PURE__*/React.createElement(Component, _extends({}, rest, {
|
|
102
103
|
ref: ref,
|
|
@@ -3,8 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
3
3
|
import React, { useMemo } from 'react';
|
|
4
4
|
import { forwardRef, composeFunctions } from "../../internals/utils/index.js";
|
|
5
5
|
import { setMonth, setYear } from "../../internals/utils/date/index.js";
|
|
6
|
-
import { useStyles, useEventCallback } from "../../internals/hooks/index.js";
|
|
7
|
-
import { useCustom } from "../../CustomProvider/index.js";
|
|
6
|
+
import { useStyles, useCustom, useEventCallback } from "../../internals/hooks/index.js";
|
|
8
7
|
import { useCalendar } from "../hooks/index.js";
|
|
9
8
|
import { getAriaLabel } from "../utils/index.js";
|
|
10
9
|
const MonthDropdownItem = forwardRef((props, ref) => {
|
|
@@ -1,2 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const useCalendar: () =>
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const useCalendar: () => {
|
|
3
|
+
formatDate?: typeof import("date-fns").format | undefined;
|
|
4
|
+
date?: Date | undefined;
|
|
5
|
+
dateRange?: Date[] | undefined;
|
|
6
|
+
format?: string | undefined;
|
|
7
|
+
hoverRangeValue?: [Date, Date] | undefined;
|
|
8
|
+
inline?: boolean | undefined;
|
|
9
|
+
targetId?: string | undefined;
|
|
10
|
+
monthDropdownProps?: import("../types").MonthDropdownProps | undefined;
|
|
11
|
+
disabledDate?: ((date: Date, selectRangeValue?: Date[] | undefined, type?: string | undefined) => boolean) | undefined;
|
|
12
|
+
inSameMonth?: ((date: Date) => boolean) | undefined;
|
|
13
|
+
onChangeMonth?: ((nextPageDate: Date, event: import("react").MouseEvent<Element, MouseEvent>) => void) | undefined;
|
|
14
|
+
onChangeTime?: ((nextPageTime: Date, event: import("react").MouseEvent<Element, MouseEvent>) => void) | undefined;
|
|
15
|
+
onMouseMove?: ((date: Date) => void) | undefined;
|
|
16
|
+
onSelect?: ((date: Date, event: import("react").MouseEvent<Element, MouseEvent>) => void) | undefined;
|
|
17
|
+
renderCell?: ((date: Date) => import("react").ReactNode) | undefined;
|
|
18
|
+
renderCellOnPicker?: ((date: Date) => import("react").ReactNode) | undefined;
|
|
19
|
+
cellClassName?: ((date: Date) => string | undefined) | undefined;
|
|
20
|
+
locale: import("../../locales").CalendarLocale | undefined;
|
|
21
|
+
showWeekNumbers: boolean | undefined;
|
|
22
|
+
isoWeek: boolean;
|
|
23
|
+
weekStart: import("date-fns").Day;
|
|
24
|
+
};
|
|
@@ -1,6 +1,39 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { useContext } from 'react';
|
|
2
|
+
import { useContext, useMemo } from 'react';
|
|
3
3
|
import { CalendarContext } from "../CalendarProvider.js";
|
|
4
4
|
export const useCalendar = () => {
|
|
5
|
-
|
|
5
|
+
var _locale$dateLocale2;
|
|
6
|
+
const {
|
|
7
|
+
locale,
|
|
8
|
+
showWeekNumbers,
|
|
9
|
+
isoWeek,
|
|
10
|
+
weekStart: weekStartProp,
|
|
11
|
+
...rest
|
|
12
|
+
} = useContext(CalendarContext);
|
|
13
|
+
|
|
14
|
+
// Determine the start of the week based on various conditions
|
|
15
|
+
const weekStart = useMemo(() => {
|
|
16
|
+
var _locale$dateLocale;
|
|
17
|
+
// If weekStartProp is explicitly provided, use it
|
|
18
|
+
if (typeof weekStartProp !== 'undefined') {
|
|
19
|
+
return weekStartProp;
|
|
20
|
+
}
|
|
21
|
+
// If using ISO week, start on Monday (1)
|
|
22
|
+
else if (isoWeek) {
|
|
23
|
+
return 1;
|
|
24
|
+
}
|
|
25
|
+
// If locale specifies a weekStartsOn option, use it
|
|
26
|
+
else if ((locale === null || locale === void 0 || (_locale$dateLocale = locale.dateLocale) === null || _locale$dateLocale === void 0 || (_locale$dateLocale = _locale$dateLocale.options) === null || _locale$dateLocale === void 0 ? void 0 : _locale$dateLocale.weekStartsOn) !== undefined) {
|
|
27
|
+
return locale.dateLocale.options.weekStartsOn;
|
|
28
|
+
}
|
|
29
|
+
// Default to Sunday (0) if no other condition is met
|
|
30
|
+
return 0;
|
|
31
|
+
}, [weekStartProp, isoWeek, locale === null || locale === void 0 || (_locale$dateLocale2 = locale.dateLocale) === null || _locale$dateLocale2 === void 0 || (_locale$dateLocale2 = _locale$dateLocale2.options) === null || _locale$dateLocale2 === void 0 ? void 0 : _locale$dateLocale2.weekStartsOn]);
|
|
32
|
+
return {
|
|
33
|
+
locale,
|
|
34
|
+
showWeekNumbers,
|
|
35
|
+
isoWeek,
|
|
36
|
+
weekStart,
|
|
37
|
+
...rest
|
|
38
|
+
};
|
|
6
39
|
};
|
package/esm/Card/Card.js
CHANGED
|
@@ -6,8 +6,7 @@ import CardBody from "./CardBody.js";
|
|
|
6
6
|
import CardFooter from "./CardFooter.js";
|
|
7
7
|
import Box from "../internals/Box/index.js";
|
|
8
8
|
import { forwardRef, mergeStyles, getCssValue } from "../internals/utils/index.js";
|
|
9
|
-
import { useCustom } from "../
|
|
10
|
-
import { useStyles } from "../internals/hooks/index.js";
|
|
9
|
+
import { useStyles, useCustom } from "../internals/hooks/index.js";
|
|
11
10
|
const Subcomponents = {
|
|
12
11
|
Header: CardHeader,
|
|
13
12
|
Body: CardBody,
|
|
@@ -3,8 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import Box from "../internals/Box/index.js";
|
|
5
5
|
import { forwardRef, getCssValue, mergeStyles } from "../internals/utils/index.js";
|
|
6
|
-
import { useStyles } from "../internals/hooks/index.js";
|
|
7
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
6
|
+
import { useStyles, useCustom } from "../internals/hooks/index.js";
|
|
8
7
|
const CardGroup = forwardRef((props, ref) => {
|
|
9
8
|
const {
|
|
10
9
|
propsWithDefaults
|
package/esm/Carousel/Carousel.js
CHANGED
|
@@ -3,9 +3,8 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
3
3
|
import React, { useState, useMemo, useCallback, useRef } from 'react';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
import Box from "../internals/Box/index.js";
|
|
6
|
-
import { useStyles, useControlled, useUpdateEffect, useTimeout } from "../internals/hooks/index.js";
|
|
6
|
+
import { useStyles, useCustom, useControlled, useUpdateEffect, useTimeout } from "../internals/hooks/index.js";
|
|
7
7
|
import { forwardRef, guid, rch, mergeRefs } from "../internals/utils/index.js";
|
|
8
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
9
8
|
/**
|
|
10
9
|
* The Carousel component is used to display a series of content.
|
|
11
10
|
* @see https://rsuitejs.com/components/carousel
|
|
@@ -7,9 +7,8 @@ import Box from "../internals/Box/index.js";
|
|
|
7
7
|
import { forwardRef } from "../internals/utils/index.js";
|
|
8
8
|
import { getParentMap } from "../internals/Tree/utils/index.js";
|
|
9
9
|
import { flattenTree } from "../Tree/utils/index.js";
|
|
10
|
-
import { useMap, useControlled, useStyles, useEventCallback } from "../internals/hooks/index.js";
|
|
10
|
+
import { useMap, useControlled, useStyles, useCustom, useEventCallback } from "../internals/hooks/index.js";
|
|
11
11
|
import { useSearch, useSelect, usePaths } from "./hooks/index.js";
|
|
12
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
13
12
|
/**
|
|
14
13
|
* CascadeTree is a component that displays tree-structured data in columns.
|
|
15
14
|
*
|
|
@@ -3,9 +3,8 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import SearchBox from "../internals/SearchBox/index.js";
|
|
5
5
|
import Highlight from "../Highlight/index.js";
|
|
6
|
-
import { useStyles } from "../internals/hooks/index.js";
|
|
6
|
+
import { useStyles, useCustom } from "../internals/hooks/index.js";
|
|
7
7
|
import { getPathTowardsItem } from "../internals/Tree/utils/index.js";
|
|
8
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
9
8
|
function SearchView(props) {
|
|
10
9
|
const {
|
|
11
10
|
as: Component = 'div',
|
|
@@ -9,9 +9,8 @@ import SpinnerIcon from '@rsuite/icons/Spinner';
|
|
|
9
9
|
import ArrowLeftLineIcon from '@rsuite/icons/ArrowLeftLine';
|
|
10
10
|
import ArrowRightLineIcon from '@rsuite/icons/ArrowRightLine';
|
|
11
11
|
import { forwardRef, shallowEqual, mergeRefs, mergeStyles } from "../internals/utils/index.js";
|
|
12
|
-
import { useStyles, useEventCallback } from "../internals/hooks/index.js";
|
|
12
|
+
import { useStyles, useCustom, useEventCallback } from "../internals/hooks/index.js";
|
|
13
13
|
import { ListItem, useCombobox } from "../internals/Picker/index.js";
|
|
14
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
15
14
|
const emptyArray = [];
|
|
16
15
|
const TreeView = forwardRef((props, ref) => {
|
|
17
16
|
const {
|
package/esm/Cascader/Cascader.js
CHANGED
|
@@ -9,10 +9,9 @@ import SearchView from "../CascadeTree/SearchView.js";
|
|
|
9
9
|
import { usePaths, useSelect, useSearch } from "../CascadeTree/hooks/index.js";
|
|
10
10
|
import { flattenTree } from "../Tree/utils/index.js";
|
|
11
11
|
import { findNodeOfTree, getParentMap } from "../internals/Tree/utils/index.js";
|
|
12
|
-
import { useControlled, useStyles, useEventCallback, useMap } from "../internals/hooks/index.js";
|
|
12
|
+
import { useControlled, useStyles, useCustom, useEventCallback, useMap } from "../internals/hooks/index.js";
|
|
13
13
|
import { forwardRef, createChainedFunction, mergeRefs, shallowEqual } from "../internals/utils/index.js";
|
|
14
14
|
import { PickerToggle, PickerPopup, PickerToggleTrigger, usePickerRef, useToggleKeyDownEvent, useFocusItemValue, triggerPropKeys } from "../internals/Picker/index.js";
|
|
15
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
16
15
|
import useActive from "./useActive.js";
|
|
17
16
|
const emptyArray = [];
|
|
18
17
|
/**
|
|
@@ -8,8 +8,7 @@ import pick from 'lodash/pick';
|
|
|
8
8
|
import isNil from 'lodash/isNil';
|
|
9
9
|
import SearchBox from "../internals/SearchBox/index.js";
|
|
10
10
|
import { filterNodesOfTree } from "../internals/Tree/utils/index.js";
|
|
11
|
-
import { useStyles, useControlled, useEventCallback } from "../internals/hooks/index.js";
|
|
12
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
11
|
+
import { useStyles, useControlled, useCustom, useEventCallback } from "../internals/hooks/index.js";
|
|
13
12
|
import { forwardRef, createChainedFunction, shallowEqual, mergeRefs, getDataGroupBy } from "../internals/utils/index.js";
|
|
14
13
|
import { Listbox, ListCheckItem, PickerToggle, PickerPopup, SelectedElement, PickerToggleTrigger, useFocusItemValue, useSearch, useToggleKeyDownEvent, usePickerRef, triggerPropKeys } from "../internals/Picker/index.js";
|
|
15
14
|
const emptyArray = [];
|
|
@@ -7,9 +7,8 @@ import useFlattenTree from "../Tree/hooks/useFlattenTree.js";
|
|
|
7
7
|
import useTreeWithChildren from "../Tree/hooks/useTreeWithChildren.js";
|
|
8
8
|
import useExpandTree from "../Tree/hooks/useExpandTree.js";
|
|
9
9
|
import { forwardRef } from "../internals/utils/index.js";
|
|
10
|
-
import { useEventCallback } from "../internals/hooks/index.js";
|
|
10
|
+
import { useEventCallback, useCustom } from "../internals/hooks/index.js";
|
|
11
11
|
import { TreeProvider } from "../internals/Tree/TreeProvider.js";
|
|
12
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
13
12
|
/**
|
|
14
13
|
* The `CheckTree` component is used for selecting multiple options which are organized in a tree structure.
|
|
15
14
|
* @see https://rsuitejs.com/components/check-tree
|
|
@@ -7,8 +7,7 @@ import { forwardRef, stringifyReactNode, mergeRefs } from "../internals/utils/in
|
|
|
7
7
|
import { useTreeContextProps } from "../internals/Tree/TreeProvider.js";
|
|
8
8
|
import { CHECK_STATE } from "../internals/constants/index.js";
|
|
9
9
|
import { indentTreeNode } from "../Tree/utils/index.js";
|
|
10
|
-
import { useStyles, useEventCallback, useFocusVirtualListItem } from "../internals/hooks/index.js";
|
|
11
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
10
|
+
import { useStyles, useCustom, useEventCallback, useFocusVirtualListItem } from "../internals/hooks/index.js";
|
|
12
11
|
const CheckTreeNode = forwardRef((props, ref) => {
|
|
13
12
|
const {
|
|
14
13
|
as: Component = 'div',
|
|
@@ -13,14 +13,13 @@ import useTreeCheckState from "./hooks/useTreeCheckState.js";
|
|
|
13
13
|
import useTreeNodeProps from "./hooks/useTreeNodeProps.js";
|
|
14
14
|
import { forwardRef } from "../internals/utils/index.js";
|
|
15
15
|
import { List, AutoSizer, defaultItemSize } from "../internals/Windowing/index.js";
|
|
16
|
-
import { useStyles, useEventCallback } from "../internals/hooks/index.js";
|
|
16
|
+
import { useStyles, useCustom, useEventCallback } from "../internals/hooks/index.js";
|
|
17
17
|
import { getPathTowardsItem, getKeyParentMap } from "../internals/Tree/utils/index.js";
|
|
18
18
|
import { onMenuKeyDown } from "../internals/Picker/index.js";
|
|
19
19
|
import { TreeView } from "../internals/Tree/index.js";
|
|
20
20
|
import { hasGrandchild, isEveryFirstLevelNodeUncheckable, getFormattedTree, isNodeUncheckable } from "./utils.js";
|
|
21
21
|
import { hasVisibleChildren, getActiveItem, isExpand } from "../Tree/utils/index.js";
|
|
22
22
|
import { useTreeContextProps } from "../internals/Tree/TreeProvider.js";
|
|
23
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
24
23
|
|
|
25
24
|
/**
|
|
26
25
|
* Props for the CheckTreeView component.
|
|
@@ -11,12 +11,11 @@ import useFocusState from "./hooks/useFocusState.js";
|
|
|
11
11
|
import isNil from 'lodash/isNil';
|
|
12
12
|
import pick from 'lodash/pick';
|
|
13
13
|
import isFunction from 'lodash/isFunction';
|
|
14
|
-
import { useStyles, useEventCallback } from "../internals/hooks/index.js";
|
|
14
|
+
import { useStyles, useCustom, useEventCallback } from "../internals/hooks/index.js";
|
|
15
15
|
import { forwardRef, createChainedFunction, mergeRefs } from "../internals/utils/index.js";
|
|
16
16
|
import { PickerToggle, onMenuKeyDown, PickerPopup, SelectedElement, PickerToggleTrigger, useToggleKeyDownEvent, usePickerRef, triggerPropKeys } from "../internals/Picker/index.js";
|
|
17
17
|
import { getSelectedItems } from "../CheckTree/utils.js";
|
|
18
18
|
import { TreeProvider, useTreeImperativeHandle } from "../internals/Tree/TreeProvider.js";
|
|
19
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
20
19
|
/**
|
|
21
20
|
* The `CheckTreePicker` component is used for selecting multiple options which are organized in a tree structure.
|
|
22
21
|
*
|
package/esm/Checkbox/Checkbox.js
CHANGED
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
import React, { useContext, useMemo, useRef } from 'react';
|
|
4
4
|
import Box from "../internals/Box/index.js";
|
|
5
|
-
import { useControlled, useStyles, useEventCallback, useUniqueId } from "../internals/hooks/index.js";
|
|
5
|
+
import { useControlled, useStyles, useCustom, useEventCallback, useUniqueId } from "../internals/hooks/index.js";
|
|
6
6
|
import { forwardRef, partitionHTMLProps, mergeRefs } from "../internals/utils/index.js";
|
|
7
7
|
import { CheckboxGroupContext } from "../CheckboxGroup/index.js";
|
|
8
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
9
8
|
/**
|
|
10
9
|
* The Checkbox component is used for selecting multiple options from a set.
|
|
11
10
|
* @see https://rsuitejs.com/components/checkbox
|
|
@@ -6,9 +6,8 @@ import remove from 'lodash/remove';
|
|
|
6
6
|
import Plaintext from "../internals/Plaintext/index.js";
|
|
7
7
|
import Box from "../internals/Box/index.js";
|
|
8
8
|
import { forwardRef, shallowEqual } from "../internals/utils/index.js";
|
|
9
|
-
import { useStyles, useControlled } from "../internals/hooks/index.js";
|
|
9
|
+
import { useStyles, useControlled, useCustom } from "../internals/hooks/index.js";
|
|
10
10
|
import { CheckboxGroupContext } from "./CheckboxGroupContext.js";
|
|
11
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
12
11
|
/**
|
|
13
12
|
* The `CheckboxGroup` component is used for selecting multiple options which are unrelated.
|
|
14
13
|
* @see https://rsuitejs.com/components/checkbox/#checkbox-group
|