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
package/esm/Affix/Affix.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { BoxProps } from '../internals/Box';
|
|
2
|
+
import type { Offset } from '../internals/types';
|
|
3
|
+
export interface AffixProps extends BoxProps {
|
|
3
4
|
/** Specify the container. */
|
|
4
5
|
container?: HTMLElement | (() => HTMLElement);
|
|
5
6
|
/** Distance from top */
|
package/esm/Affix/Affix.js
CHANGED
|
@@ -3,6 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
3
3
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
4
4
|
import debounce from 'lodash/debounce';
|
|
5
5
|
import getOffset from 'dom-lib/getOffset';
|
|
6
|
+
import Box from "../internals/Box/index.js";
|
|
6
7
|
import { useStyles, useElementResize, useEventListener, useMount } from "../internals/hooks/index.js";
|
|
7
8
|
import { mergeRefs, forwardRef } from "../internals/utils/index.js";
|
|
8
9
|
import { useCustom } from "../CustomProvider/index.js";
|
|
@@ -99,7 +100,7 @@ const Affix = forwardRef((props, ref) => {
|
|
|
99
100
|
propsWithDefaults
|
|
100
101
|
} = useCustom('Affix', props);
|
|
101
102
|
const {
|
|
102
|
-
as
|
|
103
|
+
as,
|
|
103
104
|
classPrefix = 'affix',
|
|
104
105
|
className,
|
|
105
106
|
children,
|
|
@@ -138,7 +139,9 @@ const Affix = forwardRef((props, ref) => {
|
|
|
138
139
|
zIndex: 10
|
|
139
140
|
};
|
|
140
141
|
const affixStyles = fixed ? fixedStyles : undefined;
|
|
141
|
-
return /*#__PURE__*/React.createElement(
|
|
142
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
143
|
+
as: as
|
|
144
|
+
}, rest, {
|
|
142
145
|
ref: mergeRefs(mountRef, ref)
|
|
143
146
|
}), /*#__PURE__*/React.createElement("div", {
|
|
144
147
|
className: classes,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import { BoxProps } from '../internals/Box';
|
|
3
|
+
import type { FormControlPickerProps, Placement, Option, Size, ListboxProps, PopupProps } from '../internals/types';
|
|
4
|
+
export interface AutoCompleteProps<T = string> extends BoxProps, FormControlPickerProps<T, any, Option | string>, ListboxProps, PopupProps {
|
|
4
5
|
/** The placement of component */
|
|
5
6
|
placement?: Placement;
|
|
6
7
|
/** When set to false, the Enter key selection function is invalid */
|
|
@@ -5,6 +5,7 @@ import pick from 'lodash/pick';
|
|
|
5
5
|
import omit from 'lodash/omit';
|
|
6
6
|
import Combobox from "./Combobox.js";
|
|
7
7
|
import Plaintext from "../internals/Plaintext/index.js";
|
|
8
|
+
import Box from "../internals/Box/index.js";
|
|
8
9
|
import { useStyles, useControlled, useIsMounted, useEventCallback } from "../internals/hooks/index.js";
|
|
9
10
|
import { forwardRef, mergeRefs, partitionHTMLProps } from "../internals/utils/index.js";
|
|
10
11
|
import { PickerToggleTrigger, onMenuKeyDown, Listbox, ListItem, PickerPopup, useFocusItemValue, usePickerRef, pickTriggerPropKeys } from "../internals/Picker/index.js";
|
|
@@ -22,7 +23,7 @@ const AutoComplete = forwardRef((props, ref) => {
|
|
|
22
23
|
propsWithDefaults
|
|
23
24
|
} = useCustom('AutoComplete', props);
|
|
24
25
|
const {
|
|
25
|
-
as
|
|
26
|
+
as,
|
|
26
27
|
disabled,
|
|
27
28
|
className,
|
|
28
29
|
placement = 'bottomStart',
|
|
@@ -186,7 +187,8 @@ const AutoComplete = forwardRef((props, ref) => {
|
|
|
186
187
|
trigger: ['click', 'focus'],
|
|
187
188
|
open: expanded,
|
|
188
189
|
speaker: renderPopup
|
|
189
|
-
}, /*#__PURE__*/React.createElement(
|
|
190
|
+
}, /*#__PURE__*/React.createElement(Box, _extends({
|
|
191
|
+
as: as,
|
|
190
192
|
className: classes,
|
|
191
193
|
style: style,
|
|
192
194
|
ref: root
|
package/esm/Avatar/Avatar.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { CSSProperties } from 'react';
|
|
2
|
-
import type {
|
|
3
|
-
|
|
2
|
+
import type { BoxProps } from '../internals/Box';
|
|
3
|
+
import type { ColorScheme, Size } from '../internals/types';
|
|
4
|
+
export interface AvatarProps extends BoxProps {
|
|
4
5
|
/**
|
|
5
6
|
* A avatar can have different sizes.
|
|
6
7
|
*
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import { BoxProps } from '../internals/Box';
|
|
3
|
+
import type { Size } from '../internals/types';
|
|
4
|
+
export interface AvatarGroupProps extends BoxProps {
|
|
4
5
|
/**
|
|
5
6
|
* Render all avatars as stacks
|
|
6
7
|
*/
|
|
@@ -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 { forwardRef, getCssValue, mergeStyles } from "../internals/utils/index.js";
|
|
5
6
|
import { useStyles } from "../internals/hooks/index.js";
|
|
6
7
|
import { useCustom } from "../CustomProvider/index.js";
|
|
@@ -15,7 +16,7 @@ const AvatarGroup = forwardRef((props, ref) => {
|
|
|
15
16
|
propsWithDefaults
|
|
16
17
|
} = useCustom('AvatarGroup', props);
|
|
17
18
|
const {
|
|
18
|
-
as
|
|
19
|
+
as,
|
|
19
20
|
classPrefix = 'avatar-group',
|
|
20
21
|
spacing,
|
|
21
22
|
className,
|
|
@@ -37,7 +38,8 @@ const AvatarGroup = forwardRef((props, ref) => {
|
|
|
37
38
|
size
|
|
38
39
|
}), [size]);
|
|
39
40
|
const styles = mergeStyles(style, cssVar('spacing', spacing, getCssValue));
|
|
40
|
-
return /*#__PURE__*/React.createElement(
|
|
41
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
42
|
+
as: as,
|
|
41
43
|
role: "group"
|
|
42
44
|
}, rest, {
|
|
43
45
|
ref: ref,
|
package/esm/Badge/Badge.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, PlacementCorners } from '../internals/types';
|
|
4
|
+
export interface BadgeProps extends BoxProps {
|
|
4
5
|
/**
|
|
5
6
|
* The content of the badge
|
|
6
7
|
*/
|
package/esm/Badge/Badge.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
import React, { useMemo } from 'react';
|
|
4
4
|
import kebabCase from 'lodash/kebabCase';
|
|
5
|
+
import Box from "../internals/Box/index.js";
|
|
5
6
|
import { useStyles } from "../internals/hooks/index.js";
|
|
6
7
|
import { useCustom } from "../CustomProvider/index.js";
|
|
7
8
|
import { forwardRef, mergeStyles, createOffsetStyles, isPresetColor, createColorVariables } from "../internals/utils/index.js";
|
|
@@ -14,7 +15,7 @@ const Badge = forwardRef((props, ref) => {
|
|
|
14
15
|
propsWithDefaults
|
|
15
16
|
} = useCustom('Badge', props);
|
|
16
17
|
const {
|
|
17
|
-
as
|
|
18
|
+
as,
|
|
18
19
|
content,
|
|
19
20
|
color,
|
|
20
21
|
className,
|
|
@@ -51,13 +52,15 @@ const Badge = forwardRef((props, ref) => {
|
|
|
51
52
|
}));
|
|
52
53
|
const styles = useMemo(() => mergeStyles(style, createOffsetStyles(offset, '--rs-badge-offset'), createColorVariables(color, '--rs-badge-bg')), [style, offset, color]);
|
|
53
54
|
if (!children) {
|
|
54
|
-
return /*#__PURE__*/React.createElement(
|
|
55
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
56
|
+
as: as,
|
|
55
57
|
ref: ref,
|
|
56
58
|
className: classes,
|
|
57
59
|
style: styles
|
|
58
60
|
}, rest), text);
|
|
59
61
|
}
|
|
60
|
-
return /*#__PURE__*/React.createElement(
|
|
62
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
63
|
+
as: as,
|
|
61
64
|
ref: ref,
|
|
62
65
|
className: classes,
|
|
63
66
|
style: styles
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { BoxProps } from '../internals/Box';
|
|
2
3
|
import type { BreadcrumbLocale } from '../locales';
|
|
3
|
-
|
|
4
|
-
export interface BreadcrumbProps extends WithAsProps {
|
|
4
|
+
export interface BreadcrumbProps extends BoxProps {
|
|
5
5
|
/**
|
|
6
6
|
* The separator between each breadcrumb item.
|
|
7
7
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export interface BreadcrumbItemProps extends
|
|
2
|
+
import { BoxProps } from '../internals/Box';
|
|
3
|
+
export interface BreadcrumbItemProps extends BoxProps {
|
|
4
4
|
/**
|
|
5
5
|
* The wrapper element of the BreadcrumbItem.
|
|
6
6
|
*/
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import SafeAnchor from "../SafeAnchor/index.js";
|
|
5
|
+
import Box from "../internals/Box/index.js";
|
|
5
6
|
import { forwardRef } from "../internals/utils/index.js";
|
|
6
7
|
import { useStyles } from "../internals/hooks/index.js";
|
|
7
8
|
/**
|
|
@@ -10,7 +11,7 @@ import { useStyles } from "../internals/hooks/index.js";
|
|
|
10
11
|
*/
|
|
11
12
|
const BreadcrumbItem = forwardRef((props, ref) => {
|
|
12
13
|
const {
|
|
13
|
-
wrapperAs
|
|
14
|
+
wrapperAs = 'li',
|
|
14
15
|
href,
|
|
15
16
|
as: Component = href ? SafeAnchor : 'span',
|
|
16
17
|
classPrefix = 'breadcrumb-item',
|
|
@@ -31,7 +32,8 @@ const BreadcrumbItem = forwardRef((props, ref) => {
|
|
|
31
32
|
const classes = merge(className, withPrefix({
|
|
32
33
|
active
|
|
33
34
|
}));
|
|
34
|
-
return /*#__PURE__*/React.createElement(
|
|
35
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
36
|
+
as: wrapperAs,
|
|
35
37
|
style: style,
|
|
36
38
|
className: classes,
|
|
37
39
|
ref: ref
|
package/esm/Button/Button.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, Size, AppearanceType } from '../internals/types';
|
|
4
|
+
export interface ButtonProps extends BoxProps, Omit<React.HTMLAttributes<HTMLElement>, 'onToggle'> {
|
|
4
5
|
/** A button can have different appearances. */
|
|
5
6
|
appearance?: AppearanceType;
|
|
6
7
|
/** A button can show it is currently the active user selection */
|
package/esm/Button/Button.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
import React, { useContext, useMemo } from 'react';
|
|
4
4
|
import Ripple from "../internals/Ripple/index.js";
|
|
5
|
+
import Box from "../internals/Box/index.js";
|
|
5
6
|
import SafeAnchor from "../SafeAnchor/index.js";
|
|
6
7
|
import { ButtonGroupContext } from "../ButtonGroup/index.js";
|
|
7
8
|
import { forwardRef, isOneOf } from "../internals/utils/index.js";
|
|
@@ -12,6 +13,7 @@ import { useCustom } from "../CustomProvider/index.js";
|
|
|
12
13
|
* @see https://rsuitejs.com/components/button
|
|
13
14
|
*/
|
|
14
15
|
const Button = forwardRef((props, ref) => {
|
|
16
|
+
var _rest$role;
|
|
15
17
|
const {
|
|
16
18
|
propsWithDefaults
|
|
17
19
|
} = useCustom('Button', props);
|
|
@@ -68,20 +70,12 @@ const Button = forwardRef((props, ref) => {
|
|
|
68
70
|
}
|
|
69
71
|
onClick === null || onClick === void 0 || onClick(event);
|
|
70
72
|
});
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
className: classes,
|
|
78
|
-
onClick: handleClick
|
|
79
|
-
}), buttonContent);
|
|
80
|
-
}
|
|
81
|
-
const Component = as || 'button';
|
|
82
|
-
const type = typeProp || (Component === 'button' ? 'button' : undefined);
|
|
83
|
-
const role = rest.role || (Component !== 'button' ? 'button' : undefined);
|
|
84
|
-
return /*#__PURE__*/React.createElement(Component, _extends({}, rest, {
|
|
73
|
+
const buttonAs = as || (rest.href ? SafeAnchor : 'button');
|
|
74
|
+
const isCustomElement = buttonAs !== 'button' && buttonAs !== SafeAnchor;
|
|
75
|
+
const type = typeProp !== null && typeProp !== void 0 ? typeProp : buttonAs === 'button' ? 'button' : undefined;
|
|
76
|
+
const role = (_rest$role = rest.role) !== null && _rest$role !== void 0 ? _rest$role : isCustomElement ? 'button' : undefined;
|
|
77
|
+
return /*#__PURE__*/React.createElement(Box, _extends({}, rest, {
|
|
78
|
+
as: buttonAs,
|
|
85
79
|
role: role,
|
|
86
80
|
type: type,
|
|
87
81
|
ref: ref,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { BoxProps } from '../internals/Box';
|
|
2
|
+
import type { Size } from '../internals/types';
|
|
3
|
+
export interface ButtonGroupProps extends BoxProps {
|
|
3
4
|
/** Display block buttongroups */
|
|
4
5
|
block?: boolean;
|
|
5
6
|
/** A button can show it is currently unable to be interacted with */
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
import React, { useMemo } from 'react';
|
|
4
4
|
import ButtonGroupContext from "./ButtonGroupContext.js";
|
|
5
|
+
import Box from "../internals/Box/index.js";
|
|
5
6
|
import { forwardRef } from "../internals/utils/index.js";
|
|
6
7
|
import { useStyles } from "../internals/hooks/index.js";
|
|
7
8
|
import { useCustom } from "../CustomProvider/index.js";
|
|
@@ -14,7 +15,7 @@ const ButtonGroup = forwardRef((props, ref) => {
|
|
|
14
15
|
propsWithDefaults
|
|
15
16
|
} = useCustom('ButtonGroup', props);
|
|
16
17
|
const {
|
|
17
|
-
as
|
|
18
|
+
as,
|
|
18
19
|
classPrefix = 'btn-group',
|
|
19
20
|
role = 'group',
|
|
20
21
|
className,
|
|
@@ -43,7 +44,9 @@ const ButtonGroup = forwardRef((props, ref) => {
|
|
|
43
44
|
}), [disabled, size]);
|
|
44
45
|
return /*#__PURE__*/React.createElement(ButtonGroupContext.Provider, {
|
|
45
46
|
value: contextValue
|
|
46
|
-
}, /*#__PURE__*/React.createElement(
|
|
47
|
+
}, /*#__PURE__*/React.createElement(Box, _extends({
|
|
48
|
+
as: as
|
|
49
|
+
}, rest, {
|
|
47
50
|
role: role,
|
|
48
51
|
ref: ref,
|
|
49
52
|
className: classes
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { StackProps } from '../Stack';
|
|
2
|
-
|
|
3
|
-
export interface ButtonToolbarProps extends WithAsProps {
|
|
2
|
+
export interface ButtonToolbarProps extends StackProps {
|
|
4
3
|
/**
|
|
5
4
|
* The ARIA role describing the button toolbar. Generally the default
|
|
6
5
|
* "toolbar" role is correct. An `aria-label` or `aria-labelledby`
|
|
@@ -14,26 +14,23 @@ const ButtonToolbar = forwardRef((props, ref) => {
|
|
|
14
14
|
propsWithDefaults
|
|
15
15
|
} = useCustom('ButtonToolbar', props);
|
|
16
16
|
const {
|
|
17
|
-
as
|
|
17
|
+
as,
|
|
18
18
|
className,
|
|
19
19
|
classPrefix = 'btn-toolbar',
|
|
20
20
|
role = 'toolbar',
|
|
21
21
|
...rest
|
|
22
22
|
} = propsWithDefaults;
|
|
23
|
-
const stackProps = Component === Stack ? {
|
|
24
|
-
wrap: true,
|
|
25
|
-
spacing: 10
|
|
26
|
-
} : null;
|
|
27
23
|
const {
|
|
28
24
|
withPrefix,
|
|
29
25
|
merge
|
|
30
26
|
} = useStyles(classPrefix);
|
|
31
27
|
const classes = merge(className, withPrefix());
|
|
32
|
-
return /*#__PURE__*/React.createElement(
|
|
28
|
+
return /*#__PURE__*/React.createElement(Stack, _extends({
|
|
29
|
+
as: as,
|
|
33
30
|
role: role,
|
|
34
31
|
ref: ref,
|
|
35
32
|
className: classes
|
|
36
|
-
}));
|
|
33
|
+
}, rest));
|
|
37
34
|
});
|
|
38
35
|
ButtonToolbar.displayName = 'ButtonToolbar';
|
|
39
36
|
export default ButtonToolbar;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { BoxProps } from '../internals/Box';
|
|
2
3
|
import type { CalendarLocale } from '../locales';
|
|
3
|
-
import type { WithAsProps } from '../internals/types';
|
|
4
4
|
import type { MonthDropdownProps } from './types';
|
|
5
|
-
export interface CalendarProps extends
|
|
5
|
+
export interface CalendarProps extends BoxProps {
|
|
6
6
|
/**
|
|
7
7
|
* Controlled value
|
|
8
8
|
*/
|
package/esm/Calendar/Calendar.js
CHANGED
|
@@ -3,6 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import CalendarContainer from "./CalendarContainer.js";
|
|
5
5
|
import Button from "../Button/index.js";
|
|
6
|
+
import Box from "../internals/Box/index.js";
|
|
6
7
|
import { forwardRef } from "../internals/utils/index.js";
|
|
7
8
|
import { isSameMonth, startOfDay } from "../internals/utils/date/index.js";
|
|
8
9
|
import { FormattedDate } from "../CustomProvider/index.js";
|
|
@@ -18,7 +19,7 @@ const Calendar = forwardRef((props, ref) => {
|
|
|
18
19
|
propsWithDefaults
|
|
19
20
|
} = useCustom('Calendar', props);
|
|
20
21
|
const {
|
|
21
|
-
as
|
|
22
|
+
as = CalendarContainer,
|
|
22
23
|
bordered,
|
|
23
24
|
className,
|
|
24
25
|
classPrefix = 'calendar',
|
|
@@ -27,12 +28,12 @@ const Calendar = forwardRef((props, ref) => {
|
|
|
27
28
|
isoWeek,
|
|
28
29
|
weekStart = 0,
|
|
29
30
|
locale,
|
|
31
|
+
cellClassName,
|
|
30
32
|
onChange,
|
|
31
33
|
onMonthChange,
|
|
32
34
|
onSelect,
|
|
33
35
|
renderCell,
|
|
34
36
|
value,
|
|
35
|
-
cellClassName,
|
|
36
37
|
...rest
|
|
37
38
|
} = propsWithDefaults;
|
|
38
39
|
const {
|
|
@@ -55,8 +56,7 @@ const Calendar = forwardRef((props, ref) => {
|
|
|
55
56
|
});
|
|
56
57
|
const {
|
|
57
58
|
prefix,
|
|
58
|
-
merge
|
|
59
|
-
withPrefix
|
|
59
|
+
merge
|
|
60
60
|
} = useStyles(classPrefix);
|
|
61
61
|
const renderToolbar = () => /*#__PURE__*/React.createElement(Button, {
|
|
62
62
|
className: prefix('btn-today'),
|
|
@@ -67,11 +67,12 @@ const Calendar = forwardRef((props, ref) => {
|
|
|
67
67
|
date: date,
|
|
68
68
|
formatStr: (locale === null || locale === void 0 ? void 0 : locale.formattedMonthPattern) || 'MMMM yyyy'
|
|
69
69
|
});
|
|
70
|
-
const classes = merge(className,
|
|
70
|
+
const classes = merge(className, prefix('panel', {
|
|
71
71
|
bordered,
|
|
72
72
|
compact
|
|
73
73
|
}));
|
|
74
|
-
return /*#__PURE__*/React.createElement(
|
|
74
|
+
return /*#__PURE__*/React.createElement(Box, _extends({}, rest, {
|
|
75
|
+
as: as,
|
|
75
76
|
inline: true,
|
|
76
77
|
className: classes,
|
|
77
78
|
ref: ref,
|
package/esm/Card/Card.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
export interface CardProps extends
|
|
1
|
+
import { BoxProps } from '../internals/Box';
|
|
2
|
+
export interface CardProps extends BoxProps {
|
|
3
3
|
/**
|
|
4
4
|
* Show border
|
|
5
5
|
*/
|
|
@@ -22,17 +22,8 @@ export interface CardProps extends WithAsProps {
|
|
|
22
22
|
size?: 'lg' | 'md' | 'sm';
|
|
23
23
|
}
|
|
24
24
|
declare const Card: import("../internals/types").InternalRefForwardingComponent<"div", CardProps, never> & {
|
|
25
|
-
Header: import("../internals/types").InternalRefForwardingComponent<"div", Partial<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}>, never> & Record<string, never>;
|
|
29
|
-
Body: import("../internals/types").InternalRefForwardingComponent<"div", Partial<{
|
|
30
|
-
name: string;
|
|
31
|
-
componentAs: "div";
|
|
32
|
-
}>, never> & Record<string, never>;
|
|
33
|
-
Footer: import("../internals/types").InternalRefForwardingComponent<"div", Partial<{
|
|
34
|
-
name: string;
|
|
35
|
-
componentAs: "div";
|
|
36
|
-
}>, never> & Record<string, never>;
|
|
25
|
+
Header: import("../internals/types").InternalRefForwardingComponent<"div", Partial<import("../internals/utils").ComponentProps>, never> & Record<string, never>;
|
|
26
|
+
Body: import("../internals/types").InternalRefForwardingComponent<"div", Partial<import("../internals/utils").ComponentProps>, never> & Record<string, never>;
|
|
27
|
+
Footer: import("../internals/types").InternalRefForwardingComponent<"div", Partial<import("../internals/utils").ComponentProps>, never> & Record<string, never>;
|
|
37
28
|
};
|
|
38
29
|
export default Card;
|
package/esm/Card/Card.js
CHANGED
|
@@ -4,6 +4,7 @@ import React from 'react';
|
|
|
4
4
|
import CardHeader from "./CardHeader.js";
|
|
5
5
|
import CardBody from "./CardBody.js";
|
|
6
6
|
import CardFooter from "./CardFooter.js";
|
|
7
|
+
import Box from "../internals/Box/index.js";
|
|
7
8
|
import { forwardRef, mergeStyles, getCssValue } from "../internals/utils/index.js";
|
|
8
9
|
import { useCustom } from "../CustomProvider/index.js";
|
|
9
10
|
import { useStyles } from "../internals/hooks/index.js";
|
|
@@ -17,7 +18,7 @@ const Card = forwardRef((props, ref) => {
|
|
|
17
18
|
propsWithDefaults
|
|
18
19
|
} = useCustom('Card', props);
|
|
19
20
|
const {
|
|
20
|
-
as
|
|
21
|
+
as,
|
|
21
22
|
bordered = true,
|
|
22
23
|
classPrefix = 'card',
|
|
23
24
|
className,
|
|
@@ -40,7 +41,8 @@ const Card = forwardRef((props, ref) => {
|
|
|
40
41
|
['shaded-hover']: shaded === 'hover'
|
|
41
42
|
}));
|
|
42
43
|
const styles = mergeStyles(style, cssVar('width', width, getCssValue));
|
|
43
|
-
return /*#__PURE__*/React.createElement(
|
|
44
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
45
|
+
as: as,
|
|
44
46
|
ref: ref,
|
|
45
47
|
className: classes,
|
|
46
48
|
style: styles
|
package/esm/Card/CardBody.d.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { ComponentProps } from '../internals/utils';
|
|
2
2
|
export type CardBodyProps = ComponentProps;
|
|
3
|
-
declare const CardBody: import("../internals/types").InternalRefForwardingComponent<"div", Partial<
|
|
4
|
-
name: string;
|
|
5
|
-
componentAs: "div";
|
|
6
|
-
}>, never> & Record<string, never>;
|
|
3
|
+
declare const CardBody: import("../internals/types").InternalRefForwardingComponent<"div", Partial<ComponentProps>, never> & Record<string, never>;
|
|
7
4
|
export default CardBody;
|
package/esm/Card/CardBody.js
CHANGED
|
File without changes
|
package/esm/Card/CardFooter.d.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { ComponentProps } from '../internals/utils';
|
|
2
2
|
export type CardFooterProps = ComponentProps;
|
|
3
|
-
declare const CardFooter: import("../internals/types").InternalRefForwardingComponent<"div", Partial<
|
|
4
|
-
name: string;
|
|
5
|
-
componentAs: "div";
|
|
6
|
-
}>, never> & Record<string, never>;
|
|
3
|
+
declare const CardFooter: import("../internals/types").InternalRefForwardingComponent<"div", Partial<ComponentProps>, never> & Record<string, never>;
|
|
7
4
|
export default CardFooter;
|
package/esm/Card/CardFooter.js
CHANGED
|
File without changes
|
package/esm/Card/CardHeader.d.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { ComponentProps } from '../internals/utils';
|
|
2
2
|
export type CardHeaderProps = ComponentProps;
|
|
3
|
-
declare const CardHeader: import("../internals/types").InternalRefForwardingComponent<"div", Partial<
|
|
4
|
-
name: string;
|
|
5
|
-
componentAs: "div";
|
|
6
|
-
}>, never> & Record<string, never>;
|
|
3
|
+
declare const CardHeader: import("../internals/types").InternalRefForwardingComponent<"div", Partial<ComponentProps>, never> & Record<string, never>;
|
|
7
4
|
export default CardHeader;
|
package/esm/Card/CardHeader.js
CHANGED
|
File without changes
|
|
@@ -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 { forwardRef, getCssValue, mergeStyles } from "../internals/utils/index.js";
|
|
5
6
|
import { useStyles } from "../internals/hooks/index.js";
|
|
6
7
|
import { useCustom } from "../CustomProvider/index.js";
|
|
@@ -9,7 +10,7 @@ const CardGroup = forwardRef((props, ref) => {
|
|
|
9
10
|
propsWithDefaults
|
|
10
11
|
} = useCustom('CardGroup', props);
|
|
11
12
|
const {
|
|
12
|
-
as
|
|
13
|
+
as,
|
|
13
14
|
classPrefix = 'card-group',
|
|
14
15
|
className,
|
|
15
16
|
children,
|
|
@@ -25,7 +26,8 @@ const CardGroup = forwardRef((props, ref) => {
|
|
|
25
26
|
} = useStyles(classPrefix);
|
|
26
27
|
const classes = merge(className, withPrefix());
|
|
27
28
|
const styles = mergeStyles(style, cssVar('columns', columns), cssVar('spacing', spacing, getCssValue));
|
|
28
|
-
return /*#__PURE__*/React.createElement(
|
|
29
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
30
|
+
as: as,
|
|
29
31
|
ref: ref,
|
|
30
32
|
className: classes,
|
|
31
33
|
style: styles
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export interface CarouselProps extends
|
|
2
|
+
import { BoxProps } from '../internals/Box';
|
|
3
|
+
export interface CarouselProps extends BoxProps {
|
|
4
4
|
/** Autoplay element */
|
|
5
5
|
autoplay?: boolean;
|
|
6
6
|
/** Autoplay interval */
|
package/esm/Carousel/Carousel.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
import React, { useState, useMemo, useCallback, useRef } from 'react';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
|
+
import Box from "../internals/Box/index.js";
|
|
5
6
|
import { useStyles, useControlled, useUpdateEffect, useTimeout } from "../internals/hooks/index.js";
|
|
6
7
|
import { forwardRef, guid, ReactChildren, mergeRefs } from "../internals/utils/index.js";
|
|
7
8
|
import { useCustom } from "../CustomProvider/index.js";
|
|
@@ -15,7 +16,7 @@ const Carousel = forwardRef((props, ref) => {
|
|
|
15
16
|
propsWithDefaults
|
|
16
17
|
} = useCustom('Carousel', props);
|
|
17
18
|
const {
|
|
18
|
-
as
|
|
19
|
+
as,
|
|
19
20
|
children,
|
|
20
21
|
classPrefix = 'carousel',
|
|
21
22
|
className,
|
|
@@ -119,7 +120,9 @@ const Carousel = forwardRef((props, ref) => {
|
|
|
119
120
|
transform: vertical ? `translate3d(0, ${activeRatio} ,0)` : `translate3d(${activeRatio}, 0 ,0)`
|
|
120
121
|
};
|
|
121
122
|
const showMask = count > 1 && activeIndex === 0 && activeIndex !== lastIndex;
|
|
122
|
-
return /*#__PURE__*/React.createElement(
|
|
123
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
124
|
+
as: as
|
|
125
|
+
}, rest, {
|
|
123
126
|
ref: mergeRefs(ref, rootRef),
|
|
124
127
|
className: classes
|
|
125
128
|
}), /*#__PURE__*/React.createElement("div", {
|
|
@@ -3,6 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
3
3
|
import React, { useCallback, useMemo } from 'react';
|
|
4
4
|
import TreeView from "./TreeView.js";
|
|
5
5
|
import SearchView from "./SearchView.js";
|
|
6
|
+
import Box from "../internals/Box/index.js";
|
|
6
7
|
import { forwardRef } from "../internals/utils/index.js";
|
|
7
8
|
import { getParentMap } from "../internals/Tree/utils/index.js";
|
|
8
9
|
import { flattenTree } from "../Tree/utils/index.js";
|
|
@@ -19,7 +20,7 @@ const CascadeTree = forwardRef((props, ref) => {
|
|
|
19
20
|
propsWithDefaults
|
|
20
21
|
} = useCustom('CascadeTree', props);
|
|
21
22
|
const {
|
|
22
|
-
as
|
|
23
|
+
as,
|
|
23
24
|
data = [],
|
|
24
25
|
defaultValue,
|
|
25
26
|
className,
|
|
@@ -129,7 +130,8 @@ const CascadeTree = forwardRef((props, ref) => {
|
|
|
129
130
|
handleSelect(node, event);
|
|
130
131
|
setSearchKeyword('');
|
|
131
132
|
});
|
|
132
|
-
return /*#__PURE__*/React.createElement(
|
|
133
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
134
|
+
as: as,
|
|
133
135
|
className: classes
|
|
134
136
|
}, rest, {
|
|
135
137
|
ref: ref
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { Option, DataProps,
|
|
2
|
+
import type { Option, DataProps, ToArray } from '../internals/types';
|
|
3
|
+
import type { BoxProps } from '../internals/Box';
|
|
3
4
|
export interface SelectNode<T> {
|
|
4
5
|
itemData: Option<T>;
|
|
5
6
|
cascadePaths: Option<T>[];
|
|
@@ -10,7 +11,7 @@ export interface CascadeColumn<T> {
|
|
|
10
11
|
parentItem?: Option<T>;
|
|
11
12
|
layer?: number;
|
|
12
13
|
}
|
|
13
|
-
export interface CascadeTreeProps<T = any, V = T, L = any> extends
|
|
14
|
+
export interface CascadeTreeProps<T = any, V = T, L = any> extends BoxProps, DataProps<Option<T>> {
|
|
14
15
|
/**
|
|
15
16
|
* Initial value
|
|
16
17
|
*/
|