rsuite 6.0.0-canary-2025032014 → 6.0.0-canary-20250416

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 (484) hide show
  1. package/AutoComplete/styles/index.css +112 -62
  2. package/AutoComplete/styles/index.less +1 -1
  3. package/Box/styles/index.css +12 -0
  4. package/CHANGELOG.md +24 -0
  5. package/Calendar/styles/index.css +11 -9
  6. package/Calendar/styles/index.less +3 -1
  7. package/Cascader/styles/index.css +112 -62
  8. package/CheckPicker/styles/index.css +112 -62
  9. package/CheckPicker/styles/index.less +1 -1
  10. package/CheckTree/styles/index.css +113 -63
  11. package/CheckTree/styles/index.less +1 -1
  12. package/CheckTreePicker/styles/index.css +113 -63
  13. package/DateInput/styles/index.css +0 -7
  14. package/DatePicker/styles/index.css +122 -74
  15. package/DatePicker/styles/index.less +5 -11
  16. package/DateRangeInput/styles/index.css +0 -7
  17. package/DateRangePicker/styles/index.css +132 -78
  18. package/DateRangePicker/styles/index.less +10 -4
  19. package/Divider/styles/index.css +2 -2
  20. package/Divider/styles/index.less +2 -2
  21. package/Grid/styles/columns.less +1 -2
  22. package/Grid/styles/grid-framework.less +1 -0
  23. package/Grid/styles/index.css +9 -4
  24. package/Grid/styles/row.less +2 -2
  25. package/Input/styles/index.css +0 -7
  26. package/Input/styles/index.less +0 -6
  27. package/Input/styles/mixin.less +0 -4
  28. package/InputGroup/styles/index.css +1 -1
  29. package/InputGroup/styles/index.less +1 -1
  30. package/InputNumber/styles/index.css +1 -8
  31. package/InputPicker/styles/index.css +121 -70
  32. package/InputPicker/styles/index.less +4 -4
  33. package/Link/package.json +7 -0
  34. package/Link/styles/index.css +32 -0
  35. package/Link/styles/index.less +39 -0
  36. package/Message/styles/index.css +9 -0
  37. package/Message/styles/index.less +11 -0
  38. package/MultiCascadeTree/styles/index.css +112 -62
  39. package/MultiCascader/styles/index.css +112 -62
  40. package/Nav/styles/index.css +1 -0
  41. package/Nav/styles/index.less +1 -0
  42. package/Pagination/styles/index.css +114 -64
  43. package/PasswordInput/package.json +7 -0
  44. package/PasswordInput/styles/index.css +172 -0
  45. package/PasswordInput/styles/index.less +1 -0
  46. package/PasswordStrengthMeter/package.json +7 -0
  47. package/PasswordStrengthMeter/styles/index.css +33 -0
  48. package/PasswordStrengthMeter/styles/index.less +39 -0
  49. package/README.md +3 -3
  50. package/RadioGroup/styles/index.css +1 -0
  51. package/RadioGroup/styles/index.less +1 -0
  52. package/RangeSlider/styles/index.css +76 -43
  53. package/Rate/styles/index.css +48 -34
  54. package/Rate/styles/index.less +32 -21
  55. package/SelectPicker/styles/index.css +112 -62
  56. package/SelectPicker/styles/index.less +1 -1
  57. package/Slider/styles/index.css +76 -43
  58. package/Slider/styles/index.less +95 -48
  59. package/Tabs/styles/index.css +1 -0
  60. package/TagInput/styles/index.css +152 -91
  61. package/TagInput/styles/index.less +1 -1
  62. package/TagPicker/styles/index.css +151 -90
  63. package/TagPicker/styles/index.less +52 -41
  64. package/Textarea/package.json +7 -0
  65. package/Textarea/styles/index.css +6 -0
  66. package/Textarea/styles/index.less +7 -0
  67. package/TimePicker/styles/index.css +122 -74
  68. package/TimeRangePicker/styles/index.css +132 -78
  69. package/Toggle/styles/index.css +146 -87
  70. package/Toggle/styles/index.less +66 -38
  71. package/Tree/styles/index.css +113 -63
  72. package/Tree/styles/index.less +1 -1
  73. package/TreePicker/styles/index.css +113 -63
  74. package/cjs/AutoComplete/AutoComplete.d.ts +1 -1
  75. package/cjs/AutoComplete/AutoComplete.js +13 -11
  76. package/cjs/Avatar/Avatar.d.ts +3 -4
  77. package/cjs/Breadcrumb/Breadcrumb.js +2 -2
  78. package/cjs/Breadcrumb/BreadcrumbItem.js +1 -1
  79. package/cjs/Button/Button.js +9 -10
  80. package/cjs/Calendar/CalendarProvider.js +0 -0
  81. package/cjs/Calendar/hooks/useCalendar.js +0 -0
  82. package/cjs/Carousel/Carousel.js +2 -2
  83. package/cjs/Cascader/Cascader.js +42 -45
  84. package/cjs/Cascader/useActive.d.ts +6 -4
  85. package/cjs/Cascader/useActive.js +10 -8
  86. package/cjs/CheckPicker/CheckPicker.js +38 -41
  87. package/cjs/CheckTreePicker/CheckTreePicker.js +20 -22
  88. package/cjs/CustomProvider/CustomProvider.d.ts +1 -4
  89. package/cjs/CustomProvider/types.d.ts +10 -2
  90. package/cjs/DatePicker/DatePicker.d.ts +1 -1
  91. package/cjs/DatePicker/DatePicker.js +28 -25
  92. package/cjs/DatePicker/utils.d.ts +3 -3
  93. package/cjs/DatePicker/utils.js +3 -3
  94. package/cjs/DateRangePicker/DateRangePicker.js +39 -33
  95. package/cjs/DateRangePicker/utils.js +0 -0
  96. package/cjs/Divider/Divider.d.ts +3 -2
  97. package/cjs/Divider/Divider.js +2 -2
  98. package/cjs/Form/hooks/useFormValidate.js +0 -0
  99. package/cjs/Form/hooks/useSchemaModel.js +2 -54
  100. package/cjs/Form/utils/constructFlatSchema.d.ts +4 -0
  101. package/cjs/Form/utils/constructFlatSchema.js +41 -0
  102. package/cjs/FormControl/hooks/useField.js +0 -0
  103. package/cjs/FormControl/utils.js +0 -0
  104. package/cjs/Grid/Row.d.ts +2 -2
  105. package/cjs/Grid/Row.js +2 -20
  106. package/cjs/Grid/types.d.ts +1 -0
  107. package/cjs/Grid/utils/styles.d.ts +6 -0
  108. package/cjs/Grid/utils/styles.js +43 -0
  109. package/cjs/Image/Image.js +12 -11
  110. package/cjs/Image/hooks/useImage.d.ts +2 -0
  111. package/cjs/Image/hooks/useImage.js +19 -43
  112. package/cjs/InlineEdit/InlineEdit.js +3 -1
  113. package/cjs/InlineEdit/useEditState.d.ts +2 -0
  114. package/cjs/InlineEdit/useEditState.js +8 -0
  115. package/cjs/Input/Input.d.ts +3 -12
  116. package/cjs/Input/Input.js +12 -73
  117. package/cjs/InputPicker/InputPicker.js +27 -28
  118. package/cjs/Link/ExternalLinkIcon.d.ts +3 -0
  119. package/cjs/Link/ExternalLinkIcon.js +23 -0
  120. package/cjs/Link/Link.d.ts +14 -0
  121. package/cjs/Link/Link.js +52 -0
  122. package/cjs/Link/index.d.ts +4 -0
  123. package/cjs/Link/index.js +11 -0
  124. package/cjs/List/List.js +6 -2
  125. package/cjs/List/helper/useSortHelper.d.ts +7 -5
  126. package/cjs/List/helper/useSortHelper.js +109 -16
  127. package/cjs/List/helper/utils.js +14 -6
  128. package/cjs/MultiCascader/MultiCascader.js +40 -43
  129. package/cjs/Nav/NavItem.js +1 -1
  130. package/cjs/Nav/NavMegaMenu.d.ts +5 -0
  131. package/cjs/Nav/NavMegaMenu.js +5 -0
  132. package/cjs/Navbar/NavbarItem.js +1 -1
  133. package/cjs/Navbar/NavbarMegaMenu.js +1 -1
  134. package/cjs/PasswordInput/PasswordInput.d.ts +14 -0
  135. package/cjs/PasswordInput/PasswordInput.js +71 -0
  136. package/cjs/PasswordInput/index.d.ts +4 -0
  137. package/cjs/PasswordInput/index.js +11 -0
  138. package/cjs/PasswordStrengthMeter/PasswordStrengthMeter.d.ts +12 -0
  139. package/cjs/PasswordStrengthMeter/PasswordStrengthMeter.js +50 -0
  140. package/cjs/PasswordStrengthMeter/index.d.ts +4 -0
  141. package/cjs/PasswordStrengthMeter/index.js +11 -0
  142. package/cjs/RangeSlider/RangeSlider.js +18 -3
  143. package/cjs/Rate/Character.d.ts +4 -3
  144. package/cjs/Rate/Character.js +19 -15
  145. package/cjs/Rate/Rate.d.ts +10 -2
  146. package/cjs/Rate/Rate.js +47 -42
  147. package/cjs/Rate/types.d.ts +8 -0
  148. package/cjs/Rate/types.js +4 -0
  149. package/cjs/Rate/useRatingStates.d.ts +20 -0
  150. package/cjs/Rate/useRatingStates.js +48 -0
  151. package/cjs/Rate/utils.d.ts +14 -3
  152. package/cjs/Rate/utils.js +50 -9
  153. package/cjs/SelectPicker/SelectPicker.js +45 -46
  154. package/cjs/Sidenav/ExpandedSidenavDropdownItem.js +1 -1
  155. package/cjs/Sidenav/SidenavItem.js +1 -1
  156. package/cjs/Slider/Graduated.d.ts +4 -0
  157. package/cjs/Slider/Graduated.js +43 -20
  158. package/cjs/Slider/Handle.d.ts +1 -1
  159. package/cjs/Slider/Handle.js +12 -12
  160. package/cjs/Slider/Slider.d.ts +16 -1
  161. package/cjs/Slider/Slider.js +7 -2
  162. package/cjs/Slider/useDrag.d.ts +1 -0
  163. package/cjs/Slider/useDrag.js +8 -3
  164. package/cjs/Steps/Steps.js +2 -2
  165. package/cjs/Tabs/Tabs.js +2 -2
  166. package/cjs/Textarea/Textarea.d.ts +32 -0
  167. package/cjs/Textarea/Textarea.js +51 -0
  168. package/cjs/Textarea/index.d.ts +4 -0
  169. package/cjs/Textarea/index.js +11 -0
  170. package/cjs/Timeline/Timeline.js +2 -2
  171. package/cjs/Toggle/Toggle.d.ts +10 -1
  172. package/cjs/Toggle/Toggle.js +12 -9
  173. package/cjs/TreePicker/TreePicker.js +18 -19
  174. package/cjs/index.d.ts +4 -1
  175. package/cjs/index.js +24 -6
  176. package/cjs/internals/Box/Box.d.ts +4 -0
  177. package/cjs/internals/Box/Box.js +1 -1
  178. package/cjs/internals/Box/utils.js +5 -1
  179. package/cjs/internals/InputBase/InputBase.d.ts +45 -0
  180. package/cjs/internals/InputBase/InputBase.js +96 -0
  181. package/cjs/internals/InputBase/index.d.ts +3 -0
  182. package/cjs/internals/InputBase/index.js +8 -0
  183. package/cjs/internals/Overlay/Modal.d.ts +1 -1
  184. package/cjs/internals/Overlay/OverlayTrigger.d.ts +4 -3
  185. package/cjs/internals/Overlay/OverlayTrigger.js +8 -3
  186. package/cjs/internals/Picker/Listbox.js +7 -9
  187. package/cjs/internals/Picker/PickerDrawer.d.ts +8 -0
  188. package/cjs/internals/Picker/PickerDrawer.js +31 -0
  189. package/cjs/internals/Picker/PickerPopup.js +5 -3
  190. package/cjs/internals/Picker/PickerToggle.d.ts +1 -0
  191. package/cjs/internals/Picker/PickerToggle.js +10 -3
  192. package/cjs/internals/Picker/PickerToggleTrigger.d.ts +51 -11
  193. package/cjs/internals/Picker/PickerToggleTrigger.js +59 -13
  194. package/cjs/internals/Picker/hooks/index.d.ts +0 -1
  195. package/cjs/internals/Picker/hooks/index.js +2 -4
  196. package/cjs/internals/Picker/hooks/useCombobox.d.ts +1 -0
  197. package/cjs/internals/Picker/hooks/useCombobox.js +3 -1
  198. package/cjs/internals/Picker/index.d.ts +1 -2
  199. package/cjs/internals/Picker/index.js +10 -12
  200. package/{esm → cjs/internals}/SafeAnchor/SafeAnchor.d.ts +2 -2
  201. package/cjs/{SafeAnchor → internals/SafeAnchor}/SafeAnchor.js +3 -3
  202. package/cjs/internals/Tree/TreeView.js +3 -4
  203. package/cjs/internals/hooks/useRootClose.js +4 -4
  204. package/cjs/internals/index.d.ts +4 -0
  205. package/cjs/internals/index.js +13 -1
  206. package/cjs/internals/types/html.d.ts +2 -0
  207. package/cjs/internals/utils/{dom.d.ts → html/dom.d.ts} +1 -0
  208. package/cjs/internals/utils/{dom.js → html/dom.js} +8 -0
  209. package/cjs/internals/utils/{events.js → html/events.js} +0 -0
  210. package/cjs/internals/utils/{htmlPropsUtils.js → html/htmlPropsUtils.js} +0 -0
  211. package/cjs/internals/utils/html/index.d.ts +4 -0
  212. package/cjs/internals/utils/html/index.js +28 -0
  213. package/cjs/internals/utils/{safeSetSelection.js → html/safeSetSelection.js} +1 -1
  214. package/cjs/internals/utils/index.d.ts +3 -15
  215. package/cjs/internals/utils/index.js +20 -49
  216. package/cjs/internals/utils/{ReactChildren.d.ts → react/ReactChildren.d.ts} +2 -8
  217. package/cjs/internals/utils/{ReactChildren.js → react/ReactChildren.js} +5 -25
  218. package/cjs/internals/utils/react/ReactIs.d.ts +7 -0
  219. package/cjs/internals/utils/react/ReactIs.js +26 -0
  220. package/{esm/internals/utils → cjs/internals/utils/react}/createComponent.d.ts +2 -2
  221. package/cjs/internals/utils/{createComponent.js → react/createComponent.js} +3 -3
  222. package/cjs/internals/utils/{deprecateComponent.js → react/deprecateComponent.js} +1 -1
  223. package/cjs/internals/utils/{forwardRef.d.ts → react/forwardRef.d.ts} +1 -1
  224. package/cjs/internals/utils/react/index.d.ts +7 -0
  225. package/cjs/internals/utils/react/index.js +46 -0
  226. package/cjs/internals/utils/{mergeRefs.js → react/mergeRefs.js} +0 -0
  227. package/cjs/internals/utils/{getStringLength.d.ts → string/getStringLength.d.ts} +0 -1
  228. package/cjs/internals/utils/{getStringLength.js → string/getStringLength.js} +1 -3
  229. package/cjs/internals/utils/string/index.d.ts +4 -0
  230. package/cjs/internals/utils/string/index.js +28 -0
  231. package/cjs/internals/utils/{stringifyReactNode.js → string/stringifyReactNode.js} +0 -0
  232. package/cjs/internals/utils/{tplTransform.js → string/tplTransform.js} +0 -0
  233. package/cjs/locales/en_GB.js +2 -2
  234. package/cjs/locales/en_US.js +2 -2
  235. package/cjs/locales/index.js +0 -0
  236. package/cjs/locales/pl_PL.js +2 -3
  237. package/cjs/useBreakpointValue/useBreakpointValue.d.ts +6 -2
  238. package/cjs/useBreakpointValue/useBreakpointValue.js +9 -4
  239. package/cjs/useMediaQuery/breakpoints.d.ts +24 -0
  240. package/cjs/useMediaQuery/breakpoints.js +248 -0
  241. package/cjs/useMediaQuery/index.d.ts +1 -1
  242. package/cjs/useMediaQuery/types.d.ts +45 -0
  243. package/cjs/useMediaQuery/types.js +4 -0
  244. package/cjs/useMediaQuery/useMediaQuery.d.ts +4 -13
  245. package/cjs/useMediaQuery/useMediaQuery.js +30 -12
  246. package/cjs/useToaster/useToaster.d.ts +1 -1
  247. package/cjs/useToaster/useToaster.js +1 -1
  248. package/dist/rsuite-no-reset-rtl.css +565 -276
  249. package/dist/rsuite-no-reset-rtl.min.css +1 -1
  250. package/dist/rsuite-no-reset-rtl.min.css.map +1 -1
  251. package/dist/rsuite-no-reset.css +565 -276
  252. package/dist/rsuite-no-reset.min.css +1 -1
  253. package/dist/rsuite-no-reset.min.css.map +1 -1
  254. package/dist/rsuite-rtl.css +565 -276
  255. package/dist/rsuite-rtl.min.css +1 -1
  256. package/dist/rsuite-rtl.min.css.map +1 -1
  257. package/dist/rsuite.css +565 -276
  258. package/dist/rsuite.js +508 -211
  259. package/dist/rsuite.js.map +1 -1
  260. package/dist/rsuite.min.css +1 -1
  261. package/dist/rsuite.min.css.map +1 -1
  262. package/dist/rsuite.min.js +1 -1
  263. package/dist/rsuite.min.js.map +1 -1
  264. package/esm/AutoComplete/AutoComplete.d.ts +1 -1
  265. package/esm/AutoComplete/AutoComplete.js +13 -11
  266. package/esm/Avatar/Avatar.d.ts +3 -4
  267. package/esm/Breadcrumb/Breadcrumb.js +3 -3
  268. package/esm/Breadcrumb/BreadcrumbItem.js +1 -1
  269. package/esm/Button/Button.js +10 -11
  270. package/esm/Calendar/CalendarProvider.js +0 -0
  271. package/esm/Calendar/hooks/useCalendar.js +0 -0
  272. package/esm/Carousel/Carousel.js +3 -3
  273. package/esm/Cascader/Cascader.js +43 -46
  274. package/esm/Cascader/useActive.d.ts +6 -4
  275. package/esm/Cascader/useActive.js +10 -8
  276. package/esm/CheckPicker/CheckPicker.js +39 -42
  277. package/esm/CheckTreePicker/CheckTreePicker.js +21 -23
  278. package/esm/CustomProvider/CustomProvider.d.ts +1 -4
  279. package/esm/CustomProvider/types.d.ts +10 -2
  280. package/esm/DatePicker/DatePicker.d.ts +1 -1
  281. package/esm/DatePicker/DatePicker.js +29 -26
  282. package/esm/DatePicker/utils.d.ts +3 -3
  283. package/esm/DatePicker/utils.js +4 -4
  284. package/esm/DateRangePicker/DateRangePicker.js +35 -29
  285. package/esm/DateRangePicker/utils.js +0 -0
  286. package/esm/Divider/Divider.d.ts +3 -2
  287. package/esm/Divider/Divider.js +2 -2
  288. package/esm/Form/hooks/useFormValidate.js +0 -0
  289. package/esm/Form/hooks/useSchemaModel.js +3 -55
  290. package/esm/Form/utils/constructFlatSchema.d.ts +4 -0
  291. package/esm/Form/utils/constructFlatSchema.js +37 -0
  292. package/esm/FormControl/hooks/useField.js +0 -0
  293. package/esm/FormControl/utils.js +0 -0
  294. package/esm/Grid/Row.d.ts +2 -2
  295. package/esm/Grid/Row.js +2 -20
  296. package/esm/Grid/types.d.ts +1 -0
  297. package/esm/Grid/utils/styles.d.ts +6 -0
  298. package/esm/Grid/utils/styles.js +37 -0
  299. package/esm/Image/Image.js +12 -11
  300. package/esm/Image/hooks/useImage.d.ts +2 -0
  301. package/esm/Image/hooks/useImage.js +20 -43
  302. package/esm/InlineEdit/InlineEdit.js +3 -1
  303. package/esm/InlineEdit/useEditState.d.ts +2 -0
  304. package/esm/InlineEdit/useEditState.js +8 -0
  305. package/esm/Input/Input.d.ts +3 -12
  306. package/esm/Input/Input.js +12 -74
  307. package/esm/InputPicker/InputPicker.js +28 -29
  308. package/esm/Link/ExternalLinkIcon.d.ts +3 -0
  309. package/esm/Link/ExternalLinkIcon.js +18 -0
  310. package/esm/Link/Link.d.ts +14 -0
  311. package/esm/Link/Link.js +47 -0
  312. package/esm/Link/index.d.ts +4 -0
  313. package/esm/Link/index.js +8 -0
  314. package/esm/List/List.js +6 -2
  315. package/esm/List/helper/useSortHelper.d.ts +7 -5
  316. package/esm/List/helper/useSortHelper.js +109 -16
  317. package/esm/List/helper/utils.js +14 -6
  318. package/esm/MultiCascader/MultiCascader.js +41 -44
  319. package/esm/Nav/NavItem.js +1 -1
  320. package/esm/Nav/NavMegaMenu.d.ts +5 -0
  321. package/esm/Nav/NavMegaMenu.js +5 -0
  322. package/esm/Navbar/NavbarItem.js +1 -1
  323. package/esm/Navbar/NavbarMegaMenu.js +1 -1
  324. package/esm/PasswordInput/PasswordInput.d.ts +14 -0
  325. package/esm/PasswordInput/PasswordInput.js +66 -0
  326. package/esm/PasswordInput/index.d.ts +4 -0
  327. package/esm/PasswordInput/index.js +8 -0
  328. package/esm/PasswordStrengthMeter/PasswordStrengthMeter.d.ts +12 -0
  329. package/esm/PasswordStrengthMeter/PasswordStrengthMeter.js +45 -0
  330. package/esm/PasswordStrengthMeter/index.d.ts +4 -0
  331. package/esm/PasswordStrengthMeter/index.js +8 -0
  332. package/esm/RangeSlider/RangeSlider.js +18 -3
  333. package/esm/Rate/Character.d.ts +4 -3
  334. package/esm/Rate/Character.js +20 -16
  335. package/esm/Rate/Rate.d.ts +10 -2
  336. package/esm/Rate/Rate.js +49 -42
  337. package/esm/Rate/types.d.ts +8 -0
  338. package/esm/Rate/types.js +2 -0
  339. package/esm/Rate/useRatingStates.d.ts +20 -0
  340. package/esm/Rate/useRatingStates.js +43 -0
  341. package/esm/Rate/utils.d.ts +14 -3
  342. package/esm/Rate/utils.js +46 -7
  343. package/esm/SelectPicker/SelectPicker.js +46 -47
  344. package/esm/Sidenav/ExpandedSidenavDropdownItem.js +1 -1
  345. package/esm/Sidenav/SidenavItem.js +1 -1
  346. package/esm/Slider/Graduated.d.ts +4 -0
  347. package/esm/Slider/Graduated.js +43 -20
  348. package/esm/Slider/Handle.d.ts +1 -1
  349. package/esm/Slider/Handle.js +12 -12
  350. package/esm/Slider/Slider.d.ts +16 -1
  351. package/esm/Slider/Slider.js +7 -2
  352. package/esm/Slider/useDrag.d.ts +1 -0
  353. package/esm/Slider/useDrag.js +8 -3
  354. package/esm/Steps/Steps.js +3 -3
  355. package/esm/Tabs/Tabs.js +3 -3
  356. package/esm/Textarea/Textarea.d.ts +32 -0
  357. package/esm/Textarea/Textarea.js +46 -0
  358. package/esm/Textarea/index.d.ts +4 -0
  359. package/esm/Textarea/index.js +8 -0
  360. package/esm/Timeline/Timeline.js +3 -3
  361. package/esm/Toggle/Toggle.d.ts +10 -1
  362. package/esm/Toggle/Toggle.js +12 -9
  363. package/esm/TreePicker/TreePicker.js +19 -20
  364. package/esm/index.d.ts +4 -1
  365. package/esm/index.js +4 -1
  366. package/esm/internals/Box/Box.d.ts +4 -0
  367. package/esm/internals/Box/Box.js +1 -1
  368. package/esm/internals/Box/utils.js +5 -1
  369. package/esm/internals/InputBase/InputBase.d.ts +45 -0
  370. package/esm/internals/InputBase/InputBase.js +89 -0
  371. package/esm/internals/InputBase/index.d.ts +3 -0
  372. package/esm/internals/InputBase/index.js +3 -0
  373. package/esm/internals/Overlay/Modal.d.ts +1 -1
  374. package/esm/internals/Overlay/OverlayTrigger.d.ts +4 -3
  375. package/esm/internals/Overlay/OverlayTrigger.js +8 -2
  376. package/esm/internals/Picker/Listbox.js +8 -10
  377. package/esm/internals/Picker/PickerDrawer.d.ts +8 -0
  378. package/esm/internals/Picker/PickerDrawer.js +26 -0
  379. package/esm/internals/Picker/PickerPopup.js +5 -3
  380. package/esm/internals/Picker/PickerToggle.d.ts +1 -0
  381. package/esm/internals/Picker/PickerToggle.js +10 -3
  382. package/esm/internals/Picker/PickerToggleTrigger.d.ts +51 -11
  383. package/esm/internals/Picker/PickerToggleTrigger.js +59 -12
  384. package/esm/internals/Picker/hooks/index.d.ts +0 -1
  385. package/esm/internals/Picker/hooks/index.js +1 -2
  386. package/esm/internals/Picker/hooks/useCombobox.d.ts +1 -0
  387. package/esm/internals/Picker/hooks/useCombobox.js +3 -1
  388. package/esm/internals/Picker/index.d.ts +1 -2
  389. package/esm/internals/Picker/index.js +1 -2
  390. package/{cjs → esm/internals}/SafeAnchor/SafeAnchor.d.ts +2 -2
  391. package/esm/{SafeAnchor → internals/SafeAnchor}/SafeAnchor.js +3 -3
  392. package/esm/internals/Tree/TreeView.js +4 -5
  393. package/esm/internals/hooks/useRootClose.js +1 -1
  394. package/esm/internals/index.d.ts +4 -0
  395. package/esm/internals/index.js +5 -0
  396. package/esm/internals/types/html.d.ts +2 -0
  397. package/esm/internals/utils/{dom.d.ts → html/dom.d.ts} +1 -0
  398. package/esm/internals/utils/{dom.js → html/dom.js} +7 -0
  399. package/esm/internals/utils/{events.js → html/events.js} +0 -0
  400. package/esm/internals/utils/{htmlPropsUtils.js → html/htmlPropsUtils.js} +0 -0
  401. package/esm/internals/utils/html/index.d.ts +4 -0
  402. package/esm/internals/utils/html/index.js +5 -0
  403. package/esm/internals/utils/{safeSetSelection.js → html/safeSetSelection.js} +1 -1
  404. package/esm/internals/utils/index.d.ts +3 -15
  405. package/esm/internals/utils/index.js +3 -14
  406. package/esm/internals/utils/{ReactChildren.d.ts → react/ReactChildren.d.ts} +2 -8
  407. package/esm/internals/utils/{ReactChildren.js → react/ReactChildren.js} +3 -21
  408. package/esm/internals/utils/react/ReactIs.d.ts +7 -0
  409. package/esm/internals/utils/react/ReactIs.js +22 -0
  410. package/{cjs/internals/utils → esm/internals/utils/react}/createComponent.d.ts +2 -2
  411. package/esm/internals/utils/{createComponent.js → react/createComponent.js} +3 -3
  412. package/esm/internals/utils/{deprecateComponent.js → react/deprecateComponent.js} +1 -1
  413. package/esm/internals/utils/{forwardRef.d.ts → react/forwardRef.d.ts} +1 -1
  414. package/esm/internals/utils/react/index.d.ts +7 -0
  415. package/esm/internals/utils/react/index.js +8 -0
  416. package/esm/internals/utils/{mergeRefs.js → react/mergeRefs.js} +0 -0
  417. package/esm/internals/utils/{getStringLength.d.ts → string/getStringLength.d.ts} +0 -1
  418. package/esm/internals/utils/{getStringLength.js → string/getStringLength.js} +1 -2
  419. package/esm/internals/utils/string/index.d.ts +4 -0
  420. package/esm/internals/utils/string/index.js +5 -0
  421. package/esm/internals/utils/{stringifyReactNode.js → string/stringifyReactNode.js} +0 -0
  422. package/esm/internals/utils/{tplTransform.js → string/tplTransform.js} +0 -0
  423. package/esm/locales/en_GB.js +2 -2
  424. package/esm/locales/en_US.js +2 -2
  425. package/esm/locales/index.js +0 -0
  426. package/esm/locales/pl_PL.js +1 -1
  427. package/esm/useBreakpointValue/useBreakpointValue.d.ts +6 -2
  428. package/esm/useBreakpointValue/useBreakpointValue.js +9 -4
  429. package/esm/useMediaQuery/breakpoints.d.ts +24 -0
  430. package/esm/useMediaQuery/breakpoints.js +244 -0
  431. package/esm/useMediaQuery/index.d.ts +1 -1
  432. package/esm/useMediaQuery/types.d.ts +45 -0
  433. package/esm/useMediaQuery/types.js +2 -0
  434. package/esm/useMediaQuery/useMediaQuery.d.ts +4 -13
  435. package/esm/useMediaQuery/useMediaQuery.js +29 -11
  436. package/esm/useToaster/useToaster.d.ts +1 -1
  437. package/esm/useToaster/useToaster.js +1 -1
  438. package/internals/Box/styles/index.less +4 -0
  439. package/internals/Picker/styles/index.less +105 -23
  440. package/internals/Picker/styles/mixin.less +6 -6
  441. package/package.json +3 -2
  442. package/styles/color-modes/dark.less +2 -2
  443. package/styles/color-modes/high-contrast.less +2 -2
  444. package/styles/color-modes/light.less +2 -2
  445. package/styles/index.less +3 -0
  446. package/styles/root.less +2 -0
  447. package/styles/variables.less +0 -24
  448. package/SafeAnchor/package.json +0 -7
  449. package/cjs/Form/hooks/useFormClassNames.d.ts +0 -5
  450. package/cjs/Form/hooks/useFormClassNames.js +0 -29
  451. package/cjs/internals/Picker/hooks/usePickerClassName.d.ts +0 -19
  452. package/cjs/internals/Picker/hooks/usePickerClassName.js +0 -45
  453. package/esm/Form/hooks/useFormClassNames.d.ts +0 -5
  454. package/esm/Form/hooks/useFormClassNames.js +0 -25
  455. package/esm/internals/Picker/hooks/usePickerClassName.d.ts +0 -19
  456. package/esm/internals/Picker/hooks/usePickerClassName.js +0 -40
  457. /package/cjs/{SafeAnchor → internals/SafeAnchor}/index.d.ts +0 -0
  458. /package/cjs/{SafeAnchor → internals/SafeAnchor}/index.js +0 -0
  459. /package/cjs/internals/utils/{events.d.ts → html/events.d.ts} +0 -0
  460. /package/cjs/internals/utils/{htmlPropsUtils.d.ts → html/htmlPropsUtils.d.ts} +0 -0
  461. /package/cjs/internals/utils/{safeSetSelection.d.ts → html/safeSetSelection.d.ts} +0 -0
  462. /package/cjs/internals/utils/{deprecateComponent.d.ts → react/deprecateComponent.d.ts} +0 -0
  463. /package/cjs/internals/utils/{forwardRef.js → react/forwardRef.js} +0 -0
  464. /package/cjs/internals/utils/{getDOMNode.d.ts → react/getDOMNode.d.ts} +0 -0
  465. /package/cjs/internals/utils/{getDOMNode.js → react/getDOMNode.js} +0 -0
  466. /package/cjs/internals/utils/{mergeRefs.d.ts → react/mergeRefs.d.ts} +0 -0
  467. /package/cjs/internals/utils/{getSafeRegExpString.d.ts → string/getSafeRegExpString.d.ts} +0 -0
  468. /package/cjs/internals/utils/{getSafeRegExpString.js → string/getSafeRegExpString.js} +0 -0
  469. /package/cjs/internals/utils/{stringifyReactNode.d.ts → string/stringifyReactNode.d.ts} +0 -0
  470. /package/cjs/internals/utils/{tplTransform.d.ts → string/tplTransform.d.ts} +0 -0
  471. /package/esm/{SafeAnchor → internals/SafeAnchor}/index.d.ts +0 -0
  472. /package/esm/{SafeAnchor → internals/SafeAnchor}/index.js +0 -0
  473. /package/esm/internals/utils/{events.d.ts → html/events.d.ts} +0 -0
  474. /package/esm/internals/utils/{htmlPropsUtils.d.ts → html/htmlPropsUtils.d.ts} +0 -0
  475. /package/esm/internals/utils/{safeSetSelection.d.ts → html/safeSetSelection.d.ts} +0 -0
  476. /package/esm/internals/utils/{deprecateComponent.d.ts → react/deprecateComponent.d.ts} +0 -0
  477. /package/esm/internals/utils/{forwardRef.js → react/forwardRef.js} +0 -0
  478. /package/esm/internals/utils/{getDOMNode.d.ts → react/getDOMNode.d.ts} +0 -0
  479. /package/esm/internals/utils/{getDOMNode.js → react/getDOMNode.js} +0 -0
  480. /package/esm/internals/utils/{mergeRefs.d.ts → react/mergeRefs.d.ts} +0 -0
  481. /package/esm/internals/utils/{getSafeRegExpString.d.ts → string/getSafeRegExpString.d.ts} +0 -0
  482. /package/esm/internals/utils/{getSafeRegExpString.js → string/getSafeRegExpString.js} +0 -0
  483. /package/esm/internals/utils/{stringifyReactNode.d.ts → string/stringifyReactNode.d.ts} +0 -0
  484. /package/esm/internals/utils/{tplTransform.d.ts → string/tplTransform.d.ts} +0 -0
@@ -3,4 +3,3 @@ export { default as useCombobox } from './useCombobox';
3
3
  export { default as useFocusItemValue } from './useFocusItemValue';
4
4
  export { default as useToggleKeyDownEvent } from './useToggleKeyDownEvent';
5
5
  export { default as useSearch } from './useSearch';
6
- export { default as usePickerClassName } from './usePickerClassName';
@@ -3,5 +3,4 @@ export { default as usePickerRef } from "./usePickerRef.js";
3
3
  export { default as useCombobox } from "./useCombobox.js";
4
4
  export { default as useFocusItemValue } from "./useFocusItemValue.js";
5
5
  export { default as useToggleKeyDownEvent } from "./useToggleKeyDownEvent.js";
6
- export { default as useSearch } from "./useSearch.js";
7
- export { default as usePickerClassName } from "./usePickerClassName.js";
6
+ export { default as useSearch } from "./useSearch.js";
@@ -3,6 +3,7 @@ declare function useCombobox(): {
3
3
  popupType: "dialog" | "menu" | "grid" | "listbox" | "tree" | undefined;
4
4
  multiple: boolean | undefined;
5
5
  placement: import("../../types").Placement | undefined;
6
+ breakpoint: string | undefined;
6
7
  labelId: string | undefined;
7
8
  };
8
9
  export default useCombobox;
@@ -7,13 +7,15 @@ function useCombobox() {
7
7
  hasLabel,
8
8
  popupType,
9
9
  multiple,
10
- placement
10
+ placement,
11
+ breakpoint
11
12
  } = useContext(ComboboxContext);
12
13
  return {
13
14
  id,
14
15
  popupType,
15
16
  multiple,
16
17
  placement,
18
+ breakpoint,
17
19
  labelId: hasLabel ? `${id}-label` : undefined
18
20
  };
19
21
  }
@@ -1,3 +1,4 @@
1
+ export * from './PickerToggleTrigger';
1
2
  export { default as Listbox } from './Listbox';
2
3
  export { default as ListItem } from './ListItem';
3
4
  export { default as ListItemGroup } from './ListItemGroup';
@@ -6,9 +7,7 @@ export { default as PickerPopup } from './PickerPopup';
6
7
  export { default as PickerToggle } from './PickerToggle';
7
8
  export { default as PickerLabel } from './PickerLabel';
8
9
  export { default as PickerIndicator } from './PickerIndicator';
9
- export { default as PickerToggleTrigger } from './PickerToggleTrigger';
10
10
  export { default as SelectedElement } from './SelectedElement';
11
- export { pickTriggerPropKeys, omitTriggerPropKeys } from './PickerToggleTrigger';
12
11
  export * from './hooks';
13
12
  export * from './utils';
14
13
  export type { OverlayTriggerHandle, PositionChildProps } from '../Overlay/types';
@@ -1,5 +1,6 @@
1
1
  'use client';
2
2
  // export components
3
+ export * from "./PickerToggleTrigger.js";
3
4
  export { default as Listbox } from "./Listbox.js";
4
5
  export { default as ListItem } from "./ListItem.js";
5
6
  export { default as ListItemGroup } from "./ListItemGroup.js";
@@ -8,11 +9,9 @@ export { default as PickerPopup } from "./PickerPopup.js";
8
9
  export { default as PickerToggle } from "./PickerToggle.js";
9
10
  export { default as PickerLabel } from "./PickerLabel.js";
10
11
  export { default as PickerIndicator } from "./PickerIndicator.js";
11
- export { default as PickerToggleTrigger } from "./PickerToggleTrigger.js";
12
12
  export { default as SelectedElement } from "./SelectedElement.js";
13
13
 
14
14
  // export hooks and utils
15
- export { pickTriggerPropKeys, omitTriggerPropKeys } from "./PickerToggleTrigger.js";
16
15
  export * from "./hooks/index.js";
17
16
  export * from "./utils.js";
18
17
 
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { BoxProps } from '../internals/Box';
2
+ import { BoxProps } from '../Box';
3
3
  export interface SafeAnchorProps extends BoxProps, React.HTMLAttributes<HTMLElement> {
4
4
  /** Link specified url */
5
5
  href?: string;
@@ -10,5 +10,5 @@ export interface SafeAnchorProps extends BoxProps, React.HTMLAttributes<HTMLElem
10
10
  * A SafeAnchor is a wrapper around the `<a>` HTML element.
11
11
  * @private
12
12
  */
13
- declare const SafeAnchor: import("../internals/types").InternalRefForwardingComponent<"a", SafeAnchorProps, never> & Record<string, never>;
13
+ declare const SafeAnchor: import("../types").InternalRefForwardingComponent<"a", SafeAnchorProps, never> & Record<string, never>;
14
14
  export default SafeAnchor;
@@ -1,9 +1,9 @@
1
1
  'use client';
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  import React, { useCallback } from 'react';
4
- import Box from "../internals/Box/index.js";
5
- import { useCustom } from "../CustomProvider/index.js";
6
- import { forwardRef } from "../internals/utils/index.js";
4
+ import Box from "../Box/index.js";
5
+ import { useCustom } from "../../CustomProvider/index.js";
6
+ import { forwardRef } from "../utils/index.js";
7
7
  function isTrivialHref(href) {
8
8
  return !href || href.trim() === '#';
9
9
  }
@@ -5,7 +5,7 @@ import useCombobox from "../Picker/hooks/useCombobox.js";
5
5
  import ScrollView from "../ScrollView/index.js";
6
6
  import Box from "../Box/index.js";
7
7
  import { useTreeContextProps } from "./TreeProvider.js";
8
- import { forwardRef } from "../utils/index.js";
8
+ import { forwardRef, mergeStyles, getCssValue } from "../utils/index.js";
9
9
  const ScrollShadowView = forwardRef((props, ref) => {
10
10
  return /*#__PURE__*/React.createElement(ScrollView, _extends({
11
11
  scrollShadow: true,
@@ -36,10 +36,9 @@ const TreeView = forwardRef((props, ref) => {
36
36
  const treeAs = scrollShadow && !virtualized ? ScrollShadowView : as;
37
37
 
38
38
  // If the tree is virtualized, the height is not needed.
39
- const viewStyles = {
40
- height: virtualized ? undefined : height,
41
- ...style
42
- };
39
+ const viewStyles = mergeStyles(style, {
40
+ '--rs-tree-view-height': virtualized ? undefined : getCssValue(height)
41
+ });
43
42
  return /*#__PURE__*/React.createElement(Box, _extends({
44
43
  as: treeAs,
45
44
  role: "tree",
@@ -3,7 +3,7 @@ import { useEffect, useCallback } from 'react';
3
3
  import contains from 'dom-lib/contains';
4
4
  import ownerDocument from 'dom-lib/ownerDocument';
5
5
  import on from 'dom-lib/on';
6
- import getDOMNode from "../utils/getDOMNode.js";
6
+ import { getDOMNode } from "../utils/index.js";
7
7
  import { KEY_VALUES } from "../constants/index.js";
8
8
  function isLeftClickEvent(event) {
9
9
  return (event === null || event === void 0 ? void 0 : event.button) === 0;
@@ -0,0 +1,4 @@
1
+ export { default as Box } from './Box';
2
+ export { default as Plaintext } from './Plaintext';
3
+ export { default as InputBase } from './InputBase';
4
+ export { default as SafeAnchor } from './SafeAnchor';
@@ -1 +1,6 @@
1
1
  'use client';
2
+ // Export internal components
3
+ export { default as Box } from "./Box/index.js";
4
+ export { default as Plaintext } from "./Plaintext/index.js";
5
+ export { default as InputBase } from "./InputBase/index.js";
6
+ export { default as SafeAnchor } from "./SafeAnchor/index.js";
@@ -12,6 +12,8 @@ export type HTMLPropsWithoutSelect<T extends HTMLElement = HTMLElement, P extend
12
12
  export type HTMLPropsWithoutChange<T extends HTMLElement = HTMLElement, P extends Record<string, any> = React.HTMLAttributes<T>> = PropsWithoutChange<P>;
13
13
  /** Input props with 'onChange' and 'size' attributes removed. */
14
14
  export type SanitizedInputProps = PropsWithout<React.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'size'>;
15
+ /** Textarea props with 'onChange' attribute removed. */
16
+ export type SanitizedTextareaProps = PropsWithout<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'onChange'>;
15
17
  /** HTML props excluding 'title', 'onToggle', and 'onSelect' attributes. */
16
18
  export type SanitizedHTMListProps<T extends HTMLElement = HTMLElement, P extends Record<string, any> = React.HTMLAttributes<T>> = PropsWithout<P, 'title' | 'onToggle' | 'onSelect'>;
17
19
  export type WithoutChildren<T> = Omit<T, 'children'>;
@@ -1 +1,2 @@
1
1
  export declare function isFocusableElement(element: Element): boolean;
2
+ export declare function isDisableableElement(element: any): boolean;
@@ -10,4 +10,11 @@ selector => `${selector}:not([tabindex='-1']):not([style*='display: none'])` : s
10
10
  export function isFocusableElement(element) {
11
11
  if (element === document.body) return false;
12
12
  return element.matches(focusableSelector);
13
+ }
14
+ const disableableElements = ['button', 'fieldset', 'optgroup', 'option', 'select', 'textarea', 'input'];
15
+ export function isDisableableElement(element) {
16
+ if (typeof element === 'string') {
17
+ return disableableElements.includes(element);
18
+ }
19
+ return false;
13
20
  }
@@ -0,0 +1,4 @@
1
+ export * from './htmlPropsUtils';
2
+ export * from './events';
3
+ export * from './dom';
4
+ export * from './safeSetSelection';
@@ -0,0 +1,5 @@
1
+ 'use client';
2
+ export * from "./htmlPropsUtils.js";
3
+ export * from "./events.js";
4
+ export * from "./dom.js";
5
+ export * from "./safeSetSelection.js";
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { isAndroid } from "./BrowserDetection.js";
2
+ import { isAndroid } from "../BrowserDetection.js";
3
3
  const strNone = 'none';
4
4
 
5
5
  /**
@@ -1,29 +1,17 @@
1
1
  export * from './BrowserDetection';
2
- export * from './htmlPropsUtils';
2
+ export * from './html';
3
3
  export * from './colours';
4
4
  export * from './sizes';
5
5
  export * from './style-sheet';
6
6
  export * from './placement';
7
- export { stringifyReactNode, reactToString } from './stringifyReactNode';
8
- export { getSafeRegExpString } from './getSafeRegExpString';
9
- export { getDOMNode } from './getDOMNode';
7
+ export * from './string';
8
+ export * from './react';
10
9
  export { guid } from './guid';
11
10
  export { createChainedFunction } from './createChainedFunction';
12
11
  export { isOneOf } from './isOneOf';
13
- export { ReactChildren } from './ReactChildren';
14
- export { tplTransform } from './tplTransform';
15
- export { mergeRefs } from './mergeRefs';
16
12
  export { shallowEqual, shallowEqualArray } from './shallowEqual';
17
13
  export { composeFunctions } from './composeFunctions';
18
- export { safeSetSelection } from './safeSetSelection';
19
- export { getStringLength } from './getStringLength';
20
14
  export { getDataGroupBy } from './getDataGroupBy';
21
- export { deprecateComponent } from './deprecateComponent';
22
15
  export { warnOnce } from './warnOnce';
23
- export { createComponent } from './createComponent';
24
16
  export { attachParent } from './attachParent';
25
- export { isFocusEntering, isFocusLeaving } from './events';
26
- export { isFocusableElement } from './dom';
27
- export { forwardRef } from './forwardRef';
28
17
  export { isPresetSize } from './sizes';
29
- export type { ComponentProps } from './createComponent';
@@ -1,29 +1,18 @@
1
1
  'use client';
2
2
  export * from "./BrowserDetection.js";
3
- export * from "./htmlPropsUtils.js";
3
+ export * from "./html/index.js";
4
4
  export * from "./colours.js";
5
5
  export * from "./sizes.js";
6
6
  export * from "./style-sheet/index.js";
7
7
  export * from "./placement.js";
8
- export { stringifyReactNode, reactToString } from "./stringifyReactNode.js";
9
- export { getSafeRegExpString } from "./getSafeRegExpString.js";
10
- export { getDOMNode } from "./getDOMNode.js";
8
+ export * from "./string/index.js";
9
+ export * from "./react/index.js";
11
10
  export { guid } from "./guid.js";
12
11
  export { createChainedFunction } from "./createChainedFunction.js";
13
12
  export { isOneOf } from "./isOneOf.js";
14
- export { ReactChildren } from "./ReactChildren.js";
15
- export { tplTransform } from "./tplTransform.js";
16
- export { mergeRefs } from "./mergeRefs.js";
17
13
  export { shallowEqual, shallowEqualArray } from "./shallowEqual.js";
18
14
  export { composeFunctions } from "./composeFunctions.js";
19
- export { safeSetSelection } from "./safeSetSelection.js";
20
- export { getStringLength } from "./getStringLength.js";
21
15
  export { getDataGroupBy } from "./getDataGroupBy.js";
22
- export { deprecateComponent } from "./deprecateComponent.js";
23
16
  export { warnOnce } from "./warnOnce.js";
24
- export { createComponent } from "./createComponent.js";
25
17
  export { attachParent } from "./attachParent.js";
26
- export { isFocusEntering, isFocusLeaving } from "./events.js";
27
- export { isFocusableElement } from "./dom.js";
28
- export { forwardRef } from "./forwardRef.js";
29
18
  export { isPresetSize } from "./sizes.js";
@@ -1,10 +1,4 @@
1
1
  import React from 'react';
2
- /**
3
- * Checks if the given children is a React fragment.
4
- * @param children - The children to check.
5
- * @returns True if the children is a React fragment, false otherwise.
6
- */
7
- export declare function isFragment(children: React.ReactNode): boolean;
8
2
  /**
9
3
  * Finds the first child that satisfies the given condition.
10
4
  * @param children - The children to search.
@@ -53,7 +47,7 @@ declare function some(children: React.ReactNode, func: any, context?: any): bool
53
47
  /**
54
48
  * Utility functions for working with React children.
55
49
  */
56
- export declare const ReactChildren: {
50
+ export declare const rch: {
57
51
  /**
58
52
  * Maps over the children and clones each child element with the provided props.
59
53
  */
@@ -79,4 +73,4 @@ export declare const ReactChildren: {
79
73
  */
80
74
  find: typeof find;
81
75
  };
82
- export default ReactChildren;
76
+ export default rch;
@@ -1,24 +1,6 @@
1
1
  'use client';
2
2
  import React from 'react';
3
- /**
4
- * Returns the type of the given object.
5
- * @param object - The object to check.
6
- * @returns The type of the object.
7
- */
8
- function typeOf(object) {
9
- if (typeof object === 'object' && object !== null) {
10
- return object.type || object.$$typeof;
11
- }
12
- }
13
-
14
- /**
15
- * Checks if the given children is a React fragment.
16
- * @param children - The children to check.
17
- * @returns True if the children is a React fragment, false otherwise.
18
- */
19
- export function isFragment(children) {
20
- return React.Children.count(children) === 1 && typeOf(children) === Symbol.for('react.fragment');
21
- }
3
+ import { isFragment } from "./ReactIs.js";
22
4
 
23
5
  /**
24
6
  * Flattens the given children into an array.
@@ -143,7 +125,7 @@ function some(children, func, context) {
143
125
  /**
144
126
  * Utility functions for working with React children.
145
127
  */
146
- export const ReactChildren = {
128
+ export const rch = {
147
129
  /**
148
130
  * Maps over the children and clones each child element with the provided props.
149
131
  */
@@ -169,4 +151,4 @@ export const ReactChildren = {
169
151
  */
170
152
  find
171
153
  };
172
- export default ReactChildren;
154
+ export default rch;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ /**
3
+ * Checks if the given children is a React fragment.
4
+ * @param children - The children to check.
5
+ * @returns True if the children is a React fragment, false otherwise.
6
+ */
7
+ export declare function isFragment(children: React.ReactNode): boolean;
@@ -0,0 +1,22 @@
1
+ 'use client';
2
+ import React from 'react';
3
+
4
+ /**
5
+ * Returns the type of the given object.
6
+ * @param object - The object to check.
7
+ * @returns The type of the object.
8
+ */
9
+ function typeOf(object) {
10
+ if (typeof object === 'object' && object !== null) {
11
+ return object.type || object.$$typeof;
12
+ }
13
+ }
14
+
15
+ /**
16
+ * Checks if the given children is a React fragment.
17
+ * @param children - The children to check.
18
+ * @returns True if the children is a React fragment, false otherwise.
19
+ */
20
+ export function isFragment(children) {
21
+ return React.Children.count(children) === 1 && typeOf(children) === Symbol.for('react.fragment');
22
+ }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import Box, { BoxProps } from '../Box/Box';
2
+ import Box, { BoxProps } from '../../Box/Box';
3
3
  export type ComponentProps = BoxProps & React.HTMLAttributes<HTMLDivElement>;
4
4
  interface Props<T extends React.ElementType> extends React.HTMLAttributes<HTMLDivElement> {
5
5
  name: string;
@@ -10,5 +10,5 @@ interface Props<T extends React.ElementType> extends React.HTMLAttributes<HTMLDi
10
10
  * Create a component with `classPrefix` and `as` attributes.
11
11
  * By default, the component is based on Box component and inherits all Box props.
12
12
  */
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
+ 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>;
14
14
  export default createComponent;
@@ -2,10 +2,10 @@
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";
6
- import { useStyles } from "../hooks/index.js";
5
+ import Box from "../../Box/Box.js";
6
+ import { useStyles } from "../../hooks/index.js";
7
7
  import { forwardRef } from "./forwardRef.js";
8
- import { useCustom } from "../../CustomProvider/index.js";
8
+ import { useCustom } from "../../../CustomProvider/index.js";
9
9
  /**
10
10
  * Create a component with `classPrefix` and `as` attributes.
11
11
  * By default, the component is based on Box component and inherits all Box props.
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  import React from 'react';
4
- import warnOnce from "./warnOnce.js";
4
+ import warnOnce from "../warnOnce.js";
5
5
 
6
6
  /**
7
7
  * HOC for display a deprecation message from a deprecated component
@@ -1,5 +1,5 @@
1
1
  import { ElementType, PropsWithoutRef, ForwardRefRenderFunction } from 'react';
2
- import type { InternalRefForwardingComponent } from '../types';
2
+ import type { InternalRefForwardingComponent } from '../../types';
3
3
  /**
4
4
  * A utility function to wrap components with `React.forwardRef`.
5
5
  * It extends the type signature for better integration with custom components.
@@ -0,0 +1,7 @@
1
+ export * from './getDOMNode';
2
+ export * from './ReactChildren';
3
+ export * from './deprecateComponent';
4
+ export * from './createComponent';
5
+ export * from './forwardRef';
6
+ export * from './mergeRefs';
7
+ export * from './ReactIs';
@@ -0,0 +1,8 @@
1
+ 'use client';
2
+ export * from "./getDOMNode.js";
3
+ export * from "./ReactChildren.js";
4
+ export * from "./deprecateComponent.js";
5
+ export * from "./createComponent.js";
6
+ export * from "./forwardRef.js";
7
+ export * from "./mergeRefs.js";
8
+ export * from "./ReactIs.js";
@@ -1,2 +1 @@
1
1
  export declare function getStringLength(str: string): number;
2
- export default getStringLength;
@@ -9,5 +9,4 @@ export function getStringLength(str) {
9
9
  }
10
10
  });
11
11
  return length;
12
- }
13
- export default getStringLength;
12
+ }
@@ -0,0 +1,4 @@
1
+ export * from './getSafeRegExpString';
2
+ export * from './getStringLength';
3
+ export * from './stringifyReactNode';
4
+ export * from './tplTransform';
@@ -0,0 +1,5 @@
1
+ 'use client';
2
+ export * from "./getSafeRegExpString.js";
3
+ export * from "./getStringLength.js";
4
+ export * from "./stringifyReactNode.js";
5
+ export * from "./tplTransform.js";
@@ -85,7 +85,7 @@ export default {
85
85
  expandText: 'Show path'
86
86
  },
87
87
  Toggle: {
88
- on: 'Open',
89
- off: 'Close'
88
+ on: 'ON',
89
+ off: 'OFF'
90
90
  }
91
91
  };
@@ -81,7 +81,7 @@ export default {
81
81
  expandText: 'Show path'
82
82
  },
83
83
  Toggle: {
84
- on: 'Open',
85
- off: 'Close'
84
+ on: 'ON',
85
+ off: 'OFF'
86
86
  }
87
87
  };
File without changes
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import pl from 'date-fns/locale/pl';
2
+ import { pl } from 'date-fns/locale/pl';
3
3
  const DateTimeFormats = {
4
4
  sunday: 'Ndz',
5
5
  monday: 'Pon',
@@ -3,11 +3,15 @@ interface UseBreakpointValueOptions<T = any> {
3
3
  /**
4
4
  * The default value to return if no screen size matches.
5
5
  */
6
- defaultValue: T;
6
+ defaultValue?: T;
7
+ /**
8
+ * Whether to enable the media query, defaults to true
9
+ */
10
+ enabled?: boolean;
7
11
  }
8
12
  /**
9
13
  * A React Hook that returns different values based on different screen sizes in responsive design.
10
- * @version 5.63.0
14
+ * @version 5.64.0
11
15
  * @unstable Please note that this API is not stable and may change in the future.
12
16
  * @see https://rsuitejs.com/components/use-breakpoint-value
13
17
  *
@@ -2,7 +2,7 @@
2
2
  import useMediaQuery from "../useMediaQuery/index.js";
3
3
  /**
4
4
  * A React Hook that returns different values based on different screen sizes in responsive design.
5
- * @version 5.63.0
5
+ * @version 5.64.0
6
6
  * @unstable Please note that this API is not stable and may change in the future.
7
7
  * @see https://rsuitejs.com/components/use-breakpoint-value
8
8
  *
@@ -15,12 +15,17 @@ import useMediaQuery from "../useMediaQuery/index.js";
15
15
  */
16
16
  export function useBreakpointValue(breakpoints, options) {
17
17
  const {
18
- defaultValue
18
+ defaultValue,
19
+ enabled = true
19
20
  } = options || {};
20
21
  const keys = Object.keys(breakpoints);
21
22
  const values = Object.values(breakpoints);
22
- const matches = useMediaQuery(keys);
23
- const index = matches.indexOf(true);
23
+ const matches = useMediaQuery(keys, enabled);
24
+
25
+ // Use lastIndexOf instead of indexOf to return the value of the last matching breakpoint
26
+ // Due to how media queries work, multiple breakpoints may match simultaneously on larger screens
27
+ // Using lastIndexOf ensures we return the value for the largest matching breakpoint
28
+ const index = matches.lastIndexOf(true);
24
29
  return index !== -1 ? values[index] : defaultValue;
25
30
  }
26
31
  export default useBreakpointValue;
@@ -0,0 +1,24 @@
1
+ import type { BreakpointMap, BreakpointSystem } from './types';
2
+ /**
3
+ * Create breakpoint system
4
+ *
5
+ * This function takes a breakpoint map and returns an enhanced breakpoint system
6
+ * that provides various media queries for responsive design.
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * const breakpoints = createBreakpoints({
11
+ * xs: '0px',
12
+ * sm: '576px',
13
+ * md: '768px',
14
+ * lg: '992px',
15
+ * xl: '1200px'
16
+ * });
17
+ *
18
+ * // Using breakpoints
19
+ * breakpoints.up('md'); // '(min-width: 768px)'
20
+ * breakpoints.down('lg'); // '(max-width: 991.99px)'
21
+ * breakpoints.between('sm', 'lg'); // '(min-width: 576px) and (max-width: 991.99px)'
22
+ * ```
23
+ */
24
+ export declare function createBreakpoints(breakpoints: BreakpointMap): BreakpointSystem;