rsuite 6.0.0-canary-20250315 → 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.
Files changed (645) hide show
  1. package/Accordion/styles/index.css +2 -1
  2. package/AutoComplete/styles/index.css +2 -1
  3. package/Box/styles/index.css +40 -40
  4. package/ButtonToolbar/styles/index.css +4 -0
  5. package/ButtonToolbar/styles/index.less +5 -0
  6. package/Card/styles/index.css +2 -1
  7. package/Cascader/styles/index.css +2 -1
  8. package/CheckPicker/styles/index.css +2 -1
  9. package/CheckTree/styles/index.css +4 -3
  10. package/CheckTree/styles/index.less +1 -1
  11. package/CheckTreePicker/styles/index.css +4 -3
  12. package/DatePicker/styles/index.css +2 -1
  13. package/DateRangePicker/styles/index.css +2 -1
  14. package/Drawer/styles/index.css +2 -1
  15. package/Dropdown/styles/index.css +2 -1
  16. package/InlineEdit/styles/index.css +2 -1
  17. package/InputPicker/styles/index.css +2 -1
  18. package/List/styles/index.css +2 -1
  19. package/Modal/styles/index.css +2 -1
  20. package/MultiCascadeTree/styles/index.css +2 -1
  21. package/MultiCascader/styles/index.css +2 -1
  22. package/Nav/styles/index.css +3 -2
  23. package/Navbar/styles/index.css +2 -1
  24. package/Notification/styles/index.css +2 -1
  25. package/Pagination/styles/index.css +2 -1
  26. package/Panel/styles/index.css +2 -1
  27. package/RadioTile/styles/index.css +4 -0
  28. package/RadioTile/styles/index.less +4 -1
  29. package/SelectPicker/styles/index.css +2 -1
  30. package/Sidebar/styles/index.css +4 -0
  31. package/Sidebar/styles/index.less +8 -1
  32. package/Tabs/styles/index.css +3 -2
  33. package/TagInput/styles/index.css +2 -1
  34. package/TagPicker/styles/index.css +2 -1
  35. package/Text/styles/index.css +12 -31
  36. package/Text/styles/index.less +5 -7
  37. package/TimePicker/styles/index.css +2 -1
  38. package/TimeRangePicker/styles/index.css +2 -1
  39. package/Tree/styles/indent-line.less +1 -1
  40. package/Tree/styles/index.css +4 -3
  41. package/TreePicker/styles/index.css +4 -3
  42. package/cjs/Affix/Affix.d.ts +3 -2
  43. package/cjs/Affix/Affix.js +5 -2
  44. package/cjs/AutoComplete/AutoComplete.d.ts +3 -2
  45. package/cjs/AutoComplete/AutoComplete.js +4 -2
  46. package/cjs/Avatar/Avatar.d.ts +3 -2
  47. package/cjs/AvatarGroup/AvatarGroup.d.ts +3 -2
  48. package/cjs/AvatarGroup/AvatarGroup.js +4 -2
  49. package/cjs/Badge/Badge.d.ts +3 -2
  50. package/cjs/Badge/Badge.js +6 -3
  51. package/cjs/Breadcrumb/Breadcrumb.d.ts +2 -2
  52. package/cjs/Breadcrumb/BreadcrumbItem.d.ts +2 -2
  53. package/cjs/Breadcrumb/BreadcrumbItem.js +4 -2
  54. package/cjs/Button/Button.d.ts +3 -2
  55. package/cjs/Button/Button.js +8 -14
  56. package/cjs/ButtonGroup/ButtonGroup.d.ts +3 -2
  57. package/cjs/ButtonGroup/ButtonGroup.js +5 -2
  58. package/cjs/ButtonToolbar/ButtonToolbar.d.ts +1 -2
  59. package/cjs/ButtonToolbar/ButtonToolbar.js +4 -7
  60. package/cjs/Calendar/Calendar.d.ts +2 -2
  61. package/cjs/Calendar/Calendar.js +7 -6
  62. package/cjs/Card/Card.d.ts +5 -14
  63. package/cjs/Card/Card.js +4 -2
  64. package/cjs/Card/CardBody.d.ts +1 -4
  65. package/cjs/Card/CardBody.js +0 -0
  66. package/cjs/Card/CardFooter.d.ts +1 -4
  67. package/cjs/Card/CardFooter.js +0 -0
  68. package/cjs/Card/CardHeader.d.ts +1 -4
  69. package/cjs/Card/CardHeader.js +0 -0
  70. package/cjs/CardGroup/CardGroup.d.ts +2 -2
  71. package/cjs/CardGroup/CardGroup.js +4 -2
  72. package/cjs/Carousel/Carousel.d.ts +2 -2
  73. package/cjs/Carousel/Carousel.js +5 -2
  74. package/cjs/CascadeTree/CascadeTree.js +4 -2
  75. package/cjs/CascadeTree/types.d.ts +3 -2
  76. package/cjs/Cascader/Cascader.d.ts +1 -1
  77. package/cjs/Cascader/Cascader.js +4 -2
  78. package/cjs/CheckPicker/CheckPicker.js +4 -2
  79. package/cjs/CheckTree/CheckTreeView.js +4 -2
  80. package/cjs/CheckTreePicker/CheckTreePicker.js +4 -2
  81. package/cjs/Checkbox/Checkbox.d.ts +3 -2
  82. package/cjs/Checkbox/Checkbox.js +8 -3
  83. package/cjs/CheckboxGroup/CheckboxGroup.d.ts +3 -2
  84. package/cjs/CheckboxGroup/CheckboxGroup.js +5 -2
  85. package/cjs/Container/Container.d.ts +2 -2
  86. package/cjs/Container/Container.js +5 -2
  87. package/cjs/Content/Content.d.ts +1 -4
  88. package/cjs/Content/Content.js +0 -0
  89. package/cjs/DatePicker/DatePicker.js +4 -2
  90. package/cjs/DateRangePicker/DateRangePicker.js +4 -2
  91. package/cjs/Divider/Divider.d.ts +3 -2
  92. package/cjs/Drawer/Drawer.d.ts +2 -4
  93. package/cjs/Drawer/DrawerActions.d.ts +1 -3
  94. package/cjs/Drawer/DrawerActions.js +0 -0
  95. package/cjs/Drawer/DrawerBody.d.ts +1 -1
  96. package/cjs/Dropdown/DropdownItem.d.ts +3 -2
  97. package/cjs/Dropdown/DropdownItem.js +2 -2
  98. package/cjs/Footer/Footer.d.ts +1 -4
  99. package/cjs/Footer/Footer.js +0 -0
  100. package/cjs/Grid/Col.d.ts +3 -2
  101. package/cjs/Grid/Col.js +5 -2
  102. package/cjs/Grid/Grid.d.ts +2 -2
  103. package/cjs/Grid/Grid.js +5 -2
  104. package/cjs/Grid/Row.d.ts +3 -2
  105. package/cjs/Grid/Row.js +8 -4
  106. package/cjs/Header/Header.d.ts +1 -4
  107. package/cjs/Header/Header.js +0 -0
  108. package/cjs/Heading/Heading.d.ts +2 -2
  109. package/cjs/Heading/Heading.js +4 -2
  110. package/cjs/HeadingGroup/HeadingGroup.d.ts +1 -4
  111. package/cjs/HeadingGroup/HeadingGroup.js +0 -0
  112. package/cjs/Highlight/Highlight.d.ts +2 -2
  113. package/cjs/Highlight/Highlight.js +4 -2
  114. package/cjs/Image/Image.d.ts +2 -2
  115. package/cjs/Image/Image.js +8 -8
  116. package/cjs/Image/ImageWrapper.d.ts +3 -4
  117. package/cjs/Image/ImageWrapper.js +0 -0
  118. package/cjs/InlineEdit/InlineEdit.d.ts +2 -2
  119. package/cjs/InlineEdit/InlineEdit.js +4 -2
  120. package/cjs/Input/Input.d.ts +3 -2
  121. package/cjs/Input/Input.js +5 -2
  122. package/cjs/InputGroup/InputGroup.d.ts +3 -2
  123. package/cjs/InputGroup/InputGroup.js +5 -2
  124. package/cjs/InputGroup/InputGroupAddon.d.ts +2 -2
  125. package/cjs/InputGroup/InputGroupAddon.js +5 -2
  126. package/cjs/InputNumber/InputNumber.d.ts +3 -2
  127. package/cjs/InputNumber/InputNumber.js +5 -2
  128. package/cjs/InputPicker/InputPicker.d.ts +2 -2
  129. package/cjs/InputPicker/InputPicker.js +14 -5
  130. package/cjs/Kbd/Kbd.d.ts +3 -2
  131. package/cjs/Kbd/Kbd.js +5 -2
  132. package/cjs/List/List.d.ts +2 -2
  133. package/cjs/List/List.js +6 -5
  134. package/cjs/List/ListItem.d.ts +2 -2
  135. package/cjs/List/ListItem.js +6 -5
  136. package/cjs/Loader/Loader.d.ts +3 -2
  137. package/cjs/Loader/Loader.js +6 -5
  138. package/cjs/Menu/Menu.d.ts +3 -2
  139. package/cjs/Menu/Menu.js +5 -1
  140. package/cjs/Menu/MenuItem.d.ts +3 -2
  141. package/cjs/Menu/MenuItem.js +2 -2
  142. package/cjs/Menu/MenuSeparator.d.ts +2 -2
  143. package/cjs/Menu/MenuSeparator.js +6 -4
  144. package/cjs/Message/Message.d.ts +3 -2
  145. package/cjs/Message/Message.js +4 -2
  146. package/cjs/Modal/Modal.d.ts +2 -4
  147. package/cjs/Modal/ModalBody.d.ts +3 -3
  148. package/cjs/Modal/ModalBody.js +5 -2
  149. package/cjs/Modal/ModalDialog.d.ts +3 -2
  150. package/cjs/Modal/ModalDialog.js +4 -2
  151. package/cjs/Modal/ModalFooter.d.ts +1 -3
  152. package/cjs/Modal/ModalHeader.d.ts +2 -2
  153. package/cjs/Modal/ModalHeader.js +5 -2
  154. package/cjs/Modal/ModalTitle.js +4 -2
  155. package/cjs/MultiCascadeTree/MultiCascadeTree.js +4 -2
  156. package/cjs/MultiCascadeTree/types.d.ts +2 -2
  157. package/cjs/MultiCascader/MultiCascader.js +4 -2
  158. package/cjs/Nav/Nav.d.ts +3 -2
  159. package/cjs/Nav/Nav.js +7 -3
  160. package/cjs/Nav/NavDropdown.d.ts +4 -3
  161. package/cjs/Nav/NavDropdown.js +4 -2
  162. package/cjs/Nav/NavDropdownItem.d.ts +3 -2
  163. package/cjs/Nav/NavDropdownItem.js +4 -4
  164. package/cjs/Nav/NavDropdownToggle.d.ts +4 -3
  165. package/cjs/Nav/NavDropdownToggle.js +5 -2
  166. package/cjs/Nav/NavItem.d.ts +3 -2
  167. package/cjs/Nav/NavItem.js +4 -2
  168. package/cjs/Navbar/Navbar.d.ts +4 -8
  169. package/cjs/Navbar/Navbar.js +5 -2
  170. package/cjs/Navbar/NavbarBrand.d.ts +1 -5
  171. package/cjs/Navbar/NavbarBrand.js +0 -0
  172. package/cjs/Navbar/NavbarContent.d.ts +1 -1
  173. package/cjs/Navbar/NavbarDropdown.d.ts +2 -1
  174. package/cjs/Navbar/NavbarDropdown.js +4 -2
  175. package/cjs/Navbar/NavbarDropdownItem.d.ts +4 -3
  176. package/cjs/Navbar/NavbarDropdownItem.js +7 -7
  177. package/cjs/Navbar/NavbarDropdownToggle.d.ts +4 -3
  178. package/cjs/Navbar/NavbarDropdownToggle.js +5 -2
  179. package/cjs/Navbar/NavbarItem.d.ts +3 -2
  180. package/cjs/Navbar/NavbarItem.js +5 -3
  181. package/cjs/Notification/Notification.d.ts +3 -2
  182. package/cjs/Notification/Notification.js +4 -2
  183. package/cjs/Pagination/Pagination.d.ts +3 -2
  184. package/cjs/Pagination/Pagination.js +5 -3
  185. package/cjs/Pagination/PaginationGroup.js +4 -2
  186. package/cjs/Panel/Panel.d.ts +3 -2
  187. package/cjs/Panel/Panel.js +5 -3
  188. package/cjs/Panel/PanelBody.d.ts +1 -1
  189. package/cjs/Panel/PanelBody.js +1 -1
  190. package/cjs/Panel/PanelHeader.d.ts +2 -2
  191. package/cjs/Panel/PanelHeader.js +4 -2
  192. package/cjs/PanelGroup/PanelGroup.d.ts +2 -2
  193. package/cjs/PanelGroup/PanelGroup.js +5 -2
  194. package/cjs/Placeholder/PlaceholderGraph.d.ts +2 -2
  195. package/cjs/Placeholder/PlaceholderGraph.js +8 -8
  196. package/cjs/Placeholder/PlaceholderGrid.d.ts +2 -2
  197. package/cjs/Placeholder/PlaceholderGrid.js +8 -8
  198. package/cjs/Placeholder/PlaceholderParagraph.d.ts +2 -2
  199. package/cjs/Placeholder/PlaceholderParagraph.js +8 -8
  200. package/cjs/Popover/Popover.d.ts +2 -2
  201. package/cjs/Popover/Popover.js +6 -5
  202. package/cjs/Progress/ProgressCircle.d.ts +2 -2
  203. package/cjs/Progress/ProgressCircle.js +4 -2
  204. package/cjs/Progress/ProgressLine.d.ts +2 -2
  205. package/cjs/Progress/ProgressLine.js +4 -2
  206. package/cjs/Radio/Radio.d.ts +3 -2
  207. package/cjs/Radio/Radio.js +8 -5
  208. package/cjs/RadioGroup/RadioGroup.d.ts +3 -2
  209. package/cjs/RadioGroup/RadioGroup.js +4 -2
  210. package/cjs/RadioTile/RadioTile.d.ts +4 -5
  211. package/cjs/RadioTile/RadioTile.js +6 -8
  212. package/cjs/RadioTileGroup/RadioTileGroup.d.ts +3 -2
  213. package/cjs/RadioTileGroup/RadioTileGroup.js +6 -5
  214. package/cjs/RangeSlider/RangeSlider.js +5 -3
  215. package/cjs/Rate/Character.d.ts +2 -2
  216. package/cjs/Rate/Character.js +5 -3
  217. package/cjs/Rate/Rate.d.ts +3 -2
  218. package/cjs/Rate/Rate.js +4 -2
  219. package/cjs/SafeAnchor/SafeAnchor.d.ts +2 -2
  220. package/cjs/SafeAnchor/SafeAnchor.js +4 -2
  221. package/cjs/SelectPicker/SelectPicker.js +4 -2
  222. package/cjs/Sidebar/Sidebar.d.ts +2 -2
  223. package/cjs/Sidebar/Sidebar.js +7 -10
  224. package/cjs/Sidenav/ExpandedSidenavDropdown.d.ts +4 -3
  225. package/cjs/Sidenav/ExpandedSidenavDropdown.js +6 -6
  226. package/cjs/Sidenav/ExpandedSidenavDropdownItem.d.ts +3 -2
  227. package/cjs/Sidenav/ExpandedSidenavDropdownItem.js +2 -2
  228. package/cjs/Sidenav/ExpandedSidenavDropdownMenu.d.ts +3 -2
  229. package/cjs/Sidenav/ExpandedSidenavDropdownMenu.js +6 -5
  230. package/cjs/Sidenav/Sidenav.d.ts +6 -14
  231. package/cjs/Sidenav/Sidenav.js +5 -2
  232. package/cjs/Sidenav/SidenavBody.d.ts +1 -3
  233. package/cjs/Sidenav/SidenavBody.js +0 -0
  234. package/cjs/Sidenav/SidenavDropdown.d.ts +4 -7
  235. package/cjs/Sidenav/SidenavDropdown.js +7 -5
  236. package/cjs/Sidenav/SidenavDropdownCollapse.d.ts +2 -2
  237. package/cjs/Sidenav/SidenavDropdownCollapse.js +4 -1
  238. package/cjs/Sidenav/SidenavDropdownItem.d.ts +3 -2
  239. package/cjs/Sidenav/SidenavDropdownItem.js +7 -7
  240. package/cjs/Sidenav/SidenavFooter.d.ts +1 -3
  241. package/cjs/Sidenav/SidenavGroupLabel.d.ts +1 -3
  242. package/cjs/Sidenav/SidenavHeader.d.ts +1 -3
  243. package/cjs/Sidenav/SidenavHeader.js +0 -0
  244. package/cjs/Sidenav/SidenavItem.d.ts +3 -2
  245. package/cjs/Sidenav/SidenavItem.js +7 -4
  246. package/cjs/Sidenav/SidenavToggle.d.ts +2 -2
  247. package/cjs/Sidenav/SidenavToggle.js +6 -4
  248. package/cjs/Slider/Graduated.d.ts +2 -2
  249. package/cjs/Slider/Graduated.js +8 -4
  250. package/cjs/Slider/Handle.d.ts +2 -2
  251. package/cjs/Slider/Handle.js +4 -2
  252. package/cjs/Slider/Mark.d.ts +2 -2
  253. package/cjs/Slider/Mark.js +4 -2
  254. package/cjs/Slider/ProgressBar.d.ts +2 -2
  255. package/cjs/Slider/ProgressBar.js +8 -4
  256. package/cjs/Slider/Slider.d.ts +3 -2
  257. package/cjs/Slider/Slider.js +7 -5
  258. package/cjs/Stack/Stack.js +0 -1
  259. package/cjs/Stack/StackItem.d.ts +2 -2
  260. package/cjs/Stack/StackItem.js +4 -2
  261. package/cjs/Stat/Stat.d.ts +4 -10
  262. package/cjs/Stat/Stat.js +4 -2
  263. package/cjs/Stat/StatHelpText.d.ts +1 -4
  264. package/cjs/Stat/StatHelpText.js +0 -0
  265. package/cjs/Stat/StatLabel.d.ts +2 -2
  266. package/cjs/Stat/StatLabel.js +4 -2
  267. package/cjs/Stat/StatTrend.d.ts +2 -2
  268. package/cjs/Stat/StatTrend.js +4 -2
  269. package/cjs/Stat/StatValue.d.ts +2 -2
  270. package/cjs/Stat/StatValue.js +4 -2
  271. package/cjs/Stat/StatValueUnit.d.ts +1 -4
  272. package/cjs/Stat/StatValueUnit.js +0 -0
  273. package/cjs/StatGroup/StatGroup.d.ts +2 -2
  274. package/cjs/StatGroup/StatGroup.js +4 -2
  275. package/cjs/Steps/Steps.d.ts +2 -2
  276. package/cjs/Steps/Steps.js +5 -3
  277. package/cjs/Tabs/TabPanel.d.ts +2 -2
  278. package/cjs/Tabs/TabPanel.js +4 -2
  279. package/cjs/Tabs/Tabs.d.ts +2 -2
  280. package/cjs/Tabs/Tabs.js +4 -2
  281. package/cjs/Tag/Tag.d.ts +3 -2
  282. package/cjs/Tag/Tag.js +4 -2
  283. package/cjs/TagGroup/TagGroup.d.ts +1 -3
  284. package/cjs/TagGroup/TagGroup.js +0 -0
  285. package/cjs/Text/Text.d.ts +4 -4
  286. package/cjs/Text/Text.js +10 -21
  287. package/cjs/Timeline/Timeline.d.ts +2 -2
  288. package/cjs/Timeline/Timeline.js +5 -3
  289. package/cjs/Timeline/TimelineItem.d.ts +2 -2
  290. package/cjs/Timeline/TimelineItem.js +5 -3
  291. package/cjs/Toggle/Toggle.d.ts +3 -2
  292. package/cjs/Toggle/Toggle.js +5 -3
  293. package/cjs/Tooltip/Tooltip.d.ts +3 -2
  294. package/cjs/Tooltip/Tooltip.js +4 -2
  295. package/cjs/Tree/Tree.d.ts +1 -1
  296. package/cjs/Tree/TreeNode.d.ts +2 -2
  297. package/cjs/Tree/TreeNode.js +6 -4
  298. package/cjs/Tree/TreeView.js +4 -2
  299. package/cjs/Tree/types.d.ts +2 -2
  300. package/cjs/TreePicker/TreePicker.d.ts +1 -1
  301. package/cjs/TreePicker/TreePicker.js +4 -2
  302. package/cjs/Uploader/UploadFileItem.d.ts +2 -2
  303. package/cjs/Uploader/UploadFileItem.js +11 -4
  304. package/cjs/Uploader/Uploader.d.ts +2 -2
  305. package/cjs/Uploader/Uploader.js +4 -2
  306. package/cjs/VisuallyHidden/VisuallyHidden.d.ts +1 -4
  307. package/cjs/VisuallyHidden/VisuallyHidden.js +0 -0
  308. package/cjs/internals/Box/Box.d.ts +12 -8
  309. package/cjs/internals/Box/Box.js +16 -14
  310. package/cjs/internals/Box/utils.js +5 -5
  311. package/cjs/internals/Menu/useRenderMenuItem.d.ts +1 -1
  312. package/cjs/internals/Menu/useRenderMenuItem.js +17 -8
  313. package/cjs/internals/Overlay/Modal.d.ts +3 -2
  314. package/cjs/internals/Overlay/Modal.js +5 -2
  315. package/cjs/internals/Picker/PickerToggle.d.ts +1 -1
  316. package/cjs/internals/Picker/ToggleButton.d.ts +2 -2
  317. package/cjs/internals/Picker/ToggleButton.js +0 -0
  318. package/cjs/internals/Picker/hooks/useCombobox.d.ts +1 -1
  319. package/cjs/internals/Plaintext/Plaintext.d.ts +2 -2
  320. package/cjs/internals/Plaintext/Plaintext.js +4 -2
  321. package/cjs/internals/Tree/TreeView.d.ts +2 -2
  322. package/cjs/internals/Tree/TreeView.js +4 -2
  323. package/cjs/internals/types/picker.d.ts +2 -2
  324. package/cjs/internals/utils/colours.d.ts +1 -1
  325. package/cjs/internals/utils/createComponent.d.ts +4 -3
  326. package/cjs/internals/utils/createComponent.js +8 -5
  327. package/cjs/internals/utils/sizes.d.ts +4 -1
  328. package/cjs/internals/utils/sizes.js +9 -3
  329. package/cjs/internals/utils/style-sheet/css.d.ts +1 -1
  330. package/cjs/internals/utils/style-sheet/css.js +4 -1
  331. package/cjs/internals/utils/style-sheet/styles.d.ts +2 -2
  332. package/cjs/internals/utils/style-sheet/styles.js +6 -6
  333. package/dist/rsuite-no-reset-rtl.css +75 -70
  334. package/dist/rsuite-no-reset-rtl.min.css +1 -1
  335. package/dist/rsuite-no-reset-rtl.min.css.map +1 -1
  336. package/dist/rsuite-no-reset.css +75 -70
  337. package/dist/rsuite-no-reset.min.css +1 -1
  338. package/dist/rsuite-no-reset.min.css.map +1 -1
  339. package/dist/rsuite-rtl.css +75 -70
  340. package/dist/rsuite-rtl.min.css +1 -1
  341. package/dist/rsuite-rtl.min.css.map +1 -1
  342. package/dist/rsuite.css +75 -70
  343. package/dist/rsuite.js +130 -130
  344. package/dist/rsuite.min.css +1 -1
  345. package/dist/rsuite.min.css.map +1 -1
  346. package/dist/rsuite.min.js +1 -1
  347. package/dist/rsuite.min.js.map +1 -1
  348. package/esm/Affix/Affix.d.ts +3 -2
  349. package/esm/Affix/Affix.js +5 -2
  350. package/esm/AutoComplete/AutoComplete.d.ts +3 -2
  351. package/esm/AutoComplete/AutoComplete.js +4 -2
  352. package/esm/Avatar/Avatar.d.ts +3 -2
  353. package/esm/AvatarGroup/AvatarGroup.d.ts +3 -2
  354. package/esm/AvatarGroup/AvatarGroup.js +4 -2
  355. package/esm/Badge/Badge.d.ts +3 -2
  356. package/esm/Badge/Badge.js +6 -3
  357. package/esm/Breadcrumb/Breadcrumb.d.ts +2 -2
  358. package/esm/Breadcrumb/BreadcrumbItem.d.ts +2 -2
  359. package/esm/Breadcrumb/BreadcrumbItem.js +4 -2
  360. package/esm/Button/Button.d.ts +3 -2
  361. package/esm/Button/Button.js +8 -14
  362. package/esm/ButtonGroup/ButtonGroup.d.ts +3 -2
  363. package/esm/ButtonGroup/ButtonGroup.js +5 -2
  364. package/esm/ButtonToolbar/ButtonToolbar.d.ts +1 -2
  365. package/esm/ButtonToolbar/ButtonToolbar.js +4 -7
  366. package/esm/Calendar/Calendar.d.ts +2 -2
  367. package/esm/Calendar/Calendar.js +7 -6
  368. package/esm/Card/Card.d.ts +5 -14
  369. package/esm/Card/Card.js +4 -2
  370. package/esm/Card/CardBody.d.ts +1 -4
  371. package/esm/Card/CardBody.js +0 -0
  372. package/esm/Card/CardFooter.d.ts +1 -4
  373. package/esm/Card/CardFooter.js +0 -0
  374. package/esm/Card/CardHeader.d.ts +1 -4
  375. package/esm/Card/CardHeader.js +0 -0
  376. package/esm/CardGroup/CardGroup.d.ts +2 -2
  377. package/esm/CardGroup/CardGroup.js +4 -2
  378. package/esm/Carousel/Carousel.d.ts +2 -2
  379. package/esm/Carousel/Carousel.js +5 -2
  380. package/esm/CascadeTree/CascadeTree.js +4 -2
  381. package/esm/CascadeTree/types.d.ts +3 -2
  382. package/esm/Cascader/Cascader.d.ts +1 -1
  383. package/esm/Cascader/Cascader.js +4 -2
  384. package/esm/CheckPicker/CheckPicker.js +4 -2
  385. package/esm/CheckTree/CheckTreeView.js +4 -2
  386. package/esm/CheckTreePicker/CheckTreePicker.js +4 -2
  387. package/esm/Checkbox/Checkbox.d.ts +3 -2
  388. package/esm/Checkbox/Checkbox.js +8 -3
  389. package/esm/CheckboxGroup/CheckboxGroup.d.ts +3 -2
  390. package/esm/CheckboxGroup/CheckboxGroup.js +5 -2
  391. package/esm/Container/Container.d.ts +2 -2
  392. package/esm/Container/Container.js +5 -2
  393. package/esm/Content/Content.d.ts +1 -4
  394. package/esm/Content/Content.js +0 -0
  395. package/esm/DatePicker/DatePicker.js +4 -2
  396. package/esm/DateRangePicker/DateRangePicker.js +4 -2
  397. package/esm/Divider/Divider.d.ts +3 -2
  398. package/esm/Drawer/Drawer.d.ts +2 -4
  399. package/esm/Drawer/DrawerActions.d.ts +1 -3
  400. package/esm/Drawer/DrawerActions.js +0 -0
  401. package/esm/Drawer/DrawerBody.d.ts +1 -1
  402. package/esm/Dropdown/DropdownItem.d.ts +3 -2
  403. package/esm/Dropdown/DropdownItem.js +2 -2
  404. package/esm/Footer/Footer.d.ts +1 -4
  405. package/esm/Footer/Footer.js +0 -0
  406. package/esm/Grid/Col.d.ts +3 -2
  407. package/esm/Grid/Col.js +5 -2
  408. package/esm/Grid/Grid.d.ts +2 -2
  409. package/esm/Grid/Grid.js +5 -2
  410. package/esm/Grid/Row.d.ts +3 -2
  411. package/esm/Grid/Row.js +8 -4
  412. package/esm/Header/Header.d.ts +1 -4
  413. package/esm/Header/Header.js +0 -0
  414. package/esm/Heading/Heading.d.ts +2 -2
  415. package/esm/Heading/Heading.js +4 -2
  416. package/esm/HeadingGroup/HeadingGroup.d.ts +1 -4
  417. package/esm/HeadingGroup/HeadingGroup.js +0 -0
  418. package/esm/Highlight/Highlight.d.ts +2 -2
  419. package/esm/Highlight/Highlight.js +4 -2
  420. package/esm/Image/Image.d.ts +2 -2
  421. package/esm/Image/Image.js +8 -8
  422. package/esm/Image/ImageWrapper.d.ts +3 -4
  423. package/esm/Image/ImageWrapper.js +0 -0
  424. package/esm/InlineEdit/InlineEdit.d.ts +2 -2
  425. package/esm/InlineEdit/InlineEdit.js +4 -2
  426. package/esm/Input/Input.d.ts +3 -2
  427. package/esm/Input/Input.js +5 -2
  428. package/esm/InputGroup/InputGroup.d.ts +3 -2
  429. package/esm/InputGroup/InputGroup.js +5 -2
  430. package/esm/InputGroup/InputGroupAddon.d.ts +2 -2
  431. package/esm/InputGroup/InputGroupAddon.js +5 -2
  432. package/esm/InputNumber/InputNumber.d.ts +3 -2
  433. package/esm/InputNumber/InputNumber.js +5 -2
  434. package/esm/InputPicker/InputPicker.d.ts +2 -2
  435. package/esm/InputPicker/InputPicker.js +14 -5
  436. package/esm/Kbd/Kbd.d.ts +3 -2
  437. package/esm/Kbd/Kbd.js +5 -2
  438. package/esm/List/List.d.ts +2 -2
  439. package/esm/List/List.js +6 -5
  440. package/esm/List/ListItem.d.ts +2 -2
  441. package/esm/List/ListItem.js +6 -5
  442. package/esm/Loader/Loader.d.ts +3 -2
  443. package/esm/Loader/Loader.js +6 -5
  444. package/esm/Menu/Menu.d.ts +3 -2
  445. package/esm/Menu/Menu.js +5 -1
  446. package/esm/Menu/MenuItem.d.ts +3 -2
  447. package/esm/Menu/MenuItem.js +2 -2
  448. package/esm/Menu/MenuSeparator.d.ts +2 -2
  449. package/esm/Menu/MenuSeparator.js +6 -4
  450. package/esm/Message/Message.d.ts +3 -2
  451. package/esm/Message/Message.js +4 -2
  452. package/esm/Modal/Modal.d.ts +2 -4
  453. package/esm/Modal/ModalBody.d.ts +3 -3
  454. package/esm/Modal/ModalBody.js +5 -2
  455. package/esm/Modal/ModalDialog.d.ts +3 -2
  456. package/esm/Modal/ModalDialog.js +4 -2
  457. package/esm/Modal/ModalFooter.d.ts +1 -3
  458. package/esm/Modal/ModalHeader.d.ts +2 -2
  459. package/esm/Modal/ModalHeader.js +5 -2
  460. package/esm/Modal/ModalTitle.js +4 -2
  461. package/esm/MultiCascadeTree/MultiCascadeTree.js +4 -2
  462. package/esm/MultiCascadeTree/types.d.ts +2 -2
  463. package/esm/MultiCascader/MultiCascader.js +4 -2
  464. package/esm/Nav/Nav.d.ts +3 -2
  465. package/esm/Nav/Nav.js +7 -3
  466. package/esm/Nav/NavDropdown.d.ts +4 -3
  467. package/esm/Nav/NavDropdown.js +4 -2
  468. package/esm/Nav/NavDropdownItem.d.ts +3 -2
  469. package/esm/Nav/NavDropdownItem.js +4 -4
  470. package/esm/Nav/NavDropdownToggle.d.ts +4 -3
  471. package/esm/Nav/NavDropdownToggle.js +5 -2
  472. package/esm/Nav/NavItem.d.ts +3 -2
  473. package/esm/Nav/NavItem.js +4 -2
  474. package/esm/Navbar/Navbar.d.ts +4 -8
  475. package/esm/Navbar/Navbar.js +5 -2
  476. package/esm/Navbar/NavbarBrand.d.ts +1 -5
  477. package/esm/Navbar/NavbarBrand.js +0 -0
  478. package/esm/Navbar/NavbarContent.d.ts +1 -1
  479. package/esm/Navbar/NavbarDropdown.d.ts +2 -1
  480. package/esm/Navbar/NavbarDropdown.js +4 -2
  481. package/esm/Navbar/NavbarDropdownItem.d.ts +4 -3
  482. package/esm/Navbar/NavbarDropdownItem.js +7 -7
  483. package/esm/Navbar/NavbarDropdownToggle.d.ts +4 -3
  484. package/esm/Navbar/NavbarDropdownToggle.js +5 -2
  485. package/esm/Navbar/NavbarItem.d.ts +3 -2
  486. package/esm/Navbar/NavbarItem.js +5 -3
  487. package/esm/Notification/Notification.d.ts +3 -2
  488. package/esm/Notification/Notification.js +4 -2
  489. package/esm/Pagination/Pagination.d.ts +3 -2
  490. package/esm/Pagination/Pagination.js +5 -3
  491. package/esm/Pagination/PaginationGroup.js +4 -2
  492. package/esm/Panel/Panel.d.ts +3 -2
  493. package/esm/Panel/Panel.js +5 -3
  494. package/esm/Panel/PanelBody.d.ts +1 -1
  495. package/esm/Panel/PanelBody.js +1 -1
  496. package/esm/Panel/PanelHeader.d.ts +2 -2
  497. package/esm/Panel/PanelHeader.js +4 -2
  498. package/esm/PanelGroup/PanelGroup.d.ts +2 -2
  499. package/esm/PanelGroup/PanelGroup.js +5 -2
  500. package/esm/Placeholder/PlaceholderGraph.d.ts +2 -2
  501. package/esm/Placeholder/PlaceholderGraph.js +8 -8
  502. package/esm/Placeholder/PlaceholderGrid.d.ts +2 -2
  503. package/esm/Placeholder/PlaceholderGrid.js +8 -8
  504. package/esm/Placeholder/PlaceholderParagraph.d.ts +2 -2
  505. package/esm/Placeholder/PlaceholderParagraph.js +8 -8
  506. package/esm/Popover/Popover.d.ts +2 -2
  507. package/esm/Popover/Popover.js +6 -5
  508. package/esm/Progress/ProgressCircle.d.ts +2 -2
  509. package/esm/Progress/ProgressCircle.js +4 -2
  510. package/esm/Progress/ProgressLine.d.ts +2 -2
  511. package/esm/Progress/ProgressLine.js +4 -2
  512. package/esm/Radio/Radio.d.ts +3 -2
  513. package/esm/Radio/Radio.js +8 -5
  514. package/esm/RadioGroup/RadioGroup.d.ts +3 -2
  515. package/esm/RadioGroup/RadioGroup.js +4 -2
  516. package/esm/RadioTile/RadioTile.d.ts +4 -5
  517. package/esm/RadioTile/RadioTile.js +6 -8
  518. package/esm/RadioTileGroup/RadioTileGroup.d.ts +3 -2
  519. package/esm/RadioTileGroup/RadioTileGroup.js +6 -5
  520. package/esm/RangeSlider/RangeSlider.js +5 -3
  521. package/esm/Rate/Character.d.ts +2 -2
  522. package/esm/Rate/Character.js +5 -3
  523. package/esm/Rate/Rate.d.ts +3 -2
  524. package/esm/Rate/Rate.js +4 -2
  525. package/esm/SafeAnchor/SafeAnchor.d.ts +2 -2
  526. package/esm/SafeAnchor/SafeAnchor.js +4 -2
  527. package/esm/SelectPicker/SelectPicker.js +4 -2
  528. package/esm/Sidebar/Sidebar.d.ts +2 -2
  529. package/esm/Sidebar/Sidebar.js +8 -11
  530. package/esm/Sidenav/ExpandedSidenavDropdown.d.ts +4 -3
  531. package/esm/Sidenav/ExpandedSidenavDropdown.js +6 -6
  532. package/esm/Sidenav/ExpandedSidenavDropdownItem.d.ts +3 -2
  533. package/esm/Sidenav/ExpandedSidenavDropdownItem.js +2 -2
  534. package/esm/Sidenav/ExpandedSidenavDropdownMenu.d.ts +3 -2
  535. package/esm/Sidenav/ExpandedSidenavDropdownMenu.js +6 -5
  536. package/esm/Sidenav/Sidenav.d.ts +6 -14
  537. package/esm/Sidenav/Sidenav.js +5 -2
  538. package/esm/Sidenav/SidenavBody.d.ts +1 -3
  539. package/esm/Sidenav/SidenavBody.js +0 -0
  540. package/esm/Sidenav/SidenavDropdown.d.ts +4 -7
  541. package/esm/Sidenav/SidenavDropdown.js +7 -5
  542. package/esm/Sidenav/SidenavDropdownCollapse.d.ts +2 -2
  543. package/esm/Sidenav/SidenavDropdownCollapse.js +4 -1
  544. package/esm/Sidenav/SidenavDropdownItem.d.ts +3 -2
  545. package/esm/Sidenav/SidenavDropdownItem.js +7 -7
  546. package/esm/Sidenav/SidenavFooter.d.ts +1 -3
  547. package/esm/Sidenav/SidenavGroupLabel.d.ts +1 -3
  548. package/esm/Sidenav/SidenavHeader.d.ts +1 -3
  549. package/esm/Sidenav/SidenavHeader.js +0 -0
  550. package/esm/Sidenav/SidenavItem.d.ts +3 -2
  551. package/esm/Sidenav/SidenavItem.js +7 -4
  552. package/esm/Sidenav/SidenavToggle.d.ts +2 -2
  553. package/esm/Sidenav/SidenavToggle.js +7 -5
  554. package/esm/Slider/Graduated.d.ts +2 -2
  555. package/esm/Slider/Graduated.js +8 -4
  556. package/esm/Slider/Handle.d.ts +2 -2
  557. package/esm/Slider/Handle.js +4 -2
  558. package/esm/Slider/Mark.d.ts +2 -2
  559. package/esm/Slider/Mark.js +4 -2
  560. package/esm/Slider/ProgressBar.d.ts +2 -2
  561. package/esm/Slider/ProgressBar.js +8 -4
  562. package/esm/Slider/Slider.d.ts +3 -2
  563. package/esm/Slider/Slider.js +7 -5
  564. package/esm/Stack/Stack.js +0 -1
  565. package/esm/Stack/StackItem.d.ts +2 -2
  566. package/esm/Stack/StackItem.js +4 -2
  567. package/esm/Stat/Stat.d.ts +4 -10
  568. package/esm/Stat/Stat.js +4 -2
  569. package/esm/Stat/StatHelpText.d.ts +1 -4
  570. package/esm/Stat/StatHelpText.js +0 -0
  571. package/esm/Stat/StatLabel.d.ts +2 -2
  572. package/esm/Stat/StatLabel.js +4 -2
  573. package/esm/Stat/StatTrend.d.ts +2 -2
  574. package/esm/Stat/StatTrend.js +4 -2
  575. package/esm/Stat/StatValue.d.ts +2 -2
  576. package/esm/Stat/StatValue.js +4 -2
  577. package/esm/Stat/StatValueUnit.d.ts +1 -4
  578. package/esm/Stat/StatValueUnit.js +0 -0
  579. package/esm/StatGroup/StatGroup.d.ts +2 -2
  580. package/esm/StatGroup/StatGroup.js +4 -2
  581. package/esm/Steps/Steps.d.ts +2 -2
  582. package/esm/Steps/Steps.js +5 -3
  583. package/esm/Tabs/TabPanel.d.ts +2 -2
  584. package/esm/Tabs/TabPanel.js +4 -2
  585. package/esm/Tabs/Tabs.d.ts +2 -2
  586. package/esm/Tabs/Tabs.js +4 -2
  587. package/esm/Tag/Tag.d.ts +3 -2
  588. package/esm/Tag/Tag.js +4 -2
  589. package/esm/TagGroup/TagGroup.d.ts +1 -3
  590. package/esm/TagGroup/TagGroup.js +0 -0
  591. package/esm/Text/Text.d.ts +4 -4
  592. package/esm/Text/Text.js +11 -20
  593. package/esm/Timeline/Timeline.d.ts +2 -2
  594. package/esm/Timeline/Timeline.js +5 -3
  595. package/esm/Timeline/TimelineItem.d.ts +2 -2
  596. package/esm/Timeline/TimelineItem.js +5 -3
  597. package/esm/Toggle/Toggle.d.ts +3 -2
  598. package/esm/Toggle/Toggle.js +5 -3
  599. package/esm/Tooltip/Tooltip.d.ts +3 -2
  600. package/esm/Tooltip/Tooltip.js +4 -2
  601. package/esm/Tree/Tree.d.ts +1 -1
  602. package/esm/Tree/TreeNode.d.ts +2 -2
  603. package/esm/Tree/TreeNode.js +6 -4
  604. package/esm/Tree/TreeView.js +4 -2
  605. package/esm/Tree/types.d.ts +2 -2
  606. package/esm/TreePicker/TreePicker.d.ts +1 -1
  607. package/esm/TreePicker/TreePicker.js +4 -2
  608. package/esm/Uploader/UploadFileItem.d.ts +2 -2
  609. package/esm/Uploader/UploadFileItem.js +11 -4
  610. package/esm/Uploader/Uploader.d.ts +2 -2
  611. package/esm/Uploader/Uploader.js +4 -2
  612. package/esm/VisuallyHidden/VisuallyHidden.d.ts +1 -4
  613. package/esm/VisuallyHidden/VisuallyHidden.js +0 -0
  614. package/esm/internals/Box/Box.d.ts +12 -8
  615. package/esm/internals/Box/Box.js +16 -14
  616. package/esm/internals/Box/utils.js +5 -5
  617. package/esm/internals/Menu/useRenderMenuItem.d.ts +1 -1
  618. package/esm/internals/Menu/useRenderMenuItem.js +16 -8
  619. package/esm/internals/Overlay/Modal.d.ts +3 -2
  620. package/esm/internals/Overlay/Modal.js +5 -2
  621. package/esm/internals/Picker/PickerToggle.d.ts +1 -1
  622. package/esm/internals/Picker/ToggleButton.d.ts +2 -2
  623. package/esm/internals/Picker/ToggleButton.js +0 -0
  624. package/esm/internals/Picker/hooks/useCombobox.d.ts +1 -1
  625. package/esm/internals/Plaintext/Plaintext.d.ts +2 -2
  626. package/esm/internals/Plaintext/Plaintext.js +4 -2
  627. package/esm/internals/Tree/TreeView.d.ts +2 -2
  628. package/esm/internals/Tree/TreeView.js +4 -2
  629. package/esm/internals/types/picker.d.ts +2 -2
  630. package/esm/internals/utils/colours.d.ts +1 -1
  631. package/esm/internals/utils/createComponent.d.ts +4 -3
  632. package/esm/internals/utils/createComponent.js +7 -4
  633. package/esm/internals/utils/sizes.d.ts +4 -1
  634. package/esm/internals/utils/sizes.js +9 -3
  635. package/esm/internals/utils/style-sheet/css.d.ts +1 -1
  636. package/esm/internals/utils/style-sheet/css.js +3 -1
  637. package/esm/internals/utils/style-sheet/styles.d.ts +2 -2
  638. package/esm/internals/utils/style-sheet/styles.js +6 -6
  639. package/internals/Box/styles/index.less +57 -136
  640. package/package.json +1 -1
  641. package/styles/color-modes/dark.less +1 -1
  642. package/styles/color-modes/light.less +1 -1
  643. package/styles/root.less +10 -6
  644. package/toaster/styles/index.css +2 -1
  645. package/useToaster/styles/index.css +2 -1
@@ -1,6 +1,7 @@
1
1
  'use client';
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  import React from 'react';
4
+ import Box from "../internals/Box/index.js";
4
5
  import { forwardRef, mergeStyles } from "../internals/utils/index.js";
5
6
  import { useStyles } from "../internals/hooks/index.js";
6
7
  /**
@@ -10,7 +11,7 @@ import { useStyles } from "../internals/hooks/index.js";
10
11
  */
11
12
  const StackItem = forwardRef((props, ref) => {
12
13
  const {
13
- as: Component = 'div',
14
+ as,
14
15
  classPrefix = 'stack-item',
15
16
  style,
16
17
  className,
@@ -29,7 +30,8 @@ const StackItem = forwardRef((props, ref) => {
29
30
  } = useStyles(classPrefix);
30
31
  const classes = merge(className, withPrefix());
31
32
  const styles = mergeStyles(style, cssVar('align-self', alignSelf), cssVar('order', order), cssVar('flex', flex), cssVar('grow', grow), cssVar('shrink', shrink), cssVar('basis', basis));
32
- return /*#__PURE__*/React.createElement(Component, _extends({
33
+ return /*#__PURE__*/React.createElement(Box, _extends({
34
+ as: as,
33
35
  ref: ref,
34
36
  className: classes,
35
37
  style: styles
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import type { WithAsProps } from '../internals/types';
3
- export interface StatProps extends WithAsProps {
2
+ import { BoxProps } from '../internals/Box';
3
+ export interface StatProps extends BoxProps {
4
4
  /**
5
5
  * Add a border to the component.
6
6
  */
@@ -14,13 +14,7 @@ declare const Stat: import("../internals/types").InternalRefForwardingComponent<
14
14
  Label: import("../internals/types").InternalRefForwardingComponent<"dt", import("./StatLabel").StatLabelProps, never> & Record<string, never>;
15
15
  Value: import("../internals/types").InternalRefForwardingComponent<"dd", import("./StatValue").StatValueProps, never> & Record<string, never>;
16
16
  Trend: import("../internals/types").InternalRefForwardingComponent<"dd", import("./StatTrend").StatTrendProps, never> & Record<string, never>;
17
- ValueUnit: import("../internals/types").InternalRefForwardingComponent<"span", Partial<{
18
- name: string;
19
- componentAs: "span";
20
- }>, never> & Record<string, never>;
21
- HelpText: import("../internals/types").InternalRefForwardingComponent<"span", Partial<{
22
- name: string;
23
- componentAs: "span";
24
- }>, never> & Record<string, never>;
17
+ ValueUnit: import("../internals/types").InternalRefForwardingComponent<"span", Partial<import("../internals/utils").ComponentProps>, never> & Record<string, never>;
18
+ HelpText: import("../internals/types").InternalRefForwardingComponent<"span", Partial<import("../internals/utils").ComponentProps>, never> & Record<string, never>;
25
19
  };
26
20
  export default Stat;
package/esm/Stat/Stat.js CHANGED
@@ -6,6 +6,7 @@ import StatValue from "./StatValue.js";
6
6
  import StatValueUnit from "./StatValueUnit.js";
7
7
  import StatHelpText from "./StatHelpText.js";
8
8
  import StatTrend from "./StatTrend.js";
9
+ import Box from "../internals/Box/index.js";
9
10
  import { forwardRef } from "../internals/utils/index.js";
10
11
  import { useStyles } from "../internals/hooks/index.js";
11
12
  import { useCustom } from "../CustomProvider/index.js";
@@ -21,7 +22,7 @@ const Stat = forwardRef((props, ref) => {
21
22
  propsWithDefaults
22
23
  } = useCustom('Stat', props);
23
24
  const {
24
- as: Component = 'div',
25
+ as,
25
26
  classPrefix = 'stat',
26
27
  className,
27
28
  children,
@@ -37,7 +38,8 @@ const Stat = forwardRef((props, ref) => {
37
38
  const classes = merge(className, withPrefix({
38
39
  bordered
39
40
  }));
40
- return /*#__PURE__*/React.createElement(Component, _extends({
41
+ return /*#__PURE__*/React.createElement(Box, _extends({
42
+ as: as,
41
43
  className: classes,
42
44
  ref: ref
43
45
  }, rest), icon && /*#__PURE__*/React.createElement("div", {
@@ -1,7 +1,4 @@
1
1
  import { ComponentProps } from '../internals/utils';
2
2
  export type StatHelpTextProps = ComponentProps;
3
- declare const StatHelpText: import("../internals/types").InternalRefForwardingComponent<"span", Partial<{
4
- name: string;
5
- componentAs: "span";
6
- }>, never> & Record<string, never>;
3
+ declare const StatHelpText: import("../internals/types").InternalRefForwardingComponent<"span", Partial<ComponentProps>, never> & Record<string, never>;
7
4
  export default StatHelpText;
File without changes
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import type { WithAsProps } from '../internals/types';
3
- export interface StatLabelProps extends WithAsProps {
2
+ import { BoxProps } from '../internals/Box';
3
+ export interface StatLabelProps extends BoxProps {
4
4
  /**
5
5
  * The info tip of the label
6
6
  */
@@ -5,11 +5,12 @@ import InfoOutlineIcon from '@rsuite/icons/InfoOutline';
5
5
  import Whisper from "../Whisper/index.js";
6
6
  import Tooltip from "../Tooltip/index.js";
7
7
  import IconButton from "../IconButton/index.js";
8
+ import Box from "../internals/Box/index.js";
8
9
  import { forwardRef } from "../internals/utils/index.js";
9
10
  import { useStyles } from "../internals/hooks/index.js";
10
11
  const StatLabel = forwardRef((props, ref) => {
11
12
  const {
12
- as: Component = 'dt',
13
+ as = 'dt',
13
14
  classPrefix = 'stat-label',
14
15
  className,
15
16
  children,
@@ -24,7 +25,8 @@ const StatLabel = forwardRef((props, ref) => {
24
25
  const classes = merge(className, withPrefix({
25
26
  uppercase
26
27
  }));
27
- return /*#__PURE__*/React.createElement(Component, _extends({
28
+ return /*#__PURE__*/React.createElement(Box, _extends({
29
+ as: as,
28
30
  ref: ref,
29
31
  className: classes
30
32
  }, rest), children, info && /*#__PURE__*/React.createElement(Whisper, {
@@ -1,5 +1,5 @@
1
- import type { WithAsProps } from '../internals/types';
2
- export interface StatTrendProps extends WithAsProps {
1
+ import { BoxProps } from '../internals/Box';
2
+ export interface StatTrendProps extends BoxProps {
3
3
  indicator?: 'up' | 'down';
4
4
  appearance?: 'default' | 'subtle';
5
5
  }
@@ -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 { forwardRef } from "../internals/utils/index.js";
6
7
  const svgProps = {
@@ -30,7 +31,7 @@ const ArrowDown = props => {
30
31
  };
31
32
  const StatTrend = forwardRef((props, ref) => {
32
33
  const {
33
- as: Component = 'span',
34
+ as = 'span',
34
35
  appearance = 'default',
35
36
  classPrefix = 'stat-trend',
36
37
  indicator = 'up',
@@ -45,7 +46,8 @@ const StatTrend = forwardRef((props, ref) => {
45
46
  } = useStyles(classPrefix);
46
47
  const classes = merge(className, withPrefix(appearance, indicator));
47
48
  const IndicatorIcon = indicator === 'up' ? ArrowUp : ArrowDown;
48
- return /*#__PURE__*/React.createElement(Component, _extends({
49
+ return /*#__PURE__*/React.createElement(Box, _extends({
50
+ as: as,
49
51
  ref: ref,
50
52
  className: classes
51
53
  }, rest), children, /*#__PURE__*/React.createElement(IndicatorIcon, {
@@ -1,5 +1,5 @@
1
- import type { WithAsProps } from '../internals/types';
2
- export interface StatValueProps extends WithAsProps {
1
+ import { BoxProps } from '../internals/Box';
2
+ export interface StatValueProps extends BoxProps {
3
3
  value?: number;
4
4
  formatOptions?: Intl.NumberFormatOptions;
5
5
  }
@@ -1,12 +1,13 @@
1
1
  'use client';
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  import React from 'react';
4
+ import Box from "../internals/Box/index.js";
4
5
  import { forwardRef } from "../internals/utils/index.js";
5
6
  import { useStyles } from "../internals/hooks/index.js";
6
7
  import { FormattedNumber } from "../CustomProvider/index.js";
7
8
  const StatValue = forwardRef((props, ref) => {
8
9
  const {
9
- as: Component = 'dd',
10
+ as = 'dd',
10
11
  classPrefix = 'stat-value',
11
12
  className,
12
13
  children,
@@ -19,7 +20,8 @@ const StatValue = forwardRef((props, ref) => {
19
20
  withPrefix
20
21
  } = useStyles(classPrefix);
21
22
  const classes = merge(className, withPrefix());
22
- return /*#__PURE__*/React.createElement(Component, _extends({
23
+ return /*#__PURE__*/React.createElement(Box, _extends({
24
+ as: as,
23
25
  ref: ref,
24
26
  className: classes
25
27
  }, rest), value && /*#__PURE__*/React.createElement(FormattedNumber, {
@@ -1,7 +1,4 @@
1
1
  import { ComponentProps } from '../internals/utils';
2
2
  export type StatValueUnitProps = ComponentProps;
3
- declare const StatValueUnit: import("../internals/types").InternalRefForwardingComponent<"span", Partial<{
4
- name: string;
5
- componentAs: "span";
6
- }>, never> & Record<string, never>;
3
+ declare const StatValueUnit: import("../internals/types").InternalRefForwardingComponent<"span", Partial<ComponentProps>, never> & Record<string, never>;
7
4
  export default StatValueUnit;
File without changes
@@ -1,5 +1,5 @@
1
- import type { WithAsProps } from '../internals/types';
2
- export interface StatGroupProps extends WithAsProps {
1
+ import { BoxProps } from '../internals/Box';
2
+ export interface StatGroupProps extends BoxProps {
3
3
  /**
4
4
  * The number of columns in the group
5
5
  */
@@ -1,6 +1,7 @@
1
1
  'use client';
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  import React from 'react';
4
+ import Box from "../internals/Box/index.js";
4
5
  import { forwardRef, getCssValue, mergeStyles } from "../internals/utils/index.js";
5
6
  import { useStyles } from "../internals/hooks/index.js";
6
7
  import { useCustom } from "../CustomProvider/index.js";
@@ -9,7 +10,7 @@ const StatGroup = forwardRef((props, ref) => {
9
10
  propsWithDefaults
10
11
  } = useCustom('StatGroup', props);
11
12
  const {
12
- as: Component = 'div',
13
+ as,
13
14
  classPrefix = 'stat-group',
14
15
  className,
15
16
  children,
@@ -25,7 +26,8 @@ const StatGroup = forwardRef((props, ref) => {
25
26
  } = useStyles(classPrefix);
26
27
  const classes = merge(className, withPrefix());
27
28
  const styles = mergeStyles(style, cssVar('columns', columns), cssVar('spacing', spacing, getCssValue));
28
- return /*#__PURE__*/React.createElement(Component, _extends({
29
+ return /*#__PURE__*/React.createElement(Box, _extends({
30
+ as: as,
29
31
  ref: ref,
30
32
  className: classes,
31
33
  style: styles
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import type { WithAsProps } from '../internals/types';
3
- export interface StepsProps extends WithAsProps {
2
+ import { BoxProps } from '../internals/Box';
3
+ export interface StepsProps extends BoxProps {
4
4
  /** Vertical display */
5
5
  vertical?: boolean;
6
6
  /** Small size Step Bar */
@@ -2,6 +2,7 @@
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  import React from 'react';
4
4
  import StepItem from "./StepItem.js";
5
+ import Box from "../internals/Box/index.js";
5
6
  import { forwardRef, ReactChildren } from "../internals/utils/index.js";
6
7
  import { useStyles } from "../internals/hooks/index.js";
7
8
  import { useCustom } from "../CustomProvider/index.js";
@@ -19,7 +20,7 @@ const Steps = forwardRef((props, ref) => {
19
20
  propsWithDefaults
20
21
  } = useCustom('Steps', props);
21
22
  const {
22
- as: Component = 'div',
23
+ as,
23
24
  classPrefix = 'steps',
24
25
  className,
25
26
  children,
@@ -67,10 +68,11 @@ const Steps = forwardRef((props, ref) => {
67
68
  }
68
69
  return itemProps;
69
70
  });
70
- return /*#__PURE__*/React.createElement(Component, _extends({}, rest, {
71
+ return /*#__PURE__*/React.createElement(Box, _extends({
72
+ as: as,
71
73
  ref: ref,
72
74
  className: classes
73
- }), items);
75
+ }, rest), items);
74
76
  }, Subcomponents);
75
77
  Steps.displayName = 'Steps';
76
78
  export default Steps;
@@ -1,5 +1,5 @@
1
- import type { WithAsProps } from '../internals/types';
2
- export interface TabPanelProps extends WithAsProps {
1
+ import { BoxProps } from '../internals/Box';
2
+ export interface TabPanelProps extends BoxProps {
3
3
  /** The active state of the tab. */
4
4
  active?: boolean;
5
5
  /** The HTML id attribute, which should be unique. */
@@ -1,11 +1,12 @@
1
1
  'use client';
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  import React from 'react';
4
+ import Box from "../internals/Box/index.js";
4
5
  import { forwardRef } from "../internals/utils/index.js";
5
6
  import { useStyles } from "../internals/hooks/index.js";
6
7
  const TabPanel = forwardRef((props, ref) => {
7
8
  const {
8
- as: Component = 'div',
9
+ as,
9
10
  classPrefix = 'tab-panel',
10
11
  children,
11
12
  active,
@@ -16,7 +17,8 @@ const TabPanel = forwardRef((props, ref) => {
16
17
  withPrefix,
17
18
  merge
18
19
  } = useStyles(classPrefix);
19
- return /*#__PURE__*/React.createElement(Component, _extends({
20
+ return /*#__PURE__*/React.createElement(Box, _extends({
21
+ as: as,
20
22
  role: "tabpanel",
21
23
  ref: ref,
22
24
  tabIndex: 0,
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- import type { WithAsProps } from '../internals/types';
2
+ import { BoxProps } from '../internals/Box';
3
3
  /**
4
4
  * Props for the Tabs component.
5
5
  */
6
- export interface TabsProps extends WithAsProps {
6
+ export interface TabsProps extends BoxProps {
7
7
  /**
8
8
  * The appearance of the tabs.
9
9
  * @default 'tabs'
package/esm/Tabs/Tabs.js CHANGED
@@ -4,6 +4,7 @@ import React from 'react';
4
4
  import Nav from "../Nav/index.js";
5
5
  import Tab from "./Tab.js";
6
6
  import TabPanel from "./TabPanel.js";
7
+ import Box from "../internals/Box/index.js";
7
8
  import { forwardRef, ReactChildren } from "../internals/utils/index.js";
8
9
  import { useStyles, useControlled, useEventCallback, useUniqueId } from "../internals/hooks/index.js";
9
10
  import { useCustom } from "../CustomProvider/index.js";
@@ -114,7 +115,7 @@ const Tabs = forwardRef((props, ref) => {
114
115
  rtl
115
116
  } = useCustom('Tabs', props);
116
117
  const {
117
- as: Component = 'div',
118
+ as,
118
119
  classPrefix = 'tabs',
119
120
  appearance = 'tabs',
120
121
  className,
@@ -180,7 +181,8 @@ const Tabs = forwardRef((props, ref) => {
180
181
  }
181
182
  });
182
183
  const hasChildren = React.Children.toArray(children).some(child => /*#__PURE__*/React.isValidElement(child) && child.props.children);
183
- return /*#__PURE__*/React.createElement(Component, _extends({
184
+ return /*#__PURE__*/React.createElement(Box, _extends({
185
+ as: as,
184
186
  className: merge(className, withPrefix({
185
187
  reversed,
186
188
  vertical
package/esm/Tag/Tag.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
- import type { WithAsProps, Color } from '../internals/types';
2
+ import { BoxProps } from '../internals/Box';
3
+ import type { Color } from '../internals/types';
3
4
  import type { CommonLocale } from '../locales';
4
- export interface TagProps extends WithAsProps {
5
+ export interface TagProps extends BoxProps {
5
6
  /** Different sizes */
6
7
  size?: 'lg' | 'md' | 'sm';
7
8
  /** A tag can have different colors */
package/esm/Tag/Tag.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 CloseButton from "../internals/CloseButton/index.js";
5
+ import Box from "../internals/Box/index.js";
5
6
  import { useStyles } from "../internals/hooks/index.js";
6
7
  import { useCustom } from "../CustomProvider/index.js";
7
8
  import { forwardRef, mergeStyles, isPresetColor, createColorVariables } from "../internals/utils/index.js";
@@ -17,7 +18,7 @@ const Tag = forwardRef((props, ref) => {
17
18
  getLocale
18
19
  } = useCustom('Tag', props);
19
20
  const {
20
- as: Component = 'div',
21
+ as,
21
22
  classPrefix = 'tag',
22
23
  size = 'md',
23
24
  color,
@@ -39,7 +40,8 @@ const Tag = forwardRef((props, ref) => {
39
40
  } = useStyles(classPrefix);
40
41
  const classes = merge(className, withPrefix(size, isPresetColor(color) && color));
41
42
  const styles = useMemo(() => mergeStyles(style, createColorVariables(color, '--rs-tag-bg', '--rs-tag-text')), [style, color]);
42
- return /*#__PURE__*/React.createElement(Component, _extends({
43
+ return /*#__PURE__*/React.createElement(Box, _extends({
44
+ as: as,
43
45
  ref: ref,
44
46
  className: classes,
45
47
  style: styles
@@ -5,7 +5,5 @@ export type TagGroupProps = ComponentProps;
5
5
  *
6
6
  * @see https://rsuitejs.com/components/tag/
7
7
  */
8
- declare const TagGroup: import("../internals/types").InternalRefForwardingComponent<"div", Partial<{
9
- name: string;
10
- }>, never> & Record<string, never>;
8
+ declare const TagGroup: import("../internals/types").InternalRefForwardingComponent<"div", Partial<ComponentProps>, never> & Record<string, never>;
11
9
  export default TagGroup;
File without changes
@@ -1,11 +1,11 @@
1
- import React from 'react';
2
- import { WithAsProps, Color, TextSize } from '../internals/types';
3
- export interface TextProps extends WithAsProps {
1
+ import { BoxProps } from '../internals/Box';
2
+ import { TextSize } from '../internals/types';
3
+ export interface TextProps extends BoxProps {
4
4
  /**
5
5
  * The font color of the text.
6
6
  * Accepts preset colors or CSS color values
7
7
  */
8
- color?: Color | React.CSSProperties['color'];
8
+ color?: BoxProps['c'];
9
9
  /**
10
10
  * The font size of the text.
11
11
  */
package/esm/Text/Text.js CHANGED
@@ -1,11 +1,10 @@
1
1
  'use client';
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
- import React, { useMemo } from 'react';
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
- import { forwardRef, mergeStyles, isPresetColor, createColorVariables } from "../internals/utils/index.js";
7
- import { TypographySizeEnum } from "../internals/types/index.js";
8
- const fontSizes = Object.values(TypographySizeEnum);
7
+ import { forwardRef, mergeStyles, getSizeStyle } from "../internals/utils/index.js";
9
8
  /**
10
9
  *
11
10
  * The `Text` component is used to display text.
@@ -17,7 +16,7 @@ const Text = forwardRef((props, ref) => {
17
16
  propsWithDefaults
18
17
  } = useCustom('Text', props);
19
18
  const {
20
- as: Component = 'p',
19
+ as = 'p',
21
20
  align,
22
21
  classPrefix = 'text',
23
22
  color,
@@ -32,29 +31,21 @@ const Text = forwardRef((props, ref) => {
32
31
  } = propsWithDefaults;
33
32
  const {
34
33
  withPrefix,
34
+ cssVar,
35
35
  merge
36
36
  } = useStyles(classPrefix);
37
- const hasSize = size && fontSizes.includes(size);
38
- const classes = merge(className, withPrefix(isPresetColor(color) && color, align, weight, transform, hasSize && size, {
37
+ const classes = merge(className, withPrefix(align, weight, transform, {
39
38
  muted,
40
39
  ellipsis: maxLines
41
40
  }));
42
- const styles = useMemo(() => {
43
- const textStyles = mergeStyles({
44
- ...(maxLines ? {
45
- WebkitLineClamp: maxLines
46
- } : null)
47
- }, createColorVariables(color, '--rs-text-color'), style);
48
- if (size && !hasSize) {
49
- textStyles.fontSize = size;
50
- }
51
- return textStyles;
52
- }, [style, color, size, maxLines]);
53
- return /*#__PURE__*/React.createElement(Component, _extends({}, rest, {
41
+ const styles = mergeStyles(style, getSizeStyle(size, 'font'), cssVar('max-lines', maxLines));
42
+ return /*#__PURE__*/React.createElement(Box, _extends({
43
+ as: as,
44
+ c: color,
54
45
  ref: ref,
55
46
  className: classes,
56
47
  style: styles
57
- }));
48
+ }, rest));
58
49
  });
59
50
  Text.displayName = 'Text';
60
51
  export default Text;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import type { WithAsProps } from '../internals/types';
3
- export interface TimelineProps extends WithAsProps {
2
+ import { BoxProps } from '../internals/Box';
3
+ export interface TimelineProps extends BoxProps {
4
4
  /** The content of the component */
5
5
  children?: React.ReactNode;
6
6
  /** TimeLine content relative position **/
@@ -3,6 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  import React from 'react';
4
4
  import some from 'lodash/some';
5
5
  import TimelineItem from "./TimelineItem.js";
6
+ import Box from "../internals/Box/index.js";
6
7
  import { useStyles } from "../internals/hooks/index.js";
7
8
  import { useCustom } from "../CustomProvider/index.js";
8
9
  import { forwardRef, ReactChildren } from "../internals/utils/index.js";
@@ -24,8 +25,8 @@ const Timeline = forwardRef((props, ref) => {
24
25
  propsWithDefaults
25
26
  } = useCustom('Timeline', props);
26
27
  const {
28
+ as = 'ul',
27
29
  children,
28
- as: Component = 'ul',
29
30
  classPrefix = 'timeline',
30
31
  className,
31
32
  align = 'left',
@@ -46,10 +47,11 @@ const Timeline = forwardRef((props, ref) => {
46
47
  endless,
47
48
  'with-time': withTime
48
49
  }));
49
- return /*#__PURE__*/React.createElement(Component, _extends({}, rest, {
50
+ return /*#__PURE__*/React.createElement(Box, _extends({
51
+ as: as,
50
52
  ref: ref,
51
53
  className: classes
52
- }), ReactChildren.mapCloneElement(children, (_child, index) => ({
54
+ }, rest), ReactChildren.mapCloneElement(children, (_child, index) => ({
53
55
  last: index + 1 === count,
54
56
  INTERNAL_active: isItemActive(index, count),
55
57
  align
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import type { WithAsProps } from '../internals/types';
3
- export interface TimelineItemProps extends WithAsProps {
2
+ import { BoxProps } from '../internals/Box';
3
+ export interface TimelineItemProps extends BoxProps {
4
4
  /**
5
5
  * Whether the last item
6
6
  *
@@ -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 { forwardRef } from "../internals/utils/index.js";
6
7
  /**
@@ -10,7 +11,7 @@ import { forwardRef } from "../internals/utils/index.js";
10
11
  */
11
12
  const TimelineItem = forwardRef((props, ref) => {
12
13
  const {
13
- as: Component = 'li',
14
+ as = 'li',
14
15
  children,
15
16
  classPrefix = 'timeline-item',
16
17
  last: DEPRECATED_last,
@@ -29,10 +30,11 @@ const TimelineItem = forwardRef((props, ref) => {
29
30
  last: DEPRECATED_last,
30
31
  active: INTERNAL_active
31
32
  }));
32
- return /*#__PURE__*/React.createElement(Component, _extends({}, rest, {
33
+ return /*#__PURE__*/React.createElement(Box, _extends({
34
+ as: as,
33
35
  ref: ref,
34
36
  className: classes
35
- }), /*#__PURE__*/React.createElement("span", {
37
+ }, rest), /*#__PURE__*/React.createElement("span", {
36
38
  className: prefix('tail')
37
39
  }), /*#__PURE__*/React.createElement("span", {
38
40
  className: prefix('dot', {
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
- import type { SanitizedInputProps, WithAsProps, Color, Size } from '../internals/types';
2
+ import { BoxProps } from '../internals/Box';
3
+ import type { SanitizedInputProps, Color, Size } from '../internals/types';
3
4
  import type { ToggleLocale } from '../locales';
4
- export interface ToggleProps extends WithAsProps, SanitizedInputProps {
5
+ export interface ToggleProps extends BoxProps, SanitizedInputProps {
5
6
  /**
6
7
  * The color of the toggle.
7
8
  */
@@ -3,6 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  import React, { useRef } from 'react';
4
4
  import Plaintext from "../internals/Plaintext/index.js";
5
5
  import Loader from "../Loader/index.js";
6
+ import Box from "../internals/Box/index.js";
6
7
  import { useStyles, useControlled, useUniqueId, useEventCallback } from "../internals/hooks/index.js";
7
8
  import { forwardRef, partitionHTMLProps } from "../internals/utils/index.js";
8
9
  import { useCustom } from "../CustomProvider/index.js";
@@ -16,7 +17,7 @@ const Toggle = forwardRef((props, ref) => {
16
17
  propsWithDefaults
17
18
  } = useCustom('Toggle', props);
18
19
  const {
19
- as: Component = 'span',
20
+ as = 'label',
20
21
  disabled,
21
22
  readOnly,
22
23
  loading = false,
@@ -65,7 +66,8 @@ const Toggle = forwardRef((props, ref) => {
65
66
  if (plaintext) {
66
67
  return /*#__PURE__*/React.createElement(Plaintext, null, inner || label);
67
68
  }
68
- return /*#__PURE__*/React.createElement("label", _extends({
69
+ return /*#__PURE__*/React.createElement(Box, _extends({
70
+ as: as,
69
71
  ref: ref,
70
72
  className: classes
71
73
  }, restProps), /*#__PURE__*/React.createElement("input", _extends({}, htmlInputProps, {
@@ -83,7 +85,7 @@ const Toggle = forwardRef((props, ref) => {
83
85
  "aria-labelledby": labelledby,
84
86
  "aria-label": labelledby ? undefined : label,
85
87
  "aria-busy": loading || undefined
86
- })), /*#__PURE__*/React.createElement(Component, {
88
+ })), /*#__PURE__*/React.createElement("span", {
87
89
  className: prefix('presentation')
88
90
  }, /*#__PURE__*/React.createElement("span", {
89
91
  className: prefix('inner'),
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
- import type { Placement, WithAsProps } from '../internals/types';
3
- export interface TooltipProps extends WithAsProps {
2
+ import { BoxProps } from '../internals/Box';
3
+ import type { Placement } from '../internals/types';
4
+ export interface TooltipProps extends BoxProps {
4
5
  /** Dispaly placement */
5
6
  placement?: Placement;
6
7
  /** Whether visible */