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
|
@@ -3,8 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
3
3
|
import React, { useState, useMemo } from 'react';
|
|
4
4
|
import Box from "../internals/Box/index.js";
|
|
5
5
|
import { forwardRef } 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 ContainerContext = /*#__PURE__*/React.createContext({});
|
|
9
8
|
/**
|
|
10
9
|
* The Container component is used to wrap content in a themed container with a max-width.
|
|
@@ -1,275 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { ToastContainerInstance } from '../toaster/ToastContainer';
|
|
4
|
-
import type { FormatDateOptions } from '../internals/utils/date/types';
|
|
5
|
-
import type { ReactSuiteComponents } from './types';
|
|
6
|
-
export interface CustomValue<T = Locale> {
|
|
7
|
-
/**
|
|
8
|
-
* The prefix of the component CSS class
|
|
9
|
-
*/
|
|
10
|
-
classPrefix?: string;
|
|
11
|
-
/**
|
|
12
|
-
* The locale object that contains the language and formatting rules for the date.
|
|
13
|
-
*/
|
|
14
|
-
locale: T;
|
|
15
|
-
/**
|
|
16
|
-
* Right-to-left text direction.
|
|
17
|
-
*/
|
|
18
|
-
rtl: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Return the formatted date string in the given format. The result may vary by locale.
|
|
21
|
-
*
|
|
22
|
-
* Example:
|
|
23
|
-
*
|
|
24
|
-
* import { format } from 'date-fns/format';
|
|
25
|
-
* import { eo } from 'date-fns/locale/eo'
|
|
26
|
-
*
|
|
27
|
-
* function formatDate(date, formatStr) {
|
|
28
|
-
* return format(date, formatStr, { locale: eo });
|
|
29
|
-
* }
|
|
30
|
-
*
|
|
31
|
-
*/
|
|
32
|
-
formatDate: (date: Date | number, format: string, options?: FormatDateOptions) => string;
|
|
33
|
-
/**
|
|
34
|
-
* Return the date parsed from string using the given format string.
|
|
35
|
-
*
|
|
36
|
-
* Example:
|
|
37
|
-
*
|
|
38
|
-
* import { parse } from 'date-fns/parse';
|
|
39
|
-
* import { eo } from 'date-fns/locale/eo'
|
|
40
|
-
*
|
|
41
|
-
* function parseDate(date, formatStr) {
|
|
42
|
-
* return parse(date, formatStr, new Date(), { locale: eo });
|
|
43
|
-
* }
|
|
44
|
-
*
|
|
45
|
-
*/
|
|
46
|
-
parseDate: (dateString: string, formatString: string, referenceDate?: Date | number, options?: FormatDateOptions) => Date;
|
|
47
|
-
/**
|
|
48
|
-
* A Map of toast containers
|
|
49
|
-
*/
|
|
50
|
-
toasters?: React.MutableRefObject<Map<string, ToastContainerInstance>>;
|
|
51
|
-
/**
|
|
52
|
-
* If true, the ripple effect is disabled.
|
|
53
|
-
* Affected components include: Button, Nav.Item, Pagination.
|
|
54
|
-
*/
|
|
55
|
-
disableRipple?: boolean;
|
|
56
|
-
}
|
|
57
|
-
export interface CustomProviderProps<T = Locale> extends Partial<CustomValue<T>> {
|
|
58
|
-
/**
|
|
59
|
-
* Supported themes
|
|
60
|
-
*/
|
|
61
|
-
theme?: 'light' | 'dark' | 'high-contrast';
|
|
62
|
-
/**
|
|
63
|
-
* The prefix of the icon CSS class
|
|
64
|
-
*/
|
|
65
|
-
iconClassPrefix?: string;
|
|
66
|
-
/**
|
|
67
|
-
* Primary content
|
|
68
|
-
*/
|
|
69
|
-
children?: React.ReactNode;
|
|
70
|
-
/**
|
|
71
|
-
* Sets a container for toast rendering
|
|
72
|
-
*/
|
|
73
|
-
toastContainer?: HTMLElement | (() => HTMLElement | null) | null;
|
|
74
|
-
csp?: {
|
|
75
|
-
/**
|
|
76
|
-
* Content Security Policy nonce
|
|
77
|
-
* https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/nonce
|
|
78
|
-
*/
|
|
79
|
-
nonce?: string;
|
|
80
|
-
};
|
|
81
|
-
/**
|
|
82
|
-
* Disable inline styles
|
|
83
|
-
* @default false
|
|
84
|
-
*/
|
|
85
|
-
disableInlineStyles?: boolean;
|
|
86
|
-
/**
|
|
87
|
-
* components allows setting default props for specific components globally.
|
|
88
|
-
* It accepts an object where each key represents a component name (e.g., 'Button', 'Input'),
|
|
89
|
-
* and the corresponding value is an object containing the `defaultProps` object.
|
|
90
|
-
* The `defaultProps` object defines the default props for that component.
|
|
91
|
-
* These props will be automatically applied to the component unless overridden by specific props
|
|
92
|
-
* passed in an individual component instance.
|
|
93
|
-
*
|
|
94
|
-
* @example
|
|
95
|
-
* ```js
|
|
96
|
-
* components={{
|
|
97
|
-
* Button: { defaultProps: { appearance: 'primary', size: 'lg' } },
|
|
98
|
-
* Input: { defaultProps: { placeholder: 'Enter text', size: 'lg' } }
|
|
99
|
-
* }}
|
|
100
|
-
* ```
|
|
101
|
-
*/
|
|
102
|
-
components?: Partial<ReactSuiteComponents>;
|
|
103
|
-
}
|
|
104
|
-
export declare const CustomContext: React.Context<CustomProviderProps<{
|
|
105
|
-
code?: string | undefined;
|
|
106
|
-
common?: {
|
|
107
|
-
loading: string;
|
|
108
|
-
emptyMessage: string;
|
|
109
|
-
remove: string;
|
|
110
|
-
clear: string;
|
|
111
|
-
} | undefined;
|
|
112
|
-
Plaintext?: {
|
|
113
|
-
unfilled: string;
|
|
114
|
-
notSelected: string;
|
|
115
|
-
notUploaded: string;
|
|
116
|
-
} | undefined;
|
|
117
|
-
Pagination?: {
|
|
118
|
-
more: string;
|
|
119
|
-
prev: string;
|
|
120
|
-
next: string;
|
|
121
|
-
first: string;
|
|
122
|
-
last: string;
|
|
123
|
-
limit: string;
|
|
124
|
-
total: string;
|
|
125
|
-
/**
|
|
126
|
-
* Return the date parsed from string using the given format string.
|
|
127
|
-
*
|
|
128
|
-
* Example:
|
|
129
|
-
*
|
|
130
|
-
* import { parse } from 'date-fns/parse';
|
|
131
|
-
* import { eo } from 'date-fns/locale/eo'
|
|
132
|
-
*
|
|
133
|
-
* function parseDate(date, formatStr) {
|
|
134
|
-
* return parse(date, formatStr, new Date(), { locale: eo });
|
|
135
|
-
* }
|
|
136
|
-
*
|
|
137
|
-
*/
|
|
138
|
-
skip: string;
|
|
139
|
-
} | undefined;
|
|
140
|
-
DateTimeFormats?: {
|
|
141
|
-
sunday: string;
|
|
142
|
-
monday: string;
|
|
143
|
-
tuesday: string;
|
|
144
|
-
wednesday: string;
|
|
145
|
-
thursday: string;
|
|
146
|
-
friday: string;
|
|
147
|
-
saturday: string;
|
|
148
|
-
ok: string;
|
|
149
|
-
today: string;
|
|
150
|
-
yesterday: string;
|
|
151
|
-
now: string;
|
|
152
|
-
hours: string;
|
|
153
|
-
minutes: string;
|
|
154
|
-
seconds: string;
|
|
155
|
-
formattedMonthPattern: string;
|
|
156
|
-
formattedDayPattern: string;
|
|
157
|
-
shortDateFormat: string;
|
|
158
|
-
shortTimeFormat: string;
|
|
159
|
-
dateLocale: any;
|
|
160
|
-
} | undefined;
|
|
161
|
-
Calendar?: {
|
|
162
|
-
sunday: string;
|
|
163
|
-
monday: string;
|
|
164
|
-
tuesday: string;
|
|
165
|
-
wednesday: string;
|
|
166
|
-
thursday: string;
|
|
167
|
-
friday: string;
|
|
168
|
-
saturday: string;
|
|
169
|
-
ok: string;
|
|
170
|
-
today: string;
|
|
171
|
-
yesterday: string;
|
|
172
|
-
now: string;
|
|
173
|
-
hours: string;
|
|
174
|
-
minutes: string;
|
|
175
|
-
seconds: string;
|
|
176
|
-
formattedMonthPattern: string;
|
|
177
|
-
formattedDayPattern: string;
|
|
178
|
-
shortDateFormat: string;
|
|
179
|
-
shortTimeFormat: string;
|
|
180
|
-
dateLocale: any;
|
|
181
|
-
} | undefined;
|
|
182
|
-
DatePicker?: {
|
|
183
|
-
sunday: string;
|
|
184
|
-
monday: string;
|
|
185
|
-
tuesday: string;
|
|
186
|
-
wednesday: string;
|
|
187
|
-
thursday: string;
|
|
188
|
-
friday: string;
|
|
189
|
-
saturday: string;
|
|
190
|
-
ok: string;
|
|
191
|
-
today: string;
|
|
192
|
-
yesterday: string;
|
|
193
|
-
now: string;
|
|
194
|
-
hours: string;
|
|
195
|
-
minutes: string;
|
|
196
|
-
seconds: string;
|
|
197
|
-
formattedMonthPattern: string;
|
|
198
|
-
formattedDayPattern: string;
|
|
199
|
-
shortDateFormat: string;
|
|
200
|
-
shortTimeFormat: string;
|
|
201
|
-
dateLocale: any;
|
|
202
|
-
} | undefined;
|
|
203
|
-
DateRangePicker?: {
|
|
204
|
-
last7Days: string;
|
|
205
|
-
sunday: string;
|
|
206
|
-
monday: string;
|
|
207
|
-
tuesday: string;
|
|
208
|
-
wednesday: string;
|
|
209
|
-
thursday: string;
|
|
210
|
-
friday: string;
|
|
211
|
-
saturday: string;
|
|
212
|
-
ok: string;
|
|
213
|
-
today: string;
|
|
214
|
-
yesterday: string;
|
|
215
|
-
now: string;
|
|
216
|
-
hours: string;
|
|
217
|
-
minutes: string;
|
|
218
|
-
seconds: string;
|
|
219
|
-
formattedMonthPattern: string;
|
|
220
|
-
formattedDayPattern: string;
|
|
221
|
-
shortDateFormat: string;
|
|
222
|
-
shortTimeFormat: string;
|
|
223
|
-
dateLocale: any;
|
|
224
|
-
} | undefined;
|
|
225
|
-
Combobox?: {
|
|
226
|
-
noResultsText: string;
|
|
227
|
-
placeholder: string;
|
|
228
|
-
searchPlaceholder: string;
|
|
229
|
-
checkAll: string;
|
|
230
|
-
} | undefined;
|
|
231
|
-
InputPicker?: {
|
|
232
|
-
/**
|
|
233
|
-
* Right-to-left text direction.
|
|
234
|
-
*/
|
|
235
|
-
newItem: string;
|
|
236
|
-
createOption: string;
|
|
237
|
-
noResultsText: string;
|
|
238
|
-
placeholder: string;
|
|
239
|
-
searchPlaceholder: string;
|
|
240
|
-
checkAll: string;
|
|
241
|
-
} | undefined;
|
|
242
|
-
TagPicker?: {
|
|
243
|
-
/**
|
|
244
|
-
* Right-to-left text direction.
|
|
245
|
-
*/
|
|
246
|
-
newItem: string;
|
|
247
|
-
createOption: string;
|
|
248
|
-
noResultsText: string;
|
|
249
|
-
placeholder: string;
|
|
250
|
-
searchPlaceholder: string;
|
|
251
|
-
checkAll: string;
|
|
252
|
-
} | undefined;
|
|
253
|
-
Uploader?: {
|
|
254
|
-
inited: string;
|
|
255
|
-
progress: string;
|
|
256
|
-
error: string;
|
|
257
|
-
complete: string;
|
|
258
|
-
emptyFile: string;
|
|
259
|
-
upload: string;
|
|
260
|
-
removeFile: string;
|
|
261
|
-
} | undefined;
|
|
262
|
-
CloseButton?: {
|
|
263
|
-
closeLabel: string;
|
|
264
|
-
} | undefined;
|
|
265
|
-
Breadcrumb?: {
|
|
266
|
-
expandText: string;
|
|
267
|
-
} | undefined;
|
|
268
|
-
Toggle?: {
|
|
269
|
-
on: string;
|
|
270
|
-
off: string;
|
|
271
|
-
} | undefined;
|
|
272
|
-
}>>;
|
|
2
|
+
import { CustomProviderProps } from '../internals/Provider/CustomContext';
|
|
273
3
|
/**
|
|
274
4
|
* CustomProvider is used to provide global configuration, such as language, theme, etc.
|
|
275
5
|
*
|
|
@@ -4,8 +4,8 @@ import IconProvider from '@rsuite/icons/IconProvider';
|
|
|
4
4
|
import { usePortal, useIsomorphicLayoutEffect } from "../internals/hooks/index.js";
|
|
5
5
|
import { getClassNamePrefix, prefix } from "../internals/utils/index.js";
|
|
6
6
|
import { addClass, removeClass, canUseDOM } from "../DOMHelper/index.js";
|
|
7
|
+
import { CustomContext } from "../internals/Provider/CustomContext.js";
|
|
7
8
|
import ToastContainer, { toastPlacements, defaultToasterContainer } from "../toaster/ToastContainer.js";
|
|
8
|
-
export const CustomContext = /*#__PURE__*/React.createContext({});
|
|
9
9
|
const themes = ['light', 'dark', 'high-contrast'];
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import CustomProvider from './CustomProvider';
|
|
2
|
-
export type { CustomProviderProps } from '
|
|
3
|
-
export type { ReactSuiteComponents } from './types';
|
|
4
|
-
export { useCustom } from './useCustom';
|
|
5
|
-
export { FormattedDate } from './FormattedDate';
|
|
6
|
-
export { FormattedNumber } from './FormattedNumber';
|
|
7
|
-
export { CustomContext } from './CustomProvider';
|
|
2
|
+
export type { CustomProviderProps } from '../internals/Provider/CustomContext';
|
|
8
3
|
export { CustomProvider };
|
|
9
4
|
export default CustomProvider;
|
|
@@ -3,12 +3,6 @@ import CustomProvider from "./CustomProvider.js";
|
|
|
3
3
|
|
|
4
4
|
// export types
|
|
5
5
|
|
|
6
|
-
// export hooks
|
|
7
|
-
export { useCustom } from "./useCustom.js";
|
|
8
|
-
|
|
9
6
|
// export components
|
|
10
|
-
export { FormattedDate } from "./FormattedDate.js";
|
|
11
|
-
export { FormattedNumber } from "./FormattedNumber.js";
|
|
12
|
-
export { CustomContext } from "./CustomProvider.js";
|
|
13
7
|
export { CustomProvider };
|
|
14
8
|
export default CustomProvider;
|
|
@@ -7,11 +7,10 @@ import useKeyboardInputEvent from "./hooks/useKeyboardInputEvent.js";
|
|
|
7
7
|
import useIsFocused from "./hooks/useIsFocused.js";
|
|
8
8
|
import useFieldCursor from "./hooks/useFieldCursor.js";
|
|
9
9
|
import useSelectedState from "./hooks/useSelectedState.js";
|
|
10
|
-
import { useControlled, useEventCallback } from "../internals/hooks/index.js";
|
|
10
|
+
import { useControlled, useEventCallback, useCustom } from "../internals/hooks/index.js";
|
|
11
11
|
import { forwardRef, mergeRefs } from "../internals/utils/index.js";
|
|
12
12
|
import { isValid } from "../internals/utils/date/index.js";
|
|
13
13
|
import { getInputSelectedState, validateDateTime, useInputSelection } from "./utils.js";
|
|
14
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
15
14
|
/**
|
|
16
15
|
* The DateInput component lets users select a date with the keyboard.
|
|
17
16
|
* @version 5.58.0
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import startCase from 'lodash/startCase';
|
|
3
3
|
import { useCallback, useEffect } from 'react';
|
|
4
4
|
import { addDays, addMonths, addYears, addHours, addMinutes, addSeconds, isLastDayOfMonth, lastDayOfMonth, isValid } from "../../internals/utils/date/index.js";
|
|
5
|
-
import { useCustom } from "../../
|
|
5
|
+
import { useCustom } from "../../internals/hooks/index.js";
|
|
6
6
|
import { useDateField, patternMap } from "../DateField.js";
|
|
7
7
|
export function useDateInputState(_ref) {
|
|
8
8
|
let {
|
|
@@ -18,13 +18,12 @@ import Box from "../internals/Box/index.js";
|
|
|
18
18
|
import { useCalendarDate } from "../Calendar/hooks/index.js";
|
|
19
19
|
import { isEveryDateInMonth } from "../Calendar/utils/index.js";
|
|
20
20
|
import { forwardRef, mergeRefs, partitionHTMLProps, createChainedFunction } from "../internals/utils/index.js";
|
|
21
|
-
import { useStyles, useControlled, useUniqueId, useEventCallback } from "../internals/hooks/index.js";
|
|
21
|
+
import { useStyles, useCustom, useControlled, useUniqueId, useEventCallback } from "../internals/hooks/index.js";
|
|
22
22
|
import { isValid, copyTime, disableTime, DateMode, useDateMode, calendarOnlyProps } from "../internals/utils/date/index.js";
|
|
23
23
|
import { PickerPopup, PickerLabel, PickerIndicator, PickerToggleTrigger, triggerPropKeys, usePickerRef, onMenuKeyDown } from "../internals/Picker/index.js";
|
|
24
24
|
import { OverlayCloseCause } from "../internals/Overlay/OverlayTrigger.js";
|
|
25
25
|
import { splitRanges, getRestProps } from "./utils.js";
|
|
26
26
|
import { startOfToday } from "../internals/utils/date/index.js";
|
|
27
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
28
27
|
/**
|
|
29
28
|
* A date picker allows users to select a date from a calendar.
|
|
30
29
|
*
|
|
@@ -50,7 +49,7 @@ const DatePicker = forwardRef((props, ref) => {
|
|
|
50
49
|
format,
|
|
51
50
|
id: idProp,
|
|
52
51
|
isoWeek,
|
|
53
|
-
weekStart
|
|
52
|
+
weekStart,
|
|
54
53
|
limitEndYear = 1000,
|
|
55
54
|
limitStartYear,
|
|
56
55
|
locale,
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
import delay from 'lodash/delay';
|
|
3
3
|
import { addMonths } from 'date-fns/addMonths';
|
|
4
4
|
import { addDays } from 'date-fns/addDays';
|
|
5
|
-
import { useEventCallback } from "../../internals/hooks/index.js";
|
|
6
|
-
import { useCustom } from "../../CustomProvider/index.js";
|
|
5
|
+
import { useEventCallback, useCustom } from "../../internals/hooks/index.js";
|
|
7
6
|
import { getAriaLabel } from "../../Calendar/utils/index.js";
|
|
8
7
|
import { onMenuKeyDown } from "../../internals/Picker/utils.js";
|
|
9
8
|
function useFocus(props) {
|
|
@@ -3,10 +3,9 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
3
3
|
import React, { useState, useRef, useMemo } from 'react';
|
|
4
4
|
import Input from "../Input/index.js";
|
|
5
5
|
import { isValid } from "../internals/utils/date/index.js";
|
|
6
|
-
import { useStyles, useControlled, useEventCallback } from "../internals/hooks/index.js";
|
|
6
|
+
import { useStyles, useCustom, useControlled, useEventCallback } from "../internals/hooks/index.js";
|
|
7
7
|
import { mergeRefs } from "../internals/utils/index.js";
|
|
8
8
|
import { validateDateTime, useDateInputState, useInputSelection, useKeyboardInputEvent, useIsFocused, useSelectedState, useFieldCursor } from "../DateInput/index.js";
|
|
9
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
10
9
|
import { getInputSelectedState, DateType, getDateType, isSwitchDateType } from "./utils.js";
|
|
11
10
|
/**
|
|
12
11
|
* The DateRangeInput component lets users select a date with the keyboard.
|
|
@@ -20,8 +20,7 @@ import * as StaticMethods from "./disabledDateUtils.js";
|
|
|
20
20
|
import { DateRangePickerProvider } from "./DateRangePickerProvider.js";
|
|
21
21
|
import { getSafeCalendarDate, getMonthHoverRange, getWeekHoverRange, isSameRange } from "./utils.js";
|
|
22
22
|
import { DATERANGE_DISABLED_TARGET as TARGET } from "../internals/constants/index.js";
|
|
23
|
-
import { useStyles, useControlled, useUniqueId, useEventCallback } from "../internals/hooks/index.js";
|
|
24
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
23
|
+
import { useStyles, useCustom, useControlled, useUniqueId, useEventCallback } from "../internals/hooks/index.js";
|
|
25
24
|
import { splitRanges } from "../DatePicker/utils.js";
|
|
26
25
|
import { PickerPopup, PickerToggleTrigger, PickerIndicator, PickerLabel, triggerPropKeys, usePickerRef, onMenuKeyDown } from "../internals/Picker/index.js";
|
|
27
26
|
import { forwardRef, createChainedFunction, mergeRefs, partitionHTMLProps, getStringLength } from "../internals/utils/index.js";
|
|
@@ -59,7 +58,7 @@ const DateRangePicker = forwardRef((props, ref) => {
|
|
|
59
58
|
hoverRange,
|
|
60
59
|
id: idProp,
|
|
61
60
|
isoWeek = false,
|
|
62
|
-
weekStart
|
|
61
|
+
weekStart,
|
|
63
62
|
limitEndYear = 1000,
|
|
64
63
|
limitStartYear,
|
|
65
64
|
locale,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { useStyles } from "../internals/hooks/index.js";
|
|
4
4
|
import { compareAsc } from "../internals/utils/date/index.js";
|
|
5
|
-
import { FormattedDate } from "../
|
|
5
|
+
import { FormattedDate } from "../internals/intl/FormattedDate.js";
|
|
6
6
|
import Button from "../Button/index.js";
|
|
7
7
|
function Header(props) {
|
|
8
8
|
const {
|
|
@@ -9,6 +9,6 @@ export declare const isSameRange: (source: DateRange | null, dest: DateRange | n
|
|
|
9
9
|
export declare const getMonthHoverRange: (date: Date) => DateRange;
|
|
10
10
|
export declare const getWeekHoverRange: (date: Date, options: {
|
|
11
11
|
isoWeek: boolean;
|
|
12
|
-
weekStart
|
|
12
|
+
weekStart?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
13
13
|
locale?: Locale;
|
|
14
14
|
}) => DateRange;
|
package/esm/Divider/Divider.js
CHANGED
|
@@ -3,8 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import StyledBox from "../internals/StyledBox/index.js";
|
|
5
5
|
import { forwardRef, getSizeStyle, 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
|
/**
|
|
9
8
|
* The Divider component is used to separate content.
|
|
10
9
|
* @see https://rsuitejs.com/components/divider
|
package/esm/Drawer/Drawer.js
CHANGED
|
@@ -8,9 +8,8 @@ import DrawerHeader from "./DrawerHeader.js";
|
|
|
8
8
|
import DrawerActions from "./DrawerActions.js";
|
|
9
9
|
import DrawerFooter from "./DrawerFooter.js";
|
|
10
10
|
import DrawerTitle from "./DrawerTitle.js";
|
|
11
|
-
import { useStyles } from "../internals/hooks/index.js";
|
|
11
|
+
import { useStyles, useCustom } from "../internals/hooks/index.js";
|
|
12
12
|
import { forwardRef, deprecateComponent } from "../internals/utils/index.js";
|
|
13
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
14
13
|
const Subcomponents = {
|
|
15
14
|
Body: DrawerBody,
|
|
16
15
|
Header: DrawerHeader,
|
package/esm/Dropdown/Dropdown.js
CHANGED
|
@@ -11,10 +11,9 @@ import Menu from "../internals/Menu/Menu.js";
|
|
|
11
11
|
import DropdownToggle from "./DropdownToggle.js";
|
|
12
12
|
import NavContext from "../Nav/NavContext.js";
|
|
13
13
|
import Nav from "../Nav/index.js";
|
|
14
|
-
import { useStyles } from "../internals/hooks/index.js";
|
|
14
|
+
import { useStyles, useCustom } from "../internals/hooks/index.js";
|
|
15
15
|
import { forwardRef, mergeRefs, kebabPlace, warnOnce } from "../internals/utils/index.js";
|
|
16
16
|
import { initialState, reducer } from "./DropdownState.js";
|
|
17
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
18
17
|
const Subcomponents = {
|
|
19
18
|
Item: DropdownItem,
|
|
20
19
|
Menu: DropdownMenu,
|
|
@@ -10,8 +10,7 @@ import PageNextIcon from '@rsuite/icons/PageNext';
|
|
|
10
10
|
import DropdownContext from "./DropdownContext.js";
|
|
11
11
|
import Nav from "../Nav/index.js";
|
|
12
12
|
import NavContext from "../Nav/NavContext.js";
|
|
13
|
-
import { useStyles } from "../internals/hooks/index.js";
|
|
14
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
13
|
+
import { useStyles, useCustom } from "../internals/hooks/index.js";
|
|
15
14
|
import { mergeRefs, warnOnce } from "../internals/utils/index.js";
|
|
16
15
|
/**
|
|
17
16
|
* The `<Dropdown.Menu>` API
|
|
@@ -3,8 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import FlexboxGridItem from "./FlexboxGridItem.js";
|
|
5
5
|
import { forwardRef } 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 Subcomponents = {
|
|
9
8
|
Item: FlexboxGridItem
|
|
10
9
|
};
|
package/esm/Form/Form.js
CHANGED
|
@@ -14,9 +14,8 @@ import useFormValue from "./hooks/useFormValue.js";
|
|
|
14
14
|
import useFormRef from "./hooks/useFormRef.js";
|
|
15
15
|
import { forwardRef } from "../internals/utils/index.js";
|
|
16
16
|
import { SchemaModel } from 'schema-typed';
|
|
17
|
-
import { useEventCallback } from "../internals/hooks/index.js";
|
|
17
|
+
import { useEventCallback, useCustom } from "../internals/hooks/index.js";
|
|
18
18
|
import { FormValueProvider, FormProvider } from "./FormContext.js";
|
|
19
|
-
import { useCustom } from "../CustomProvider/index.js";
|
|
20
19
|
const defaultSchema = SchemaModel({});
|
|
21
20
|
const Subcomponents = {
|
|
22
21
|
Stack: FormStack,
|
|
@@ -11,7 +11,7 @@ interface TrulyFormContextValue<T = RecordAny, M = any, E = {
|
|
|
11
11
|
removeFieldError: (name: string) => void;
|
|
12
12
|
removeFieldRule: (name: string) => void;
|
|
13
13
|
pushFieldRule: (name: string, fieldRule: FieldRuleType) => void;
|
|
14
|
-
onFieldChange: (name: string, value: any, event
|
|
14
|
+
onFieldChange: (name: string, value: any, event?: React.SyntheticEvent) => void;
|
|
15
15
|
checkFieldForNextValue: (name: string, nextValue: Record<string, unknown>, callback?: (checkResult: Record<string, unknown>) => void) => boolean;
|
|
16
16
|
checkFieldAsyncForNextValue: (name: string, nextValue: Record<string, unknown>) => Promise<Record<string, unknown>>;
|
|
17
17
|
}
|
|
@@ -3,7 +3,7 @@ import { useRef, useCallback } from 'react';
|
|
|
3
3
|
import omit from 'lodash/omit';
|
|
4
4
|
import set from 'lodash/set';
|
|
5
5
|
import { useControlled, useEventCallback } from "../../internals/hooks/index.js";
|
|
6
|
-
import { nameToPath } from "../../
|
|
6
|
+
import { nameToPath } from "../../useFormControl/utils/nameToPath.js";
|
|
7
7
|
export default function useFormValidate(_formError, props) {
|
|
8
8
|
const {
|
|
9
9
|
formValue,
|