rsuite 6.0.0-canary-20250507 → 6.0.0-canary-2025062016

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 (936) hide show
  1. package/Accordion/styles/index.css +645 -325
  2. package/Animation/styles/index.css +153 -141
  3. package/AutoComplete/styles/index.css +2408 -2061
  4. package/Avatar/styles/index.css +227 -76
  5. package/AvatarGroup/styles/index.css +280 -107
  6. package/Badge/styles/index.css +335 -174
  7. package/Box/styles/index.css +132 -94
  8. package/Breadcrumb/styles/index.css +225 -71
  9. package/Button/styles/index.css +1199 -1016
  10. package/ButtonGroup/styles/index.css +221 -54
  11. package/ButtonToolbar/styles/index.css +274 -98
  12. package/CHANGELOG.md +66 -0
  13. package/Calendar/styles/index.css +1866 -1737
  14. package/Card/styles/index.css +242 -92
  15. package/CardGroup/styles/index.css +185 -6
  16. package/Carousel/styles/index.css +369 -213
  17. package/CascadeTree/styles/index.css +376 -237
  18. package/Cascader/styles/index.css +2494 -2146
  19. package/Center/styles/index.css +185 -6
  20. package/CheckPicker/styles/index.css +2555 -2193
  21. package/CheckTree/styles/index.css +2640 -2276
  22. package/CheckTreePicker/styles/index.css +2652 -2286
  23. package/Checkbox/styles/index.css +409 -251
  24. package/CheckboxGroup/styles/index.css +189 -25
  25. package/Container/styles/index.css +186 -20
  26. package/Content/styles/index.css +181 -15
  27. package/DateInput/styles/index.css +317 -164
  28. package/DatePicker/styles/index.css +3108 -2800
  29. package/DateRangeInput/styles/index.css +317 -164
  30. package/DateRangePicker/styles/index.css +3200 -2884
  31. package/Divider/styles/index.css +251 -96
  32. package/Drawer/styles/index.css +461 -312
  33. package/Dropdown/styles/index.css +1497 -1329
  34. package/FlexboxGrid/styles/index.css +498 -284
  35. package/Footer/styles/index.css +181 -23
  36. package/Form/styles/index.css +178 -12
  37. package/FormControl/styles/index.css +210 -44
  38. package/FormControlLabel/styles/index.css +190 -31
  39. package/FormErrorMessage/styles/index.css +332 -208
  40. package/FormGroup/styles/index.css +216 -48
  41. package/FormHelpText/styles/index.css +203 -44
  42. package/FormStack/styles/index.css +191 -26
  43. package/Grid/styles/index.css +2042 -1743
  44. package/Header/styles/index.css +181 -23
  45. package/Heading/styles/index.css +238 -73
  46. package/HeadingGroup/styles/index.css +181 -2
  47. package/Highlight/styles/index.css +190 -5
  48. package/IconButton/styles/index.css +1343 -1163
  49. package/Image/styles/index.css +216 -22
  50. package/InlineEdit/styles/index.css +378 -84
  51. package/Input/styles/index.css +317 -164
  52. package/InputGroup/styles/index.css +446 -1219
  53. package/InputNumber/styles/index.css +1565 -1366
  54. package/InputPicker/styles/index.css +2497 -2156
  55. package/Kbd/styles/index.css +258 -107
  56. package/Link/styles/index.css +203 -23
  57. package/List/styles/index.css +311 -158
  58. package/Loader/styles/index.css +354 -206
  59. package/Menu/styles/index.css +325 -186
  60. package/Message/styles/index.css +494 -408
  61. package/Modal/styles/index.css +394 -224
  62. package/MultiCascadeTree/styles/index.css +2694 -2331
  63. package/MultiCascader/styles/index.css +2710 -2346
  64. package/Nav/styles/index.css +1801 -1636
  65. package/Navbar/styles/index.css +1751 -1564
  66. package/Notification/styles/index.css +369 -221
  67. package/NumberInput/styles/index.css +1565 -1366
  68. package/Pagination/styles/index.css +2625 -2390
  69. package/Panel/styles/index.css +624 -305
  70. package/PanelGroup/styles/index.css +212 -55
  71. package/PasswordInput/styles/index.css +559 -164
  72. package/PasswordStrengthMeter/styles/index.css +224 -32
  73. package/PinInput/styles/index.css +381 -207
  74. package/Placeholder/styles/index.css +364 -200
  75. package/Popover/styles/index.css +468 -298
  76. package/Progress/styles/index.css +517 -236
  77. package/ProgressCircle/package.json +3 -3
  78. package/ProgressCircle/styles/index.css +248 -0
  79. package/README.md +1 -1
  80. package/Radio/styles/index.css +406 -242
  81. package/RadioGroup/styles/index.css +277 -124
  82. package/RadioTile/styles/index.css +286 -133
  83. package/RadioTileGroup/styles/index.css +0 -0
  84. package/RangeSlider/styles/index.css +599 -458
  85. package/Rate/styles/index.css +318 -179
  86. package/SegmentedControl/package.json +7 -0
  87. package/SegmentedControl/styles/index.css +157 -0
  88. package/SelectPicker/styles/index.css +2430 -2088
  89. package/Sidebar/styles/index.css +188 -28
  90. package/Sidenav/styles/index.css +764 -591
  91. package/Slider/styles/index.css +599 -458
  92. package/Stack/styles/index.css +268 -93
  93. package/Stat/styles/index.css +1620 -1454
  94. package/StatGroup/styles/index.css +185 -6
  95. package/Steps/styles/index.css +384 -234
  96. package/Table/styles/index.css +626 -497
  97. package/Tabs/styles/index.css +1815 -1649
  98. package/Tag/styles/index.css +1487 -139
  99. package/TagGroup/styles/index.css +185 -19
  100. package/TagInput/styles/index.css +2831 -2469
  101. package/TagPicker/styles/index.css +2827 -2466
  102. package/Text/styles/index.css +398 -224
  103. package/Textarea/styles/index.css +184 -5
  104. package/TimePicker/styles/index.css +3108 -2800
  105. package/TimeRangePicker/styles/index.css +3200 -2884
  106. package/Timeline/styles/index.css +305 -148
  107. package/Toggle/styles/index.css +606 -429
  108. package/Tooltip/styles/index.css +347 -214
  109. package/Tree/styles/index.css +2538 -2197
  110. package/TreePicker/styles/index.css +2548 -2206
  111. package/Uploader/styles/index.css +1680 -1612
  112. package/VisuallyHidden/styles/index.css +11 -11
  113. package/cjs/Affix/Affix.js +1 -2
  114. package/cjs/Animation/Bounce.js +4 -5
  115. package/cjs/Animation/Collapse.js +1 -2
  116. package/cjs/Animation/Fade.js +5 -6
  117. package/cjs/Animation/Slide.js +5 -6
  118. package/cjs/AutoComplete/AutoComplete.js +1 -2
  119. package/cjs/Avatar/Avatar.js +1 -2
  120. package/cjs/AvatarGroup/AvatarGroup.js +1 -2
  121. package/cjs/Badge/Badge.js +1 -2
  122. package/cjs/Breadcrumb/Breadcrumb.js +1 -2
  123. package/cjs/Button/Button.js +1 -2
  124. package/cjs/ButtonGroup/ButtonGroup.js +1 -2
  125. package/cjs/Calendar/CalendarContainer.js +1 -2
  126. package/cjs/Calendar/CalendarHeader.js +1 -2
  127. package/cjs/Calendar/Grid/GridRow.js +1 -2
  128. package/cjs/Calendar/MonthDropdown/MonthDropdown.js +17 -22
  129. package/cjs/Calendar/MonthDropdown/MonthDropdownItem.js +1 -2
  130. package/cjs/Calendar/TimeDropdown/TimeDropdown.js +1 -2
  131. package/cjs/Calendar/TimeDropdown/utils/scrollToTime.js +1 -2
  132. package/cjs/Calendar/hooks/useCalendarDate.js +3 -6
  133. package/cjs/Carousel/Carousel.js +1 -2
  134. package/cjs/CascadeTree/CascadeTree.js +1 -2
  135. package/cjs/CascadeTree/TreeView.js +1 -2
  136. package/cjs/CascadeTree/hooks/usePaths.js +7 -8
  137. package/cjs/Cascader/Cascader.js +1 -2
  138. package/cjs/CheckPicker/CheckPicker.js +1 -2
  139. package/cjs/CheckTree/CheckTree.js +1 -2
  140. package/cjs/CheckTree/CheckTreeNode.js +1 -2
  141. package/cjs/CheckTree/CheckTreeView.js +17 -22
  142. package/cjs/CheckTree/hooks/useTreeNodeProps.js +1 -2
  143. package/cjs/CheckTree/hooks/useTreeValue.js +4 -5
  144. package/cjs/CheckTreePicker/CheckTreePicker.d.ts +4 -0
  145. package/cjs/CheckTreePicker/CheckTreePicker.js +29 -2
  146. package/cjs/Checkbox/Checkbox.js +1 -2
  147. package/cjs/CheckboxGroup/CheckboxGroup.js +1 -2
  148. package/cjs/Container/Container.js +1 -2
  149. package/cjs/CustomProvider/CustomProvider.js +14 -4
  150. package/cjs/DOMHelper/index.js +1 -2
  151. package/cjs/DateInput/DateInput.js +5 -2
  152. package/cjs/DateInput/hooks/useDateInputState.js +6 -7
  153. package/cjs/DateInput/hooks/useIsFocused.js +4 -5
  154. package/cjs/DateInput/hooks/useKeyboardInputEvent.js +7 -8
  155. package/cjs/DateInput/test/types/TestKeyPressProps.d.ts +6 -0
  156. package/cjs/DateInput/test/types/TestKeyPressProps.js +4 -0
  157. package/cjs/DatePicker/DatePicker.js +3 -10
  158. package/cjs/DatePicker/PredefinedRanges.js +1 -2
  159. package/cjs/DatePicker/Toolbar.js +6 -7
  160. package/cjs/DatePicker/utils.js +14 -24
  161. package/cjs/DateRangeInput/DateRangeInput.js +6 -6
  162. package/cjs/DateRangePicker/Calendar.d.ts +2 -1
  163. package/cjs/DateRangePicker/Calendar.js +8 -3
  164. package/cjs/DateRangePicker/DateRangePicker.d.ts +3 -1
  165. package/cjs/DateRangePicker/DateRangePicker.js +9 -20
  166. package/cjs/DateRangePicker/DateRangePickerProvider.js +1 -2
  167. package/cjs/DateRangePicker/disabledDateUtils.js +5 -18
  168. package/cjs/DateRangePicker/hooks/useCalendarHandlers.js +7 -8
  169. package/cjs/DateRangePicker/utils.js +5 -6
  170. package/cjs/Dropdown/Dropdown.js +9 -12
  171. package/cjs/Dropdown/DropdownItem.js +6 -8
  172. package/cjs/Dropdown/DropdownMenu.js +36 -43
  173. package/cjs/Dropdown/DropdownState.js +1 -4
  174. package/cjs/Form/Form.js +1 -2
  175. package/cjs/Form/FormContext.js +1 -2
  176. package/cjs/Form/hooks/useFormValidate.js +3 -8
  177. package/cjs/Form/hooks/useSchemaModel.js +6 -9
  178. package/cjs/FormControl/FormControl.d.ts +2 -2
  179. package/cjs/FormControl/FormControl.js +1 -1
  180. package/cjs/FormErrorMessage/FormErrorMessage.d.ts +2 -2
  181. package/cjs/FormGroup/FormGroup.d.ts +0 -18
  182. package/cjs/FormGroup/FormGroup.js +4 -33
  183. package/cjs/FormGroup/FormGroupContext.d.ts +4 -0
  184. package/cjs/FormGroup/FormGroupContext.js +8 -0
  185. package/cjs/FormGroup/index.d.ts +1 -1
  186. package/cjs/FormGroup/index.js +4 -4
  187. package/cjs/FormGroup/useFormGroup.d.ts +18 -0
  188. package/cjs/FormGroup/useFormGroup.js +35 -0
  189. package/cjs/Grid/Col.js +1 -2
  190. package/cjs/Grid/utils/styles.d.ts +1 -1
  191. package/cjs/Grid/utils/styles.js +1 -4
  192. package/cjs/InlineEdit/useEditState.js +1 -1
  193. package/cjs/InlineEdit/useFocusEvent.js +6 -7
  194. package/cjs/Input/Input.js +2 -3
  195. package/cjs/InputGroup/InputGroup.d.ts +0 -5
  196. package/cjs/InputGroup/InputGroup.js +4 -5
  197. package/cjs/InputGroup/InputGroupContext.d.ts +6 -0
  198. package/cjs/InputGroup/InputGroupContext.js +8 -0
  199. package/cjs/InputGroup/index.d.ts +1 -0
  200. package/cjs/InputGroup/index.js +3 -1
  201. package/cjs/InputPicker/InputAutosize.js +1 -2
  202. package/cjs/InputPicker/InputPicker.js +1 -2
  203. package/cjs/List/List.js +1 -2
  204. package/cjs/List/ListItem.js +1 -2
  205. package/cjs/List/helper/AutoScroller.js +7 -8
  206. package/cjs/List/helper/useSortHelper.js +1 -1
  207. package/cjs/List/helper/utils.js +4 -7
  208. package/cjs/MaskedInput/TextMask.js +1 -2
  209. package/cjs/MaskedInput/adjustCaretPosition.js +11 -12
  210. package/cjs/MaskedInput/conformToMask.js +1 -10
  211. package/cjs/MaskedInput/createTextMaskInputElement.js +9 -10
  212. package/cjs/MaskedInput/utilities.js +1 -7
  213. package/cjs/Menu/Menu.js +1 -2
  214. package/cjs/Menu/MenuItem.js +6 -8
  215. package/cjs/Message/Message.js +1 -2
  216. package/cjs/Modal/Modal.js +1 -2
  217. package/cjs/Modal/ModalBody.js +1 -2
  218. package/cjs/Modal/ModalHeader.js +1 -2
  219. package/cjs/Modal/ModalTitle.js +1 -2
  220. package/cjs/MultiCascadeTree/hooks/useCascadeValue.js +1 -4
  221. package/cjs/MultiCascadeTree/utils.js +1 -4
  222. package/cjs/MultiCascader/MultiCascader.js +1 -2
  223. package/cjs/Nav/AdaptiveNavItem.js +3 -4
  224. package/cjs/Nav/Nav.js +3 -4
  225. package/cjs/Nav/NavDropdown.js +9 -12
  226. package/cjs/Nav/NavDropdownItem.js +6 -8
  227. package/cjs/Nav/NavDropdownMenu.js +36 -43
  228. package/cjs/Nav/NavItem.js +1 -2
  229. package/cjs/Nav/NavMegaMenu.js +1 -2
  230. package/cjs/Nav/NavMenu.js +3 -4
  231. package/cjs/Navbar/Navbar.js +1 -2
  232. package/cjs/Navbar/NavbarDrawer.js +1 -2
  233. package/cjs/Navbar/NavbarDropdown.js +8 -11
  234. package/cjs/Navbar/NavbarDropdownItem.js +1 -2
  235. package/cjs/Navbar/NavbarDropdownMenu.js +12 -16
  236. package/cjs/Navbar/NavbarItem.js +1 -2
  237. package/cjs/Navbar/NavbarMegaMenu.js +1 -2
  238. package/cjs/Navbar/NavbarToggle.js +1 -2
  239. package/cjs/Notification/Notification.js +1 -2
  240. package/cjs/NumberInput/utils/number.js +1 -4
  241. package/cjs/Pagination/LimitPicker.js +1 -2
  242. package/cjs/Pagination/PaginationButton.js +1 -2
  243. package/cjs/Panel/Panel.js +1 -2
  244. package/cjs/Panel/PanelHeader.js +1 -2
  245. package/cjs/PanelGroup/PanelGroup.js +1 -2
  246. package/cjs/PanelGroup/index.js +1 -2
  247. package/cjs/Placeholder/PlaceholderGrid.js +1 -2
  248. package/cjs/Placeholder/PlaceholderParagraph.js +1 -2
  249. package/cjs/Popover/Popover.js +1 -2
  250. package/cjs/Progress/Progress.d.ts +1 -1
  251. package/cjs/Progress/Progress.js +1 -1
  252. package/cjs/Progress/ProgressInfo.d.ts +17 -0
  253. package/cjs/Progress/ProgressInfo.js +29 -0
  254. package/cjs/Progress/ProgressLine.d.ts +20 -6
  255. package/cjs/Progress/ProgressLine.js +48 -37
  256. package/cjs/Progress/ProgressSections.d.ts +15 -0
  257. package/cjs/Progress/ProgressSections.js +43 -0
  258. package/cjs/Progress/ProgressStroke.d.ts +24 -0
  259. package/cjs/Progress/ProgressStroke.js +51 -0
  260. package/cjs/Progress/index.d.ts +3 -3
  261. package/cjs/Progress/index.js +1 -1
  262. package/cjs/Progress/types.d.ts +11 -0
  263. package/cjs/Progress/types.js +4 -0
  264. package/cjs/{Progress → ProgressCircle}/ProgressCircle.d.ts +20 -14
  265. package/cjs/ProgressCircle/ProgressCircle.js +113 -0
  266. package/cjs/ProgressCircle/ProgressCircleSections.d.ts +23 -0
  267. package/cjs/ProgressCircle/ProgressCircleSections.js +52 -0
  268. package/cjs/ProgressCircle/hooks/useProgressCirclePath.d.ts +28 -0
  269. package/cjs/ProgressCircle/hooks/useProgressCirclePath.js +66 -0
  270. package/cjs/ProgressCircle/index.d.ts +4 -0
  271. package/cjs/ProgressCircle/index.js +11 -0
  272. package/cjs/Radio/Radio.js +1 -2
  273. package/cjs/RadioGroup/RadioGroup.d.ts +4 -1
  274. package/cjs/RadioGroup/RadioGroup.js +1 -2
  275. package/cjs/RadioTile/RadioTile.js +1 -2
  276. package/cjs/RadioTileGroup/RadioTileGroup.js +1 -2
  277. package/cjs/RangeSlider/RangeSlider.js +1 -3
  278. package/cjs/Rate/Character.js +1 -2
  279. package/cjs/Rate/useRatingStates.js +6 -7
  280. package/cjs/SegmentedControl/Indicator.d.ts +10 -0
  281. package/cjs/SegmentedControl/Indicator.js +22 -0
  282. package/cjs/SegmentedControl/SegmentedControl.d.ts +27 -0
  283. package/cjs/SegmentedControl/SegmentedControl.js +87 -0
  284. package/cjs/SegmentedControl/SegmentedItem.d.ts +16 -0
  285. package/cjs/SegmentedControl/SegmentedItem.js +44 -0
  286. package/cjs/SegmentedControl/hooks/useIndicatorPosition.d.ts +17 -0
  287. package/cjs/SegmentedControl/hooks/useIndicatorPosition.js +55 -0
  288. package/cjs/SegmentedControl/index.d.ts +4 -0
  289. package/cjs/SegmentedControl/index.js +11 -0
  290. package/cjs/SelectPicker/SelectPicker.js +1 -2
  291. package/cjs/Sidebar/Sidebar.js +1 -2
  292. package/cjs/Sidenav/ExpandedSidenavDropdown.js +12 -17
  293. package/cjs/Sidenav/ExpandedSidenavDropdownItem.js +3 -4
  294. package/cjs/Sidenav/ExpandedSidenavDropdownMenu.js +9 -12
  295. package/cjs/Sidenav/Sidenav.d.ts +0 -15
  296. package/cjs/Sidenav/Sidenav.js +4 -5
  297. package/cjs/Sidenav/SidenavContext.d.ts +16 -0
  298. package/cjs/Sidenav/SidenavContext.js +8 -0
  299. package/cjs/Sidenav/SidenavDropdown.js +15 -19
  300. package/cjs/Sidenav/SidenavDropdownItem.js +8 -10
  301. package/cjs/Sidenav/SidenavDropdownMenu.js +38 -45
  302. package/cjs/Sidenav/SidenavItem.js +8 -10
  303. package/cjs/Sidenav/SidenavToggle.js +3 -4
  304. package/cjs/Slider/ProgressBar.d.ts +0 -1
  305. package/cjs/Slider/ProgressBar.js +1 -3
  306. package/cjs/Slider/Slider.js +14 -6
  307. package/cjs/Stack/Stack.js +4 -2
  308. package/cjs/Stack/VStack.js +1 -3
  309. package/cjs/Tag/Tag.js +1 -2
  310. package/cjs/TagInput/TagInput.js +1 -2
  311. package/cjs/TagPicker/TagPicker.js +1 -2
  312. package/cjs/TimePicker/TimePicker.js +1 -2
  313. package/cjs/Toggle/Toggle.js +1 -2
  314. package/cjs/Tooltip/Tooltip.js +1 -2
  315. package/cjs/Tree/Tree.js +1 -2
  316. package/cjs/Tree/TreeNode.js +1 -2
  317. package/cjs/Tree/TreeView.js +17 -22
  318. package/cjs/Tree/hooks/useFlattenTree.js +2 -8
  319. package/cjs/Tree/hooks/useTreeNodeProps.js +1 -2
  320. package/cjs/Tree/hooks/useVirtualizedTreeData.js +1 -7
  321. package/cjs/Tree/utils/flattenTree.js +2 -8
  322. package/cjs/Tree/utils/getExpandItemValues.js +6 -7
  323. package/cjs/Tree/utils/indentTreeNode.js +1 -4
  324. package/cjs/TreePicker/TreePicker.js +1 -2
  325. package/cjs/Uploader/UploadFileItem.js +2 -6
  326. package/cjs/Uploader/UploadTrigger.js +1 -2
  327. package/cjs/Uploader/Uploader.js +2 -6
  328. package/cjs/global.d.ts +0 -6
  329. package/cjs/index.d.ts +3 -0
  330. package/cjs/index.js +18 -0
  331. package/cjs/internals/Disclosure/Disclosure.js +1 -2
  332. package/cjs/internals/InputBase/InputBase.js +2 -3
  333. package/cjs/internals/Menu/Menu.js +13 -18
  334. package/cjs/internals/Menu/MenuItem.js +1 -2
  335. package/cjs/internals/Menu/Menubar.js +6 -8
  336. package/cjs/internals/Menu/useRenderMenuItem.js +1 -2
  337. package/cjs/internals/Overlay/Modal.js +1 -2
  338. package/cjs/internals/Overlay/Overlay.js +1 -2
  339. package/cjs/internals/Overlay/OverlayProvider.js +1 -2
  340. package/cjs/internals/Overlay/OverlayTrigger.js +3 -11
  341. package/cjs/internals/Overlay/Position.js +4 -8
  342. package/cjs/internals/Overlay/types.d.ts +1 -1
  343. package/cjs/internals/Overlay/utils/position.d.ts +24 -0
  344. package/cjs/internals/Overlay/{positionUtils.js → utils/position.js} +136 -50
  345. package/cjs/internals/Picker/Listbox.js +18 -23
  346. package/cjs/internals/Picker/PickerIndicator.js +9 -10
  347. package/cjs/internals/Picker/PickerLabel.js +6 -7
  348. package/cjs/internals/Picker/PickerPopup.js +1 -2
  349. package/cjs/internals/Picker/PickerToggle.js +1 -2
  350. package/cjs/internals/Picker/PickerToggleTrigger.js +1 -2
  351. package/cjs/internals/Picker/utils.js +1 -4
  352. package/cjs/internals/Provider/CustomContext.d.ts +20 -1
  353. package/cjs/internals/Provider/types.d.ts +8 -3
  354. package/cjs/internals/Ripple/Ripple.js +1 -2
  355. package/cjs/internals/SafeAnchor/SafeAnchor.js +1 -2
  356. package/cjs/internals/Tree/TreeProvider.js +4 -5
  357. package/cjs/internals/Tree/utils/filterNodesOfTree.js +1 -4
  358. package/cjs/internals/Tree/utils/findNodeOfTree.js +1 -4
  359. package/cjs/internals/Windowing/AutoSizer.js +1 -2
  360. package/cjs/internals/Windowing/List.js +1 -2
  361. package/cjs/internals/Windowing/index.js +1 -2
  362. package/cjs/internals/hooks/useClickOutside.js +5 -6
  363. package/cjs/internals/hooks/useElementResize.d.ts +2 -1
  364. package/cjs/internals/hooks/useElementResize.js +50 -7
  365. package/cjs/internals/hooks/useEventCallback.js +1 -4
  366. package/cjs/internals/hooks/useEventListener.js +1 -4
  367. package/cjs/internals/hooks/usePortal.js +9 -15
  368. package/cjs/internals/hooks/useRootClose.js +6 -7
  369. package/cjs/internals/hooks/useStyles.js +5 -8
  370. package/cjs/internals/hooks/useTimeout.js +1 -7
  371. package/cjs/internals/hooks/useToggleCaret.d.ts +1 -1
  372. package/cjs/internals/intl/FormattedDate.js +4 -5
  373. package/cjs/internals/intl/FormattedNumber.js +5 -7
  374. package/cjs/internals/types/placement.d.ts +5 -0
  375. package/cjs/internals/utils/colours.js +1 -4
  376. package/cjs/internals/utils/composeFunctions.js +1 -4
  377. package/cjs/internals/utils/createChainedFunction.js +2 -8
  378. package/cjs/internals/utils/date/copyTime.js +4 -5
  379. package/cjs/internals/utils/getDataGroupBy.js +5 -8
  380. package/cjs/internals/utils/html/htmlPropsUtils.js +1 -4
  381. package/cjs/internals/utils/placement.js +1 -4
  382. package/cjs/internals/utils/react/createComponent.js +6 -7
  383. package/cjs/internals/utils/string/tplTransform.js +1 -4
  384. package/cjs/internals/utils/style-sheet/css.d.ts +1 -1
  385. package/cjs/internals/utils/style-sheet/css.js +4 -13
  386. package/cjs/internals/utils/style-sheet/styles.js +2 -8
  387. package/cjs/locales/ar_EG.d.ts +6 -0
  388. package/cjs/locales/ar_EG.js +6 -0
  389. package/cjs/locales/ca_ES.d.ts +6 -0
  390. package/cjs/locales/ca_ES.js +6 -0
  391. package/cjs/locales/cs_CZ.d.ts +6 -0
  392. package/cjs/locales/cs_CZ.js +6 -0
  393. package/cjs/locales/da_DK.d.ts +6 -0
  394. package/cjs/locales/da_DK.js +6 -0
  395. package/cjs/locales/de_DE.d.ts +6 -0
  396. package/cjs/locales/de_DE.js +6 -0
  397. package/cjs/locales/en_GB.d.ts +6 -0
  398. package/cjs/locales/en_GB.js +6 -0
  399. package/cjs/locales/en_US.d.ts +6 -0
  400. package/cjs/locales/en_US.js +6 -0
  401. package/cjs/locales/es_AR.d.ts +6 -0
  402. package/cjs/locales/es_AR.js +6 -0
  403. package/cjs/locales/es_ES.d.ts +6 -0
  404. package/cjs/locales/es_ES.js +7 -1
  405. package/cjs/locales/fa_IR.d.ts +6 -0
  406. package/cjs/locales/fa_IR.js +6 -0
  407. package/cjs/locales/fi_FI.d.ts +6 -0
  408. package/cjs/locales/fi_FI.js +6 -0
  409. package/cjs/locales/fr_FR.d.ts +6 -0
  410. package/cjs/locales/fr_FR.js +6 -0
  411. package/cjs/locales/gu_IN.d.ts +157 -0
  412. package/cjs/locales/gu_IN.js +97 -0
  413. package/cjs/locales/hu_HU.d.ts +6 -0
  414. package/cjs/locales/hu_HU.js +6 -0
  415. package/cjs/locales/index.d.ts +3 -0
  416. package/cjs/locales/index.js +8 -2
  417. package/cjs/locales/it_IT.d.ts +6 -0
  418. package/cjs/locales/it_IT.js +6 -0
  419. package/cjs/locales/ja_JP.d.ts +6 -0
  420. package/cjs/locales/ja_JP.js +6 -0
  421. package/cjs/locales/kk_KZ.d.ts +6 -0
  422. package/cjs/locales/kk_KZ.js +6 -0
  423. package/cjs/locales/ko_KR.d.ts +6 -0
  424. package/cjs/locales/ko_KR.js +6 -0
  425. package/cjs/locales/ne_NP.d.ts +6 -0
  426. package/cjs/locales/ne_NP.js +6 -0
  427. package/cjs/locales/nl_NL.d.ts +6 -0
  428. package/cjs/locales/nl_NL.js +8 -2
  429. package/cjs/locales/pl_PL.d.ts +6 -0
  430. package/cjs/locales/pl_PL.js +6 -0
  431. package/cjs/locales/pt_BR.d.ts +6 -0
  432. package/cjs/locales/pt_BR.js +6 -0
  433. package/cjs/locales/ru_RU.d.ts +6 -0
  434. package/cjs/locales/ru_RU.js +6 -0
  435. package/cjs/locales/sv_SE.d.ts +6 -0
  436. package/cjs/locales/sv_SE.js +6 -0
  437. package/cjs/locales/th_TH.d.ts +169 -0
  438. package/cjs/locales/th_TH.js +100 -0
  439. package/cjs/locales/tr_TR.d.ts +6 -0
  440. package/cjs/locales/tr_TR.js +6 -0
  441. package/cjs/locales/uk_UA.d.ts +157 -0
  442. package/cjs/locales/uk_UA.js +97 -0
  443. package/cjs/locales/zh_CN.d.ts +6 -0
  444. package/cjs/locales/zh_CN.js +6 -0
  445. package/cjs/locales/zh_TW.d.ts +6 -0
  446. package/cjs/locales/zh_TW.js +6 -0
  447. package/cjs/toaster/ToastContainer.js +3 -4
  448. package/cjs/toaster/toaster.js +2 -6
  449. package/cjs/useDialog/Dialog.d.ts +15 -0
  450. package/cjs/useDialog/Dialog.js +109 -0
  451. package/cjs/useDialog/DialogContainer.d.ts +11 -0
  452. package/cjs/useDialog/DialogContainer.js +57 -0
  453. package/cjs/useDialog/index.d.ts +3 -0
  454. package/cjs/useDialog/index.js +15 -0
  455. package/cjs/useDialog/types.d.ts +33 -0
  456. package/cjs/useDialog/types.js +4 -0
  457. package/cjs/useDialog/useDialog.d.ts +15 -0
  458. package/cjs/useDialog/useDialog.js +126 -0
  459. package/cjs/useFormControl/useFormControl.js +1 -4
  460. package/cjs/useMediaQuery/breakpoints.js +4 -10
  461. package/cjs/useMediaQuery/useMediaQuery.js +1 -4
  462. package/cjs/useToaster/useToaster.d.ts +1 -1
  463. package/cjs/useToaster/useToaster.js +9 -9
  464. package/dist/rsuite-no-reset.css +14549 -13982
  465. package/dist/rsuite-no-reset.min.css +1 -2
  466. package/dist/rsuite.css +14778 -14187
  467. package/dist/rsuite.js +508 -229
  468. package/dist/rsuite.js.map +1 -1
  469. package/dist/rsuite.min.css +1 -2
  470. package/dist/rsuite.min.js +1 -1
  471. package/dist/rsuite.min.js.map +1 -1
  472. package/esm/Animation/Bounce.js +4 -5
  473. package/esm/Animation/Fade.js +5 -6
  474. package/esm/Animation/Slide.js +5 -6
  475. package/esm/Calendar/MonthDropdown/MonthDropdown.js +16 -20
  476. package/esm/Calendar/TimeDropdown/utils/scrollToTime.js +1 -2
  477. package/esm/Calendar/hooks/useCalendarDate.js +3 -6
  478. package/esm/CascadeTree/hooks/usePaths.js +7 -8
  479. package/esm/CheckTree/CheckTreeView.js +16 -20
  480. package/esm/CheckTree/hooks/useTreeValue.js +4 -5
  481. package/esm/CheckTreePicker/CheckTreePicker.d.ts +4 -0
  482. package/esm/CheckTreePicker/CheckTreePicker.js +28 -0
  483. package/esm/CustomProvider/CustomProvider.js +13 -2
  484. package/esm/DateInput/DateInput.js +4 -0
  485. package/esm/DateInput/hooks/useDateInputState.js +6 -7
  486. package/esm/DateInput/hooks/useIsFocused.js +4 -5
  487. package/esm/DateInput/hooks/useKeyboardInputEvent.js +7 -8
  488. package/esm/DateInput/test/types/TestKeyPressProps.d.ts +6 -0
  489. package/esm/DateInput/test/types/TestKeyPressProps.js +2 -0
  490. package/esm/DatePicker/DatePicker.js +2 -8
  491. package/esm/DatePicker/Toolbar.js +6 -7
  492. package/esm/DatePicker/utils.js +14 -24
  493. package/esm/DateRangeInput/DateRangeInput.js +5 -4
  494. package/esm/DateRangePicker/Calendar.d.ts +2 -1
  495. package/esm/DateRangePicker/Calendar.js +7 -1
  496. package/esm/DateRangePicker/DateRangePicker.d.ts +3 -1
  497. package/esm/DateRangePicker/DateRangePicker.js +8 -18
  498. package/esm/DateRangePicker/disabledDateUtils.js +4 -16
  499. package/esm/DateRangePicker/hooks/useCalendarHandlers.js +7 -8
  500. package/esm/DateRangePicker/utils.js +5 -6
  501. package/esm/Dropdown/Dropdown.js +8 -10
  502. package/esm/Dropdown/DropdownItem.js +5 -6
  503. package/esm/Dropdown/DropdownMenu.js +35 -41
  504. package/esm/Dropdown/DropdownState.js +1 -4
  505. package/esm/Form/hooks/useFormValidate.js +3 -8
  506. package/esm/Form/hooks/useSchemaModel.js +6 -9
  507. package/esm/FormControl/FormControl.d.ts +2 -2
  508. package/esm/FormControl/FormControl.js +1 -1
  509. package/esm/FormErrorMessage/FormErrorMessage.d.ts +2 -2
  510. package/esm/FormGroup/FormGroup.d.ts +0 -18
  511. package/esm/FormGroup/FormGroup.js +1 -28
  512. package/esm/FormGroup/FormGroupContext.d.ts +4 -0
  513. package/esm/FormGroup/FormGroupContext.js +3 -0
  514. package/esm/FormGroup/index.d.ts +1 -1
  515. package/esm/FormGroup/index.js +1 -1
  516. package/esm/FormGroup/useFormGroup.d.ts +18 -0
  517. package/esm/FormGroup/useFormGroup.js +30 -0
  518. package/esm/Grid/utils/styles.d.ts +1 -1
  519. package/esm/Grid/utils/styles.js +1 -4
  520. package/esm/InlineEdit/useEditState.js +1 -1
  521. package/esm/InlineEdit/useFocusEvent.js +6 -7
  522. package/esm/Input/Input.js +1 -1
  523. package/esm/InputGroup/InputGroup.d.ts +0 -5
  524. package/esm/InputGroup/InputGroup.js +1 -1
  525. package/esm/InputGroup/InputGroupContext.d.ts +6 -0
  526. package/esm/InputGroup/InputGroupContext.js +3 -0
  527. package/esm/InputGroup/index.d.ts +1 -0
  528. package/esm/InputGroup/index.js +1 -0
  529. package/esm/List/helper/AutoScroller.js +7 -8
  530. package/esm/List/helper/useSortHelper.js +1 -1
  531. package/esm/List/helper/utils.js +4 -7
  532. package/esm/MaskedInput/adjustCaretPosition.js +11 -12
  533. package/esm/MaskedInput/conformToMask.js +1 -10
  534. package/esm/MaskedInput/createTextMaskInputElement.js +9 -10
  535. package/esm/MaskedInput/utilities.js +1 -7
  536. package/esm/Menu/MenuItem.js +5 -6
  537. package/esm/MultiCascadeTree/hooks/useCascadeValue.js +1 -4
  538. package/esm/MultiCascadeTree/utils.js +1 -4
  539. package/esm/Nav/AdaptiveNavItem.js +1 -1
  540. package/esm/Nav/Nav.js +1 -1
  541. package/esm/Nav/NavDropdown.js +8 -10
  542. package/esm/Nav/NavDropdownItem.js +5 -6
  543. package/esm/Nav/NavDropdownMenu.js +35 -41
  544. package/esm/Nav/NavMenu.js +1 -1
  545. package/esm/Navbar/NavbarDropdown.js +7 -9
  546. package/esm/Navbar/NavbarDropdownMenu.js +11 -14
  547. package/esm/NumberInput/utils/number.js +1 -4
  548. package/esm/Progress/Progress.d.ts +1 -1
  549. package/esm/Progress/Progress.js +1 -1
  550. package/esm/Progress/ProgressInfo.d.ts +17 -0
  551. package/esm/Progress/ProgressInfo.js +24 -0
  552. package/esm/Progress/ProgressLine.d.ts +20 -6
  553. package/esm/Progress/ProgressLine.js +49 -38
  554. package/esm/Progress/ProgressSections.d.ts +15 -0
  555. package/esm/Progress/ProgressSections.js +38 -0
  556. package/esm/Progress/ProgressStroke.d.ts +24 -0
  557. package/esm/Progress/ProgressStroke.js +46 -0
  558. package/esm/Progress/index.d.ts +3 -3
  559. package/esm/Progress/index.js +1 -1
  560. package/esm/Progress/types.d.ts +11 -0
  561. package/esm/Progress/types.js +2 -0
  562. package/esm/{Progress → ProgressCircle}/ProgressCircle.d.ts +20 -14
  563. package/esm/ProgressCircle/ProgressCircle.js +107 -0
  564. package/esm/ProgressCircle/ProgressCircleSections.d.ts +23 -0
  565. package/esm/ProgressCircle/ProgressCircleSections.js +47 -0
  566. package/esm/ProgressCircle/hooks/useProgressCirclePath.d.ts +28 -0
  567. package/esm/ProgressCircle/hooks/useProgressCirclePath.js +62 -0
  568. package/esm/ProgressCircle/index.d.ts +4 -0
  569. package/esm/ProgressCircle/index.js +8 -0
  570. package/esm/RadioGroup/RadioGroup.d.ts +4 -1
  571. package/esm/RangeSlider/RangeSlider.js +0 -1
  572. package/esm/Rate/useRatingStates.js +6 -7
  573. package/esm/SegmentedControl/Indicator.d.ts +10 -0
  574. package/esm/SegmentedControl/Indicator.js +17 -0
  575. package/esm/SegmentedControl/SegmentedControl.d.ts +27 -0
  576. package/esm/SegmentedControl/SegmentedControl.js +81 -0
  577. package/esm/SegmentedControl/SegmentedItem.d.ts +16 -0
  578. package/esm/SegmentedControl/SegmentedItem.js +39 -0
  579. package/esm/SegmentedControl/hooks/useIndicatorPosition.d.ts +17 -0
  580. package/esm/SegmentedControl/hooks/useIndicatorPosition.js +50 -0
  581. package/esm/SegmentedControl/index.d.ts +4 -0
  582. package/esm/SegmentedControl/index.js +8 -0
  583. package/esm/Sidenav/ExpandedSidenavDropdown.js +10 -14
  584. package/esm/Sidenav/ExpandedSidenavDropdownItem.js +1 -1
  585. package/esm/Sidenav/ExpandedSidenavDropdownMenu.js +7 -9
  586. package/esm/Sidenav/Sidenav.d.ts +0 -15
  587. package/esm/Sidenav/Sidenav.js +1 -1
  588. package/esm/Sidenav/SidenavContext.d.ts +16 -0
  589. package/esm/Sidenav/SidenavContext.js +3 -0
  590. package/esm/Sidenav/SidenavDropdown.js +13 -16
  591. package/esm/Sidenav/SidenavDropdownItem.js +6 -7
  592. package/esm/Sidenav/SidenavDropdownMenu.js +36 -42
  593. package/esm/Sidenav/SidenavItem.js +6 -7
  594. package/esm/Sidenav/SidenavToggle.js +1 -1
  595. package/esm/Slider/ProgressBar.d.ts +0 -1
  596. package/esm/Slider/ProgressBar.js +1 -3
  597. package/esm/Slider/Slider.js +13 -4
  598. package/esm/Stack/Stack.js +4 -2
  599. package/esm/Stack/VStack.js +1 -3
  600. package/esm/Tree/TreeView.js +16 -20
  601. package/esm/Tree/hooks/useFlattenTree.js +2 -8
  602. package/esm/Tree/hooks/useVirtualizedTreeData.js +1 -7
  603. package/esm/Tree/utils/flattenTree.js +2 -8
  604. package/esm/Tree/utils/getExpandItemValues.js +6 -7
  605. package/esm/Tree/utils/indentTreeNode.js +1 -4
  606. package/esm/Uploader/UploadFileItem.js +1 -4
  607. package/esm/Uploader/Uploader.js +1 -4
  608. package/esm/global.d.ts +0 -6
  609. package/esm/index.d.ts +3 -0
  610. package/esm/index.js +3 -0
  611. package/esm/internals/InputBase/InputBase.js +1 -1
  612. package/esm/internals/Menu/Menu.js +12 -16
  613. package/esm/internals/Menu/Menubar.js +5 -6
  614. package/esm/internals/Overlay/OverlayTrigger.js +2 -9
  615. package/esm/internals/Overlay/Position.js +3 -6
  616. package/esm/internals/Overlay/types.d.ts +1 -1
  617. package/esm/internals/Overlay/utils/position.d.ts +24 -0
  618. package/esm/internals/Overlay/{positionUtils.js → utils/position.js} +134 -48
  619. package/esm/internals/Picker/Listbox.js +17 -21
  620. package/esm/internals/Picker/PickerIndicator.js +9 -10
  621. package/esm/internals/Picker/PickerLabel.js +6 -7
  622. package/esm/internals/Picker/utils.js +1 -4
  623. package/esm/internals/Provider/CustomContext.d.ts +20 -1
  624. package/esm/internals/Provider/types.d.ts +8 -3
  625. package/esm/internals/Tree/TreeProvider.js +4 -5
  626. package/esm/internals/Tree/utils/filterNodesOfTree.js +1 -4
  627. package/esm/internals/Tree/utils/findNodeOfTree.js +1 -4
  628. package/esm/internals/hooks/useClickOutside.js +5 -6
  629. package/esm/internals/hooks/useElementResize.d.ts +2 -1
  630. package/esm/internals/hooks/useElementResize.js +50 -7
  631. package/esm/internals/hooks/useEventCallback.js +1 -4
  632. package/esm/internals/hooks/useEventListener.js +1 -4
  633. package/esm/internals/hooks/usePortal.js +8 -13
  634. package/esm/internals/hooks/useRootClose.js +6 -7
  635. package/esm/internals/hooks/useStyles.js +5 -8
  636. package/esm/internals/hooks/useTimeout.js +1 -7
  637. package/esm/internals/hooks/useToggleCaret.d.ts +1 -1
  638. package/esm/internals/intl/FormattedDate.js +4 -5
  639. package/esm/internals/intl/FormattedNumber.js +4 -5
  640. package/esm/internals/types/placement.d.ts +5 -0
  641. package/esm/internals/utils/colours.js +1 -4
  642. package/esm/internals/utils/composeFunctions.js +1 -4
  643. package/esm/internals/utils/createChainedFunction.js +2 -8
  644. package/esm/internals/utils/date/copyTime.js +4 -5
  645. package/esm/internals/utils/getDataGroupBy.js +5 -8
  646. package/esm/internals/utils/html/htmlPropsUtils.js +1 -4
  647. package/esm/internals/utils/placement.js +1 -4
  648. package/esm/internals/utils/react/createComponent.js +6 -7
  649. package/esm/internals/utils/string/tplTransform.js +1 -4
  650. package/esm/internals/utils/style-sheet/css.d.ts +1 -1
  651. package/esm/internals/utils/style-sheet/css.js +4 -13
  652. package/esm/internals/utils/style-sheet/styles.js +2 -8
  653. package/esm/locales/ar_EG.d.ts +6 -0
  654. package/esm/locales/ar_EG.js +6 -0
  655. package/esm/locales/ca_ES.d.ts +6 -0
  656. package/esm/locales/ca_ES.js +6 -0
  657. package/esm/locales/cs_CZ.d.ts +6 -0
  658. package/esm/locales/cs_CZ.js +6 -0
  659. package/esm/locales/da_DK.d.ts +6 -0
  660. package/esm/locales/da_DK.js +6 -0
  661. package/esm/locales/de_DE.d.ts +6 -0
  662. package/esm/locales/de_DE.js +6 -0
  663. package/esm/locales/en_GB.d.ts +6 -0
  664. package/esm/locales/en_GB.js +6 -0
  665. package/esm/locales/en_US.d.ts +6 -0
  666. package/esm/locales/en_US.js +6 -0
  667. package/esm/locales/es_AR.d.ts +6 -0
  668. package/esm/locales/es_AR.js +6 -0
  669. package/esm/locales/es_ES.d.ts +6 -0
  670. package/esm/locales/es_ES.js +7 -1
  671. package/esm/locales/fa_IR.d.ts +6 -0
  672. package/esm/locales/fa_IR.js +6 -0
  673. package/esm/locales/fi_FI.d.ts +6 -0
  674. package/esm/locales/fi_FI.js +6 -0
  675. package/esm/locales/fr_FR.d.ts +6 -0
  676. package/esm/locales/fr_FR.js +6 -0
  677. package/esm/locales/gu_IN.d.ts +157 -0
  678. package/esm/locales/gu_IN.js +93 -0
  679. package/esm/locales/hu_HU.d.ts +6 -0
  680. package/esm/locales/hu_HU.js +6 -0
  681. package/esm/locales/index.d.ts +3 -0
  682. package/esm/locales/index.js +4 -1
  683. package/esm/locales/it_IT.d.ts +6 -0
  684. package/esm/locales/it_IT.js +6 -0
  685. package/esm/locales/ja_JP.d.ts +6 -0
  686. package/esm/locales/ja_JP.js +6 -0
  687. package/esm/locales/kk_KZ.d.ts +6 -0
  688. package/esm/locales/kk_KZ.js +6 -0
  689. package/esm/locales/ko_KR.d.ts +6 -0
  690. package/esm/locales/ko_KR.js +6 -0
  691. package/esm/locales/ne_NP.d.ts +6 -0
  692. package/esm/locales/ne_NP.js +6 -0
  693. package/esm/locales/nl_NL.d.ts +6 -0
  694. package/esm/locales/nl_NL.js +8 -2
  695. package/esm/locales/pl_PL.d.ts +6 -0
  696. package/esm/locales/pl_PL.js +6 -0
  697. package/esm/locales/pt_BR.d.ts +6 -0
  698. package/esm/locales/pt_BR.js +6 -0
  699. package/esm/locales/ru_RU.d.ts +6 -0
  700. package/esm/locales/ru_RU.js +6 -0
  701. package/esm/locales/sv_SE.d.ts +6 -0
  702. package/esm/locales/sv_SE.js +6 -0
  703. package/esm/locales/th_TH.d.ts +169 -0
  704. package/esm/locales/th_TH.js +96 -0
  705. package/esm/locales/tr_TR.d.ts +6 -0
  706. package/esm/locales/tr_TR.js +6 -0
  707. package/esm/locales/uk_UA.d.ts +157 -0
  708. package/esm/locales/uk_UA.js +93 -0
  709. package/esm/locales/zh_CN.d.ts +6 -0
  710. package/esm/locales/zh_CN.js +6 -0
  711. package/esm/locales/zh_TW.d.ts +6 -0
  712. package/esm/locales/zh_TW.js +6 -0
  713. package/esm/toaster/ToastContainer.js +2 -2
  714. package/esm/toaster/toaster.js +1 -4
  715. package/esm/useDialog/Dialog.d.ts +15 -0
  716. package/esm/useDialog/Dialog.js +103 -0
  717. package/esm/useDialog/DialogContainer.d.ts +11 -0
  718. package/esm/useDialog/DialogContainer.js +52 -0
  719. package/esm/useDialog/index.d.ts +3 -0
  720. package/esm/useDialog/index.js +4 -0
  721. package/esm/useDialog/types.d.ts +33 -0
  722. package/esm/useDialog/types.js +2 -0
  723. package/esm/useDialog/useDialog.d.ts +15 -0
  724. package/esm/useDialog/useDialog.js +120 -0
  725. package/esm/useFormControl/useFormControl.js +1 -4
  726. package/esm/useMediaQuery/breakpoints.js +4 -10
  727. package/esm/useMediaQuery/useMediaQuery.js +1 -4
  728. package/esm/useToaster/useToaster.d.ts +1 -1
  729. package/esm/useToaster/useToaster.js +11 -10
  730. package/locales/gu_IN/package.json +7 -0
  731. package/locales/th_TH/package.json +7 -0
  732. package/locales/uk_UA/package.json +7 -0
  733. package/package.json +5 -6
  734. package/toaster/styles/index.css +107 -121
  735. package/useDialog/package.json +7 -0
  736. package/useToaster/styles/index.css +107 -121
  737. package/Accordion/styles/index.less +0 -2
  738. package/Animation/styles/animation.less +0 -95
  739. package/Animation/styles/bounce.less +0 -34
  740. package/Animation/styles/collapse.less +0 -23
  741. package/Animation/styles/fade.less +0 -10
  742. package/Animation/styles/index.less +0 -8
  743. package/Animation/styles/mixin.less +0 -15
  744. package/Animation/styles/slide.less +0 -24
  745. package/Animation/styles/variables.less +0 -4
  746. package/AutoComplete/styles/index.less +0 -37
  747. package/Avatar/styles/index.less +0 -48
  748. package/AvatarGroup/styles/index.less +0 -25
  749. package/Badge/styles/index.less +0 -101
  750. package/Badge/styles/variables.less +0 -19
  751. package/Box/styles/index.less +0 -1
  752. package/Breadcrumb/styles/index.less +0 -49
  753. package/Button/styles/index.less +0 -364
  754. package/Button/styles/mixin.less +0 -62
  755. package/Button/styles/variables.less +0 -30
  756. package/ButtonGroup/styles/index.less +0 -91
  757. package/ButtonToolbar/styles/index.less +0 -17
  758. package/Calendar/styles/index.less +0 -678
  759. package/Card/styles/index.less +0 -63
  760. package/CardGroup/styles/index.less +0 -8
  761. package/Carousel/styles/index.less +0 -192
  762. package/CascadeTree/styles/index.less +0 -88
  763. package/CascadeTree/styles/search.less +0 -35
  764. package/Cascader/styles/index.less +0 -5
  765. package/Center/styles/index.less +0 -9
  766. package/CheckPicker/styles/index.less +0 -21
  767. package/CheckTree/styles/index.less +0 -120
  768. package/CheckTreePicker/styles/index.less +0 -17
  769. package/Checkbox/styles/index.less +0 -153
  770. package/Checkbox/styles/mixin.less +0 -37
  771. package/CheckboxGroup/styles/index.less +0 -14
  772. package/Col/styles/index.less +0 -2
  773. package/Container/stories/styles.less +0 -23
  774. package/Container/styles/index.less +0 -16
  775. package/Content/styles/index.less +0 -6
  776. package/DateInput/styles/index.less +0 -1
  777. package/DatePicker/styles/index.less +0 -167
  778. package/DatePicker/styles/mixin.less +0 -8
  779. package/DateRangeInput/styles/index.less +0 -1
  780. package/DateRangePicker/styles/index.less +0 -145
  781. package/Divider/styles/index.less +0 -85
  782. package/Drawer/styles/index.less +0 -255
  783. package/Drawer/styles/mixin.less +0 -23
  784. package/Dropdown/styles/index.less +0 -341
  785. package/Dropdown/styles/mixin.less +0 -4
  786. package/FlexboxGrid/styles/index.less +0 -79
  787. package/Footer/styles/index.less +0 -5
  788. package/Form/styles/index.less +0 -1
  789. package/FormControl/styles/index.less +0 -79
  790. package/FormControlLabel/styles/index.less +0 -7
  791. package/FormErrorMessage/styles/animation.less +0 -43
  792. package/FormErrorMessage/styles/index.less +0 -179
  793. package/FormGroup/styles/index.less +0 -75
  794. package/FormHelpText/styles/index.less +0 -21
  795. package/FormStack/styles/index.less +0 -15
  796. package/Grid/styles/columns.less +0 -21
  797. package/Grid/styles/grid-framework.less +0 -92
  798. package/Grid/styles/index.less +0 -107
  799. package/Grid/styles/mixin.less +0 -12
  800. package/Grid/styles/row.less +0 -42
  801. package/Grid/styles/variables.less +0 -5
  802. package/Header/styles/index.less +0 -5
  803. package/Heading/styles/index.less +0 -42
  804. package/Heading/styles/variables.less +0 -19
  805. package/HeadingGroup/styles/index.less +0 -3
  806. package/Highlight/styles/index.less +0 -6
  807. package/IconButton/styles/index.less +0 -90
  808. package/Image/styles/index.less +0 -34
  809. package/InlineEdit/styles/index.less +0 -50
  810. package/Input/styles/index.less +0 -23
  811. package/Input/styles/mixin.less +0 -38
  812. package/Input/styles/variables.less +0 -22
  813. package/InputGroup/styles/index.less +0 -237
  814. package/InputNumber/styles/index.less +0 -1
  815. package/InputPicker/styles/index.less +0 -64
  816. package/InputPicker/styles/mixin.less +0 -7
  817. package/Kbd/styles/index.less +0 -20
  818. package/Kbd/styles/mixin.less +0 -24
  819. package/Kbd/styles/variables.less +0 -13
  820. package/Link/styles/index.less +0 -39
  821. package/List/styles/index.less +0 -113
  822. package/Loader/styles/index.less +0 -114
  823. package/Loader/styles/mixin.less +0 -33
  824. package/Loader/styles/variables.less +0 -16
  825. package/Menu/styles/index.less +0 -108
  826. package/Message/styles/index.less +0 -188
  827. package/Modal/styles/animation.less +0 -15
  828. package/Modal/styles/index.less +0 -189
  829. package/MultiCascadeTree/styles/index.less +0 -46
  830. package/MultiCascader/styles/index.less +0 -15
  831. package/Nav/styles/index.less +0 -366
  832. package/Navbar/styles/index.less +0 -236
  833. package/Notification/styles/index.less +0 -114
  834. package/NumberInput/styles/index.less +0 -74
  835. package/NumberInput/styles/mixin.less +0 -11
  836. package/Pagination/styles/index.less +0 -101
  837. package/Pagination/styles/mixin.less +0 -14
  838. package/Pagination/styles/pagination-group.less +0 -31
  839. package/Panel/styles/index.less +0 -121
  840. package/PanelGroup/styles/index.less +0 -34
  841. package/PasswordInput/styles/index.less +0 -1
  842. package/PasswordStrengthMeter/styles/index.less +0 -39
  843. package/PinInput/styles/index.less +0 -66
  844. package/Placeholder/styles/index.less +0 -148
  845. package/Placeholder/styles/mixin.less +0 -7
  846. package/Popover/styles/index.less +0 -202
  847. package/Popover/styles/mixins.less +0 -60
  848. package/Progress/styles/animation.less +0 -34
  849. package/Progress/styles/index.less +0 -187
  850. package/ProgressLine/package.json +0 -7
  851. package/Radio/styles/index.less +0 -144
  852. package/Radio/styles/mixin.less +0 -5
  853. package/RadioGroup/styles/index.less +0 -87
  854. package/RadioTile/styles/index.less +0 -79
  855. package/RadioTileGroup/styles/index.less +0 -1
  856. package/RangeSlider/styles/index.less +0 -4
  857. package/Rate/styles/index.less +0 -139
  858. package/Row/styles/index.less +0 -2
  859. package/SelectPicker/styles/index.less +0 -47
  860. package/Sidebar/styles/index.less +0 -15
  861. package/Sidenav/styles/index.less +0 -655
  862. package/Sidenav/styles/mixin.less +0 -23
  863. package/Slider/styles/index.less +0 -296
  864. package/Stack/styles/index.less +0 -83
  865. package/Stat/styles/index.less +0 -113
  866. package/StatGroup/styles/index.less +0 -8
  867. package/Steps/styles/index.less +0 -222
  868. package/Table/styles/index.less +0 -433
  869. package/Table/styles/mixin.less +0 -8
  870. package/Tabs/styles/index.less +0 -24
  871. package/Tag/styles/index.less +0 -55
  872. package/TagGroup/styles/index.less +0 -14
  873. package/TagInput/styles/index.less +0 -5
  874. package/TagPicker/styles/index.less +0 -136
  875. package/Text/styles/index.less +0 -122
  876. package/Text/styles/variables.less +0 -9
  877. package/Textarea/styles/index.less +0 -7
  878. package/TimePicker/styles/index.less +0 -1
  879. package/TimeRangePicker/styles/index.less +0 -1
  880. package/Timeline/stories/styles.less +0 -29
  881. package/Timeline/styles/index.less +0 -174
  882. package/Timeline/styles/mixin.less +0 -13
  883. package/Toggle/styles/index.less +0 -278
  884. package/Tooltip/styles/index.less +0 -161
  885. package/Tooltip/styles/mixins.less +0 -60
  886. package/Tree/styles/indent-line.less +0 -8
  887. package/Tree/styles/index.less +0 -186
  888. package/Tree/styles/toggle.less +0 -32
  889. package/TreePicker/styles/index.less +0 -16
  890. package/Uploader/styles/index.less +0 -468
  891. package/Uploader/styles/mixin.less +0 -11
  892. package/VisuallyHidden/styles/index.less +0 -11
  893. package/cjs/Progress/ProgressCircle.js +0 -132
  894. package/cjs/internals/Overlay/positionUtils.d.ts +0 -15
  895. package/dist/rsuite-no-reset-rtl.css +0 -15243
  896. package/dist/rsuite-no-reset-rtl.min.css +0 -2
  897. package/dist/rsuite-no-reset-rtl.min.css.map +0 -1
  898. package/dist/rsuite-no-reset.min.css.map +0 -1
  899. package/dist/rsuite-rtl.css +0 -15494
  900. package/dist/rsuite-rtl.min.css +0 -2
  901. package/dist/rsuite-rtl.min.css.map +0 -1
  902. package/dist/rsuite.min.css.map +0 -1
  903. package/esm/Progress/ProgressCircle.js +0 -125
  904. package/esm/internals/Overlay/positionUtils.d.ts +0 -15
  905. package/internals/Box/styles/index.less +0 -82
  906. package/internals/Burger/styles/index.less +0 -67
  907. package/internals/CloseButton/styles/index.less +0 -15
  908. package/internals/Picker/styles/index.less +0 -477
  909. package/internals/Picker/styles/mixin.less +0 -131
  910. package/internals/Ripple/styles/index.less +0 -36
  911. package/internals/Ripple/styles/mixins.less +0 -6
  912. package/internals/ScrollView/styles/index.less +0 -69
  913. package/internals/SearchBox/styles/index.less +0 -11
  914. package/styles/color-modes/dark.less +0 -441
  915. package/styles/color-modes/high-contrast.less +0 -452
  916. package/styles/color-modes/light.less +0 -464
  917. package/styles/colors/dark.less +0 -105
  918. package/styles/colors/high-contrast.less +0 -105
  919. package/styles/colors/light.less +0 -105
  920. package/styles/common.less +0 -13
  921. package/styles/index.less +0 -106
  922. package/styles/mixins/color-modes.less +0 -16
  923. package/styles/mixins/combobox.less +0 -6
  924. package/styles/mixins/hacks.less +0 -32
  925. package/styles/mixins/listbox.less +0 -68
  926. package/styles/mixins/menu.less +0 -12
  927. package/styles/mixins/utilities.less +0 -183
  928. package/styles/normalize.less +0 -247
  929. package/styles/plugins/palette.js +0 -1407
  930. package/styles/root.less +0 -83
  931. package/styles/scaffolding.less +0 -54
  932. package/styles/typography.less +0 -123
  933. package/styles/variables.less +0 -638
  934. package/toaster/styles/animation.less +0 -54
  935. package/toaster/styles/index.less +0 -100
  936. package/useToaster/styles/index.less +0 -1
@@ -7,11 +7,10 @@ import { useStyles, useCustom } from "../internals/hooks/index.js";
7
7
  * Bounce animation component
8
8
  * @see https://rsuitejs.com/components/animation/#bounce
9
9
  */
10
- const Bounce = /*#__PURE__*/React.forwardRef((_ref, ref) => {
11
- let {
12
- timeout = 300,
13
- ...props
14
- } = _ref;
10
+ const Bounce = /*#__PURE__*/React.forwardRef(({
11
+ timeout = 300,
12
+ ...props
13
+ }, ref) => {
15
14
  const {
16
15
  prefix
17
16
  } = useStyles('anim');
@@ -7,12 +7,11 @@ import { useStyles, useCustom } from "../internals/hooks/index.js";
7
7
  * Fade animation component
8
8
  * @see https://rsuitejs.com/components/animation/#fade
9
9
  */
10
- const Fade = /*#__PURE__*/React.forwardRef((_ref, ref) => {
11
- let {
12
- timeout = 300,
13
- className,
14
- ...props
15
- } = _ref;
10
+ const Fade = /*#__PURE__*/React.forwardRef(({
11
+ timeout = 300,
12
+ className,
13
+ ...props
14
+ }, ref) => {
16
15
  const {
17
16
  prefix,
18
17
  merge
@@ -7,12 +7,11 @@ import { useStyles, useCustom } from "../internals/hooks/index.js";
7
7
  * Slide animation component
8
8
  * @see https://rsuitejs.com/components/animation/#slide
9
9
  */
10
- const Slide = /*#__PURE__*/React.forwardRef((_ref, ref) => {
11
- let {
12
- timeout = 300,
13
- placement = 'right',
14
- ...props
15
- } = _ref;
10
+ const Slide = /*#__PURE__*/React.forwardRef(({
11
+ timeout = 300,
12
+ placement = 'right',
13
+ ...props
14
+ }, ref) => {
16
15
  const {
17
16
  propsWithDefaults
18
17
  } = useCustom('Slide', props);
@@ -55,11 +55,10 @@ const MonthDropdown = forwardRef((props, ref) => {
55
55
  itemAs: Item = 'div',
56
56
  ...restListProps
57
57
  } = monthDropdownProps || {};
58
- const rowRenderer = useCallback(_ref => {
59
- let {
60
- index,
61
- style
62
- } = _ref;
58
+ const rowRenderer = useCallback(({
59
+ index,
60
+ style
61
+ }) => {
63
62
  const selectedMonth = getMonth(date);
64
63
  const selectedYear = getYear(date);
65
64
  const year = startYear + index;
@@ -111,21 +110,18 @@ const MonthDropdown = forwardRef((props, ref) => {
111
110
  }, /*#__PURE__*/React.createElement(AutoSizer, {
112
111
  defaultHeight: defaultHeight,
113
112
  defaultWidth: defaultWidth
114
- }, _ref2 => {
115
- let {
116
- height,
117
- width
118
- } = _ref2;
119
- return /*#__PURE__*/React.createElement(FixedSizeList, _extends({
120
- className: merge(prefix('row-wrapper'), listClassName),
121
- width: width || defaultWidth,
122
- height: height || defaultHeight,
123
- itemSize: ITEM_SIZE,
124
- itemCount: rowCount,
125
- initialScrollOffset: initialScrollOffset,
126
- innerElementType: List
127
- }, restListProps), rowRenderer);
128
- })));
113
+ }, ({
114
+ height,
115
+ width
116
+ }) => /*#__PURE__*/React.createElement(FixedSizeList, _extends({
117
+ className: merge(prefix('row-wrapper'), listClassName),
118
+ width: width || defaultWidth,
119
+ height: height || defaultHeight,
120
+ itemSize: ITEM_SIZE,
121
+ itemCount: rowCount,
122
+ initialScrollOffset: initialScrollOffset,
123
+ innerElementType: List
124
+ }, restListProps), rowRenderer))));
129
125
  });
130
126
  MonthDropdown.displayName = 'MonthDropdown';
131
127
  export default MonthDropdown;
@@ -12,8 +12,7 @@ export function scrollToTime(time, row) {
12
12
  }
13
13
  }
14
14
  };
15
- Object.entries(time).forEach(_ref => {
16
- let [type, value] = _ref;
15
+ Object.entries(time).forEach(([type, value]) => {
17
16
  const container = row.querySelector(`[data-type="${type}"]`);
18
17
  if (container) {
19
18
  scrollToPosition(container, value, type);
@@ -11,12 +11,9 @@ export const useCalendarDate = (value, defaultDate) => {
11
11
  setValue(date);
12
12
  }
13
13
  }, [calendarDate]);
14
- const resetCalendarDate = useCallback(function (nextValue) {
15
- var _ref2, _nextValue;
16
- if (nextValue === void 0) {
17
- nextValue = value;
18
- }
19
- setValue((_ref2 = (_nextValue = nextValue) !== null && _nextValue !== void 0 ? _nextValue : defaultDate) !== null && _ref2 !== void 0 ? _ref2 : startOfToday());
14
+ const resetCalendarDate = useCallback((nextValue = value) => {
15
+ var _ref2;
16
+ setValue((_ref2 = nextValue !== null && nextValue !== void 0 ? nextValue : defaultDate) !== null && _ref2 !== void 0 ? _ref2 : startOfToday());
20
17
  }, [defaultDate, value]);
21
18
  useUpdateEffect(() => {
22
19
  var _valueRef$current;
@@ -10,14 +10,13 @@ import { getColumnsAndPaths } from "../utils.js";
10
10
  * - The path towards the current selected item (referred to by Cascader's value)
11
11
  *
12
12
  */
13
- export function usePaths(_ref) {
14
- let {
15
- data,
16
- activeItem,
17
- selectedItem,
18
- getParent,
19
- getChildren
20
- } = _ref;
13
+ export function usePaths({
14
+ data,
15
+ activeItem,
16
+ selectedItem,
17
+ getParent,
18
+ getChildren
19
+ }) {
21
20
  const pathTowardsSelectedItem = useMemo(() => getPathTowardsItem(selectedItem, getParent), [getParent, selectedItem]);
22
21
  const {
23
22
  columns,
@@ -219,12 +219,11 @@ const CheckTreeView = forwardRef((props, ref) => {
219
219
  treeItemRef: ref => saveTreeNodeRef(ref, refKey)
220
220
  }, treeNodeProps));
221
221
  };
222
- const renderVirtualListNode = _ref => {
223
- let {
224
- index,
225
- style,
226
- data
227
- } = _ref;
222
+ const renderVirtualListNode = ({
223
+ index,
224
+ style,
225
+ data
226
+ }) => {
228
227
  const node = data[index];
229
228
  const {
230
229
  layer,
@@ -286,20 +285,17 @@ const CheckTreeView = forwardRef((props, ref) => {
286
285
  height: 'auto'
287
286
  },
288
287
  className: prefix('virt-auto-sizer')
289
- }, _ref2 => {
290
- let {
291
- height
292
- } = _ref2;
293
- return /*#__PURE__*/React.createElement(List, _extends({
294
- ref: listRef,
295
- height: height,
296
- itemSize: defaultItemSize,
297
- itemCount: formattedNodes.length,
298
- itemData: formattedNodes,
299
- className: prefix('virt-list'),
300
- scrollShadow: scrollShadow
301
- }, listProps), renderVirtualListNode);
302
- }) : formattedNodes));
288
+ }, ({
289
+ height
290
+ }) => /*#__PURE__*/React.createElement(List, _extends({
291
+ ref: listRef,
292
+ height: height,
293
+ itemSize: defaultItemSize,
294
+ itemCount: formattedNodes.length,
295
+ itemData: formattedNodes,
296
+ className: prefix('virt-list'),
297
+ scrollShadow: scrollShadow
298
+ }, listProps), renderVirtualListNode)) : formattedNodes));
303
299
  });
304
300
  CheckTreeView.displayName = 'CheckTreeView';
305
301
  export default CheckTreeView;
@@ -1,11 +1,10 @@
1
1
  'use client';
2
2
  import { useControlled, useMount } from "../../internals/hooks/index.js";
3
3
  import { getCheckTreeDefaultValue } from "../utils.js";
4
- function useTreeValue(controlledValue, _ref) {
5
- let {
6
- defaultValue,
7
- uncheckableItemValues
8
- } = _ref;
4
+ function useTreeValue(controlledValue, {
5
+ defaultValue,
6
+ uncheckableItemValues
7
+ }) {
9
8
  const [value, setValue, isControlled] = useControlled(controlledValue, defaultValue);
10
9
  useMount(() => {
11
10
  setValue(getCheckTreeDefaultValue(value, uncheckableItemValues));
@@ -25,6 +25,10 @@ export interface CheckTreePickerProps<V = ValueType> extends Omit<CheckTreeViewP
25
25
  * Custom render selected items
26
26
  */
27
27
  renderValue?: (value: V, selectedNodes: TreeNode[], selectedElement: React.ReactNode) => React.ReactNode;
28
+ /**
29
+ * In the cascade case, the leaf node's value change callbacks
30
+ */
31
+ onCascadeChange?: (v: ValueType, event: React.SyntheticEvent) => void;
28
32
  }
29
33
  /**
30
34
  * The `CheckTreePicker` component is used for selecting multiple options which are organized in a tree structure.
@@ -77,6 +77,7 @@ const CheckTreePicker = forwardRef((props, ref) => {
77
77
  renderTree,
78
78
  renderTreeIcon,
79
79
  renderTreeNode,
80
+ onCascadeChange,
80
81
  ...rest
81
82
  } = propsWithDefaults;
82
83
  const {
@@ -148,6 +149,7 @@ const CheckTreePicker = forwardRef((props, ref) => {
148
149
  setFocusItemValue(null);
149
150
  setValue([]);
150
151
  onChange === null || onChange === void 0 || onChange([], event);
152
+ onCascadeChange === null || onCascadeChange === void 0 || onCascadeChange([], event);
151
153
  });
152
154
  const handleTreeKeyDown = useEventCallback(event => {
153
155
  onMenuKeyDown(event, {
@@ -166,9 +168,35 @@ const CheckTreePicker = forwardRef((props, ref) => {
166
168
  onMenuKeyDown: handleTreeKeyDown,
167
169
  ...rest
168
170
  });
171
+
172
+ // transform the parent node value to the leaf node value
173
+ const handleTransValue2Children = useEventCallback(nextSelectedNodes => {
174
+ return nextSelectedNodes.map(node => {
175
+ const currentNode = node.refKey ? flattenedNodes[node.refKey] : null;
176
+ if (currentNode && currentNode[childrenKey] && currentNode[childrenKey].length) {
177
+ const childNodes = currentNode[childrenKey].filter(child => {
178
+ const childValue = child[valueKey];
179
+ return !disabledItemValues.includes(childValue) && !uncheckableItemValues.includes(childValue);
180
+ });
181
+ return handleTransValue2Children(childNodes);
182
+ }
183
+ return node;
184
+ }).flat();
185
+ });
186
+ const handleChangeCascade = useEventCallback((nextValue, event) => {
187
+ if (!cascade) {
188
+ onCascadeChange === null || onCascadeChange === void 0 || onCascadeChange(nextValue, event);
189
+ } else {
190
+ const nextSelectedNodes = getSelectedItems(flattenedNodes, nextValue);
191
+ const childrenNodes = handleTransValue2Children(nextSelectedNodes);
192
+ const childrenValue = childrenNodes.map(node => node[valueKey]);
193
+ onCascadeChange === null || onCascadeChange === void 0 || onCascadeChange(childrenValue, event);
194
+ }
195
+ });
169
196
  const handleChange = useEventCallback((nextValue, event) => {
170
197
  setValue(nextValue);
171
198
  onChange === null || onChange === void 0 || onChange(nextValue, event);
199
+ handleChangeCascade(nextValue, event);
172
200
  });
173
201
  const treeContext = useMemo(() => ({
174
202
  register,
@@ -6,6 +6,7 @@ import { getClassNamePrefix, prefix } from "../internals/utils/index.js";
6
6
  import { addClass, removeClass, canUseDOM } from "../DOMHelper/index.js";
7
7
  import { CustomContext } from "../internals/Provider/CustomContext.js";
8
8
  import ToastContainer, { toastPlacements, defaultToasterContainer } from "../toaster/ToastContainer.js";
9
+ import DialogContainer from "../useDialog/DialogContainer.js";
9
10
  const themes = ['light', 'dark', 'high-contrast'];
10
11
 
11
12
  /**
@@ -27,6 +28,8 @@ export default function CustomProvider(props) {
27
28
  ...rest
28
29
  } = props;
29
30
  const toasters = useRef(new Map());
31
+ // This creates a ref that matches the expected type in CustomContext
32
+ const dialogContainerRef = useRef(null);
30
33
  const {
31
34
  Portal
32
35
  } = usePortal({
@@ -59,8 +62,14 @@ export default function CustomProvider(props) {
59
62
  });
60
63
  }
61
64
  }, [classPrefix, theme]);
65
+
66
+ // Create a context value with proper types
67
+ const contextValue = {
68
+ dialogContainer: dialogContainerRef,
69
+ ...value
70
+ };
62
71
  return /*#__PURE__*/React.createElement(CustomContext.Provider, {
63
- value: value
72
+ value: contextValue
64
73
  }, /*#__PURE__*/React.createElement(IconProvider, {
65
74
  value: iconContext
66
75
  }, children, /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement("div", {
@@ -71,5 +80,7 @@ export default function CustomProvider(props) {
71
80
  ref: ref => {
72
81
  toasters.current.set(placement, ref);
73
82
  }
74
- }))))));
83
+ }))), /*#__PURE__*/React.createElement(DialogContainer, {
84
+ ref: dialogContainerRef
85
+ }))));
75
86
  }
@@ -115,6 +115,10 @@ const DateInput = forwardRef((props, ref) => {
115
115
  const onSegmentValueChangeWithNumericKeys = useEventCallback(event => {
116
116
  const input = event.target;
117
117
  const key = event.key;
118
+ const isFunctionKey = key.startsWith('F') && !isNaN(Number(key.slice(1)));
119
+ if (isFunctionKey) {
120
+ return;
121
+ }
118
122
  const pattern = selectedState.selectedPattern;
119
123
  if (!pattern) {
120
124
  return;
@@ -4,13 +4,12 @@ import { useCallback, useEffect } from 'react';
4
4
  import { addDays, addMonths, addYears, addHours, addMinutes, addSeconds, isLastDayOfMonth, lastDayOfMonth, isValid } from "../../internals/utils/date/index.js";
5
5
  import { useCustom } from "../../internals/hooks/index.js";
6
6
  import { useDateField, patternMap } from "../DateField.js";
7
- export function useDateInputState(_ref) {
8
- let {
9
- formatStr,
10
- locale,
11
- date,
12
- isControlledDate
13
- } = _ref;
7
+ export function useDateInputState({
8
+ formatStr,
9
+ locale,
10
+ date,
11
+ isControlledDate
12
+ }) {
14
13
  const {
15
14
  formatDate
16
15
  } = useCustom();
@@ -1,10 +1,9 @@
1
1
  'use client';
2
2
  import { useState, useCallback } from 'react';
3
- export function useIsFocused(_ref) {
4
- let {
5
- onFocus: onFocusProp,
6
- onBlur: onBlurProp
7
- } = _ref;
3
+ export function useIsFocused({
4
+ onFocus: onFocusProp,
5
+ onBlur: onBlurProp
6
+ }) {
8
7
  const [isFocused, setIsFocused] = useState(false);
9
8
  const onFocus = useCallback(event => {
10
9
  setIsFocused(true);
@@ -1,12 +1,11 @@
1
1
  'use client';
2
- export function useKeyboardInputEvent(_ref) {
3
- let {
4
- onSegmentChange,
5
- onSegmentValueChange,
6
- onSegmentValueChangeWithNumericKeys,
7
- onSegmentValueRemove,
8
- onKeyDown
9
- } = _ref;
2
+ export function useKeyboardInputEvent({
3
+ onSegmentChange,
4
+ onSegmentValueChange,
5
+ onSegmentValueChangeWithNumericKeys,
6
+ onSegmentValueRemove,
7
+ onKeyDown
8
+ }) {
10
9
  return event => {
11
10
  var _key$match, _key$match2;
12
11
  const key = event.key;
@@ -0,0 +1,6 @@
1
+ export interface TestKeyPressProps {
2
+ defaultValue?: Date | [Date | null, Date | null] | null;
3
+ format?: string;
4
+ expectedValue: string;
5
+ key: string;
6
+ }
@@ -0,0 +1,2 @@
1
+ 'use client';
2
+ export {};
@@ -217,10 +217,7 @@ const DatePicker = forwardRef((props, ref) => {
217
217
  var _trigger$current, _trigger$current$clos;
218
218
  (_trigger$current = trigger.current) === null || _trigger$current === void 0 || (_trigger$current$clos = _trigger$current.close) === null || _trigger$current$clos === void 0 || _trigger$current$clos.call(_trigger$current);
219
219
  });
220
- const updateValue = function (event, date, closeOverlay) {
221
- if (closeOverlay === void 0) {
222
- closeOverlay = true;
223
- }
220
+ const updateValue = (event, date, closeOverlay = true) => {
224
221
  const nextValue = typeof date !== 'undefined' ? date : calendarDate;
225
222
  setCalendarDate(nextValue || startOfToday());
226
223
  setValue(nextValue);
@@ -282,10 +279,7 @@ const DatePicker = forwardRef((props, ref) => {
282
279
  /**
283
280
  * Callback after the date is selected.
284
281
  */
285
- const handleCalendarSelect = useEventCallback(function (date, event, updatableValue) {
286
- if (updatableValue === void 0) {
287
- updatableValue = true;
288
- }
282
+ const handleCalendarSelect = useEventCallback((date, event, updatableValue = true) => {
289
283
  const nextValue = copyTime({
290
284
  from: calendarDate,
291
285
  to: date
@@ -5,13 +5,12 @@ import Button from "../Button/index.js";
5
5
  import PredefinedRanges from "./PredefinedRanges.js";
6
6
  import Stack from "../Stack/index.js";
7
7
  import { useStyles } from "../internals/hooks/index.js";
8
- const OkButton = _ref => {
9
- let {
10
- disableOkBtn,
11
- calendarDate,
12
- onOk,
13
- children
14
- } = _ref;
8
+ const OkButton = ({
9
+ disableOkBtn,
10
+ calendarDate,
11
+ onOk,
12
+ children
13
+ }) => {
15
14
  const disabled = disableOkBtn === null || disableOkBtn === void 0 ? void 0 : disableOkBtn(calendarDate);
16
15
  return /*#__PURE__*/React.createElement(Button, {
17
16
  appearance: "primary",
@@ -29,32 +29,25 @@ export function getDefaultRanges(value) {
29
29
  value: subDays(today, 1)
30
30
  }];
31
31
  }
32
- const generateRangesIterator = _ref => {
33
- let {
34
- calendarDate
35
- } = _ref;
36
- return _ref2 => {
37
- let {
38
- value,
39
- ...rest
40
- } = _ref2;
41
- return {
42
- value: typeof value === 'function' ? value(calendarDate) : value,
43
- ...rest
44
- };
45
- };
46
- };
32
+ const generateRangesIterator = ({
33
+ calendarDate
34
+ }) => ({
35
+ value,
36
+ ...rest
37
+ }) => ({
38
+ value: typeof value === 'function' ? value(calendarDate) : value,
39
+ ...rest
40
+ });
47
41
 
48
42
  /**
49
43
  * get Toolbar ranges from Toolbar props
50
44
  * @param ranges
51
45
  * @param calendarDate
52
46
  */
53
- export const getRanges = _ref3 => {
54
- let {
55
- ranges,
56
- calendarDate
57
- } = _ref3;
47
+ export const getRanges = ({
48
+ ranges,
49
+ calendarDate
50
+ }) => {
58
51
  return typeof ranges === 'undefined' ? getDefaultRanges(calendarDate) : ranges.map(generateRangesIterator({
59
52
  calendarDate
60
53
  }));
@@ -70,9 +63,6 @@ export function splitRanges(ranges) {
70
63
  bottomRanges
71
64
  };
72
65
  }
73
- export const getRestProps = function (props, omitProps) {
74
- if (omitProps === void 0) {
75
- omitProps = [];
76
- }
66
+ export const getRestProps = (props, omitProps = []) => {
77
67
  return omit(props, [...overlayPropKeys, ...calendarOnlyProps, ...omitProps]);
78
68
  };
@@ -69,10 +69,7 @@ const DateRangeInput = /*#__PURE__*/React.forwardRef((props, ref) => {
69
69
  increment,
70
70
  reset
71
71
  } = useFieldCursor(formatStr, valueProp);
72
- const getActiveState = function (type) {
73
- if (type === void 0) {
74
- type = dateType;
75
- }
72
+ const getActiveState = (type = dateType) => {
76
73
  return type === DateType.Start ? startDateState : endDateState;
77
74
  };
78
75
  const [focused, focusEventProps] = useIsFocused({
@@ -154,6 +151,10 @@ const DateRangeInput = /*#__PURE__*/React.forwardRef((props, ref) => {
154
151
  const input = event.target;
155
152
  const key = event.key;
156
153
  const pattern = selectedState.selectedPattern;
154
+ const isFunctionKey = key.startsWith('F') && !isNaN(Number(key.slice(1)));
155
+ if (isFunctionKey) {
156
+ return;
157
+ }
157
158
  if (!pattern) {
158
159
  return;
159
160
  }
@@ -4,7 +4,7 @@ import { DATERANGE_DISABLED_TARGET } from '../internals/constants';
4
4
  import { DateRange } from './types';
5
5
  import { WithAsProps } from '../internals/types';
6
6
  import { DateRangePickerLocale } from '../locales';
7
- type OmitCalendarCoreTypes = 'disabledDate' | 'onSelect' | 'onMouseMove' | 'calendarDate' | 'format' | 'locale';
7
+ type OmitCalendarCoreTypes = 'disabledDate' | 'onSelect' | 'onMouseMove' | 'calendarDate' | 'format' | 'locale' | 'renderTitle';
8
8
  export interface CalendarProps extends WithAsProps, Omit<CalendarContainerProps, OmitCalendarCoreTypes> {
9
9
  calendarDateRange?: DateRange;
10
10
  disabledDate?: (date: Date, selectValue: [] | [Date] | [Date, Date], type: DATERANGE_DISABLED_TARGET) => boolean;
@@ -18,6 +18,7 @@ export interface CalendarProps extends WithAsProps, Omit<CalendarContainerProps,
18
18
  locale?: Partial<DateRangePickerLocale>;
19
19
  showWeekNumbers?: boolean;
20
20
  value?: [] | [Date] | [Date, Date];
21
+ renderTitle?: (date: Date, calendarKey: 'start' | 'end') => React.ReactNode;
21
22
  onChangeCalendarMonth?: (index: number, date: Date) => void;
22
23
  onChangeCalendarTime?: (index: number, date: Date) => void;
23
24
  onSelect?: (index: number, date: Date, event: React.SyntheticEvent) => void;
@@ -18,9 +18,11 @@ const Calendar = forwardRef((props, ref) => {
18
18
  onChangeCalendarMonth,
19
19
  onChangeCalendarTime,
20
20
  onSelect,
21
+ renderTitle,
21
22
  value = [],
22
23
  ...rest
23
24
  } = props;
25
+ const calendarKey = index === 0 ? 'start' : 'end';
24
26
  const calendarHandlers = useCalendarHandlers({
25
27
  index,
26
28
  calendarDateRange,
@@ -31,8 +33,11 @@ const Calendar = forwardRef((props, ref) => {
31
33
  const disableCalendarDate = useCallback(date => {
32
34
  return disabledDate === null || disabledDate === void 0 ? void 0 : disabledDate(date, value, DATERANGE_DISABLED_TARGET.CALENDAR);
33
35
  }, [disabledDate, value]);
36
+ const handleRenderTitle = useCallback(date => {
37
+ return renderTitle === null || renderTitle === void 0 ? void 0 : renderTitle(date, calendarKey);
38
+ }, [renderTitle, calendarKey]);
34
39
  return /*#__PURE__*/React.createElement(Component, _extends({
35
- "data-testid": `calendar-${index === 0 ? 'start' : 'end'}`
40
+ "data-testid": `calendar-${calendarKey}`
36
41
  }, rest, calendarHandlers, {
37
42
  index: index,
38
43
  format: format,
@@ -40,6 +45,7 @@ const Calendar = forwardRef((props, ref) => {
40
45
  disabledDate: disableCalendarDate,
41
46
  limitEndYear: limitEndYear,
42
47
  limitStartYear: limitStartYear,
48
+ renderTitle: handleRenderTitle,
43
49
  ref: ref
44
50
  }));
45
51
  });
@@ -158,8 +158,10 @@ export interface DateRangePickerProps extends PickerBaseProps<DateRangePickerLoc
158
158
  renderValue?: (value: DateRange, format: string) => string;
159
159
  /**
160
160
  * Custom render for calendar title
161
+ *
162
+ * - calendarKey is added in v5.83.0
161
163
  */
162
- renderTitle?: (date: Date) => React.ReactNode;
164
+ renderTitle?: (date: Date, calendarKey: 'start' | 'end') => React.ReactNode;
163
165
  /**
164
166
  * Custom rendering calendar cell content.
165
167
  *
@@ -179,12 +179,11 @@ const DateRangePicker = forwardRef((props, ref) => {
179
179
  * Call this function to update the calendar panel rendering benchmark value.
180
180
  * If params `value` is not passed, it defaults to [new Date(), addMonth(new Date(), 1)].
181
181
  */
182
- const setCalendarDateRange = _ref3 => {
183
- let {
184
- dateRange,
185
- calendarKey,
186
- eventName
187
- } = _ref3;
182
+ const setCalendarDateRange = ({
183
+ dateRange,
184
+ calendarKey,
185
+ eventName
186
+ }) => {
188
187
  let nextValue = dateRange;
189
188
 
190
189
  // The time should remain the same when the dates in the date range are changed.
@@ -257,10 +256,7 @@ const DateRangePicker = forwardRef((props, ref) => {
257
256
  }
258
257
  return hoverValues;
259
258
  };
260
- const setDateRange = function (event, nextValue, closeOverlay) {
261
- if (closeOverlay === void 0) {
262
- closeOverlay = true;
263
- }
259
+ const setDateRange = (event, nextValue, closeOverlay = true) => {
264
260
  // If nextValue is null, it means that the user is erasing the selected dates.
265
261
  setSelectedDates(nextValue !== null && nextValue !== void 0 ? nextValue : []);
266
262
  setValue(nextValue);
@@ -435,10 +431,7 @@ const DateRangePicker = forwardRef((props, ref) => {
435
431
  /**
436
432
  * Toolbar operation callback function
437
433
  */
438
- const handleShortcutPageDate = useEventCallback(function (range, closeOverlay, event) {
439
- if (closeOverlay === void 0) {
440
- closeOverlay = false;
441
- }
434
+ const handleShortcutPageDate = useEventCallback((range, closeOverlay = false, event) => {
442
435
  const value = range.value;
443
436
  setCalendarDateRange({
444
437
  dateRange: value,
@@ -545,10 +538,7 @@ const DateRangePicker = forwardRef((props, ref) => {
545
538
  /**
546
539
  * Check if a shortcut is disabled based on the selected date range
547
540
  */
548
- const shouldDisableShortcut = function (selectedDates) {
549
- if (selectedDates === void 0) {
550
- selectedDates = [];
551
- }
541
+ const shouldDisableShortcut = (selectedDates = []) => {
552
542
  if (selectedDates === null) {
553
543
  return false;
554
544
  }