rsuite 5.76.2 → 6.0.0-canary-20250103

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 (1491) hide show
  1. package/Accordion/styles/index.css +12 -45
  2. package/Animation/styles/animation.less +0 -0
  3. package/Animation/styles/index.css +49 -214
  4. package/Animation/styles/mixin.less +0 -0
  5. package/AutoComplete/styles/index.css +122 -490
  6. package/Avatar/styles/index.css +10 -17
  7. package/AvatarGroup/styles/index.css +12 -16
  8. package/AvatarGroup/styles/index.less +3 -0
  9. package/Badge/styles/index.css +90 -31
  10. package/Badge/styles/index.less +68 -9
  11. package/Breadcrumb/styles/index.css +9 -16
  12. package/Button/styles/index.css +20 -97
  13. package/Button/styles/mixin.less +1 -2
  14. package/ButtonGroup/styles/index.css +8 -9
  15. package/ButtonGroup/styles/index.less +0 -0
  16. package/ButtonToolbar/styles/index.css +7 -6
  17. package/Calendar/styles/index.css +36 -214
  18. package/Calendar/styles/index.less +0 -5
  19. package/Card/styles/index.css +12 -28
  20. package/Carousel/styles/index.css +21 -75
  21. package/Carousel/styles/index.less +0 -0
  22. package/CascadeTree/styles/index.css +10 -39
  23. package/Cascader/styles/index.css +125 -519
  24. package/CheckPicker/styles/index.css +129 -554
  25. package/CheckTree/styles/index.css +133 -579
  26. package/CheckTreePicker/styles/index.css +134 -585
  27. package/Checkbox/styles/index.css +13 -68
  28. package/CheckboxGroup/styles/index.css +9 -14
  29. package/Col/styles/index.css +7 -4
  30. package/Container/styles/index.css +10 -17
  31. package/Container/styles/index.less +0 -0
  32. package/Content/styles/index.css +8 -7
  33. package/Content/styles/index.less +0 -0
  34. package/DateInput/styles/index.css +7 -43
  35. package/DatePicker/styles/index.css +138 -621
  36. package/DatePicker/styles/mixin.less +0 -0
  37. package/DateRangeInput/styles/index.css +7 -43
  38. package/DateRangePicker/styles/index.css +141 -637
  39. package/Divider/styles/index.css +11 -21
  40. package/Drawer/styles/index.css +15 -46
  41. package/Drawer/styles/mixin.less +0 -0
  42. package/Dropdown/styles/index.css +37 -178
  43. package/FlexboxGrid/styles/index.css +41 -108
  44. package/FlexboxGrid/styles/index.less +0 -0
  45. package/Footer/styles/index.css +11 -20
  46. package/Footer/styles/index.less +0 -0
  47. package/Form/styles/index.css +7 -4
  48. package/Form/styles/index.less +0 -0
  49. package/Form/styles/mixin.less +9 -5
  50. package/FormControl/styles/index.css +8 -6
  51. package/FormControl/styles/index.less +0 -0
  52. package/FormControlLabel/styles/index.css +7 -5
  53. package/FormControlLabel/styles/index.less +0 -0
  54. package/FormErrorMessage/styles/animation.less +0 -0
  55. package/FormErrorMessage/styles/index.css +22 -89
  56. package/FormErrorMessage/styles/index.less +0 -0
  57. package/FormGroup/styles/index.css +7 -4
  58. package/FormHelpText/styles/index.css +8 -10
  59. package/FormHelpText/styles/index.less +0 -0
  60. package/Grid/styles/grid-framework.less +0 -0
  61. package/Grid/styles/index.css +7 -4
  62. package/Grid/styles/mixin.less +0 -0
  63. package/Header/styles/index.css +11 -20
  64. package/Header/styles/index.less +0 -0
  65. package/Heading/styles/index.css +7 -4
  66. package/IconButton/styles/index.css +22 -110
  67. package/IconButton/styles/index.less +0 -0
  68. package/Image/styles/index.css +1 -5
  69. package/InlineEdit/styles/index.css +9 -29
  70. package/Input/styles/index.css +7 -43
  71. package/Input/styles/index.less +0 -0
  72. package/InputGroup/styles/index.css +25 -193
  73. package/InputNumber/styles/index.css +29 -251
  74. package/InputNumber/styles/index.less +0 -0
  75. package/InputPicker/styles/index.css +123 -506
  76. package/List/styles/index.css +8 -14
  77. package/Loader/styles/index.css +19 -57
  78. package/Message/styles/index.css +33 -155
  79. package/Modal/styles/animation.less +0 -0
  80. package/Modal/styles/index.css +13 -32
  81. package/Modal/styles/mixin.less +0 -0
  82. package/MultiCascadeTree/styles/index.css +131 -583
  83. package/MultiCascader/styles/index.css +131 -583
  84. package/Nav/styles/index.css +46 -236
  85. package/Navbar/styles/index.css +41 -214
  86. package/Notification/styles/index.css +24 -109
  87. package/Notification/styles/mixin.less +0 -0
  88. package/Pagination/styles/index.css +139 -592
  89. package/Pagination/styles/mixin.less +0 -0
  90. package/Panel/styles/index.css +12 -43
  91. package/PanelGroup/styles/index.css +7 -6
  92. package/PanelGroup/styles/index.less +0 -0
  93. package/Placeholder/styles/index.css +15 -47
  94. package/Popover/styles/index.css +16 -124
  95. package/Popover/styles/mixins.less +0 -12
  96. package/Progress/styles/animation.less +0 -0
  97. package/Progress/styles/index.css +19 -89
  98. package/README.md +9 -5
  99. package/Radio/styles/index.css +12 -66
  100. package/Radio/styles/mixin.less +0 -0
  101. package/RadioGroup/styles/index.css +9 -25
  102. package/RadioTile/styles/index.css +7 -13
  103. package/RangeSlider/styles/index.css +20 -144
  104. package/Rate/styles/index.css +29 -40
  105. package/Rate/styles/index.less +6 -2
  106. package/Row/styles/index.css +7 -4
  107. package/Row/styles/index.less +0 -0
  108. package/SelectPicker/styles/index.css +123 -498
  109. package/SelectPicker/styles/index.less +1 -1
  110. package/Sidebar/styles/index.css +10 -20
  111. package/Sidebar/styles/index.less +0 -0
  112. package/Sidenav/styles/index.css +21 -108
  113. package/Sidenav/styles/mixin.less +0 -0
  114. package/Slider/styles/index.css +20 -144
  115. package/Stack/styles/index.css +7 -6
  116. package/Stack/styles/index.less +0 -0
  117. package/Stat/styles/index.css +37 -263
  118. package/Steps/styles/index.css +14 -46
  119. package/Table/styles/index.css +21 -70
  120. package/Table/styles/mixin.less +0 -0
  121. package/Tabs/styles/index.css +51 -259
  122. package/Tag/styles/index.css +36 -36
  123. package/Tag/styles/index.less +6 -3
  124. package/TagGroup/styles/index.css +7 -4
  125. package/TagInput/styles/index.css +133 -578
  126. package/TagPicker/styles/index.css +133 -578
  127. package/Text/styles/index.css +8 -23
  128. package/TimePicker/styles/index.css +138 -621
  129. package/TimeRangePicker/styles/index.css +141 -637
  130. package/Timeline/styles/index.css +9 -22
  131. package/Timeline/styles/index.less +0 -3
  132. package/Timeline/styles/mixin.less +0 -0
  133. package/Toggle/styles/index.css +13 -60
  134. package/Tooltip/styles/index.css +15 -113
  135. package/Tooltip/styles/index.less +0 -0
  136. package/Tooltip/styles/mixins.less +0 -12
  137. package/Tree/styles/index.css +2737 -59
  138. package/Tree/styles/index.less +1 -1
  139. package/TreePicker/styles/index.css +2737 -59
  140. package/Uploader/styles/index.css +41 -225
  141. package/Uploader/styles/mixin.less +0 -0
  142. package/cjs/Accordion/Accordion.js +4 -3
  143. package/cjs/Affix/Affix.d.ts +1 -1
  144. package/cjs/Affix/Affix.js +55 -66
  145. package/cjs/Affix/index.js +0 -0
  146. package/cjs/Animation/Bounce.js +11 -10
  147. package/cjs/Animation/Collapse.js +41 -49
  148. package/cjs/Animation/Fade.js +13 -12
  149. package/cjs/Animation/Slide.js +14 -14
  150. package/cjs/Animation/Transition.d.ts +1 -40
  151. package/cjs/Animation/Transition.js +97 -115
  152. package/cjs/Animation/index.js +1 -1
  153. package/cjs/Animation/utils.d.ts +0 -9
  154. package/cjs/Animation/utils.js +2 -13
  155. package/cjs/AutoComplete/AutoComplete.d.ts +2 -2
  156. package/cjs/AutoComplete/AutoComplete.js +87 -128
  157. package/cjs/AutoComplete/Combobox.js +11 -10
  158. package/cjs/AutoComplete/index.js +0 -0
  159. package/cjs/AutoComplete/utils.js +7 -6
  160. package/cjs/Avatar/Avatar.js +54 -76
  161. package/cjs/Avatar/AvatarIcon.js +12 -14
  162. package/cjs/Avatar/index.js +0 -0
  163. package/cjs/Avatar/useImage.js +19 -19
  164. package/cjs/AvatarGroup/AvatarGroup.js +31 -43
  165. package/cjs/AvatarGroup/index.js +0 -0
  166. package/cjs/Badge/Badge.d.ts +40 -5
  167. package/cjs/Badge/Badge.js +48 -49
  168. package/cjs/Badge/index.js +0 -0
  169. package/cjs/Breadcrumb/Breadcrumb.js +34 -49
  170. package/cjs/Breadcrumb/BreadcrumbItem.d.ts +1 -1
  171. package/cjs/Breadcrumb/BreadcrumbItem.js +21 -34
  172. package/cjs/Breadcrumb/index.js +0 -0
  173. package/cjs/Button/Button.d.ts +5 -1
  174. package/cjs/Button/Button.js +60 -65
  175. package/cjs/Button/index.js +0 -0
  176. package/cjs/ButtonGroup/ButtonGroup.js +28 -44
  177. package/cjs/ButtonGroup/ButtonGroupContext.js +1 -1
  178. package/cjs/ButtonGroup/index.js +0 -0
  179. package/cjs/ButtonToolbar/ButtonToolbar.js +17 -23
  180. package/cjs/ButtonToolbar/index.js +0 -0
  181. package/cjs/Calendar/Calendar.js +46 -66
  182. package/cjs/Calendar/CalendarBody.js +26 -26
  183. package/cjs/Calendar/CalendarContainer.js +88 -95
  184. package/cjs/Calendar/CalendarHeader.js +50 -50
  185. package/cjs/Calendar/CalendarProvider.js +2 -2
  186. package/cjs/Calendar/Grid/Grid.js +22 -25
  187. package/cjs/Calendar/Grid/GridCell.js +39 -37
  188. package/cjs/Calendar/Grid/GridHeaderRow.js +27 -29
  189. package/cjs/Calendar/Grid/GridRow.js +48 -53
  190. package/cjs/Calendar/MonthDropdown/MonthDropdown.js +62 -63
  191. package/cjs/Calendar/MonthDropdown/MonthDropdownItem.js +36 -39
  192. package/cjs/Calendar/TimeDropdown/TimeColumn.js +7 -7
  193. package/cjs/Calendar/TimeDropdown/TimeDropdown.js +64 -64
  194. package/cjs/Calendar/TimeDropdown/utils/formatWithLeadingZero.js +3 -2
  195. package/cjs/Calendar/TimeDropdown/utils/getClockTime.js +7 -5
  196. package/cjs/Calendar/TimeDropdown/utils/getTimeLimits.js +3 -3
  197. package/cjs/Calendar/TimeDropdown/utils/scrollToTime.js +6 -7
  198. package/cjs/Calendar/hooks/useCalendar.js +3 -2
  199. package/cjs/Calendar/hooks/useCalendarDate.d.ts +1 -1
  200. package/cjs/Calendar/hooks/useCalendarDate.js +11 -12
  201. package/cjs/Calendar/hooks/useCalendarState.js +18 -19
  202. package/cjs/Calendar/utils/isEveryDateInMonth.js +2 -2
  203. package/cjs/Card/Card.js +30 -39
  204. package/cjs/Card/CardBody.d.ts +1 -1
  205. package/cjs/Card/CardBody.js +1 -1
  206. package/cjs/Card/CardFooter.d.ts +1 -1
  207. package/cjs/Card/CardFooter.js +1 -1
  208. package/cjs/Card/CardHeader.d.ts +1 -1
  209. package/cjs/Card/CardHeader.js +1 -1
  210. package/cjs/CardGroup/CardGroup.js +24 -28
  211. package/cjs/Carousel/Carousel.js +75 -97
  212. package/cjs/Carousel/index.js +0 -0
  213. package/cjs/CascadeTree/CascadeTree.d.ts +0 -1
  214. package/cjs/CascadeTree/CascadeTree.js +93 -105
  215. package/cjs/CascadeTree/SearchView.js +49 -54
  216. package/cjs/CascadeTree/TreeView.js +84 -92
  217. package/cjs/CascadeTree/hooks/usePaths.js +18 -19
  218. package/cjs/CascadeTree/hooks/useSearch.js +22 -22
  219. package/cjs/CascadeTree/hooks/useSelect.js +26 -24
  220. package/cjs/CascadeTree/utils.js +10 -8
  221. package/cjs/Cascader/Cascader.d.ts +0 -1
  222. package/cjs/Cascader/Cascader.js +203 -239
  223. package/cjs/Cascader/index.js +0 -0
  224. package/cjs/Cascader/useActive.js +15 -15
  225. package/cjs/CheckPicker/CheckPicker.d.ts +0 -1
  226. package/cjs/CheckPicker/CheckPicker.js +146 -200
  227. package/cjs/CheckPicker/index.js +0 -0
  228. package/cjs/CheckTree/CheckTree.js +72 -77
  229. package/cjs/CheckTree/CheckTreeNode.js +53 -51
  230. package/cjs/CheckTree/CheckTreeView.js +178 -185
  231. package/cjs/CheckTree/hooks/useTreeCheckState.js +26 -25
  232. package/cjs/CheckTree/hooks/useTreeNodeProps.js +40 -37
  233. package/cjs/CheckTree/hooks/useTreeValue.js +6 -7
  234. package/cjs/CheckTree/utils.js +62 -65
  235. package/cjs/CheckTreePicker/CheckTreePicker.js +175 -190
  236. package/cjs/CheckTreePicker/hooks/useFocusState.js +13 -15
  237. package/cjs/CheckTreePicker/index.js +0 -0
  238. package/cjs/Checkbox/Checkbox.js +65 -102
  239. package/cjs/Checkbox/index.js +0 -0
  240. package/cjs/CheckboxGroup/CheckboxGroup.js +40 -62
  241. package/cjs/CheckboxGroup/CheckboxGroupContext.js +1 -1
  242. package/cjs/CheckboxGroup/index.js +0 -0
  243. package/cjs/Col/Col.js +32 -66
  244. package/cjs/Col/index.js +0 -0
  245. package/cjs/Container/Container.d.ts +1 -1
  246. package/cjs/Container/Container.js +22 -32
  247. package/cjs/Container/index.js +0 -0
  248. package/cjs/Content/Content.d.ts +1 -1
  249. package/cjs/Content/Content.js +1 -1
  250. package/cjs/Content/index.js +0 -0
  251. package/cjs/CustomProvider/CustomProvider.d.ts +19 -17
  252. package/cjs/CustomProvider/CustomProvider.js +48 -56
  253. package/cjs/CustomProvider/FormattedDate.js +8 -5
  254. package/cjs/CustomProvider/FormattedNumber.js +10 -9
  255. package/cjs/CustomProvider/index.js +1 -1
  256. package/cjs/CustomProvider/useCustom.js +44 -47
  257. package/cjs/DOMHelper/index.js +4 -4
  258. package/cjs/DOMHelper/isElement.js +1 -1
  259. package/cjs/DateInput/DateField.js +106 -105
  260. package/cjs/DateInput/DateInput.js +124 -139
  261. package/cjs/DateInput/hooks/useDateInputState.js +55 -49
  262. package/cjs/DateInput/hooks/useFieldCursor.js +16 -16
  263. package/cjs/DateInput/hooks/useIsFocused.js +9 -9
  264. package/cjs/DateInput/hooks/useKeyboardInputEvent.js +10 -7
  265. package/cjs/DateInput/hooks/useSelectedState.js +4 -6
  266. package/cjs/DateInput/utils.d.ts +1 -1
  267. package/cjs/DateInput/utils.js +76 -72
  268. package/cjs/DatePicker/DatePicker.js +190 -225
  269. package/cjs/DatePicker/PredefinedRanges.js +24 -29
  270. package/cjs/DatePicker/Toolbar.d.ts +1 -1
  271. package/cjs/DatePicker/Toolbar.js +28 -26
  272. package/cjs/DatePicker/hooks/useCustomizedInput.d.ts +1 -1
  273. package/cjs/DatePicker/hooks/useCustomizedInput.js +21 -26
  274. package/cjs/DatePicker/hooks/useFocus.js +45 -39
  275. package/cjs/DatePicker/hooks/useMonthView.js +8 -8
  276. package/cjs/DatePicker/utils.d.ts +0 -7
  277. package/cjs/DatePicker/utils.js +29 -36
  278. package/cjs/DateRangeInput/DateRangeInput.js +131 -152
  279. package/cjs/DateRangeInput/utils.js +50 -50
  280. package/cjs/DateRangePicker/Calendar.js +24 -29
  281. package/cjs/DateRangePicker/DateRangePicker.js +260 -323
  282. package/cjs/DateRangePicker/DateRangePickerProvider.js +5 -4
  283. package/cjs/DateRangePicker/Header.js +20 -23
  284. package/cjs/DateRangePicker/disabledDateUtils.js +17 -35
  285. package/cjs/DateRangePicker/hooks/useCalendarHandlers.js +14 -14
  286. package/cjs/DateRangePicker/hooks/useDateDisabled.js +10 -6
  287. package/cjs/DateRangePicker/hooks/useDateRangePicker.js +3 -2
  288. package/cjs/DateRangePicker/index.js +2 -2
  289. package/cjs/DateRangePicker/utils.js +24 -20
  290. package/cjs/Divider/Divider.js +18 -26
  291. package/cjs/Divider/index.js +0 -0
  292. package/cjs/Drawer/Drawer.d.ts +2 -2
  293. package/cjs/Drawer/Drawer.js +19 -29
  294. package/cjs/Drawer/DrawerActions.d.ts +1 -1
  295. package/cjs/Drawer/DrawerActions.js +1 -1
  296. package/cjs/Drawer/DrawerBody.js +1 -1
  297. package/cjs/Drawer/DrawerFooter.js +1 -1
  298. package/cjs/Drawer/DrawerHeader.js +1 -1
  299. package/cjs/Drawer/DrawerTitle.js +1 -1
  300. package/cjs/Drawer/index.js +0 -0
  301. package/cjs/Dropdown/Dropdown.d.ts +3 -3
  302. package/cjs/Dropdown/Dropdown.js +74 -106
  303. package/cjs/Dropdown/DropdownContext.d.ts +1 -1
  304. package/cjs/Dropdown/DropdownContext.js +1 -1
  305. package/cjs/Dropdown/DropdownItem.js +54 -73
  306. package/cjs/Dropdown/DropdownMenu.d.ts +2 -2
  307. package/cjs/Dropdown/DropdownMenu.js +79 -97
  308. package/cjs/Dropdown/DropdownSeparator.js +11 -16
  309. package/cjs/Dropdown/DropdownState.js +22 -23
  310. package/cjs/Dropdown/DropdownToggle.d.ts +2 -2
  311. package/cjs/Dropdown/DropdownToggle.js +20 -34
  312. package/cjs/Dropdown/index.js +0 -0
  313. package/cjs/Dropdown/useRenderDropdownItem.js +2 -2
  314. package/cjs/FlexboxGrid/FlexboxGrid.js +17 -27
  315. package/cjs/FlexboxGrid/FlexboxGridItem.js +17 -26
  316. package/cjs/FlexboxGrid/index.js +0 -0
  317. package/cjs/Footer/Footer.d.ts +1 -1
  318. package/cjs/Footer/Footer.js +1 -1
  319. package/cjs/Footer/index.js +0 -0
  320. package/cjs/Form/Form.js +108 -133
  321. package/cjs/Form/FormContext.js +5 -5
  322. package/cjs/Form/hooks/useFormClassNames.js +15 -14
  323. package/cjs/Form/hooks/useFormRef.js +9 -8
  324. package/cjs/Form/hooks/useFormValidate.js +77 -77
  325. package/cjs/Form/hooks/useFormValue.js +22 -19
  326. package/cjs/Form/hooks/useSchemaModel.js +31 -33
  327. package/cjs/FormControl/FormControl.d.ts +3 -3
  328. package/cjs/FormControl/FormControl.js +83 -97
  329. package/cjs/FormControl/hooks/useField.js +23 -18
  330. package/cjs/FormControl/hooks/useRegisterModel.js +7 -6
  331. package/cjs/FormControl/index.js +0 -0
  332. package/cjs/FormControlLabel/FormControlLabel.js +21 -28
  333. package/cjs/FormControlLabel/index.js +0 -0
  334. package/cjs/FormErrorMessage/FormErrorMessage.d.ts +2 -2
  335. package/cjs/FormErrorMessage/FormErrorMessage.js +24 -34
  336. package/cjs/FormErrorMessage/index.js +0 -0
  337. package/cjs/FormGroup/FormGroup.js +33 -40
  338. package/cjs/FormGroup/index.js +1 -1
  339. package/cjs/FormHelpText/FormHelpText.js +22 -29
  340. package/cjs/FormHelpText/index.js +0 -0
  341. package/cjs/Grid/Grid.js +18 -25
  342. package/cjs/Grid/index.js +0 -0
  343. package/cjs/Header/Header.d.ts +1 -1
  344. package/cjs/Header/Header.js +1 -1
  345. package/cjs/Header/index.js +0 -0
  346. package/cjs/Heading/Heading.js +17 -24
  347. package/cjs/HeadingGroup/HeadingGroup.d.ts +1 -1
  348. package/cjs/HeadingGroup/HeadingGroup.js +1 -1
  349. package/cjs/Highlight/Highlight.js +21 -28
  350. package/cjs/Highlight/utils/highlightText.js +10 -10
  351. package/cjs/IconButton/IconButton.js +19 -29
  352. package/cjs/IconButton/index.js +0 -0
  353. package/cjs/Image/Image.js +61 -68
  354. package/cjs/Image/ImageWrapper.d.ts +1 -1
  355. package/cjs/Image/ImageWrapper.js +1 -1
  356. package/cjs/Image/hooks/useImage.js +26 -29
  357. package/cjs/InlineEdit/EditableControls.js +6 -6
  358. package/cjs/InlineEdit/InlineEdit.d.ts +3 -3
  359. package/cjs/InlineEdit/InlineEdit.js +54 -72
  360. package/cjs/InlineEdit/renderChildren.js +19 -20
  361. package/cjs/InlineEdit/useEditState.js +23 -30
  362. package/cjs/InlineEdit/useFocusEvent.js +17 -15
  363. package/cjs/Input/Input.js +41 -60
  364. package/cjs/Input/index.js +0 -0
  365. package/cjs/InputGroup/InputGroup.js +34 -48
  366. package/cjs/InputGroup/InputGroupAddon.js +14 -21
  367. package/cjs/InputGroup/InputGroupButton.js +14 -13
  368. package/cjs/InputGroup/index.js +0 -0
  369. package/cjs/InputNumber/InputNumber.js +73 -107
  370. package/cjs/InputNumber/index.js +0 -0
  371. package/cjs/InputPicker/InputAutosize.js +49 -66
  372. package/cjs/InputPicker/InputPicker.js +246 -295
  373. package/cjs/InputPicker/InputPickerContext.js +2 -2
  374. package/cjs/InputPicker/InputSearch.js +21 -24
  375. package/cjs/InputPicker/TagList.js +15 -14
  376. package/cjs/InputPicker/TextBox.js +21 -21
  377. package/cjs/InputPicker/hooks/useData.js +14 -18
  378. package/cjs/InputPicker/hooks/useInput.js +15 -13
  379. package/cjs/InputPicker/hooks/useMaxWidth.js +2 -5
  380. package/cjs/InputPicker/utils.js +3 -2
  381. package/cjs/List/List.js +55 -79
  382. package/cjs/List/ListContext.js +4 -6
  383. package/cjs/List/ListItem.js +39 -46
  384. package/cjs/List/helper/AutoScroller.js +35 -35
  385. package/cjs/List/helper/useManager.js +14 -18
  386. package/cjs/List/helper/useSortHelper.js +88 -101
  387. package/cjs/List/helper/utils.js +11 -16
  388. package/cjs/List/index.js +0 -0
  389. package/cjs/Loader/Loader.js +27 -42
  390. package/cjs/Loader/index.js +0 -0
  391. package/cjs/MaskedInput/MaskedInput.js +8 -5
  392. package/cjs/MaskedInput/TextMask.js +29 -43
  393. package/cjs/MaskedInput/adjustCaretPosition.js +64 -82
  394. package/cjs/MaskedInput/conformToMask.js +52 -56
  395. package/cjs/MaskedInput/createTextMaskInputElement.js +62 -58
  396. package/cjs/MaskedInput/index.js +0 -0
  397. package/cjs/MaskedInput/types.js +0 -0
  398. package/cjs/MaskedInput/utilities.js +8 -8
  399. package/cjs/Message/Message.js +51 -71
  400. package/cjs/Message/index.js +0 -0
  401. package/cjs/Modal/Modal.js +91 -118
  402. package/cjs/Modal/ModalBody.js +28 -31
  403. package/cjs/Modal/ModalContext.js +1 -1
  404. package/cjs/Modal/ModalDialog.d.ts +0 -10
  405. package/cjs/Modal/ModalDialog.js +25 -40
  406. package/cjs/Modal/ModalFooter.d.ts +1 -1
  407. package/cjs/Modal/ModalFooter.js +1 -1
  408. package/cjs/Modal/ModalHeader.js +23 -32
  409. package/cjs/Modal/ModalTitle.js +16 -24
  410. package/cjs/Modal/utils.js +28 -30
  411. package/cjs/MultiCascadeTree/MultiCascadeTree.js +76 -80
  412. package/cjs/MultiCascadeTree/SearchView.js +53 -58
  413. package/cjs/MultiCascadeTree/TreeView.js +84 -99
  414. package/cjs/MultiCascadeTree/hooks/useCascadeValue.js +68 -100
  415. package/cjs/MultiCascadeTree/hooks/useColumnData.js +10 -16
  416. package/cjs/MultiCascadeTree/hooks/useFlattenData.js +10 -10
  417. package/cjs/MultiCascadeTree/hooks/useSearch.js +17 -19
  418. package/cjs/MultiCascadeTree/hooks/useSelect.js +39 -37
  419. package/cjs/MultiCascadeTree/utils.js +44 -42
  420. package/cjs/MultiCascader/MultiCascader.js +190 -224
  421. package/cjs/MultiCascader/index.js +0 -0
  422. package/cjs/Nav/AdaptiveNavItem.js +12 -13
  423. package/cjs/Nav/Nav.js +52 -73
  424. package/cjs/Nav/NavContext.js +1 -1
  425. package/cjs/Nav/NavDropdown.d.ts +3 -3
  426. package/cjs/Nav/NavDropdown.js +63 -93
  427. package/cjs/Nav/NavDropdownItem.js +56 -72
  428. package/cjs/Nav/NavDropdownMenu.d.ts +1 -1
  429. package/cjs/Nav/NavDropdownMenu.js +67 -81
  430. package/cjs/Nav/NavDropdownToggle.d.ts +2 -2
  431. package/cjs/Nav/NavDropdownToggle.js +19 -30
  432. package/cjs/Nav/NavItem.js +34 -49
  433. package/cjs/Nav/NavMenu.js +18 -20
  434. package/cjs/Nav/index.js +0 -0
  435. package/cjs/Navbar/Navbar.js +17 -18
  436. package/cjs/Navbar/NavbarBody.d.ts +1 -1
  437. package/cjs/Navbar/NavbarBody.js +1 -1
  438. package/cjs/Navbar/NavbarBrand.d.ts +1 -1
  439. package/cjs/Navbar/NavbarBrand.js +1 -1
  440. package/cjs/Navbar/NavbarDropdown.d.ts +3 -3
  441. package/cjs/Navbar/NavbarDropdown.js +52 -79
  442. package/cjs/Navbar/NavbarDropdownItem.js +50 -72
  443. package/cjs/Navbar/NavbarDropdownMenu.d.ts +1 -1
  444. package/cjs/Navbar/NavbarDropdownMenu.js +60 -76
  445. package/cjs/Navbar/NavbarDropdownToggle.d.ts +2 -2
  446. package/cjs/Navbar/NavbarDropdownToggle.js +18 -30
  447. package/cjs/Navbar/NavbarHeader.d.ts +1 -1
  448. package/cjs/Navbar/NavbarHeader.js +1 -1
  449. package/cjs/Navbar/NavbarItem.js +31 -45
  450. package/cjs/Navbar/index.js +1 -1
  451. package/cjs/Notification/Notification.d.ts +4 -3
  452. package/cjs/Notification/Notification.js +40 -56
  453. package/cjs/Notification/index.js +0 -0
  454. package/cjs/Pagination/LimitPicker.js +16 -18
  455. package/cjs/Pagination/Pagination.js +58 -81
  456. package/cjs/Pagination/PaginationButton.js +23 -24
  457. package/cjs/Pagination/PaginationGroup.js +44 -60
  458. package/cjs/Pagination/index.js +0 -0
  459. package/cjs/Panel/AccordionButton.js +17 -20
  460. package/cjs/Panel/Panel.js +56 -81
  461. package/cjs/Panel/PanelBody.js +35 -34
  462. package/cjs/Panel/PanelHeader.js +24 -25
  463. package/cjs/Panel/hooks/useExpanded.js +14 -13
  464. package/cjs/Panel/index.js +0 -0
  465. package/cjs/PanelGroup/PanelGroup.js +32 -47
  466. package/cjs/PanelGroup/index.js +1 -1
  467. package/cjs/Placeholder/Placeholder.js +1 -1
  468. package/cjs/Placeholder/PlaceholderGraph.js +24 -33
  469. package/cjs/Placeholder/PlaceholderGrid.js +49 -60
  470. package/cjs/Placeholder/PlaceholderParagraph.js +31 -48
  471. package/cjs/Placeholder/index.js +0 -0
  472. package/cjs/Popover/Popover.js +30 -44
  473. package/cjs/Popover/index.js +0 -0
  474. package/cjs/Progress/Progress.js +1 -1
  475. package/cjs/Progress/ProgressCircle.js +55 -76
  476. package/cjs/Progress/ProgressLine.js +39 -50
  477. package/cjs/Progress/index.js +0 -0
  478. package/cjs/Radio/Radio.js +56 -85
  479. package/cjs/Radio/index.js +0 -0
  480. package/cjs/RadioGroup/RadioGroup.js +40 -60
  481. package/cjs/RadioGroup/index.js +0 -0
  482. package/cjs/RadioTile/RadioTile.js +43 -62
  483. package/cjs/RadioTileGroup/RadioTileGroup.js +32 -47
  484. package/cjs/RangeSlider/RangeSlider.js +116 -141
  485. package/cjs/RangeSlider/index.js +0 -0
  486. package/cjs/Rate/Character.js +33 -46
  487. package/cjs/Rate/Rate.d.ts +4 -4
  488. package/cjs/Rate/Rate.js +72 -105
  489. package/cjs/Rate/index.js +0 -0
  490. package/cjs/Rate/utils.js +8 -8
  491. package/cjs/Row/Row.js +32 -40
  492. package/cjs/Row/index.js +0 -0
  493. package/cjs/SafeAnchor/SafeAnchor.js +14 -20
  494. package/cjs/SafeAnchor/index.js +0 -0
  495. package/cjs/Schema/Schema.js +1 -1
  496. package/cjs/Schema/index.js +0 -0
  497. package/cjs/SelectPicker/SelectPicker.d.ts +0 -1
  498. package/cjs/SelectPicker/SelectPicker.js +131 -169
  499. package/cjs/SelectPicker/index.js +0 -0
  500. package/cjs/Sidebar/Sidebar.js +28 -35
  501. package/cjs/Sidebar/index.js +0 -0
  502. package/cjs/Sidenav/ExpandedSidenavDropdown.d.ts +3 -3
  503. package/cjs/Sidenav/ExpandedSidenavDropdown.js +70 -96
  504. package/cjs/Sidenav/ExpandedSidenavDropdownItem.js +51 -74
  505. package/cjs/Sidenav/ExpandedSidenavDropdownMenu.js +48 -65
  506. package/cjs/Sidenav/Node.js +26 -37
  507. package/cjs/Sidenav/Sidenav.js +43 -65
  508. package/cjs/Sidenav/SidenavBody.d.ts +1 -1
  509. package/cjs/Sidenav/SidenavBody.js +1 -1
  510. package/cjs/Sidenav/SidenavDropdown.d.ts +3 -3
  511. package/cjs/Sidenav/SidenavDropdown.js +81 -111
  512. package/cjs/Sidenav/SidenavDropdownCollapse.js +22 -30
  513. package/cjs/Sidenav/SidenavDropdownItem.d.ts +1 -1
  514. package/cjs/Sidenav/SidenavDropdownItem.js +57 -75
  515. package/cjs/Sidenav/SidenavDropdownMenu.d.ts +1 -1
  516. package/cjs/Sidenav/SidenavDropdownMenu.js +67 -78
  517. package/cjs/Sidenav/SidenavDropdownToggle.d.ts +2 -2
  518. package/cjs/Sidenav/SidenavDropdownToggle.js +17 -29
  519. package/cjs/Sidenav/SidenavHeader.d.ts +1 -1
  520. package/cjs/Sidenav/SidenavHeader.js +1 -1
  521. package/cjs/Sidenav/SidenavItem.js +64 -82
  522. package/cjs/Sidenav/SidenavToggle.js +20 -29
  523. package/cjs/Sidenav/index.js +0 -0
  524. package/cjs/Slider/Graduated.js +28 -37
  525. package/cjs/Slider/Handle.js +52 -68
  526. package/cjs/Slider/Input.js +10 -7
  527. package/cjs/Slider/Mark.js +16 -24
  528. package/cjs/Slider/ProgressBar.js +24 -34
  529. package/cjs/Slider/Slider.d.ts +0 -26
  530. package/cjs/Slider/Slider.js +77 -118
  531. package/cjs/Slider/index.js +0 -0
  532. package/cjs/Slider/useDrag.js +29 -29
  533. package/cjs/Slider/utils.js +3 -4
  534. package/cjs/Stack/HStack.js +8 -10
  535. package/cjs/Stack/Stack.js +37 -58
  536. package/cjs/Stack/StackItem.d.ts +0 -11
  537. package/cjs/Stack/StackItem.js +25 -36
  538. package/cjs/Stack/VStack.js +9 -12
  539. package/cjs/Stat/Stat.js +20 -25
  540. package/cjs/Stat/StatHelpText.d.ts +1 -1
  541. package/cjs/Stat/StatHelpText.js +1 -1
  542. package/cjs/Stat/StatLabel.js +16 -22
  543. package/cjs/Stat/StatTrend.js +20 -28
  544. package/cjs/Stat/StatValue.js +15 -21
  545. package/cjs/Stat/StatValueUnit.d.ts +1 -1
  546. package/cjs/Stat/StatValueUnit.js +1 -1
  547. package/cjs/StatGroup/StatGroup.js +24 -28
  548. package/cjs/Steps/StepItem.js +31 -43
  549. package/cjs/Steps/Steps.js +33 -45
  550. package/cjs/Steps/index.js +0 -0
  551. package/cjs/Table/Table.js +13 -13
  552. package/cjs/Tabs/Tab.js +1 -9
  553. package/cjs/Tabs/TabPanel.js +13 -14
  554. package/cjs/Tabs/Tabs.js +85 -101
  555. package/cjs/Tag/Tag.d.ts +2 -2
  556. package/cjs/Tag/Tag.js +39 -45
  557. package/cjs/Tag/index.js +0 -0
  558. package/cjs/TagGroup/TagGroup.d.ts +1 -1
  559. package/cjs/TagGroup/TagGroup.js +1 -1
  560. package/cjs/TagGroup/index.js +0 -0
  561. package/cjs/TagInput/index.js +24 -31
  562. package/cjs/TagPicker/index.js +19 -22
  563. package/cjs/Text/Text.js +32 -43
  564. package/cjs/TimePicker/TimePicker.js +11 -14
  565. package/cjs/TimeRangePicker/TimeRangePicker.js +9 -7
  566. package/cjs/Timeline/Timeline.js +33 -48
  567. package/cjs/Timeline/TimelineItem.js +18 -28
  568. package/cjs/Timeline/index.js +0 -0
  569. package/cjs/Toggle/Toggle.js +45 -70
  570. package/cjs/Toggle/index.js +0 -0
  571. package/cjs/Tooltip/Tooltip.d.ts +2 -2
  572. package/cjs/Tooltip/Tooltip.js +24 -33
  573. package/cjs/Tooltip/index.js +0 -0
  574. package/cjs/Tree/IndentLine.js +4 -3
  575. package/cjs/Tree/Tree.js +63 -66
  576. package/cjs/Tree/TreeNode.js +62 -61
  577. package/cjs/Tree/TreeNodeToggle.js +19 -16
  578. package/cjs/Tree/TreeView.js +175 -186
  579. package/cjs/Tree/hooks/useExpandTree.js +33 -38
  580. package/cjs/Tree/hooks/useFlattenTree.js +31 -34
  581. package/cjs/Tree/hooks/useFocusTree.d.ts +1 -1
  582. package/cjs/Tree/hooks/useFocusTree.js +77 -81
  583. package/cjs/Tree/hooks/useForceUpdate.js +2 -3
  584. package/cjs/Tree/hooks/useTreeDrag.js +86 -86
  585. package/cjs/Tree/hooks/useTreeNodeProps.js +52 -48
  586. package/cjs/Tree/hooks/useTreeNodeRefs.d.ts +1 -1
  587. package/cjs/Tree/hooks/useTreeNodeRefs.js +3 -3
  588. package/cjs/Tree/hooks/useTreeSearch.js +33 -39
  589. package/cjs/Tree/hooks/useTreeWithChildren.js +21 -35
  590. package/cjs/Tree/hooks/useVirtualizedTreeData.js +25 -22
  591. package/cjs/Tree/index.js +0 -0
  592. package/cjs/Tree/types.js +1 -1
  593. package/cjs/Tree/utils/flattenTree.js +16 -24
  594. package/cjs/Tree/utils/focusableTree.js +66 -59
  595. package/cjs/Tree/utils/formatNodeRefKey.js +1 -1
  596. package/cjs/Tree/utils/getExpandItemValues.js +7 -5
  597. package/cjs/Tree/utils/getNodeParentKeys.js +4 -4
  598. package/cjs/Tree/utils/getTreeActiveNode.js +2 -2
  599. package/cjs/Tree/utils/hasVisibleChildren.js +1 -3
  600. package/cjs/Tree/utils/indentTreeNode.js +7 -5
  601. package/cjs/Tree/utils/treeKeyboardInteractions.js +13 -9
  602. package/cjs/TreePicker/TreePicker.js +172 -182
  603. package/cjs/TreePicker/hooks/useFocusState.js +17 -19
  604. package/cjs/TreePicker/index.js +0 -0
  605. package/cjs/Uploader/UploadFileItem.js +70 -92
  606. package/cjs/Uploader/UploadTrigger.js +52 -90
  607. package/cjs/Uploader/Uploader.js +156 -216
  608. package/cjs/Uploader/index.js +0 -0
  609. package/cjs/Uploader/utils/ajaxUpload.js +27 -28
  610. package/cjs/Uploader/utils/previewFile.js +3 -3
  611. package/cjs/VisuallyHidden/VisuallyHidden.d.ts +1 -1
  612. package/cjs/VisuallyHidden/VisuallyHidden.js +1 -1
  613. package/cjs/Whisper/Whisper.js +14 -32
  614. package/cjs/Whisper/index.js +0 -0
  615. package/cjs/index.js +1 -1
  616. package/cjs/internals/CloseButton/CloseButton.js +19 -18
  617. package/cjs/internals/Disclosure/Disclosure.js +42 -42
  618. package/cjs/internals/Disclosure/DisclosureButton.js +16 -13
  619. package/cjs/internals/Disclosure/DisclosureContent.js +9 -5
  620. package/cjs/internals/Disclosure/DisclosureContext.js +2 -2
  621. package/cjs/internals/Disclosure/useDisclosureContext.js +2 -2
  622. package/cjs/internals/Menu/Menu.d.ts +1 -5
  623. package/cjs/internals/Menu/Menu.js +80 -80
  624. package/cjs/internals/Menu/MenuContext.js +3 -3
  625. package/cjs/internals/Menu/MenuItem.d.ts +0 -7
  626. package/cjs/internals/Menu/MenuItem.js +22 -30
  627. package/cjs/internals/Menu/Menubar.js +25 -25
  628. package/cjs/internals/Menu/useMenu.js +75 -69
  629. package/cjs/internals/Overlay/Modal.d.ts +6 -20
  630. package/cjs/internals/Overlay/Modal.js +78 -117
  631. package/cjs/internals/Overlay/ModalManager.js +22 -28
  632. package/cjs/internals/Overlay/Overlay.d.ts +2 -23
  633. package/cjs/internals/Overlay/Overlay.js +57 -76
  634. package/cjs/internals/Overlay/OverlayContext.js +1 -1
  635. package/cjs/internals/Overlay/OverlayTrigger.d.ts +2 -2
  636. package/cjs/internals/Overlay/OverlayTrigger.js +139 -152
  637. package/cjs/internals/Overlay/Position.d.ts +2 -2
  638. package/cjs/internals/Overlay/Position.js +63 -86
  639. package/cjs/internals/Overlay/positionUtils.d.ts +2 -2
  640. package/cjs/internals/Overlay/positionUtils.js +114 -107
  641. package/cjs/internals/Picker/ListCheckItem.js +44 -49
  642. package/cjs/internals/Picker/ListItem.js +32 -35
  643. package/cjs/internals/Picker/ListItemGroup.js +16 -19
  644. package/cjs/internals/Picker/Listbox.d.ts +1 -1
  645. package/cjs/internals/Picker/Listbox.js +99 -119
  646. package/cjs/internals/Picker/PickerIndicator.js +21 -17
  647. package/cjs/internals/Picker/PickerLabel.js +7 -8
  648. package/cjs/internals/Picker/PickerPopup.js +26 -30
  649. package/cjs/internals/Picker/PickerToggle.d.ts +2 -2
  650. package/cjs/internals/Picker/PickerToggle.js +50 -57
  651. package/cjs/internals/Picker/PickerToggleTrigger.d.ts +2 -2
  652. package/cjs/internals/Picker/PickerToggleTrigger.js +21 -22
  653. package/cjs/internals/Picker/SelectedElement.js +19 -18
  654. package/cjs/internals/Picker/ToggleButton.js +1 -1
  655. package/cjs/internals/Picker/hooks/useCombobox.js +10 -9
  656. package/cjs/internals/Picker/hooks/useFocusItemValue.js +92 -98
  657. package/cjs/internals/Picker/hooks/usePickerClassName.d.ts +2 -2
  658. package/cjs/internals/Picker/hooks/usePickerClassName.js +30 -21
  659. package/cjs/internals/Picker/hooks/usePickerRef.js +23 -19
  660. package/cjs/internals/Picker/hooks/useSearch.js +19 -23
  661. package/cjs/internals/Picker/hooks/useToggleKeyDownEvent.js +21 -20
  662. package/cjs/internals/Picker/index.d.ts +0 -1
  663. package/cjs/internals/Picker/index.js +1 -8
  664. package/cjs/internals/Picker/utils.js +19 -18
  665. package/cjs/internals/Plaintext/Plaintext.js +18 -20
  666. package/cjs/internals/Ripple/Ripple.js +42 -51
  667. package/cjs/internals/ScrollView/ScrollView.js +31 -30
  668. package/cjs/internals/ScrollView/hooks/useScrollState.d.ts +1 -1
  669. package/cjs/internals/ScrollView/hooks/useScrollState.js +16 -18
  670. package/cjs/internals/SearchBox/SearchBox.js +19 -22
  671. package/cjs/internals/Tree/TreeProvider.d.ts +4 -1
  672. package/cjs/internals/Tree/TreeProvider.js +49 -37
  673. package/cjs/internals/Tree/TreeView.js +28 -25
  674. package/cjs/internals/Tree/utils/filterNodesOfTree.js +6 -6
  675. package/cjs/internals/Tree/utils/findNodeOfTree.js +5 -5
  676. package/cjs/internals/Tree/utils/getParentMap.js +10 -15
  677. package/cjs/internals/Tree/utils/getPathTowardsItem.js +2 -2
  678. package/cjs/internals/Windowing/AutoSizer.js +35 -35
  679. package/cjs/internals/Windowing/List.d.ts +1 -1
  680. package/cjs/internals/Windowing/List.js +43 -46
  681. package/cjs/internals/Windowing/index.js +1 -1
  682. package/cjs/internals/constants/index.js +12 -12
  683. package/cjs/internals/constants/statusIcons.js +2 -2
  684. package/cjs/internals/hooks/useClassNames.d.ts +1 -2
  685. package/cjs/internals/hooks/useClassNames.js +16 -26
  686. package/cjs/internals/hooks/useClickOutside.js +11 -10
  687. package/cjs/internals/hooks/useControlled.js +4 -6
  688. package/cjs/internals/hooks/useElementResize.js +4 -4
  689. package/cjs/internals/hooks/useEnsuredRef.js +1 -1
  690. package/cjs/internals/hooks/useEventCallback.js +3 -3
  691. package/cjs/internals/hooks/useEventListener.js +4 -4
  692. package/cjs/internals/hooks/useFocus.js +7 -7
  693. package/cjs/internals/hooks/useFocusVirtualListItem.js +5 -5
  694. package/cjs/internals/hooks/useInternalId.js +2 -2
  695. package/cjs/internals/hooks/useIsMounted.js +4 -6
  696. package/cjs/internals/hooks/useIsomorphicLayoutEffect.js +1 -1
  697. package/cjs/internals/hooks/useMap.js +8 -12
  698. package/cjs/internals/hooks/useMount.js +4 -3
  699. package/cjs/internals/hooks/usePortal.js +21 -25
  700. package/cjs/internals/hooks/useRootClose.js +16 -15
  701. package/cjs/internals/hooks/useTimeout.js +8 -8
  702. package/cjs/internals/hooks/useToggleCaret.d.ts +2 -2
  703. package/cjs/internals/hooks/useToggleCaret.js +5 -4
  704. package/cjs/internals/hooks/useUniqueId.js +3 -15
  705. package/cjs/internals/hooks/useUpdateEffect.js +4 -4
  706. package/cjs/internals/hooks/useUpdatedRef.js +1 -1
  707. package/cjs/internals/hooks/useWillUnmount.js +2 -8
  708. package/cjs/internals/symbols.d.ts +1 -0
  709. package/cjs/internals/symbols.js +4 -3
  710. package/cjs/internals/types/colours.d.ts +10 -0
  711. package/cjs/internals/types/colours.js +15 -0
  712. package/cjs/internals/types/index.d.ts +29 -26
  713. package/cjs/internals/types/index.js +13 -1
  714. package/cjs/internals/types/placement.d.ts +5 -0
  715. package/cjs/internals/types/placement.js +4 -0
  716. package/cjs/internals/utils/BrowserDetection.d.ts +0 -10
  717. package/cjs/internals/utils/BrowserDetection.js +5 -61
  718. package/cjs/internals/utils/ReactChildren.js +23 -27
  719. package/cjs/internals/utils/colours.d.ts +21 -0
  720. package/cjs/internals/utils/colours.js +86 -0
  721. package/cjs/internals/utils/composeFunctions.js +1 -5
  722. package/cjs/internals/utils/createChainedFunction.js +1 -3
  723. package/cjs/internals/utils/createComponent.d.ts +1 -1
  724. package/cjs/internals/utils/createComponent.js +22 -28
  725. package/cjs/internals/utils/css.d.ts +16 -0
  726. package/cjs/internals/utils/css.js +61 -0
  727. package/cjs/internals/utils/date/copyTime.js +14 -13
  728. package/cjs/internals/utils/date/disableTime.js +13 -13
  729. package/cjs/internals/utils/date/extractTimeFormat.js +1 -1
  730. package/cjs/internals/utils/date/formatCheck.js +10 -15
  731. package/cjs/internals/utils/date/getWeekKeys.js +1 -1
  732. package/cjs/internals/utils/date/getWeekStartDates.js +14 -14
  733. package/cjs/internals/utils/date/index.d.ts +46 -46
  734. package/cjs/internals/utils/date/index.js +92 -93
  735. package/cjs/internals/utils/date/omitHideDisabledProps.js +2 -5
  736. package/cjs/internals/utils/date/reverseDateRangeOmitTime.js +1 -2
  737. package/cjs/internals/utils/date/types.js +2 -2
  738. package/cjs/internals/utils/date/useDateMode.js +8 -7
  739. package/cjs/internals/utils/deprecateComponent.js +3 -3
  740. package/cjs/internals/utils/dom.js +2 -6
  741. package/cjs/internals/utils/getDOMNode.js +4 -4
  742. package/cjs/internals/utils/getDataGroupBy.js +11 -13
  743. package/cjs/internals/utils/getSafeRegExpString.js +2 -1
  744. package/cjs/internals/utils/getStringLength.js +2 -2
  745. package/cjs/internals/utils/htmlPropsUtils.js +15 -15
  746. package/cjs/internals/utils/index.d.ts +2 -0
  747. package/cjs/internals/utils/index.js +14 -0
  748. package/cjs/internals/utils/mergeRefs.js +5 -7
  749. package/cjs/internals/utils/placementPolyfill.js +1 -3
  750. package/cjs/internals/utils/prefix.js +8 -12
  751. package/cjs/internals/utils/safeSetSelection.js +2 -4
  752. package/cjs/internals/utils/shallowEqual.js +5 -5
  753. package/cjs/internals/utils/stringifyReactNode.js +6 -6
  754. package/cjs/internals/utils/tplTransform.js +4 -10
  755. package/cjs/internals/utils/warnOnce.js +3 -3
  756. package/cjs/locales/ar_EG.js +12 -12
  757. package/cjs/locales/ca_ES.d.ts +4 -4
  758. package/cjs/locales/ca_ES.js +12 -12
  759. package/cjs/locales/cs_CZ.js +12 -12
  760. package/cjs/locales/da_DK.js +12 -12
  761. package/cjs/locales/de_DE.js +12 -12
  762. package/cjs/locales/en_GB.js +12 -12
  763. package/cjs/locales/en_US.js +12 -12
  764. package/cjs/locales/es_AR.js +12 -12
  765. package/cjs/locales/es_ES.js +12 -12
  766. package/cjs/locales/fa_IR.js +12 -12
  767. package/cjs/locales/fi_FI.js +12 -12
  768. package/cjs/locales/fr_FR.js +12 -12
  769. package/cjs/locales/hu_HU.js +12 -12
  770. package/cjs/locales/it_IT.js +12 -12
  771. package/cjs/locales/ja_JP.js +12 -12
  772. package/cjs/locales/kk_KZ.js +12 -12
  773. package/cjs/locales/ko_KR.js +12 -12
  774. package/cjs/locales/ne_NP.js +12 -12
  775. package/cjs/locales/nl_NL.js +12 -12
  776. package/cjs/locales/pt_BR.js +12 -12
  777. package/cjs/locales/ru_RU.js +12 -12
  778. package/cjs/locales/sv_SE.js +12 -12
  779. package/cjs/locales/tr_TR.js +12 -12
  780. package/cjs/locales/zh_CN.js +12 -12
  781. package/cjs/locales/zh_TW.js +12 -12
  782. package/cjs/toaster/ToastContainer.d.ts +2 -2
  783. package/cjs/toaster/ToastContainer.js +106 -130
  784. package/cjs/toaster/ToastContext.js +1 -1
  785. package/cjs/toaster/hooks/useDelayedClosure.js +20 -17
  786. package/cjs/toaster/render.d.ts +0 -1
  787. package/cjs/toaster/render.js +12 -30
  788. package/cjs/toaster/toaster.js +29 -56
  789. package/cjs/useBreakpointValue/useBreakpointValue.js +7 -6
  790. package/cjs/useMediaQuery/useMediaQuery.d.ts +1 -7
  791. package/cjs/useMediaQuery/useMediaQuery.js +18 -81
  792. package/cjs/useToaster/useToaster.js +42 -43
  793. package/dist/rsuite-no-reset-rtl.css +656 -3131
  794. package/dist/rsuite-no-reset-rtl.min.css +1 -1
  795. package/dist/rsuite-no-reset-rtl.min.css.map +1 -1
  796. package/dist/rsuite-no-reset.css +656 -3131
  797. package/dist/rsuite-no-reset.min.css +1 -1
  798. package/dist/rsuite-no-reset.min.css.map +1 -1
  799. package/dist/rsuite-rtl.css +669 -3154
  800. package/dist/rsuite-rtl.min.css +1 -1
  801. package/dist/rsuite-rtl.min.css.map +1 -1
  802. package/dist/rsuite.css +669 -3154
  803. package/dist/rsuite.js +3345 -3618
  804. package/dist/rsuite.js.map +1 -1
  805. package/dist/rsuite.min.css +1 -1
  806. package/dist/rsuite.min.css.map +1 -1
  807. package/dist/rsuite.min.js +1 -1
  808. package/dist/rsuite.min.js.LICENSE.txt +0 -2
  809. package/dist/rsuite.min.js.map +1 -1
  810. package/esm/Accordion/Accordion.js +4 -3
  811. package/esm/Affix/Affix.d.ts +1 -1
  812. package/esm/Affix/Affix.js +54 -65
  813. package/esm/Affix/index.js +0 -0
  814. package/esm/Animation/Bounce.js +11 -10
  815. package/esm/Animation/Collapse.js +40 -48
  816. package/esm/Animation/Fade.js +13 -12
  817. package/esm/Animation/Slide.js +14 -14
  818. package/esm/Animation/Transition.d.ts +1 -40
  819. package/esm/Animation/Transition.js +97 -115
  820. package/esm/Animation/index.js +6 -6
  821. package/esm/Animation/utils.d.ts +0 -9
  822. package/esm/Animation/utils.js +2 -11
  823. package/esm/AutoComplete/AutoComplete.d.ts +2 -2
  824. package/esm/AutoComplete/AutoComplete.js +85 -126
  825. package/esm/AutoComplete/Combobox.js +11 -10
  826. package/esm/AutoComplete/index.js +0 -0
  827. package/esm/AutoComplete/utils.js +5 -5
  828. package/esm/Avatar/Avatar.js +50 -72
  829. package/esm/Avatar/AvatarIcon.js +12 -14
  830. package/esm/Avatar/index.js +0 -0
  831. package/esm/Avatar/useImage.js +19 -19
  832. package/esm/AvatarGroup/AvatarGroup.js +30 -42
  833. package/esm/AvatarGroup/index.js +0 -0
  834. package/esm/Badge/Badge.d.ts +40 -5
  835. package/esm/Badge/Badge.js +46 -49
  836. package/esm/Badge/index.js +0 -0
  837. package/esm/Breadcrumb/Breadcrumb.js +33 -48
  838. package/esm/Breadcrumb/BreadcrumbItem.d.ts +1 -1
  839. package/esm/Breadcrumb/BreadcrumbItem.js +21 -34
  840. package/esm/Breadcrumb/index.js +0 -0
  841. package/esm/Button/Button.d.ts +5 -1
  842. package/esm/Button/Button.js +60 -65
  843. package/esm/Button/index.js +0 -0
  844. package/esm/ButtonGroup/ButtonGroup.js +27 -43
  845. package/esm/ButtonGroup/ButtonGroupContext.js +1 -1
  846. package/esm/ButtonGroup/index.js +0 -0
  847. package/esm/ButtonToolbar/ButtonToolbar.js +17 -23
  848. package/esm/ButtonToolbar/index.js +0 -0
  849. package/esm/Calendar/Calendar.js +46 -66
  850. package/esm/Calendar/CalendarBody.js +26 -26
  851. package/esm/Calendar/CalendarContainer.js +87 -94
  852. package/esm/Calendar/CalendarHeader.js +49 -49
  853. package/esm/Calendar/CalendarProvider.js +2 -2
  854. package/esm/Calendar/Grid/Grid.js +22 -25
  855. package/esm/Calendar/Grid/GridCell.js +39 -37
  856. package/esm/Calendar/Grid/GridHeaderRow.js +27 -29
  857. package/esm/Calendar/Grid/GridRow.js +47 -52
  858. package/esm/Calendar/MonthDropdown/MonthDropdown.js +61 -62
  859. package/esm/Calendar/MonthDropdown/MonthDropdownItem.js +35 -38
  860. package/esm/Calendar/TimeDropdown/TimeColumn.js +7 -7
  861. package/esm/Calendar/TimeDropdown/TimeDropdown.js +63 -63
  862. package/esm/Calendar/TimeDropdown/utils/formatWithLeadingZero.js +1 -1
  863. package/esm/Calendar/TimeDropdown/utils/getClockTime.js +7 -5
  864. package/esm/Calendar/TimeDropdown/utils/getTimeLimits.js +3 -3
  865. package/esm/Calendar/TimeDropdown/utils/scrollToTime.js +6 -7
  866. package/esm/Calendar/hooks/useCalendar.js +1 -1
  867. package/esm/Calendar/hooks/useCalendarDate.d.ts +1 -1
  868. package/esm/Calendar/hooks/useCalendarDate.js +9 -11
  869. package/esm/Calendar/hooks/useCalendarState.js +16 -18
  870. package/esm/Calendar/utils/isEveryDateInMonth.js +2 -2
  871. package/esm/Card/Card.js +30 -39
  872. package/esm/Card/CardBody.d.ts +1 -1
  873. package/esm/Card/CardBody.js +1 -1
  874. package/esm/Card/CardFooter.d.ts +1 -1
  875. package/esm/Card/CardFooter.js +1 -1
  876. package/esm/Card/CardHeader.d.ts +1 -1
  877. package/esm/Card/CardHeader.js +1 -1
  878. package/esm/CardGroup/CardGroup.js +24 -28
  879. package/esm/Carousel/Carousel.js +72 -94
  880. package/esm/Carousel/index.js +0 -0
  881. package/esm/CascadeTree/CascadeTree.d.ts +0 -1
  882. package/esm/CascadeTree/CascadeTree.js +92 -104
  883. package/esm/CascadeTree/SearchView.js +47 -52
  884. package/esm/CascadeTree/TreeView.js +83 -91
  885. package/esm/CascadeTree/hooks/usePaths.js +18 -19
  886. package/esm/CascadeTree/hooks/useSearch.js +22 -22
  887. package/esm/CascadeTree/hooks/useSelect.js +26 -24
  888. package/esm/CascadeTree/utils.js +10 -8
  889. package/esm/Cascader/Cascader.d.ts +0 -1
  890. package/esm/Cascader/Cascader.js +202 -239
  891. package/esm/Cascader/index.js +0 -0
  892. package/esm/Cascader/useActive.js +15 -15
  893. package/esm/CheckPicker/CheckPicker.d.ts +0 -1
  894. package/esm/CheckPicker/CheckPicker.js +146 -200
  895. package/esm/CheckPicker/index.js +0 -0
  896. package/esm/CheckTree/CheckTree.js +68 -73
  897. package/esm/CheckTree/CheckTreeNode.js +52 -50
  898. package/esm/CheckTree/CheckTreeView.js +174 -181
  899. package/esm/CheckTree/hooks/useTreeCheckState.js +26 -25
  900. package/esm/CheckTree/hooks/useTreeNodeProps.js +39 -36
  901. package/esm/CheckTree/hooks/useTreeValue.js +6 -7
  902. package/esm/CheckTree/utils.js +62 -65
  903. package/esm/CheckTreePicker/CheckTreePicker.js +170 -185
  904. package/esm/CheckTreePicker/hooks/useFocusState.js +13 -15
  905. package/esm/CheckTreePicker/index.js +0 -0
  906. package/esm/Checkbox/Checkbox.js +64 -101
  907. package/esm/Checkbox/index.js +0 -0
  908. package/esm/CheckboxGroup/CheckboxGroup.js +39 -61
  909. package/esm/CheckboxGroup/CheckboxGroupContext.js +1 -1
  910. package/esm/CheckboxGroup/index.js +0 -0
  911. package/esm/Col/Col.js +32 -66
  912. package/esm/Col/index.js +0 -0
  913. package/esm/Container/Container.d.ts +1 -1
  914. package/esm/Container/Container.js +21 -31
  915. package/esm/Container/index.js +0 -0
  916. package/esm/Content/Content.d.ts +1 -1
  917. package/esm/Content/Content.js +1 -1
  918. package/esm/Content/index.js +0 -0
  919. package/esm/CustomProvider/CustomProvider.d.ts +19 -17
  920. package/esm/CustomProvider/CustomProvider.js +47 -55
  921. package/esm/CustomProvider/FormattedDate.js +7 -4
  922. package/esm/CustomProvider/FormattedNumber.js +8 -7
  923. package/esm/CustomProvider/useCustom.js +44 -47
  924. package/esm/DOMHelper/index.js +4 -4
  925. package/esm/DOMHelper/isElement.js +1 -1
  926. package/esm/DateInput/DateField.js +101 -102
  927. package/esm/DateInput/DateInput.js +119 -134
  928. package/esm/DateInput/hooks/useDateInputState.js +55 -49
  929. package/esm/DateInput/hooks/useFieldCursor.js +16 -16
  930. package/esm/DateInput/hooks/useIsFocused.js +9 -9
  931. package/esm/DateInput/hooks/useKeyboardInputEvent.js +10 -7
  932. package/esm/DateInput/hooks/useSelectedState.js +4 -6
  933. package/esm/DateInput/utils.d.ts +1 -1
  934. package/esm/DateInput/utils.js +76 -71
  935. package/esm/DatePicker/DatePicker.js +188 -223
  936. package/esm/DatePicker/PredefinedRanges.js +23 -28
  937. package/esm/DatePicker/Toolbar.d.ts +1 -1
  938. package/esm/DatePicker/Toolbar.js +28 -26
  939. package/esm/DatePicker/hooks/useCustomizedInput.d.ts +1 -1
  940. package/esm/DatePicker/hooks/useCustomizedInput.js +21 -26
  941. package/esm/DatePicker/hooks/useFocus.js +45 -39
  942. package/esm/DatePicker/hooks/useMonthView.js +8 -8
  943. package/esm/DatePicker/utils.d.ts +0 -7
  944. package/esm/DatePicker/utils.js +26 -34
  945. package/esm/DateRangeInput/DateRangeInput.js +130 -151
  946. package/esm/DateRangeInput/utils.js +50 -49
  947. package/esm/DateRangePicker/Calendar.js +23 -28
  948. package/esm/DateRangePicker/DateRangePicker.js +259 -322
  949. package/esm/DateRangePicker/DateRangePickerProvider.js +3 -3
  950. package/esm/DateRangePicker/Header.js +20 -23
  951. package/esm/DateRangePicker/disabledDateUtils.js +16 -34
  952. package/esm/DateRangePicker/hooks/useCalendarHandlers.js +14 -14
  953. package/esm/DateRangePicker/hooks/useDateDisabled.js +10 -6
  954. package/esm/DateRangePicker/hooks/useDateRangePicker.js +1 -1
  955. package/esm/DateRangePicker/index.js +1 -1
  956. package/esm/DateRangePicker/utils.js +20 -19
  957. package/esm/Divider/Divider.js +18 -26
  958. package/esm/Divider/index.js +0 -0
  959. package/esm/Drawer/Drawer.d.ts +2 -2
  960. package/esm/Drawer/Drawer.js +19 -29
  961. package/esm/Drawer/DrawerActions.d.ts +1 -1
  962. package/esm/Drawer/DrawerActions.js +1 -1
  963. package/esm/Drawer/DrawerBody.js +1 -1
  964. package/esm/Drawer/DrawerFooter.js +1 -1
  965. package/esm/Drawer/DrawerHeader.js +1 -1
  966. package/esm/Drawer/DrawerTitle.js +1 -1
  967. package/esm/Drawer/index.js +0 -0
  968. package/esm/Dropdown/Dropdown.d.ts +3 -3
  969. package/esm/Dropdown/Dropdown.js +73 -105
  970. package/esm/Dropdown/DropdownContext.d.ts +1 -1
  971. package/esm/Dropdown/DropdownContext.js +1 -1
  972. package/esm/Dropdown/DropdownItem.js +53 -72
  973. package/esm/Dropdown/DropdownMenu.d.ts +2 -2
  974. package/esm/Dropdown/DropdownMenu.js +76 -94
  975. package/esm/Dropdown/DropdownSeparator.js +11 -16
  976. package/esm/Dropdown/DropdownState.js +22 -22
  977. package/esm/Dropdown/DropdownToggle.d.ts +2 -2
  978. package/esm/Dropdown/DropdownToggle.js +20 -34
  979. package/esm/Dropdown/index.js +0 -0
  980. package/esm/Dropdown/useRenderDropdownItem.js +1 -1
  981. package/esm/FlexboxGrid/FlexboxGrid.js +17 -27
  982. package/esm/FlexboxGrid/FlexboxGridItem.js +17 -26
  983. package/esm/FlexboxGrid/index.js +0 -0
  984. package/esm/Footer/Footer.d.ts +1 -1
  985. package/esm/Footer/Footer.js +1 -1
  986. package/esm/Footer/index.js +0 -0
  987. package/esm/Form/Form.js +105 -130
  988. package/esm/Form/FormContext.js +4 -4
  989. package/esm/Form/hooks/useFormClassNames.js +15 -14
  990. package/esm/Form/hooks/useFormRef.js +9 -7
  991. package/esm/Form/hooks/useFormValidate.js +77 -77
  992. package/esm/Form/hooks/useFormValue.js +22 -19
  993. package/esm/Form/hooks/useSchemaModel.js +31 -33
  994. package/esm/FormControl/FormControl.d.ts +3 -3
  995. package/esm/FormControl/FormControl.js +81 -95
  996. package/esm/FormControl/hooks/useField.js +23 -18
  997. package/esm/FormControl/hooks/useRegisterModel.js +7 -6
  998. package/esm/FormControl/index.js +0 -0
  999. package/esm/FormControlLabel/FormControlLabel.js +21 -28
  1000. package/esm/FormControlLabel/index.js +0 -0
  1001. package/esm/FormErrorMessage/FormErrorMessage.d.ts +2 -2
  1002. package/esm/FormErrorMessage/FormErrorMessage.js +24 -34
  1003. package/esm/FormErrorMessage/index.js +0 -0
  1004. package/esm/FormGroup/FormGroup.js +31 -39
  1005. package/esm/FormHelpText/FormHelpText.js +22 -29
  1006. package/esm/FormHelpText/index.js +0 -0
  1007. package/esm/Grid/Grid.js +18 -25
  1008. package/esm/Grid/index.js +0 -0
  1009. package/esm/Header/Header.d.ts +1 -1
  1010. package/esm/Header/Header.js +1 -1
  1011. package/esm/Header/index.js +0 -0
  1012. package/esm/Heading/Heading.js +17 -24
  1013. package/esm/HeadingGroup/HeadingGroup.d.ts +1 -1
  1014. package/esm/HeadingGroup/HeadingGroup.js +1 -1
  1015. package/esm/Highlight/Highlight.js +21 -28
  1016. package/esm/Highlight/utils/highlightText.js +10 -10
  1017. package/esm/IconButton/IconButton.js +19 -29
  1018. package/esm/IconButton/index.js +0 -0
  1019. package/esm/Image/Image.js +59 -66
  1020. package/esm/Image/ImageWrapper.d.ts +1 -1
  1021. package/esm/Image/ImageWrapper.js +1 -1
  1022. package/esm/Image/hooks/useImage.js +24 -28
  1023. package/esm/InlineEdit/EditableControls.js +6 -6
  1024. package/esm/InlineEdit/InlineEdit.d.ts +3 -3
  1025. package/esm/InlineEdit/InlineEdit.js +52 -70
  1026. package/esm/InlineEdit/renderChildren.js +19 -20
  1027. package/esm/InlineEdit/useEditState.js +23 -29
  1028. package/esm/InlineEdit/useFocusEvent.js +17 -15
  1029. package/esm/Input/Input.js +40 -59
  1030. package/esm/Input/index.js +0 -0
  1031. package/esm/InputGroup/InputGroup.js +33 -47
  1032. package/esm/InputGroup/InputGroupAddon.js +14 -21
  1033. package/esm/InputGroup/InputGroupButton.js +14 -13
  1034. package/esm/InputGroup/index.js +0 -0
  1035. package/esm/InputNumber/InputNumber.js +72 -106
  1036. package/esm/InputNumber/index.js +0 -0
  1037. package/esm/InputPicker/InputAutosize.js +48 -65
  1038. package/esm/InputPicker/InputPicker.js +241 -290
  1039. package/esm/InputPicker/InputPickerContext.js +2 -2
  1040. package/esm/InputPicker/InputSearch.js +21 -24
  1041. package/esm/InputPicker/TagList.js +14 -13
  1042. package/esm/InputPicker/TextBox.js +21 -21
  1043. package/esm/InputPicker/hooks/useData.js +14 -18
  1044. package/esm/InputPicker/hooks/useInput.js +15 -13
  1045. package/esm/InputPicker/hooks/useMaxWidth.js +2 -5
  1046. package/esm/InputPicker/utils.js +1 -1
  1047. package/esm/List/List.js +53 -77
  1048. package/esm/List/ListContext.js +4 -6
  1049. package/esm/List/ListItem.js +38 -45
  1050. package/esm/List/helper/AutoScroller.js +35 -35
  1051. package/esm/List/helper/useManager.js +14 -18
  1052. package/esm/List/helper/useSortHelper.js +87 -100
  1053. package/esm/List/helper/utils.js +11 -16
  1054. package/esm/List/index.js +0 -0
  1055. package/esm/Loader/Loader.js +27 -42
  1056. package/esm/Loader/index.js +0 -0
  1057. package/esm/MaskedInput/MaskedInput.js +8 -5
  1058. package/esm/MaskedInput/TextMask.js +28 -42
  1059. package/esm/MaskedInput/adjustCaretPosition.js +64 -82
  1060. package/esm/MaskedInput/conformToMask.js +52 -56
  1061. package/esm/MaskedInput/createTextMaskInputElement.js +61 -57
  1062. package/esm/MaskedInput/index.js +0 -0
  1063. package/esm/MaskedInput/types.js +0 -0
  1064. package/esm/MaskedInput/utilities.js +8 -8
  1065. package/esm/Message/Message.js +49 -69
  1066. package/esm/Message/index.js +0 -0
  1067. package/esm/Modal/Modal.js +90 -117
  1068. package/esm/Modal/ModalBody.js +27 -30
  1069. package/esm/Modal/ModalContext.js +1 -1
  1070. package/esm/Modal/ModalDialog.d.ts +0 -10
  1071. package/esm/Modal/ModalDialog.js +24 -39
  1072. package/esm/Modal/ModalFooter.d.ts +1 -1
  1073. package/esm/Modal/ModalFooter.js +1 -1
  1074. package/esm/Modal/ModalHeader.js +22 -31
  1075. package/esm/Modal/ModalTitle.js +15 -23
  1076. package/esm/Modal/utils.js +26 -29
  1077. package/esm/MultiCascadeTree/MultiCascadeTree.js +76 -80
  1078. package/esm/MultiCascadeTree/SearchView.js +51 -56
  1079. package/esm/MultiCascadeTree/TreeView.js +84 -99
  1080. package/esm/MultiCascadeTree/hooks/useCascadeValue.js +68 -100
  1081. package/esm/MultiCascadeTree/hooks/useColumnData.js +10 -16
  1082. package/esm/MultiCascadeTree/hooks/useFlattenData.js +10 -10
  1083. package/esm/MultiCascadeTree/hooks/useSearch.js +17 -19
  1084. package/esm/MultiCascadeTree/hooks/useSelect.js +37 -35
  1085. package/esm/MultiCascadeTree/utils.js +40 -45
  1086. package/esm/MultiCascader/MultiCascader.js +189 -224
  1087. package/esm/MultiCascader/index.js +0 -0
  1088. package/esm/Nav/AdaptiveNavItem.js +11 -12
  1089. package/esm/Nav/Nav.js +51 -72
  1090. package/esm/Nav/NavContext.js +1 -1
  1091. package/esm/Nav/NavDropdown.d.ts +3 -3
  1092. package/esm/Nav/NavDropdown.js +62 -92
  1093. package/esm/Nav/NavDropdownItem.js +55 -71
  1094. package/esm/Nav/NavDropdownMenu.d.ts +1 -1
  1095. package/esm/Nav/NavDropdownMenu.js +64 -78
  1096. package/esm/Nav/NavDropdownToggle.d.ts +2 -2
  1097. package/esm/Nav/NavDropdownToggle.js +19 -30
  1098. package/esm/Nav/NavItem.js +33 -48
  1099. package/esm/Nav/NavMenu.js +17 -19
  1100. package/esm/Nav/index.js +0 -0
  1101. package/esm/Navbar/Navbar.js +17 -18
  1102. package/esm/Navbar/NavbarBody.d.ts +1 -1
  1103. package/esm/Navbar/NavbarBody.js +1 -1
  1104. package/esm/Navbar/NavbarBrand.d.ts +1 -1
  1105. package/esm/Navbar/NavbarBrand.js +1 -1
  1106. package/esm/Navbar/NavbarDropdown.d.ts +3 -3
  1107. package/esm/Navbar/NavbarDropdown.js +51 -78
  1108. package/esm/Navbar/NavbarDropdownItem.js +49 -71
  1109. package/esm/Navbar/NavbarDropdownMenu.d.ts +1 -1
  1110. package/esm/Navbar/NavbarDropdownMenu.js +58 -74
  1111. package/esm/Navbar/NavbarDropdownToggle.d.ts +2 -2
  1112. package/esm/Navbar/NavbarDropdownToggle.js +18 -30
  1113. package/esm/Navbar/NavbarHeader.d.ts +1 -1
  1114. package/esm/Navbar/NavbarHeader.js +1 -1
  1115. package/esm/Navbar/NavbarItem.js +30 -44
  1116. package/esm/Notification/Notification.d.ts +4 -3
  1117. package/esm/Notification/Notification.js +38 -54
  1118. package/esm/Notification/index.js +0 -0
  1119. package/esm/Pagination/LimitPicker.js +15 -17
  1120. package/esm/Pagination/Pagination.js +58 -81
  1121. package/esm/Pagination/PaginationButton.js +23 -24
  1122. package/esm/Pagination/PaginationGroup.js +44 -60
  1123. package/esm/Pagination/index.js +0 -0
  1124. package/esm/Panel/AccordionButton.js +17 -20
  1125. package/esm/Panel/Panel.js +54 -79
  1126. package/esm/Panel/PanelBody.js +35 -34
  1127. package/esm/Panel/PanelHeader.js +23 -24
  1128. package/esm/Panel/hooks/useExpanded.js +14 -13
  1129. package/esm/Panel/index.js +0 -0
  1130. package/esm/PanelGroup/PanelGroup.js +31 -46
  1131. package/esm/PanelGroup/index.js +0 -0
  1132. package/esm/Placeholder/Placeholder.js +1 -1
  1133. package/esm/Placeholder/PlaceholderGraph.js +24 -33
  1134. package/esm/Placeholder/PlaceholderGrid.js +47 -60
  1135. package/esm/Placeholder/PlaceholderParagraph.js +30 -47
  1136. package/esm/Placeholder/index.js +0 -0
  1137. package/esm/Popover/Popover.js +30 -44
  1138. package/esm/Popover/index.js +0 -0
  1139. package/esm/Progress/Progress.js +1 -1
  1140. package/esm/Progress/ProgressCircle.js +54 -75
  1141. package/esm/Progress/ProgressLine.js +39 -50
  1142. package/esm/Progress/index.js +0 -0
  1143. package/esm/Radio/Radio.js +55 -84
  1144. package/esm/Radio/index.js +0 -0
  1145. package/esm/RadioGroup/RadioGroup.js +39 -59
  1146. package/esm/RadioGroup/index.js +0 -0
  1147. package/esm/RadioTile/RadioTile.js +42 -61
  1148. package/esm/RadioTileGroup/RadioTileGroup.js +31 -46
  1149. package/esm/RangeSlider/RangeSlider.js +115 -140
  1150. package/esm/RangeSlider/index.js +0 -0
  1151. package/esm/Rate/Character.js +34 -47
  1152. package/esm/Rate/Rate.d.ts +4 -4
  1153. package/esm/Rate/Rate.js +75 -108
  1154. package/esm/Rate/index.js +0 -0
  1155. package/esm/Rate/utils.js +6 -8
  1156. package/esm/Row/Row.js +32 -40
  1157. package/esm/Row/index.js +0 -0
  1158. package/esm/SafeAnchor/SafeAnchor.js +13 -19
  1159. package/esm/SafeAnchor/index.js +0 -0
  1160. package/esm/Schema/Schema.js +8 -8
  1161. package/esm/Schema/index.js +0 -0
  1162. package/esm/SelectPicker/SelectPicker.d.ts +0 -1
  1163. package/esm/SelectPicker/SelectPicker.js +131 -169
  1164. package/esm/SelectPicker/index.js +0 -0
  1165. package/esm/Sidebar/Sidebar.js +27 -34
  1166. package/esm/Sidebar/index.js +0 -0
  1167. package/esm/Sidenav/ExpandedSidenavDropdown.d.ts +3 -3
  1168. package/esm/Sidenav/ExpandedSidenavDropdown.js +69 -95
  1169. package/esm/Sidenav/ExpandedSidenavDropdownItem.js +50 -73
  1170. package/esm/Sidenav/ExpandedSidenavDropdownMenu.js +47 -64
  1171. package/esm/Sidenav/Node.js +25 -36
  1172. package/esm/Sidenav/Sidenav.js +42 -64
  1173. package/esm/Sidenav/SidenavBody.d.ts +1 -1
  1174. package/esm/Sidenav/SidenavBody.js +1 -1
  1175. package/esm/Sidenav/SidenavDropdown.d.ts +3 -3
  1176. package/esm/Sidenav/SidenavDropdown.js +80 -110
  1177. package/esm/Sidenav/SidenavDropdownCollapse.js +22 -30
  1178. package/esm/Sidenav/SidenavDropdownItem.d.ts +1 -1
  1179. package/esm/Sidenav/SidenavDropdownItem.js +56 -74
  1180. package/esm/Sidenav/SidenavDropdownMenu.d.ts +1 -1
  1181. package/esm/Sidenav/SidenavDropdownMenu.js +63 -74
  1182. package/esm/Sidenav/SidenavDropdownToggle.d.ts +2 -2
  1183. package/esm/Sidenav/SidenavDropdownToggle.js +17 -29
  1184. package/esm/Sidenav/SidenavHeader.d.ts +1 -1
  1185. package/esm/Sidenav/SidenavHeader.js +1 -1
  1186. package/esm/Sidenav/SidenavItem.js +63 -81
  1187. package/esm/Sidenav/SidenavToggle.js +19 -28
  1188. package/esm/Sidenav/index.js +0 -0
  1189. package/esm/Slider/Graduated.js +28 -37
  1190. package/esm/Slider/Handle.js +49 -65
  1191. package/esm/Slider/Input.js +10 -7
  1192. package/esm/Slider/Mark.js +16 -24
  1193. package/esm/Slider/ProgressBar.js +24 -34
  1194. package/esm/Slider/Slider.d.ts +0 -26
  1195. package/esm/Slider/Slider.js +75 -116
  1196. package/esm/Slider/index.js +0 -0
  1197. package/esm/Slider/useDrag.js +29 -29
  1198. package/esm/Slider/utils.js +2 -4
  1199. package/esm/Stack/HStack.js +8 -10
  1200. package/esm/Stack/Stack.js +38 -59
  1201. package/esm/Stack/StackItem.d.ts +0 -11
  1202. package/esm/Stack/StackItem.js +25 -36
  1203. package/esm/Stack/VStack.js +9 -12
  1204. package/esm/Stat/Stat.js +20 -25
  1205. package/esm/Stat/StatHelpText.d.ts +1 -1
  1206. package/esm/Stat/StatHelpText.js +1 -1
  1207. package/esm/Stat/StatLabel.js +16 -22
  1208. package/esm/Stat/StatTrend.js +20 -28
  1209. package/esm/Stat/StatValue.js +15 -21
  1210. package/esm/Stat/StatValueUnit.d.ts +1 -1
  1211. package/esm/Stat/StatValueUnit.js +1 -1
  1212. package/esm/StatGroup/StatGroup.js +24 -28
  1213. package/esm/Steps/StepItem.js +31 -43
  1214. package/esm/Steps/Steps.js +33 -45
  1215. package/esm/Steps/index.js +0 -0
  1216. package/esm/Table/Table.js +13 -13
  1217. package/esm/Tabs/Tab.js +1 -9
  1218. package/esm/Tabs/TabPanel.js +13 -14
  1219. package/esm/Tabs/Tabs.js +85 -101
  1220. package/esm/Tag/Tag.d.ts +2 -2
  1221. package/esm/Tag/Tag.js +37 -45
  1222. package/esm/Tag/index.js +0 -0
  1223. package/esm/TagGroup/TagGroup.d.ts +1 -1
  1224. package/esm/TagGroup/TagGroup.js +1 -1
  1225. package/esm/TagGroup/index.js +0 -0
  1226. package/esm/TagInput/index.js +23 -30
  1227. package/esm/TagPicker/index.js +18 -21
  1228. package/esm/Text/Text.js +32 -43
  1229. package/esm/TimePicker/TimePicker.js +10 -13
  1230. package/esm/TimeRangePicker/TimeRangePicker.js +9 -7
  1231. package/esm/Timeline/Timeline.js +33 -48
  1232. package/esm/Timeline/TimelineItem.js +18 -28
  1233. package/esm/Timeline/index.js +0 -0
  1234. package/esm/Toggle/Toggle.js +44 -69
  1235. package/esm/Toggle/index.js +0 -0
  1236. package/esm/Tooltip/Tooltip.d.ts +2 -2
  1237. package/esm/Tooltip/Tooltip.js +24 -33
  1238. package/esm/Tooltip/index.js +0 -0
  1239. package/esm/Tree/IndentLine.js +4 -3
  1240. package/esm/Tree/Tree.js +60 -63
  1241. package/esm/Tree/TreeNode.js +61 -60
  1242. package/esm/Tree/TreeNodeToggle.js +19 -16
  1243. package/esm/Tree/TreeView.js +171 -182
  1244. package/esm/Tree/hooks/useExpandTree.js +33 -38
  1245. package/esm/Tree/hooks/useFlattenTree.js +31 -34
  1246. package/esm/Tree/hooks/useFocusTree.d.ts +1 -1
  1247. package/esm/Tree/hooks/useFocusTree.js +76 -80
  1248. package/esm/Tree/hooks/useForceUpdate.js +2 -3
  1249. package/esm/Tree/hooks/useTreeDrag.js +86 -86
  1250. package/esm/Tree/hooks/useTreeNodeProps.js +51 -47
  1251. package/esm/Tree/hooks/useTreeNodeRefs.d.ts +1 -1
  1252. package/esm/Tree/hooks/useTreeNodeRefs.js +3 -3
  1253. package/esm/Tree/hooks/useTreeSearch.js +33 -39
  1254. package/esm/Tree/hooks/useTreeWithChildren.js +21 -35
  1255. package/esm/Tree/hooks/useVirtualizedTreeData.js +25 -22
  1256. package/esm/Tree/index.js +0 -0
  1257. package/esm/Tree/types.js +1 -1
  1258. package/esm/Tree/utils/flattenTree.js +16 -24
  1259. package/esm/Tree/utils/focusableTree.js +59 -58
  1260. package/esm/Tree/utils/formatNodeRefKey.js +1 -1
  1261. package/esm/Tree/utils/getExpandItemValues.js +7 -5
  1262. package/esm/Tree/utils/getNodeParentKeys.js +4 -4
  1263. package/esm/Tree/utils/getTreeActiveNode.js +2 -2
  1264. package/esm/Tree/utils/hasVisibleChildren.js +1 -3
  1265. package/esm/Tree/utils/indentTreeNode.js +7 -5
  1266. package/esm/Tree/utils/treeKeyboardInteractions.js +13 -9
  1267. package/esm/TreePicker/TreePicker.js +168 -178
  1268. package/esm/TreePicker/hooks/useFocusState.js +17 -19
  1269. package/esm/TreePicker/index.js +0 -0
  1270. package/esm/Uploader/UploadFileItem.js +68 -91
  1271. package/esm/Uploader/UploadTrigger.js +53 -91
  1272. package/esm/Uploader/Uploader.js +154 -214
  1273. package/esm/Uploader/index.js +0 -0
  1274. package/esm/Uploader/utils/ajaxUpload.js +27 -28
  1275. package/esm/Uploader/utils/previewFile.js +3 -3
  1276. package/esm/VisuallyHidden/VisuallyHidden.d.ts +1 -1
  1277. package/esm/VisuallyHidden/VisuallyHidden.js +1 -1
  1278. package/esm/Whisper/Whisper.js +14 -32
  1279. package/esm/Whisper/index.js +0 -0
  1280. package/esm/internals/CloseButton/CloseButton.js +19 -18
  1281. package/esm/internals/Disclosure/Disclosure.js +41 -41
  1282. package/esm/internals/Disclosure/DisclosureButton.js +15 -12
  1283. package/esm/internals/Disclosure/DisclosureContent.js +9 -5
  1284. package/esm/internals/Disclosure/DisclosureContext.js +2 -2
  1285. package/esm/internals/Disclosure/useDisclosureContext.js +2 -2
  1286. package/esm/internals/Menu/Menu.d.ts +1 -5
  1287. package/esm/internals/Menu/Menu.js +79 -79
  1288. package/esm/internals/Menu/MenuContext.js +3 -3
  1289. package/esm/internals/Menu/MenuItem.d.ts +0 -7
  1290. package/esm/internals/Menu/MenuItem.js +21 -29
  1291. package/esm/internals/Menu/Menubar.js +24 -24
  1292. package/esm/internals/Menu/useMenu.js +75 -68
  1293. package/esm/internals/Overlay/Modal.d.ts +6 -20
  1294. package/esm/internals/Overlay/Modal.js +76 -115
  1295. package/esm/internals/Overlay/ModalManager.js +22 -28
  1296. package/esm/internals/Overlay/Overlay.d.ts +2 -23
  1297. package/esm/internals/Overlay/Overlay.js +55 -74
  1298. package/esm/internals/Overlay/OverlayContext.js +1 -1
  1299. package/esm/internals/Overlay/OverlayTrigger.d.ts +2 -2
  1300. package/esm/internals/Overlay/OverlayTrigger.js +138 -151
  1301. package/esm/internals/Overlay/Position.d.ts +2 -2
  1302. package/esm/internals/Overlay/Position.js +62 -85
  1303. package/esm/internals/Overlay/positionUtils.d.ts +2 -2
  1304. package/esm/internals/Overlay/positionUtils.js +113 -107
  1305. package/esm/internals/Picker/ListCheckItem.js +43 -48
  1306. package/esm/internals/Picker/ListItem.js +31 -34
  1307. package/esm/internals/Picker/ListItemGroup.js +16 -19
  1308. package/esm/internals/Picker/Listbox.d.ts +1 -1
  1309. package/esm/internals/Picker/Listbox.js +97 -117
  1310. package/esm/internals/Picker/PickerIndicator.js +21 -17
  1311. package/esm/internals/Picker/PickerLabel.js +7 -8
  1312. package/esm/internals/Picker/PickerPopup.js +25 -29
  1313. package/esm/internals/Picker/PickerToggle.d.ts +2 -2
  1314. package/esm/internals/Picker/PickerToggle.js +48 -55
  1315. package/esm/internals/Picker/PickerToggleTrigger.d.ts +2 -2
  1316. package/esm/internals/Picker/PickerToggleTrigger.js +21 -22
  1317. package/esm/internals/Picker/SelectedElement.js +19 -18
  1318. package/esm/internals/Picker/ToggleButton.js +1 -1
  1319. package/esm/internals/Picker/hooks/useCombobox.js +10 -9
  1320. package/esm/internals/Picker/hooks/useFocusItemValue.js +92 -98
  1321. package/esm/internals/Picker/hooks/usePickerClassName.d.ts +2 -2
  1322. package/esm/internals/Picker/hooks/usePickerClassName.js +30 -21
  1323. package/esm/internals/Picker/hooks/usePickerRef.js +23 -19
  1324. package/esm/internals/Picker/hooks/useSearch.js +19 -23
  1325. package/esm/internals/Picker/hooks/useToggleKeyDownEvent.js +21 -20
  1326. package/esm/internals/Picker/index.d.ts +0 -1
  1327. package/esm/internals/Picker/index.js +1 -2
  1328. package/esm/internals/Picker/utils.js +19 -18
  1329. package/esm/internals/Plaintext/Plaintext.js +18 -20
  1330. package/esm/internals/Ripple/Ripple.js +41 -50
  1331. package/esm/internals/ScrollView/ScrollView.js +30 -29
  1332. package/esm/internals/ScrollView/hooks/useScrollState.d.ts +1 -1
  1333. package/esm/internals/ScrollView/hooks/useScrollState.js +16 -18
  1334. package/esm/internals/SearchBox/SearchBox.js +19 -22
  1335. package/esm/internals/Tree/TreeProvider.d.ts +4 -1
  1336. package/esm/internals/Tree/TreeProvider.js +43 -36
  1337. package/esm/internals/Tree/TreeView.js +27 -24
  1338. package/esm/internals/Tree/utils/filterNodesOfTree.js +6 -6
  1339. package/esm/internals/Tree/utils/findNodeOfTree.js +5 -5
  1340. package/esm/internals/Tree/utils/getParentMap.js +10 -15
  1341. package/esm/internals/Tree/utils/getPathTowardsItem.js +2 -2
  1342. package/esm/internals/Windowing/AutoSizer.js +34 -34
  1343. package/esm/internals/Windowing/List.d.ts +1 -1
  1344. package/esm/internals/Windowing/List.js +41 -45
  1345. package/esm/internals/constants/index.js +12 -12
  1346. package/esm/internals/constants/statusIcons.js +2 -2
  1347. package/esm/internals/hooks/useClassNames.d.ts +1 -2
  1348. package/esm/internals/hooks/useClassNames.js +16 -26
  1349. package/esm/internals/hooks/useClickOutside.js +11 -10
  1350. package/esm/internals/hooks/useControlled.js +4 -6
  1351. package/esm/internals/hooks/useElementResize.js +4 -4
  1352. package/esm/internals/hooks/useEnsuredRef.js +1 -1
  1353. package/esm/internals/hooks/useEventCallback.js +3 -3
  1354. package/esm/internals/hooks/useEventListener.js +4 -4
  1355. package/esm/internals/hooks/useFocus.js +7 -7
  1356. package/esm/internals/hooks/useFocusVirtualListItem.js +5 -5
  1357. package/esm/internals/hooks/useInternalId.js +2 -2
  1358. package/esm/internals/hooks/useIsMounted.js +4 -6
  1359. package/esm/internals/hooks/useIsomorphicLayoutEffect.js +1 -1
  1360. package/esm/internals/hooks/useMap.js +8 -12
  1361. package/esm/internals/hooks/useMount.js +3 -3
  1362. package/esm/internals/hooks/usePortal.js +20 -24
  1363. package/esm/internals/hooks/useRootClose.js +16 -15
  1364. package/esm/internals/hooks/useTimeout.js +8 -8
  1365. package/esm/internals/hooks/useToggleCaret.d.ts +2 -2
  1366. package/esm/internals/hooks/useToggleCaret.js +5 -4
  1367. package/esm/internals/hooks/useUniqueId.js +3 -11
  1368. package/esm/internals/hooks/useUpdateEffect.js +3 -4
  1369. package/esm/internals/hooks/useUpdatedRef.js +1 -1
  1370. package/esm/internals/hooks/useWillUnmount.js +2 -8
  1371. package/esm/internals/symbols.d.ts +1 -0
  1372. package/esm/internals/symbols.js +3 -2
  1373. package/esm/internals/types/colours.d.ts +10 -0
  1374. package/esm/internals/types/colours.js +11 -0
  1375. package/esm/internals/types/index.d.ts +29 -26
  1376. package/esm/internals/types/index.js +6 -0
  1377. package/esm/internals/types/placement.d.ts +5 -0
  1378. package/esm/internals/types/placement.js +2 -0
  1379. package/esm/internals/utils/BrowserDetection.d.ts +0 -10
  1380. package/esm/internals/utils/BrowserDetection.js +2 -60
  1381. package/esm/internals/utils/ReactChildren.js +23 -27
  1382. package/esm/internals/utils/colours.d.ts +21 -0
  1383. package/esm/internals/utils/colours.js +77 -0
  1384. package/esm/internals/utils/composeFunctions.js +1 -5
  1385. package/esm/internals/utils/createChainedFunction.js +1 -3
  1386. package/esm/internals/utils/createComponent.d.ts +1 -1
  1387. package/esm/internals/utils/createComponent.js +22 -28
  1388. package/esm/internals/utils/css.d.ts +16 -0
  1389. package/esm/internals/utils/css.js +55 -0
  1390. package/esm/internals/utils/date/copyTime.js +9 -7
  1391. package/esm/internals/utils/date/disableTime.js +10 -10
  1392. package/esm/internals/utils/date/extractTimeFormat.js +1 -1
  1393. package/esm/internals/utils/date/formatCheck.js +5 -15
  1394. package/esm/internals/utils/date/getWeekKeys.js +1 -1
  1395. package/esm/internals/utils/date/getWeekStartDates.js +13 -12
  1396. package/esm/internals/utils/date/index.d.ts +46 -46
  1397. package/esm/internals/utils/date/index.js +46 -46
  1398. package/esm/internals/utils/date/omitHideDisabledProps.js +1 -5
  1399. package/esm/internals/utils/date/reverseDateRangeOmitTime.js +1 -2
  1400. package/esm/internals/utils/date/types.js +2 -2
  1401. package/esm/internals/utils/date/useDateMode.js +6 -6
  1402. package/esm/internals/utils/deprecateComponent.js +3 -3
  1403. package/esm/internals/utils/dom.js +2 -6
  1404. package/esm/internals/utils/getDOMNode.js +3 -4
  1405. package/esm/internals/utils/getDataGroupBy.js +11 -13
  1406. package/esm/internals/utils/getSafeRegExpString.js +2 -1
  1407. package/esm/internals/utils/getStringLength.js +2 -2
  1408. package/esm/internals/utils/htmlPropsUtils.js +13 -14
  1409. package/esm/internals/utils/index.d.ts +2 -0
  1410. package/esm/internals/utils/index.js +2 -0
  1411. package/esm/internals/utils/mergeRefs.js +5 -7
  1412. package/esm/internals/utils/placementPolyfill.js +1 -3
  1413. package/esm/internals/utils/prefix.js +6 -12
  1414. package/esm/internals/utils/safeSetSelection.js +2 -4
  1415. package/esm/internals/utils/shallowEqual.js +5 -5
  1416. package/esm/internals/utils/stringifyReactNode.js +6 -6
  1417. package/esm/internals/utils/tplTransform.js +4 -10
  1418. package/esm/internals/utils/warnOnce.js +3 -3
  1419. package/esm/locales/ar_EG.js +11 -10
  1420. package/esm/locales/ca_ES.d.ts +4 -4
  1421. package/esm/locales/ca_ES.js +11 -10
  1422. package/esm/locales/cs_CZ.js +11 -10
  1423. package/esm/locales/da_DK.js +11 -10
  1424. package/esm/locales/de_DE.js +11 -10
  1425. package/esm/locales/en_GB.js +11 -10
  1426. package/esm/locales/en_US.js +11 -10
  1427. package/esm/locales/es_AR.js +11 -10
  1428. package/esm/locales/es_ES.js +11 -10
  1429. package/esm/locales/fa_IR.js +11 -10
  1430. package/esm/locales/fi_FI.js +11 -10
  1431. package/esm/locales/fr_FR.js +11 -10
  1432. package/esm/locales/hu_HU.js +11 -10
  1433. package/esm/locales/it_IT.js +11 -10
  1434. package/esm/locales/ja_JP.js +11 -10
  1435. package/esm/locales/kk_KZ.js +11 -10
  1436. package/esm/locales/ko_KR.js +11 -10
  1437. package/esm/locales/ne_NP.js +11 -10
  1438. package/esm/locales/nl_NL.js +11 -10
  1439. package/esm/locales/pt_BR.js +11 -10
  1440. package/esm/locales/ru_RU.js +11 -10
  1441. package/esm/locales/sv_SE.js +11 -10
  1442. package/esm/locales/tr_TR.js +11 -10
  1443. package/esm/locales/zh_CN.js +11 -10
  1444. package/esm/locales/zh_TW.js +11 -10
  1445. package/esm/toaster/ToastContainer.d.ts +2 -2
  1446. package/esm/toaster/ToastContainer.js +104 -129
  1447. package/esm/toaster/ToastContext.js +1 -1
  1448. package/esm/toaster/hooks/useDelayedClosure.js +20 -17
  1449. package/esm/toaster/render.d.ts +0 -1
  1450. package/esm/toaster/render.js +12 -26
  1451. package/esm/toaster/toaster.js +28 -54
  1452. package/esm/useBreakpointValue/useBreakpointValue.js +7 -6
  1453. package/esm/useMediaQuery/useMediaQuery.d.ts +1 -7
  1454. package/esm/useMediaQuery/useMediaQuery.js +18 -78
  1455. package/esm/useToaster/useToaster.js +42 -43
  1456. package/internals/Picker/styles/index.less +7 -11
  1457. package/internals/Picker/styles/mixin.less +6 -3
  1458. package/package.json +16 -13
  1459. package/styles/color-modes/dark.less +1 -0
  1460. package/styles/color-modes/high-contrast.less +1 -0
  1461. package/styles/color-modes/light.less +1 -0
  1462. package/styles/common.less +1 -0
  1463. package/styles/mixins/hacks.less +0 -73
  1464. package/styles/mixins/menu.less +0 -0
  1465. package/styles/mixins/utilities.less +25 -3
  1466. package/styles/scaffolding.less +1 -1
  1467. package/styles/typography.less +11 -6
  1468. package/styles/variables.less +28 -73
  1469. package/toaster/styles/animation.less +0 -0
  1470. package/toaster/styles/index.css +35 -128
  1471. package/useToaster/styles/index.css +35 -128
  1472. package/cjs/internals/Picker/propTypes.d.ts +0 -71
  1473. package/cjs/internals/Picker/propTypes.js +0 -46
  1474. package/cjs/internals/propTypes/deprecatePropType.d.ts +0 -16
  1475. package/cjs/internals/propTypes/deprecatePropType.js +0 -49
  1476. package/cjs/internals/propTypes/index.d.ts +0 -5
  1477. package/cjs/internals/propTypes/index.js +0 -28
  1478. package/cjs/internals/propTypes/oneOf.d.ts +0 -3
  1479. package/cjs/internals/propTypes/oneOf.js +0 -18
  1480. package/cjs/internals/utils/render.d.ts +0 -7
  1481. package/cjs/internals/utils/render.js +0 -48
  1482. package/esm/internals/Picker/propTypes.d.ts +0 -71
  1483. package/esm/internals/Picker/propTypes.js +0 -41
  1484. package/esm/internals/propTypes/deprecatePropType.d.ts +0 -16
  1485. package/esm/internals/propTypes/deprecatePropType.js +0 -45
  1486. package/esm/internals/propTypes/index.d.ts +0 -5
  1487. package/esm/internals/propTypes/index.js +0 -17
  1488. package/esm/internals/propTypes/oneOf.d.ts +0 -3
  1489. package/esm/internals/propTypes/oneOf.js +0 -13
  1490. package/esm/internals/utils/render.d.ts +0 -7
  1491. package/esm/internals/utils/render.js +0 -40
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
  import React, { useState, useEffect, useRef, useMemo, useCallback, useImperativeHandle } from 'react';
3
- import PropTypes from 'prop-types';
4
3
  import classNames from 'classnames';
5
4
  import getContainer from 'dom-lib/getContainer';
6
5
  import ownerDocument from 'dom-lib/ownerDocument';
@@ -13,37 +12,32 @@ import isElement from "../../DOMHelper/isElement.js";
13
12
  import positionUtils from "./positionUtils.js";
14
13
  import { getDOMNode } from "../utils/index.js";
15
14
  import { useUpdateEffect } from "../hooks/index.js";
16
- var usePosition = function usePosition(props, ref) {
17
- var _props$placement = props.placement,
18
- placement = _props$placement === void 0 ? 'right' : _props$placement,
19
- _props$preventOverflo = props.preventOverflow,
20
- preventOverflow = _props$preventOverflo === void 0 ? false : _props$preventOverflo,
21
- _props$containerPaddi = props.containerPadding,
22
- containerPadding = _props$containerPaddi === void 0 ? 0 : _props$containerPaddi,
23
- container = props.container,
24
- triggerTarget = props.triggerTarget,
25
- followCursor = props.followCursor,
26
- cursorPosition = props.cursorPosition;
27
- var containerRef = useRef(null);
28
- var lastTargetRef = useRef(null);
29
- var overlayResizeObserver = useRef();
30
- var defaultPosition = {
15
+ const usePosition = (props, ref) => {
16
+ const {
17
+ placement = 'right',
18
+ preventOverflow = false,
19
+ containerPadding = 0,
20
+ container,
21
+ triggerTarget,
22
+ followCursor,
23
+ cursorPosition
24
+ } = props;
25
+ const containerRef = useRef(null);
26
+ const lastTargetRef = useRef(null);
27
+ const overlayResizeObserver = useRef();
28
+ const defaultPosition = {
31
29
  positionLeft: 0,
32
30
  positionTop: 0,
33
31
  arrowOffsetLeft: undefined,
34
32
  arrowOffsetTop: undefined
35
33
  };
36
- var _useState = useState(defaultPosition),
37
- position = _useState[0],
38
- setPosition = _useState[1];
39
- var utils = useMemo(function () {
40
- return positionUtils({
41
- placement: placement,
42
- preventOverflow: preventOverflow,
43
- padding: containerPadding
44
- });
45
- }, [placement, preventOverflow, containerPadding]);
46
- var updatePosition = useCallback(
34
+ const [position, setPosition] = useState(defaultPosition);
35
+ const utils = useMemo(() => positionUtils({
36
+ placement,
37
+ preventOverflow,
38
+ padding: containerPadding
39
+ }), [placement, preventOverflow, containerPadding]);
40
+ const updatePosition = useCallback(
47
41
  /**
48
42
  * @param placementChanged Whether the placement has changed
49
43
  * @param forceUpdateDOM Whether to update the DOM directly
@@ -56,7 +50,7 @@ var usePosition = function usePosition(props, ref) {
56
50
  if (!(triggerTarget !== null && triggerTarget !== void 0 && triggerTarget.current)) {
57
51
  return;
58
52
  }
59
- var targetElement = getDOMNode(triggerTarget);
53
+ const targetElement = getDOMNode(triggerTarget);
60
54
  if (!isElement(targetElement)) {
61
55
  throw new Error('`target` should return an HTMLElement');
62
56
  }
@@ -65,19 +59,19 @@ var usePosition = function usePosition(props, ref) {
65
59
  if (targetElement === lastTargetRef.current && !placementChanged) {
66
60
  return;
67
61
  }
68
- var overlay = getDOMNode(ref.current);
69
- var containerElement = getContainer(typeof container === 'function' ? container() : container !== null && container !== void 0 ? container : null, ownerDocument(ref.current).body);
70
- var posi = utils.calcOverlayPosition(overlay, targetElement, containerElement, followCursor ? cursorPosition : undefined);
62
+ const overlay = getDOMNode(ref.current);
63
+ const containerElement = getContainer(typeof container === 'function' ? container() : container !== null && container !== void 0 ? container : null, ownerDocument(ref.current).body);
64
+ const posi = utils.calcOverlayPosition(overlay, targetElement, containerElement, followCursor ? cursorPosition : undefined);
71
65
  if (forceUpdateDOM && overlay) {
72
66
  var _overlay$className;
73
- var preClassName = overlay === null || overlay === void 0 || (_overlay$className = overlay.className) === null || _overlay$className === void 0 || (_overlay$className = _overlay$className.match(/(placement-\S+)/)) === null || _overlay$className === void 0 ? void 0 : _overlay$className[0];
67
+ const preClassName = overlay === null || overlay === void 0 || (_overlay$className = overlay.className) === null || _overlay$className === void 0 || (_overlay$className = _overlay$className.match(/(placement-\S+)/)) === null || _overlay$className === void 0 ? void 0 : _overlay$className[0];
74
68
  removeClass(overlay, preClassName);
75
69
  if (posi.positionClassName) {
76
70
  addClass(overlay, posi.positionClassName);
77
71
  }
78
72
  addStyle(overlay, {
79
- left: posi.positionLeft + "px",
80
- top: posi.positionTop + "px"
73
+ left: `${posi.positionLeft}px`,
74
+ top: `${posi.positionTop}px`
81
75
  });
82
76
  } else {
83
77
  setPosition(posi);
@@ -85,30 +79,24 @@ var usePosition = function usePosition(props, ref) {
85
79
  containerRef.current = containerElement;
86
80
  lastTargetRef.current = targetElement;
87
81
  }, [container, ref, triggerTarget, utils, followCursor, cursorPosition]);
88
- useEffect(function () {
82
+ useEffect(() => {
89
83
  updatePosition(false);
90
- var overlay = getDOMNode(ref.current);
91
- var containerScrollListener;
84
+ const overlay = getDOMNode(ref.current);
85
+ let containerScrollListener;
92
86
  if (containerRef.current && preventOverflow) {
93
87
  var _containerRef$current;
94
88
  // Update the overlay position when the container scroll bar is scrolling
95
- containerScrollListener = on(((_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.tagName) === 'BODY' ? window : containerRef.current, 'scroll', function () {
96
- return updatePosition(true, true);
97
- });
89
+ containerScrollListener = on(((_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.tagName) === 'BODY' ? window : containerRef.current, 'scroll', () => updatePosition(true, true));
98
90
  }
99
91
 
100
92
  // Update the position when the window size changes
101
- var resizeListener = on(window, 'resize', function () {
102
- return updatePosition(true, true);
103
- });
93
+ const resizeListener = on(window, 'resize', () => updatePosition(true, true));
104
94
  if (overlay) {
105
95
  // Update the position when the size of the overlay changes
106
- overlayResizeObserver.current = new ResizeObserver(function () {
107
- return updatePosition(true, true);
108
- });
96
+ overlayResizeObserver.current = new ResizeObserver(() => updatePosition(true, true));
109
97
  overlayResizeObserver.current.observe(overlay);
110
98
  }
111
- return function () {
99
+ return () => {
112
100
  var _containerScrollListe, _overlayResizeObserve;
113
101
  lastTargetRef.current = null;
114
102
  (_containerScrollListe = containerScrollListener) === null || _containerScrollListe === void 0 || _containerScrollListe.off();
@@ -116,46 +104,44 @@ var usePosition = function usePosition(props, ref) {
116
104
  (_overlayResizeObserve = overlayResizeObserver.current) === null || _overlayResizeObserve === void 0 || _overlayResizeObserve.disconnect();
117
105
  };
118
106
  }, [preventOverflow, ref, updatePosition]);
119
- useUpdateEffect(function () {
120
- return updatePosition();
121
- }, [updatePosition, placement]);
107
+ useUpdateEffect(() => updatePosition(), [updatePosition, placement]);
122
108
  return [position, updatePosition];
123
109
  };
124
110
  /**
125
111
  * The `Position` component calculates the position of the child element.
126
112
  * @private
127
113
  */
128
- var Position = /*#__PURE__*/React.forwardRef(function (props, ref) {
129
- var children = props.children,
130
- className = props.className,
131
- followCursor = props.followCursor,
132
- cursorPosition = props.cursorPosition;
133
- var childRef = React.useRef(null);
134
- var _usePosition = usePosition(props, childRef),
135
- position = _usePosition[0],
136
- updatePosition = _usePosition[1];
137
- var positionClassName = position.positionClassName,
138
- arrowOffsetLeft = position.arrowOffsetLeft,
139
- arrowOffsetTop = position.arrowOffsetTop,
140
- positionLeft = position.positionLeft,
141
- positionTop = position.positionTop;
142
- useImperativeHandle(ref, function () {
143
- return {
144
- get child() {
145
- return childRef.current;
146
- },
147
- updatePosition: updatePosition
148
- };
149
- });
150
- useEffect(function () {
114
+ const Position = /*#__PURE__*/React.forwardRef((props, ref) => {
115
+ const {
116
+ children,
117
+ className,
118
+ followCursor,
119
+ cursorPosition
120
+ } = props;
121
+ const childRef = React.useRef(null);
122
+ const [position, updatePosition] = usePosition(props, childRef);
123
+ const {
124
+ positionClassName,
125
+ arrowOffsetLeft,
126
+ arrowOffsetTop,
127
+ positionLeft,
128
+ positionTop
129
+ } = position;
130
+ useImperativeHandle(ref, () => ({
131
+ get child() {
132
+ return childRef.current;
133
+ },
134
+ updatePosition
135
+ }));
136
+ useEffect(() => {
151
137
  if (!followCursor || !cursorPosition) return;
152
138
  updatePosition();
153
139
  }, [followCursor, cursorPosition, updatePosition]);
154
140
  if (typeof children === 'function') {
155
- var childProps = {
141
+ const childProps = {
156
142
  className: classNames(className, positionClassName),
157
- arrowOffsetLeft: arrowOffsetLeft,
158
- arrowOffsetTop: arrowOffsetTop,
143
+ arrowOffsetLeft,
144
+ arrowOffsetTop,
159
145
  left: positionLeft,
160
146
  top: positionTop
161
147
  };
@@ -164,13 +150,4 @@ var Position = /*#__PURE__*/React.forwardRef(function (props, ref) {
164
150
  return children;
165
151
  });
166
152
  Position.displayName = 'Position';
167
- Position.propTypes = {
168
- className: PropTypes.string,
169
- children: PropTypes.func.isRequired,
170
- container: PropTypes.oneOfType([PropTypes.func, PropTypes.any]),
171
- containerPadding: PropTypes.number,
172
- placement: PropTypes.any,
173
- preventOverflow: PropTypes.bool,
174
- triggerTarget: PropTypes.any
175
- };
176
153
  export default Position;
@@ -1,4 +1,4 @@
1
- import { CursorPosition, TypeAttributes } from '../types';
1
+ import { CursorPosition, Placement } from '../types';
2
2
  type Offset = {
3
3
  top: number;
4
4
  left: number;
@@ -13,7 +13,7 @@ export interface PositionType {
13
13
  positionClassName?: string;
14
14
  }
15
15
  export interface UtilProps {
16
- placement: TypeAttributes.Placement;
16
+ placement: Placement;
17
17
  preventOverflow: boolean;
18
18
  padding: number;
19
19
  }
@@ -6,10 +6,10 @@ import ownerDocument from 'dom-lib/ownerDocument';
6
6
  import getOffset from 'dom-lib/getOffset';
7
7
  import scrollTop from 'dom-lib/scrollTop';
8
8
  import scrollLeft from 'dom-lib/scrollLeft';
9
- import _getPosition from 'dom-lib/getPosition';
9
+ import getPosition from 'dom-lib/getPosition';
10
10
  import getStyle from 'dom-lib/getStyle';
11
11
  import nodeName from 'dom-lib/nodeName';
12
- export var AutoPlacement = {
12
+ export const AutoPlacement = {
13
13
  left: 'Start',
14
14
  right: 'End',
15
15
  top: 'Start',
@@ -20,42 +20,47 @@ export var AutoPlacement = {
20
20
  * @param containerNode
21
21
  */
22
22
  function getContainerDimensions(containerNode) {
23
- var width;
24
- var height;
25
- var scrollX;
26
- var scrollY;
23
+ let width;
24
+ let height;
25
+ let scrollX;
26
+ let scrollY;
27
27
  if (containerNode.tagName === 'BODY') {
28
28
  width = window.innerWidth;
29
29
  height = window.innerHeight;
30
30
  scrollY = scrollTop(ownerDocument(containerNode).documentElement) || scrollTop(containerNode);
31
31
  scrollX = scrollLeft(ownerDocument(containerNode).documentElement) || scrollLeft(containerNode);
32
32
  } else {
33
- var _ref = getOffset(containerNode);
34
- width = _ref.width;
35
- height = _ref.height;
33
+ ({
34
+ width,
35
+ height
36
+ } = getOffset(containerNode));
36
37
  scrollY = scrollTop(containerNode);
37
38
  scrollX = scrollLeft(containerNode);
38
39
  }
39
40
  return {
40
- width: width,
41
- height: height,
42
- scrollX: scrollX,
43
- scrollY: scrollY
41
+ width,
42
+ height,
43
+ scrollX,
44
+ scrollY
44
45
  };
45
46
  }
46
- export default (function (props) {
47
- var placement = props.placement,
48
- preventOverflow = props.preventOverflow,
49
- padding = props.padding;
47
+ export default props => {
48
+ const {
49
+ placement,
50
+ preventOverflow,
51
+ padding
52
+ } = props;
50
53
  function getTopDelta(top, overlayHeight, container) {
51
54
  if (!preventOverflow) {
52
55
  return 0;
53
56
  }
54
- var containerDimensions = getContainerDimensions(container);
55
- var containerHeight = containerDimensions.height,
56
- scrollY = containerDimensions.scrollY;
57
- var topEdgeOffset = top - padding - scrollY;
58
- var bottomEdgeOffset = top + padding + overlayHeight - scrollY;
57
+ const containerDimensions = getContainerDimensions(container);
58
+ const {
59
+ height: containerHeight,
60
+ scrollY
61
+ } = containerDimensions;
62
+ const topEdgeOffset = top - padding - scrollY;
63
+ const bottomEdgeOffset = top + padding + overlayHeight - scrollY;
59
64
  if (topEdgeOffset < 0) {
60
65
  return -topEdgeOffset;
61
66
  } else if (bottomEdgeOffset > containerHeight) {
@@ -67,11 +72,13 @@ export default (function (props) {
67
72
  if (!preventOverflow) {
68
73
  return 0;
69
74
  }
70
- var containerDimensions = getContainerDimensions(container);
71
- var scrollX = containerDimensions.scrollX,
72
- containerWidth = containerDimensions.width;
73
- var leftEdgeOffset = left - padding - scrollX;
74
- var rightEdgeOffset = left + padding + overlayWidth - scrollX;
75
+ const containerDimensions = getContainerDimensions(container);
76
+ const {
77
+ scrollX,
78
+ width: containerWidth
79
+ } = containerDimensions;
80
+ const leftEdgeOffset = left - padding - scrollX;
81
+ const rightEdgeOffset = left + padding + overlayWidth - scrollX;
75
82
  if (leftEdgeOffset < 0) {
76
83
  return -leftEdgeOffset;
77
84
  } else if (rightEdgeOffset > containerWidth) {
@@ -83,9 +90,10 @@ export default (function (props) {
83
90
  if (!preventOverflow) {
84
91
  return top;
85
92
  }
86
- var _getContainerDimensio = getContainerDimensions(container),
87
- scrollY = _getContainerDimensio.scrollY,
88
- containerHeight = _getContainerDimensio.height;
93
+ const {
94
+ scrollY,
95
+ height: containerHeight
96
+ } = getContainerDimensions(container);
89
97
 
90
98
  // 判断 overlay 底部是否溢出,设置 top
91
99
  if (overlayHeight + top > containerHeight + scrollY) {
@@ -99,9 +107,10 @@ export default (function (props) {
99
107
  if (!preventOverflow) {
100
108
  return left;
101
109
  }
102
- var _getContainerDimensio2 = getContainerDimensions(container),
103
- scrollX = _getContainerDimensio2.scrollX,
104
- containerWidth = _getContainerDimensio2.width;
110
+ const {
111
+ scrollX,
112
+ width: containerWidth
113
+ } = getContainerDimensions(container);
105
114
  if (overlayWidth + left > containerWidth + scrollX) {
106
115
  return containerWidth - overlayWidth + scrollX;
107
116
  }
@@ -110,18 +119,20 @@ export default (function (props) {
110
119
  return Math.max(scrollX, left);
111
120
  }
112
121
  return {
113
- getPosition: function getPosition(target, container) {
114
- var offset = container.tagName === 'BODY' ? getOffset(target) : _getPosition(target, container, false);
122
+ getPosition(target, container) {
123
+ const offset = container.tagName === 'BODY' ? getOffset(target) : getPosition(target, container, false);
115
124
  return offset;
116
125
  },
117
- getCursorOffsetPosition: function getCursorOffsetPosition(target, container, cursorPosition) {
118
- var left = cursorPosition.left,
119
- top = cursorPosition.top,
120
- clientLeft = cursorPosition.clientLeft,
121
- clientTop = cursorPosition.clientTop;
122
- var offset = {
123
- left: left,
124
- top: top,
126
+ getCursorOffsetPosition(target, container, cursorPosition) {
127
+ const {
128
+ left,
129
+ top,
130
+ clientLeft,
131
+ clientTop
132
+ } = cursorPosition;
133
+ const offset = {
134
+ left,
135
+ top,
125
136
  width: 10,
126
137
  height: 10
127
138
  };
@@ -133,12 +144,12 @@ export default (function (props) {
133
144
  if (container.tagName === 'BODY') {
134
145
  return offset;
135
146
  }
136
- var containerOffset = {
147
+ const containerOffset = {
137
148
  top: 0,
138
149
  left: 0
139
150
  };
140
151
  if (nodeName(container) !== 'html') {
141
- var nextParentOffset = getOffset(container);
152
+ const nextParentOffset = getOffset(container);
142
153
  if (nextParentOffset) {
143
154
  containerOffset.top = nextParentOffset.top;
144
155
  containerOffset.left = nextParentOffset.left;
@@ -150,94 +161,88 @@ export default (function (props) {
150
161
  offset.top = top - containerOffset.top;
151
162
  return offset;
152
163
  },
153
- calcAutoPlacement: function calcAutoPlacement(targetOffset, container, overlay) {
154
- var _getContainerDimensio3 = getContainerDimensions(container),
155
- width = _getContainerDimensio3.width,
156
- height = _getContainerDimensio3.height,
157
- scrollX = _getContainerDimensio3.scrollX,
158
- scrollY = _getContainerDimensio3.scrollY;
159
- var left = targetOffset.left - scrollX - overlay.width;
160
- var top = targetOffset.top - scrollY - overlay.height;
161
- var right = width - targetOffset.left - targetOffset.width + scrollX - overlay.width;
162
- var bottom = height - targetOffset.top - targetOffset.height + scrollY - overlay.height;
163
- var horizontal = [{
164
+ calcAutoPlacement(targetOffset, container, overlay) {
165
+ const {
166
+ width,
167
+ height,
168
+ scrollX,
169
+ scrollY
170
+ } = getContainerDimensions(container);
171
+ const left = targetOffset.left - scrollX - overlay.width;
172
+ const top = targetOffset.top - scrollY - overlay.height;
173
+ const right = width - targetOffset.left - targetOffset.width + scrollX - overlay.width;
174
+ const bottom = height - targetOffset.top - targetOffset.height + scrollY - overlay.height;
175
+ const horizontal = [{
164
176
  key: 'left',
165
177
  value: left
166
178
  }, {
167
179
  key: 'right',
168
180
  value: right
169
181
  }];
170
- var vertical = [{
182
+ const vertical = [{
171
183
  key: 'top',
172
184
  value: top
173
185
  }, {
174
186
  key: 'bottom',
175
187
  value: bottom
176
188
  }];
177
- var AV = 'autoVertical';
178
- var AH = 'autoHorizontal';
179
- var direction;
180
- var align;
189
+ const AV = 'autoVertical';
190
+ const AH = 'autoHorizontal';
191
+ let direction;
192
+ let align;
181
193
  if (placement.indexOf(AV) !== -1) {
182
- direction = maxBy(vertical, function (o) {
183
- return o.value;
184
- });
185
- return placement === AV ? direction.key : "" + direction.key + placement.replace(AV, '');
194
+ direction = maxBy(vertical, o => o.value);
195
+ return placement === AV ? direction.key : `${direction.key}${placement.replace(AV, '')}`;
186
196
  } else if (placement.indexOf(AH) !== -1) {
187
- direction = maxBy(horizontal, function (o) {
188
- return o.value;
189
- });
190
- return placement === AH ? direction.key : "" + direction.key + placement.replace(AH, '');
197
+ direction = maxBy(horizontal, o => o.value);
198
+ return placement === AH ? direction.key : `${direction.key}${placement.replace(AH, '')}`;
191
199
  }
192
200
 
193
201
  /**
194
202
  * Precedence Vertical
195
203
  * [...vertical, ...horizontal]
196
204
  */
197
- direction = maxBy([].concat(vertical, horizontal), function (o) {
198
- return o.value;
199
- });
205
+ direction = maxBy([...vertical, ...horizontal], o => o.value);
200
206
  if (direction.key === 'left' || direction.key === 'right') {
201
- align = minBy(vertical, function (o) {
202
- return o.value;
203
- });
207
+ align = minBy(vertical, o => o.value);
204
208
  } else {
205
- align = minBy(horizontal, function (o) {
206
- return o.value;
207
- });
209
+ align = minBy(horizontal, o => o.value);
208
210
  }
209
- return "" + direction.key + AutoPlacement[align.key];
211
+ return `${direction.key}${AutoPlacement[align.key]}`;
210
212
  },
211
213
  // Calculate the position of the overlay
212
- calcOverlayPosition: function calcOverlayPosition(overlayNode, target, container, cursorPosition) {
213
- var childOffset = cursorPosition ? this.getCursorOffsetPosition(target, container, cursorPosition) : this.getPosition(target, container);
214
- var _ref2 = getOffset(overlayNode),
215
- overlayHeight = _ref2.height,
216
- overlayWidth = _ref2.width;
217
- var top = childOffset.top,
218
- left = childOffset.left;
219
- var nextPlacement = placement;
214
+ calcOverlayPosition(overlayNode, target, container, cursorPosition) {
215
+ const childOffset = cursorPosition ? this.getCursorOffsetPosition(target, container, cursorPosition) : this.getPosition(target, container);
216
+ const {
217
+ height: overlayHeight,
218
+ width: overlayWidth
219
+ } = getOffset(overlayNode);
220
+ const {
221
+ top,
222
+ left
223
+ } = childOffset;
224
+ let nextPlacement = placement;
220
225
  if (placement && placement.indexOf('auto') >= 0) {
221
226
  nextPlacement = this.calcAutoPlacement(childOffset, container, {
222
227
  height: overlayHeight,
223
228
  width: overlayWidth
224
229
  });
225
230
  }
226
- var positionLeft;
227
- var positionTop;
228
- var arrowOffsetLeft;
229
- var arrowOffsetTop;
231
+ let positionLeft;
232
+ let positionTop;
233
+ let arrowOffsetLeft;
234
+ let arrowOffsetTop;
230
235
  if (nextPlacement === 'left' || nextPlacement === 'right') {
231
236
  positionTop = childOffset.top + (childOffset.height - overlayHeight) / 2;
232
- var topDelta = getTopDelta(positionTop, overlayHeight, container);
237
+ const topDelta = getTopDelta(positionTop, overlayHeight, container);
233
238
  positionTop += topDelta;
234
- arrowOffsetTop = 50 * (1 - 2 * topDelta / overlayHeight) + "%";
239
+ arrowOffsetTop = `${50 * (1 - 2 * topDelta / overlayHeight)}%`;
235
240
  arrowOffsetLeft = undefined;
236
241
  } else if (nextPlacement === 'top' || nextPlacement === 'bottom') {
237
242
  positionLeft = left + (childOffset.width - overlayWidth) / 2;
238
- var leftDelta = getLeftDelta(positionLeft, overlayWidth, container);
243
+ const leftDelta = getLeftDelta(positionLeft, overlayWidth, container);
239
244
  positionLeft += leftDelta;
240
- arrowOffsetLeft = 50 * (1 - 2 * leftDelta / overlayWidth) + "%";
245
+ arrowOffsetLeft = `${50 * (1 - 2 * leftDelta / overlayWidth)}%`;
241
246
  arrowOffsetTop = undefined;
242
247
  }
243
248
  if (nextPlacement === 'top' || nextPlacement === 'topStart' || nextPlacement === 'topEnd') {
@@ -258,15 +263,16 @@ export default (function (props) {
258
263
  * is less than the width of the container scrolling,
259
264
  * you need to recalculate the left value.
260
265
  */
261
- var _getContainerDimensio4 = getContainerDimensions(container),
262
- containerWidth = _getContainerDimensio4.width;
266
+ const {
267
+ width: containerWidth
268
+ } = getContainerDimensions(container);
263
269
  if (container.scrollWidth > containerWidth) {
264
270
  positionLeft = containerWidth + positionLeft - container.scrollWidth;
265
271
  }
266
272
  }
267
273
  if (nextPlacement === 'topStart' || nextPlacement === 'bottomStart') {
268
274
  if (document.dir === 'rtl') {
269
- var nextLeft = left + (childOffset.width - overlayWidth);
275
+ const nextLeft = left + (childOffset.width - overlayWidth);
270
276
  positionLeft = nextLeft + getLeftDelta(nextLeft, overlayWidth, container);
271
277
  } else {
272
278
  positionLeft = left + getLeftDelta(left, overlayWidth, container);
@@ -276,24 +282,24 @@ export default (function (props) {
276
282
  if (document.dir === 'rtl') {
277
283
  positionLeft = left + getLeftDelta(left, overlayWidth, container);
278
284
  } else {
279
- var _nextLeft = left + (childOffset.width - overlayWidth);
280
- positionLeft = _nextLeft + getLeftDelta(_nextLeft, overlayWidth, container);
285
+ const nextLeft = left + (childOffset.width - overlayWidth);
286
+ positionLeft = nextLeft + getLeftDelta(nextLeft, overlayWidth, container);
281
287
  }
282
288
  }
283
289
  if (nextPlacement === 'leftStart' || nextPlacement === 'rightStart') {
284
290
  positionTop = top + getTopDelta(top, overlayHeight, container);
285
291
  }
286
292
  if (nextPlacement === 'leftEnd' || nextPlacement === 'rightEnd') {
287
- var nextTop = top + (childOffset.height - overlayHeight);
293
+ const nextTop = top + (childOffset.height - overlayHeight);
288
294
  positionTop = nextTop + getTopDelta(nextTop, overlayHeight, container);
289
295
  }
290
296
  return {
291
- positionLeft: positionLeft,
292
- positionTop: positionTop,
293
- arrowOffsetLeft: arrowOffsetLeft,
294
- arrowOffsetTop: arrowOffsetTop,
295
- positionClassName: "placement-" + kebabCase(nextPlacement)
297
+ positionLeft,
298
+ positionTop,
299
+ arrowOffsetLeft,
300
+ arrowOffsetTop,
301
+ positionClassName: `placement-${kebabCase(nextPlacement)}`
296
302
  };
297
303
  }
298
304
  };
299
- });
305
+ };