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
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import type { AccordionProps } from '../../Accordion';
|
|
2
|
+
import type { AffixProps } from '../../Affix';
|
|
3
|
+
import type { BounceProps } from '../../Animation/Bounce';
|
|
4
|
+
import type { CollapseProps } from '../../Animation/Collapse';
|
|
5
|
+
import type { FadeProps } from '../../Animation/Fade';
|
|
6
|
+
import type { SlideProps } from '../../Animation/Slide';
|
|
7
|
+
import type { TransitionProps } from '../../Animation/Transition';
|
|
8
|
+
import type { AutoCompleteProps } from '../../AutoComplete';
|
|
9
|
+
import type { AvatarProps } from '../../Avatar';
|
|
10
|
+
import type { AvatarGroupProps } from '../../AvatarGroup';
|
|
11
|
+
import type { BadgeProps } from '../../Badge';
|
|
12
|
+
import type { BreadcrumbProps } from '../../Breadcrumb';
|
|
13
|
+
import type { ButtonProps } from '../../Button';
|
|
14
|
+
import type { ButtonGroupProps } from '../../ButtonGroup';
|
|
15
|
+
import type { ButtonToolbarProps } from '../../ButtonToolbar';
|
|
16
|
+
import type { CalendarProps } from '../../Calendar';
|
|
17
|
+
import type { CarouselProps } from '../../Carousel';
|
|
18
|
+
import type { CascadeTreeProps } from '../../CascadeTree';
|
|
19
|
+
import type { CascaderProps } from '../../Cascader';
|
|
20
|
+
import type { CardProps } from '../../Card';
|
|
21
|
+
import type { CardGroupProps } from '../../CardGroup';
|
|
22
|
+
import type { CheckPickerProps } from '../../CheckPicker';
|
|
23
|
+
import type { CheckTreeProps } from '../../CheckTree';
|
|
24
|
+
import type { CheckTreePickerProps } from '../../CheckTreePicker';
|
|
25
|
+
import type { CheckboxProps } from '../../Checkbox';
|
|
26
|
+
import type { CheckboxGroupProps } from '../../CheckboxGroup';
|
|
27
|
+
import type { ColProps } from '../../Col';
|
|
28
|
+
import type { ContainerProps } from '../../Container';
|
|
29
|
+
import type { ContentProps } from '../../Content';
|
|
30
|
+
import type { DateInputProps } from '../../DateInput';
|
|
31
|
+
import type { DatePickerProps } from '../../DatePicker';
|
|
32
|
+
import type { DateRangeInputProps } from '../../DateRangeInput';
|
|
33
|
+
import type { DateRangePickerProps } from '../../DateRangePicker';
|
|
34
|
+
import type { DividerProps } from '../../Divider';
|
|
35
|
+
import type { DrawerProps } from '../../Drawer';
|
|
36
|
+
import type { DropdownProps } from '../../Dropdown';
|
|
37
|
+
import type { FlexboxGridProps } from '../../FlexboxGrid';
|
|
38
|
+
import type { FooterProps } from '../../Footer';
|
|
39
|
+
import type { FormProps } from '../../Form';
|
|
40
|
+
import type { FormControlProps } from '../../FormControl';
|
|
41
|
+
import type { FormControlLabelProps } from '../../FormControlLabel';
|
|
42
|
+
import type { FormErrorMessageProps } from '../../FormErrorMessage';
|
|
43
|
+
import type { FormGroupProps } from '../../FormGroup';
|
|
44
|
+
import type { FormHelpTextProps } from '../../FormHelpText';
|
|
45
|
+
import type { FormStackProps } from '../../FormStack';
|
|
46
|
+
import type { GridProps } from '../../Grid';
|
|
47
|
+
import type { HeaderProps } from '../../Header';
|
|
48
|
+
import type { HeadingProps } from '../../Heading';
|
|
49
|
+
import type { HeadingGroupProps } from '../../HeadingGroup';
|
|
50
|
+
import type { HighlightProps } from '../../Highlight';
|
|
51
|
+
import type { IconButtonProps } from '../../IconButton';
|
|
52
|
+
import type { InlineEditProps } from '../../InlineEdit';
|
|
53
|
+
import type { InputProps } from '../../Input';
|
|
54
|
+
import type { InputGroupProps } from '../../InputGroup';
|
|
55
|
+
import type { NumberInputProps } from '../../NumberInput';
|
|
56
|
+
import type { InputPickerProps } from '../../InputPicker';
|
|
57
|
+
import type { KbdProps } from '../../Kbd';
|
|
58
|
+
import type { ImageProps } from '../../Image';
|
|
59
|
+
import type { LinkProps } from '../../Link';
|
|
60
|
+
import type { ListProps } from '../../List';
|
|
61
|
+
import type { LoaderProps } from '../../Loader';
|
|
62
|
+
import type { MaskedInputProps } from '../../MaskedInput';
|
|
63
|
+
import type { MessageProps } from '../../Message';
|
|
64
|
+
import type { ModalProps } from '../../Modal';
|
|
65
|
+
import type { MultiCascadeTreeProps } from '../../MultiCascadeTree';
|
|
66
|
+
import type { MultiCascaderProps } from '../../MultiCascader';
|
|
67
|
+
import type { NavProps } from '../../Nav';
|
|
68
|
+
import type { NavbarProps } from '../../Navbar';
|
|
69
|
+
import type { NotificationProps } from '../../Notification';
|
|
70
|
+
import type { PasswordInputProps } from '../../PasswordInput';
|
|
71
|
+
import type { PasswordStrengthMeterProps } from '../../PasswordStrengthMeter';
|
|
72
|
+
import type { PaginationProps } from '../../Pagination';
|
|
73
|
+
import type { PanelProps } from '../../Panel';
|
|
74
|
+
import type { PanelGroupProps } from '../../PanelGroup';
|
|
75
|
+
import type { PlaceholderGraphProps } from '../../Placeholder/PlaceholderGraph';
|
|
76
|
+
import type { PlaceholderGridProps } from '../../Placeholder/PlaceholderGrid';
|
|
77
|
+
import type { PlaceholderParagraphProps } from '../../Placeholder/PlaceholderParagraph';
|
|
78
|
+
import type { PopoverProps } from '../../Popover';
|
|
79
|
+
import type { ProgressCircleProps } from '../../Progress/ProgressCircle';
|
|
80
|
+
import type { ProgressLineProps } from '../../Progress/ProgressLine';
|
|
81
|
+
import type { PinInputProps } from '../../PinInput';
|
|
82
|
+
import type { RadioProps } from '../../Radio';
|
|
83
|
+
import type { RadioGroupProps } from '../../RadioGroup';
|
|
84
|
+
import type { RadioTileProps } from '../../RadioTile';
|
|
85
|
+
import type { RadioTileGroupProps } from '../../RadioTileGroup';
|
|
86
|
+
import type { RangeSliderProps } from '../../RangeSlider';
|
|
87
|
+
import type { RateProps } from '../../Rate';
|
|
88
|
+
import type { RowProps } from '../../Row';
|
|
89
|
+
import type { SelectPickerProps } from '../../SelectPicker';
|
|
90
|
+
import type { SidebarProps } from '../../Sidebar';
|
|
91
|
+
import type { SidenavProps } from '../../Sidenav';
|
|
92
|
+
import type { SliderProps } from '../../Slider';
|
|
93
|
+
import type { StackProps } from '../../Stack';
|
|
94
|
+
import type { StepsProps } from '../../Steps';
|
|
95
|
+
import type { StatProps } from '../../Stat';
|
|
96
|
+
import type { StatGroupProps } from '../../StatGroup';
|
|
97
|
+
import type { TableProps } from '../../Table';
|
|
98
|
+
import type { TabsProps } from '../../Tabs';
|
|
99
|
+
import type { TagProps } from '../../Tag';
|
|
100
|
+
import type { TagGroupProps } from '../../TagGroup';
|
|
101
|
+
import type { TagInputProps } from '../../TagInput';
|
|
102
|
+
import type { TagPickerProps } from '../../TagPicker';
|
|
103
|
+
import type { TextProps } from '../../Text';
|
|
104
|
+
import type { TimePickerProps } from '../../TimePicker';
|
|
105
|
+
import type { TimeRangePickerProps } from '../../TimeRangePicker';
|
|
106
|
+
import type { TimelineProps } from '../../Timeline';
|
|
107
|
+
import type { ToggleProps } from '../../Toggle';
|
|
108
|
+
import type { TooltipProps } from '../../Tooltip';
|
|
109
|
+
import type { TreeProps } from '../../Tree';
|
|
110
|
+
import type { TreePickerProps } from '../../TreePicker';
|
|
111
|
+
import type { TextareaProps } from '../../Textarea';
|
|
112
|
+
import type { UploaderProps } from '../../Uploader';
|
|
113
|
+
import type { VisuallyHiddenProps } from '../../VisuallyHidden';
|
|
114
|
+
import type { WhisperProps } from '../../Whisper';
|
|
115
|
+
import type { SafeAnchorProps } from '../SafeAnchor';
|
|
116
|
+
interface ComponentProps<T> {
|
|
117
|
+
defaultProps: Partial<T>;
|
|
118
|
+
}
|
|
119
|
+
export interface ReactSuiteComponents {
|
|
120
|
+
Accordion: ComponentProps<AccordionProps>;
|
|
121
|
+
Affix: ComponentProps<AffixProps>;
|
|
122
|
+
Bounce: ComponentProps<BounceProps>;
|
|
123
|
+
Collapse: ComponentProps<CollapseProps>;
|
|
124
|
+
Fade: ComponentProps<FadeProps>;
|
|
125
|
+
Slide: ComponentProps<SlideProps>;
|
|
126
|
+
Transition: ComponentProps<TransitionProps>;
|
|
127
|
+
AutoComplete: ComponentProps<AutoCompleteProps>;
|
|
128
|
+
Avatar: ComponentProps<AvatarProps>;
|
|
129
|
+
AvatarGroup: ComponentProps<AvatarGroupProps>;
|
|
130
|
+
Badge: ComponentProps<BadgeProps>;
|
|
131
|
+
Breadcrumb: ComponentProps<BreadcrumbProps>;
|
|
132
|
+
Button: ComponentProps<ButtonProps>;
|
|
133
|
+
ButtonGroup: ComponentProps<ButtonGroupProps>;
|
|
134
|
+
ButtonToolbar: ComponentProps<ButtonToolbarProps>;
|
|
135
|
+
Calendar: ComponentProps<CalendarProps>;
|
|
136
|
+
Carousel: ComponentProps<CarouselProps>;
|
|
137
|
+
CascadeTree: ComponentProps<CascadeTreeProps>;
|
|
138
|
+
Cascader: ComponentProps<CascaderProps>;
|
|
139
|
+
Card: ComponentProps<CardProps>;
|
|
140
|
+
CardGroup: ComponentProps<CardGroupProps>;
|
|
141
|
+
CheckPicker: ComponentProps<CheckPickerProps>;
|
|
142
|
+
CheckTree: ComponentProps<CheckTreeProps>;
|
|
143
|
+
CheckTreePicker: ComponentProps<CheckTreePickerProps>;
|
|
144
|
+
Checkbox: ComponentProps<CheckboxProps>;
|
|
145
|
+
CheckboxGroup: ComponentProps<CheckboxGroupProps>;
|
|
146
|
+
Col: ComponentProps<ColProps>;
|
|
147
|
+
Container: ComponentProps<ContainerProps>;
|
|
148
|
+
Content: ComponentProps<ContentProps>;
|
|
149
|
+
DateInput: ComponentProps<DateInputProps>;
|
|
150
|
+
DatePicker: ComponentProps<DatePickerProps>;
|
|
151
|
+
DateRangeInput: ComponentProps<DateRangeInputProps>;
|
|
152
|
+
DateRangePicker: ComponentProps<DateRangePickerProps>;
|
|
153
|
+
Divider: ComponentProps<DividerProps>;
|
|
154
|
+
Drawer: ComponentProps<DrawerProps>;
|
|
155
|
+
Dropdown: ComponentProps<DropdownProps>;
|
|
156
|
+
FlexboxGrid: ComponentProps<FlexboxGridProps>;
|
|
157
|
+
Footer: ComponentProps<FooterProps>;
|
|
158
|
+
Form: ComponentProps<FormProps>;
|
|
159
|
+
FormControl: ComponentProps<FormControlProps>;
|
|
160
|
+
FormControlLabel: ComponentProps<FormControlLabelProps>;
|
|
161
|
+
FormErrorMessage: ComponentProps<FormErrorMessageProps>;
|
|
162
|
+
FormGroup: ComponentProps<FormGroupProps>;
|
|
163
|
+
FormHelpText: ComponentProps<FormHelpTextProps>;
|
|
164
|
+
FormStack: ComponentProps<FormStackProps>;
|
|
165
|
+
Grid: ComponentProps<GridProps>;
|
|
166
|
+
Header: ComponentProps<HeaderProps>;
|
|
167
|
+
Heading: ComponentProps<HeadingProps>;
|
|
168
|
+
HeadingGroup: ComponentProps<HeadingGroupProps>;
|
|
169
|
+
Highlight: ComponentProps<HighlightProps>;
|
|
170
|
+
IconButton: ComponentProps<IconButtonProps>;
|
|
171
|
+
InlineEdit: ComponentProps<InlineEditProps>;
|
|
172
|
+
Input: ComponentProps<InputProps>;
|
|
173
|
+
InputGroup: ComponentProps<InputGroupProps>;
|
|
174
|
+
NumberInput: ComponentProps<NumberInputProps>;
|
|
175
|
+
InputPicker: ComponentProps<InputPickerProps>;
|
|
176
|
+
Image: ComponentProps<ImageProps>;
|
|
177
|
+
Kbd: ComponentProps<KbdProps>;
|
|
178
|
+
Link: ComponentProps<LinkProps>;
|
|
179
|
+
List: ComponentProps<ListProps>;
|
|
180
|
+
Loader: ComponentProps<LoaderProps>;
|
|
181
|
+
MaskedInput: ComponentProps<MaskedInputProps>;
|
|
182
|
+
Message: ComponentProps<MessageProps>;
|
|
183
|
+
Modal: ComponentProps<ModalProps>;
|
|
184
|
+
MultiCascadeTree: ComponentProps<MultiCascadeTreeProps>;
|
|
185
|
+
MultiCascader: ComponentProps<MultiCascaderProps>;
|
|
186
|
+
Nav: ComponentProps<NavProps>;
|
|
187
|
+
Navbar: ComponentProps<NavbarProps>;
|
|
188
|
+
Notification: ComponentProps<NotificationProps>;
|
|
189
|
+
PasswordInput: ComponentProps<PasswordInputProps>;
|
|
190
|
+
PasswordStrengthMeter: ComponentProps<PasswordStrengthMeterProps>;
|
|
191
|
+
Pagination: ComponentProps<PaginationProps>;
|
|
192
|
+
Panel: ComponentProps<PanelProps>;
|
|
193
|
+
PanelGroup: ComponentProps<PanelGroupProps>;
|
|
194
|
+
PlaceholderGraph: ComponentProps<PlaceholderGraphProps>;
|
|
195
|
+
PlaceholderGrid: ComponentProps<PlaceholderGridProps>;
|
|
196
|
+
PlaceholderParagraph: ComponentProps<PlaceholderParagraphProps>;
|
|
197
|
+
PinInput: ComponentProps<PinInputProps>;
|
|
198
|
+
Popover: ComponentProps<PopoverProps>;
|
|
199
|
+
ProgressCircle: ComponentProps<ProgressCircleProps>;
|
|
200
|
+
ProgressLine: ComponentProps<ProgressLineProps>;
|
|
201
|
+
Radio: ComponentProps<RadioProps>;
|
|
202
|
+
RadioGroup: ComponentProps<RadioGroupProps>;
|
|
203
|
+
RadioTile: ComponentProps<RadioTileProps>;
|
|
204
|
+
RadioTileGroup: ComponentProps<RadioTileGroupProps>;
|
|
205
|
+
RangeSlider: ComponentProps<RangeSliderProps>;
|
|
206
|
+
Rate: ComponentProps<RateProps>;
|
|
207
|
+
Row: ComponentProps<RowProps>;
|
|
208
|
+
SelectPicker: ComponentProps<SelectPickerProps>;
|
|
209
|
+
Sidebar: ComponentProps<SidebarProps>;
|
|
210
|
+
Sidenav: ComponentProps<SidenavProps>;
|
|
211
|
+
Slider: ComponentProps<SliderProps>;
|
|
212
|
+
Stack: ComponentProps<StackProps>;
|
|
213
|
+
Steps: ComponentProps<StepsProps>;
|
|
214
|
+
Stat: ComponentProps<StatProps>;
|
|
215
|
+
StatGroup: ComponentProps<StatGroupProps>;
|
|
216
|
+
Table: ComponentProps<TableProps>;
|
|
217
|
+
Tabs: ComponentProps<TabsProps>;
|
|
218
|
+
Tag: ComponentProps<TagProps>;
|
|
219
|
+
TagGroup: ComponentProps<TagGroupProps>;
|
|
220
|
+
TagInput: ComponentProps<TagInputProps>;
|
|
221
|
+
TagPicker: ComponentProps<TagPickerProps>;
|
|
222
|
+
Text: ComponentProps<TextProps>;
|
|
223
|
+
TimePicker: ComponentProps<TimePickerProps>;
|
|
224
|
+
TimeRangePicker: ComponentProps<TimeRangePickerProps>;
|
|
225
|
+
Timeline: ComponentProps<TimelineProps>;
|
|
226
|
+
Toggle: ComponentProps<ToggleProps>;
|
|
227
|
+
Tooltip: ComponentProps<TooltipProps>;
|
|
228
|
+
Tree: ComponentProps<TreeProps>;
|
|
229
|
+
TreePicker: ComponentProps<TreePickerProps>;
|
|
230
|
+
Textarea: ComponentProps<TextareaProps>;
|
|
231
|
+
Uploader: ComponentProps<UploaderProps>;
|
|
232
|
+
VisuallyHidden: ComponentProps<VisuallyHiddenProps>;
|
|
233
|
+
Whisper: ComponentProps<WhisperProps>;
|
|
234
|
+
SafeAnchor: ComponentProps<SafeAnchorProps>;
|
|
235
|
+
}
|
|
236
|
+
export {};
|
|
@@ -11,7 +11,6 @@ var _on = _interopRequireDefault(require("dom-lib/on"));
|
|
|
11
11
|
var _Transition = _interopRequireDefault(require("../../Animation/Transition"));
|
|
12
12
|
var _hooks = require("../hooks");
|
|
13
13
|
var _utils = require("../utils");
|
|
14
|
-
var _CustomProvider = require("../../CustomProvider");
|
|
15
14
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
16
15
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
16
|
const getPosition = (target, event) => {
|
|
@@ -36,7 +35,7 @@ const getPosition = (target, event) => {
|
|
|
36
35
|
const Ripple = (0, _utils.forwardRef)((props, ref) => {
|
|
37
36
|
const {
|
|
38
37
|
disableRipple
|
|
39
|
-
} = (0,
|
|
38
|
+
} = (0, _hooks.useCustom)();
|
|
40
39
|
const {
|
|
41
40
|
as: Component = 'span',
|
|
42
41
|
className,
|
|
@@ -7,7 +7,7 @@ exports.default = void 0;
|
|
|
7
7
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _Box = _interopRequireDefault(require("../Box"));
|
|
10
|
-
var
|
|
10
|
+
var _hooks = require("../hooks");
|
|
11
11
|
var _utils = require("../utils");
|
|
12
12
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
13
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -22,7 +22,7 @@ function isTrivialHref(href) {
|
|
|
22
22
|
const SafeAnchor = (0, _utils.forwardRef)((props, ref) => {
|
|
23
23
|
const {
|
|
24
24
|
propsWithDefaults
|
|
25
|
-
} = (0,
|
|
25
|
+
} = (0, _hooks.useCustom)('SafeAnchor', props);
|
|
26
26
|
const {
|
|
27
27
|
as = 'a',
|
|
28
28
|
href,
|
|
@@ -8,7 +8,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _ScrollView = _interopRequireDefault(require("../ScrollView"));
|
|
10
10
|
var _reactWindow = require("react-window");
|
|
11
|
-
var
|
|
11
|
+
var _hooks = require("../hooks");
|
|
12
12
|
var _utils = require("../utils");
|
|
13
13
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
14
14
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -37,7 +37,7 @@ const List = (0, _utils.forwardRef)((props, ref) => {
|
|
|
37
37
|
const listRef = (0, _react.useRef)(null);
|
|
38
38
|
const {
|
|
39
39
|
rtl
|
|
40
|
-
} = (0,
|
|
40
|
+
} = (0, _hooks.useCustom)();
|
|
41
41
|
(0, _react.useImperativeHandle)(ref, () => ({
|
|
42
42
|
resetAfterIndex: (index, shouldForceUpdate) => {
|
|
43
43
|
var _listRef$current, _listRef$current$rese;
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
exports.__esModule = true;
|
|
5
|
-
exports.useWillUnmount = exports.useUpdatedRef = exports.useUpdateEffect = exports.useUniqueId = exports.useToggleCaret = exports.useTimeout = exports.useStyles = exports.useRootClose = exports.usePortal = exports.useMount = exports.useMap = exports.useIsomorphicLayoutEffect = exports.useIsMounted = exports.useInternalId = exports.useFocusVirtualListItem = exports.useFocus = exports.useEventListener = exports.useEventCallback = exports.useEnsuredRef = exports.useElementResize = exports.useControlled = exports.useClickOutside = void 0;
|
|
5
|
+
exports.useWillUnmount = exports.useUpdatedRef = exports.useUpdateEffect = exports.useUniqueId = exports.useToggleCaret = exports.useTimeout = exports.useStyles = exports.useRootClose = exports.usePortal = exports.useMount = exports.useMap = exports.useIsomorphicLayoutEffect = exports.useIsMounted = exports.useInternalId = exports.useFocusVirtualListItem = exports.useFocus = exports.useEventListener = exports.useEventCallback = exports.useEnsuredRef = exports.useElementResize = exports.useCustom = exports.useControlled = exports.useClickOutside = void 0;
|
|
6
|
+
var _useCustom = require("./useCustom");
|
|
7
|
+
exports.useCustom = _useCustom.useCustom;
|
|
6
8
|
var _useStyles = require("./useStyles");
|
|
7
9
|
exports.useStyles = _useStyles.useStyles;
|
|
8
10
|
var _useClickOutside = require("./useClickOutside");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import enGB from '
|
|
3
|
-
import type { FormatDateOptions } from '../
|
|
4
|
-
import type { ReactSuiteComponents } from '
|
|
2
|
+
import enGB from '../../locales/en_GB';
|
|
3
|
+
import type { FormatDateOptions } from '../utils/date/types';
|
|
4
|
+
import type { ReactSuiteComponents } from '../Provider/types';
|
|
5
5
|
type LocaleKey = keyof typeof enGB;
|
|
6
6
|
/**
|
|
7
7
|
* A hook to get custom configuration of `<CustomProvider>`
|
|
@@ -11,7 +11,7 @@ type LocaleKey = keyof typeof enGB;
|
|
|
11
11
|
export declare function useCustom<P = any>(componentName?: keyof ReactSuiteComponents, componentProps?: P): {
|
|
12
12
|
code: string | undefined;
|
|
13
13
|
rtl: boolean;
|
|
14
|
-
toasters: import("react").MutableRefObject<Map<string, import("
|
|
14
|
+
toasters: import("react").MutableRefObject<Map<string, import("../../toaster/ToastContainer").ToastContainerInstance>> | undefined;
|
|
15
15
|
disableRipple: boolean | undefined;
|
|
16
16
|
classPrefix: string | undefined;
|
|
17
17
|
propsWithDefaults: P;
|
|
@@ -5,11 +5,11 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
exports.__esModule = true;
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
exports.useCustom = useCustom;
|
|
8
|
-
var _react = require("react");
|
|
9
8
|
var _assign = _interopRequireDefault(require("lodash/assign"));
|
|
10
|
-
var _en_GB = _interopRequireDefault(require("
|
|
11
|
-
var
|
|
12
|
-
var
|
|
9
|
+
var _en_GB = _interopRequireDefault(require("../../locales/en_GB"));
|
|
10
|
+
var _react = require("react");
|
|
11
|
+
var _date = require("../utils/date");
|
|
12
|
+
var _CustomContext = require("../Provider/CustomContext");
|
|
13
13
|
function getDefaultRTL() {
|
|
14
14
|
return typeof document !== 'undefined' && (document.body.getAttribute('dir') || document.dir) === 'rtl';
|
|
15
15
|
}
|
|
@@ -37,7 +37,7 @@ function useCustom(componentName, componentProps) {
|
|
|
37
37
|
classPrefix,
|
|
38
38
|
toasters,
|
|
39
39
|
disableRipple
|
|
40
|
-
} = (0, _react.useContext)(
|
|
40
|
+
} = (0, _react.useContext)(_CustomContext.CustomContext);
|
|
41
41
|
const {
|
|
42
42
|
locale: componentLocale,
|
|
43
43
|
...restProps
|
|
@@ -8,7 +8,7 @@ exports.useStyles = useStyles;
|
|
|
8
8
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
9
|
var _react = require("react");
|
|
10
10
|
var _utils = require("../utils");
|
|
11
|
-
var
|
|
11
|
+
var _CustomContext = require("../Provider/CustomContext");
|
|
12
12
|
// This is the only way I found to break circular references between ClassArray and ClassValue
|
|
13
13
|
// https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540
|
|
14
14
|
|
|
@@ -26,7 +26,7 @@ var _CustomProvider = require("../../CustomProvider/CustomProvider");
|
|
|
26
26
|
function useStyles(str) {
|
|
27
27
|
const {
|
|
28
28
|
classPrefix = 'rs'
|
|
29
|
-
} = (0, _react.useContext)(
|
|
29
|
+
} = (0, _react.useContext)(_CustomContext.CustomContext) || {};
|
|
30
30
|
const baseClass = (0, _utils.prefix)(classPrefix, str);
|
|
31
31
|
|
|
32
32
|
/**
|
|
@@ -6,7 +6,7 @@ exports.__esModule = true;
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
exports.useToggleCaret = useToggleCaret;
|
|
8
8
|
var _react = require("react");
|
|
9
|
-
var
|
|
9
|
+
var _ = require("./");
|
|
10
10
|
var _ArrowUpLine = _interopRequireDefault(require("@rsuite/icons/ArrowUpLine"));
|
|
11
11
|
var _ArrowDownLine = _interopRequireDefault(require("@rsuite/icons/ArrowDownLine"));
|
|
12
12
|
var _ArrowLeftLine = _interopRequireDefault(require("@rsuite/icons/ArrowLeftLine"));
|
|
@@ -14,7 +14,7 @@ var _ArrowRightLine = _interopRequireDefault(require("@rsuite/icons/ArrowRightLi
|
|
|
14
14
|
function useToggleCaret(placement) {
|
|
15
15
|
const {
|
|
16
16
|
rtl
|
|
17
|
-
} = (0,
|
|
17
|
+
} = (0, _.useCustom)();
|
|
18
18
|
return (0, _react.useMemo)(() => {
|
|
19
19
|
switch (true) {
|
|
20
20
|
case /^top/.test(placement):
|
|
@@ -6,7 +6,7 @@ exports.__esModule = true;
|
|
|
6
6
|
exports.FormattedDate = FormattedDate;
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var
|
|
9
|
+
var _hooks = require("../hooks");
|
|
10
10
|
function FormattedDate(_ref) {
|
|
11
11
|
let {
|
|
12
12
|
date,
|
|
@@ -14,7 +14,7 @@ function FormattedDate(_ref) {
|
|
|
14
14
|
} = _ref;
|
|
15
15
|
const {
|
|
16
16
|
formatDate
|
|
17
|
-
} = (0,
|
|
17
|
+
} = (0, _hooks.useCustom)('Calendar');
|
|
18
18
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, formatDate(date, formatStr));
|
|
19
19
|
}
|
|
20
20
|
var _default = exports.default = FormattedDate;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
exports.__esModule = true;
|
|
5
5
|
exports.FormattedNumber = FormattedNumber;
|
|
6
6
|
var _react = _interopRequireWildcard(require("react"));
|
|
7
|
-
var
|
|
7
|
+
var _hooks = require("../hooks");
|
|
8
8
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
9
9
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
10
10
|
function FormattedNumber(_ref) {
|
|
@@ -14,7 +14,7 @@ function FormattedNumber(_ref) {
|
|
|
14
14
|
} = _ref;
|
|
15
15
|
const {
|
|
16
16
|
code
|
|
17
|
-
} = (0,
|
|
17
|
+
} = (0, _hooks.useCustom)();
|
|
18
18
|
const formatter = (0, _react.useMemo)(() => new Intl.NumberFormat(code, formatOptions), [code, formatOptions]);
|
|
19
19
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, formatter.format(value));
|
|
20
20
|
}
|
|
@@ -4,7 +4,7 @@ import type { ToArray } from './utils';
|
|
|
4
4
|
import type { FormControlBaseProps } from './form';
|
|
5
5
|
import type { AnimationEventProps } from './animation';
|
|
6
6
|
import type { BoxProps } from '../Box';
|
|
7
|
-
import type {
|
|
7
|
+
import type { BasicSize } from './sizes';
|
|
8
8
|
import type { PickerHandle } from '../Picker/types';
|
|
9
9
|
export interface Option<T = number | string> extends Record<string, any> {
|
|
10
10
|
label?: string | ReactNode;
|
|
@@ -123,7 +123,7 @@ export interface PickerBaseProps<L = any> extends PopupProps, BoxProps, Animatio
|
|
|
123
123
|
/** A picker that can clear values */
|
|
124
124
|
cleanable?: boolean;
|
|
125
125
|
/** A picker can have different sizes */
|
|
126
|
-
size?:
|
|
126
|
+
size?: BasicSize;
|
|
127
127
|
/** Called when Modal is displayed */
|
|
128
128
|
onOpen?: () => void;
|
|
129
129
|
/** Called when Modal is closed */
|
|
@@ -18,6 +18,8 @@ export declare enum TypographySizeEnum {
|
|
|
18
18
|
XL6 = "6xl"
|
|
19
19
|
}
|
|
20
20
|
export type Size = `${SizeEnum}`;
|
|
21
|
+
/** Basic size type (xs, sm, md, lg) */
|
|
22
|
+
export type BasicSize = Exclude<Size, 'xl'>;
|
|
21
23
|
export type TextSize = `${TypographySizeEnum}`;
|
|
22
24
|
export type Breakpoints = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
23
25
|
export type ResponsiveValue<T> = {
|
|
@@ -15,13 +15,11 @@ var _startOfWeek = require("date-fns/startOfWeek");
|
|
|
15
15
|
*/
|
|
16
16
|
function getWeekStartDates(firstDayOfMonth, options) {
|
|
17
17
|
const {
|
|
18
|
-
weekStart
|
|
19
|
-
isoWeek,
|
|
18
|
+
weekStart,
|
|
20
19
|
locale
|
|
21
20
|
} = options;
|
|
22
|
-
const weekStartsOn = isoWeek ? 1 : weekStart;
|
|
23
21
|
const firstDay = (0, _startOfWeek.startOfWeek)(firstDayOfMonth, {
|
|
24
|
-
weekStartsOn,
|
|
22
|
+
weekStartsOn: weekStart,
|
|
25
23
|
locale
|
|
26
24
|
});
|
|
27
25
|
const days = [firstDay];
|
|
@@ -9,9 +9,20 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
10
|
var _kebabCase = _interopRequireDefault(require("lodash/kebabCase"));
|
|
11
11
|
var _Box = _interopRequireDefault(require("../../Box/Box"));
|
|
12
|
-
var _hooks = require("../../hooks");
|
|
13
12
|
var _forwardRef = require("./forwardRef");
|
|
14
|
-
var
|
|
13
|
+
var _useStyles = require("../../hooks/useStyles");
|
|
14
|
+
var _useCustom = require("../../hooks/useCustom");
|
|
15
|
+
/**
|
|
16
|
+
* Why not import like this:
|
|
17
|
+
* ```
|
|
18
|
+
* import { useStyles, useCustom } from '../../hooks/index.js';
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* We import useStyles and useCustom separately to prevent Vite from displaying Rollup warnings
|
|
22
|
+
* during the build process. This approach avoids circular dependency issues that could affect
|
|
23
|
+
* chunk division and optimizes the build output.
|
|
24
|
+
*/
|
|
25
|
+
|
|
15
26
|
/**
|
|
16
27
|
* Create a component with `classPrefix` and `as` attributes.
|
|
17
28
|
* By default, the component is based on Box component and inherits all Box props.
|
|
@@ -26,7 +37,7 @@ function createComponent(_ref) {
|
|
|
26
37
|
const Component = (0, _forwardRef.forwardRef)((props, ref) => {
|
|
27
38
|
const {
|
|
28
39
|
propsWithDefaults
|
|
29
|
-
} = (0,
|
|
40
|
+
} = (0, _useCustom.useCustom)(name, props);
|
|
30
41
|
const {
|
|
31
42
|
as,
|
|
32
43
|
classPrefix = componentClassPrefix || (0, _kebabCase.default)(name),
|
|
@@ -37,7 +48,7 @@ function createComponent(_ref) {
|
|
|
37
48
|
const {
|
|
38
49
|
withPrefix,
|
|
39
50
|
merge
|
|
40
|
-
} = (0,
|
|
51
|
+
} = (0, _useStyles.useStyles)(classPrefix);
|
|
41
52
|
const classes = merge(className, withPrefix());
|
|
42
53
|
return /*#__PURE__*/_react.default.createElement(_Box.default, (0, _extends2.default)({}, defaultProps, rest, {
|
|
43
54
|
role: role,
|
|
@@ -4,15 +4,15 @@ interface FieldProps {
|
|
|
4
4
|
formValue?: Record<string, any>;
|
|
5
5
|
formError?: Record<string, any>;
|
|
6
6
|
value: any;
|
|
7
|
-
nestedField
|
|
7
|
+
nestedField?: boolean;
|
|
8
8
|
errorMessage: React.ReactNode;
|
|
9
9
|
errorFromContext?: boolean;
|
|
10
10
|
}
|
|
11
|
-
declare function useField(props: FieldProps): {
|
|
11
|
+
export declare function useField(props: FieldProps): {
|
|
12
12
|
fieldValue: any;
|
|
13
13
|
fieldError: import("react").ReactNode;
|
|
14
14
|
setFieldValue: (fieldName: string, fieldValue: any) => {
|
|
15
15
|
[x: string]: any;
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
|
-
export
|
|
18
|
+
export {};
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
5
|
exports.__esModule = true;
|
|
6
|
-
exports.
|
|
7
|
-
var _react = require("react");
|
|
6
|
+
exports.useField = useField;
|
|
8
7
|
var _get = _interopRequireDefault(require("lodash/get"));
|
|
9
8
|
var _set = _interopRequireDefault(require("lodash/set"));
|
|
10
|
-
var
|
|
9
|
+
var _react = require("react");
|
|
10
|
+
var _nameToPath = require("../utils/nameToPath");
|
|
11
11
|
function getErrorMessage(error) {
|
|
12
12
|
var _error$array;
|
|
13
13
|
if (typeof error === 'string') {
|
|
@@ -48,7 +48,7 @@ function useField(props) {
|
|
|
48
48
|
return errorMessage;
|
|
49
49
|
}
|
|
50
50
|
if (nestedField) {
|
|
51
|
-
return getErrorMessage((0, _get.default)(formError, (0,
|
|
51
|
+
return getErrorMessage((0, _get.default)(formError, (0, _nameToPath.nameToPath)(name)));
|
|
52
52
|
}
|
|
53
53
|
const fieldError = formError === null || formError === void 0 ? void 0 : formError[name];
|
|
54
54
|
if (typeof fieldError === 'string') {
|
|
@@ -72,5 +72,4 @@ function useField(props) {
|
|
|
72
72
|
fieldError,
|
|
73
73
|
setFieldValue
|
|
74
74
|
};
|
|
75
|
-
}
|
|
76
|
-
var _default = exports.default = useField;
|
|
75
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
exports.__esModule = true;
|
|
5
|
-
exports.
|
|
5
|
+
exports.useRegisterModel = useRegisterModel;
|
|
6
6
|
var _react = require("react");
|
|
7
7
|
var _FormContext = require("../../Form/FormContext");
|
|
8
8
|
function useRegisterModel(name, rule) {
|
|
@@ -18,5 +18,4 @@ function useRegisterModel(name, rule) {
|
|
|
18
18
|
removeFieldRule === null || removeFieldRule === void 0 || removeFieldRule(name);
|
|
19
19
|
};
|
|
20
20
|
}, [name, pushFieldRule, removeFieldRule]);
|
|
21
|
-
}
|
|
22
|
-
var _default = exports.default = useRegisterModel;
|
|
21
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _useFormControl = _interopRequireDefault(require("./useFormControl"));
|
|
8
|
+
exports.useFormControl = _useFormControl.default;
|
|
9
|
+
// export types
|
|
10
|
+
// export hooks
|
|
11
|
+
var _default = exports.default = _useFormControl.default;
|