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
|
@@ -7,6 +7,7 @@ import Disclosure from "../internals/Disclosure/Disclosure.js";
|
|
|
7
7
|
import NavDropdownItem from "../Nav/NavDropdownItem.js";
|
|
8
8
|
import NavDropdownMenu from "../Nav/NavDropdownMenu.js";
|
|
9
9
|
import NavbarDropdownToggle from "./NavbarDropdownToggle.js";
|
|
10
|
+
import Box from "../internals/Box/index.js";
|
|
10
11
|
import { useStyles } from "../internals/hooks/index.js";
|
|
11
12
|
import { forwardRef, mergeRefs, kebabPlace } from "../internals/utils/index.js";
|
|
12
13
|
import { NavbarContext } from "./NavbarContext.js";
|
|
@@ -24,7 +25,7 @@ const NavbarDropdown = forwardRef((props, ref) => {
|
|
|
24
25
|
throw new Error('<Navbar.Dropdown> should be used within a <Navbar> component.');
|
|
25
26
|
}
|
|
26
27
|
const {
|
|
27
|
-
as
|
|
28
|
+
as,
|
|
28
29
|
title,
|
|
29
30
|
onClose,
|
|
30
31
|
onOpen,
|
|
@@ -69,7 +70,8 @@ const NavbarDropdown = forwardRef((props, ref) => {
|
|
|
69
70
|
disabled,
|
|
70
71
|
open
|
|
71
72
|
}));
|
|
72
|
-
return /*#__PURE__*/React.createElement(
|
|
73
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
74
|
+
as: as,
|
|
73
75
|
ref: mergeRefs(ref, containerRef),
|
|
74
76
|
className: classes,
|
|
75
77
|
style: style,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import type {
|
|
2
|
+
import type { BoxProps } from '../internals/Box';
|
|
3
|
+
import type { IconProps } from '@rsuite/icons/Icon';
|
|
4
|
+
import type { HTMLPropsWithoutSelect } from '../internals/types';
|
|
4
5
|
import type { DeprecatedDropdownItemProps } from '../Dropdown/types';
|
|
5
|
-
export interface NavbarDropdownItemProps<T = any> extends
|
|
6
|
+
export interface NavbarDropdownItemProps<T = any> extends BoxProps, DeprecatedDropdownItemProps, HTMLPropsWithoutSelect {
|
|
6
7
|
/** Active the current option */
|
|
7
8
|
active?: boolean;
|
|
8
9
|
/** Whether to display the divider */
|
|
@@ -18,17 +18,17 @@ const NavbarDropdownItem = forwardRef((props, ref) => {
|
|
|
18
18
|
throw new Error('<Navbar.Dropdown.Item> must be rendered within a <Nav> component within a <Navbar> component.');
|
|
19
19
|
}
|
|
20
20
|
const {
|
|
21
|
+
as = 'li',
|
|
22
|
+
active: activeProp,
|
|
21
23
|
classPrefix = 'dropdown-item',
|
|
22
24
|
className,
|
|
23
|
-
|
|
25
|
+
children,
|
|
26
|
+
disabled,
|
|
27
|
+
divider,
|
|
24
28
|
eventKey,
|
|
25
|
-
onSelect,
|
|
26
29
|
icon,
|
|
27
|
-
as: Component = 'li',
|
|
28
|
-
divider,
|
|
29
30
|
panel,
|
|
30
|
-
|
|
31
|
-
disabled,
|
|
31
|
+
onSelect,
|
|
32
32
|
...restProps
|
|
33
33
|
} = props;
|
|
34
34
|
const {
|
|
@@ -51,7 +51,7 @@ const NavbarDropdownItem = forwardRef((props, ref) => {
|
|
|
51
51
|
handleSelectItem === null || handleSelectItem === void 0 || handleSelectItem(event);
|
|
52
52
|
}, [dispatchDisclosure, handleSelectItem]);
|
|
53
53
|
const selected = activeProp || !isNil(eventKey) && shallowEqual(nav.activeKey, eventKey);
|
|
54
|
-
const renderDropdownItem = useRenderMenuItem(
|
|
54
|
+
const renderDropdownItem = useRenderMenuItem(as);
|
|
55
55
|
if (divider) {
|
|
56
56
|
return renderDropdownItem({
|
|
57
57
|
ref,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import { BoxProps } from '../internals/Box';
|
|
3
|
+
import type { PlacementCorners } from '../internals/types';
|
|
4
|
+
export interface NavbarDropdownToggleProps extends BoxProps {
|
|
4
5
|
noCaret?: boolean;
|
|
5
|
-
renderToggle?: (props: WithAsProps, ref: React.Ref<any>) => any;
|
|
6
6
|
placement?: PlacementCorners;
|
|
7
|
+
renderToggle?: (props: BoxProps, ref: React.Ref<any>) => any;
|
|
7
8
|
}
|
|
8
9
|
/**
|
|
9
10
|
* @private this component is not supposed to be used directly
|
|
@@ -3,6 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import ArrowDownLineIcon from '@rsuite/icons/ArrowDownLine';
|
|
5
5
|
import NavbarItem from "./NavbarItem.js";
|
|
6
|
+
import Box from "../internals/Box/index.js";
|
|
6
7
|
import { forwardRef } from "../internals/utils/index.js";
|
|
7
8
|
import { useStyles } from "../internals/hooks/index.js";
|
|
8
9
|
/**
|
|
@@ -16,7 +17,7 @@ import { useStyles } from "../internals/hooks/index.js";
|
|
|
16
17
|
*/
|
|
17
18
|
const NavbarDropdownToggle = forwardRef((props, ref) => {
|
|
18
19
|
const {
|
|
19
|
-
as
|
|
20
|
+
as = NavbarItem,
|
|
20
21
|
className,
|
|
21
22
|
classPrefix = 'navbar-item',
|
|
22
23
|
renderToggle,
|
|
@@ -32,7 +33,9 @@ const NavbarDropdownToggle = forwardRef((props, ref) => {
|
|
|
32
33
|
const classes = merge(className, withPrefix({
|
|
33
34
|
'no-caret': noCaret
|
|
34
35
|
}));
|
|
35
|
-
const toggle = /*#__PURE__*/React.createElement(
|
|
36
|
+
const toggle = /*#__PURE__*/React.createElement(Box, _extends({
|
|
37
|
+
as: as
|
|
38
|
+
}, rest, {
|
|
36
39
|
ref: ref,
|
|
37
40
|
className: classes
|
|
38
41
|
}), children, !noCaret && /*#__PURE__*/React.createElement(ArrowDownLineIcon, {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { BoxProps } from '../internals/Box';
|
|
2
3
|
import type { IconProps } from '@rsuite/icons/Icon';
|
|
3
|
-
import type {
|
|
4
|
-
export interface NavbarItemProps<T = string | number> extends
|
|
4
|
+
import type { HTMLPropsWithoutSelect } from '../internals/types';
|
|
5
|
+
export interface NavbarItemProps<T = string | number> extends BoxProps, HTMLPropsWithoutSelect {
|
|
5
6
|
/** Activation status */
|
|
6
7
|
active?: boolean;
|
|
7
8
|
/** Disabled status */
|
package/esm/Navbar/NavbarItem.js
CHANGED
|
@@ -4,8 +4,9 @@ import React, { useCallback, useContext } from 'react';
|
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
import isNil from 'lodash/isNil';
|
|
6
6
|
import NavContext from "../Nav/NavContext.js";
|
|
7
|
-
import Ripple from "../internals/Ripple/index.js";
|
|
8
7
|
import SafeAnchor from "../SafeAnchor/index.js";
|
|
8
|
+
import Ripple from "../internals/Ripple/index.js";
|
|
9
|
+
import Box from "../internals/Box/index.js";
|
|
9
10
|
import { useStyles } from "../internals/hooks/index.js";
|
|
10
11
|
import { forwardRef, shallowEqual } from "../internals/utils/index.js";
|
|
11
12
|
/**
|
|
@@ -13,7 +14,7 @@ import { forwardRef, shallowEqual } from "../internals/utils/index.js";
|
|
|
13
14
|
*/
|
|
14
15
|
const NavbarItem = forwardRef((props, ref) => {
|
|
15
16
|
const {
|
|
16
|
-
as
|
|
17
|
+
as = SafeAnchor,
|
|
17
18
|
active: activeProp,
|
|
18
19
|
disabled,
|
|
19
20
|
eventKey,
|
|
@@ -50,7 +51,8 @@ const NavbarItem = forwardRef((props, ref) => {
|
|
|
50
51
|
onClick === null || onClick === void 0 || onClick(event);
|
|
51
52
|
}
|
|
52
53
|
}, [disabled, emitSelect, onClick]);
|
|
53
|
-
return /*#__PURE__*/React.createElement(
|
|
54
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
55
|
+
as: as,
|
|
54
56
|
ref: ref,
|
|
55
57
|
"aria-selected": active || undefined
|
|
56
58
|
}, rest, {
|
|
@@ -23,14 +23,16 @@ const NavbarMegaMenu = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
23
23
|
withPrefix
|
|
24
24
|
} = useStyles(classPrefix);
|
|
25
25
|
const classes = merge(className, withPrefix());
|
|
26
|
-
const renderMenu = useCallback((
|
|
27
|
-
|
|
28
|
-
onClose
|
|
29
|
-
|
|
26
|
+
const renderMenu = useCallback((menuProps, ref) => {
|
|
27
|
+
const {
|
|
28
|
+
onClose,
|
|
29
|
+
className
|
|
30
|
+
} = menuProps;
|
|
30
31
|
return /*#__PURE__*/React.createElement(Popover, {
|
|
31
32
|
ref: ref,
|
|
32
33
|
full: true,
|
|
33
|
-
arrow: false
|
|
34
|
+
arrow: false,
|
|
35
|
+
className: className
|
|
34
36
|
}, typeof children === 'function' ? children({
|
|
35
37
|
onClose
|
|
36
38
|
}) : children);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import { BoxProps } from '../internals/Box';
|
|
3
|
+
import type { StatusType } from '../internals/types';
|
|
4
|
+
export interface NotificationProps extends Omit<BoxProps, 'children'> {
|
|
4
5
|
children?: React.ReactNode | (() => React.ReactNode);
|
|
5
6
|
/** Title of the message */
|
|
6
7
|
header?: React.ReactNode;
|
|
@@ -3,6 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
3
3
|
import React, { useState } from 'react';
|
|
4
4
|
import useDelayedClosure from "../toaster/hooks/useDelayedClosure.js";
|
|
5
5
|
import CloseButton from "../internals/CloseButton/index.js";
|
|
6
|
+
import Box from "../internals/Box/index.js";
|
|
6
7
|
import { MESSAGE_STATUS_ICONS } from "../internals/constants/statusIcons.js";
|
|
7
8
|
import { useStyles, useIsMounted, useEventCallback } from "../internals/hooks/index.js";
|
|
8
9
|
import { forwardRef, mergeRefs } from "../internals/utils/index.js";
|
|
@@ -17,7 +18,7 @@ const Notification = forwardRef((props, ref) => {
|
|
|
17
18
|
propsWithDefaults
|
|
18
19
|
} = useCustom('Notification', props);
|
|
19
20
|
const {
|
|
20
|
-
as
|
|
21
|
+
as,
|
|
21
22
|
classPrefix = 'notification',
|
|
22
23
|
closable,
|
|
23
24
|
duration = 4500,
|
|
@@ -63,7 +64,8 @@ const Notification = forwardRef((props, ref) => {
|
|
|
63
64
|
const classes = merge(className, withPrefix(type, {
|
|
64
65
|
closable
|
|
65
66
|
}));
|
|
66
|
-
return /*#__PURE__*/React.createElement(
|
|
67
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
68
|
+
as: as,
|
|
67
69
|
role: "alert"
|
|
68
70
|
}, rest, {
|
|
69
71
|
ref: mergeRefs(targetRef, ref),
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { BoxProps } from '../internals/Box';
|
|
3
|
+
import type { Size } from '../internals/types';
|
|
3
4
|
import type { PaginationLocale } from '../locales';
|
|
4
|
-
export interface PaginationProps extends
|
|
5
|
+
export interface PaginationProps extends BoxProps {
|
|
5
6
|
/** Current page number */
|
|
6
7
|
activePage?: number;
|
|
7
8
|
/** Page buttons display the maximum number of */
|
|
@@ -7,6 +7,7 @@ import PageTopIcon from '@rsuite/icons/PageTop';
|
|
|
7
7
|
import PageNextIcon from '@rsuite/icons/PageNext';
|
|
8
8
|
import PageEndIcon from '@rsuite/icons/PageEnd';
|
|
9
9
|
import PaginationButton from "./PaginationButton.js";
|
|
10
|
+
import Box from "../internals/Box/index.js";
|
|
10
11
|
import { forwardRef } from "../internals/utils/index.js";
|
|
11
12
|
import { useStyles } from "../internals/hooks/index.js";
|
|
12
13
|
import { useCustom } from "../CustomProvider/index.js";
|
|
@@ -27,7 +28,7 @@ const Pagination = forwardRef((props, ref) => {
|
|
|
27
28
|
propsWithDefaults
|
|
28
29
|
} = useCustom('Pagination', props);
|
|
29
30
|
const {
|
|
30
|
-
as
|
|
31
|
+
as,
|
|
31
32
|
className,
|
|
32
33
|
classPrefix = 'pagination',
|
|
33
34
|
disabled: disabledProp,
|
|
@@ -184,10 +185,11 @@ const Pagination = forwardRef((props, ref) => {
|
|
|
184
185
|
});
|
|
185
186
|
};
|
|
186
187
|
const classes = merge(className, withPrefix(size));
|
|
187
|
-
return /*#__PURE__*/React.createElement(
|
|
188
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
189
|
+
as: as,
|
|
188
190
|
ref: ref,
|
|
189
191
|
className: classes
|
|
190
|
-
}), renderFirst(), renderPrev(), renderPageButtons(), renderNext(), renderLast());
|
|
192
|
+
}, rest), renderFirst(), renderPrev(), renderPageButtons(), renderNext(), renderLast());
|
|
191
193
|
});
|
|
192
194
|
Pagination.displayName = 'Pagination';
|
|
193
195
|
export default Pagination;
|
|
@@ -6,6 +6,7 @@ import Pagination from "./Pagination.js";
|
|
|
6
6
|
import Divider from "../Divider/index.js";
|
|
7
7
|
import Input from "../Input/index.js";
|
|
8
8
|
import LimitPicker from "./LimitPicker.js";
|
|
9
|
+
import Box from "../internals/Box/index.js";
|
|
9
10
|
import { useStyles, useControlled, useEventCallback } from "../internals/hooks/index.js";
|
|
10
11
|
import { forwardRef, tplTransform } from "../internals/utils/index.js";
|
|
11
12
|
import { useCustom } from "../CustomProvider/index.js";
|
|
@@ -24,7 +25,7 @@ const defaultLimitOptions = [30, 50, 100];
|
|
|
24
25
|
*/
|
|
25
26
|
const PaginationGroup = forwardRef((props, ref) => {
|
|
26
27
|
const {
|
|
27
|
-
as
|
|
28
|
+
as,
|
|
28
29
|
activePage: activePageProp,
|
|
29
30
|
classPrefix = 'pagination-group',
|
|
30
31
|
className,
|
|
@@ -74,7 +75,8 @@ const PaginationGroup = forwardRef((props, ref) => {
|
|
|
74
75
|
setLimit(value);
|
|
75
76
|
onChangeLimit === null || onChangeLimit === void 0 || onChangeLimit(value);
|
|
76
77
|
});
|
|
77
|
-
return /*#__PURE__*/React.createElement(
|
|
78
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
79
|
+
as: as,
|
|
78
80
|
ref: ref,
|
|
79
81
|
className: classes,
|
|
80
82
|
style: style
|
package/esm/Panel/Panel.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 { AnimationEventProps } from '../internals/types';
|
|
4
|
+
export interface PanelProps<T = string | number> extends BoxProps, AnimationEventProps {
|
|
4
5
|
/**
|
|
5
6
|
* Show border
|
|
6
7
|
*/
|
package/esm/Panel/Panel.js
CHANGED
|
@@ -4,6 +4,7 @@ import React, { useContext } from 'react';
|
|
|
4
4
|
import PanelHeader from "./PanelHeader.js";
|
|
5
5
|
import PanelBody from "./PanelBody.js";
|
|
6
6
|
import useExpanded from "./hooks/useExpanded.js";
|
|
7
|
+
import Box from "../internals/Box/index.js";
|
|
7
8
|
import { forwardRef } from "../internals/utils/index.js";
|
|
8
9
|
import { useStyles, useUniqueId, useEventCallback } from "../internals/hooks/index.js";
|
|
9
10
|
import { useCustom } from "../CustomProvider/index.js";
|
|
@@ -17,7 +18,7 @@ const Panel = forwardRef((props, ref) => {
|
|
|
17
18
|
propsWithDefaults
|
|
18
19
|
} = useCustom('Panel', props);
|
|
19
20
|
const {
|
|
20
|
-
as
|
|
21
|
+
as,
|
|
21
22
|
bodyFill,
|
|
22
23
|
bodyProps,
|
|
23
24
|
bordered,
|
|
@@ -72,11 +73,12 @@ const Panel = forwardRef((props, ref) => {
|
|
|
72
73
|
bordered,
|
|
73
74
|
shaded
|
|
74
75
|
}));
|
|
75
|
-
return /*#__PURE__*/React.createElement(
|
|
76
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
77
|
+
as: as,
|
|
76
78
|
ref: ref,
|
|
77
79
|
className: classes,
|
|
78
80
|
id: idProp
|
|
79
|
-
}), header && /*#__PURE__*/React.createElement(PanelHeader, {
|
|
81
|
+
}, rest), header && /*#__PURE__*/React.createElement(PanelHeader, {
|
|
80
82
|
collapsible: collapsible,
|
|
81
83
|
expanded: expanded,
|
|
82
84
|
caretAs: caretAs,
|
package/esm/Panel/PanelBody.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { WithAsProps, AnimationEventProps } from '../internals/types';
|
|
2
|
+
import type { WithAsProps, AnimationEventProps } from '../internals/types';
|
|
3
3
|
export interface PanelBodyProps extends WithAsProps, AnimationEventProps, React.HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
collapsible?: boolean;
|
|
5
5
|
expanded?: boolean;
|
package/esm/Panel/PanelBody.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import Collapse from "../Animation/Collapse.js";
|
|
5
|
-
import { useStyles } from "../internals/hooks/index.js";
|
|
6
5
|
import ScrollView from "../internals/ScrollView/index.js";
|
|
6
|
+
import { useStyles } from "../internals/hooks/index.js";
|
|
7
7
|
const PanelBody = props => {
|
|
8
8
|
const {
|
|
9
9
|
classPrefix = 'panel-body',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export interface PanelHeaderProps extends
|
|
2
|
+
import { BoxProps } from '../internals/Box';
|
|
3
|
+
export interface PanelHeaderProps extends BoxProps, React.HTMLAttributes<HTMLHeadingElement> {
|
|
4
4
|
caretAs?: React.ElementType;
|
|
5
5
|
collapsible?: boolean;
|
|
6
6
|
disabled?: boolean;
|
package/esm/Panel/PanelHeader.js
CHANGED
|
@@ -4,10 +4,11 @@ import React, { isValidElement, cloneElement } from 'react';
|
|
|
4
4
|
import get from 'lodash/get';
|
|
5
5
|
import Heading from "../Heading/index.js";
|
|
6
6
|
import AccordionButton from "./AccordionButton.js";
|
|
7
|
+
import Box from "../internals/Box/index.js";
|
|
7
8
|
import { useStyles } from "../internals/hooks/index.js";
|
|
8
9
|
const PanelHeader = props => {
|
|
9
10
|
const {
|
|
10
|
-
as
|
|
11
|
+
as = Heading,
|
|
11
12
|
classPrefix = 'panel',
|
|
12
13
|
className,
|
|
13
14
|
children,
|
|
@@ -36,7 +37,8 @@ const PanelHeader = props => {
|
|
|
36
37
|
className
|
|
37
38
|
});
|
|
38
39
|
}
|
|
39
|
-
return /*#__PURE__*/React.createElement(
|
|
40
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
41
|
+
as: as,
|
|
40
42
|
level: 2,
|
|
41
43
|
className: merge(className, prefix('header'))
|
|
42
44
|
}, rest), collapsible ? /*#__PURE__*/React.createElement(AccordionButton, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { BoxProps } from '../internals/Box';
|
|
3
3
|
type KeyType = string | number;
|
|
4
|
-
export interface PanelGroupProps<T = KeyType> extends
|
|
4
|
+
export interface PanelGroupProps<T = KeyType> extends BoxProps {
|
|
5
5
|
/** Whether it is a collapsible panel. */
|
|
6
6
|
accordion?: boolean;
|
|
7
7
|
/** Expand the Panel, corresponding to the 'Panel' of 'eventkey' */
|
|
@@ -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 } from "../internals/utils/index.js";
|
|
5
6
|
import { useStyles, useControlled, useEventCallback } from "../internals/hooks/index.js";
|
|
6
7
|
import { useCustom } from "../CustomProvider/index.js";
|
|
@@ -15,7 +16,7 @@ const PanelGroup = forwardRef((props, ref) => {
|
|
|
15
16
|
propsWithDefaults
|
|
16
17
|
} = useCustom('PanelGroup', props);
|
|
17
18
|
const {
|
|
18
|
-
as
|
|
19
|
+
as,
|
|
19
20
|
accordion,
|
|
20
21
|
defaultActiveKey,
|
|
21
22
|
bordered,
|
|
@@ -44,7 +45,9 @@ const PanelGroup = forwardRef((props, ref) => {
|
|
|
44
45
|
activeKey,
|
|
45
46
|
onGroupSelect: handleSelect
|
|
46
47
|
}), [accordion, activeKey, handleSelect]);
|
|
47
|
-
return /*#__PURE__*/React.createElement(
|
|
48
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
49
|
+
as: as
|
|
50
|
+
}, rest, {
|
|
48
51
|
ref: ref,
|
|
49
52
|
className: classes
|
|
50
53
|
}), /*#__PURE__*/React.createElement(PanelGroupContext.Provider, {
|
|
@@ -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 { useStyles } from "../internals/hooks/index.js";
|
|
5
6
|
import { useCustom } from "../CustomProvider/index.js";
|
|
6
7
|
import { forwardRef, getCssValue, mergeStyles } from "../internals/utils/index.js";
|
|
@@ -13,7 +14,7 @@ const PlaceholderGraph = forwardRef((props, ref) => {
|
|
|
13
14
|
propsWithDefaults
|
|
14
15
|
} = useCustom('PlaceholderGraph', props);
|
|
15
16
|
const {
|
|
16
|
-
as
|
|
17
|
+
as,
|
|
17
18
|
className,
|
|
18
19
|
classPrefix = 'placeholder',
|
|
19
20
|
width,
|
|
@@ -24,20 +25,19 @@ const PlaceholderGraph = forwardRef((props, ref) => {
|
|
|
24
25
|
} = propsWithDefaults;
|
|
25
26
|
const {
|
|
26
27
|
merge,
|
|
28
|
+
cssVar,
|
|
27
29
|
withPrefix
|
|
28
30
|
} = useStyles(classPrefix);
|
|
29
31
|
const classes = merge(className, withPrefix('graph', {
|
|
30
32
|
active
|
|
31
33
|
}));
|
|
32
|
-
const styles =
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
36
|
-
return /*#__PURE__*/React.createElement(Component, _extends({}, rest, {
|
|
34
|
+
const styles = mergeStyles(style, cssVar('graph-width', width, getCssValue), cssVar('graph-height', height, getCssValue));
|
|
35
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
36
|
+
as: as,
|
|
37
37
|
ref: ref,
|
|
38
38
|
className: classes,
|
|
39
|
-
style:
|
|
40
|
-
}));
|
|
39
|
+
style: styles
|
|
40
|
+
}, rest));
|
|
41
41
|
});
|
|
42
42
|
PlaceholderGraph.displayName = 'PlaceholderGraph';
|
|
43
43
|
export default PlaceholderGraph;
|
|
@@ -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 { useStyles } from "../internals/hooks/index.js";
|
|
5
6
|
import { useCustom } from "../CustomProvider/index.js";
|
|
6
7
|
import { forwardRef, getCssValue, mergeStyles } from "../internals/utils/index.js";
|
|
@@ -13,7 +14,7 @@ const PlaceholderGrid = forwardRef((props, ref) => {
|
|
|
13
14
|
propsWithDefaults
|
|
14
15
|
} = useCustom('PlaceholderGrid', props);
|
|
15
16
|
const {
|
|
16
|
-
as
|
|
17
|
+
as,
|
|
17
18
|
className,
|
|
18
19
|
classPrefix = 'placeholder',
|
|
19
20
|
rows = 5,
|
|
@@ -27,15 +28,13 @@ const PlaceholderGrid = forwardRef((props, ref) => {
|
|
|
27
28
|
const {
|
|
28
29
|
merge,
|
|
29
30
|
prefix,
|
|
31
|
+
cssVar,
|
|
30
32
|
withPrefix
|
|
31
33
|
} = useStyles(classPrefix);
|
|
32
34
|
const classes = merge(className, withPrefix('grid', {
|
|
33
35
|
active
|
|
34
36
|
}));
|
|
35
|
-
const styles =
|
|
36
|
-
'--rs-placeholder-row-height': getCssValue(rowHeight),
|
|
37
|
-
'--rs-placeholder-row-spacing': getCssValue(rowSpacing)
|
|
38
|
-
};
|
|
37
|
+
const styles = mergeStyles(style, cssVar('row-height', rowHeight, getCssValue), cssVar('row-spacing', rowSpacing, getCssValue));
|
|
39
38
|
const items = useMemo(() => {
|
|
40
39
|
const colItems = [];
|
|
41
40
|
const rowClassName = prefix`row`;
|
|
@@ -55,11 +54,12 @@ const PlaceholderGrid = forwardRef((props, ref) => {
|
|
|
55
54
|
}
|
|
56
55
|
return colItems;
|
|
57
56
|
}, [columns, prefix, rowHeight, rowSpacing, rows]);
|
|
58
|
-
return /*#__PURE__*/React.createElement(
|
|
57
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
58
|
+
as: as,
|
|
59
59
|
ref: ref,
|
|
60
60
|
className: classes,
|
|
61
|
-
style:
|
|
62
|
-
}), items);
|
|
61
|
+
style: styles
|
|
62
|
+
}, rest), items);
|
|
63
63
|
});
|
|
64
64
|
PlaceholderGrid.displayName = 'PlaceholderGrid';
|
|
65
65
|
export default PlaceholderGrid;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
export interface PlaceholderParagraphProps extends
|
|
1
|
+
import { BoxProps } from '../internals/Box';
|
|
2
|
+
export interface PlaceholderParagraphProps extends BoxProps {
|
|
3
3
|
/**
|
|
4
4
|
* The number of rows.
|
|
5
5
|
* @default 2
|
|
@@ -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 { useStyles } from "../internals/hooks/index.js";
|
|
5
6
|
import { useCustom } from "../CustomProvider/index.js";
|
|
6
7
|
import { forwardRef, mergeStyles, getCssValue } from "../internals/utils/index.js";
|
|
@@ -13,7 +14,7 @@ const PlaceholderParagraph = forwardRef((props, ref) => {
|
|
|
13
14
|
propsWithDefaults
|
|
14
15
|
} = useCustom('PlaceholderParagraph', props);
|
|
15
16
|
const {
|
|
16
|
-
as
|
|
17
|
+
as,
|
|
17
18
|
className,
|
|
18
19
|
classPrefix = 'placeholder',
|
|
19
20
|
rows = 3,
|
|
@@ -27,13 +28,11 @@ const PlaceholderParagraph = forwardRef((props, ref) => {
|
|
|
27
28
|
const {
|
|
28
29
|
merge,
|
|
29
30
|
prefix,
|
|
31
|
+
cssVar,
|
|
30
32
|
withPrefix
|
|
31
33
|
} = useStyles(classPrefix);
|
|
32
34
|
const graphShape = graph === true ? 'square' : graph;
|
|
33
|
-
const styles =
|
|
34
|
-
'--rs-placeholder-row-height': getCssValue(rowHeight),
|
|
35
|
-
'--rs-placeholder-row-spacing': getCssValue(rowSpacing)
|
|
36
|
-
};
|
|
35
|
+
const styles = mergeStyles(style, cssVar('row-height', rowHeight, getCssValue), cssVar('row-spacing', rowSpacing, getCssValue));
|
|
37
36
|
const rowElements = useMemo(() => {
|
|
38
37
|
const rowArr = [];
|
|
39
38
|
for (let i = 0; i < rows; i++) {
|
|
@@ -48,11 +47,12 @@ const PlaceholderParagraph = forwardRef((props, ref) => {
|
|
|
48
47
|
active
|
|
49
48
|
}));
|
|
50
49
|
const graphClasses = prefix('paragraph-graph', `paragraph-graph-${graphShape}`);
|
|
51
|
-
return /*#__PURE__*/React.createElement(
|
|
50
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
51
|
+
as: as,
|
|
52
52
|
ref: ref,
|
|
53
53
|
className: classes,
|
|
54
|
-
style:
|
|
55
|
-
}), graphShape && /*#__PURE__*/React.createElement("div", {
|
|
54
|
+
style: styles
|
|
55
|
+
}, rest), graphShape && /*#__PURE__*/React.createElement("div", {
|
|
56
56
|
className: graphClasses
|
|
57
57
|
}, /*#__PURE__*/React.createElement("span", {
|
|
58
58
|
className: prefix('paragraph-graph-inner')
|
package/esm/Popover/Popover.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
export interface PopoverProps extends
|
|
2
|
+
import { BoxProps } from '../internals/Box';
|
|
3
|
+
export interface PopoverProps extends BoxProps {
|
|
4
4
|
/** The title of the component. */
|
|
5
5
|
title?: React.ReactNode;
|
|
6
6
|
/** The component is visible by default. */
|
package/esm/Popover/Popover.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 Heading from "../Heading/index.js";
|
|
5
|
+
import Box from "../internals/Box/index.js";
|
|
5
6
|
import { forwardRef, mergeStyles } 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 Popover = forwardRef((props, ref) => {
|
|
|
14
15
|
propsWithDefaults
|
|
15
16
|
} = useCustom('Popover', props);
|
|
16
17
|
const {
|
|
17
|
-
as
|
|
18
|
+
as,
|
|
18
19
|
classPrefix = 'popover',
|
|
19
20
|
title,
|
|
20
21
|
children,
|
|
@@ -36,13 +37,13 @@ const Popover = forwardRef((props, ref) => {
|
|
|
36
37
|
const styles = useMemo(() => mergeStyles(style, {
|
|
37
38
|
['--rs-opacity']: visible ? 1 : undefined
|
|
38
39
|
}), [visible, style]);
|
|
39
|
-
return /*#__PURE__*/React.createElement(
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
41
|
+
as: as,
|
|
42
|
+
role: "dialog",
|
|
42
43
|
ref: ref,
|
|
43
44
|
className: classes,
|
|
44
45
|
style: styles
|
|
45
|
-
}), arrow && /*#__PURE__*/React.createElement("div", {
|
|
46
|
+
}, rest), arrow && /*#__PURE__*/React.createElement("div", {
|
|
46
47
|
className: prefix`arrow`,
|
|
47
48
|
"aria-hidden": true
|
|
48
49
|
}), title && /*#__PURE__*/React.createElement(Heading, {
|