rsuite 6.0.0-canary-2025031415 → 6.0.0-canary-20250319
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/Accordion/styles/index.css +2 -1
- package/AutoComplete/styles/index.css +2 -1
- package/Box/styles/index.css +53 -91
- package/ButtonToolbar/styles/index.css +4 -0
- package/ButtonToolbar/styles/index.less +5 -0
- package/CHANGELOG.md +9 -0
- package/Card/styles/index.css +2 -1
- package/Cascader/styles/index.css +2 -1
- package/CheckPicker/styles/index.css +2 -1
- package/CheckTree/styles/index.css +4 -3
- package/CheckTree/styles/index.less +1 -1
- package/CheckTreePicker/styles/index.css +4 -3
- package/DatePicker/styles/index.css +2 -1
- package/DateRangePicker/styles/index.css +2 -1
- package/Drawer/styles/index.css +2 -1
- package/Dropdown/styles/index.css +2 -1
- package/InlineEdit/styles/index.css +2 -1
- package/InputPicker/styles/index.css +2 -1
- package/List/styles/index.css +2 -1
- package/Modal/styles/index.css +2 -1
- package/MultiCascadeTree/styles/index.css +2 -1
- package/MultiCascader/styles/index.css +2 -1
- package/Nav/styles/index.css +3 -2
- package/Navbar/styles/index.css +2 -1
- package/Notification/styles/index.css +2 -1
- package/Pagination/styles/index.css +2 -1
- package/Panel/styles/index.css +2 -1
- package/Popover/styles/index.css +1 -1
- package/Popover/styles/index.less +2 -1
- package/RadioTile/styles/index.css +4 -0
- package/RadioTile/styles/index.less +4 -1
- package/SelectPicker/styles/index.css +2 -1
- package/Sidebar/styles/index.css +4 -0
- package/Sidebar/styles/index.less +8 -1
- package/Tabs/styles/index.css +3 -2
- package/TagInput/styles/index.css +2 -1
- package/TagPicker/styles/index.css +2 -1
- package/Text/styles/index.css +12 -31
- package/Text/styles/index.less +5 -7
- package/TimePicker/styles/index.css +2 -1
- package/TimeRangePicker/styles/index.css +2 -1
- package/Tree/styles/indent-line.less +1 -1
- package/Tree/styles/index.css +4 -3
- package/TreePicker/styles/index.css +4 -3
- package/cjs/Affix/Affix.d.ts +3 -2
- package/cjs/Affix/Affix.js +5 -2
- package/cjs/AutoComplete/AutoComplete.d.ts +3 -2
- package/cjs/AutoComplete/AutoComplete.js +4 -2
- package/cjs/Avatar/Avatar.d.ts +3 -2
- package/cjs/AvatarGroup/AvatarGroup.d.ts +3 -2
- package/cjs/AvatarGroup/AvatarGroup.js +4 -2
- package/cjs/Badge/Badge.d.ts +3 -2
- package/cjs/Badge/Badge.js +6 -3
- package/cjs/Breadcrumb/Breadcrumb.d.ts +2 -2
- package/cjs/Breadcrumb/BreadcrumbItem.d.ts +2 -2
- package/cjs/Breadcrumb/BreadcrumbItem.js +4 -2
- package/cjs/Button/Button.d.ts +3 -2
- package/cjs/Button/Button.js +8 -14
- package/cjs/ButtonGroup/ButtonGroup.d.ts +3 -2
- package/cjs/ButtonGroup/ButtonGroup.js +5 -2
- package/cjs/ButtonToolbar/ButtonToolbar.d.ts +1 -2
- package/cjs/ButtonToolbar/ButtonToolbar.js +4 -7
- package/cjs/Calendar/Calendar.d.ts +2 -2
- package/cjs/Calendar/Calendar.js +7 -6
- package/cjs/Card/Card.d.ts +5 -14
- package/cjs/Card/Card.js +4 -2
- package/cjs/Card/CardBody.d.ts +1 -4
- package/cjs/Card/CardBody.js +0 -0
- package/cjs/Card/CardFooter.d.ts +1 -4
- package/cjs/Card/CardFooter.js +0 -0
- package/cjs/Card/CardHeader.d.ts +1 -4
- package/cjs/Card/CardHeader.js +0 -0
- package/cjs/CardGroup/CardGroup.d.ts +2 -2
- package/cjs/CardGroup/CardGroup.js +4 -2
- package/cjs/Carousel/Carousel.d.ts +2 -2
- package/cjs/Carousel/Carousel.js +5 -2
- package/cjs/CascadeTree/CascadeTree.js +4 -2
- package/cjs/CascadeTree/types.d.ts +3 -2
- package/cjs/Cascader/Cascader.d.ts +1 -1
- package/cjs/Cascader/Cascader.js +4 -2
- package/cjs/CheckPicker/CheckPicker.js +4 -2
- package/cjs/CheckTree/CheckTreeView.js +4 -2
- package/cjs/CheckTreePicker/CheckTreePicker.js +4 -2
- package/cjs/Checkbox/Checkbox.d.ts +3 -2
- package/cjs/Checkbox/Checkbox.js +8 -3
- package/cjs/CheckboxGroup/CheckboxGroup.d.ts +3 -2
- package/cjs/CheckboxGroup/CheckboxGroup.js +5 -2
- package/cjs/Container/Container.d.ts +2 -2
- package/cjs/Container/Container.js +5 -2
- package/cjs/Content/Content.d.ts +1 -4
- package/cjs/Content/Content.js +0 -0
- package/cjs/DatePicker/DatePicker.js +4 -2
- package/cjs/DateRangePicker/DateRangePicker.js +4 -2
- package/cjs/Divider/Divider.d.ts +3 -2
- package/cjs/Drawer/Drawer.d.ts +2 -4
- package/cjs/Drawer/DrawerActions.d.ts +1 -3
- package/cjs/Drawer/DrawerActions.js +0 -0
- package/cjs/Drawer/DrawerBody.d.ts +1 -1
- package/cjs/Dropdown/DropdownItem.d.ts +3 -2
- package/cjs/Dropdown/DropdownItem.js +2 -2
- package/cjs/Footer/Footer.d.ts +1 -4
- package/cjs/Footer/Footer.js +0 -0
- package/cjs/Grid/Col.d.ts +3 -2
- package/cjs/Grid/Col.js +5 -2
- package/cjs/Grid/Grid.d.ts +2 -2
- package/cjs/Grid/Grid.js +5 -2
- package/cjs/Grid/Row.d.ts +3 -2
- package/cjs/Grid/Row.js +8 -4
- package/cjs/Header/Header.d.ts +1 -4
- package/cjs/Header/Header.js +0 -0
- package/cjs/Heading/Heading.d.ts +2 -2
- package/cjs/Heading/Heading.js +4 -2
- package/cjs/HeadingGroup/HeadingGroup.d.ts +1 -4
- package/cjs/HeadingGroup/HeadingGroup.js +0 -0
- package/cjs/Highlight/Highlight.d.ts +2 -2
- package/cjs/Highlight/Highlight.js +4 -2
- package/cjs/Image/Image.d.ts +2 -2
- package/cjs/Image/Image.js +8 -8
- package/cjs/Image/ImageWrapper.d.ts +3 -4
- package/cjs/Image/ImageWrapper.js +0 -0
- package/cjs/InlineEdit/InlineEdit.d.ts +2 -2
- package/cjs/InlineEdit/InlineEdit.js +4 -2
- package/cjs/Input/Input.d.ts +3 -2
- package/cjs/Input/Input.js +5 -2
- package/cjs/InputGroup/InputGroup.d.ts +3 -2
- package/cjs/InputGroup/InputGroup.js +5 -2
- package/cjs/InputGroup/InputGroupAddon.d.ts +2 -2
- package/cjs/InputGroup/InputGroupAddon.js +5 -2
- package/cjs/InputNumber/InputNumber.d.ts +3 -2
- package/cjs/InputNumber/InputNumber.js +5 -2
- package/cjs/InputPicker/InputPicker.d.ts +2 -2
- package/cjs/InputPicker/InputPicker.js +14 -5
- package/cjs/Kbd/Kbd.d.ts +3 -2
- package/cjs/Kbd/Kbd.js +5 -2
- package/cjs/List/List.d.ts +2 -2
- package/cjs/List/List.js +6 -5
- package/cjs/List/ListItem.d.ts +2 -2
- package/cjs/List/ListItem.js +6 -5
- package/cjs/Loader/Loader.d.ts +3 -2
- package/cjs/Loader/Loader.js +6 -5
- package/cjs/Menu/Menu.d.ts +3 -2
- package/cjs/Menu/Menu.js +5 -1
- package/cjs/Menu/MenuItem.d.ts +3 -2
- package/cjs/Menu/MenuItem.js +2 -2
- package/cjs/Menu/MenuSeparator.d.ts +2 -2
- package/cjs/Menu/MenuSeparator.js +6 -4
- package/cjs/Message/Message.d.ts +3 -2
- package/cjs/Message/Message.js +4 -2
- package/cjs/Modal/Modal.d.ts +2 -4
- package/cjs/Modal/ModalBody.d.ts +3 -3
- package/cjs/Modal/ModalBody.js +5 -2
- package/cjs/Modal/ModalDialog.d.ts +3 -2
- package/cjs/Modal/ModalDialog.js +4 -2
- package/cjs/Modal/ModalFooter.d.ts +1 -3
- package/cjs/Modal/ModalHeader.d.ts +2 -2
- package/cjs/Modal/ModalHeader.js +5 -2
- package/cjs/Modal/ModalTitle.js +4 -2
- package/cjs/MultiCascadeTree/MultiCascadeTree.js +4 -2
- package/cjs/MultiCascadeTree/types.d.ts +2 -2
- package/cjs/MultiCascader/MultiCascader.js +4 -2
- package/cjs/Nav/Nav.d.ts +3 -2
- package/cjs/Nav/Nav.js +7 -3
- package/cjs/Nav/NavDropdown.d.ts +4 -3
- package/cjs/Nav/NavDropdown.js +4 -2
- package/cjs/Nav/NavDropdownItem.d.ts +3 -2
- package/cjs/Nav/NavDropdownItem.js +4 -4
- package/cjs/Nav/NavDropdownToggle.d.ts +4 -3
- package/cjs/Nav/NavDropdownToggle.js +5 -2
- package/cjs/Nav/NavItem.d.ts +3 -2
- package/cjs/Nav/NavItem.js +4 -2
- package/cjs/Navbar/Navbar.d.ts +4 -8
- package/cjs/Navbar/Navbar.js +5 -2
- package/cjs/Navbar/NavbarBrand.d.ts +1 -5
- package/cjs/Navbar/NavbarBrand.js +0 -0
- package/cjs/Navbar/NavbarContent.d.ts +1 -1
- package/cjs/Navbar/NavbarDropdown.d.ts +2 -1
- package/cjs/Navbar/NavbarDropdown.js +4 -2
- package/cjs/Navbar/NavbarDropdownItem.d.ts +4 -3
- package/cjs/Navbar/NavbarDropdownItem.js +7 -7
- package/cjs/Navbar/NavbarDropdownToggle.d.ts +4 -3
- package/cjs/Navbar/NavbarDropdownToggle.js +5 -2
- package/cjs/Navbar/NavbarItem.d.ts +3 -2
- package/cjs/Navbar/NavbarItem.js +5 -3
- package/cjs/Navbar/NavbarMegaMenu.js +7 -5
- package/cjs/Notification/Notification.d.ts +3 -2
- package/cjs/Notification/Notification.js +4 -2
- package/cjs/Pagination/Pagination.d.ts +3 -2
- package/cjs/Pagination/Pagination.js +5 -3
- package/cjs/Pagination/PaginationGroup.js +4 -2
- package/cjs/Panel/Panel.d.ts +3 -2
- package/cjs/Panel/Panel.js +5 -3
- package/cjs/Panel/PanelBody.d.ts +1 -1
- package/cjs/Panel/PanelBody.js +1 -1
- package/cjs/Panel/PanelHeader.d.ts +2 -2
- package/cjs/Panel/PanelHeader.js +4 -2
- package/cjs/PanelGroup/PanelGroup.d.ts +2 -2
- package/cjs/PanelGroup/PanelGroup.js +5 -2
- package/cjs/Placeholder/PlaceholderGraph.d.ts +2 -2
- package/cjs/Placeholder/PlaceholderGraph.js +8 -8
- package/cjs/Placeholder/PlaceholderGrid.d.ts +2 -2
- package/cjs/Placeholder/PlaceholderGrid.js +8 -8
- package/cjs/Placeholder/PlaceholderParagraph.d.ts +2 -2
- package/cjs/Placeholder/PlaceholderParagraph.js +8 -8
- package/cjs/Popover/Popover.d.ts +2 -2
- package/cjs/Popover/Popover.js +6 -5
- package/cjs/Progress/ProgressCircle.d.ts +2 -2
- package/cjs/Progress/ProgressCircle.js +4 -2
- package/cjs/Progress/ProgressLine.d.ts +2 -2
- package/cjs/Progress/ProgressLine.js +4 -2
- package/cjs/Radio/Radio.d.ts +3 -2
- package/cjs/Radio/Radio.js +8 -5
- package/cjs/RadioGroup/RadioGroup.d.ts +3 -2
- package/cjs/RadioGroup/RadioGroup.js +4 -2
- package/cjs/RadioTile/RadioTile.d.ts +4 -5
- package/cjs/RadioTile/RadioTile.js +6 -8
- package/cjs/RadioTileGroup/RadioTileGroup.d.ts +3 -2
- package/cjs/RadioTileGroup/RadioTileGroup.js +6 -5
- package/cjs/RangeSlider/RangeSlider.js +5 -3
- package/cjs/Rate/Character.d.ts +2 -2
- package/cjs/Rate/Character.js +5 -3
- package/cjs/Rate/Rate.d.ts +3 -2
- package/cjs/Rate/Rate.js +4 -2
- package/cjs/SafeAnchor/SafeAnchor.d.ts +2 -2
- package/cjs/SafeAnchor/SafeAnchor.js +4 -2
- package/cjs/SelectPicker/SelectPicker.js +4 -2
- package/cjs/Sidebar/Sidebar.d.ts +2 -2
- package/cjs/Sidebar/Sidebar.js +7 -10
- package/cjs/Sidenav/ExpandedSidenavDropdown.d.ts +4 -3
- package/cjs/Sidenav/ExpandedSidenavDropdown.js +6 -6
- package/cjs/Sidenav/ExpandedSidenavDropdownItem.d.ts +3 -2
- package/cjs/Sidenav/ExpandedSidenavDropdownItem.js +2 -2
- package/cjs/Sidenav/ExpandedSidenavDropdownMenu.d.ts +3 -2
- package/cjs/Sidenav/ExpandedSidenavDropdownMenu.js +6 -5
- package/cjs/Sidenav/Sidenav.d.ts +6 -14
- package/cjs/Sidenav/Sidenav.js +5 -2
- package/cjs/Sidenav/SidenavBody.d.ts +1 -3
- package/cjs/Sidenav/SidenavBody.js +0 -0
- package/cjs/Sidenav/SidenavDropdown.d.ts +4 -7
- package/cjs/Sidenav/SidenavDropdown.js +7 -5
- package/cjs/Sidenav/SidenavDropdownCollapse.d.ts +2 -2
- package/cjs/Sidenav/SidenavDropdownCollapse.js +4 -1
- package/cjs/Sidenav/SidenavDropdownItem.d.ts +3 -2
- package/cjs/Sidenav/SidenavDropdownItem.js +7 -7
- package/cjs/Sidenav/SidenavFooter.d.ts +1 -3
- package/cjs/Sidenav/SidenavGroupLabel.d.ts +1 -3
- package/cjs/Sidenav/SidenavHeader.d.ts +1 -3
- package/cjs/Sidenav/SidenavHeader.js +0 -0
- package/cjs/Sidenav/SidenavItem.d.ts +3 -2
- package/cjs/Sidenav/SidenavItem.js +7 -4
- package/cjs/Sidenav/SidenavToggle.d.ts +2 -2
- package/cjs/Sidenav/SidenavToggle.js +6 -4
- package/cjs/Slider/Graduated.d.ts +2 -2
- package/cjs/Slider/Graduated.js +8 -4
- package/cjs/Slider/Handle.d.ts +2 -2
- package/cjs/Slider/Handle.js +4 -2
- package/cjs/Slider/Mark.d.ts +2 -2
- package/cjs/Slider/Mark.js +4 -2
- package/cjs/Slider/ProgressBar.d.ts +2 -2
- package/cjs/Slider/ProgressBar.js +8 -4
- package/cjs/Slider/Slider.d.ts +3 -2
- package/cjs/Slider/Slider.js +7 -5
- package/cjs/Stack/Stack.js +0 -1
- package/cjs/Stack/StackItem.d.ts +2 -2
- package/cjs/Stack/StackItem.js +4 -2
- package/cjs/Stat/Stat.d.ts +4 -10
- package/cjs/Stat/Stat.js +4 -2
- package/cjs/Stat/StatHelpText.d.ts +1 -4
- package/cjs/Stat/StatHelpText.js +0 -0
- package/cjs/Stat/StatLabel.d.ts +2 -2
- package/cjs/Stat/StatLabel.js +4 -2
- package/cjs/Stat/StatTrend.d.ts +2 -2
- package/cjs/Stat/StatTrend.js +4 -2
- package/cjs/Stat/StatValue.d.ts +2 -2
- package/cjs/Stat/StatValue.js +4 -2
- package/cjs/Stat/StatValueUnit.d.ts +1 -4
- package/cjs/Stat/StatValueUnit.js +0 -0
- package/cjs/StatGroup/StatGroup.d.ts +2 -2
- package/cjs/StatGroup/StatGroup.js +4 -2
- package/cjs/Steps/Steps.d.ts +2 -2
- package/cjs/Steps/Steps.js +5 -3
- package/cjs/Tabs/TabPanel.d.ts +2 -2
- package/cjs/Tabs/TabPanel.js +4 -2
- package/cjs/Tabs/Tabs.d.ts +2 -2
- package/cjs/Tabs/Tabs.js +4 -2
- package/cjs/Tag/Tag.d.ts +3 -2
- package/cjs/Tag/Tag.js +4 -2
- package/cjs/TagGroup/TagGroup.d.ts +1 -3
- package/cjs/TagGroup/TagGroup.js +0 -0
- package/cjs/Text/Text.d.ts +4 -4
- package/cjs/Text/Text.js +10 -21
- package/cjs/Timeline/Timeline.d.ts +2 -2
- package/cjs/Timeline/Timeline.js +5 -3
- package/cjs/Timeline/TimelineItem.d.ts +2 -2
- package/cjs/Timeline/TimelineItem.js +5 -3
- package/cjs/Toggle/Toggle.d.ts +3 -2
- package/cjs/Toggle/Toggle.js +5 -3
- package/cjs/Tooltip/Tooltip.d.ts +3 -2
- package/cjs/Tooltip/Tooltip.js +4 -2
- package/cjs/Tree/Tree.d.ts +1 -1
- package/cjs/Tree/TreeNode.d.ts +2 -2
- package/cjs/Tree/TreeNode.js +6 -4
- package/cjs/Tree/TreeView.js +4 -2
- package/cjs/Tree/types.d.ts +2 -2
- package/cjs/TreePicker/TreePicker.d.ts +1 -1
- package/cjs/TreePicker/TreePicker.js +4 -2
- package/cjs/Uploader/UploadFileItem.d.ts +2 -2
- package/cjs/Uploader/UploadFileItem.js +11 -4
- package/cjs/Uploader/UploadTrigger.d.ts +3 -1
- package/cjs/Uploader/UploadTrigger.js +18 -11
- package/cjs/Uploader/Uploader.d.ts +3 -3
- package/cjs/Uploader/Uploader.js +4 -2
- package/cjs/VisuallyHidden/VisuallyHidden.d.ts +1 -4
- package/cjs/VisuallyHidden/VisuallyHidden.js +0 -0
- package/cjs/internals/Box/Box.d.ts +13 -9
- package/cjs/internals/Box/Box.js +17 -17
- package/cjs/internals/Box/utils.js +5 -5
- package/cjs/internals/Menu/useRenderMenuItem.d.ts +1 -1
- package/cjs/internals/Menu/useRenderMenuItem.js +17 -8
- package/cjs/internals/Overlay/Modal.d.ts +3 -2
- package/cjs/internals/Overlay/Modal.js +5 -2
- package/cjs/internals/Picker/PickerToggle.d.ts +1 -1
- package/cjs/internals/Picker/ToggleButton.d.ts +2 -2
- package/cjs/internals/Picker/ToggleButton.js +0 -0
- package/cjs/internals/Picker/hooks/useCombobox.d.ts +1 -1
- package/cjs/internals/Plaintext/Plaintext.d.ts +2 -2
- package/cjs/internals/Plaintext/Plaintext.js +4 -2
- package/cjs/internals/Tree/TreeView.d.ts +2 -2
- package/cjs/internals/Tree/TreeView.js +4 -2
- package/cjs/internals/types/picker.d.ts +2 -2
- package/cjs/internals/utils/colours.d.ts +1 -1
- package/cjs/internals/utils/createComponent.d.ts +4 -3
- package/cjs/internals/utils/createComponent.js +8 -5
- package/cjs/internals/utils/sizes.d.ts +4 -1
- package/cjs/internals/utils/sizes.js +9 -3
- package/cjs/internals/utils/style-sheet/css.d.ts +1 -1
- package/cjs/internals/utils/style-sheet/css.js +4 -1
- package/cjs/internals/utils/style-sheet/styles.d.ts +2 -2
- package/cjs/internals/utils/style-sheet/styles.js +6 -6
- package/dist/rsuite-no-reset-rtl.css +89 -122
- 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 +89 -122
- package/dist/rsuite-no-reset.min.css +1 -1
- package/dist/rsuite-no-reset.min.css.map +1 -1
- package/dist/rsuite-rtl.css +89 -122
- package/dist/rsuite-rtl.min.css +1 -1
- package/dist/rsuite-rtl.min.css.map +1 -1
- package/dist/rsuite.css +89 -122
- package/dist/rsuite.js +132 -132
- 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/Affix/Affix.d.ts +3 -2
- package/esm/Affix/Affix.js +5 -2
- package/esm/AutoComplete/AutoComplete.d.ts +3 -2
- package/esm/AutoComplete/AutoComplete.js +4 -2
- package/esm/Avatar/Avatar.d.ts +3 -2
- package/esm/AvatarGroup/AvatarGroup.d.ts +3 -2
- package/esm/AvatarGroup/AvatarGroup.js +4 -2
- package/esm/Badge/Badge.d.ts +3 -2
- package/esm/Badge/Badge.js +6 -3
- package/esm/Breadcrumb/Breadcrumb.d.ts +2 -2
- package/esm/Breadcrumb/BreadcrumbItem.d.ts +2 -2
- package/esm/Breadcrumb/BreadcrumbItem.js +4 -2
- package/esm/Button/Button.d.ts +3 -2
- package/esm/Button/Button.js +8 -14
- package/esm/ButtonGroup/ButtonGroup.d.ts +3 -2
- package/esm/ButtonGroup/ButtonGroup.js +5 -2
- package/esm/ButtonToolbar/ButtonToolbar.d.ts +1 -2
- package/esm/ButtonToolbar/ButtonToolbar.js +4 -7
- package/esm/Calendar/Calendar.d.ts +2 -2
- package/esm/Calendar/Calendar.js +7 -6
- package/esm/Card/Card.d.ts +5 -14
- package/esm/Card/Card.js +4 -2
- package/esm/Card/CardBody.d.ts +1 -4
- package/esm/Card/CardBody.js +0 -0
- package/esm/Card/CardFooter.d.ts +1 -4
- package/esm/Card/CardFooter.js +0 -0
- package/esm/Card/CardHeader.d.ts +1 -4
- package/esm/Card/CardHeader.js +0 -0
- package/esm/CardGroup/CardGroup.d.ts +2 -2
- package/esm/CardGroup/CardGroup.js +4 -2
- package/esm/Carousel/Carousel.d.ts +2 -2
- package/esm/Carousel/Carousel.js +5 -2
- package/esm/CascadeTree/CascadeTree.js +4 -2
- package/esm/CascadeTree/types.d.ts +3 -2
- package/esm/Cascader/Cascader.d.ts +1 -1
- package/esm/Cascader/Cascader.js +4 -2
- package/esm/CheckPicker/CheckPicker.js +4 -2
- package/esm/CheckTree/CheckTreeView.js +4 -2
- package/esm/CheckTreePicker/CheckTreePicker.js +4 -2
- package/esm/Checkbox/Checkbox.d.ts +3 -2
- package/esm/Checkbox/Checkbox.js +8 -3
- package/esm/CheckboxGroup/CheckboxGroup.d.ts +3 -2
- package/esm/CheckboxGroup/CheckboxGroup.js +5 -2
- package/esm/Container/Container.d.ts +2 -2
- package/esm/Container/Container.js +5 -2
- package/esm/Content/Content.d.ts +1 -4
- package/esm/Content/Content.js +0 -0
- package/esm/DatePicker/DatePicker.js +4 -2
- package/esm/DateRangePicker/DateRangePicker.js +4 -2
- package/esm/Divider/Divider.d.ts +3 -2
- package/esm/Drawer/Drawer.d.ts +2 -4
- package/esm/Drawer/DrawerActions.d.ts +1 -3
- package/esm/Drawer/DrawerActions.js +0 -0
- package/esm/Drawer/DrawerBody.d.ts +1 -1
- package/esm/Dropdown/DropdownItem.d.ts +3 -2
- package/esm/Dropdown/DropdownItem.js +2 -2
- package/esm/Footer/Footer.d.ts +1 -4
- package/esm/Footer/Footer.js +0 -0
- package/esm/Grid/Col.d.ts +3 -2
- package/esm/Grid/Col.js +5 -2
- package/esm/Grid/Grid.d.ts +2 -2
- package/esm/Grid/Grid.js +5 -2
- package/esm/Grid/Row.d.ts +3 -2
- package/esm/Grid/Row.js +8 -4
- package/esm/Header/Header.d.ts +1 -4
- package/esm/Header/Header.js +0 -0
- package/esm/Heading/Heading.d.ts +2 -2
- package/esm/Heading/Heading.js +4 -2
- package/esm/HeadingGroup/HeadingGroup.d.ts +1 -4
- package/esm/HeadingGroup/HeadingGroup.js +0 -0
- package/esm/Highlight/Highlight.d.ts +2 -2
- package/esm/Highlight/Highlight.js +4 -2
- package/esm/Image/Image.d.ts +2 -2
- package/esm/Image/Image.js +8 -8
- package/esm/Image/ImageWrapper.d.ts +3 -4
- package/esm/Image/ImageWrapper.js +0 -0
- package/esm/InlineEdit/InlineEdit.d.ts +2 -2
- package/esm/InlineEdit/InlineEdit.js +4 -2
- package/esm/Input/Input.d.ts +3 -2
- package/esm/Input/Input.js +5 -2
- package/esm/InputGroup/InputGroup.d.ts +3 -2
- package/esm/InputGroup/InputGroup.js +5 -2
- package/esm/InputGroup/InputGroupAddon.d.ts +2 -2
- package/esm/InputGroup/InputGroupAddon.js +5 -2
- package/esm/InputNumber/InputNumber.d.ts +3 -2
- package/esm/InputNumber/InputNumber.js +5 -2
- package/esm/InputPicker/InputPicker.d.ts +2 -2
- package/esm/InputPicker/InputPicker.js +14 -5
- package/esm/Kbd/Kbd.d.ts +3 -2
- package/esm/Kbd/Kbd.js +5 -2
- package/esm/List/List.d.ts +2 -2
- package/esm/List/List.js +6 -5
- package/esm/List/ListItem.d.ts +2 -2
- package/esm/List/ListItem.js +6 -5
- package/esm/Loader/Loader.d.ts +3 -2
- package/esm/Loader/Loader.js +6 -5
- package/esm/Menu/Menu.d.ts +3 -2
- package/esm/Menu/Menu.js +5 -1
- package/esm/Menu/MenuItem.d.ts +3 -2
- package/esm/Menu/MenuItem.js +2 -2
- package/esm/Menu/MenuSeparator.d.ts +2 -2
- package/esm/Menu/MenuSeparator.js +6 -4
- package/esm/Message/Message.d.ts +3 -2
- package/esm/Message/Message.js +4 -2
- package/esm/Modal/Modal.d.ts +2 -4
- package/esm/Modal/ModalBody.d.ts +3 -3
- package/esm/Modal/ModalBody.js +5 -2
- package/esm/Modal/ModalDialog.d.ts +3 -2
- package/esm/Modal/ModalDialog.js +4 -2
- package/esm/Modal/ModalFooter.d.ts +1 -3
- package/esm/Modal/ModalHeader.d.ts +2 -2
- package/esm/Modal/ModalHeader.js +5 -2
- package/esm/Modal/ModalTitle.js +4 -2
- package/esm/MultiCascadeTree/MultiCascadeTree.js +4 -2
- package/esm/MultiCascadeTree/types.d.ts +2 -2
- package/esm/MultiCascader/MultiCascader.js +4 -2
- package/esm/Nav/Nav.d.ts +3 -2
- package/esm/Nav/Nav.js +7 -3
- package/esm/Nav/NavDropdown.d.ts +4 -3
- package/esm/Nav/NavDropdown.js +4 -2
- package/esm/Nav/NavDropdownItem.d.ts +3 -2
- package/esm/Nav/NavDropdownItem.js +4 -4
- package/esm/Nav/NavDropdownToggle.d.ts +4 -3
- package/esm/Nav/NavDropdownToggle.js +5 -2
- package/esm/Nav/NavItem.d.ts +3 -2
- package/esm/Nav/NavItem.js +4 -2
- package/esm/Navbar/Navbar.d.ts +4 -8
- package/esm/Navbar/Navbar.js +5 -2
- package/esm/Navbar/NavbarBrand.d.ts +1 -5
- package/esm/Navbar/NavbarBrand.js +0 -0
- package/esm/Navbar/NavbarContent.d.ts +1 -1
- package/esm/Navbar/NavbarDropdown.d.ts +2 -1
- package/esm/Navbar/NavbarDropdown.js +4 -2
- package/esm/Navbar/NavbarDropdownItem.d.ts +4 -3
- package/esm/Navbar/NavbarDropdownItem.js +7 -7
- package/esm/Navbar/NavbarDropdownToggle.d.ts +4 -3
- package/esm/Navbar/NavbarDropdownToggle.js +5 -2
- package/esm/Navbar/NavbarItem.d.ts +3 -2
- package/esm/Navbar/NavbarItem.js +5 -3
- package/esm/Navbar/NavbarMegaMenu.js +7 -5
- package/esm/Notification/Notification.d.ts +3 -2
- package/esm/Notification/Notification.js +4 -2
- package/esm/Pagination/Pagination.d.ts +3 -2
- package/esm/Pagination/Pagination.js +5 -3
- package/esm/Pagination/PaginationGroup.js +4 -2
- package/esm/Panel/Panel.d.ts +3 -2
- package/esm/Panel/Panel.js +5 -3
- package/esm/Panel/PanelBody.d.ts +1 -1
- package/esm/Panel/PanelBody.js +1 -1
- package/esm/Panel/PanelHeader.d.ts +2 -2
- package/esm/Panel/PanelHeader.js +4 -2
- package/esm/PanelGroup/PanelGroup.d.ts +2 -2
- package/esm/PanelGroup/PanelGroup.js +5 -2
- package/esm/Placeholder/PlaceholderGraph.d.ts +2 -2
- package/esm/Placeholder/PlaceholderGraph.js +8 -8
- package/esm/Placeholder/PlaceholderGrid.d.ts +2 -2
- package/esm/Placeholder/PlaceholderGrid.js +8 -8
- package/esm/Placeholder/PlaceholderParagraph.d.ts +2 -2
- package/esm/Placeholder/PlaceholderParagraph.js +8 -8
- package/esm/Popover/Popover.d.ts +2 -2
- package/esm/Popover/Popover.js +6 -5
- package/esm/Progress/ProgressCircle.d.ts +2 -2
- package/esm/Progress/ProgressCircle.js +4 -2
- package/esm/Progress/ProgressLine.d.ts +2 -2
- package/esm/Progress/ProgressLine.js +4 -2
- package/esm/Radio/Radio.d.ts +3 -2
- package/esm/Radio/Radio.js +8 -5
- package/esm/RadioGroup/RadioGroup.d.ts +3 -2
- package/esm/RadioGroup/RadioGroup.js +4 -2
- package/esm/RadioTile/RadioTile.d.ts +4 -5
- package/esm/RadioTile/RadioTile.js +6 -8
- package/esm/RadioTileGroup/RadioTileGroup.d.ts +3 -2
- package/esm/RadioTileGroup/RadioTileGroup.js +6 -5
- package/esm/RangeSlider/RangeSlider.js +5 -3
- package/esm/Rate/Character.d.ts +2 -2
- package/esm/Rate/Character.js +5 -3
- package/esm/Rate/Rate.d.ts +3 -2
- package/esm/Rate/Rate.js +4 -2
- package/esm/SafeAnchor/SafeAnchor.d.ts +2 -2
- package/esm/SafeAnchor/SafeAnchor.js +4 -2
- package/esm/SelectPicker/SelectPicker.js +4 -2
- package/esm/Sidebar/Sidebar.d.ts +2 -2
- package/esm/Sidebar/Sidebar.js +8 -11
- package/esm/Sidenav/ExpandedSidenavDropdown.d.ts +4 -3
- package/esm/Sidenav/ExpandedSidenavDropdown.js +6 -6
- package/esm/Sidenav/ExpandedSidenavDropdownItem.d.ts +3 -2
- package/esm/Sidenav/ExpandedSidenavDropdownItem.js +2 -2
- package/esm/Sidenav/ExpandedSidenavDropdownMenu.d.ts +3 -2
- package/esm/Sidenav/ExpandedSidenavDropdownMenu.js +6 -5
- package/esm/Sidenav/Sidenav.d.ts +6 -14
- package/esm/Sidenav/Sidenav.js +5 -2
- package/esm/Sidenav/SidenavBody.d.ts +1 -3
- package/esm/Sidenav/SidenavBody.js +0 -0
- package/esm/Sidenav/SidenavDropdown.d.ts +4 -7
- package/esm/Sidenav/SidenavDropdown.js +7 -5
- package/esm/Sidenav/SidenavDropdownCollapse.d.ts +2 -2
- package/esm/Sidenav/SidenavDropdownCollapse.js +4 -1
- package/esm/Sidenav/SidenavDropdownItem.d.ts +3 -2
- package/esm/Sidenav/SidenavDropdownItem.js +7 -7
- package/esm/Sidenav/SidenavFooter.d.ts +1 -3
- package/esm/Sidenav/SidenavGroupLabel.d.ts +1 -3
- package/esm/Sidenav/SidenavHeader.d.ts +1 -3
- package/esm/Sidenav/SidenavHeader.js +0 -0
- package/esm/Sidenav/SidenavItem.d.ts +3 -2
- package/esm/Sidenav/SidenavItem.js +7 -4
- package/esm/Sidenav/SidenavToggle.d.ts +2 -2
- package/esm/Sidenav/SidenavToggle.js +7 -5
- package/esm/Slider/Graduated.d.ts +2 -2
- package/esm/Slider/Graduated.js +8 -4
- package/esm/Slider/Handle.d.ts +2 -2
- package/esm/Slider/Handle.js +4 -2
- package/esm/Slider/Mark.d.ts +2 -2
- package/esm/Slider/Mark.js +4 -2
- package/esm/Slider/ProgressBar.d.ts +2 -2
- package/esm/Slider/ProgressBar.js +8 -4
- package/esm/Slider/Slider.d.ts +3 -2
- package/esm/Slider/Slider.js +7 -5
- package/esm/Stack/Stack.js +0 -1
- package/esm/Stack/StackItem.d.ts +2 -2
- package/esm/Stack/StackItem.js +4 -2
- package/esm/Stat/Stat.d.ts +4 -10
- package/esm/Stat/Stat.js +4 -2
- package/esm/Stat/StatHelpText.d.ts +1 -4
- package/esm/Stat/StatHelpText.js +0 -0
- package/esm/Stat/StatLabel.d.ts +2 -2
- package/esm/Stat/StatLabel.js +4 -2
- package/esm/Stat/StatTrend.d.ts +2 -2
- package/esm/Stat/StatTrend.js +4 -2
- package/esm/Stat/StatValue.d.ts +2 -2
- package/esm/Stat/StatValue.js +4 -2
- package/esm/Stat/StatValueUnit.d.ts +1 -4
- package/esm/Stat/StatValueUnit.js +0 -0
- package/esm/StatGroup/StatGroup.d.ts +2 -2
- package/esm/StatGroup/StatGroup.js +4 -2
- package/esm/Steps/Steps.d.ts +2 -2
- package/esm/Steps/Steps.js +5 -3
- package/esm/Tabs/TabPanel.d.ts +2 -2
- package/esm/Tabs/TabPanel.js +4 -2
- package/esm/Tabs/Tabs.d.ts +2 -2
- package/esm/Tabs/Tabs.js +4 -2
- package/esm/Tag/Tag.d.ts +3 -2
- package/esm/Tag/Tag.js +4 -2
- package/esm/TagGroup/TagGroup.d.ts +1 -3
- package/esm/TagGroup/TagGroup.js +0 -0
- package/esm/Text/Text.d.ts +4 -4
- package/esm/Text/Text.js +11 -20
- package/esm/Timeline/Timeline.d.ts +2 -2
- package/esm/Timeline/Timeline.js +5 -3
- package/esm/Timeline/TimelineItem.d.ts +2 -2
- package/esm/Timeline/TimelineItem.js +5 -3
- package/esm/Toggle/Toggle.d.ts +3 -2
- package/esm/Toggle/Toggle.js +5 -3
- package/esm/Tooltip/Tooltip.d.ts +3 -2
- package/esm/Tooltip/Tooltip.js +4 -2
- package/esm/Tree/Tree.d.ts +1 -1
- package/esm/Tree/TreeNode.d.ts +2 -2
- package/esm/Tree/TreeNode.js +6 -4
- package/esm/Tree/TreeView.js +4 -2
- package/esm/Tree/types.d.ts +2 -2
- package/esm/TreePicker/TreePicker.d.ts +1 -1
- package/esm/TreePicker/TreePicker.js +4 -2
- package/esm/Uploader/UploadFileItem.d.ts +2 -2
- package/esm/Uploader/UploadFileItem.js +11 -4
- package/esm/Uploader/UploadTrigger.d.ts +3 -1
- package/esm/Uploader/UploadTrigger.js +18 -11
- package/esm/Uploader/Uploader.d.ts +3 -3
- package/esm/Uploader/Uploader.js +4 -2
- package/esm/VisuallyHidden/VisuallyHidden.d.ts +1 -4
- package/esm/VisuallyHidden/VisuallyHidden.js +0 -0
- package/esm/internals/Box/Box.d.ts +13 -9
- package/esm/internals/Box/Box.js +17 -17
- package/esm/internals/Box/utils.js +5 -5
- package/esm/internals/Menu/useRenderMenuItem.d.ts +1 -1
- package/esm/internals/Menu/useRenderMenuItem.js +16 -8
- package/esm/internals/Overlay/Modal.d.ts +3 -2
- package/esm/internals/Overlay/Modal.js +5 -2
- package/esm/internals/Picker/PickerToggle.d.ts +1 -1
- package/esm/internals/Picker/ToggleButton.d.ts +2 -2
- package/esm/internals/Picker/ToggleButton.js +0 -0
- package/esm/internals/Picker/hooks/useCombobox.d.ts +1 -1
- package/esm/internals/Plaintext/Plaintext.d.ts +2 -2
- package/esm/internals/Plaintext/Plaintext.js +4 -2
- package/esm/internals/Tree/TreeView.d.ts +2 -2
- package/esm/internals/Tree/TreeView.js +4 -2
- package/esm/internals/types/picker.d.ts +2 -2
- package/esm/internals/utils/colours.d.ts +1 -1
- package/esm/internals/utils/createComponent.d.ts +4 -3
- package/esm/internals/utils/createComponent.js +7 -4
- package/esm/internals/utils/sizes.d.ts +4 -1
- package/esm/internals/utils/sizes.js +9 -3
- package/esm/internals/utils/style-sheet/css.d.ts +1 -1
- package/esm/internals/utils/style-sheet/css.js +3 -1
- package/esm/internals/utils/style-sheet/styles.d.ts +2 -2
- package/esm/internals/utils/style-sheet/styles.js +6 -6
- package/internals/Box/styles/index.less +54 -168
- package/package.json +1 -1
- package/styles/color-modes/dark.less +1 -1
- package/styles/color-modes/light.less +1 -1
- package/styles/root.less +10 -6
- package/toaster/styles/index.css +2 -1
- package/useToaster/styles/index.css +2 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
export interface ProgressCircleProps extends
|
|
1
|
+
import { BoxProps } from '../internals/Box';
|
|
2
|
+
export interface ProgressCircleProps extends BoxProps {
|
|
3
3
|
/** Line color */
|
|
4
4
|
strokeColor?: string;
|
|
5
5
|
/** The end of different types of open paths */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
import React, { useCallback } from 'react';
|
|
4
|
+
import Box from "../internals/Box/index.js";
|
|
4
5
|
import { PROGRESS_STATUS_ICON } from "../internals/constants/statusIcons.js";
|
|
5
6
|
import { forwardRef } from "../internals/utils/index.js";
|
|
6
7
|
import { useStyles } from "../internals/hooks/index.js";
|
|
@@ -14,7 +15,7 @@ const ProgressCircle = forwardRef((props, ref) => {
|
|
|
14
15
|
propsWithDefaults
|
|
15
16
|
} = useCustom('ProgressCircle', props);
|
|
16
17
|
const {
|
|
17
|
-
as
|
|
18
|
+
as,
|
|
18
19
|
strokeWidth = 6,
|
|
19
20
|
trailWidth = 6,
|
|
20
21
|
percent = 0,
|
|
@@ -92,7 +93,8 @@ const ProgressCircle = forwardRef((props, ref) => {
|
|
|
92
93
|
}, PROGRESS_STATUS_ICON[status]) : /*#__PURE__*/React.createElement("span", {
|
|
93
94
|
key: 1
|
|
94
95
|
}, percent, "%");
|
|
95
|
-
return /*#__PURE__*/React.createElement(
|
|
96
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
97
|
+
as: as,
|
|
96
98
|
role: "progressbar",
|
|
97
99
|
"aria-valuemin": "0",
|
|
98
100
|
"aria-valuemax": "100",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
export interface ProgressLineProps extends
|
|
1
|
+
import { BoxProps } from '../internals/Box';
|
|
2
|
+
export interface ProgressLineProps extends BoxProps {
|
|
3
3
|
/** Line color */
|
|
4
4
|
strokeColor?: string;
|
|
5
5
|
/** Percent of progress */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
import React from 'react';
|
|
4
|
+
import Box from "../internals/Box/index.js";
|
|
4
5
|
import { PROGRESS_STATUS_ICON } from "../internals/constants/statusIcons.js";
|
|
5
6
|
import { forwardRef } from "../internals/utils/index.js";
|
|
6
7
|
import { useStyles } from "../internals/hooks/index.js";
|
|
@@ -14,7 +15,7 @@ const ProgressLine = forwardRef((props, ref) => {
|
|
|
14
15
|
propsWithDefaults
|
|
15
16
|
} = useCustom('ProgressLine', props);
|
|
16
17
|
const {
|
|
17
|
-
as
|
|
18
|
+
as,
|
|
18
19
|
className,
|
|
19
20
|
percent = 0,
|
|
20
21
|
strokeColor,
|
|
@@ -51,7 +52,8 @@ const ProgressLine = forwardRef((props, ref) => {
|
|
|
51
52
|
}, PROGRESS_STATUS_ICON[status]) : /*#__PURE__*/React.createElement("span", {
|
|
52
53
|
className: prefix('info-status')
|
|
53
54
|
}, percent, "%");
|
|
54
|
-
return /*#__PURE__*/React.createElement(
|
|
55
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
56
|
+
as: as,
|
|
55
57
|
role: "progressbar",
|
|
56
58
|
"aria-valuemin": "0",
|
|
57
59
|
"aria-valuemax": "100",
|
package/esm/Radio/Radio.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import { BoxProps } from '../internals/Box';
|
|
3
|
+
import { Color, HTMLPropsWithoutChange } from '../internals/types';
|
|
4
|
+
export interface RadioProps<T = string | number> extends BoxProps, HTMLPropsWithoutChange {
|
|
4
5
|
/**
|
|
5
6
|
* The color of the radio when checked
|
|
6
7
|
*
|
package/esm/Radio/Radio.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
import React, { useContext } from 'react';
|
|
4
|
+
import Box from "../internals/Box/index.js";
|
|
4
5
|
import { RadioContext } from "../RadioGroup/RadioGroup.js";
|
|
5
6
|
import { useStyles, useControlled, useEventCallback, useUniqueId } from "../internals/hooks/index.js";
|
|
6
7
|
import { forwardRef, partitionHTMLProps } from "../internals/utils/index.js";
|
|
@@ -24,7 +25,7 @@ const Radio = forwardRef((props, ref) => {
|
|
|
24
25
|
onChange: onGroupChange
|
|
25
26
|
} = radioContext !== null && radioContext !== void 0 ? radioContext : {};
|
|
26
27
|
const {
|
|
27
|
-
as
|
|
28
|
+
as,
|
|
28
29
|
title,
|
|
29
30
|
className,
|
|
30
31
|
children,
|
|
@@ -72,10 +73,11 @@ const Radio = forwardRef((props, ref) => {
|
|
|
72
73
|
}
|
|
73
74
|
const labelId = useUniqueId('label-');
|
|
74
75
|
if (plaintext) {
|
|
75
|
-
return checked ? /*#__PURE__*/React.createElement(
|
|
76
|
+
return checked ? /*#__PURE__*/React.createElement(Box, _extends({
|
|
77
|
+
as: as,
|
|
76
78
|
ref: ref,
|
|
77
79
|
className: classes
|
|
78
|
-
}), children) : null;
|
|
80
|
+
}, restProps), children) : null;
|
|
79
81
|
}
|
|
80
82
|
const control = /*#__PURE__*/React.createElement("span", {
|
|
81
83
|
className: prefix`control`
|
|
@@ -95,11 +97,12 @@ const Radio = forwardRef((props, ref) => {
|
|
|
95
97
|
className: prefix`inner`,
|
|
96
98
|
"aria-hidden": true
|
|
97
99
|
}));
|
|
98
|
-
return /*#__PURE__*/React.createElement(
|
|
100
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
101
|
+
as: as,
|
|
99
102
|
ref: ref,
|
|
100
103
|
onClick: onClick,
|
|
101
104
|
className: classes
|
|
102
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
105
|
+
}, restProps), /*#__PURE__*/React.createElement("div", {
|
|
103
106
|
className: prefix`checker`
|
|
104
107
|
}, children ? /*#__PURE__*/React.createElement("label", {
|
|
105
108
|
title: title
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { BoxProps } from '../internals/Box';
|
|
3
|
+
import type { PrependParameters, FormControlBaseProps } from '../internals/types';
|
|
3
4
|
export interface RadioContextProps {
|
|
4
5
|
inline?: boolean;
|
|
5
6
|
name?: string;
|
|
@@ -12,7 +13,7 @@ export interface RadioContextProps {
|
|
|
12
13
|
value: string | number | undefined
|
|
13
14
|
]>;
|
|
14
15
|
}
|
|
15
|
-
export interface RadioGroupProps<T = string | number> extends
|
|
16
|
+
export interface RadioGroupProps<T = string | number> extends BoxProps, FormControlBaseProps<T> {
|
|
16
17
|
/** A radio group can have different appearances */
|
|
17
18
|
appearance?: 'default' | 'picker';
|
|
18
19
|
/** Name to use for form */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
import React, { useMemo } from 'react';
|
|
4
|
+
import Box from "../internals/Box/index.js";
|
|
4
5
|
import Plaintext from "../internals/Plaintext/index.js";
|
|
5
6
|
import { forwardRef } from "../internals/utils/index.js";
|
|
6
7
|
import { useStyles, useControlled, useEventCallback } from "../internals/hooks/index.js";
|
|
@@ -16,7 +17,7 @@ const RadioGroup = forwardRef((props, ref) => {
|
|
|
16
17
|
propsWithDefaults
|
|
17
18
|
} = useCustom('RadioGroup', props);
|
|
18
19
|
const {
|
|
19
|
-
as
|
|
20
|
+
as,
|
|
20
21
|
className,
|
|
21
22
|
inline,
|
|
22
23
|
children,
|
|
@@ -58,7 +59,8 @@ const RadioGroup = forwardRef((props, ref) => {
|
|
|
58
59
|
}, plaintext ? /*#__PURE__*/React.createElement(Plaintext, _extends({
|
|
59
60
|
ref: ref,
|
|
60
61
|
localeKey: "notSelected"
|
|
61
|
-
}, rest), value ? children : null) : /*#__PURE__*/React.createElement(
|
|
62
|
+
}, rest), value ? children : null) : /*#__PURE__*/React.createElement(Box, _extends({
|
|
63
|
+
as: as,
|
|
62
64
|
role: "radiogroup"
|
|
63
65
|
}, rest, {
|
|
64
66
|
ref: ref,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import { BoxProps } from '../internals/Box';
|
|
3
|
+
import type { HTMLPropsWithoutChange } from '../internals/types';
|
|
4
|
+
export interface RadioTileProps<T = string | number> extends BoxProps, HTMLPropsWithoutChange {
|
|
4
5
|
/** Additional description, if needed*/
|
|
5
6
|
children?: React.ReactNode;
|
|
6
7
|
/** Specifies whether the radio is selected */
|
|
@@ -25,7 +26,5 @@ export interface RadioTileProps<T = string | number> extends WithAsProps, HTMLPr
|
|
|
25
26
|
* @version 5.35.0
|
|
26
27
|
* @see https://rsuitejs.com/components/radio-tile/
|
|
27
28
|
*/
|
|
28
|
-
declare const RadioTile: import("../internals/types").InternalRefForwardingComponent<
|
|
29
|
-
Item: import("../internals/types").InternalRefForwardingComponent<"div", import("../Stack/StackItem").StackItemProps, never> & Record<string, never>;
|
|
30
|
-
}, RadioTileProps<string | number>, never> & Record<string, never>;
|
|
29
|
+
declare const RadioTile: import("../internals/types").InternalRefForwardingComponent<"label", RadioTileProps<string | number>, never> & Record<string, never>;
|
|
31
30
|
export default RadioTile;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
import React, { useCallback, useContext } from 'react';
|
|
4
4
|
import CheckIcon from '@rsuite/icons/Check';
|
|
5
|
-
import
|
|
5
|
+
import Box from "../internals/Box/index.js";
|
|
6
6
|
import { RadioTileContext } from "../RadioTileGroup/RadioTileGroup.js";
|
|
7
7
|
import { forwardRef, partitionHTMLProps } from "../internals/utils/index.js";
|
|
8
8
|
import { useStyles, useControlled, useUniqueId } from "../internals/hooks/index.js";
|
|
@@ -23,7 +23,7 @@ const RadioTile = forwardRef((props, ref) => {
|
|
|
23
23
|
onChange: onGroupChange
|
|
24
24
|
} = useContext(RadioTileContext);
|
|
25
25
|
const {
|
|
26
|
-
as
|
|
26
|
+
as = 'label',
|
|
27
27
|
children,
|
|
28
28
|
classPrefix = 'radio-tile',
|
|
29
29
|
checked: checkedProp,
|
|
@@ -55,13 +55,11 @@ const RadioTile = forwardRef((props, ref) => {
|
|
|
55
55
|
disabled
|
|
56
56
|
}));
|
|
57
57
|
const radioId = useUniqueId('radio-');
|
|
58
|
-
return /*#__PURE__*/React.createElement(
|
|
59
|
-
|
|
60
|
-
}, restProps, {
|
|
58
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
59
|
+
as: as,
|
|
61
60
|
ref: ref,
|
|
62
|
-
className: classes
|
|
63
|
-
|
|
64
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
61
|
+
className: classes
|
|
62
|
+
}, restProps), /*#__PURE__*/React.createElement("div", {
|
|
65
63
|
className: prefix('icon')
|
|
66
64
|
}, icon), /*#__PURE__*/React.createElement("div", {
|
|
67
65
|
className: prefix('body')
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { BoxProps } from '../internals/Box';
|
|
3
|
+
import type { FormControlBaseProps } from '../internals/types';
|
|
3
4
|
export interface RadioTileContextProps {
|
|
4
5
|
name?: string;
|
|
5
6
|
value?: number | string | null;
|
|
@@ -7,7 +8,7 @@ export interface RadioTileContextProps {
|
|
|
7
8
|
disabled?: boolean;
|
|
8
9
|
onChange?: (value: number | string | undefined, event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
9
10
|
}
|
|
10
|
-
export interface RadioTileGroupProps<T = number | string> extends
|
|
11
|
+
export interface RadioTileGroupProps<T = number | string> extends BoxProps, FormControlBaseProps<T> {
|
|
11
12
|
/** Name to use for form */
|
|
12
13
|
name?: string;
|
|
13
14
|
/** Inline layout */
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
import React, { useCallback, useMemo } from 'react';
|
|
4
4
|
import Stack from "../Stack/index.js";
|
|
5
|
+
import Box from "../internals/Box/index.js";
|
|
5
6
|
import { useStyles, useControlled } from "../internals/hooks/index.js";
|
|
6
7
|
import { forwardRef } from "../internals/utils/index.js";
|
|
7
8
|
import { useCustom } from "../CustomProvider/index.js";
|
|
@@ -17,7 +18,7 @@ const RadioTileGroup = forwardRef((props, ref) => {
|
|
|
17
18
|
propsWithDefaults
|
|
18
19
|
} = useCustom('RadioTileGroup', props);
|
|
19
20
|
const {
|
|
20
|
-
as
|
|
21
|
+
as = Stack,
|
|
21
22
|
className,
|
|
22
23
|
inline,
|
|
23
24
|
children,
|
|
@@ -47,15 +48,15 @@ const RadioTileGroup = forwardRef((props, ref) => {
|
|
|
47
48
|
}), [disabled, handleChange, name, value]);
|
|
48
49
|
return /*#__PURE__*/React.createElement(RadioTileContext.Provider, {
|
|
49
50
|
value: contextValue
|
|
50
|
-
}, /*#__PURE__*/React.createElement(
|
|
51
|
+
}, /*#__PURE__*/React.createElement(Box, _extends({
|
|
52
|
+
as: as,
|
|
51
53
|
alignItems: "stretch",
|
|
52
|
-
spacing: 10
|
|
53
|
-
}, rest, {
|
|
54
|
+
spacing: 10,
|
|
54
55
|
role: "radiogroup",
|
|
55
56
|
direction: inline ? 'row' : 'column',
|
|
56
57
|
ref: ref,
|
|
57
58
|
className: classes
|
|
58
|
-
}), children));
|
|
59
|
+
}, rest), children));
|
|
59
60
|
});
|
|
60
61
|
RadioTileGroup.displayName = 'RadioTileGroup';
|
|
61
62
|
export default RadioTileGroup;
|
|
@@ -7,6 +7,7 @@ import getOffset from 'dom-lib/getOffset';
|
|
|
7
7
|
import ProgressBar from "../Slider/ProgressBar.js";
|
|
8
8
|
import Handle from "../Slider/Handle.js";
|
|
9
9
|
import Graduated from "../Slider/Graduated.js";
|
|
10
|
+
import Box from "../internals/Box/index.js";
|
|
10
11
|
import { forwardRef } from "../internals/utils/index.js";
|
|
11
12
|
import { useStyles, useControlled, useEventCallback } from "../internals/hooks/index.js";
|
|
12
13
|
import { precisionMath, checkValue, getPosition } from "../Slider/utils.js";
|
|
@@ -25,7 +26,7 @@ const RangeSlider = forwardRef((props, ref) => {
|
|
|
25
26
|
'aria-label': ariaLabel,
|
|
26
27
|
'aria-labelledby': ariaLabelledby,
|
|
27
28
|
'aria-valuetext': ariaValuetext,
|
|
28
|
-
as
|
|
29
|
+
as,
|
|
29
30
|
barClassName,
|
|
30
31
|
className,
|
|
31
32
|
classPrefix = 'slider',
|
|
@@ -277,10 +278,11 @@ const RangeSlider = forwardRef((props, ref) => {
|
|
|
277
278
|
'aria-label': ariaLabel,
|
|
278
279
|
'aria-labelledby': ariaLabelledby
|
|
279
280
|
};
|
|
280
|
-
return /*#__PURE__*/React.createElement(
|
|
281
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
282
|
+
as: as,
|
|
281
283
|
ref: ref,
|
|
282
284
|
className: classes
|
|
283
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
285
|
+
}, rest), /*#__PURE__*/React.createElement("div", {
|
|
284
286
|
className: merge(barClassName, prefix('bar')),
|
|
285
287
|
ref: barRef,
|
|
286
288
|
onClick: handleBarClick
|
package/esm/Rate/Character.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
interface CharacterProps extends
|
|
2
|
+
import { BoxProps } from '../internals/Box';
|
|
3
|
+
interface CharacterProps extends BoxProps {
|
|
4
4
|
vertical?: boolean;
|
|
5
5
|
status?: 0 | 0.5 | 1;
|
|
6
6
|
disabled?: boolean;
|
package/esm/Rate/Character.js
CHANGED
|
@@ -3,6 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
3
3
|
import React, { useRef } from 'react';
|
|
4
4
|
import contains from 'dom-lib/contains';
|
|
5
5
|
import isNil from 'lodash/isNil';
|
|
6
|
+
import Box from "../internals/Box/index.js";
|
|
6
7
|
import { forwardRef } from "../internals/utils/index.js";
|
|
7
8
|
import { useStyles, useEventCallback } from "../internals/hooks/index.js";
|
|
8
9
|
const characterStatus = {
|
|
@@ -13,7 +14,7 @@ const characterStatus = {
|
|
|
13
14
|
const getKey = (a, b) => contains(a, b) ? 'before' : 'after';
|
|
14
15
|
const Character = forwardRef((props, ref) => {
|
|
15
16
|
const {
|
|
16
|
-
as
|
|
17
|
+
as = 'li',
|
|
17
18
|
classPrefix = 'rate-character',
|
|
18
19
|
className,
|
|
19
20
|
children,
|
|
@@ -38,14 +39,15 @@ const Character = forwardRef((props, ref) => {
|
|
|
38
39
|
const handleClick = useEventCallback(event => {
|
|
39
40
|
onClick === null || onClick === void 0 || onClick(getKey(beforeRef.current, event.target), event);
|
|
40
41
|
});
|
|
41
|
-
return /*#__PURE__*/React.createElement(
|
|
42
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
43
|
+
as: as,
|
|
42
44
|
ref: ref,
|
|
43
45
|
className: classes,
|
|
44
46
|
tabIndex: 0,
|
|
45
47
|
onClick: disabled ? null : handleClick,
|
|
46
48
|
onKeyDown: disabled ? null : onKeyDown,
|
|
47
49
|
onMouseMove: disabled ? null : handleMouseMove
|
|
48
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
50
|
+
}, rest), /*#__PURE__*/React.createElement("div", {
|
|
49
51
|
ref: beforeRef,
|
|
50
52
|
className: prefix('before', {
|
|
51
53
|
vertical
|
package/esm/Rate/Rate.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import { BoxProps } from '../internals/Box';
|
|
3
|
+
import type { Color, FormControlBaseProps, Size } from '../internals/types';
|
|
4
|
+
export interface RateProps<T = number> extends BoxProps, FormControlBaseProps<T> {
|
|
4
5
|
allowHalf?: boolean;
|
|
5
6
|
character?: React.ReactNode;
|
|
6
7
|
classPrefix?: string;
|
package/esm/Rate/Rate.js
CHANGED
|
@@ -5,6 +5,7 @@ import isNil from 'lodash/isNil';
|
|
|
5
5
|
import Star from '@rsuite/icons/Star';
|
|
6
6
|
import Character from "./Character.js";
|
|
7
7
|
import Plaintext from "../internals/Plaintext/index.js";
|
|
8
|
+
import Box from "../internals/Box/index.js";
|
|
8
9
|
import { KEY_VALUES } from "../internals/constants/index.js";
|
|
9
10
|
import { useControlled, useStyles, useEventCallback } from "../internals/hooks/index.js";
|
|
10
11
|
import { forwardRef, shallowEqualArray, isPresetColor, createColorVariables, mergeStyles } from "../internals/utils/index.js";
|
|
@@ -19,7 +20,7 @@ const Rate = forwardRef((props, ref) => {
|
|
|
19
20
|
propsWithDefaults
|
|
20
21
|
} = useCustom('Rate', props);
|
|
21
22
|
const {
|
|
22
|
-
as
|
|
23
|
+
as = 'ul',
|
|
23
24
|
character = /*#__PURE__*/React.createElement(Star, null),
|
|
24
25
|
className,
|
|
25
26
|
classPrefix = 'rate',
|
|
@@ -114,7 +115,8 @@ const Rate = forwardRef((props, ref) => {
|
|
|
114
115
|
className: className
|
|
115
116
|
}, !isNil(value) ? `${value}(${max})` : null);
|
|
116
117
|
}
|
|
117
|
-
return /*#__PURE__*/React.createElement(
|
|
118
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
119
|
+
as: as,
|
|
118
120
|
role: "radiogroup",
|
|
119
121
|
tabIndex: 0,
|
|
120
122
|
ref: ref,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
export interface SafeAnchorProps extends
|
|
2
|
+
import { BoxProps } from '../internals/Box';
|
|
3
|
+
export interface SafeAnchorProps extends BoxProps, React.HTMLAttributes<HTMLElement> {
|
|
4
4
|
/** Link specified url */
|
|
5
5
|
href?: string;
|
|
6
6
|
/** A link can show it is currently unable to be interacted with */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
import React, { useCallback } from 'react';
|
|
4
|
+
import Box from "../internals/Box/index.js";
|
|
4
5
|
import { useCustom } from "../CustomProvider/index.js";
|
|
5
6
|
import { forwardRef } from "../internals/utils/index.js";
|
|
6
7
|
function isTrivialHref(href) {
|
|
@@ -16,7 +17,7 @@ const SafeAnchor = forwardRef((props, ref) => {
|
|
|
16
17
|
propsWithDefaults
|
|
17
18
|
} = useCustom('SafeAnchor', props);
|
|
18
19
|
const {
|
|
19
|
-
as
|
|
20
|
+
as = 'a',
|
|
20
21
|
href,
|
|
21
22
|
disabled,
|
|
22
23
|
onClick,
|
|
@@ -42,7 +43,8 @@ const SafeAnchor = forwardRef((props, ref) => {
|
|
|
42
43
|
restProps.tabIndex = -1;
|
|
43
44
|
restProps['aria-disabled'] = true;
|
|
44
45
|
}
|
|
45
|
-
return /*#__PURE__*/React.createElement(
|
|
46
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
47
|
+
as: as,
|
|
46
48
|
ref: ref,
|
|
47
49
|
href: href
|
|
48
50
|
}, trivialProps, restProps, {
|
|
@@ -6,6 +6,7 @@ import isNil from 'lodash/isNil';
|
|
|
6
6
|
import isFunction from 'lodash/isFunction';
|
|
7
7
|
import omit from 'lodash/omit';
|
|
8
8
|
import SearchBox from "../internals/SearchBox/index.js";
|
|
9
|
+
import Box from "../internals/Box/index.js";
|
|
9
10
|
import { useStyles, useControlled, useEventCallback } from "../internals/hooks/index.js";
|
|
10
11
|
import { forwardRef, createChainedFunction, mergeRefs, shallowEqual, getDataGroupBy } from "../internals/utils/index.js";
|
|
11
12
|
import { Listbox, ListItem, PickerToggle, PickerToggleTrigger, PickerPopup, useFocusItemValue, usePickerClassName, useSearch, useToggleKeyDownEvent, usePickerRef, pickTriggerPropKeys, omitTriggerPropKeys } from "../internals/Picker/index.js";
|
|
@@ -20,7 +21,7 @@ const SelectPicker = forwardRef((props, ref) => {
|
|
|
20
21
|
propsWithDefaults
|
|
21
22
|
} = useCustom('SelectPicker', props);
|
|
22
23
|
const {
|
|
23
|
-
as
|
|
24
|
+
as,
|
|
24
25
|
appearance = 'default',
|
|
25
26
|
data = emptyArray,
|
|
26
27
|
valueKey = 'value',
|
|
@@ -252,7 +253,8 @@ const SelectPicker = forwardRef((props, ref) => {
|
|
|
252
253
|
onEntered: createChainedFunction(handleEntered, onEntered),
|
|
253
254
|
onExited: createChainedFunction(handleExited, onExited),
|
|
254
255
|
speaker: renderPopup
|
|
255
|
-
}, /*#__PURE__*/React.createElement(
|
|
256
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
257
|
+
as: as,
|
|
256
258
|
className: classes,
|
|
257
259
|
style: style,
|
|
258
260
|
ref: root
|
package/esm/Sidebar/Sidebar.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
export interface SidebarProps extends
|
|
1
|
+
import { BoxProps } from '../internals/Box';
|
|
2
|
+
export interface SidebarProps extends BoxProps {
|
|
3
3
|
/** Width */
|
|
4
4
|
width?: number | string;
|
|
5
5
|
/** Sidebar can be collapsed */
|
package/esm/Sidebar/Sidebar.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
import React, { useContext, useEffect } from 'react';
|
|
4
|
+
import Box from "../internals/Box/index.js";
|
|
4
5
|
import { useStyles } from "../internals/hooks/index.js";
|
|
5
|
-
import { forwardRef
|
|
6
|
+
import { forwardRef } from "../internals/utils/index.js";
|
|
6
7
|
import { useCustom } from "../CustomProvider/index.js";
|
|
7
8
|
import { ContainerContext } from "../Container/Container.js";
|
|
8
9
|
/**
|
|
@@ -14,12 +15,11 @@ const Sidebar = forwardRef((props, ref) => {
|
|
|
14
15
|
propsWithDefaults
|
|
15
16
|
} = useCustom('Sidebar', props);
|
|
16
17
|
const {
|
|
17
|
-
as
|
|
18
|
+
as = 'aside',
|
|
18
19
|
classPrefix = 'sidebar',
|
|
19
20
|
className,
|
|
20
21
|
collapsible,
|
|
21
22
|
width = 260,
|
|
22
|
-
style,
|
|
23
23
|
...rest
|
|
24
24
|
} = propsWithDefaults;
|
|
25
25
|
const {
|
|
@@ -36,15 +36,12 @@ const Sidebar = forwardRef((props, ref) => {
|
|
|
36
36
|
/** Notify the Container that the Sidebar is in the child node of the Container. */
|
|
37
37
|
setHasSidebar === null || setHasSidebar === void 0 || setHasSidebar(true);
|
|
38
38
|
}, [setHasSidebar]);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
width
|
|
42
|
-
});
|
|
43
|
-
return /*#__PURE__*/React.createElement(Component, _extends({}, rest, {
|
|
39
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
40
|
+
as: as,
|
|
41
|
+
w: width,
|
|
44
42
|
ref: ref,
|
|
45
|
-
className: classes
|
|
46
|
-
|
|
47
|
-
}));
|
|
43
|
+
className: classes
|
|
44
|
+
}, rest));
|
|
48
45
|
});
|
|
49
46
|
Sidebar.displayName = 'Sidebar';
|
|
50
47
|
export default Sidebar;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { BoxProps } from '../internals/Box';
|
|
3
|
+
import type { PlacementCorners } from '../internals/types';
|
|
3
4
|
import type { IconProps } from '@rsuite/icons/Icon';
|
|
4
|
-
export interface SidenavDropdownProps<T = any> extends
|
|
5
|
+
export interface SidenavDropdownProps<T = any> extends BoxProps, Omit<React.HTMLAttributes<HTMLElement>, 'onToggle' | 'title'> {
|
|
5
6
|
/** Define the title as a submenu */
|
|
6
7
|
title?: React.ReactNode;
|
|
7
8
|
/** Set the icon */
|
|
@@ -31,7 +32,7 @@ export interface SidenavDropdownProps<T = any> extends WithAsProps, Omit<React.H
|
|
|
31
32
|
*/
|
|
32
33
|
renderTitle?: (children?: React.ReactNode) => React.ReactNode;
|
|
33
34
|
/** Custom Toggle */
|
|
34
|
-
renderToggle?: (props:
|
|
35
|
+
renderToggle?: (props: BoxProps, ref: React.Ref<any>) => any;
|
|
35
36
|
/** The callback function that the menu closes */
|
|
36
37
|
onClose?: () => void;
|
|
37
38
|
/** Menu Pop-up callback function */
|
|
@@ -6,6 +6,7 @@ import NavContext from "../Nav/NavContext.js";
|
|
|
6
6
|
import SidenavDropdownCollapse from "./SidenavDropdownCollapse.js";
|
|
7
7
|
import Disclosure from "../internals/Disclosure/Disclosure.js";
|
|
8
8
|
import SidenavDropdownToggle from "./SidenavDropdownToggle.js";
|
|
9
|
+
import Box from "../internals/Box/index.js";
|
|
9
10
|
import { useStyles, useInternalId } from "../internals/hooks/index.js";
|
|
10
11
|
import { forwardRef, kebabPlace, mergeRefs } from "../internals/utils/index.js";
|
|
11
12
|
import { SidenavContext } from "./Sidenav.js";
|
|
@@ -18,15 +19,12 @@ const ExpandedSidenavDropdown = forwardRef((props, ref) => {
|
|
|
18
19
|
throw new Error('<SidenavDropdown> component is not supposed to be used standalone. Use <Nav.Menu> inside <Sidenav> instead.');
|
|
19
20
|
}
|
|
20
21
|
const {
|
|
21
|
-
as
|
|
22
|
+
as,
|
|
22
23
|
title,
|
|
23
24
|
children,
|
|
24
25
|
className,
|
|
25
26
|
menuStyle,
|
|
26
27
|
disabled,
|
|
27
|
-
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
|
|
28
|
-
renderTitle,
|
|
29
|
-
renderToggle,
|
|
30
28
|
classPrefix = 'dropdown',
|
|
31
29
|
placement = 'bottomStart',
|
|
32
30
|
toggleClassName,
|
|
@@ -35,9 +33,10 @@ const ExpandedSidenavDropdown = forwardRef((props, ref) => {
|
|
|
35
33
|
toggleAs,
|
|
36
34
|
noCaret,
|
|
37
35
|
style,
|
|
36
|
+
open: openProp,
|
|
37
|
+
renderToggle,
|
|
38
38
|
onOpen,
|
|
39
39
|
onClose,
|
|
40
|
-
open: openProp,
|
|
41
40
|
onToggle,
|
|
42
41
|
...rest
|
|
43
42
|
} = props;
|
|
@@ -80,7 +79,8 @@ const ExpandedSidenavDropdown = forwardRef((props, ref) => {
|
|
|
80
79
|
[open ? 'expand' : 'collapse']: true,
|
|
81
80
|
disabled
|
|
82
81
|
}));
|
|
83
|
-
return /*#__PURE__*/React.createElement(
|
|
82
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
83
|
+
as: as,
|
|
84
84
|
ref: mergeRefs(ref, containerRef),
|
|
85
85
|
style: style,
|
|
86
86
|
className: classes,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { BoxProps } from '../internals/Box';
|
|
2
3
|
import type { IconProps } from '@rsuite/icons/Icon';
|
|
3
|
-
import type {
|
|
4
|
-
export interface SidenavDropdownItemProps<T = any> extends
|
|
4
|
+
import type { HTMLPropsWithoutSelect } from '../internals/types';
|
|
5
|
+
export interface SidenavDropdownItemProps<T = any> extends BoxProps, HTMLPropsWithoutSelect {
|
|
5
6
|
/** Active the current option */
|
|
6
7
|
active?: boolean;
|
|
7
8
|
/** Primary content */
|
|
@@ -19,7 +19,7 @@ const ExpandedSidenavDropdownItem = forwardRef((props, ref) => {
|
|
|
19
19
|
throw new Error('<SidenavDropdownItem> component is not supposed to be used standalone. Use <Nav.Item> within <Sidenav> instead.');
|
|
20
20
|
}
|
|
21
21
|
const {
|
|
22
|
-
as
|
|
22
|
+
as = 'li',
|
|
23
23
|
active: activeProp,
|
|
24
24
|
classPrefix = 'dropdown-item',
|
|
25
25
|
children,
|
|
@@ -55,7 +55,7 @@ const ExpandedSidenavDropdownItem = forwardRef((props, ref) => {
|
|
|
55
55
|
const menuitemEventHandlers = {
|
|
56
56
|
onClick: createChainedFunction(handleClick, onClick)
|
|
57
57
|
};
|
|
58
|
-
const renderDropdownItem = useRenderMenuItem(
|
|
58
|
+
const renderDropdownItem = useRenderMenuItem(as);
|
|
59
59
|
if (divider) {
|
|
60
60
|
return renderDropdownItem({
|
|
61
61
|
ref,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { BoxProps } from '../internals/Box';
|
|
3
|
+
import type { SanitizedHTMListProps } from '../internals/types';
|
|
3
4
|
import type { IconProps } from '@rsuite/icons/Icon';
|
|
4
|
-
export interface SidenavDropdownMenuProps<T = any> extends
|
|
5
|
+
export interface SidenavDropdownMenuProps<T = any> extends BoxProps, SanitizedHTMListProps<HTMLLIElement, React.LiHTMLAttributes<HTMLLIElement>> {
|
|
5
6
|
/** Primary content */
|
|
6
7
|
children?: React.ReactNode;
|
|
7
8
|
/** You can use a custom element for this component */
|