rsuite 6.0.0-canary-2025031415 → 6.0.0-canary-20250319
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion/styles/index.css +2 -1
- package/AutoComplete/styles/index.css +2 -1
- package/Box/styles/index.css +53 -91
- package/ButtonToolbar/styles/index.css +4 -0
- package/ButtonToolbar/styles/index.less +5 -0
- package/CHANGELOG.md +9 -0
- package/Card/styles/index.css +2 -1
- package/Cascader/styles/index.css +2 -1
- package/CheckPicker/styles/index.css +2 -1
- package/CheckTree/styles/index.css +4 -3
- package/CheckTree/styles/index.less +1 -1
- package/CheckTreePicker/styles/index.css +4 -3
- package/DatePicker/styles/index.css +2 -1
- package/DateRangePicker/styles/index.css +2 -1
- package/Drawer/styles/index.css +2 -1
- package/Dropdown/styles/index.css +2 -1
- package/InlineEdit/styles/index.css +2 -1
- package/InputPicker/styles/index.css +2 -1
- package/List/styles/index.css +2 -1
- package/Modal/styles/index.css +2 -1
- package/MultiCascadeTree/styles/index.css +2 -1
- package/MultiCascader/styles/index.css +2 -1
- package/Nav/styles/index.css +3 -2
- package/Navbar/styles/index.css +2 -1
- package/Notification/styles/index.css +2 -1
- package/Pagination/styles/index.css +2 -1
- package/Panel/styles/index.css +2 -1
- package/Popover/styles/index.css +1 -1
- package/Popover/styles/index.less +2 -1
- package/RadioTile/styles/index.css +4 -0
- package/RadioTile/styles/index.less +4 -1
- package/SelectPicker/styles/index.css +2 -1
- package/Sidebar/styles/index.css +4 -0
- package/Sidebar/styles/index.less +8 -1
- package/Tabs/styles/index.css +3 -2
- package/TagInput/styles/index.css +2 -1
- package/TagPicker/styles/index.css +2 -1
- package/Text/styles/index.css +12 -31
- package/Text/styles/index.less +5 -7
- package/TimePicker/styles/index.css +2 -1
- package/TimeRangePicker/styles/index.css +2 -1
- package/Tree/styles/indent-line.less +1 -1
- package/Tree/styles/index.css +4 -3
- package/TreePicker/styles/index.css +4 -3
- package/cjs/Affix/Affix.d.ts +3 -2
- package/cjs/Affix/Affix.js +5 -2
- package/cjs/AutoComplete/AutoComplete.d.ts +3 -2
- package/cjs/AutoComplete/AutoComplete.js +4 -2
- package/cjs/Avatar/Avatar.d.ts +3 -2
- package/cjs/AvatarGroup/AvatarGroup.d.ts +3 -2
- package/cjs/AvatarGroup/AvatarGroup.js +4 -2
- package/cjs/Badge/Badge.d.ts +3 -2
- package/cjs/Badge/Badge.js +6 -3
- package/cjs/Breadcrumb/Breadcrumb.d.ts +2 -2
- package/cjs/Breadcrumb/BreadcrumbItem.d.ts +2 -2
- package/cjs/Breadcrumb/BreadcrumbItem.js +4 -2
- package/cjs/Button/Button.d.ts +3 -2
- package/cjs/Button/Button.js +8 -14
- package/cjs/ButtonGroup/ButtonGroup.d.ts +3 -2
- package/cjs/ButtonGroup/ButtonGroup.js +5 -2
- package/cjs/ButtonToolbar/ButtonToolbar.d.ts +1 -2
- package/cjs/ButtonToolbar/ButtonToolbar.js +4 -7
- package/cjs/Calendar/Calendar.d.ts +2 -2
- package/cjs/Calendar/Calendar.js +7 -6
- package/cjs/Card/Card.d.ts +5 -14
- package/cjs/Card/Card.js +4 -2
- package/cjs/Card/CardBody.d.ts +1 -4
- package/cjs/Card/CardBody.js +0 -0
- package/cjs/Card/CardFooter.d.ts +1 -4
- package/cjs/Card/CardFooter.js +0 -0
- package/cjs/Card/CardHeader.d.ts +1 -4
- package/cjs/Card/CardHeader.js +0 -0
- package/cjs/CardGroup/CardGroup.d.ts +2 -2
- package/cjs/CardGroup/CardGroup.js +4 -2
- package/cjs/Carousel/Carousel.d.ts +2 -2
- package/cjs/Carousel/Carousel.js +5 -2
- package/cjs/CascadeTree/CascadeTree.js +4 -2
- package/cjs/CascadeTree/types.d.ts +3 -2
- package/cjs/Cascader/Cascader.d.ts +1 -1
- package/cjs/Cascader/Cascader.js +4 -2
- package/cjs/CheckPicker/CheckPicker.js +4 -2
- package/cjs/CheckTree/CheckTreeView.js +4 -2
- package/cjs/CheckTreePicker/CheckTreePicker.js +4 -2
- package/cjs/Checkbox/Checkbox.d.ts +3 -2
- package/cjs/Checkbox/Checkbox.js +8 -3
- package/cjs/CheckboxGroup/CheckboxGroup.d.ts +3 -2
- package/cjs/CheckboxGroup/CheckboxGroup.js +5 -2
- package/cjs/Container/Container.d.ts +2 -2
- package/cjs/Container/Container.js +5 -2
- package/cjs/Content/Content.d.ts +1 -4
- package/cjs/Content/Content.js +0 -0
- package/cjs/DatePicker/DatePicker.js +4 -2
- package/cjs/DateRangePicker/DateRangePicker.js +4 -2
- package/cjs/Divider/Divider.d.ts +3 -2
- package/cjs/Drawer/Drawer.d.ts +2 -4
- package/cjs/Drawer/DrawerActions.d.ts +1 -3
- package/cjs/Drawer/DrawerActions.js +0 -0
- package/cjs/Drawer/DrawerBody.d.ts +1 -1
- package/cjs/Dropdown/DropdownItem.d.ts +3 -2
- package/cjs/Dropdown/DropdownItem.js +2 -2
- package/cjs/Footer/Footer.d.ts +1 -4
- package/cjs/Footer/Footer.js +0 -0
- package/cjs/Grid/Col.d.ts +3 -2
- package/cjs/Grid/Col.js +5 -2
- package/cjs/Grid/Grid.d.ts +2 -2
- package/cjs/Grid/Grid.js +5 -2
- package/cjs/Grid/Row.d.ts +3 -2
- package/cjs/Grid/Row.js +8 -4
- package/cjs/Header/Header.d.ts +1 -4
- package/cjs/Header/Header.js +0 -0
- package/cjs/Heading/Heading.d.ts +2 -2
- package/cjs/Heading/Heading.js +4 -2
- package/cjs/HeadingGroup/HeadingGroup.d.ts +1 -4
- package/cjs/HeadingGroup/HeadingGroup.js +0 -0
- package/cjs/Highlight/Highlight.d.ts +2 -2
- package/cjs/Highlight/Highlight.js +4 -2
- package/cjs/Image/Image.d.ts +2 -2
- package/cjs/Image/Image.js +8 -8
- package/cjs/Image/ImageWrapper.d.ts +3 -4
- package/cjs/Image/ImageWrapper.js +0 -0
- package/cjs/InlineEdit/InlineEdit.d.ts +2 -2
- package/cjs/InlineEdit/InlineEdit.js +4 -2
- package/cjs/Input/Input.d.ts +3 -2
- package/cjs/Input/Input.js +5 -2
- package/cjs/InputGroup/InputGroup.d.ts +3 -2
- package/cjs/InputGroup/InputGroup.js +5 -2
- package/cjs/InputGroup/InputGroupAddon.d.ts +2 -2
- package/cjs/InputGroup/InputGroupAddon.js +5 -2
- package/cjs/InputNumber/InputNumber.d.ts +3 -2
- package/cjs/InputNumber/InputNumber.js +5 -2
- package/cjs/InputPicker/InputPicker.d.ts +2 -2
- package/cjs/InputPicker/InputPicker.js +14 -5
- package/cjs/Kbd/Kbd.d.ts +3 -2
- package/cjs/Kbd/Kbd.js +5 -2
- package/cjs/List/List.d.ts +2 -2
- package/cjs/List/List.js +6 -5
- package/cjs/List/ListItem.d.ts +2 -2
- package/cjs/List/ListItem.js +6 -5
- package/cjs/Loader/Loader.d.ts +3 -2
- package/cjs/Loader/Loader.js +6 -5
- package/cjs/Menu/Menu.d.ts +3 -2
- package/cjs/Menu/Menu.js +5 -1
- package/cjs/Menu/MenuItem.d.ts +3 -2
- package/cjs/Menu/MenuItem.js +2 -2
- package/cjs/Menu/MenuSeparator.d.ts +2 -2
- package/cjs/Menu/MenuSeparator.js +6 -4
- package/cjs/Message/Message.d.ts +3 -2
- package/cjs/Message/Message.js +4 -2
- package/cjs/Modal/Modal.d.ts +2 -4
- package/cjs/Modal/ModalBody.d.ts +3 -3
- package/cjs/Modal/ModalBody.js +5 -2
- package/cjs/Modal/ModalDialog.d.ts +3 -2
- package/cjs/Modal/ModalDialog.js +4 -2
- package/cjs/Modal/ModalFooter.d.ts +1 -3
- package/cjs/Modal/ModalHeader.d.ts +2 -2
- package/cjs/Modal/ModalHeader.js +5 -2
- package/cjs/Modal/ModalTitle.js +4 -2
- package/cjs/MultiCascadeTree/MultiCascadeTree.js +4 -2
- package/cjs/MultiCascadeTree/types.d.ts +2 -2
- package/cjs/MultiCascader/MultiCascader.js +4 -2
- package/cjs/Nav/Nav.d.ts +3 -2
- package/cjs/Nav/Nav.js +7 -3
- package/cjs/Nav/NavDropdown.d.ts +4 -3
- package/cjs/Nav/NavDropdown.js +4 -2
- package/cjs/Nav/NavDropdownItem.d.ts +3 -2
- package/cjs/Nav/NavDropdownItem.js +4 -4
- package/cjs/Nav/NavDropdownToggle.d.ts +4 -3
- package/cjs/Nav/NavDropdownToggle.js +5 -2
- package/cjs/Nav/NavItem.d.ts +3 -2
- package/cjs/Nav/NavItem.js +4 -2
- package/cjs/Navbar/Navbar.d.ts +4 -8
- package/cjs/Navbar/Navbar.js +5 -2
- package/cjs/Navbar/NavbarBrand.d.ts +1 -5
- package/cjs/Navbar/NavbarBrand.js +0 -0
- package/cjs/Navbar/NavbarContent.d.ts +1 -1
- package/cjs/Navbar/NavbarDropdown.d.ts +2 -1
- package/cjs/Navbar/NavbarDropdown.js +4 -2
- package/cjs/Navbar/NavbarDropdownItem.d.ts +4 -3
- package/cjs/Navbar/NavbarDropdownItem.js +7 -7
- package/cjs/Navbar/NavbarDropdownToggle.d.ts +4 -3
- package/cjs/Navbar/NavbarDropdownToggle.js +5 -2
- package/cjs/Navbar/NavbarItem.d.ts +3 -2
- package/cjs/Navbar/NavbarItem.js +5 -3
- package/cjs/Navbar/NavbarMegaMenu.js +7 -5
- package/cjs/Notification/Notification.d.ts +3 -2
- package/cjs/Notification/Notification.js +4 -2
- package/cjs/Pagination/Pagination.d.ts +3 -2
- package/cjs/Pagination/Pagination.js +5 -3
- package/cjs/Pagination/PaginationGroup.js +4 -2
- package/cjs/Panel/Panel.d.ts +3 -2
- package/cjs/Panel/Panel.js +5 -3
- package/cjs/Panel/PanelBody.d.ts +1 -1
- package/cjs/Panel/PanelBody.js +1 -1
- package/cjs/Panel/PanelHeader.d.ts +2 -2
- package/cjs/Panel/PanelHeader.js +4 -2
- package/cjs/PanelGroup/PanelGroup.d.ts +2 -2
- package/cjs/PanelGroup/PanelGroup.js +5 -2
- package/cjs/Placeholder/PlaceholderGraph.d.ts +2 -2
- package/cjs/Placeholder/PlaceholderGraph.js +8 -8
- package/cjs/Placeholder/PlaceholderGrid.d.ts +2 -2
- package/cjs/Placeholder/PlaceholderGrid.js +8 -8
- package/cjs/Placeholder/PlaceholderParagraph.d.ts +2 -2
- package/cjs/Placeholder/PlaceholderParagraph.js +8 -8
- package/cjs/Popover/Popover.d.ts +2 -2
- package/cjs/Popover/Popover.js +6 -5
- package/cjs/Progress/ProgressCircle.d.ts +2 -2
- package/cjs/Progress/ProgressCircle.js +4 -2
- package/cjs/Progress/ProgressLine.d.ts +2 -2
- package/cjs/Progress/ProgressLine.js +4 -2
- package/cjs/Radio/Radio.d.ts +3 -2
- package/cjs/Radio/Radio.js +8 -5
- package/cjs/RadioGroup/RadioGroup.d.ts +3 -2
- package/cjs/RadioGroup/RadioGroup.js +4 -2
- package/cjs/RadioTile/RadioTile.d.ts +4 -5
- package/cjs/RadioTile/RadioTile.js +6 -8
- package/cjs/RadioTileGroup/RadioTileGroup.d.ts +3 -2
- package/cjs/RadioTileGroup/RadioTileGroup.js +6 -5
- package/cjs/RangeSlider/RangeSlider.js +5 -3
- package/cjs/Rate/Character.d.ts +2 -2
- package/cjs/Rate/Character.js +5 -3
- package/cjs/Rate/Rate.d.ts +3 -2
- package/cjs/Rate/Rate.js +4 -2
- package/cjs/SafeAnchor/SafeAnchor.d.ts +2 -2
- package/cjs/SafeAnchor/SafeAnchor.js +4 -2
- package/cjs/SelectPicker/SelectPicker.js +4 -2
- package/cjs/Sidebar/Sidebar.d.ts +2 -2
- package/cjs/Sidebar/Sidebar.js +7 -10
- package/cjs/Sidenav/ExpandedSidenavDropdown.d.ts +4 -3
- package/cjs/Sidenav/ExpandedSidenavDropdown.js +6 -6
- package/cjs/Sidenav/ExpandedSidenavDropdownItem.d.ts +3 -2
- package/cjs/Sidenav/ExpandedSidenavDropdownItem.js +2 -2
- package/cjs/Sidenav/ExpandedSidenavDropdownMenu.d.ts +3 -2
- package/cjs/Sidenav/ExpandedSidenavDropdownMenu.js +6 -5
- package/cjs/Sidenav/Sidenav.d.ts +6 -14
- package/cjs/Sidenav/Sidenav.js +5 -2
- package/cjs/Sidenav/SidenavBody.d.ts +1 -3
- package/cjs/Sidenav/SidenavBody.js +0 -0
- package/cjs/Sidenav/SidenavDropdown.d.ts +4 -7
- package/cjs/Sidenav/SidenavDropdown.js +7 -5
- package/cjs/Sidenav/SidenavDropdownCollapse.d.ts +2 -2
- package/cjs/Sidenav/SidenavDropdownCollapse.js +4 -1
- package/cjs/Sidenav/SidenavDropdownItem.d.ts +3 -2
- package/cjs/Sidenav/SidenavDropdownItem.js +7 -7
- package/cjs/Sidenav/SidenavFooter.d.ts +1 -3
- package/cjs/Sidenav/SidenavGroupLabel.d.ts +1 -3
- package/cjs/Sidenav/SidenavHeader.d.ts +1 -3
- package/cjs/Sidenav/SidenavHeader.js +0 -0
- package/cjs/Sidenav/SidenavItem.d.ts +3 -2
- package/cjs/Sidenav/SidenavItem.js +7 -4
- package/cjs/Sidenav/SidenavToggle.d.ts +2 -2
- package/cjs/Sidenav/SidenavToggle.js +6 -4
- package/cjs/Slider/Graduated.d.ts +2 -2
- package/cjs/Slider/Graduated.js +8 -4
- package/cjs/Slider/Handle.d.ts +2 -2
- package/cjs/Slider/Handle.js +4 -2
- package/cjs/Slider/Mark.d.ts +2 -2
- package/cjs/Slider/Mark.js +4 -2
- package/cjs/Slider/ProgressBar.d.ts +2 -2
- package/cjs/Slider/ProgressBar.js +8 -4
- package/cjs/Slider/Slider.d.ts +3 -2
- package/cjs/Slider/Slider.js +7 -5
- package/cjs/Stack/Stack.js +0 -1
- package/cjs/Stack/StackItem.d.ts +2 -2
- package/cjs/Stack/StackItem.js +4 -2
- package/cjs/Stat/Stat.d.ts +4 -10
- package/cjs/Stat/Stat.js +4 -2
- package/cjs/Stat/StatHelpText.d.ts +1 -4
- package/cjs/Stat/StatHelpText.js +0 -0
- package/cjs/Stat/StatLabel.d.ts +2 -2
- package/cjs/Stat/StatLabel.js +4 -2
- package/cjs/Stat/StatTrend.d.ts +2 -2
- package/cjs/Stat/StatTrend.js +4 -2
- package/cjs/Stat/StatValue.d.ts +2 -2
- package/cjs/Stat/StatValue.js +4 -2
- package/cjs/Stat/StatValueUnit.d.ts +1 -4
- package/cjs/Stat/StatValueUnit.js +0 -0
- package/cjs/StatGroup/StatGroup.d.ts +2 -2
- package/cjs/StatGroup/StatGroup.js +4 -2
- package/cjs/Steps/Steps.d.ts +2 -2
- package/cjs/Steps/Steps.js +5 -3
- package/cjs/Tabs/TabPanel.d.ts +2 -2
- package/cjs/Tabs/TabPanel.js +4 -2
- package/cjs/Tabs/Tabs.d.ts +2 -2
- package/cjs/Tabs/Tabs.js +4 -2
- package/cjs/Tag/Tag.d.ts +3 -2
- package/cjs/Tag/Tag.js +4 -2
- package/cjs/TagGroup/TagGroup.d.ts +1 -3
- package/cjs/TagGroup/TagGroup.js +0 -0
- package/cjs/Text/Text.d.ts +4 -4
- package/cjs/Text/Text.js +10 -21
- package/cjs/Timeline/Timeline.d.ts +2 -2
- package/cjs/Timeline/Timeline.js +5 -3
- package/cjs/Timeline/TimelineItem.d.ts +2 -2
- package/cjs/Timeline/TimelineItem.js +5 -3
- package/cjs/Toggle/Toggle.d.ts +3 -2
- package/cjs/Toggle/Toggle.js +5 -3
- package/cjs/Tooltip/Tooltip.d.ts +3 -2
- package/cjs/Tooltip/Tooltip.js +4 -2
- package/cjs/Tree/Tree.d.ts +1 -1
- package/cjs/Tree/TreeNode.d.ts +2 -2
- package/cjs/Tree/TreeNode.js +6 -4
- package/cjs/Tree/TreeView.js +4 -2
- package/cjs/Tree/types.d.ts +2 -2
- package/cjs/TreePicker/TreePicker.d.ts +1 -1
- package/cjs/TreePicker/TreePicker.js +4 -2
- package/cjs/Uploader/UploadFileItem.d.ts +2 -2
- package/cjs/Uploader/UploadFileItem.js +11 -4
- package/cjs/Uploader/UploadTrigger.d.ts +3 -1
- package/cjs/Uploader/UploadTrigger.js +18 -11
- package/cjs/Uploader/Uploader.d.ts +3 -3
- package/cjs/Uploader/Uploader.js +4 -2
- package/cjs/VisuallyHidden/VisuallyHidden.d.ts +1 -4
- package/cjs/VisuallyHidden/VisuallyHidden.js +0 -0
- package/cjs/internals/Box/Box.d.ts +13 -9
- package/cjs/internals/Box/Box.js +17 -17
- package/cjs/internals/Box/utils.js +5 -5
- package/cjs/internals/Menu/useRenderMenuItem.d.ts +1 -1
- package/cjs/internals/Menu/useRenderMenuItem.js +17 -8
- package/cjs/internals/Overlay/Modal.d.ts +3 -2
- package/cjs/internals/Overlay/Modal.js +5 -2
- package/cjs/internals/Picker/PickerToggle.d.ts +1 -1
- package/cjs/internals/Picker/ToggleButton.d.ts +2 -2
- package/cjs/internals/Picker/ToggleButton.js +0 -0
- package/cjs/internals/Picker/hooks/useCombobox.d.ts +1 -1
- package/cjs/internals/Plaintext/Plaintext.d.ts +2 -2
- package/cjs/internals/Plaintext/Plaintext.js +4 -2
- package/cjs/internals/Tree/TreeView.d.ts +2 -2
- package/cjs/internals/Tree/TreeView.js +4 -2
- package/cjs/internals/types/picker.d.ts +2 -2
- package/cjs/internals/utils/colours.d.ts +1 -1
- package/cjs/internals/utils/createComponent.d.ts +4 -3
- package/cjs/internals/utils/createComponent.js +8 -5
- package/cjs/internals/utils/sizes.d.ts +4 -1
- package/cjs/internals/utils/sizes.js +9 -3
- package/cjs/internals/utils/style-sheet/css.d.ts +1 -1
- package/cjs/internals/utils/style-sheet/css.js +4 -1
- package/cjs/internals/utils/style-sheet/styles.d.ts +2 -2
- package/cjs/internals/utils/style-sheet/styles.js +6 -6
- package/dist/rsuite-no-reset-rtl.css +89 -122
- package/dist/rsuite-no-reset-rtl.min.css +1 -1
- package/dist/rsuite-no-reset-rtl.min.css.map +1 -1
- package/dist/rsuite-no-reset.css +89 -122
- package/dist/rsuite-no-reset.min.css +1 -1
- package/dist/rsuite-no-reset.min.css.map +1 -1
- package/dist/rsuite-rtl.css +89 -122
- package/dist/rsuite-rtl.min.css +1 -1
- package/dist/rsuite-rtl.min.css.map +1 -1
- package/dist/rsuite.css +89 -122
- package/dist/rsuite.js +132 -132
- package/dist/rsuite.min.css +1 -1
- package/dist/rsuite.min.css.map +1 -1
- package/dist/rsuite.min.js +1 -1
- package/dist/rsuite.min.js.map +1 -1
- package/esm/Affix/Affix.d.ts +3 -2
- package/esm/Affix/Affix.js +5 -2
- package/esm/AutoComplete/AutoComplete.d.ts +3 -2
- package/esm/AutoComplete/AutoComplete.js +4 -2
- package/esm/Avatar/Avatar.d.ts +3 -2
- package/esm/AvatarGroup/AvatarGroup.d.ts +3 -2
- package/esm/AvatarGroup/AvatarGroup.js +4 -2
- package/esm/Badge/Badge.d.ts +3 -2
- package/esm/Badge/Badge.js +6 -3
- package/esm/Breadcrumb/Breadcrumb.d.ts +2 -2
- package/esm/Breadcrumb/BreadcrumbItem.d.ts +2 -2
- package/esm/Breadcrumb/BreadcrumbItem.js +4 -2
- package/esm/Button/Button.d.ts +3 -2
- package/esm/Button/Button.js +8 -14
- package/esm/ButtonGroup/ButtonGroup.d.ts +3 -2
- package/esm/ButtonGroup/ButtonGroup.js +5 -2
- package/esm/ButtonToolbar/ButtonToolbar.d.ts +1 -2
- package/esm/ButtonToolbar/ButtonToolbar.js +4 -7
- package/esm/Calendar/Calendar.d.ts +2 -2
- package/esm/Calendar/Calendar.js +7 -6
- package/esm/Card/Card.d.ts +5 -14
- package/esm/Card/Card.js +4 -2
- package/esm/Card/CardBody.d.ts +1 -4
- package/esm/Card/CardBody.js +0 -0
- package/esm/Card/CardFooter.d.ts +1 -4
- package/esm/Card/CardFooter.js +0 -0
- package/esm/Card/CardHeader.d.ts +1 -4
- package/esm/Card/CardHeader.js +0 -0
- package/esm/CardGroup/CardGroup.d.ts +2 -2
- package/esm/CardGroup/CardGroup.js +4 -2
- package/esm/Carousel/Carousel.d.ts +2 -2
- package/esm/Carousel/Carousel.js +5 -2
- package/esm/CascadeTree/CascadeTree.js +4 -2
- package/esm/CascadeTree/types.d.ts +3 -2
- package/esm/Cascader/Cascader.d.ts +1 -1
- package/esm/Cascader/Cascader.js +4 -2
- package/esm/CheckPicker/CheckPicker.js +4 -2
- package/esm/CheckTree/CheckTreeView.js +4 -2
- package/esm/CheckTreePicker/CheckTreePicker.js +4 -2
- package/esm/Checkbox/Checkbox.d.ts +3 -2
- package/esm/Checkbox/Checkbox.js +8 -3
- package/esm/CheckboxGroup/CheckboxGroup.d.ts +3 -2
- package/esm/CheckboxGroup/CheckboxGroup.js +5 -2
- package/esm/Container/Container.d.ts +2 -2
- package/esm/Container/Container.js +5 -2
- package/esm/Content/Content.d.ts +1 -4
- package/esm/Content/Content.js +0 -0
- package/esm/DatePicker/DatePicker.js +4 -2
- package/esm/DateRangePicker/DateRangePicker.js +4 -2
- package/esm/Divider/Divider.d.ts +3 -2
- package/esm/Drawer/Drawer.d.ts +2 -4
- package/esm/Drawer/DrawerActions.d.ts +1 -3
- package/esm/Drawer/DrawerActions.js +0 -0
- package/esm/Drawer/DrawerBody.d.ts +1 -1
- package/esm/Dropdown/DropdownItem.d.ts +3 -2
- package/esm/Dropdown/DropdownItem.js +2 -2
- package/esm/Footer/Footer.d.ts +1 -4
- package/esm/Footer/Footer.js +0 -0
- package/esm/Grid/Col.d.ts +3 -2
- package/esm/Grid/Col.js +5 -2
- package/esm/Grid/Grid.d.ts +2 -2
- package/esm/Grid/Grid.js +5 -2
- package/esm/Grid/Row.d.ts +3 -2
- package/esm/Grid/Row.js +8 -4
- package/esm/Header/Header.d.ts +1 -4
- package/esm/Header/Header.js +0 -0
- package/esm/Heading/Heading.d.ts +2 -2
- package/esm/Heading/Heading.js +4 -2
- package/esm/HeadingGroup/HeadingGroup.d.ts +1 -4
- package/esm/HeadingGroup/HeadingGroup.js +0 -0
- package/esm/Highlight/Highlight.d.ts +2 -2
- package/esm/Highlight/Highlight.js +4 -2
- package/esm/Image/Image.d.ts +2 -2
- package/esm/Image/Image.js +8 -8
- package/esm/Image/ImageWrapper.d.ts +3 -4
- package/esm/Image/ImageWrapper.js +0 -0
- package/esm/InlineEdit/InlineEdit.d.ts +2 -2
- package/esm/InlineEdit/InlineEdit.js +4 -2
- package/esm/Input/Input.d.ts +3 -2
- package/esm/Input/Input.js +5 -2
- package/esm/InputGroup/InputGroup.d.ts +3 -2
- package/esm/InputGroup/InputGroup.js +5 -2
- package/esm/InputGroup/InputGroupAddon.d.ts +2 -2
- package/esm/InputGroup/InputGroupAddon.js +5 -2
- package/esm/InputNumber/InputNumber.d.ts +3 -2
- package/esm/InputNumber/InputNumber.js +5 -2
- package/esm/InputPicker/InputPicker.d.ts +2 -2
- package/esm/InputPicker/InputPicker.js +14 -5
- package/esm/Kbd/Kbd.d.ts +3 -2
- package/esm/Kbd/Kbd.js +5 -2
- package/esm/List/List.d.ts +2 -2
- package/esm/List/List.js +6 -5
- package/esm/List/ListItem.d.ts +2 -2
- package/esm/List/ListItem.js +6 -5
- package/esm/Loader/Loader.d.ts +3 -2
- package/esm/Loader/Loader.js +6 -5
- package/esm/Menu/Menu.d.ts +3 -2
- package/esm/Menu/Menu.js +5 -1
- package/esm/Menu/MenuItem.d.ts +3 -2
- package/esm/Menu/MenuItem.js +2 -2
- package/esm/Menu/MenuSeparator.d.ts +2 -2
- package/esm/Menu/MenuSeparator.js +6 -4
- package/esm/Message/Message.d.ts +3 -2
- package/esm/Message/Message.js +4 -2
- package/esm/Modal/Modal.d.ts +2 -4
- package/esm/Modal/ModalBody.d.ts +3 -3
- package/esm/Modal/ModalBody.js +5 -2
- package/esm/Modal/ModalDialog.d.ts +3 -2
- package/esm/Modal/ModalDialog.js +4 -2
- package/esm/Modal/ModalFooter.d.ts +1 -3
- package/esm/Modal/ModalHeader.d.ts +2 -2
- package/esm/Modal/ModalHeader.js +5 -2
- package/esm/Modal/ModalTitle.js +4 -2
- package/esm/MultiCascadeTree/MultiCascadeTree.js +4 -2
- package/esm/MultiCascadeTree/types.d.ts +2 -2
- package/esm/MultiCascader/MultiCascader.js +4 -2
- package/esm/Nav/Nav.d.ts +3 -2
- package/esm/Nav/Nav.js +7 -3
- package/esm/Nav/NavDropdown.d.ts +4 -3
- package/esm/Nav/NavDropdown.js +4 -2
- package/esm/Nav/NavDropdownItem.d.ts +3 -2
- package/esm/Nav/NavDropdownItem.js +4 -4
- package/esm/Nav/NavDropdownToggle.d.ts +4 -3
- package/esm/Nav/NavDropdownToggle.js +5 -2
- package/esm/Nav/NavItem.d.ts +3 -2
- package/esm/Nav/NavItem.js +4 -2
- package/esm/Navbar/Navbar.d.ts +4 -8
- package/esm/Navbar/Navbar.js +5 -2
- package/esm/Navbar/NavbarBrand.d.ts +1 -5
- package/esm/Navbar/NavbarBrand.js +0 -0
- package/esm/Navbar/NavbarContent.d.ts +1 -1
- package/esm/Navbar/NavbarDropdown.d.ts +2 -1
- package/esm/Navbar/NavbarDropdown.js +4 -2
- package/esm/Navbar/NavbarDropdownItem.d.ts +4 -3
- package/esm/Navbar/NavbarDropdownItem.js +7 -7
- package/esm/Navbar/NavbarDropdownToggle.d.ts +4 -3
- package/esm/Navbar/NavbarDropdownToggle.js +5 -2
- package/esm/Navbar/NavbarItem.d.ts +3 -2
- package/esm/Navbar/NavbarItem.js +5 -3
- package/esm/Navbar/NavbarMegaMenu.js +7 -5
- package/esm/Notification/Notification.d.ts +3 -2
- package/esm/Notification/Notification.js +4 -2
- package/esm/Pagination/Pagination.d.ts +3 -2
- package/esm/Pagination/Pagination.js +5 -3
- package/esm/Pagination/PaginationGroup.js +4 -2
- package/esm/Panel/Panel.d.ts +3 -2
- package/esm/Panel/Panel.js +5 -3
- package/esm/Panel/PanelBody.d.ts +1 -1
- package/esm/Panel/PanelBody.js +1 -1
- package/esm/Panel/PanelHeader.d.ts +2 -2
- package/esm/Panel/PanelHeader.js +4 -2
- package/esm/PanelGroup/PanelGroup.d.ts +2 -2
- package/esm/PanelGroup/PanelGroup.js +5 -2
- package/esm/Placeholder/PlaceholderGraph.d.ts +2 -2
- package/esm/Placeholder/PlaceholderGraph.js +8 -8
- package/esm/Placeholder/PlaceholderGrid.d.ts +2 -2
- package/esm/Placeholder/PlaceholderGrid.js +8 -8
- package/esm/Placeholder/PlaceholderParagraph.d.ts +2 -2
- package/esm/Placeholder/PlaceholderParagraph.js +8 -8
- package/esm/Popover/Popover.d.ts +2 -2
- package/esm/Popover/Popover.js +6 -5
- package/esm/Progress/ProgressCircle.d.ts +2 -2
- package/esm/Progress/ProgressCircle.js +4 -2
- package/esm/Progress/ProgressLine.d.ts +2 -2
- package/esm/Progress/ProgressLine.js +4 -2
- package/esm/Radio/Radio.d.ts +3 -2
- package/esm/Radio/Radio.js +8 -5
- package/esm/RadioGroup/RadioGroup.d.ts +3 -2
- package/esm/RadioGroup/RadioGroup.js +4 -2
- package/esm/RadioTile/RadioTile.d.ts +4 -5
- package/esm/RadioTile/RadioTile.js +6 -8
- package/esm/RadioTileGroup/RadioTileGroup.d.ts +3 -2
- package/esm/RadioTileGroup/RadioTileGroup.js +6 -5
- package/esm/RangeSlider/RangeSlider.js +5 -3
- package/esm/Rate/Character.d.ts +2 -2
- package/esm/Rate/Character.js +5 -3
- package/esm/Rate/Rate.d.ts +3 -2
- package/esm/Rate/Rate.js +4 -2
- package/esm/SafeAnchor/SafeAnchor.d.ts +2 -2
- package/esm/SafeAnchor/SafeAnchor.js +4 -2
- package/esm/SelectPicker/SelectPicker.js +4 -2
- package/esm/Sidebar/Sidebar.d.ts +2 -2
- package/esm/Sidebar/Sidebar.js +8 -11
- package/esm/Sidenav/ExpandedSidenavDropdown.d.ts +4 -3
- package/esm/Sidenav/ExpandedSidenavDropdown.js +6 -6
- package/esm/Sidenav/ExpandedSidenavDropdownItem.d.ts +3 -2
- package/esm/Sidenav/ExpandedSidenavDropdownItem.js +2 -2
- package/esm/Sidenav/ExpandedSidenavDropdownMenu.d.ts +3 -2
- package/esm/Sidenav/ExpandedSidenavDropdownMenu.js +6 -5
- package/esm/Sidenav/Sidenav.d.ts +6 -14
- package/esm/Sidenav/Sidenav.js +5 -2
- package/esm/Sidenav/SidenavBody.d.ts +1 -3
- package/esm/Sidenav/SidenavBody.js +0 -0
- package/esm/Sidenav/SidenavDropdown.d.ts +4 -7
- package/esm/Sidenav/SidenavDropdown.js +7 -5
- package/esm/Sidenav/SidenavDropdownCollapse.d.ts +2 -2
- package/esm/Sidenav/SidenavDropdownCollapse.js +4 -1
- package/esm/Sidenav/SidenavDropdownItem.d.ts +3 -2
- package/esm/Sidenav/SidenavDropdownItem.js +7 -7
- package/esm/Sidenav/SidenavFooter.d.ts +1 -3
- package/esm/Sidenav/SidenavGroupLabel.d.ts +1 -3
- package/esm/Sidenav/SidenavHeader.d.ts +1 -3
- package/esm/Sidenav/SidenavHeader.js +0 -0
- package/esm/Sidenav/SidenavItem.d.ts +3 -2
- package/esm/Sidenav/SidenavItem.js +7 -4
- package/esm/Sidenav/SidenavToggle.d.ts +2 -2
- package/esm/Sidenav/SidenavToggle.js +7 -5
- package/esm/Slider/Graduated.d.ts +2 -2
- package/esm/Slider/Graduated.js +8 -4
- package/esm/Slider/Handle.d.ts +2 -2
- package/esm/Slider/Handle.js +4 -2
- package/esm/Slider/Mark.d.ts +2 -2
- package/esm/Slider/Mark.js +4 -2
- package/esm/Slider/ProgressBar.d.ts +2 -2
- package/esm/Slider/ProgressBar.js +8 -4
- package/esm/Slider/Slider.d.ts +3 -2
- package/esm/Slider/Slider.js +7 -5
- package/esm/Stack/Stack.js +0 -1
- package/esm/Stack/StackItem.d.ts +2 -2
- package/esm/Stack/StackItem.js +4 -2
- package/esm/Stat/Stat.d.ts +4 -10
- package/esm/Stat/Stat.js +4 -2
- package/esm/Stat/StatHelpText.d.ts +1 -4
- package/esm/Stat/StatHelpText.js +0 -0
- package/esm/Stat/StatLabel.d.ts +2 -2
- package/esm/Stat/StatLabel.js +4 -2
- package/esm/Stat/StatTrend.d.ts +2 -2
- package/esm/Stat/StatTrend.js +4 -2
- package/esm/Stat/StatValue.d.ts +2 -2
- package/esm/Stat/StatValue.js +4 -2
- package/esm/Stat/StatValueUnit.d.ts +1 -4
- package/esm/Stat/StatValueUnit.js +0 -0
- package/esm/StatGroup/StatGroup.d.ts +2 -2
- package/esm/StatGroup/StatGroup.js +4 -2
- package/esm/Steps/Steps.d.ts +2 -2
- package/esm/Steps/Steps.js +5 -3
- package/esm/Tabs/TabPanel.d.ts +2 -2
- package/esm/Tabs/TabPanel.js +4 -2
- package/esm/Tabs/Tabs.d.ts +2 -2
- package/esm/Tabs/Tabs.js +4 -2
- package/esm/Tag/Tag.d.ts +3 -2
- package/esm/Tag/Tag.js +4 -2
- package/esm/TagGroup/TagGroup.d.ts +1 -3
- package/esm/TagGroup/TagGroup.js +0 -0
- package/esm/Text/Text.d.ts +4 -4
- package/esm/Text/Text.js +11 -20
- package/esm/Timeline/Timeline.d.ts +2 -2
- package/esm/Timeline/Timeline.js +5 -3
- package/esm/Timeline/TimelineItem.d.ts +2 -2
- package/esm/Timeline/TimelineItem.js +5 -3
- package/esm/Toggle/Toggle.d.ts +3 -2
- package/esm/Toggle/Toggle.js +5 -3
- package/esm/Tooltip/Tooltip.d.ts +3 -2
- package/esm/Tooltip/Tooltip.js +4 -2
- package/esm/Tree/Tree.d.ts +1 -1
- package/esm/Tree/TreeNode.d.ts +2 -2
- package/esm/Tree/TreeNode.js +6 -4
- package/esm/Tree/TreeView.js +4 -2
- package/esm/Tree/types.d.ts +2 -2
- package/esm/TreePicker/TreePicker.d.ts +1 -1
- package/esm/TreePicker/TreePicker.js +4 -2
- package/esm/Uploader/UploadFileItem.d.ts +2 -2
- package/esm/Uploader/UploadFileItem.js +11 -4
- package/esm/Uploader/UploadTrigger.d.ts +3 -1
- package/esm/Uploader/UploadTrigger.js +18 -11
- package/esm/Uploader/Uploader.d.ts +3 -3
- package/esm/Uploader/Uploader.js +4 -2
- package/esm/VisuallyHidden/VisuallyHidden.d.ts +1 -4
- package/esm/VisuallyHidden/VisuallyHidden.js +0 -0
- package/esm/internals/Box/Box.d.ts +13 -9
- package/esm/internals/Box/Box.js +17 -17
- package/esm/internals/Box/utils.js +5 -5
- package/esm/internals/Menu/useRenderMenuItem.d.ts +1 -1
- package/esm/internals/Menu/useRenderMenuItem.js +16 -8
- package/esm/internals/Overlay/Modal.d.ts +3 -2
- package/esm/internals/Overlay/Modal.js +5 -2
- package/esm/internals/Picker/PickerToggle.d.ts +1 -1
- package/esm/internals/Picker/ToggleButton.d.ts +2 -2
- package/esm/internals/Picker/ToggleButton.js +0 -0
- package/esm/internals/Picker/hooks/useCombobox.d.ts +1 -1
- package/esm/internals/Plaintext/Plaintext.d.ts +2 -2
- package/esm/internals/Plaintext/Plaintext.js +4 -2
- package/esm/internals/Tree/TreeView.d.ts +2 -2
- package/esm/internals/Tree/TreeView.js +4 -2
- package/esm/internals/types/picker.d.ts +2 -2
- package/esm/internals/utils/colours.d.ts +1 -1
- package/esm/internals/utils/createComponent.d.ts +4 -3
- package/esm/internals/utils/createComponent.js +7 -4
- package/esm/internals/utils/sizes.d.ts +4 -1
- package/esm/internals/utils/sizes.js +9 -3
- package/esm/internals/utils/style-sheet/css.d.ts +1 -1
- package/esm/internals/utils/style-sheet/css.js +3 -1
- package/esm/internals/utils/style-sheet/styles.d.ts +2 -2
- package/esm/internals/utils/style-sheet/styles.js +6 -6
- package/internals/Box/styles/index.less +54 -168
- package/package.json +1 -1
- package/styles/color-modes/dark.less +1 -1
- package/styles/color-modes/light.less +1 -1
- package/styles/root.less +10 -6
- package/toaster/styles/index.css +2 -1
- package/useToaster/styles/index.css +2 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
interface TreeViewProps extends
|
|
2
|
+
import { BoxProps } from '../Box';
|
|
3
|
+
interface TreeViewProps extends BoxProps, React.HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
treeRootClassName: string;
|
|
5
5
|
multiselectable?: boolean;
|
|
6
6
|
height?: number;
|
|
@@ -3,6 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import useCombobox from "../Picker/hooks/useCombobox.js";
|
|
5
5
|
import ScrollView from "../ScrollView/index.js";
|
|
6
|
+
import Box from "../Box/index.js";
|
|
6
7
|
import { useTreeContextProps } from "./TreeProvider.js";
|
|
7
8
|
import { forwardRef } from "../utils/index.js";
|
|
8
9
|
const ScrollShadowView = forwardRef((props, ref) => {
|
|
@@ -32,14 +33,15 @@ const TreeView = forwardRef((props, ref) => {
|
|
|
32
33
|
} = useCombobox();
|
|
33
34
|
|
|
34
35
|
// If the tree is virtualized, the scroll shadow is not needed.
|
|
35
|
-
const
|
|
36
|
+
const treeAs = scrollShadow && !virtualized ? ScrollShadowView : as;
|
|
36
37
|
|
|
37
38
|
// If the tree is virtualized, the height is not needed.
|
|
38
39
|
const viewStyles = {
|
|
39
40
|
height: virtualized ? undefined : height,
|
|
40
41
|
...style
|
|
41
42
|
};
|
|
42
|
-
return /*#__PURE__*/React.createElement(
|
|
43
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
44
|
+
as: treeAs,
|
|
43
45
|
role: "tree",
|
|
44
46
|
style: viewStyles,
|
|
45
47
|
id: id ? `${id}-${popupType}` : undefined,
|
|
@@ -3,7 +3,7 @@ import type { Placement } from './placement';
|
|
|
3
3
|
import type { ToArray } from './utils';
|
|
4
4
|
import type { FormControlBaseProps } from './form';
|
|
5
5
|
import type { AnimationEventProps } from './animation';
|
|
6
|
-
import type {
|
|
6
|
+
import type { BoxProps } from '../Box';
|
|
7
7
|
import type { Size } from './sizes';
|
|
8
8
|
import type { PickerHandle } from '../Picker/types';
|
|
9
9
|
export interface Option<T = number | string> extends Record<string, any> {
|
|
@@ -90,7 +90,7 @@ export interface DataProps<TData> {
|
|
|
90
90
|
*/
|
|
91
91
|
childrenKey?: string;
|
|
92
92
|
}
|
|
93
|
-
export interface PickerBaseProps<L = any> extends PopupProps,
|
|
93
|
+
export interface PickerBaseProps<L = any> extends PopupProps, BoxProps, AnimationEventProps {
|
|
94
94
|
id?: string;
|
|
95
95
|
/**
|
|
96
96
|
* Custom Ref for the picker
|
|
@@ -7,7 +7,7 @@ import { Color } from '../types/colours';
|
|
|
7
7
|
*/
|
|
8
8
|
export declare const getColorVar: (color: Color | string | undefined) => string | undefined;
|
|
9
9
|
export declare const isPresetColor: (color?: Color | React.CSSProperties['color']) => boolean;
|
|
10
|
-
export declare const getColorStyle: (value?: import("csstype").Property.Color | undefined,
|
|
10
|
+
export declare const getColorStyle: (value?: import("csstype").Property.Color | undefined, name?: string | undefined, prop?: string) => {
|
|
11
11
|
[x: string]: string | (string & {}) | undefined;
|
|
12
12
|
} | undefined;
|
|
13
13
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
export type ComponentProps =
|
|
2
|
+
import Box, { BoxProps } from '../Box/Box';
|
|
3
|
+
export type ComponentProps = BoxProps & React.HTMLAttributes<HTMLDivElement>;
|
|
4
4
|
interface Props<T extends React.ElementType> extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
5
|
name: string;
|
|
6
6
|
componentAs?: T;
|
|
@@ -8,6 +8,7 @@ interface Props<T extends React.ElementType> extends React.HTMLAttributes<HTMLDi
|
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* Create a component with `classPrefix` and `as` attributes.
|
|
11
|
+
* By default, the component is based on Box component and inherits all Box props.
|
|
11
12
|
*/
|
|
12
|
-
export declare function createComponent<T extends React.ElementType =
|
|
13
|
+
export declare function createComponent<T extends React.ElementType = typeof Box, P = ComponentProps>({ name, componentAs, componentClassPrefix, ...defaultProps }: Props<T> & Partial<P>): import("../types").InternalRefForwardingComponent<T, Partial<P>, never> & Record<string, never>;
|
|
13
14
|
export default createComponent;
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import kebabCase from 'lodash/kebabCase';
|
|
5
|
+
import Box from "../Box/Box.js";
|
|
5
6
|
import { useStyles } from "../hooks/index.js";
|
|
6
|
-
import { forwardRef } from "./
|
|
7
|
+
import { forwardRef } from "./forwardRef.js";
|
|
7
8
|
import { useCustom } from "../../CustomProvider/index.js";
|
|
8
9
|
/**
|
|
9
10
|
* Create a component with `classPrefix` and `as` attributes.
|
|
11
|
+
* By default, the component is based on Box component and inherits all Box props.
|
|
10
12
|
*/
|
|
11
13
|
export function createComponent(_ref) {
|
|
12
14
|
let {
|
|
@@ -20,7 +22,7 @@ export function createComponent(_ref) {
|
|
|
20
22
|
propsWithDefaults
|
|
21
23
|
} = useCustom(name, props);
|
|
22
24
|
const {
|
|
23
|
-
as
|
|
25
|
+
as,
|
|
24
26
|
classPrefix = componentClassPrefix || kebabCase(name),
|
|
25
27
|
className,
|
|
26
28
|
role,
|
|
@@ -31,10 +33,11 @@ export function createComponent(_ref) {
|
|
|
31
33
|
merge
|
|
32
34
|
} = useStyles(classPrefix);
|
|
33
35
|
const classes = merge(className, withPrefix());
|
|
34
|
-
return /*#__PURE__*/React.createElement(
|
|
36
|
+
return /*#__PURE__*/React.createElement(Box, _extends({}, defaultProps, rest, {
|
|
35
37
|
role: role,
|
|
36
38
|
ref: ref,
|
|
37
|
-
className: classes
|
|
39
|
+
className: classes,
|
|
40
|
+
as: as || componentAs || 'div'
|
|
38
41
|
}));
|
|
39
42
|
});
|
|
40
43
|
Component.displayName = name;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { SizeEnum } from '../types';
|
|
2
2
|
export declare const isPresetSize: (size?: SizeEnum | number | string | null) => boolean;
|
|
3
|
-
export declare const getSizeStyle: (value?: string | number | undefined,
|
|
3
|
+
export declare const getSizeStyle: (value?: string | number | undefined, name?: string | undefined, prop?: string) => {
|
|
4
|
+
[x: string]: string | number | undefined;
|
|
5
|
+
} | undefined;
|
|
6
|
+
export declare const getLineHeightStyle: (value?: string | number | undefined, name?: string | undefined, prop?: string) => {
|
|
4
7
|
[x: string]: string | number | undefined;
|
|
5
8
|
} | undefined;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { SizeEnum } from "../types/index.js";
|
|
2
|
+
import { SizeEnum, TypographySizeEnum } from "../types/index.js";
|
|
3
3
|
import { createStyleGetter, getCssValue } from "./style-sheet/index.js";
|
|
4
4
|
export const isPresetSize = size => {
|
|
5
5
|
if (!size) {
|
|
6
6
|
return false;
|
|
7
7
|
}
|
|
8
|
-
const presetSizes = [...Object.values(SizeEnum), 'full'];
|
|
8
|
+
const presetSizes = [...Object.values(SizeEnum), ...Object.values(TypographySizeEnum), 'full'];
|
|
9
9
|
return presetSizes.includes(size);
|
|
10
10
|
};
|
|
11
11
|
const sizeConfig = {
|
|
@@ -13,4 +13,10 @@ const sizeConfig = {
|
|
|
13
13
|
presetChecker: isPresetSize,
|
|
14
14
|
valueTransformer: getCssValue
|
|
15
15
|
};
|
|
16
|
-
export const getSizeStyle = createStyleGetter(sizeConfig);
|
|
16
|
+
export const getSizeStyle = createStyleGetter(sizeConfig);
|
|
17
|
+
const lineHeightConfig = {
|
|
18
|
+
prop: 'line-height',
|
|
19
|
+
presetChecker: isPresetSize,
|
|
20
|
+
valueTransformer: value => isPresetSize(value) ? value : null
|
|
21
|
+
};
|
|
22
|
+
export const getLineHeightStyle = createStyleGetter(lineHeightConfig);
|
|
@@ -7,7 +7,7 @@ export declare function getCssValue(value?: number | string | null, unit?: strin
|
|
|
7
7
|
/**
|
|
8
8
|
* Merge multiple style objects, filtering out undefined values
|
|
9
9
|
*/
|
|
10
|
-
export declare function mergeStyles(...styles: (StyleProperties | undefined | null)[]): React.CSSProperties;
|
|
10
|
+
export declare function mergeStyles(...styles: (StyleProperties | undefined | null)[]): React.CSSProperties | undefined;
|
|
11
11
|
/**
|
|
12
12
|
* Create CSS variables for offset positioning
|
|
13
13
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
import isEmpty from 'lodash/isEmpty';
|
|
2
3
|
/**
|
|
3
4
|
* Processes and returns a value suitable for CSS (with a unit).
|
|
4
5
|
*/
|
|
@@ -31,13 +32,14 @@ export function mergeStyles() {
|
|
|
31
32
|
for (var _len = arguments.length, styles = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
32
33
|
styles[_key] = arguments[_key];
|
|
33
34
|
}
|
|
34
|
-
|
|
35
|
+
const mergedStyles = styles === null || styles === void 0 ? void 0 : styles.filter(Boolean).reduce((acc, style) => {
|
|
35
36
|
if (!style) return acc;
|
|
36
37
|
return {
|
|
37
38
|
...acc,
|
|
38
39
|
...style
|
|
39
40
|
};
|
|
40
41
|
}, {});
|
|
42
|
+
return isEmpty(mergedStyles) ? undefined : mergedStyles;
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
/**
|
|
@@ -9,8 +9,8 @@ interface StylePropConfig<T = StyleValue> {
|
|
|
9
9
|
presetChecker?: PresetChecker<T>;
|
|
10
10
|
valueTransformer?: ValueTransformer<T>;
|
|
11
11
|
}
|
|
12
|
-
export declare const createStyleValueSetter: <T = string | number>(config: StylePropConfig<T>) => (value?: T | undefined,
|
|
13
|
-
export declare const createStyleGetter: <T = string | number>(config: StylePropConfig<T>) => (value?: T | undefined,
|
|
12
|
+
export declare const createStyleValueSetter: <T = string | number>(config: StylePropConfig<T>) => (value?: T | undefined, name?: string, prop?: string) => string | T | undefined;
|
|
13
|
+
export declare const createStyleGetter: <T = string | number>(config: StylePropConfig<T>) => (value?: T | undefined, name?: string, prop?: string) => {
|
|
14
14
|
[x: string]: string | T | undefined;
|
|
15
15
|
} | undefined;
|
|
16
16
|
export {};
|
|
@@ -5,15 +5,15 @@ export const createStyleValueSetter = config => {
|
|
|
5
5
|
presetChecker,
|
|
6
6
|
useGlobalVar
|
|
7
7
|
} = config;
|
|
8
|
-
return function (value,
|
|
8
|
+
return function (value, name, prop) {
|
|
9
9
|
if (prop === void 0) {
|
|
10
10
|
prop = config.prop;
|
|
11
11
|
}
|
|
12
|
-
if (typeof value === 'undefined' || !
|
|
12
|
+
if (typeof value === 'undefined' || !name) {
|
|
13
13
|
return;
|
|
14
14
|
}
|
|
15
15
|
if (presetChecker !== null && presetChecker !== void 0 && presetChecker(value)) {
|
|
16
|
-
return useGlobalVar ? `var(--rs-${prop}-${value})` : `var(--rs-${
|
|
16
|
+
return useGlobalVar ? `var(--rs-${prop}-${value})` : `var(--rs-${name}-${prop}-${value})`;
|
|
17
17
|
} else if (Array.isArray(value)) {
|
|
18
18
|
// If value is an array, join it with spaces,
|
|
19
19
|
// .eg, gap=[10, 20] -> '10px 20px'
|
|
@@ -24,15 +24,15 @@ export const createStyleValueSetter = config => {
|
|
|
24
24
|
};
|
|
25
25
|
export const createStyleGetter = config => {
|
|
26
26
|
const setValue = createStyleValueSetter(config);
|
|
27
|
-
return function (value,
|
|
27
|
+
return function (value, name, prop) {
|
|
28
28
|
if (prop === void 0) {
|
|
29
29
|
prop = config.prop;
|
|
30
30
|
}
|
|
31
|
-
if (typeof value === 'undefined' || !
|
|
31
|
+
if (typeof value === 'undefined' || !name) {
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
34
|
return {
|
|
35
|
-
[`--rs-${
|
|
35
|
+
[`--rs-${name}-${prop}`]: setValue(value, name, prop)
|
|
36
36
|
};
|
|
37
37
|
};
|
|
38
38
|
};
|
|
@@ -1,7 +1,43 @@
|
|
|
1
1
|
@import '../../../styles/common.less';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
// Define breakpoints map
|
|
4
|
+
@breakpoints: {
|
|
5
|
+
xs: @screen-sm;
|
|
6
|
+
sm: @screen-md;
|
|
7
|
+
md: @screen-lg;
|
|
8
|
+
lg: @screen-xl;
|
|
9
|
+
xl: @screen-xxl;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
// Define style property maps
|
|
13
|
+
@style-maps: {
|
|
14
|
+
p: padding;
|
|
15
|
+
pt: padding-top;
|
|
16
|
+
pb: padding-bottom;
|
|
17
|
+
pl: padding-left;
|
|
18
|
+
pr: padding-right;
|
|
19
|
+
px: padding-inline;
|
|
20
|
+
py: padding-block;
|
|
21
|
+
m: margin;
|
|
22
|
+
mt: margin-top;
|
|
23
|
+
mb: margin-bottom;
|
|
24
|
+
ml: margin-left;
|
|
25
|
+
mr: margin-right;
|
|
26
|
+
mx: margin-inline;
|
|
27
|
+
my: margin-block;
|
|
28
|
+
w: width;
|
|
29
|
+
h: height;
|
|
30
|
+
c: color;
|
|
31
|
+
bd: border;
|
|
32
|
+
rounded: border-radius;
|
|
33
|
+
shadow: box-shadow;
|
|
34
|
+
bg: background;
|
|
35
|
+
display: display;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
// Box base selector
|
|
39
|
+
[data-rs='box'] {
|
|
40
|
+
// Define radius variables
|
|
5
41
|
--rs-box-rounded-xs: var(--rs-radius-xs);
|
|
6
42
|
--rs-box-rounded-sm: var(--rs-radius-sm);
|
|
7
43
|
--rs-box-rounded-md: var(--rs-radius-md);
|
|
@@ -9,184 +45,34 @@
|
|
|
9
45
|
--rs-box-rounded-xl: var(--rs-radius-xl);
|
|
10
46
|
--rs-box-rounded-full: var(--rs-radius-full);
|
|
11
47
|
|
|
12
|
-
//
|
|
48
|
+
// Define shadow variables
|
|
13
49
|
--rs-box-shadow-xs: var(--rs-shadow-xs);
|
|
14
50
|
--rs-box-shadow-sm: var(--rs-shadow-sm);
|
|
15
51
|
--rs-box-shadow-md: var(--rs-shadow-md);
|
|
16
52
|
--rs-box-shadow-lg: var(--rs-shadow-lg);
|
|
17
53
|
--rs-box-shadow-xl: var(--rs-shadow-xl);
|
|
18
54
|
|
|
19
|
-
//
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
&[style*='--rs-box-color'] {
|
|
24
|
-
color: var(--rs-box-color);
|
|
25
|
-
}
|
|
26
|
-
&[style*='--rs-box-display'] {
|
|
27
|
-
display: var(--rs-box-display);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// Padding properties
|
|
31
|
-
&[style*='--rs-box-p'] {
|
|
32
|
-
padding: var(--rs-box-p);
|
|
33
|
-
}
|
|
34
|
-
&[style*='--rs-box-pt'] {
|
|
35
|
-
padding-top: var(--rs-box-pt);
|
|
36
|
-
}
|
|
37
|
-
&[style*='--rs-box-pb'] {
|
|
38
|
-
padding-bottom: var(--rs-box-pb);
|
|
39
|
-
}
|
|
40
|
-
&[style*='--rs-box-pl'] {
|
|
41
|
-
padding-left: var(--rs-box-pl);
|
|
42
|
-
}
|
|
43
|
-
&[style*='--rs-box-pr'] {
|
|
44
|
-
padding-right: var(--rs-box-pr);
|
|
45
|
-
}
|
|
46
|
-
&[style*='--rs-box-px'] {
|
|
47
|
-
padding-inline: var(--rs-box-px);
|
|
48
|
-
}
|
|
49
|
-
&[style*='--rs-box-py'] {
|
|
50
|
-
padding-block: var(--rs-box-py);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// Margin properties
|
|
54
|
-
&[style*='--rs-box-m'] {
|
|
55
|
-
margin: var(--rs-box-m);
|
|
56
|
-
}
|
|
57
|
-
&[style*='--rs-box-mt'] {
|
|
58
|
-
margin-top: var(--rs-box-mt);
|
|
59
|
-
}
|
|
60
|
-
&[style*='--rs-box-mb'] {
|
|
61
|
-
margin-bottom: var(--rs-box-mb);
|
|
62
|
-
}
|
|
63
|
-
&[style*='--rs-box-ml'] {
|
|
64
|
-
margin-left: var(--rs-box-ml);
|
|
65
|
-
}
|
|
66
|
-
&[style*='--rs-box-mr'] {
|
|
67
|
-
margin-right: var(--rs-box-mr);
|
|
68
|
-
}
|
|
69
|
-
&[style*='--rs-box-mx'] {
|
|
70
|
-
margin-inline: var(--rs-box-mx);
|
|
71
|
-
}
|
|
72
|
-
&[style*='--rs-box-my'] {
|
|
73
|
-
margin-block: var(--rs-box-my);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// Size properties
|
|
77
|
-
&[style*='--rs-box-w'] {
|
|
78
|
-
width: var(--rs-box-w);
|
|
79
|
-
}
|
|
80
|
-
&[style*='--rs-box-h'] {
|
|
81
|
-
height: var(--rs-box-h);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
// Border properties
|
|
85
|
-
&[style*='--rs-box-rounded'] {
|
|
86
|
-
border-radius: var(--rs-box-rounded);
|
|
87
|
-
}
|
|
88
|
-
&[style*='--rs-box-border'] {
|
|
89
|
-
border: var(--rs-box-border);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
// Shadow properties
|
|
93
|
-
&[style*='--rs-box-shadow'] {
|
|
94
|
-
box-shadow: var(--rs-box-shadow);
|
|
95
|
-
}
|
|
55
|
+
// Generate style properties from map
|
|
56
|
+
each(@style-maps, {
|
|
57
|
+
&[style*='--rs-box-@{key}'] { @{value}: ~'var(--rs-box-@{key})'; }
|
|
58
|
+
});
|
|
96
59
|
}
|
|
97
60
|
|
|
98
|
-
//
|
|
99
|
-
|
|
100
|
-
:
|
|
101
|
-
display: none !important;
|
|
61
|
+
// Generate responsive visibility styles
|
|
62
|
+
each(@breakpoints, {
|
|
63
|
+
@bp: @value - 1;
|
|
102
64
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
& when (@breakpoint = sm) {
|
|
110
|
-
@media (max-width: (@screen-md - 1)) {
|
|
111
|
-
display: var(--rs-box-display, inherit) !important;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
& when (@breakpoint = md) {
|
|
116
|
-
@media (max-width: (@screen-lg - 1)) {
|
|
117
|
-
display: var(--rs-box-display, inherit) !important;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
& when (@breakpoint = lg) {
|
|
122
|
-
@media (max-width: (@screen-xl - 1)) {
|
|
123
|
-
display: var(--rs-box-display, inherit) !important;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
& when (@breakpoint = xl) {
|
|
128
|
-
@media (max-width: (@screen-xxl - 1)) {
|
|
129
|
-
display: var(--rs-box-display, inherit) !important;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
& when (@breakpoint = xxl) {
|
|
134
|
-
display: var(--rs-box-display, inherit) !important;
|
|
65
|
+
// Visible from breakpoint
|
|
66
|
+
@media (max-width: @bp) {
|
|
67
|
+
[data-visible-from='@{key}'] {
|
|
68
|
+
display: none !important;
|
|
135
69
|
}
|
|
136
70
|
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.make-hidden(@breakpoint) {
|
|
140
|
-
:where(.rs-box-hidden-@{breakpoint}) {
|
|
141
|
-
display: var(--rs-box-display, inherit) !important;
|
|
142
71
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
& when (@breakpoint = sm) {
|
|
150
|
-
@media (max-width: (@screen-md - 1)) {
|
|
151
|
-
display: none !important;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
& when (@breakpoint = md) {
|
|
156
|
-
@media (max-width: (@screen-lg - 1)) {
|
|
157
|
-
display: none !important;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
& when (@breakpoint = lg) {
|
|
162
|
-
@media (max-width: (@screen-xl - 1)) {
|
|
163
|
-
display: none !important;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
& when (@breakpoint = xl) {
|
|
168
|
-
@media (max-width: (@screen-xxl - 1)) {
|
|
169
|
-
display: none !important;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
& when (@breakpoint = xxl) {
|
|
72
|
+
// Hidden from breakpoint
|
|
73
|
+
@media (min-width: @value) {
|
|
74
|
+
[data-hidden-from='@{key}'] {
|
|
174
75
|
display: none !important;
|
|
175
76
|
}
|
|
176
77
|
}
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
// Generate breakpoint classes
|
|
180
|
-
.make-visible(xs);
|
|
181
|
-
.make-visible(sm);
|
|
182
|
-
.make-visible(md);
|
|
183
|
-
.make-visible(lg);
|
|
184
|
-
.make-visible(xl);
|
|
185
|
-
.make-visible(xxl);
|
|
186
|
-
|
|
187
|
-
.make-hidden(xs);
|
|
188
|
-
.make-hidden(sm);
|
|
189
|
-
.make-hidden(md);
|
|
190
|
-
.make-hidden(lg);
|
|
191
|
-
.make-hidden(xl);
|
|
192
|
-
.make-hidden(xxl);
|
|
78
|
+
});
|
package/package.json
CHANGED
package/styles/root.less
CHANGED
|
@@ -47,14 +47,18 @@
|
|
|
47
47
|
--rs-radius-4xl: 2rem; // 32px
|
|
48
48
|
--rs-radius-full: calc(infinity * 1px);
|
|
49
49
|
|
|
50
|
+
// Shadow colors
|
|
51
|
+
--rs-shadow-color: rgb(0 0 0 / 10%);
|
|
52
|
+
--rs-shadow-color-deep: rgb(0 0 0 / 25%);
|
|
53
|
+
|
|
50
54
|
// Shadows
|
|
51
55
|
--rs-shadow-none: 0 0 #0000;
|
|
52
|
-
--rs-shadow-xs: 0 1px 2px 0
|
|
53
|
-
--rs-shadow-sm: 0 1px 3px 0
|
|
54
|
-
--rs-shadow-md: 0 4px 6px -1px
|
|
55
|
-
--rs-shadow-lg: 0 10px 15px -3px
|
|
56
|
-
--rs-shadow-xl: 0 20px 25px -5px
|
|
57
|
-
--rs-shadow-2xl: 0 25px 50px -12px
|
|
56
|
+
--rs-shadow-xs: 0 1px 2px 0 var(--rs-shadow-color);
|
|
57
|
+
--rs-shadow-sm: 0 1px 3px 0 var(--rs-shadow-color), 0 1px 2px 0 var(--rs-shadow-color);
|
|
58
|
+
--rs-shadow-md: 0 4px 6px -1px var(--rs-shadow-color), 0 2px 4px 0 var(--rs-shadow-color);
|
|
59
|
+
--rs-shadow-lg: 0 10px 15px -3px var(--rs-shadow-color), 0 4px 6px 0 var(--rs-shadow-color);
|
|
60
|
+
--rs-shadow-xl: 0 20px 25px -5px var(--rs-shadow-color), 0 8px 10px 0 var(--rs-shadow-color);
|
|
61
|
+
--rs-shadow-2xl: 0 25px 50px -12px var(--rs-shadow-color-deep);
|
|
58
62
|
|
|
59
63
|
}
|
|
60
64
|
|
package/toaster/styles/index.css
CHANGED
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
box-sizing: border-box;
|
|
13
13
|
}
|
|
14
14
|
:root {
|
|
15
|
-
--rs-shadow-
|
|
15
|
+
--rs-shadow-color: rgba(0, 0, 0, 0.1);
|
|
16
|
+
--rs-shadow-md: 0 4px 6px -1px var(--rs-shadow-color), 0 2px 4px 0 var(--rs-shadow-color);
|
|
16
17
|
}
|
|
17
18
|
@keyframes notificationMoveIn {
|
|
18
19
|
0% {
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
box-sizing: border-box;
|
|
13
13
|
}
|
|
14
14
|
:root {
|
|
15
|
-
--rs-shadow-
|
|
15
|
+
--rs-shadow-color: rgba(0, 0, 0, 0.1);
|
|
16
|
+
--rs-shadow-md: 0 4px 6px -1px var(--rs-shadow-color), 0 2px 4px 0 var(--rs-shadow-color);
|
|
16
17
|
}
|
|
17
18
|
@keyframes notificationMoveIn {
|
|
18
19
|
0% {
|