rsuite 6.0.0-canary-20250424 → 6.0.0-canary-20250620

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 (927) 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/SelectPicker/styles/index.css +2430 -2088
  87. package/Sidebar/styles/index.css +188 -28
  88. package/Sidenav/styles/index.css +764 -591
  89. package/Slider/styles/index.css +599 -458
  90. package/Stack/styles/index.css +268 -93
  91. package/Stat/styles/index.css +1620 -1454
  92. package/StatGroup/styles/index.css +185 -6
  93. package/Steps/styles/index.css +384 -234
  94. package/Table/styles/index.css +626 -497
  95. package/Tabs/styles/index.css +1815 -1649
  96. package/Tag/styles/index.css +1487 -139
  97. package/TagGroup/styles/index.css +185 -19
  98. package/TagInput/styles/index.css +2831 -2469
  99. package/TagPicker/styles/index.css +2827 -2466
  100. package/Text/styles/index.css +398 -224
  101. package/Textarea/styles/index.css +184 -5
  102. package/TimePicker/styles/index.css +3108 -2800
  103. package/TimeRangePicker/styles/index.css +3200 -2884
  104. package/Timeline/styles/index.css +305 -148
  105. package/Toggle/styles/index.css +606 -429
  106. package/Tooltip/styles/index.css +347 -214
  107. package/Tree/styles/index.css +2538 -2197
  108. package/TreePicker/styles/index.css +2548 -2206
  109. package/Uploader/styles/index.css +1680 -1612
  110. package/VisuallyHidden/styles/index.css +11 -11
  111. package/cjs/Affix/Affix.js +1 -2
  112. package/cjs/Animation/Bounce.js +4 -5
  113. package/cjs/Animation/Collapse.js +1 -2
  114. package/cjs/Animation/Fade.js +5 -6
  115. package/cjs/Animation/Slide.js +5 -6
  116. package/cjs/AutoComplete/AutoComplete.js +1 -2
  117. package/cjs/Avatar/Avatar.js +1 -2
  118. package/cjs/AvatarGroup/AvatarGroup.js +1 -2
  119. package/cjs/Badge/Badge.js +1 -2
  120. package/cjs/Breadcrumb/Breadcrumb.js +1 -2
  121. package/cjs/Button/Button.js +1 -2
  122. package/cjs/ButtonGroup/ButtonGroup.js +1 -2
  123. package/cjs/Calendar/CalendarContainer.js +1 -2
  124. package/cjs/Calendar/CalendarHeader.js +1 -2
  125. package/cjs/Calendar/Grid/GridRow.js +1 -2
  126. package/cjs/Calendar/MonthDropdown/MonthDropdown.js +17 -22
  127. package/cjs/Calendar/MonthDropdown/MonthDropdownItem.js +1 -2
  128. package/cjs/Calendar/TimeDropdown/TimeDropdown.js +1 -2
  129. package/cjs/Calendar/TimeDropdown/utils/scrollToTime.js +1 -2
  130. package/cjs/Calendar/hooks/useCalendarDate.js +3 -6
  131. package/cjs/Carousel/Carousel.js +1 -2
  132. package/cjs/CascadeTree/CascadeTree.js +1 -2
  133. package/cjs/CascadeTree/TreeView.js +1 -2
  134. package/cjs/CascadeTree/hooks/usePaths.js +7 -8
  135. package/cjs/Cascader/Cascader.js +1 -2
  136. package/cjs/CheckPicker/CheckPicker.js +1 -2
  137. package/cjs/CheckTree/CheckTree.js +1 -2
  138. package/cjs/CheckTree/CheckTreeNode.js +1 -2
  139. package/cjs/CheckTree/CheckTreeView.js +17 -22
  140. package/cjs/CheckTree/hooks/useTreeNodeProps.js +1 -2
  141. package/cjs/CheckTree/hooks/useTreeValue.js +4 -5
  142. package/cjs/CheckTreePicker/CheckTreePicker.d.ts +4 -0
  143. package/cjs/CheckTreePicker/CheckTreePicker.js +29 -2
  144. package/cjs/Checkbox/Checkbox.js +1 -2
  145. package/cjs/CheckboxGroup/CheckboxGroup.js +1 -2
  146. package/cjs/Container/Container.js +1 -2
  147. package/cjs/CustomProvider/CustomProvider.js +14 -4
  148. package/cjs/DOMHelper/index.js +1 -2
  149. package/cjs/DateInput/DateInput.js +5 -2
  150. package/cjs/DateInput/hooks/useDateInputState.js +6 -7
  151. package/cjs/DateInput/hooks/useIsFocused.js +4 -5
  152. package/cjs/DateInput/hooks/useKeyboardInputEvent.js +7 -8
  153. package/cjs/DateInput/test/types/TestKeyPressProps.d.ts +6 -0
  154. package/cjs/DateInput/test/types/TestKeyPressProps.js +4 -0
  155. package/cjs/DatePicker/DatePicker.js +3 -10
  156. package/cjs/DatePicker/PredefinedRanges.js +1 -2
  157. package/cjs/DatePicker/Toolbar.js +6 -7
  158. package/cjs/DatePicker/utils.js +14 -24
  159. package/cjs/DateRangeInput/DateRangeInput.js +6 -6
  160. package/cjs/DateRangePicker/Calendar.d.ts +2 -1
  161. package/cjs/DateRangePicker/Calendar.js +8 -3
  162. package/cjs/DateRangePicker/DateRangePicker.d.ts +3 -1
  163. package/cjs/DateRangePicker/DateRangePicker.js +9 -20
  164. package/cjs/DateRangePicker/DateRangePickerProvider.js +1 -2
  165. package/cjs/DateRangePicker/disabledDateUtils.js +5 -18
  166. package/cjs/DateRangePicker/hooks/useCalendarHandlers.js +7 -8
  167. package/cjs/DateRangePicker/utils.js +5 -6
  168. package/cjs/Dropdown/Dropdown.js +9 -12
  169. package/cjs/Dropdown/DropdownItem.js +6 -8
  170. package/cjs/Dropdown/DropdownMenu.js +36 -43
  171. package/cjs/Dropdown/DropdownState.js +1 -4
  172. package/cjs/Form/Form.js +1 -2
  173. package/cjs/Form/FormContext.d.ts +1 -1
  174. package/cjs/Form/FormContext.js +1 -2
  175. package/cjs/Form/hooks/useFormValidate.js +8 -13
  176. package/cjs/Form/hooks/useSchemaModel.js +6 -9
  177. package/cjs/FormControl/FormControl.d.ts +2 -2
  178. package/cjs/FormControl/FormControl.js +53 -84
  179. package/cjs/FormErrorMessage/FormErrorMessage.d.ts +2 -2
  180. package/cjs/FormGroup/FormGroup.d.ts +0 -18
  181. package/cjs/FormGroup/FormGroup.js +4 -33
  182. package/cjs/FormGroup/FormGroupContext.d.ts +4 -0
  183. package/cjs/FormGroup/FormGroupContext.js +8 -0
  184. package/cjs/FormGroup/index.d.ts +1 -1
  185. package/cjs/FormGroup/index.js +4 -4
  186. package/cjs/FormGroup/useFormGroup.d.ts +18 -0
  187. package/cjs/FormGroup/useFormGroup.js +35 -0
  188. package/cjs/Grid/Col.js +1 -2
  189. package/cjs/Grid/utils/styles.js +1 -4
  190. package/cjs/InlineEdit/useEditState.js +1 -1
  191. package/cjs/InlineEdit/useFocusEvent.js +6 -7
  192. package/cjs/Input/Input.js +2 -3
  193. package/cjs/InputGroup/InputGroup.d.ts +0 -5
  194. package/cjs/InputGroup/InputGroup.js +4 -5
  195. package/cjs/InputGroup/InputGroupContext.d.ts +6 -0
  196. package/cjs/InputGroup/InputGroupContext.js +8 -0
  197. package/cjs/InputGroup/index.d.ts +1 -0
  198. package/cjs/InputGroup/index.js +3 -1
  199. package/cjs/InputPicker/InputAutosize.js +1 -2
  200. package/cjs/InputPicker/InputPicker.js +1 -2
  201. package/cjs/List/List.js +1 -2
  202. package/cjs/List/ListItem.js +1 -2
  203. package/cjs/List/helper/AutoScroller.js +7 -8
  204. package/cjs/List/helper/useSortHelper.js +1 -1
  205. package/cjs/List/helper/utils.js +4 -7
  206. package/cjs/MaskedInput/TextMask.js +1 -2
  207. package/cjs/MaskedInput/adjustCaretPosition.js +11 -12
  208. package/cjs/MaskedInput/conformToMask.js +1 -10
  209. package/cjs/MaskedInput/createTextMaskInputElement.js +9 -10
  210. package/cjs/MaskedInput/utilities.js +1 -7
  211. package/cjs/Menu/Menu.js +1 -2
  212. package/cjs/Menu/MenuItem.js +6 -8
  213. package/cjs/Message/Message.js +1 -2
  214. package/cjs/Modal/Modal.js +1 -2
  215. package/cjs/Modal/ModalBody.js +1 -2
  216. package/cjs/Modal/ModalHeader.js +1 -2
  217. package/cjs/Modal/ModalTitle.js +1 -2
  218. package/cjs/MultiCascadeTree/hooks/useCascadeValue.js +1 -4
  219. package/cjs/MultiCascadeTree/utils.js +1 -4
  220. package/cjs/MultiCascader/MultiCascader.js +1 -2
  221. package/cjs/Nav/AdaptiveNavItem.js +3 -4
  222. package/cjs/Nav/Nav.js +3 -4
  223. package/cjs/Nav/NavDropdown.js +9 -12
  224. package/cjs/Nav/NavDropdownItem.js +6 -8
  225. package/cjs/Nav/NavDropdownMenu.js +36 -43
  226. package/cjs/Nav/NavItem.js +1 -2
  227. package/cjs/Nav/NavMegaMenu.js +1 -2
  228. package/cjs/Nav/NavMenu.js +3 -4
  229. package/cjs/Navbar/Navbar.js +1 -2
  230. package/cjs/Navbar/NavbarDrawer.js +1 -2
  231. package/cjs/Navbar/NavbarDropdown.js +8 -11
  232. package/cjs/Navbar/NavbarDropdownItem.js +1 -2
  233. package/cjs/Navbar/NavbarDropdownMenu.js +12 -16
  234. package/cjs/Navbar/NavbarItem.js +1 -2
  235. package/cjs/Navbar/NavbarMegaMenu.js +1 -2
  236. package/cjs/Navbar/NavbarToggle.js +1 -2
  237. package/cjs/Notification/Notification.js +1 -2
  238. package/cjs/NumberInput/utils/number.js +1 -4
  239. package/cjs/Pagination/LimitPicker.js +1 -2
  240. package/cjs/Pagination/PaginationButton.js +1 -2
  241. package/cjs/Panel/Panel.js +1 -2
  242. package/cjs/Panel/PanelHeader.js +1 -2
  243. package/cjs/PanelGroup/PanelGroup.js +1 -2
  244. package/cjs/PanelGroup/index.js +1 -2
  245. package/cjs/Placeholder/PlaceholderGrid.js +1 -2
  246. package/cjs/Placeholder/PlaceholderParagraph.js +1 -2
  247. package/cjs/Popover/Popover.js +1 -2
  248. package/cjs/Progress/Progress.d.ts +1 -1
  249. package/cjs/Progress/Progress.js +1 -1
  250. package/cjs/Progress/ProgressInfo.d.ts +17 -0
  251. package/cjs/Progress/ProgressInfo.js +29 -0
  252. package/cjs/Progress/ProgressLine.d.ts +20 -6
  253. package/cjs/Progress/ProgressLine.js +48 -37
  254. package/cjs/Progress/ProgressSections.d.ts +15 -0
  255. package/cjs/Progress/ProgressSections.js +43 -0
  256. package/cjs/Progress/ProgressStroke.d.ts +24 -0
  257. package/cjs/Progress/ProgressStroke.js +51 -0
  258. package/cjs/Progress/index.d.ts +3 -3
  259. package/cjs/Progress/index.js +1 -1
  260. package/cjs/Progress/types.d.ts +11 -0
  261. package/cjs/Progress/types.js +4 -0
  262. package/cjs/{Progress → ProgressCircle}/ProgressCircle.d.ts +20 -14
  263. package/cjs/ProgressCircle/ProgressCircle.js +113 -0
  264. package/cjs/ProgressCircle/ProgressCircleSections.d.ts +23 -0
  265. package/cjs/ProgressCircle/ProgressCircleSections.js +52 -0
  266. package/cjs/ProgressCircle/hooks/useProgressCirclePath.d.ts +28 -0
  267. package/cjs/ProgressCircle/hooks/useProgressCirclePath.js +66 -0
  268. package/cjs/ProgressCircle/index.d.ts +4 -0
  269. package/cjs/ProgressCircle/index.js +11 -0
  270. package/cjs/Radio/Radio.js +1 -2
  271. package/cjs/RadioGroup/RadioGroup.js +1 -2
  272. package/cjs/RadioTile/RadioTile.js +1 -2
  273. package/cjs/RadioTileGroup/RadioTileGroup.js +1 -2
  274. package/cjs/RangeSlider/RangeSlider.js +1 -3
  275. package/cjs/Rate/Character.js +1 -2
  276. package/cjs/Rate/useRatingStates.js +6 -7
  277. package/cjs/SelectPicker/SelectPicker.js +1 -2
  278. package/cjs/Sidebar/Sidebar.js +1 -2
  279. package/cjs/Sidenav/ExpandedSidenavDropdown.js +12 -17
  280. package/cjs/Sidenav/ExpandedSidenavDropdownItem.js +3 -4
  281. package/cjs/Sidenav/ExpandedSidenavDropdownMenu.js +9 -12
  282. package/cjs/Sidenav/Sidenav.d.ts +0 -15
  283. package/cjs/Sidenav/Sidenav.js +4 -5
  284. package/cjs/Sidenav/SidenavContext.d.ts +16 -0
  285. package/cjs/Sidenav/SidenavContext.js +8 -0
  286. package/cjs/Sidenav/SidenavDropdown.js +15 -19
  287. package/cjs/Sidenav/SidenavDropdownItem.js +8 -10
  288. package/cjs/Sidenav/SidenavDropdownMenu.js +38 -45
  289. package/cjs/Sidenav/SidenavItem.js +8 -10
  290. package/cjs/Sidenav/SidenavToggle.js +3 -4
  291. package/cjs/Slider/ProgressBar.d.ts +0 -1
  292. package/cjs/Slider/ProgressBar.js +1 -3
  293. package/cjs/Slider/Slider.js +14 -6
  294. package/cjs/Stack/Stack.js +4 -2
  295. package/cjs/Stack/VStack.js +1 -3
  296. package/cjs/Tag/Tag.js +1 -2
  297. package/cjs/TagInput/TagInput.js +1 -2
  298. package/cjs/TagPicker/TagPicker.js +1 -2
  299. package/cjs/TimePicker/TimePicker.js +1 -2
  300. package/cjs/Toggle/Toggle.js +1 -2
  301. package/cjs/Tooltip/Tooltip.js +1 -2
  302. package/cjs/Tree/Tree.js +1 -2
  303. package/cjs/Tree/TreeNode.js +1 -2
  304. package/cjs/Tree/TreeView.js +17 -22
  305. package/cjs/Tree/hooks/useFlattenTree.js +2 -8
  306. package/cjs/Tree/hooks/useTreeNodeProps.js +1 -2
  307. package/cjs/Tree/hooks/useVirtualizedTreeData.js +1 -7
  308. package/cjs/Tree/utils/flattenTree.js +2 -8
  309. package/cjs/Tree/utils/getExpandItemValues.js +6 -7
  310. package/cjs/Tree/utils/indentTreeNode.js +1 -4
  311. package/cjs/TreePicker/TreePicker.js +1 -2
  312. package/cjs/Uploader/UploadFileItem.js +2 -6
  313. package/cjs/Uploader/UploadTrigger.js +1 -2
  314. package/cjs/Uploader/Uploader.js +2 -6
  315. package/cjs/global.d.ts +0 -6
  316. package/cjs/index.d.ts +3 -0
  317. package/cjs/index.js +18 -0
  318. package/cjs/internals/Disclosure/Disclosure.js +1 -2
  319. package/cjs/internals/InputBase/InputBase.js +2 -3
  320. package/cjs/internals/Menu/Menu.js +13 -18
  321. package/cjs/internals/Menu/MenuItem.js +1 -2
  322. package/cjs/internals/Menu/Menubar.js +6 -8
  323. package/cjs/internals/Menu/useRenderMenuItem.js +1 -2
  324. package/cjs/internals/Overlay/Modal.js +1 -2
  325. package/cjs/internals/Overlay/Overlay.js +1 -2
  326. package/cjs/internals/Overlay/OverlayProvider.js +1 -2
  327. package/cjs/internals/Overlay/OverlayTrigger.js +3 -11
  328. package/cjs/internals/Overlay/Position.js +4 -8
  329. package/cjs/internals/Overlay/types.d.ts +1 -1
  330. package/cjs/internals/Overlay/utils/position.d.ts +24 -0
  331. package/cjs/internals/Overlay/{positionUtils.js → utils/position.js} +136 -50
  332. package/cjs/internals/Picker/Listbox.js +18 -23
  333. package/cjs/internals/Picker/PickerIndicator.js +9 -10
  334. package/cjs/internals/Picker/PickerLabel.js +6 -7
  335. package/cjs/internals/Picker/PickerPopup.js +1 -2
  336. package/cjs/internals/Picker/PickerToggle.js +1 -2
  337. package/cjs/internals/Picker/PickerToggleTrigger.js +1 -2
  338. package/cjs/internals/Picker/utils.js +1 -4
  339. package/cjs/internals/Provider/CustomContext.d.ts +20 -1
  340. package/cjs/internals/Provider/types.d.ts +6 -3
  341. package/cjs/internals/Ripple/Ripple.js +1 -2
  342. package/cjs/internals/SafeAnchor/SafeAnchor.js +1 -2
  343. package/cjs/internals/Tree/TreeProvider.js +4 -5
  344. package/cjs/internals/Tree/utils/filterNodesOfTree.js +1 -4
  345. package/cjs/internals/Tree/utils/findNodeOfTree.js +1 -4
  346. package/cjs/internals/Windowing/AutoSizer.js +1 -2
  347. package/cjs/internals/Windowing/List.js +1 -2
  348. package/cjs/internals/Windowing/index.js +1 -2
  349. package/cjs/internals/hooks/useClickOutside.js +5 -6
  350. package/cjs/internals/hooks/useEventCallback.js +1 -4
  351. package/cjs/internals/hooks/useEventListener.js +1 -4
  352. package/cjs/internals/hooks/usePortal.js +9 -15
  353. package/cjs/internals/hooks/useRootClose.js +6 -7
  354. package/cjs/internals/hooks/useStyles.js +5 -8
  355. package/cjs/internals/hooks/useTimeout.js +1 -7
  356. package/cjs/internals/hooks/useToggleCaret.d.ts +1 -1
  357. package/cjs/internals/intl/FormattedDate.js +4 -5
  358. package/cjs/internals/intl/FormattedNumber.js +5 -7
  359. package/cjs/internals/types/placement.d.ts +5 -0
  360. package/cjs/internals/utils/colours.js +1 -4
  361. package/cjs/internals/utils/composeFunctions.js +1 -4
  362. package/cjs/internals/utils/createChainedFunction.js +2 -8
  363. package/cjs/internals/utils/date/copyTime.js +4 -5
  364. package/cjs/internals/utils/getDataGroupBy.js +5 -8
  365. package/cjs/internals/utils/html/htmlPropsUtils.js +1 -4
  366. package/cjs/internals/utils/placement.js +1 -4
  367. package/cjs/internals/utils/react/createComponent.js +6 -7
  368. package/cjs/internals/utils/string/tplTransform.js +1 -4
  369. package/cjs/internals/utils/style-sheet/css.js +3 -12
  370. package/cjs/internals/utils/style-sheet/styles.js +2 -8
  371. package/cjs/locales/ar_EG.d.ts +6 -0
  372. package/cjs/locales/ar_EG.js +6 -0
  373. package/cjs/locales/ca_ES.d.ts +6 -0
  374. package/cjs/locales/ca_ES.js +6 -0
  375. package/cjs/locales/cs_CZ.d.ts +6 -0
  376. package/cjs/locales/cs_CZ.js +6 -0
  377. package/cjs/locales/da_DK.d.ts +6 -0
  378. package/cjs/locales/da_DK.js +6 -0
  379. package/cjs/locales/de_DE.d.ts +6 -0
  380. package/cjs/locales/de_DE.js +6 -0
  381. package/cjs/locales/en_GB.d.ts +6 -0
  382. package/cjs/locales/en_GB.js +6 -0
  383. package/cjs/locales/en_US.d.ts +6 -0
  384. package/cjs/locales/en_US.js +6 -0
  385. package/cjs/locales/es_AR.d.ts +6 -0
  386. package/cjs/locales/es_AR.js +6 -0
  387. package/cjs/locales/es_ES.d.ts +6 -0
  388. package/cjs/locales/es_ES.js +7 -1
  389. package/cjs/locales/fa_IR.d.ts +6 -0
  390. package/cjs/locales/fa_IR.js +6 -0
  391. package/cjs/locales/fi_FI.d.ts +6 -0
  392. package/cjs/locales/fi_FI.js +6 -0
  393. package/cjs/locales/fr_FR.d.ts +6 -0
  394. package/cjs/locales/fr_FR.js +6 -0
  395. package/cjs/locales/gu_IN.d.ts +157 -0
  396. package/cjs/locales/gu_IN.js +97 -0
  397. package/cjs/locales/hu_HU.d.ts +6 -0
  398. package/cjs/locales/hu_HU.js +6 -0
  399. package/cjs/locales/index.d.ts +3 -0
  400. package/cjs/locales/index.js +8 -2
  401. package/cjs/locales/it_IT.d.ts +6 -0
  402. package/cjs/locales/it_IT.js +6 -0
  403. package/cjs/locales/ja_JP.d.ts +6 -0
  404. package/cjs/locales/ja_JP.js +6 -0
  405. package/cjs/locales/kk_KZ.d.ts +6 -0
  406. package/cjs/locales/kk_KZ.js +6 -0
  407. package/cjs/locales/ko_KR.d.ts +6 -0
  408. package/cjs/locales/ko_KR.js +6 -0
  409. package/cjs/locales/ne_NP.d.ts +6 -0
  410. package/cjs/locales/ne_NP.js +6 -0
  411. package/cjs/locales/nl_NL.d.ts +6 -0
  412. package/cjs/locales/nl_NL.js +8 -2
  413. package/cjs/locales/pl_PL.d.ts +6 -0
  414. package/cjs/locales/pl_PL.js +6 -0
  415. package/cjs/locales/pt_BR.d.ts +6 -0
  416. package/cjs/locales/pt_BR.js +6 -0
  417. package/cjs/locales/ru_RU.d.ts +6 -0
  418. package/cjs/locales/ru_RU.js +6 -0
  419. package/cjs/locales/sv_SE.d.ts +6 -0
  420. package/cjs/locales/sv_SE.js +6 -0
  421. package/cjs/locales/th_TH.d.ts +169 -0
  422. package/cjs/locales/th_TH.js +100 -0
  423. package/cjs/locales/tr_TR.d.ts +6 -0
  424. package/cjs/locales/tr_TR.js +6 -0
  425. package/cjs/locales/uk_UA.d.ts +157 -0
  426. package/cjs/locales/uk_UA.js +97 -0
  427. package/cjs/locales/zh_CN.d.ts +6 -0
  428. package/cjs/locales/zh_CN.js +6 -0
  429. package/cjs/locales/zh_TW.d.ts +6 -0
  430. package/cjs/locales/zh_TW.js +6 -0
  431. package/cjs/toaster/ToastContainer.js +3 -4
  432. package/cjs/toaster/toaster.js +2 -6
  433. package/cjs/useDialog/Dialog.d.ts +15 -0
  434. package/cjs/useDialog/Dialog.js +109 -0
  435. package/cjs/useDialog/DialogContainer.d.ts +11 -0
  436. package/cjs/useDialog/DialogContainer.js +57 -0
  437. package/cjs/useDialog/index.d.ts +3 -0
  438. package/cjs/useDialog/index.js +15 -0
  439. package/cjs/useDialog/types.d.ts +33 -0
  440. package/cjs/useDialog/types.js +4 -0
  441. package/cjs/useDialog/useDialog.d.ts +15 -0
  442. package/cjs/useDialog/useDialog.js +126 -0
  443. package/cjs/{FormControl → useFormControl}/hooks/useField.d.ts +3 -3
  444. package/cjs/{FormControl → useFormControl}/hooks/useField.js +5 -6
  445. package/cjs/useFormControl/hooks/useRegisterModel.d.ts +2 -0
  446. package/cjs/{FormControl → useFormControl}/hooks/useRegisterModel.js +2 -3
  447. package/cjs/useFormControl/index.d.ts +4 -0
  448. package/cjs/useFormControl/index.js +11 -0
  449. package/cjs/useFormControl/useFormControl.d.ts +38 -0
  450. package/cjs/useFormControl/useFormControl.js +135 -0
  451. package/cjs/{FormControl/utils.js → useFormControl/utils/nameToPath.js} +0 -0
  452. package/cjs/useMediaQuery/breakpoints.js +4 -10
  453. package/cjs/useMediaQuery/useMediaQuery.js +1 -4
  454. package/cjs/useToaster/useToaster.d.ts +1 -1
  455. package/cjs/useToaster/useToaster.js +9 -9
  456. package/dist/rsuite-no-reset.css +14370 -13982
  457. package/dist/rsuite-no-reset.min.css +1 -2
  458. package/dist/rsuite.css +14599 -14187
  459. package/dist/rsuite.js +436 -260
  460. package/dist/rsuite.js.map +1 -1
  461. package/dist/rsuite.min.css +1 -2
  462. package/dist/rsuite.min.js +1 -1
  463. package/dist/rsuite.min.js.map +1 -1
  464. package/esm/Animation/Bounce.js +4 -5
  465. package/esm/Animation/Fade.js +5 -6
  466. package/esm/Animation/Slide.js +5 -6
  467. package/esm/Calendar/MonthDropdown/MonthDropdown.js +16 -20
  468. package/esm/Calendar/TimeDropdown/utils/scrollToTime.js +1 -2
  469. package/esm/Calendar/hooks/useCalendarDate.js +3 -6
  470. package/esm/CascadeTree/hooks/usePaths.js +7 -8
  471. package/esm/CheckTree/CheckTreeView.js +16 -20
  472. package/esm/CheckTree/hooks/useTreeValue.js +4 -5
  473. package/esm/CheckTreePicker/CheckTreePicker.d.ts +4 -0
  474. package/esm/CheckTreePicker/CheckTreePicker.js +28 -0
  475. package/esm/CustomProvider/CustomProvider.js +13 -2
  476. package/esm/DateInput/DateInput.js +4 -0
  477. package/esm/DateInput/hooks/useDateInputState.js +6 -7
  478. package/esm/DateInput/hooks/useIsFocused.js +4 -5
  479. package/esm/DateInput/hooks/useKeyboardInputEvent.js +7 -8
  480. package/esm/DateInput/test/types/TestKeyPressProps.d.ts +6 -0
  481. package/esm/DateInput/test/types/TestKeyPressProps.js +2 -0
  482. package/esm/DatePicker/DatePicker.js +2 -8
  483. package/esm/DatePicker/Toolbar.js +6 -7
  484. package/esm/DatePicker/utils.js +14 -24
  485. package/esm/DateRangeInput/DateRangeInput.js +5 -4
  486. package/esm/DateRangePicker/Calendar.d.ts +2 -1
  487. package/esm/DateRangePicker/Calendar.js +7 -1
  488. package/esm/DateRangePicker/DateRangePicker.d.ts +3 -1
  489. package/esm/DateRangePicker/DateRangePicker.js +8 -18
  490. package/esm/DateRangePicker/disabledDateUtils.js +4 -16
  491. package/esm/DateRangePicker/hooks/useCalendarHandlers.js +7 -8
  492. package/esm/DateRangePicker/utils.js +5 -6
  493. package/esm/Dropdown/Dropdown.js +8 -10
  494. package/esm/Dropdown/DropdownItem.js +5 -6
  495. package/esm/Dropdown/DropdownMenu.js +35 -41
  496. package/esm/Dropdown/DropdownState.js +1 -4
  497. package/esm/Form/FormContext.d.ts +1 -1
  498. package/esm/Form/hooks/useFormValidate.js +4 -9
  499. package/esm/Form/hooks/useSchemaModel.js +6 -9
  500. package/esm/FormControl/FormControl.d.ts +2 -2
  501. package/esm/FormControl/FormControl.js +53 -83
  502. package/esm/FormErrorMessage/FormErrorMessage.d.ts +2 -2
  503. package/esm/FormGroup/FormGroup.d.ts +0 -18
  504. package/esm/FormGroup/FormGroup.js +1 -28
  505. package/esm/FormGroup/FormGroupContext.d.ts +4 -0
  506. package/esm/FormGroup/FormGroupContext.js +3 -0
  507. package/esm/FormGroup/index.d.ts +1 -1
  508. package/esm/FormGroup/index.js +1 -1
  509. package/esm/FormGroup/useFormGroup.d.ts +18 -0
  510. package/esm/FormGroup/useFormGroup.js +30 -0
  511. package/esm/Grid/utils/styles.js +1 -4
  512. package/esm/InlineEdit/useEditState.js +1 -1
  513. package/esm/InlineEdit/useFocusEvent.js +6 -7
  514. package/esm/Input/Input.js +1 -1
  515. package/esm/InputGroup/InputGroup.d.ts +0 -5
  516. package/esm/InputGroup/InputGroup.js +1 -1
  517. package/esm/InputGroup/InputGroupContext.d.ts +6 -0
  518. package/esm/InputGroup/InputGroupContext.js +3 -0
  519. package/esm/InputGroup/index.d.ts +1 -0
  520. package/esm/InputGroup/index.js +1 -0
  521. package/esm/List/helper/AutoScroller.js +7 -8
  522. package/esm/List/helper/useSortHelper.js +1 -1
  523. package/esm/List/helper/utils.js +4 -7
  524. package/esm/MaskedInput/adjustCaretPosition.js +11 -12
  525. package/esm/MaskedInput/conformToMask.js +1 -10
  526. package/esm/MaskedInput/createTextMaskInputElement.js +9 -10
  527. package/esm/MaskedInput/utilities.js +1 -7
  528. package/esm/Menu/MenuItem.js +5 -6
  529. package/esm/MultiCascadeTree/hooks/useCascadeValue.js +1 -4
  530. package/esm/MultiCascadeTree/utils.js +1 -4
  531. package/esm/Nav/AdaptiveNavItem.js +1 -1
  532. package/esm/Nav/Nav.js +1 -1
  533. package/esm/Nav/NavDropdown.js +8 -10
  534. package/esm/Nav/NavDropdownItem.js +5 -6
  535. package/esm/Nav/NavDropdownMenu.js +35 -41
  536. package/esm/Nav/NavMenu.js +1 -1
  537. package/esm/Navbar/NavbarDropdown.js +7 -9
  538. package/esm/Navbar/NavbarDropdownMenu.js +11 -14
  539. package/esm/NumberInput/utils/number.js +1 -4
  540. package/esm/Progress/Progress.d.ts +1 -1
  541. package/esm/Progress/Progress.js +1 -1
  542. package/esm/Progress/ProgressInfo.d.ts +17 -0
  543. package/esm/Progress/ProgressInfo.js +24 -0
  544. package/esm/Progress/ProgressLine.d.ts +20 -6
  545. package/esm/Progress/ProgressLine.js +49 -38
  546. package/esm/Progress/ProgressSections.d.ts +15 -0
  547. package/esm/Progress/ProgressSections.js +38 -0
  548. package/esm/Progress/ProgressStroke.d.ts +24 -0
  549. package/esm/Progress/ProgressStroke.js +46 -0
  550. package/esm/Progress/index.d.ts +3 -3
  551. package/esm/Progress/index.js +1 -1
  552. package/esm/Progress/types.d.ts +11 -0
  553. package/esm/Progress/types.js +2 -0
  554. package/esm/{Progress → ProgressCircle}/ProgressCircle.d.ts +20 -14
  555. package/esm/ProgressCircle/ProgressCircle.js +107 -0
  556. package/esm/ProgressCircle/ProgressCircleSections.d.ts +23 -0
  557. package/esm/ProgressCircle/ProgressCircleSections.js +47 -0
  558. package/esm/ProgressCircle/hooks/useProgressCirclePath.d.ts +28 -0
  559. package/esm/ProgressCircle/hooks/useProgressCirclePath.js +62 -0
  560. package/esm/ProgressCircle/index.d.ts +4 -0
  561. package/esm/ProgressCircle/index.js +8 -0
  562. package/esm/RangeSlider/RangeSlider.js +0 -1
  563. package/esm/Rate/useRatingStates.js +6 -7
  564. package/esm/Sidenav/ExpandedSidenavDropdown.js +10 -14
  565. package/esm/Sidenav/ExpandedSidenavDropdownItem.js +1 -1
  566. package/esm/Sidenav/ExpandedSidenavDropdownMenu.js +7 -9
  567. package/esm/Sidenav/Sidenav.d.ts +0 -15
  568. package/esm/Sidenav/Sidenav.js +1 -1
  569. package/esm/Sidenav/SidenavContext.d.ts +16 -0
  570. package/esm/Sidenav/SidenavContext.js +3 -0
  571. package/esm/Sidenav/SidenavDropdown.js +13 -16
  572. package/esm/Sidenav/SidenavDropdownItem.js +6 -7
  573. package/esm/Sidenav/SidenavDropdownMenu.js +36 -42
  574. package/esm/Sidenav/SidenavItem.js +6 -7
  575. package/esm/Sidenav/SidenavToggle.js +1 -1
  576. package/esm/Slider/ProgressBar.d.ts +0 -1
  577. package/esm/Slider/ProgressBar.js +1 -3
  578. package/esm/Slider/Slider.js +13 -4
  579. package/esm/Stack/Stack.js +4 -2
  580. package/esm/Stack/VStack.js +1 -3
  581. package/esm/Tree/TreeView.js +16 -20
  582. package/esm/Tree/hooks/useFlattenTree.js +2 -8
  583. package/esm/Tree/hooks/useVirtualizedTreeData.js +1 -7
  584. package/esm/Tree/utils/flattenTree.js +2 -8
  585. package/esm/Tree/utils/getExpandItemValues.js +6 -7
  586. package/esm/Tree/utils/indentTreeNode.js +1 -4
  587. package/esm/Uploader/UploadFileItem.js +1 -4
  588. package/esm/Uploader/Uploader.js +1 -4
  589. package/esm/global.d.ts +0 -6
  590. package/esm/index.d.ts +3 -0
  591. package/esm/index.js +3 -0
  592. package/esm/internals/InputBase/InputBase.js +1 -1
  593. package/esm/internals/Menu/Menu.js +12 -16
  594. package/esm/internals/Menu/Menubar.js +5 -6
  595. package/esm/internals/Overlay/OverlayTrigger.js +2 -9
  596. package/esm/internals/Overlay/Position.js +3 -6
  597. package/esm/internals/Overlay/types.d.ts +1 -1
  598. package/esm/internals/Overlay/utils/position.d.ts +24 -0
  599. package/esm/internals/Overlay/{positionUtils.js → utils/position.js} +134 -48
  600. package/esm/internals/Picker/Listbox.js +17 -21
  601. package/esm/internals/Picker/PickerIndicator.js +9 -10
  602. package/esm/internals/Picker/PickerLabel.js +6 -7
  603. package/esm/internals/Picker/utils.js +1 -4
  604. package/esm/internals/Provider/CustomContext.d.ts +20 -1
  605. package/esm/internals/Provider/types.d.ts +6 -3
  606. package/esm/internals/Tree/TreeProvider.js +4 -5
  607. package/esm/internals/Tree/utils/filterNodesOfTree.js +1 -4
  608. package/esm/internals/Tree/utils/findNodeOfTree.js +1 -4
  609. package/esm/internals/hooks/useClickOutside.js +5 -6
  610. package/esm/internals/hooks/useEventCallback.js +1 -4
  611. package/esm/internals/hooks/useEventListener.js +1 -4
  612. package/esm/internals/hooks/usePortal.js +8 -13
  613. package/esm/internals/hooks/useRootClose.js +6 -7
  614. package/esm/internals/hooks/useStyles.js +5 -8
  615. package/esm/internals/hooks/useTimeout.js +1 -7
  616. package/esm/internals/hooks/useToggleCaret.d.ts +1 -1
  617. package/esm/internals/intl/FormattedDate.js +4 -5
  618. package/esm/internals/intl/FormattedNumber.js +4 -5
  619. package/esm/internals/types/placement.d.ts +5 -0
  620. package/esm/internals/utils/colours.js +1 -4
  621. package/esm/internals/utils/composeFunctions.js +1 -4
  622. package/esm/internals/utils/createChainedFunction.js +2 -8
  623. package/esm/internals/utils/date/copyTime.js +4 -5
  624. package/esm/internals/utils/getDataGroupBy.js +5 -8
  625. package/esm/internals/utils/html/htmlPropsUtils.js +1 -4
  626. package/esm/internals/utils/placement.js +1 -4
  627. package/esm/internals/utils/react/createComponent.js +6 -7
  628. package/esm/internals/utils/string/tplTransform.js +1 -4
  629. package/esm/internals/utils/style-sheet/css.js +3 -12
  630. package/esm/internals/utils/style-sheet/styles.js +2 -8
  631. package/esm/locales/ar_EG.d.ts +6 -0
  632. package/esm/locales/ar_EG.js +6 -0
  633. package/esm/locales/ca_ES.d.ts +6 -0
  634. package/esm/locales/ca_ES.js +6 -0
  635. package/esm/locales/cs_CZ.d.ts +6 -0
  636. package/esm/locales/cs_CZ.js +6 -0
  637. package/esm/locales/da_DK.d.ts +6 -0
  638. package/esm/locales/da_DK.js +6 -0
  639. package/esm/locales/de_DE.d.ts +6 -0
  640. package/esm/locales/de_DE.js +6 -0
  641. package/esm/locales/en_GB.d.ts +6 -0
  642. package/esm/locales/en_GB.js +6 -0
  643. package/esm/locales/en_US.d.ts +6 -0
  644. package/esm/locales/en_US.js +6 -0
  645. package/esm/locales/es_AR.d.ts +6 -0
  646. package/esm/locales/es_AR.js +6 -0
  647. package/esm/locales/es_ES.d.ts +6 -0
  648. package/esm/locales/es_ES.js +7 -1
  649. package/esm/locales/fa_IR.d.ts +6 -0
  650. package/esm/locales/fa_IR.js +6 -0
  651. package/esm/locales/fi_FI.d.ts +6 -0
  652. package/esm/locales/fi_FI.js +6 -0
  653. package/esm/locales/fr_FR.d.ts +6 -0
  654. package/esm/locales/fr_FR.js +6 -0
  655. package/esm/locales/gu_IN.d.ts +157 -0
  656. package/esm/locales/gu_IN.js +93 -0
  657. package/esm/locales/hu_HU.d.ts +6 -0
  658. package/esm/locales/hu_HU.js +6 -0
  659. package/esm/locales/index.d.ts +3 -0
  660. package/esm/locales/index.js +4 -1
  661. package/esm/locales/it_IT.d.ts +6 -0
  662. package/esm/locales/it_IT.js +6 -0
  663. package/esm/locales/ja_JP.d.ts +6 -0
  664. package/esm/locales/ja_JP.js +6 -0
  665. package/esm/locales/kk_KZ.d.ts +6 -0
  666. package/esm/locales/kk_KZ.js +6 -0
  667. package/esm/locales/ko_KR.d.ts +6 -0
  668. package/esm/locales/ko_KR.js +6 -0
  669. package/esm/locales/ne_NP.d.ts +6 -0
  670. package/esm/locales/ne_NP.js +6 -0
  671. package/esm/locales/nl_NL.d.ts +6 -0
  672. package/esm/locales/nl_NL.js +8 -2
  673. package/esm/locales/pl_PL.d.ts +6 -0
  674. package/esm/locales/pl_PL.js +6 -0
  675. package/esm/locales/pt_BR.d.ts +6 -0
  676. package/esm/locales/pt_BR.js +6 -0
  677. package/esm/locales/ru_RU.d.ts +6 -0
  678. package/esm/locales/ru_RU.js +6 -0
  679. package/esm/locales/sv_SE.d.ts +6 -0
  680. package/esm/locales/sv_SE.js +6 -0
  681. package/esm/locales/th_TH.d.ts +169 -0
  682. package/esm/locales/th_TH.js +96 -0
  683. package/esm/locales/tr_TR.d.ts +6 -0
  684. package/esm/locales/tr_TR.js +6 -0
  685. package/esm/locales/uk_UA.d.ts +157 -0
  686. package/esm/locales/uk_UA.js +93 -0
  687. package/esm/locales/zh_CN.d.ts +6 -0
  688. package/esm/locales/zh_CN.js +6 -0
  689. package/esm/locales/zh_TW.d.ts +6 -0
  690. package/esm/locales/zh_TW.js +6 -0
  691. package/esm/toaster/ToastContainer.js +2 -2
  692. package/esm/toaster/toaster.js +1 -4
  693. package/esm/useDialog/Dialog.d.ts +15 -0
  694. package/esm/useDialog/Dialog.js +103 -0
  695. package/esm/useDialog/DialogContainer.d.ts +11 -0
  696. package/esm/useDialog/DialogContainer.js +52 -0
  697. package/esm/useDialog/index.d.ts +3 -0
  698. package/esm/useDialog/index.js +4 -0
  699. package/esm/useDialog/types.d.ts +33 -0
  700. package/esm/useDialog/types.js +2 -0
  701. package/esm/useDialog/useDialog.d.ts +15 -0
  702. package/esm/useDialog/useDialog.js +120 -0
  703. package/esm/{FormControl → useFormControl}/hooks/useField.d.ts +3 -3
  704. package/esm/{FormControl → useFormControl}/hooks/useField.js +4 -5
  705. package/esm/useFormControl/hooks/useRegisterModel.d.ts +2 -0
  706. package/esm/{FormControl → useFormControl}/hooks/useRegisterModel.js +2 -3
  707. package/esm/useFormControl/index.d.ts +4 -0
  708. package/esm/useFormControl/index.js +8 -0
  709. package/esm/useFormControl/useFormControl.d.ts +38 -0
  710. package/esm/useFormControl/useFormControl.js +130 -0
  711. package/esm/{FormControl/utils.js → useFormControl/utils/nameToPath.js} +0 -0
  712. package/esm/useMediaQuery/breakpoints.js +4 -10
  713. package/esm/useMediaQuery/useMediaQuery.js +1 -4
  714. package/esm/useToaster/useToaster.d.ts +1 -1
  715. package/esm/useToaster/useToaster.js +11 -10
  716. package/locales/gu_IN/package.json +7 -0
  717. package/locales/th_TH/package.json +7 -0
  718. package/locales/uk_UA/package.json +7 -0
  719. package/package.json +5 -6
  720. package/toaster/styles/index.css +107 -121
  721. package/useDialog/package.json +7 -0
  722. package/useFormControl/package.json +7 -0
  723. package/useToaster/styles/index.css +107 -121
  724. package/Accordion/styles/index.less +0 -2
  725. package/Animation/styles/animation.less +0 -95
  726. package/Animation/styles/bounce.less +0 -34
  727. package/Animation/styles/collapse.less +0 -23
  728. package/Animation/styles/fade.less +0 -10
  729. package/Animation/styles/index.less +0 -8
  730. package/Animation/styles/mixin.less +0 -15
  731. package/Animation/styles/slide.less +0 -24
  732. package/Animation/styles/variables.less +0 -4
  733. package/AutoComplete/styles/index.less +0 -37
  734. package/Avatar/styles/index.less +0 -48
  735. package/AvatarGroup/styles/index.less +0 -25
  736. package/Badge/styles/index.less +0 -101
  737. package/Badge/styles/variables.less +0 -19
  738. package/Box/styles/index.less +0 -1
  739. package/Breadcrumb/styles/index.less +0 -49
  740. package/Button/styles/index.less +0 -364
  741. package/Button/styles/mixin.less +0 -62
  742. package/Button/styles/variables.less +0 -30
  743. package/ButtonGroup/styles/index.less +0 -91
  744. package/ButtonToolbar/styles/index.less +0 -17
  745. package/Calendar/styles/index.less +0 -678
  746. package/Card/styles/index.less +0 -63
  747. package/CardGroup/styles/index.less +0 -8
  748. package/Carousel/styles/index.less +0 -192
  749. package/CascadeTree/styles/index.less +0 -88
  750. package/CascadeTree/styles/search.less +0 -35
  751. package/Cascader/styles/index.less +0 -5
  752. package/Center/styles/index.less +0 -9
  753. package/CheckPicker/styles/index.less +0 -21
  754. package/CheckTree/styles/index.less +0 -120
  755. package/CheckTreePicker/styles/index.less +0 -17
  756. package/Checkbox/styles/index.less +0 -153
  757. package/Checkbox/styles/mixin.less +0 -37
  758. package/CheckboxGroup/styles/index.less +0 -14
  759. package/Col/styles/index.less +0 -2
  760. package/Container/stories/styles.less +0 -23
  761. package/Container/styles/index.less +0 -16
  762. package/Content/styles/index.less +0 -6
  763. package/DateInput/styles/index.less +0 -1
  764. package/DatePicker/styles/index.less +0 -167
  765. package/DatePicker/styles/mixin.less +0 -8
  766. package/DateRangeInput/styles/index.less +0 -1
  767. package/DateRangePicker/styles/index.less +0 -145
  768. package/Divider/styles/index.less +0 -85
  769. package/Drawer/styles/index.less +0 -255
  770. package/Drawer/styles/mixin.less +0 -23
  771. package/Dropdown/styles/index.less +0 -341
  772. package/Dropdown/styles/mixin.less +0 -4
  773. package/FlexboxGrid/styles/index.less +0 -79
  774. package/Footer/styles/index.less +0 -5
  775. package/Form/styles/index.less +0 -1
  776. package/FormControl/styles/index.less +0 -79
  777. package/FormControlLabel/styles/index.less +0 -7
  778. package/FormErrorMessage/styles/animation.less +0 -43
  779. package/FormErrorMessage/styles/index.less +0 -179
  780. package/FormGroup/styles/index.less +0 -75
  781. package/FormHelpText/styles/index.less +0 -21
  782. package/FormStack/styles/index.less +0 -15
  783. package/Grid/styles/columns.less +0 -21
  784. package/Grid/styles/grid-framework.less +0 -92
  785. package/Grid/styles/index.less +0 -107
  786. package/Grid/styles/mixin.less +0 -12
  787. package/Grid/styles/row.less +0 -42
  788. package/Grid/styles/variables.less +0 -5
  789. package/Header/styles/index.less +0 -5
  790. package/Heading/styles/index.less +0 -42
  791. package/Heading/styles/variables.less +0 -19
  792. package/HeadingGroup/styles/index.less +0 -3
  793. package/Highlight/styles/index.less +0 -6
  794. package/IconButton/styles/index.less +0 -90
  795. package/Image/styles/index.less +0 -34
  796. package/InlineEdit/styles/index.less +0 -50
  797. package/Input/styles/index.less +0 -23
  798. package/Input/styles/mixin.less +0 -38
  799. package/Input/styles/variables.less +0 -22
  800. package/InputGroup/styles/index.less +0 -237
  801. package/InputNumber/styles/index.less +0 -1
  802. package/InputPicker/styles/index.less +0 -64
  803. package/InputPicker/styles/mixin.less +0 -7
  804. package/Kbd/styles/index.less +0 -20
  805. package/Kbd/styles/mixin.less +0 -24
  806. package/Kbd/styles/variables.less +0 -13
  807. package/Link/styles/index.less +0 -39
  808. package/List/styles/index.less +0 -113
  809. package/Loader/styles/index.less +0 -114
  810. package/Loader/styles/mixin.less +0 -33
  811. package/Loader/styles/variables.less +0 -16
  812. package/Menu/styles/index.less +0 -108
  813. package/Message/styles/index.less +0 -188
  814. package/Modal/styles/animation.less +0 -15
  815. package/Modal/styles/index.less +0 -189
  816. package/MultiCascadeTree/styles/index.less +0 -46
  817. package/MultiCascader/styles/index.less +0 -15
  818. package/Nav/styles/index.less +0 -366
  819. package/Navbar/styles/index.less +0 -236
  820. package/Notification/styles/index.less +0 -114
  821. package/NumberInput/styles/index.less +0 -74
  822. package/NumberInput/styles/mixin.less +0 -11
  823. package/Pagination/styles/index.less +0 -101
  824. package/Pagination/styles/mixin.less +0 -14
  825. package/Pagination/styles/pagination-group.less +0 -31
  826. package/Panel/styles/index.less +0 -121
  827. package/PanelGroup/styles/index.less +0 -34
  828. package/PasswordInput/styles/index.less +0 -1
  829. package/PasswordStrengthMeter/styles/index.less +0 -39
  830. package/PinInput/styles/index.less +0 -66
  831. package/Placeholder/styles/index.less +0 -148
  832. package/Placeholder/styles/mixin.less +0 -7
  833. package/Popover/styles/index.less +0 -202
  834. package/Popover/styles/mixins.less +0 -60
  835. package/Progress/styles/animation.less +0 -34
  836. package/Progress/styles/index.less +0 -187
  837. package/ProgressLine/package.json +0 -7
  838. package/Radio/styles/index.less +0 -144
  839. package/Radio/styles/mixin.less +0 -5
  840. package/RadioGroup/styles/index.less +0 -87
  841. package/RadioTile/styles/index.less +0 -79
  842. package/RadioTileGroup/styles/index.less +0 -1
  843. package/RangeSlider/styles/index.less +0 -4
  844. package/Rate/styles/index.less +0 -139
  845. package/Row/styles/index.less +0 -2
  846. package/SelectPicker/styles/index.less +0 -47
  847. package/Sidebar/styles/index.less +0 -15
  848. package/Sidenav/styles/index.less +0 -655
  849. package/Sidenav/styles/mixin.less +0 -23
  850. package/Slider/styles/index.less +0 -296
  851. package/Stack/styles/index.less +0 -83
  852. package/Stat/styles/index.less +0 -113
  853. package/StatGroup/styles/index.less +0 -8
  854. package/Steps/styles/index.less +0 -222
  855. package/Table/styles/index.less +0 -433
  856. package/Table/styles/mixin.less +0 -8
  857. package/Tabs/styles/index.less +0 -24
  858. package/Tag/styles/index.less +0 -55
  859. package/TagGroup/styles/index.less +0 -14
  860. package/TagInput/styles/index.less +0 -5
  861. package/TagPicker/styles/index.less +0 -136
  862. package/Text/styles/index.less +0 -122
  863. package/Text/styles/variables.less +0 -9
  864. package/Textarea/styles/index.less +0 -7
  865. package/TimePicker/styles/index.less +0 -1
  866. package/TimeRangePicker/styles/index.less +0 -1
  867. package/Timeline/stories/styles.less +0 -29
  868. package/Timeline/styles/index.less +0 -174
  869. package/Timeline/styles/mixin.less +0 -13
  870. package/Toggle/styles/index.less +0 -278
  871. package/Tooltip/styles/index.less +0 -161
  872. package/Tooltip/styles/mixins.less +0 -60
  873. package/Tree/styles/indent-line.less +0 -8
  874. package/Tree/styles/index.less +0 -186
  875. package/Tree/styles/toggle.less +0 -32
  876. package/TreePicker/styles/index.less +0 -16
  877. package/Uploader/styles/index.less +0 -468
  878. package/Uploader/styles/mixin.less +0 -11
  879. package/VisuallyHidden/styles/index.less +0 -11
  880. package/cjs/FormControl/hooks/useRegisterModel.d.ts +0 -3
  881. package/cjs/Progress/ProgressCircle.js +0 -132
  882. package/cjs/internals/Overlay/positionUtils.d.ts +0 -15
  883. package/dist/rsuite-no-reset-rtl.css +0 -15243
  884. package/dist/rsuite-no-reset-rtl.min.css +0 -2
  885. package/dist/rsuite-no-reset-rtl.min.css.map +0 -1
  886. package/dist/rsuite-no-reset.min.css.map +0 -1
  887. package/dist/rsuite-rtl.css +0 -15494
  888. package/dist/rsuite-rtl.min.css +0 -2
  889. package/dist/rsuite-rtl.min.css.map +0 -1
  890. package/dist/rsuite.min.css.map +0 -1
  891. package/esm/FormControl/hooks/useRegisterModel.d.ts +0 -3
  892. package/esm/Progress/ProgressCircle.js +0 -125
  893. package/esm/internals/Overlay/positionUtils.d.ts +0 -15
  894. package/internals/Box/styles/index.less +0 -82
  895. package/internals/Burger/styles/index.less +0 -67
  896. package/internals/CloseButton/styles/index.less +0 -15
  897. package/internals/Picker/styles/index.less +0 -477
  898. package/internals/Picker/styles/mixin.less +0 -131
  899. package/internals/Ripple/styles/index.less +0 -36
  900. package/internals/Ripple/styles/mixins.less +0 -6
  901. package/internals/ScrollView/styles/index.less +0 -69
  902. package/internals/SearchBox/styles/index.less +0 -11
  903. package/styles/color-modes/dark.less +0 -441
  904. package/styles/color-modes/high-contrast.less +0 -452
  905. package/styles/color-modes/light.less +0 -464
  906. package/styles/colors/dark.less +0 -105
  907. package/styles/colors/high-contrast.less +0 -105
  908. package/styles/colors/light.less +0 -105
  909. package/styles/common.less +0 -13
  910. package/styles/index.less +0 -106
  911. package/styles/mixins/color-modes.less +0 -16
  912. package/styles/mixins/combobox.less +0 -6
  913. package/styles/mixins/hacks.less +0 -32
  914. package/styles/mixins/listbox.less +0 -68
  915. package/styles/mixins/menu.less +0 -12
  916. package/styles/mixins/utilities.less +0 -183
  917. package/styles/normalize.less +0 -247
  918. package/styles/plugins/palette.js +0 -1407
  919. package/styles/root.less +0 -83
  920. package/styles/scaffolding.less +0 -54
  921. package/styles/typography.less +0 -123
  922. package/styles/variables.less +0 -638
  923. package/toaster/styles/animation.less +0 -54
  924. package/toaster/styles/index.less +0 -100
  925. package/useToaster/styles/index.less +0 -1
  926. /package/cjs/{FormControl/utils.d.ts → useFormControl/utils/nameToPath.d.ts} +0 -0
  927. /package/esm/{FormControl/utils.d.ts → useFormControl/utils/nameToPath.d.ts} +0 -0
@@ -3,7 +3,8 @@
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
5
  exports.__esModule = true;
6
- exports.default = exports.AutoPlacement = void 0;
6
+ exports.AutoPlacement = void 0;
7
+ exports.calcPosition = calcPosition;
7
8
  var _maxBy = _interopRequireDefault(require("lodash/maxBy"));
8
9
  var _minBy = _interopRequireDefault(require("lodash/minBy"));
9
10
  var _ownerDocument = _interopRequireDefault(require("dom-lib/ownerDocument"));
@@ -20,11 +21,26 @@ const AutoPlacement = exports.AutoPlacement = {
20
21
  bottom: 'End'
21
22
  };
22
23
 
24
+ // Cache for memoization
25
+ const dimensionsCache = new Map();
26
+
27
+ // Cache expiry time (milliseconds)
28
+ const CACHE_EXPIRY = 100;
29
+
23
30
  /**
24
- * Get the external dimensions of the container
25
- * @param containerNode
31
+ * Get the external dimensions of the container with memoization for performance
32
+ * @param containerNode Container element
33
+ * @returns Container dimensions information
26
34
  */
27
35
  function getContainerDimensions(containerNode) {
36
+ // Check cache
37
+ const cached = dimensionsCache.get(containerNode);
38
+ const now = Date.now();
39
+ if (cached && now - cached.timestamp < CACHE_EXPIRY) {
40
+ return cached.dimensions;
41
+ }
42
+
43
+ // Calculate new dimensions
28
44
  let width;
29
45
  let height;
30
46
  let scrollX;
@@ -42,19 +58,28 @@ function getContainerDimensions(containerNode) {
42
58
  scrollY = (0, _scrollTop.default)(containerNode);
43
59
  scrollX = (0, _scrollLeft.default)(containerNode);
44
60
  }
45
- return {
61
+ const dimensions = {
46
62
  width,
47
63
  height,
48
64
  scrollX,
49
65
  scrollY
50
66
  };
67
+
68
+ // Update cache
69
+ dimensionsCache.set(containerNode, {
70
+ dimensions,
71
+ timestamp: now
72
+ });
73
+ return dimensions;
51
74
  }
52
- var _default = props => {
75
+ function calcPosition(options) {
53
76
  const {
54
77
  placement,
55
78
  preventOverflow,
56
79
  padding
57
- } = props;
80
+ } = options;
81
+ // Ensure placement is a valid type
82
+ const currentPlacement = placement;
58
83
  function getTopDelta(top, overlayHeight, container) {
59
84
  if (!preventOverflow) {
60
85
  return 0;
@@ -100,12 +125,12 @@ var _default = props => {
100
125
  height: containerHeight
101
126
  } = getContainerDimensions(container);
102
127
 
103
- // 判断 overlay 底部是否溢出,设置 top
128
+ // Check if the bottom of the overlay overflows, set top
104
129
  if (overlayHeight + top > containerHeight + scrollY) {
105
130
  return containerHeight - overlayHeight + scrollY;
106
131
  }
107
132
 
108
- // top 的最小值不能少于纵向滚动条 y 的值
133
+ // The minimum value of top should not be less than the vertical scroll bar y value
109
134
  return Math.max(scrollY, top);
110
135
  }
111
136
  function getPositionLeft(container, overlayWidth, left) {
@@ -120,7 +145,7 @@ var _default = props => {
120
145
  return containerWidth - overlayWidth + scrollX;
121
146
  }
122
147
 
123
- // left 的最小值不能少于横向滚动条 x 的值
148
+ // The minimum value of left should not be less than the horizontal scroll bar x value
124
149
  return Math.max(scrollX, left);
125
150
  }
126
151
  return {
@@ -166,57 +191,86 @@ var _default = props => {
166
191
  offset.top = top - containerOffset.top;
167
192
  return offset;
168
193
  },
194
+ /**
195
+ * Calculate the optimal auto placement position
196
+ * @param targetOffset Target element offset
197
+ * @param container Container element
198
+ * @param overlay Overlay dimensions
199
+ * @returns Calculated optimal placement position
200
+ */
169
201
  calcAutoPlacement(targetOffset, container, overlay) {
202
+ // Get container dimensions and scroll position
170
203
  const {
171
204
  width,
172
205
  height,
173
206
  scrollX,
174
207
  scrollY
175
208
  } = getContainerDimensions(container);
176
- const left = targetOffset.left - scrollX - overlay.width;
177
- const top = targetOffset.top - scrollY - overlay.height;
178
- const right = width - targetOffset.left - targetOffset.width + scrollX - overlay.width;
179
- const bottom = height - targetOffset.top - targetOffset.height + scrollY - overlay.height;
209
+
210
+ // Calculate available space in each direction
211
+ const availableSpace = {
212
+ left: targetOffset.left - scrollX - overlay.width,
213
+ top: targetOffset.top - scrollY - overlay.height,
214
+ right: width - targetOffset.left - targetOffset.width + scrollX - overlay.width,
215
+ bottom: height - targetOffset.top - targetOffset.height + scrollY - overlay.height
216
+ };
217
+
218
+ // Group available space into horizontal and vertical directions
180
219
  const horizontal = [{
181
220
  key: 'left',
182
- value: left
221
+ value: availableSpace.left
183
222
  }, {
184
223
  key: 'right',
185
- value: right
224
+ value: availableSpace.right
186
225
  }];
187
226
  const vertical = [{
188
227
  key: 'top',
189
- value: top
228
+ value: availableSpace.top
190
229
  }, {
191
230
  key: 'bottom',
192
- value: bottom
231
+ value: availableSpace.bottom
193
232
  }];
233
+
234
+ // Constants for auto placement
194
235
  const AV = 'autoVertical';
195
236
  const AH = 'autoHorizontal';
196
- let direction;
197
- let align;
198
- if (placement.indexOf(AV) !== -1) {
199
- direction = (0, _maxBy.default)(vertical, o => o.value);
200
- return placement === AV ? direction.key : `${direction.key}${placement.replace(AV, '')}`;
201
- } else if (placement.indexOf(AH) !== -1) {
202
- direction = (0, _maxBy.default)(horizontal, o => o.value);
203
- return placement === AH ? direction.key : `${direction.key}${placement.replace(AH, '')}`;
237
+
238
+ // Handle specific auto vertical placement
239
+ if (currentPlacement.indexOf(AV) !== -1) {
240
+ const bestDirection = (0, _maxBy.default)(vertical, o => o.value);
241
+ if (!bestDirection) return 'bottom'; // Default value
242
+ return currentPlacement === AV ? bestDirection.key : `${bestDirection.key}${currentPlacement.replace(AV, '')}`;
204
243
  }
205
244
 
206
- /**
207
- * Precedence Vertical
208
- * [...vertical, ...horizontal]
209
- */
210
- direction = (0, _maxBy.default)([...vertical, ...horizontal], o => o.value);
211
- if (direction.key === 'left' || direction.key === 'right') {
212
- align = (0, _minBy.default)(vertical, o => o.value);
213
- } else {
214
- align = (0, _minBy.default)(horizontal, o => o.value);
245
+ // Handle specific auto horizontal placement
246
+ if (currentPlacement.indexOf(AH) !== -1) {
247
+ const bestDirection = (0, _maxBy.default)(horizontal, o => o.value);
248
+ if (!bestDirection) return 'right'; // Default value
249
+ return currentPlacement === AH ? bestDirection.key : `${bestDirection.key}${currentPlacement.replace(AH, '')}`;
215
250
  }
216
- return `${direction.key}${AutoPlacement[align.key]}`;
251
+
252
+ // By default, vertical direction takes precedence
253
+ // Find the direction with the most space to use as main direction
254
+ const bestDirection = (0, _maxBy.default)([...vertical, ...horizontal], o => o.value);
255
+ if (!bestDirection) return 'bottom'; // 默认值
256
+
257
+ // Determine alignment based on main direction
258
+ const isHorizontal = bestDirection.key === 'left' || bestDirection.key === 'right';
259
+ const bestAlign = isHorizontal ? (0, _minBy.default)(vertical, o => o.value) // If main direction is horizontal, align vertically
260
+ : (0, _minBy.default)(horizontal, o => o.value); // If main direction is vertical, align horizontally
261
+
262
+ if (!bestAlign) return bestDirection.key; // If no alignment, return main direction
263
+
264
+ // Return final placement position
265
+ return `${bestDirection.key}${AutoPlacement[bestAlign.key]}`;
217
266
  },
218
267
  // Calculate the position of the overlay
219
268
  calcOverlayPosition(overlayNode, target, container, cursorPosition) {
269
+ // Cache commonly used values to avoid repeated calculations
270
+ const ARROW_OFFSET_FACTOR = 50; // Arrow offset calculation factor
271
+ const isRTL = document.dir === 'rtl';
272
+
273
+ // Get target element offset
220
274
  const childOffset = cursorPosition ? this.getCursorOffsetPosition(target, container, cursorPosition) : this.getPosition(target, container);
221
275
  const {
222
276
  height: overlayHeight,
@@ -226,45 +280,70 @@ var _default = props => {
226
280
  top,
227
281
  left
228
282
  } = childOffset;
229
- let nextPlacement = placement;
230
- if (placement && placement.indexOf('auto') >= 0) {
283
+
284
+ // Determine placement position
285
+ let nextPlacement = currentPlacement;
286
+ if (currentPlacement && currentPlacement.indexOf('auto') >= 0) {
231
287
  nextPlacement = this.calcAutoPlacement(childOffset, container, {
232
288
  height: overlayHeight,
233
289
  width: overlayWidth
234
290
  });
235
291
  }
292
+
293
+ // Initialize position and arrow offset values
236
294
  let positionLeft;
237
295
  let positionTop;
238
296
  let arrowOffsetLeft;
239
297
  let arrowOffsetTop;
298
+
299
+ // Handle basic left/right positions
240
300
  if (nextPlacement === 'left' || nextPlacement === 'right') {
301
+ // Vertical centering
241
302
  positionTop = childOffset.top + (childOffset.height - overlayHeight) / 2;
242
303
  const topDelta = getTopDelta(positionTop, overlayHeight, container);
243
304
  positionTop += topDelta;
244
- arrowOffsetTop = `${50 * (1 - 2 * topDelta / overlayHeight)}%`;
305
+ arrowOffsetTop = `${ARROW_OFFSET_FACTOR * (1 - 2 * topDelta / overlayHeight)}%`;
245
306
  arrowOffsetLeft = undefined;
246
- } else if (nextPlacement === 'top' || nextPlacement === 'bottom') {
307
+ }
308
+ // Handle basic top/bottom positions
309
+ else if (nextPlacement === 'top' || nextPlacement === 'bottom') {
310
+ // Horizontal centering
247
311
  positionLeft = left + (childOffset.width - overlayWidth) / 2;
248
312
  const leftDelta = getLeftDelta(positionLeft, overlayWidth, container);
249
313
  positionLeft += leftDelta;
250
- arrowOffsetLeft = `${50 * (1 - 2 * leftDelta / overlayWidth)}%`;
314
+ arrowOffsetLeft = `${ARROW_OFFSET_FACTOR * (1 - 2 * leftDelta / overlayWidth)}%`;
251
315
  arrowOffsetTop = undefined;
252
316
  }
253
- if (nextPlacement === 'top' || nextPlacement === 'topStart' || nextPlacement === 'topEnd') {
317
+
318
+ // Helper function: Check if placement matches specified prefix
319
+ const matchesPlacement = prefix => {
320
+ return nextPlacement === prefix || nextPlacement === `${prefix}Start` || nextPlacement === `${prefix}End`;
321
+ };
322
+
323
+ // Handle top position series
324
+ if (matchesPlacement('top')) {
254
325
  positionTop = getPositionTop(container, overlayHeight, childOffset.top - overlayHeight);
255
326
  }
256
- if (nextPlacement === 'bottom' || nextPlacement === 'bottomStart' || nextPlacement === 'bottomEnd') {
327
+
328
+ // Handle bottom position series
329
+ if (matchesPlacement('bottom')) {
257
330
  positionTop = getPositionTop(container, overlayHeight, childOffset.top + childOffset.height);
258
331
  }
259
- if (nextPlacement === 'left' || nextPlacement === 'leftStart' || nextPlacement === 'leftEnd') {
332
+
333
+ // Handle left position series
334
+ if (matchesPlacement('left')) {
260
335
  positionLeft = getPositionLeft(container, overlayWidth, childOffset.left - overlayWidth);
261
336
  }
262
- if (nextPlacement === 'right' || nextPlacement === 'rightStart' || nextPlacement === 'rightEnd') {
337
+
338
+ // Handle right position series
339
+ if (matchesPlacement('right')) {
263
340
  positionLeft = getPositionLeft(container, overlayWidth, childOffset.left + childOffset.width);
264
341
  }
265
- if (document.dir === 'rtl' && (nextPlacement === 'left' || nextPlacement === 'leftStart' || nextPlacement === 'leftEnd' || nextPlacement === 'right' || nextPlacement === 'rightStart' || nextPlacement === 'rightEnd')) {
342
+
343
+ // Handle horizontal position adjustment in RTL mode
344
+ if (isRTL && (matchesPlacement('left') || matchesPlacement('right'))) {
266
345
  /**
267
- * When laying out in rtl, if the width of the container
346
+ * When laying out in RTL, if the width of the container
268
347
  * is less than the width of the container scrolling,
269
348
  * you need to recalculate the left value.
270
349
  */
@@ -275,25 +354,33 @@ var _default = props => {
275
354
  positionLeft = containerWidth + positionLeft - container.scrollWidth;
276
355
  }
277
356
  }
357
+
358
+ // Handle Start variant positions
278
359
  if (nextPlacement === 'topStart' || nextPlacement === 'bottomStart') {
279
- if (document.dir === 'rtl') {
360
+ if (isRTL) {
280
361
  const nextLeft = left + (childOffset.width - overlayWidth);
281
362
  positionLeft = nextLeft + getLeftDelta(nextLeft, overlayWidth, container);
282
363
  } else {
283
364
  positionLeft = left + getLeftDelta(left, overlayWidth, container);
284
365
  }
285
366
  }
367
+
368
+ // Handle End variant positions
286
369
  if (nextPlacement === 'topEnd' || nextPlacement === 'bottomEnd') {
287
- if (document.dir === 'rtl') {
370
+ if (isRTL) {
288
371
  positionLeft = left + getLeftDelta(left, overlayWidth, container);
289
372
  } else {
290
373
  const nextLeft = left + (childOffset.width - overlayWidth);
291
374
  positionLeft = nextLeft + getLeftDelta(nextLeft, overlayWidth, container);
292
375
  }
293
376
  }
377
+
378
+ // Handle leftStart and rightStart
294
379
  if (nextPlacement === 'leftStart' || nextPlacement === 'rightStart') {
295
380
  positionTop = top + getTopDelta(top, overlayHeight, container);
296
381
  }
382
+
383
+ // Handle leftEnd and rightEnd
297
384
  if (nextPlacement === 'leftEnd' || nextPlacement === 'rightEnd') {
298
385
  const nextTop = top + (childOffset.height - overlayHeight);
299
386
  positionTop = nextTop + getTopDelta(nextTop, overlayHeight, container);
@@ -307,5 +394,4 @@ var _default = props => {
307
394
  };
308
395
  }
309
396
  };
310
- };
311
- exports.default = _default;
397
+ }
@@ -24,8 +24,7 @@ var _symbols = require("../symbols");
24
24
  var _hooks = require("../hooks");
25
25
  var _utils = require("../utils");
26
26
  var _getDataGroupBy = require("../utils/getDataGroupBy");
27
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
28
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
27
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
29
28
  /**
30
29
  * Props for the Listbox component.
31
30
  */
@@ -133,13 +132,12 @@ const Listbox = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
133
132
  return !foldedGroupKeys.includes(groupValue);
134
133
  }) : data;
135
134
  const rowCount = filteredItems.length;
136
- const renderItem = _ref => {
137
- let {
138
- index = 0,
139
- style,
140
- data,
141
- item: itemData
142
- } = _ref;
135
+ const renderItem = ({
136
+ index = 0,
137
+ style,
138
+ data,
139
+ item: itemData
140
+ }) => {
143
141
  const item = itemData || data[index];
144
142
  const value = item[valueKey];
145
143
  const itemLabel = item[labelKey];
@@ -207,20 +205,17 @@ const Listbox = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
207
205
  width: 'auto',
208
206
  height: 'auto'
209
207
  }
210
- }, _ref2 => {
211
- let {
212
- height
213
- } = _ref2;
214
- return /*#__PURE__*/_react.default.createElement(_Windowing.List, (0, _extends2.default)({
215
- as: _Windowing.VariableSizeList,
216
- ref: (0, _utils.mergeRefs)(listRef, virtualizedListRef),
217
- height: height || maxHeight,
218
- itemCount: rowCount,
219
- itemData: filteredItems,
220
- itemSize: getRowHeight.bind(void 0, filteredItems),
221
- className: rootPrefix('virt-list')
222
- }, listProps), renderItem);
223
- }) : filteredItems.map((item, index) => renderItem({
208
+ }, ({
209
+ height
210
+ }) => /*#__PURE__*/_react.default.createElement(_Windowing.List, (0, _extends2.default)({
211
+ as: _Windowing.VariableSizeList,
212
+ ref: (0, _utils.mergeRefs)(listRef, virtualizedListRef),
213
+ height: height || maxHeight,
214
+ itemCount: rowCount,
215
+ itemData: filteredItems,
216
+ itemSize: getRowHeight.bind(void 0, filteredItems),
217
+ className: rootPrefix('virt-list')
218
+ }, listProps), renderItem)) : filteredItems.map((item, index) => renderItem({
224
219
  index,
225
220
  item
226
221
  })));
@@ -10,16 +10,15 @@ var _InputGroup = _interopRequireDefault(require("../../InputGroup"));
10
10
  var _CloseButton = _interopRequireDefault(require("../CloseButton"));
11
11
  var _Loader = _interopRequireDefault(require("../../Loader"));
12
12
  var _hooks = require("../hooks");
13
- const PickerIndicator = _ref => {
14
- let {
15
- loading,
16
- caretAs,
17
- onClose,
18
- showCleanButton,
19
- as: Component = _InputGroup.default.Addon,
20
- disabled,
21
- size
22
- } = _ref;
13
+ const PickerIndicator = ({
14
+ loading,
15
+ caretAs,
16
+ onClose,
17
+ showCleanButton,
18
+ as: Component = _InputGroup.default.Addon,
19
+ disabled,
20
+ size
21
+ }) => {
23
22
  const {
24
23
  getLocale
25
24
  } = (0, _hooks.useCustom)();
@@ -7,13 +7,12 @@ exports.default = void 0;
7
7
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _InputGroup = _interopRequireDefault(require("../../InputGroup"));
10
- const PickerLabel = _ref => {
11
- let {
12
- children,
13
- className,
14
- as: Component = _InputGroup.default.Addon,
15
- ...rest
16
- } = _ref;
10
+ const PickerLabel = ({
11
+ children,
12
+ className,
13
+ as: Component = _InputGroup.default.Addon,
14
+ ...rest
15
+ }) => {
17
16
  return children ? /*#__PURE__*/_react.default.createElement(Component, (0, _extends2.default)({
18
17
  "data-testid": "picker-label",
19
18
  className: className
@@ -11,8 +11,7 @@ var _getWidth = _interopRequireDefault(require("dom-lib/getWidth"));
11
11
  var _hooks = require("../hooks");
12
12
  var _utils = require("../utils");
13
13
  var _ = require("./");
14
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
15
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
14
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
16
15
  // Define an array of placements that require resizing
17
16
  const resizePlacement = ['topStart', 'topEnd', 'leftEnd', 'rightEnd', 'auto', 'autoVerticalStart', 'autoVerticalEnd', 'autoHorizontalEnd'];
18
17
  const PickerPopup = (0, _utils.forwardRef)((props, ref) => {
@@ -16,8 +16,7 @@ var _useCombobox = _interopRequireDefault(require("./hooks/useCombobox"));
16
16
  var _hooks = require("../hooks");
17
17
  var _utils = require("../utils");
18
18
  var _PickerToggleTrigger = require("./PickerToggleTrigger");
19
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
20
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
19
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
21
20
  const PickerToggle = (0, _utils.forwardRef)((props, ref) => {
22
21
  const {
23
22
  active,
@@ -13,8 +13,7 @@ var _PickerDrawer = _interopRequireDefault(require("./PickerDrawer"));
13
13
  var _OverlayTrigger = _interopRequireDefault(require("../Overlay/OverlayTrigger"));
14
14
  var _hooks = require("../hooks");
15
15
  var _useBreakpointValue = require("../../useBreakpointValue");
16
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
17
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
16
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
18
17
  const overlayPropKeys = exports.overlayPropKeys = ['onEntered', 'onExited', 'onEnter', 'onEntering', 'onExit', 'onExiting', 'open', 'onOpen', 'defaultOpen', 'onClose', 'container', 'containerPadding', 'preventOverflow'];
19
18
  const pickerCommonPropKeys = exports.pickerCommonPropKeys = ['disabled', 'plaintext', 'readOnly', 'loading', 'label'];
20
19
  const triggerPropKeys = exports.triggerPropKeys = [...overlayPropKeys, ...pickerCommonPropKeys];
@@ -15,10 +15,7 @@ const defaultNodeKeys = {
15
15
  valueKey: 'value',
16
16
  childrenKey: 'children'
17
17
  };
18
- function createConcatChildrenFunction(node, nodeValue, nodeKeys) {
19
- if (nodeKeys === void 0) {
20
- nodeKeys = defaultNodeKeys;
21
- }
18
+ function createConcatChildrenFunction(node, nodeValue, nodeKeys = defaultNodeKeys) {
22
19
  const {
23
20
  valueKey,
24
21
  childrenKey
@@ -1,7 +1,8 @@
1
- import React from 'react';
1
+ import React, { ReactNode, RefObject } from 'react';
2
2
  import type { FormatDateOptions } from '../utils/date/types';
3
3
  import type { ReactSuiteComponents } from './types';
4
4
  import type { ToastContainerInstance } from '../../toaster/ToastContainer';
5
+ import type { DialogContainerInstance } from '../../useDialog/DialogContainer';
5
6
  import type { Locale } from '../../locales';
6
7
  export interface CustomValue<T = Locale> {
7
8
  /**
@@ -100,6 +101,18 @@ export interface CustomProviderProps<T = Locale> extends Partial<CustomValue<T>>
100
101
  * ```
101
102
  */
102
103
  components?: Partial<ReactSuiteComponents>;
104
+ /**
105
+ * Dialogs to be rendered in the provider
106
+ * @internal
107
+ */
108
+ dialogs?: ReactNode[] & {
109
+ _?: never;
110
+ };
111
+ /**
112
+ * Reference to the dialog container instance
113
+ * @internal
114
+ */
115
+ dialogContainer?: RefObject<DialogContainerInstance | null>;
103
116
  }
104
117
  export declare const CustomContext: React.Context<CustomProviderProps<{
105
118
  code?: string | undefined;
@@ -250,4 +263,10 @@ export declare const CustomContext: React.Context<CustomProviderProps<{
250
263
  on: string;
251
264
  off: string;
252
265
  } | undefined;
266
+ Dialog?: {
267
+ alert: string;
268
+ confirm: string;
269
+ ok: string;
270
+ cancel: string;
271
+ } | undefined;
253
272
  }>>;
@@ -76,8 +76,8 @@ import type { PlaceholderGraphProps } from '../../Placeholder/PlaceholderGraph';
76
76
  import type { PlaceholderGridProps } from '../../Placeholder/PlaceholderGrid';
77
77
  import type { PlaceholderParagraphProps } from '../../Placeholder/PlaceholderParagraph';
78
78
  import type { PopoverProps } from '../../Popover';
79
- import type { ProgressCircleProps } from '../../Progress/ProgressCircle';
80
- import type { ProgressLineProps } from '../../Progress/ProgressLine';
79
+ import type { ProgressCircleProps } from '../../ProgressCircle';
80
+ import type { ProgressProps } from '../../Progress';
81
81
  import type { PinInputProps } from '../../PinInput';
82
82
  import type { RadioProps } from '../../Radio';
83
83
  import type { RadioGroupProps } from '../../RadioGroup';
@@ -113,6 +113,7 @@ import type { UploaderProps } from '../../Uploader';
113
113
  import type { VisuallyHiddenProps } from '../../VisuallyHidden';
114
114
  import type { WhisperProps } from '../../Whisper';
115
115
  import type { SafeAnchorProps } from '../SafeAnchor';
116
+ import type { DialogProps } from '../../useDialog/Dialog';
116
117
  interface ComponentProps<T> {
117
118
  defaultProps: Partial<T>;
118
119
  }
@@ -153,6 +154,7 @@ export interface ReactSuiteComponents {
153
154
  Divider: ComponentProps<DividerProps>;
154
155
  Drawer: ComponentProps<DrawerProps>;
155
156
  Dropdown: ComponentProps<DropdownProps>;
157
+ Dialog: ComponentProps<DialogProps>;
156
158
  FlexboxGrid: ComponentProps<FlexboxGridProps>;
157
159
  Footer: ComponentProps<FooterProps>;
158
160
  Form: ComponentProps<FormProps>;
@@ -196,8 +198,9 @@ export interface ReactSuiteComponents {
196
198
  PlaceholderParagraph: ComponentProps<PlaceholderParagraphProps>;
197
199
  PinInput: ComponentProps<PinInputProps>;
198
200
  Popover: ComponentProps<PopoverProps>;
201
+ Progress: ComponentProps<ProgressProps>;
202
+ ProgressLine: ComponentProps<ProgressProps>;
199
203
  ProgressCircle: ComponentProps<ProgressCircleProps>;
200
- ProgressLine: ComponentProps<ProgressLineProps>;
201
204
  Radio: ComponentProps<RadioProps>;
202
205
  RadioGroup: ComponentProps<RadioGroupProps>;
203
206
  RadioTile: ComponentProps<RadioTileProps>;
@@ -11,8 +11,7 @@ var _on = _interopRequireDefault(require("dom-lib/on"));
11
11
  var _Transition = _interopRequireDefault(require("../../Animation/Transition"));
12
12
  var _hooks = require("../hooks");
13
13
  var _utils = require("../utils");
14
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
15
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
14
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
16
15
  const getPosition = (target, event) => {
17
16
  const offset = (0, _getOffset.default)(target);
18
17
  const offsetX = (event.pageX || 0) - offset.left;
@@ -9,8 +9,7 @@ var _react = _interopRequireWildcard(require("react"));
9
9
  var _Box = _interopRequireDefault(require("../Box"));
10
10
  var _hooks = require("../hooks");
11
11
  var _utils = require("../utils");
12
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
13
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
12
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
14
13
  function isTrivialHref(href) {
15
14
  return !href || href.trim() === '#';
16
15
  }
@@ -63,11 +63,10 @@ exports.useTreeContextProps = useTreeContextProps;
63
63
  const useTreeImperativeHandle = () => {
64
64
  const focusFirstNodeRef = (0, _react.useRef)(null);
65
65
  const focusActiveNodeRef = (0, _react.useRef)(null);
66
- const register = (0, _react.useCallback)(_ref => {
67
- let {
68
- focusTreeFirstNode,
69
- focusTreeActiveNode
70
- } = _ref;
66
+ const register = (0, _react.useCallback)(({
67
+ focusTreeFirstNode,
68
+ focusTreeActiveNode
69
+ }) => {
71
70
  focusFirstNodeRef.current = focusTreeFirstNode;
72
71
  focusActiveNodeRef.current = focusTreeActiveNode;
73
72
  return () => {
@@ -6,10 +6,7 @@ exports.__esModule = true;
6
6
  exports.filterNodesOfTree = filterNodesOfTree;
7
7
  var _clone = _interopRequireDefault(require("lodash/clone"));
8
8
  function filterNodesOfTree(data, check) {
9
- const findNodes = function (nodes) {
10
- if (nodes === void 0) {
11
- nodes = [];
12
- }
9
+ const findNodes = (nodes = []) => {
13
10
  const nextNodes = [];
14
11
  for (let i = 0; i < nodes.length; i += 1) {
15
12
  if (Array.isArray(nodes[i].children)) {
@@ -4,10 +4,7 @@
4
4
  exports.__esModule = true;
5
5
  exports.findNodeOfTree = findNodeOfTree;
6
6
  function findNodeOfTree(data, check) {
7
- const findNode = function (nodes) {
8
- if (nodes === void 0) {
9
- nodes = [];
10
- }
7
+ const findNode = (nodes = []) => {
11
8
  for (let i = 0; i < nodes.length; i += 1) {
12
9
  const item = nodes[i];
13
10
  if (Array.isArray(item.children)) {