rsuite 5.76.0 → 6.0.0-canary-20241227

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 (1416) 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 +114 -474
  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 +8 -15
  10. package/Badge/styles/index.less +0 -0
  11. package/Breadcrumb/styles/index.css +9 -16
  12. package/Button/styles/index.css +15 -87
  13. package/ButtonGroup/styles/index.css +8 -9
  14. package/ButtonGroup/styles/index.less +0 -0
  15. package/ButtonToolbar/styles/index.css +7 -6
  16. package/Calendar/styles/index.css +30 -202
  17. package/Calendar/styles/index.less +0 -5
  18. package/Card/styles/index.css +12 -28
  19. package/Carousel/styles/index.css +21 -75
  20. package/Carousel/styles/index.less +0 -0
  21. package/CascadeTree/styles/index.css +10 -39
  22. package/Cascader/styles/index.css +117 -503
  23. package/CheckPicker/styles/index.css +121 -538
  24. package/CheckTree/styles/index.css +125 -563
  25. package/CheckTreePicker/styles/index.css +126 -569
  26. package/Checkbox/styles/index.css +13 -68
  27. package/CheckboxGroup/styles/index.css +9 -14
  28. package/Col/styles/index.css +7 -4
  29. package/Container/styles/index.css +10 -17
  30. package/Container/styles/index.less +0 -0
  31. package/Content/styles/index.css +8 -7
  32. package/Content/styles/index.less +0 -0
  33. package/DateInput/styles/index.css +7 -43
  34. package/DatePicker/styles/index.css +129 -603
  35. package/DatePicker/styles/mixin.less +0 -0
  36. package/DateRangeInput/styles/index.css +7 -43
  37. package/DateRangePicker/styles/index.css +132 -619
  38. package/Divider/styles/index.css +11 -21
  39. package/Drawer/styles/index.css +15 -46
  40. package/Drawer/styles/mixin.less +0 -0
  41. package/Dropdown/styles/index.css +32 -168
  42. package/FlexboxGrid/styles/index.css +41 -108
  43. package/FlexboxGrid/styles/index.less +0 -0
  44. package/Footer/styles/index.css +11 -20
  45. package/Footer/styles/index.less +0 -0
  46. package/Form/styles/index.css +7 -4
  47. package/Form/styles/index.less +0 -0
  48. package/Form/styles/mixin.less +9 -5
  49. package/FormControl/styles/index.css +8 -6
  50. package/FormControl/styles/index.less +0 -0
  51. package/FormControlLabel/styles/index.css +7 -5
  52. package/FormControlLabel/styles/index.less +0 -0
  53. package/FormErrorMessage/styles/animation.less +0 -0
  54. package/FormErrorMessage/styles/index.css +22 -89
  55. package/FormErrorMessage/styles/index.less +0 -0
  56. package/FormGroup/styles/index.css +7 -4
  57. package/FormHelpText/styles/index.css +8 -10
  58. package/FormHelpText/styles/index.less +0 -0
  59. package/Grid/styles/grid-framework.less +0 -0
  60. package/Grid/styles/index.css +7 -4
  61. package/Grid/styles/mixin.less +0 -0
  62. package/Header/styles/index.css +11 -20
  63. package/Header/styles/index.less +0 -0
  64. package/Heading/styles/index.css +7 -4
  65. package/IconButton/styles/index.css +15 -96
  66. package/IconButton/styles/index.less +0 -0
  67. package/Image/styles/index.css +1 -5
  68. package/InlineEdit/styles/index.css +9 -29
  69. package/Input/styles/index.css +7 -43
  70. package/Input/styles/index.less +0 -0
  71. package/InputGroup/styles/index.css +19 -181
  72. package/InputNumber/styles/index.css +23 -239
  73. package/InputNumber/styles/index.less +0 -0
  74. package/InputPicker/styles/index.css +115 -490
  75. package/List/styles/index.css +8 -14
  76. package/Loader/styles/index.css +19 -57
  77. package/Message/styles/index.css +33 -155
  78. package/Modal/styles/animation.less +0 -0
  79. package/Modal/styles/index.css +13 -32
  80. package/Modal/styles/mixin.less +0 -0
  81. package/MultiCascadeTree/styles/index.css +123 -567
  82. package/MultiCascader/styles/index.css +123 -567
  83. package/Nav/styles/index.css +41 -226
  84. package/Navbar/styles/index.css +36 -204
  85. package/Notification/styles/index.css +24 -109
  86. package/Notification/styles/mixin.less +0 -0
  87. package/Pagination/styles/index.css +128 -570
  88. package/Pagination/styles/mixin.less +0 -0
  89. package/Panel/styles/index.css +12 -43
  90. package/PanelGroup/styles/index.css +7 -6
  91. package/PanelGroup/styles/index.less +0 -0
  92. package/Placeholder/styles/index.css +15 -47
  93. package/Popover/styles/index.css +16 -124
  94. package/Popover/styles/mixins.less +0 -12
  95. package/Progress/styles/animation.less +0 -0
  96. package/Progress/styles/index.css +19 -89
  97. package/README.md +9 -5
  98. package/Radio/styles/index.css +12 -66
  99. package/Radio/styles/mixin.less +0 -0
  100. package/RadioGroup/styles/index.css +9 -25
  101. package/RadioTile/styles/index.css +7 -13
  102. package/RangeSlider/styles/index.css +20 -144
  103. package/Rate/styles/index.css +13 -32
  104. package/Row/styles/index.css +7 -4
  105. package/Row/styles/index.less +0 -0
  106. package/SelectPicker/styles/index.css +115 -482
  107. package/SelectPicker/styles/index.less +1 -1
  108. package/Sidebar/styles/index.css +10 -20
  109. package/Sidebar/styles/index.less +0 -0
  110. package/Sidenav/styles/index.css +21 -108
  111. package/Sidenav/styles/mixin.less +0 -0
  112. package/Slider/styles/index.css +20 -144
  113. package/Stack/styles/index.css +7 -6
  114. package/Stack/styles/index.less +0 -0
  115. package/Stat/styles/index.css +30 -249
  116. package/Steps/styles/index.css +14 -46
  117. package/Table/styles/index.css +19 -68
  118. package/Table/styles/mixin.less +0 -0
  119. package/Tabs/styles/index.css +46 -249
  120. package/Tag/styles/index.css +7 -15
  121. package/TagGroup/styles/index.css +7 -4
  122. package/TagInput/styles/index.css +125 -562
  123. package/TagPicker/styles/index.css +125 -562
  124. package/Text/styles/index.css +8 -23
  125. package/TimePicker/styles/index.css +129 -603
  126. package/TimeRangePicker/styles/index.css +132 -619
  127. package/Timeline/styles/index.css +9 -22
  128. package/Timeline/styles/index.less +0 -3
  129. package/Timeline/styles/mixin.less +0 -0
  130. package/Toggle/styles/index.css +13 -60
  131. package/Tooltip/styles/index.css +15 -113
  132. package/Tooltip/styles/index.less +0 -0
  133. package/Tooltip/styles/mixins.less +0 -12
  134. package/Tree/styles/index.css +2745 -59
  135. package/Tree/styles/index.less +1 -1
  136. package/TreePicker/styles/index.css +2745 -59
  137. package/Uploader/styles/index.css +34 -211
  138. package/Uploader/styles/mixin.less +0 -0
  139. package/cjs/Accordion/Accordion.js +4 -3
  140. package/cjs/Affix/Affix.d.ts +1 -1
  141. package/cjs/Affix/Affix.js +55 -66
  142. package/cjs/Affix/index.js +0 -0
  143. package/cjs/Animation/Bounce.js +11 -10
  144. package/cjs/Animation/Collapse.js +41 -49
  145. package/cjs/Animation/Fade.js +13 -12
  146. package/cjs/Animation/Slide.js +14 -14
  147. package/cjs/Animation/Transition.d.ts +1 -40
  148. package/cjs/Animation/Transition.js +97 -115
  149. package/cjs/Animation/index.js +1 -1
  150. package/cjs/Animation/utils.d.ts +0 -9
  151. package/cjs/Animation/utils.js +2 -13
  152. package/cjs/AutoComplete/AutoComplete.js +87 -128
  153. package/cjs/AutoComplete/Combobox.js +11 -10
  154. package/cjs/AutoComplete/index.js +0 -0
  155. package/cjs/AutoComplete/utils.js +7 -6
  156. package/cjs/Avatar/Avatar.js +54 -76
  157. package/cjs/Avatar/AvatarIcon.js +12 -14
  158. package/cjs/Avatar/index.js +0 -0
  159. package/cjs/Avatar/useImage.js +19 -19
  160. package/cjs/AvatarGroup/AvatarGroup.js +31 -43
  161. package/cjs/AvatarGroup/index.js +0 -0
  162. package/cjs/Badge/Badge.js +24 -36
  163. package/cjs/Badge/index.js +0 -0
  164. package/cjs/Breadcrumb/Breadcrumb.js +34 -49
  165. package/cjs/Breadcrumb/BreadcrumbItem.d.ts +1 -1
  166. package/cjs/Breadcrumb/BreadcrumbItem.js +21 -34
  167. package/cjs/Breadcrumb/index.js +0 -0
  168. package/cjs/Button/Button.js +44 -63
  169. package/cjs/Button/index.js +0 -0
  170. package/cjs/ButtonGroup/ButtonGroup.js +28 -44
  171. package/cjs/ButtonGroup/ButtonGroupContext.js +1 -1
  172. package/cjs/ButtonGroup/index.js +0 -0
  173. package/cjs/ButtonToolbar/ButtonToolbar.js +17 -23
  174. package/cjs/ButtonToolbar/index.js +0 -0
  175. package/cjs/Calendar/Calendar.js +46 -66
  176. package/cjs/Calendar/CalendarBody.js +26 -26
  177. package/cjs/Calendar/CalendarContainer.js +88 -95
  178. package/cjs/Calendar/CalendarHeader.js +50 -50
  179. package/cjs/Calendar/CalendarProvider.js +2 -2
  180. package/cjs/Calendar/Grid/Grid.js +22 -25
  181. package/cjs/Calendar/Grid/GridCell.js +39 -37
  182. package/cjs/Calendar/Grid/GridHeaderRow.js +27 -29
  183. package/cjs/Calendar/Grid/GridRow.js +48 -53
  184. package/cjs/Calendar/MonthDropdown/MonthDropdown.js +62 -63
  185. package/cjs/Calendar/MonthDropdown/MonthDropdownItem.js +36 -39
  186. package/cjs/Calendar/TimeDropdown/TimeColumn.js +7 -7
  187. package/cjs/Calendar/TimeDropdown/TimeDropdown.js +64 -64
  188. package/cjs/Calendar/TimeDropdown/utils/formatWithLeadingZero.js +3 -2
  189. package/cjs/Calendar/TimeDropdown/utils/getClockTime.js +7 -5
  190. package/cjs/Calendar/TimeDropdown/utils/getTimeLimits.js +3 -3
  191. package/cjs/Calendar/TimeDropdown/utils/scrollToTime.js +6 -7
  192. package/cjs/Calendar/hooks/useCalendar.js +3 -2
  193. package/cjs/Calendar/hooks/useCalendarDate.d.ts +1 -1
  194. package/cjs/Calendar/hooks/useCalendarDate.js +11 -12
  195. package/cjs/Calendar/hooks/useCalendarState.js +18 -19
  196. package/cjs/Calendar/utils/isEveryDateInMonth.js +2 -2
  197. package/cjs/Card/Card.js +30 -39
  198. package/cjs/Card/CardBody.d.ts +1 -1
  199. package/cjs/Card/CardBody.js +1 -1
  200. package/cjs/Card/CardFooter.d.ts +1 -1
  201. package/cjs/Card/CardFooter.js +1 -1
  202. package/cjs/Card/CardHeader.d.ts +1 -1
  203. package/cjs/Card/CardHeader.js +1 -1
  204. package/cjs/CardGroup/CardGroup.js +24 -28
  205. package/cjs/Carousel/Carousel.js +75 -97
  206. package/cjs/Carousel/index.js +0 -0
  207. package/cjs/CascadeTree/CascadeTree.d.ts +0 -1
  208. package/cjs/CascadeTree/CascadeTree.js +93 -105
  209. package/cjs/CascadeTree/SearchView.js +49 -54
  210. package/cjs/CascadeTree/TreeView.js +84 -92
  211. package/cjs/CascadeTree/hooks/usePaths.js +18 -19
  212. package/cjs/CascadeTree/hooks/useSearch.js +22 -22
  213. package/cjs/CascadeTree/hooks/useSelect.js +26 -24
  214. package/cjs/CascadeTree/utils.js +10 -8
  215. package/cjs/Cascader/Cascader.d.ts +0 -1
  216. package/cjs/Cascader/Cascader.js +203 -239
  217. package/cjs/Cascader/index.js +0 -0
  218. package/cjs/Cascader/useActive.js +15 -15
  219. package/cjs/CheckPicker/CheckPicker.d.ts +0 -1
  220. package/cjs/CheckPicker/CheckPicker.js +146 -200
  221. package/cjs/CheckPicker/index.js +0 -0
  222. package/cjs/CheckTree/CheckTree.js +72 -77
  223. package/cjs/CheckTree/CheckTreeNode.js +53 -51
  224. package/cjs/CheckTree/CheckTreeView.js +178 -185
  225. package/cjs/CheckTree/hooks/useTreeCheckState.js +26 -25
  226. package/cjs/CheckTree/hooks/useTreeNodeProps.js +40 -37
  227. package/cjs/CheckTree/hooks/useTreeValue.js +6 -7
  228. package/cjs/CheckTree/utils.js +62 -65
  229. package/cjs/CheckTreePicker/CheckTreePicker.js +175 -190
  230. package/cjs/CheckTreePicker/hooks/useFocusState.js +13 -15
  231. package/cjs/CheckTreePicker/index.js +0 -0
  232. package/cjs/Checkbox/Checkbox.js +65 -102
  233. package/cjs/Checkbox/index.js +0 -0
  234. package/cjs/CheckboxGroup/CheckboxGroup.js +40 -62
  235. package/cjs/CheckboxGroup/CheckboxGroupContext.js +1 -1
  236. package/cjs/CheckboxGroup/index.js +0 -0
  237. package/cjs/Col/Col.js +32 -66
  238. package/cjs/Col/index.js +0 -0
  239. package/cjs/Container/Container.d.ts +1 -1
  240. package/cjs/Container/Container.js +22 -32
  241. package/cjs/Container/index.js +0 -0
  242. package/cjs/Content/Content.d.ts +1 -1
  243. package/cjs/Content/Content.js +1 -1
  244. package/cjs/Content/index.js +0 -0
  245. package/cjs/CustomProvider/CustomProvider.d.ts +8 -16
  246. package/cjs/CustomProvider/CustomProvider.js +47 -54
  247. package/cjs/CustomProvider/FormattedDate.js +8 -5
  248. package/cjs/CustomProvider/FormattedNumber.js +10 -9
  249. package/cjs/CustomProvider/index.js +1 -1
  250. package/cjs/CustomProvider/useCustom.js +44 -47
  251. package/cjs/DOMHelper/index.js +4 -4
  252. package/cjs/DOMHelper/isElement.js +1 -1
  253. package/cjs/DateInput/DateField.js +106 -105
  254. package/cjs/DateInput/DateInput.js +124 -139
  255. package/cjs/DateInput/hooks/useDateInputState.js +46 -42
  256. package/cjs/DateInput/hooks/useFieldCursor.js +16 -16
  257. package/cjs/DateInput/hooks/useIsFocused.js +9 -9
  258. package/cjs/DateInput/hooks/useKeyboardInputEvent.js +9 -7
  259. package/cjs/DateInput/hooks/useSelectedState.js +4 -6
  260. package/cjs/DateInput/utils.d.ts +1 -1
  261. package/cjs/DateInput/utils.js +76 -72
  262. package/cjs/DatePicker/DatePicker.js +190 -225
  263. package/cjs/DatePicker/PredefinedRanges.js +24 -29
  264. package/cjs/DatePicker/Toolbar.d.ts +1 -1
  265. package/cjs/DatePicker/Toolbar.js +28 -26
  266. package/cjs/DatePicker/hooks/useCustomizedInput.d.ts +1 -1
  267. package/cjs/DatePicker/hooks/useCustomizedInput.js +21 -26
  268. package/cjs/DatePicker/hooks/useFocus.js +45 -39
  269. package/cjs/DatePicker/hooks/useMonthView.js +8 -8
  270. package/cjs/DatePicker/utils.d.ts +0 -7
  271. package/cjs/DatePicker/utils.js +29 -36
  272. package/cjs/DateRangeInput/DateRangeInput.js +131 -152
  273. package/cjs/DateRangeInput/utils.js +50 -50
  274. package/cjs/DateRangePicker/Calendar.js +24 -29
  275. package/cjs/DateRangePicker/DateRangePicker.js +260 -323
  276. package/cjs/DateRangePicker/DateRangePickerProvider.js +5 -4
  277. package/cjs/DateRangePicker/Header.js +20 -23
  278. package/cjs/DateRangePicker/disabledDateUtils.js +17 -35
  279. package/cjs/DateRangePicker/hooks/useCalendarHandlers.js +14 -14
  280. package/cjs/DateRangePicker/hooks/useDateDisabled.js +10 -6
  281. package/cjs/DateRangePicker/hooks/useDateRangePicker.js +3 -2
  282. package/cjs/DateRangePicker/index.js +2 -2
  283. package/cjs/DateRangePicker/utils.js +24 -20
  284. package/cjs/Divider/Divider.js +18 -26
  285. package/cjs/Divider/index.js +0 -0
  286. package/cjs/Drawer/Drawer.js +19 -29
  287. package/cjs/Drawer/DrawerActions.d.ts +1 -1
  288. package/cjs/Drawer/DrawerActions.js +1 -1
  289. package/cjs/Drawer/DrawerBody.js +5 -7
  290. package/cjs/Drawer/DrawerFooter.js +5 -7
  291. package/cjs/Drawer/DrawerHeader.js +5 -7
  292. package/cjs/Drawer/DrawerTitle.js +5 -7
  293. package/cjs/Drawer/index.js +0 -0
  294. package/cjs/Dropdown/Dropdown.d.ts +1 -1
  295. package/cjs/Dropdown/Dropdown.js +74 -106
  296. package/cjs/Dropdown/DropdownContext.js +1 -1
  297. package/cjs/Dropdown/DropdownItem.js +54 -73
  298. package/cjs/Dropdown/DropdownMenu.js +79 -97
  299. package/cjs/Dropdown/DropdownSeparator.js +11 -16
  300. package/cjs/Dropdown/DropdownState.js +22 -23
  301. package/cjs/Dropdown/DropdownToggle.js +20 -34
  302. package/cjs/Dropdown/index.js +0 -0
  303. package/cjs/Dropdown/useRenderDropdownItem.js +2 -2
  304. package/cjs/FlexboxGrid/FlexboxGrid.js +17 -27
  305. package/cjs/FlexboxGrid/FlexboxGridItem.js +17 -26
  306. package/cjs/FlexboxGrid/index.js +0 -0
  307. package/cjs/Footer/Footer.d.ts +1 -1
  308. package/cjs/Footer/Footer.js +1 -1
  309. package/cjs/Footer/index.js +0 -0
  310. package/cjs/Form/Form.js +108 -133
  311. package/cjs/Form/FormContext.js +5 -5
  312. package/cjs/Form/hooks/useFormClassNames.js +15 -14
  313. package/cjs/Form/hooks/useFormRef.js +9 -8
  314. package/cjs/Form/hooks/useFormValidate.js +77 -77
  315. package/cjs/Form/hooks/useFormValue.js +22 -19
  316. package/cjs/Form/hooks/useSchemaModel.js +31 -33
  317. package/cjs/FormControl/FormControl.d.ts +1 -1
  318. package/cjs/FormControl/FormControl.js +83 -97
  319. package/cjs/FormControl/hooks/useField.js +23 -18
  320. package/cjs/FormControl/hooks/useRegisterModel.js +7 -6
  321. package/cjs/FormControl/index.js +0 -0
  322. package/cjs/FormControlLabel/FormControlLabel.js +21 -28
  323. package/cjs/FormControlLabel/index.js +0 -0
  324. package/cjs/FormErrorMessage/FormErrorMessage.js +24 -34
  325. package/cjs/FormErrorMessage/index.js +0 -0
  326. package/cjs/FormGroup/FormGroup.js +33 -40
  327. package/cjs/FormGroup/index.js +1 -1
  328. package/cjs/FormHelpText/FormHelpText.js +22 -29
  329. package/cjs/FormHelpText/index.js +0 -0
  330. package/cjs/Grid/Grid.js +18 -25
  331. package/cjs/Grid/index.js +0 -0
  332. package/cjs/Header/Header.d.ts +1 -1
  333. package/cjs/Header/Header.js +1 -1
  334. package/cjs/Header/index.js +0 -0
  335. package/cjs/Heading/Heading.js +17 -24
  336. package/cjs/HeadingGroup/HeadingGroup.d.ts +1 -1
  337. package/cjs/HeadingGroup/HeadingGroup.js +1 -1
  338. package/cjs/Highlight/Highlight.js +21 -28
  339. package/cjs/Highlight/utils/highlightText.js +10 -10
  340. package/cjs/IconButton/IconButton.js +19 -29
  341. package/cjs/IconButton/index.js +0 -0
  342. package/cjs/Image/Image.js +61 -68
  343. package/cjs/Image/ImageWrapper.d.ts +1 -1
  344. package/cjs/Image/ImageWrapper.js +1 -1
  345. package/cjs/Image/hooks/useImage.js +26 -29
  346. package/cjs/InlineEdit/EditableControls.js +6 -6
  347. package/cjs/InlineEdit/InlineEdit.d.ts +3 -3
  348. package/cjs/InlineEdit/InlineEdit.js +54 -72
  349. package/cjs/InlineEdit/renderChildren.js +19 -20
  350. package/cjs/InlineEdit/useEditState.js +23 -30
  351. package/cjs/InlineEdit/useFocusEvent.js +17 -15
  352. package/cjs/Input/Input.js +41 -60
  353. package/cjs/Input/index.js +0 -0
  354. package/cjs/InputGroup/InputGroup.js +34 -48
  355. package/cjs/InputGroup/InputGroupAddon.js +14 -21
  356. package/cjs/InputGroup/InputGroupButton.js +14 -13
  357. package/cjs/InputGroup/index.js +0 -0
  358. package/cjs/InputNumber/InputNumber.js +73 -107
  359. package/cjs/InputNumber/index.js +0 -0
  360. package/cjs/InputPicker/InputAutosize.js +49 -66
  361. package/cjs/InputPicker/InputPicker.js +246 -294
  362. package/cjs/InputPicker/InputPickerContext.js +2 -2
  363. package/cjs/InputPicker/InputSearch.js +21 -24
  364. package/cjs/InputPicker/TagList.js +14 -14
  365. package/cjs/InputPicker/TextBox.js +20 -21
  366. package/cjs/InputPicker/hooks/useData.js +14 -18
  367. package/cjs/InputPicker/hooks/useInput.js +15 -13
  368. package/cjs/InputPicker/hooks/useMaxWidth.js +2 -4
  369. package/cjs/InputPicker/utils.js +3 -2
  370. package/cjs/List/List.js +55 -79
  371. package/cjs/List/ListContext.js +4 -6
  372. package/cjs/List/ListItem.js +39 -46
  373. package/cjs/List/helper/AutoScroller.js +35 -35
  374. package/cjs/List/helper/useManager.js +14 -18
  375. package/cjs/List/helper/useSortHelper.js +88 -101
  376. package/cjs/List/helper/utils.js +11 -16
  377. package/cjs/List/index.js +0 -0
  378. package/cjs/Loader/Loader.js +27 -42
  379. package/cjs/Loader/index.js +0 -0
  380. package/cjs/MaskedInput/MaskedInput.js +7 -5
  381. package/cjs/MaskedInput/TextMask.js +29 -43
  382. package/cjs/MaskedInput/adjustCaretPosition.js +64 -82
  383. package/cjs/MaskedInput/conformToMask.js +52 -55
  384. package/cjs/MaskedInput/createTextMaskInputElement.js +62 -58
  385. package/cjs/MaskedInput/index.js +0 -0
  386. package/cjs/MaskedInput/types.js +0 -0
  387. package/cjs/MaskedInput/utilities.js +8 -8
  388. package/cjs/Message/Message.js +51 -71
  389. package/cjs/Message/index.js +0 -0
  390. package/cjs/Modal/Modal.js +91 -118
  391. package/cjs/Modal/ModalBody.js +28 -31
  392. package/cjs/Modal/ModalContext.js +1 -1
  393. package/cjs/Modal/ModalDialog.d.ts +0 -10
  394. package/cjs/Modal/ModalDialog.js +25 -40
  395. package/cjs/Modal/ModalFooter.d.ts +1 -1
  396. package/cjs/Modal/ModalFooter.js +1 -1
  397. package/cjs/Modal/ModalHeader.js +23 -32
  398. package/cjs/Modal/ModalTitle.js +16 -24
  399. package/cjs/Modal/utils.js +28 -29
  400. package/cjs/MultiCascadeTree/MultiCascadeTree.js +76 -80
  401. package/cjs/MultiCascadeTree/SearchView.js +53 -58
  402. package/cjs/MultiCascadeTree/TreeView.js +84 -99
  403. package/cjs/MultiCascadeTree/hooks/useCascadeValue.js +68 -100
  404. package/cjs/MultiCascadeTree/hooks/useColumnData.js +10 -16
  405. package/cjs/MultiCascadeTree/hooks/useFlattenData.js +10 -10
  406. package/cjs/MultiCascadeTree/hooks/useSearch.js +17 -19
  407. package/cjs/MultiCascadeTree/hooks/useSelect.js +39 -37
  408. package/cjs/MultiCascadeTree/utils.js +44 -42
  409. package/cjs/MultiCascader/MultiCascader.js +190 -224
  410. package/cjs/MultiCascader/index.js +0 -0
  411. package/cjs/Nav/AdaptiveNavItem.js +12 -13
  412. package/cjs/Nav/Nav.js +52 -73
  413. package/cjs/Nav/NavContext.js +1 -1
  414. package/cjs/Nav/NavDropdown.d.ts +1 -1
  415. package/cjs/Nav/NavDropdown.js +63 -93
  416. package/cjs/Nav/NavDropdownItem.js +56 -72
  417. package/cjs/Nav/NavDropdownMenu.d.ts +1 -1
  418. package/cjs/Nav/NavDropdownMenu.js +67 -81
  419. package/cjs/Nav/NavDropdownToggle.js +19 -30
  420. package/cjs/Nav/NavItem.js +34 -49
  421. package/cjs/Nav/NavMenu.js +18 -20
  422. package/cjs/Nav/index.js +0 -0
  423. package/cjs/Navbar/Navbar.js +17 -18
  424. package/cjs/Navbar/NavbarBody.d.ts +1 -1
  425. package/cjs/Navbar/NavbarBody.js +1 -1
  426. package/cjs/Navbar/NavbarBrand.d.ts +1 -1
  427. package/cjs/Navbar/NavbarBrand.js +1 -1
  428. package/cjs/Navbar/NavbarDropdown.d.ts +1 -1
  429. package/cjs/Navbar/NavbarDropdown.js +52 -79
  430. package/cjs/Navbar/NavbarDropdownItem.js +50 -72
  431. package/cjs/Navbar/NavbarDropdownMenu.d.ts +1 -1
  432. package/cjs/Navbar/NavbarDropdownMenu.js +60 -76
  433. package/cjs/Navbar/NavbarDropdownToggle.js +18 -30
  434. package/cjs/Navbar/NavbarHeader.d.ts +1 -1
  435. package/cjs/Navbar/NavbarHeader.js +1 -1
  436. package/cjs/Navbar/NavbarItem.js +31 -45
  437. package/cjs/Navbar/index.js +1 -1
  438. package/cjs/Notification/Notification.d.ts +4 -3
  439. package/cjs/Notification/Notification.js +40 -56
  440. package/cjs/Notification/index.js +0 -0
  441. package/cjs/Pagination/LimitPicker.js +16 -18
  442. package/cjs/Pagination/Pagination.js +58 -81
  443. package/cjs/Pagination/PaginationButton.js +23 -24
  444. package/cjs/Pagination/PaginationGroup.js +44 -60
  445. package/cjs/Pagination/index.js +0 -0
  446. package/cjs/Panel/AccordionButton.js +17 -20
  447. package/cjs/Panel/Panel.js +56 -81
  448. package/cjs/Panel/PanelBody.js +35 -34
  449. package/cjs/Panel/PanelHeader.js +24 -25
  450. package/cjs/Panel/hooks/useExpanded.js +14 -13
  451. package/cjs/Panel/index.js +0 -0
  452. package/cjs/PanelGroup/PanelGroup.js +32 -47
  453. package/cjs/PanelGroup/index.js +1 -1
  454. package/cjs/Placeholder/Placeholder.js +1 -1
  455. package/cjs/Placeholder/PlaceholderGraph.js +24 -33
  456. package/cjs/Placeholder/PlaceholderGrid.js +49 -60
  457. package/cjs/Placeholder/PlaceholderParagraph.js +31 -48
  458. package/cjs/Placeholder/index.js +0 -0
  459. package/cjs/Popover/Popover.js +30 -44
  460. package/cjs/Popover/index.js +0 -0
  461. package/cjs/Progress/Progress.js +1 -1
  462. package/cjs/Progress/ProgressCircle.js +55 -76
  463. package/cjs/Progress/ProgressLine.js +39 -50
  464. package/cjs/Progress/index.js +0 -0
  465. package/cjs/Radio/Radio.js +56 -85
  466. package/cjs/Radio/index.js +0 -0
  467. package/cjs/RadioGroup/RadioGroup.js +40 -60
  468. package/cjs/RadioGroup/index.js +0 -0
  469. package/cjs/RadioTile/RadioTile.js +43 -62
  470. package/cjs/RadioTileGroup/RadioTileGroup.js +32 -47
  471. package/cjs/RangeSlider/RangeSlider.js +113 -138
  472. package/cjs/RangeSlider/index.js +0 -0
  473. package/cjs/Rate/Character.js +30 -43
  474. package/cjs/Rate/Rate.js +63 -97
  475. package/cjs/Rate/index.js +0 -0
  476. package/cjs/Rate/utils.js +8 -8
  477. package/cjs/Row/Row.js +32 -40
  478. package/cjs/Row/index.js +0 -0
  479. package/cjs/SafeAnchor/SafeAnchor.js +14 -20
  480. package/cjs/SafeAnchor/index.js +0 -0
  481. package/cjs/Schema/Schema.js +1 -1
  482. package/cjs/Schema/index.js +0 -0
  483. package/cjs/SelectPicker/SelectPicker.d.ts +0 -1
  484. package/cjs/SelectPicker/SelectPicker.js +131 -169
  485. package/cjs/SelectPicker/index.js +0 -0
  486. package/cjs/Sidebar/Sidebar.js +28 -35
  487. package/cjs/Sidebar/index.js +0 -0
  488. package/cjs/Sidenav/ExpandedSidenavDropdown.d.ts +1 -1
  489. package/cjs/Sidenav/ExpandedSidenavDropdown.js +70 -96
  490. package/cjs/Sidenav/ExpandedSidenavDropdownItem.js +51 -74
  491. package/cjs/Sidenav/ExpandedSidenavDropdownMenu.js +48 -65
  492. package/cjs/Sidenav/Node.js +26 -37
  493. package/cjs/Sidenav/Sidenav.js +43 -65
  494. package/cjs/Sidenav/SidenavBody.d.ts +1 -1
  495. package/cjs/Sidenav/SidenavBody.js +1 -1
  496. package/cjs/Sidenav/SidenavDropdown.d.ts +1 -1
  497. package/cjs/Sidenav/SidenavDropdown.js +81 -111
  498. package/cjs/Sidenav/SidenavDropdownCollapse.js +22 -30
  499. package/cjs/Sidenav/SidenavDropdownItem.d.ts +1 -1
  500. package/cjs/Sidenav/SidenavDropdownItem.js +57 -75
  501. package/cjs/Sidenav/SidenavDropdownMenu.d.ts +1 -1
  502. package/cjs/Sidenav/SidenavDropdownMenu.js +67 -78
  503. package/cjs/Sidenav/SidenavDropdownToggle.js +17 -29
  504. package/cjs/Sidenav/SidenavHeader.d.ts +1 -1
  505. package/cjs/Sidenav/SidenavHeader.js +1 -1
  506. package/cjs/Sidenav/SidenavItem.js +64 -82
  507. package/cjs/Sidenav/SidenavToggle.js +20 -29
  508. package/cjs/Sidenav/index.js +0 -0
  509. package/cjs/Slider/Graduated.js +28 -37
  510. package/cjs/Slider/Handle.js +52 -68
  511. package/cjs/Slider/Input.js +10 -7
  512. package/cjs/Slider/Mark.js +16 -24
  513. package/cjs/Slider/ProgressBar.js +24 -34
  514. package/cjs/Slider/Slider.d.ts +0 -26
  515. package/cjs/Slider/Slider.js +77 -118
  516. package/cjs/Slider/index.js +0 -0
  517. package/cjs/Slider/useDrag.js +29 -29
  518. package/cjs/Slider/utils.js +3 -4
  519. package/cjs/Stack/HStack.js +8 -10
  520. package/cjs/Stack/Stack.js +37 -58
  521. package/cjs/Stack/StackItem.d.ts +0 -11
  522. package/cjs/Stack/StackItem.js +25 -36
  523. package/cjs/Stack/VStack.js +9 -12
  524. package/cjs/Stat/Stat.js +20 -25
  525. package/cjs/Stat/StatHelpText.d.ts +1 -1
  526. package/cjs/Stat/StatHelpText.js +1 -1
  527. package/cjs/Stat/StatLabel.js +16 -22
  528. package/cjs/Stat/StatTrend.js +20 -28
  529. package/cjs/Stat/StatValue.js +15 -21
  530. package/cjs/Stat/StatValueUnit.d.ts +1 -1
  531. package/cjs/Stat/StatValueUnit.js +1 -1
  532. package/cjs/StatGroup/StatGroup.js +24 -28
  533. package/cjs/Steps/StepItem.js +31 -43
  534. package/cjs/Steps/Steps.js +33 -45
  535. package/cjs/Steps/index.js +0 -0
  536. package/cjs/Table/Table.js +13 -13
  537. package/cjs/Tabs/Tab.js +1 -9
  538. package/cjs/Tabs/TabPanel.js +13 -14
  539. package/cjs/Tabs/Tabs.js +82 -97
  540. package/cjs/Tag/Tag.js +29 -41
  541. package/cjs/Tag/index.js +0 -0
  542. package/cjs/TagGroup/TagGroup.d.ts +1 -1
  543. package/cjs/TagGroup/TagGroup.js +1 -1
  544. package/cjs/TagGroup/index.js +0 -0
  545. package/cjs/TagInput/index.js +24 -31
  546. package/cjs/TagPicker/index.js +19 -22
  547. package/cjs/Text/Text.js +32 -43
  548. package/cjs/TimePicker/TimePicker.js +11 -14
  549. package/cjs/TimeRangePicker/TimeRangePicker.js +9 -7
  550. package/cjs/Timeline/Timeline.js +29 -47
  551. package/cjs/Timeline/TimelineItem.js +18 -28
  552. package/cjs/Timeline/index.js +0 -0
  553. package/cjs/Toggle/Toggle.js +45 -70
  554. package/cjs/Toggle/index.js +0 -0
  555. package/cjs/Tooltip/Tooltip.js +24 -33
  556. package/cjs/Tooltip/index.js +0 -0
  557. package/cjs/Tree/IndentLine.js +4 -3
  558. package/cjs/Tree/Tree.js +63 -66
  559. package/cjs/Tree/TreeNode.js +62 -61
  560. package/cjs/Tree/TreeNodeToggle.js +19 -16
  561. package/cjs/Tree/TreeView.js +175 -186
  562. package/cjs/Tree/hooks/useExpandTree.js +33 -38
  563. package/cjs/Tree/hooks/useFlattenTree.js +30 -31
  564. package/cjs/Tree/hooks/useFocusTree.d.ts +1 -1
  565. package/cjs/Tree/hooks/useFocusTree.js +77 -80
  566. package/cjs/Tree/hooks/useForceUpdate.js +2 -3
  567. package/cjs/Tree/hooks/useTreeDrag.js +86 -86
  568. package/cjs/Tree/hooks/useTreeNodeProps.js +52 -48
  569. package/cjs/Tree/hooks/useTreeNodeRefs.d.ts +1 -1
  570. package/cjs/Tree/hooks/useTreeNodeRefs.js +3 -3
  571. package/cjs/Tree/hooks/useTreeSearch.js +33 -38
  572. package/cjs/Tree/hooks/useTreeWithChildren.js +21 -35
  573. package/cjs/Tree/hooks/useVirtualizedTreeData.js +25 -22
  574. package/cjs/Tree/index.js +0 -0
  575. package/cjs/Tree/types.js +1 -1
  576. package/cjs/Tree/utils/flattenTree.js +16 -24
  577. package/cjs/Tree/utils/focusableTree.js +66 -59
  578. package/cjs/Tree/utils/formatNodeRefKey.js +1 -1
  579. package/cjs/Tree/utils/getExpandItemValues.js +7 -5
  580. package/cjs/Tree/utils/getNodeParentKeys.js +4 -4
  581. package/cjs/Tree/utils/getTreeActiveNode.js +2 -2
  582. package/cjs/Tree/utils/hasVisibleChildren.js +1 -3
  583. package/cjs/Tree/utils/indentTreeNode.js +7 -5
  584. package/cjs/Tree/utils/treeKeyboardInteractions.js +13 -9
  585. package/cjs/TreePicker/TreePicker.js +172 -182
  586. package/cjs/TreePicker/hooks/useFocusState.js +17 -19
  587. package/cjs/TreePicker/index.js +0 -0
  588. package/cjs/Uploader/UploadFileItem.js +70 -92
  589. package/cjs/Uploader/UploadTrigger.js +47 -70
  590. package/cjs/Uploader/Uploader.js +156 -216
  591. package/cjs/Uploader/index.js +0 -0
  592. package/cjs/Uploader/utils/ajaxUpload.js +26 -27
  593. package/cjs/Uploader/utils/previewFile.js +3 -3
  594. package/cjs/VisuallyHidden/VisuallyHidden.d.ts +1 -1
  595. package/cjs/VisuallyHidden/VisuallyHidden.js +1 -1
  596. package/cjs/Whisper/Whisper.js +14 -32
  597. package/cjs/Whisper/index.js +0 -0
  598. package/cjs/index.js +1 -1
  599. package/cjs/internals/CloseButton/CloseButton.js +19 -18
  600. package/cjs/internals/Disclosure/Disclosure.js +41 -42
  601. package/cjs/internals/Disclosure/DisclosureButton.js +16 -13
  602. package/cjs/internals/Disclosure/DisclosureContent.js +9 -5
  603. package/cjs/internals/Disclosure/DisclosureContext.js +2 -2
  604. package/cjs/internals/Disclosure/useDisclosureContext.js +2 -2
  605. package/cjs/internals/Menu/Menu.d.ts +1 -5
  606. package/cjs/internals/Menu/Menu.js +80 -80
  607. package/cjs/internals/Menu/MenuContext.js +3 -3
  608. package/cjs/internals/Menu/MenuItem.d.ts +0 -7
  609. package/cjs/internals/Menu/MenuItem.js +22 -30
  610. package/cjs/internals/Menu/Menubar.js +25 -25
  611. package/cjs/internals/Menu/useMenu.js +45 -41
  612. package/cjs/internals/Overlay/Modal.d.ts +6 -20
  613. package/cjs/internals/Overlay/Modal.js +78 -117
  614. package/cjs/internals/Overlay/ModalManager.js +22 -28
  615. package/cjs/internals/Overlay/Overlay.d.ts +0 -21
  616. package/cjs/internals/Overlay/Overlay.js +57 -76
  617. package/cjs/internals/Overlay/OverlayContext.js +1 -1
  618. package/cjs/internals/Overlay/OverlayTrigger.js +139 -152
  619. package/cjs/internals/Overlay/Position.js +63 -86
  620. package/cjs/internals/Overlay/positionUtils.js +114 -107
  621. package/cjs/internals/Picker/ListCheckItem.js +44 -49
  622. package/cjs/internals/Picker/ListItem.js +32 -35
  623. package/cjs/internals/Picker/ListItemGroup.js +16 -19
  624. package/cjs/internals/Picker/Listbox.d.ts +1 -1
  625. package/cjs/internals/Picker/Listbox.js +99 -119
  626. package/cjs/internals/Picker/PickerIndicator.js +21 -17
  627. package/cjs/internals/Picker/PickerLabel.js +7 -8
  628. package/cjs/internals/Picker/PickerPopup.js +26 -30
  629. package/cjs/internals/Picker/PickerToggle.js +50 -57
  630. package/cjs/internals/Picker/PickerToggleTrigger.js +21 -22
  631. package/cjs/internals/Picker/SelectedElement.js +19 -18
  632. package/cjs/internals/Picker/ToggleButton.js +1 -1
  633. package/cjs/internals/Picker/hooks/useCombobox.js +10 -9
  634. package/cjs/internals/Picker/hooks/useFocusItemValue.js +91 -97
  635. package/cjs/internals/Picker/hooks/usePickerClassName.js +30 -21
  636. package/cjs/internals/Picker/hooks/usePickerRef.js +23 -19
  637. package/cjs/internals/Picker/hooks/useSearch.js +19 -23
  638. package/cjs/internals/Picker/hooks/useToggleKeyDownEvent.js +21 -20
  639. package/cjs/internals/Picker/index.d.ts +0 -1
  640. package/cjs/internals/Picker/index.js +1 -8
  641. package/cjs/internals/Picker/utils.js +19 -18
  642. package/cjs/internals/Plaintext/Plaintext.js +18 -20
  643. package/cjs/internals/Ripple/Ripple.js +42 -51
  644. package/cjs/internals/ScrollView/ScrollView.js +31 -30
  645. package/cjs/internals/ScrollView/hooks/useScrollState.js +16 -18
  646. package/cjs/internals/SearchBox/SearchBox.js +19 -22
  647. package/cjs/internals/Tree/TreeProvider.d.ts +4 -1
  648. package/cjs/internals/Tree/TreeProvider.js +49 -37
  649. package/cjs/internals/Tree/TreeView.js +27 -25
  650. package/cjs/internals/Tree/utils/filterNodesOfTree.js +6 -6
  651. package/cjs/internals/Tree/utils/findNodeOfTree.js +5 -5
  652. package/cjs/internals/Tree/utils/getParentMap.js +10 -15
  653. package/cjs/internals/Tree/utils/getPathTowardsItem.js +2 -2
  654. package/cjs/internals/Windowing/AutoSizer.js +34 -35
  655. package/cjs/internals/Windowing/List.d.ts +1 -1
  656. package/cjs/internals/Windowing/List.js +42 -46
  657. package/cjs/internals/Windowing/index.js +1 -1
  658. package/cjs/internals/constants/index.js +12 -12
  659. package/cjs/internals/constants/statusIcons.js +2 -2
  660. package/cjs/internals/hooks/useClassNames.js +16 -24
  661. package/cjs/internals/hooks/useClickOutside.js +11 -10
  662. package/cjs/internals/hooks/useControlled.js +4 -6
  663. package/cjs/internals/hooks/useElementResize.js +4 -4
  664. package/cjs/internals/hooks/useEnsuredRef.js +1 -1
  665. package/cjs/internals/hooks/useEventCallback.js +3 -3
  666. package/cjs/internals/hooks/useEventListener.js +4 -4
  667. package/cjs/internals/hooks/useFocus.js +7 -7
  668. package/cjs/internals/hooks/useFocusVirtualListItem.js +5 -5
  669. package/cjs/internals/hooks/useInternalId.js +2 -2
  670. package/cjs/internals/hooks/useIsMounted.js +4 -6
  671. package/cjs/internals/hooks/useIsomorphicLayoutEffect.js +1 -1
  672. package/cjs/internals/hooks/useMap.js +8 -12
  673. package/cjs/internals/hooks/useMount.js +4 -3
  674. package/cjs/internals/hooks/usePortal.js +21 -25
  675. package/cjs/internals/hooks/useRootClose.js +16 -15
  676. package/cjs/internals/hooks/useTimeout.js +8 -8
  677. package/cjs/internals/hooks/useToggleCaret.js +4 -3
  678. package/cjs/internals/hooks/useUniqueId.js +3 -15
  679. package/cjs/internals/hooks/useUpdateEffect.js +4 -3
  680. package/cjs/internals/hooks/useUpdatedRef.js +1 -1
  681. package/cjs/internals/hooks/useWillUnmount.js +2 -6
  682. package/cjs/internals/symbols.js +2 -2
  683. package/cjs/internals/types/index.d.ts +23 -19
  684. package/cjs/internals/utils/BrowserDetection.d.ts +0 -8
  685. package/cjs/internals/utils/BrowserDetection.js +10 -56
  686. package/cjs/internals/utils/ReactChildren.js +23 -25
  687. package/cjs/internals/utils/composeFunctions.js +1 -5
  688. package/cjs/internals/utils/createChainedFunction.js +1 -3
  689. package/cjs/internals/utils/createComponent.d.ts +1 -1
  690. package/cjs/internals/utils/createComponent.js +22 -28
  691. package/cjs/internals/utils/css.d.ts +4 -0
  692. package/cjs/internals/utils/css.js +22 -0
  693. package/cjs/internals/utils/date/copyTime.js +14 -13
  694. package/cjs/internals/utils/date/disableTime.js +13 -13
  695. package/cjs/internals/utils/date/extractTimeFormat.js +1 -1
  696. package/cjs/internals/utils/date/formatCheck.js +10 -15
  697. package/cjs/internals/utils/date/getWeekKeys.js +1 -1
  698. package/cjs/internals/utils/date/getWeekStartDates.js +14 -14
  699. package/cjs/internals/utils/date/index.d.ts +46 -46
  700. package/cjs/internals/utils/date/index.js +92 -93
  701. package/cjs/internals/utils/date/omitHideDisabledProps.js +2 -5
  702. package/cjs/internals/utils/date/reverseDateRangeOmitTime.js +1 -2
  703. package/cjs/internals/utils/date/types.js +2 -2
  704. package/cjs/internals/utils/date/useDateMode.js +8 -7
  705. package/cjs/internals/utils/deprecateComponent.js +3 -3
  706. package/cjs/internals/utils/dom.js +2 -6
  707. package/cjs/internals/utils/getDOMNode.js +2 -2
  708. package/cjs/internals/utils/getDataGroupBy.js +11 -13
  709. package/cjs/internals/utils/getStringLength.js +2 -2
  710. package/cjs/internals/utils/htmlPropsUtils.js +15 -15
  711. package/cjs/internals/utils/index.d.ts +1 -0
  712. package/cjs/internals/utils/index.js +6 -3
  713. package/cjs/internals/utils/mergeRefs.js +5 -7
  714. package/cjs/internals/utils/placementPolyfill.js +1 -3
  715. package/cjs/internals/utils/prefix.js +8 -12
  716. package/cjs/internals/utils/render.d.ts +1 -1
  717. package/cjs/internals/utils/render.js +10 -32
  718. package/cjs/internals/utils/safeSetSelection.js +2 -4
  719. package/cjs/internals/utils/shallowEqual.js +5 -5
  720. package/cjs/internals/utils/stringifyReactNode.js +6 -6
  721. package/cjs/internals/utils/tplTransform.js +4 -10
  722. package/cjs/internals/utils/warnOnce.js +3 -3
  723. package/cjs/locales/ar_EG.js +12 -12
  724. package/cjs/locales/ca_ES.d.ts +4 -4
  725. package/cjs/locales/ca_ES.js +12 -12
  726. package/cjs/locales/cs_CZ.js +12 -12
  727. package/cjs/locales/da_DK.js +12 -12
  728. package/cjs/locales/de_DE.js +12 -12
  729. package/cjs/locales/en_GB.js +12 -12
  730. package/cjs/locales/en_US.js +12 -12
  731. package/cjs/locales/es_AR.js +12 -12
  732. package/cjs/locales/es_ES.js +12 -12
  733. package/cjs/locales/fa_IR.js +12 -12
  734. package/cjs/locales/fi_FI.js +12 -12
  735. package/cjs/locales/fr_FR.js +12 -12
  736. package/cjs/locales/hu_HU.js +12 -12
  737. package/cjs/locales/it_IT.js +12 -12
  738. package/cjs/locales/ja_JP.js +12 -12
  739. package/cjs/locales/kk_KZ.js +12 -12
  740. package/cjs/locales/ko_KR.js +12 -12
  741. package/cjs/locales/ne_NP.js +12 -12
  742. package/cjs/locales/nl_NL.js +12 -12
  743. package/cjs/locales/pt_BR.js +12 -12
  744. package/cjs/locales/ru_RU.js +12 -12
  745. package/cjs/locales/sv_SE.js +12 -12
  746. package/cjs/locales/tr_TR.js +12 -12
  747. package/cjs/locales/zh_CN.js +12 -12
  748. package/cjs/locales/zh_TW.js +12 -12
  749. package/cjs/toaster/ToastContainer.js +99 -113
  750. package/cjs/toaster/ToastContext.js +1 -1
  751. package/cjs/toaster/hooks/useDelayedClosure.js +20 -17
  752. package/cjs/toaster/toaster.js +20 -43
  753. package/cjs/useBreakpointValue/useBreakpointValue.js +7 -6
  754. package/cjs/useMediaQuery/useMediaQuery.d.ts +1 -7
  755. package/cjs/useMediaQuery/useMediaQuery.js +20 -81
  756. package/cjs/useToaster/useToaster.js +38 -39
  757. package/dist/rsuite-no-reset-rtl.css +514 -3058
  758. package/dist/rsuite-no-reset-rtl.min.css +1 -1
  759. package/dist/rsuite-no-reset-rtl.min.css.map +1 -1
  760. package/dist/rsuite-no-reset.css +514 -3058
  761. package/dist/rsuite-no-reset.min.css +1 -1
  762. package/dist/rsuite-no-reset.min.css.map +1 -1
  763. package/dist/rsuite-rtl.css +532 -3086
  764. package/dist/rsuite-rtl.min.css +1 -1
  765. package/dist/rsuite-rtl.min.css.map +1 -1
  766. package/dist/rsuite.css +532 -3086
  767. package/dist/rsuite.js +3310 -3605
  768. package/dist/rsuite.js.map +1 -1
  769. package/dist/rsuite.min.css +1 -1
  770. package/dist/rsuite.min.css.map +1 -1
  771. package/dist/rsuite.min.js +1 -1
  772. package/dist/rsuite.min.js.LICENSE.txt +0 -2
  773. package/dist/rsuite.min.js.map +1 -1
  774. package/esm/Accordion/Accordion.js +4 -3
  775. package/esm/Affix/Affix.d.ts +1 -1
  776. package/esm/Affix/Affix.js +54 -65
  777. package/esm/Affix/index.js +0 -0
  778. package/esm/Animation/Bounce.js +11 -10
  779. package/esm/Animation/Collapse.js +40 -48
  780. package/esm/Animation/Fade.js +13 -12
  781. package/esm/Animation/Slide.js +14 -14
  782. package/esm/Animation/Transition.d.ts +1 -40
  783. package/esm/Animation/Transition.js +97 -115
  784. package/esm/Animation/index.js +6 -6
  785. package/esm/Animation/utils.d.ts +0 -9
  786. package/esm/Animation/utils.js +2 -11
  787. package/esm/AutoComplete/AutoComplete.js +85 -126
  788. package/esm/AutoComplete/Combobox.js +11 -10
  789. package/esm/AutoComplete/index.js +0 -0
  790. package/esm/AutoComplete/utils.js +5 -5
  791. package/esm/Avatar/Avatar.js +50 -72
  792. package/esm/Avatar/AvatarIcon.js +12 -14
  793. package/esm/Avatar/index.js +0 -0
  794. package/esm/Avatar/useImage.js +19 -19
  795. package/esm/AvatarGroup/AvatarGroup.js +30 -42
  796. package/esm/AvatarGroup/index.js +0 -0
  797. package/esm/Badge/Badge.js +24 -36
  798. package/esm/Badge/index.js +0 -0
  799. package/esm/Breadcrumb/Breadcrumb.js +33 -48
  800. package/esm/Breadcrumb/BreadcrumbItem.d.ts +1 -1
  801. package/esm/Breadcrumb/BreadcrumbItem.js +21 -34
  802. package/esm/Breadcrumb/index.js +0 -0
  803. package/esm/Button/Button.js +43 -62
  804. package/esm/Button/index.js +0 -0
  805. package/esm/ButtonGroup/ButtonGroup.js +27 -43
  806. package/esm/ButtonGroup/ButtonGroupContext.js +1 -1
  807. package/esm/ButtonGroup/index.js +0 -0
  808. package/esm/ButtonToolbar/ButtonToolbar.js +17 -23
  809. package/esm/ButtonToolbar/index.js +0 -0
  810. package/esm/Calendar/Calendar.js +46 -66
  811. package/esm/Calendar/CalendarBody.js +26 -26
  812. package/esm/Calendar/CalendarContainer.js +87 -94
  813. package/esm/Calendar/CalendarHeader.js +49 -49
  814. package/esm/Calendar/CalendarProvider.js +2 -2
  815. package/esm/Calendar/Grid/Grid.js +22 -25
  816. package/esm/Calendar/Grid/GridCell.js +39 -37
  817. package/esm/Calendar/Grid/GridHeaderRow.js +27 -29
  818. package/esm/Calendar/Grid/GridRow.js +47 -52
  819. package/esm/Calendar/MonthDropdown/MonthDropdown.js +61 -62
  820. package/esm/Calendar/MonthDropdown/MonthDropdownItem.js +35 -38
  821. package/esm/Calendar/TimeDropdown/TimeColumn.js +7 -7
  822. package/esm/Calendar/TimeDropdown/TimeDropdown.js +63 -63
  823. package/esm/Calendar/TimeDropdown/utils/formatWithLeadingZero.js +1 -1
  824. package/esm/Calendar/TimeDropdown/utils/getClockTime.js +7 -5
  825. package/esm/Calendar/TimeDropdown/utils/getTimeLimits.js +3 -3
  826. package/esm/Calendar/TimeDropdown/utils/scrollToTime.js +6 -7
  827. package/esm/Calendar/hooks/useCalendar.js +1 -1
  828. package/esm/Calendar/hooks/useCalendarDate.d.ts +1 -1
  829. package/esm/Calendar/hooks/useCalendarDate.js +9 -11
  830. package/esm/Calendar/hooks/useCalendarState.js +16 -18
  831. package/esm/Calendar/utils/isEveryDateInMonth.js +2 -2
  832. package/esm/Card/Card.js +30 -39
  833. package/esm/Card/CardBody.d.ts +1 -1
  834. package/esm/Card/CardBody.js +1 -1
  835. package/esm/Card/CardFooter.d.ts +1 -1
  836. package/esm/Card/CardFooter.js +1 -1
  837. package/esm/Card/CardHeader.d.ts +1 -1
  838. package/esm/Card/CardHeader.js +1 -1
  839. package/esm/CardGroup/CardGroup.js +24 -28
  840. package/esm/Carousel/Carousel.js +72 -94
  841. package/esm/Carousel/index.js +0 -0
  842. package/esm/CascadeTree/CascadeTree.d.ts +0 -1
  843. package/esm/CascadeTree/CascadeTree.js +92 -104
  844. package/esm/CascadeTree/SearchView.js +47 -52
  845. package/esm/CascadeTree/TreeView.js +83 -91
  846. package/esm/CascadeTree/hooks/usePaths.js +18 -19
  847. package/esm/CascadeTree/hooks/useSearch.js +22 -22
  848. package/esm/CascadeTree/hooks/useSelect.js +26 -24
  849. package/esm/CascadeTree/utils.js +10 -8
  850. package/esm/Cascader/Cascader.d.ts +0 -1
  851. package/esm/Cascader/Cascader.js +202 -239
  852. package/esm/Cascader/index.js +0 -0
  853. package/esm/Cascader/useActive.js +15 -15
  854. package/esm/CheckPicker/CheckPicker.d.ts +0 -1
  855. package/esm/CheckPicker/CheckPicker.js +146 -200
  856. package/esm/CheckPicker/index.js +0 -0
  857. package/esm/CheckTree/CheckTree.js +68 -73
  858. package/esm/CheckTree/CheckTreeNode.js +52 -50
  859. package/esm/CheckTree/CheckTreeView.js +174 -181
  860. package/esm/CheckTree/hooks/useTreeCheckState.js +26 -25
  861. package/esm/CheckTree/hooks/useTreeNodeProps.js +39 -36
  862. package/esm/CheckTree/hooks/useTreeValue.js +6 -7
  863. package/esm/CheckTree/utils.js +62 -65
  864. package/esm/CheckTreePicker/CheckTreePicker.js +170 -185
  865. package/esm/CheckTreePicker/hooks/useFocusState.js +13 -15
  866. package/esm/CheckTreePicker/index.js +0 -0
  867. package/esm/Checkbox/Checkbox.js +64 -101
  868. package/esm/Checkbox/index.js +0 -0
  869. package/esm/CheckboxGroup/CheckboxGroup.js +39 -61
  870. package/esm/CheckboxGroup/CheckboxGroupContext.js +1 -1
  871. package/esm/CheckboxGroup/index.js +0 -0
  872. package/esm/Col/Col.js +32 -66
  873. package/esm/Col/index.js +0 -0
  874. package/esm/Container/Container.d.ts +1 -1
  875. package/esm/Container/Container.js +21 -31
  876. package/esm/Container/index.js +0 -0
  877. package/esm/Content/Content.d.ts +1 -1
  878. package/esm/Content/Content.js +1 -1
  879. package/esm/Content/index.js +0 -0
  880. package/esm/CustomProvider/CustomProvider.d.ts +8 -16
  881. package/esm/CustomProvider/CustomProvider.js +46 -53
  882. package/esm/CustomProvider/FormattedDate.js +7 -4
  883. package/esm/CustomProvider/FormattedNumber.js +8 -7
  884. package/esm/CustomProvider/useCustom.js +44 -47
  885. package/esm/DOMHelper/index.js +4 -4
  886. package/esm/DOMHelper/isElement.js +1 -1
  887. package/esm/DateInput/DateField.js +101 -102
  888. package/esm/DateInput/DateInput.js +119 -134
  889. package/esm/DateInput/hooks/useDateInputState.js +46 -42
  890. package/esm/DateInput/hooks/useFieldCursor.js +16 -16
  891. package/esm/DateInput/hooks/useIsFocused.js +9 -9
  892. package/esm/DateInput/hooks/useKeyboardInputEvent.js +9 -7
  893. package/esm/DateInput/hooks/useSelectedState.js +4 -6
  894. package/esm/DateInput/utils.d.ts +1 -1
  895. package/esm/DateInput/utils.js +76 -71
  896. package/esm/DatePicker/DatePicker.js +188 -223
  897. package/esm/DatePicker/PredefinedRanges.js +23 -28
  898. package/esm/DatePicker/Toolbar.d.ts +1 -1
  899. package/esm/DatePicker/Toolbar.js +28 -26
  900. package/esm/DatePicker/hooks/useCustomizedInput.d.ts +1 -1
  901. package/esm/DatePicker/hooks/useCustomizedInput.js +21 -26
  902. package/esm/DatePicker/hooks/useFocus.js +45 -39
  903. package/esm/DatePicker/hooks/useMonthView.js +8 -8
  904. package/esm/DatePicker/utils.d.ts +0 -7
  905. package/esm/DatePicker/utils.js +26 -34
  906. package/esm/DateRangeInput/DateRangeInput.js +130 -151
  907. package/esm/DateRangeInput/utils.js +50 -49
  908. package/esm/DateRangePicker/Calendar.js +23 -28
  909. package/esm/DateRangePicker/DateRangePicker.js +259 -322
  910. package/esm/DateRangePicker/DateRangePickerProvider.js +3 -3
  911. package/esm/DateRangePicker/Header.js +20 -23
  912. package/esm/DateRangePicker/disabledDateUtils.js +16 -34
  913. package/esm/DateRangePicker/hooks/useCalendarHandlers.js +14 -14
  914. package/esm/DateRangePicker/hooks/useDateDisabled.js +10 -6
  915. package/esm/DateRangePicker/hooks/useDateRangePicker.js +1 -1
  916. package/esm/DateRangePicker/index.js +1 -1
  917. package/esm/DateRangePicker/utils.js +20 -19
  918. package/esm/Divider/Divider.js +18 -26
  919. package/esm/Divider/index.js +0 -0
  920. package/esm/Drawer/Drawer.js +19 -29
  921. package/esm/Drawer/DrawerActions.d.ts +1 -1
  922. package/esm/Drawer/DrawerActions.js +1 -1
  923. package/esm/Drawer/DrawerBody.js +5 -7
  924. package/esm/Drawer/DrawerFooter.js +5 -7
  925. package/esm/Drawer/DrawerHeader.js +5 -7
  926. package/esm/Drawer/DrawerTitle.js +5 -7
  927. package/esm/Drawer/index.js +0 -0
  928. package/esm/Dropdown/Dropdown.d.ts +1 -1
  929. package/esm/Dropdown/Dropdown.js +73 -105
  930. package/esm/Dropdown/DropdownContext.js +1 -1
  931. package/esm/Dropdown/DropdownItem.js +53 -72
  932. package/esm/Dropdown/DropdownMenu.js +76 -94
  933. package/esm/Dropdown/DropdownSeparator.js +11 -16
  934. package/esm/Dropdown/DropdownState.js +22 -22
  935. package/esm/Dropdown/DropdownToggle.js +20 -34
  936. package/esm/Dropdown/index.js +0 -0
  937. package/esm/Dropdown/useRenderDropdownItem.js +1 -1
  938. package/esm/FlexboxGrid/FlexboxGrid.js +17 -27
  939. package/esm/FlexboxGrid/FlexboxGridItem.js +17 -26
  940. package/esm/FlexboxGrid/index.js +0 -0
  941. package/esm/Footer/Footer.d.ts +1 -1
  942. package/esm/Footer/Footer.js +1 -1
  943. package/esm/Footer/index.js +0 -0
  944. package/esm/Form/Form.js +105 -130
  945. package/esm/Form/FormContext.js +4 -4
  946. package/esm/Form/hooks/useFormClassNames.js +15 -14
  947. package/esm/Form/hooks/useFormRef.js +9 -7
  948. package/esm/Form/hooks/useFormValidate.js +77 -77
  949. package/esm/Form/hooks/useFormValue.js +22 -19
  950. package/esm/Form/hooks/useSchemaModel.js +31 -33
  951. package/esm/FormControl/FormControl.d.ts +1 -1
  952. package/esm/FormControl/FormControl.js +81 -95
  953. package/esm/FormControl/hooks/useField.js +23 -18
  954. package/esm/FormControl/hooks/useRegisterModel.js +7 -6
  955. package/esm/FormControl/index.js +0 -0
  956. package/esm/FormControlLabel/FormControlLabel.js +21 -28
  957. package/esm/FormControlLabel/index.js +0 -0
  958. package/esm/FormErrorMessage/FormErrorMessage.js +24 -34
  959. package/esm/FormErrorMessage/index.js +0 -0
  960. package/esm/FormGroup/FormGroup.js +31 -39
  961. package/esm/FormHelpText/FormHelpText.js +22 -29
  962. package/esm/FormHelpText/index.js +0 -0
  963. package/esm/Grid/Grid.js +18 -25
  964. package/esm/Grid/index.js +0 -0
  965. package/esm/Header/Header.d.ts +1 -1
  966. package/esm/Header/Header.js +1 -1
  967. package/esm/Header/index.js +0 -0
  968. package/esm/Heading/Heading.js +17 -24
  969. package/esm/HeadingGroup/HeadingGroup.d.ts +1 -1
  970. package/esm/HeadingGroup/HeadingGroup.js +1 -1
  971. package/esm/Highlight/Highlight.js +21 -28
  972. package/esm/Highlight/utils/highlightText.js +10 -10
  973. package/esm/IconButton/IconButton.js +19 -29
  974. package/esm/IconButton/index.js +0 -0
  975. package/esm/Image/Image.js +59 -66
  976. package/esm/Image/ImageWrapper.d.ts +1 -1
  977. package/esm/Image/ImageWrapper.js +1 -1
  978. package/esm/Image/hooks/useImage.js +24 -28
  979. package/esm/InlineEdit/EditableControls.js +6 -6
  980. package/esm/InlineEdit/InlineEdit.d.ts +3 -3
  981. package/esm/InlineEdit/InlineEdit.js +52 -70
  982. package/esm/InlineEdit/renderChildren.js +19 -20
  983. package/esm/InlineEdit/useEditState.js +23 -29
  984. package/esm/InlineEdit/useFocusEvent.js +17 -15
  985. package/esm/Input/Input.js +40 -59
  986. package/esm/Input/index.js +0 -0
  987. package/esm/InputGroup/InputGroup.js +33 -47
  988. package/esm/InputGroup/InputGroupAddon.js +14 -21
  989. package/esm/InputGroup/InputGroupButton.js +14 -13
  990. package/esm/InputGroup/index.js +0 -0
  991. package/esm/InputNumber/InputNumber.js +72 -106
  992. package/esm/InputNumber/index.js +0 -0
  993. package/esm/InputPicker/InputAutosize.js +48 -65
  994. package/esm/InputPicker/InputPicker.js +241 -289
  995. package/esm/InputPicker/InputPickerContext.js +2 -2
  996. package/esm/InputPicker/InputSearch.js +21 -24
  997. package/esm/InputPicker/TagList.js +13 -13
  998. package/esm/InputPicker/TextBox.js +20 -21
  999. package/esm/InputPicker/hooks/useData.js +14 -18
  1000. package/esm/InputPicker/hooks/useInput.js +15 -13
  1001. package/esm/InputPicker/hooks/useMaxWidth.js +2 -4
  1002. package/esm/InputPicker/utils.js +1 -1
  1003. package/esm/List/List.js +53 -77
  1004. package/esm/List/ListContext.js +4 -6
  1005. package/esm/List/ListItem.js +38 -45
  1006. package/esm/List/helper/AutoScroller.js +35 -35
  1007. package/esm/List/helper/useManager.js +14 -18
  1008. package/esm/List/helper/useSortHelper.js +87 -100
  1009. package/esm/List/helper/utils.js +11 -16
  1010. package/esm/List/index.js +0 -0
  1011. package/esm/Loader/Loader.js +27 -42
  1012. package/esm/Loader/index.js +0 -0
  1013. package/esm/MaskedInput/MaskedInput.js +7 -5
  1014. package/esm/MaskedInput/TextMask.js +28 -42
  1015. package/esm/MaskedInput/adjustCaretPosition.js +64 -82
  1016. package/esm/MaskedInput/conformToMask.js +52 -55
  1017. package/esm/MaskedInput/createTextMaskInputElement.js +61 -57
  1018. package/esm/MaskedInput/index.js +0 -0
  1019. package/esm/MaskedInput/types.js +0 -0
  1020. package/esm/MaskedInput/utilities.js +8 -8
  1021. package/esm/Message/Message.js +49 -69
  1022. package/esm/Message/index.js +0 -0
  1023. package/esm/Modal/Modal.js +90 -117
  1024. package/esm/Modal/ModalBody.js +27 -30
  1025. package/esm/Modal/ModalContext.js +1 -1
  1026. package/esm/Modal/ModalDialog.d.ts +0 -10
  1027. package/esm/Modal/ModalDialog.js +24 -39
  1028. package/esm/Modal/ModalFooter.d.ts +1 -1
  1029. package/esm/Modal/ModalFooter.js +1 -1
  1030. package/esm/Modal/ModalHeader.js +22 -31
  1031. package/esm/Modal/ModalTitle.js +15 -23
  1032. package/esm/Modal/utils.js +26 -28
  1033. package/esm/MultiCascadeTree/MultiCascadeTree.js +76 -80
  1034. package/esm/MultiCascadeTree/SearchView.js +51 -56
  1035. package/esm/MultiCascadeTree/TreeView.js +84 -99
  1036. package/esm/MultiCascadeTree/hooks/useCascadeValue.js +68 -100
  1037. package/esm/MultiCascadeTree/hooks/useColumnData.js +10 -16
  1038. package/esm/MultiCascadeTree/hooks/useFlattenData.js +10 -10
  1039. package/esm/MultiCascadeTree/hooks/useSearch.js +17 -19
  1040. package/esm/MultiCascadeTree/hooks/useSelect.js +37 -35
  1041. package/esm/MultiCascadeTree/utils.js +40 -45
  1042. package/esm/MultiCascader/MultiCascader.js +189 -224
  1043. package/esm/MultiCascader/index.js +0 -0
  1044. package/esm/Nav/AdaptiveNavItem.js +11 -12
  1045. package/esm/Nav/Nav.js +51 -72
  1046. package/esm/Nav/NavContext.js +1 -1
  1047. package/esm/Nav/NavDropdown.d.ts +1 -1
  1048. package/esm/Nav/NavDropdown.js +62 -92
  1049. package/esm/Nav/NavDropdownItem.js +55 -71
  1050. package/esm/Nav/NavDropdownMenu.d.ts +1 -1
  1051. package/esm/Nav/NavDropdownMenu.js +64 -78
  1052. package/esm/Nav/NavDropdownToggle.js +19 -30
  1053. package/esm/Nav/NavItem.js +33 -48
  1054. package/esm/Nav/NavMenu.js +17 -19
  1055. package/esm/Nav/index.js +0 -0
  1056. package/esm/Navbar/Navbar.js +17 -18
  1057. package/esm/Navbar/NavbarBody.d.ts +1 -1
  1058. package/esm/Navbar/NavbarBody.js +1 -1
  1059. package/esm/Navbar/NavbarBrand.d.ts +1 -1
  1060. package/esm/Navbar/NavbarBrand.js +1 -1
  1061. package/esm/Navbar/NavbarDropdown.d.ts +1 -1
  1062. package/esm/Navbar/NavbarDropdown.js +51 -78
  1063. package/esm/Navbar/NavbarDropdownItem.js +49 -71
  1064. package/esm/Navbar/NavbarDropdownMenu.d.ts +1 -1
  1065. package/esm/Navbar/NavbarDropdownMenu.js +58 -74
  1066. package/esm/Navbar/NavbarDropdownToggle.js +18 -30
  1067. package/esm/Navbar/NavbarHeader.d.ts +1 -1
  1068. package/esm/Navbar/NavbarHeader.js +1 -1
  1069. package/esm/Navbar/NavbarItem.js +30 -44
  1070. package/esm/Navbar/index.js +0 -0
  1071. package/esm/Notification/Notification.d.ts +4 -3
  1072. package/esm/Notification/Notification.js +38 -54
  1073. package/esm/Notification/index.js +0 -0
  1074. package/esm/Pagination/LimitPicker.js +15 -17
  1075. package/esm/Pagination/Pagination.js +58 -81
  1076. package/esm/Pagination/PaginationButton.js +23 -24
  1077. package/esm/Pagination/PaginationGroup.js +44 -60
  1078. package/esm/Pagination/index.js +0 -0
  1079. package/esm/Panel/AccordionButton.js +17 -20
  1080. package/esm/Panel/Panel.js +54 -79
  1081. package/esm/Panel/PanelBody.js +35 -34
  1082. package/esm/Panel/PanelHeader.js +23 -24
  1083. package/esm/Panel/hooks/useExpanded.js +14 -13
  1084. package/esm/Panel/index.js +0 -0
  1085. package/esm/PanelGroup/PanelGroup.js +31 -46
  1086. package/esm/PanelGroup/index.js +0 -0
  1087. package/esm/Placeholder/Placeholder.js +1 -1
  1088. package/esm/Placeholder/PlaceholderGraph.js +24 -33
  1089. package/esm/Placeholder/PlaceholderGrid.js +47 -60
  1090. package/esm/Placeholder/PlaceholderParagraph.js +30 -47
  1091. package/esm/Placeholder/index.js +0 -0
  1092. package/esm/Popover/Popover.js +30 -44
  1093. package/esm/Popover/index.js +0 -0
  1094. package/esm/Progress/Progress.js +1 -1
  1095. package/esm/Progress/ProgressCircle.js +54 -75
  1096. package/esm/Progress/ProgressLine.js +39 -50
  1097. package/esm/Progress/index.js +0 -0
  1098. package/esm/Radio/Radio.js +55 -84
  1099. package/esm/Radio/index.js +0 -0
  1100. package/esm/RadioGroup/RadioGroup.js +39 -59
  1101. package/esm/RadioGroup/index.js +0 -0
  1102. package/esm/RadioTile/RadioTile.js +42 -61
  1103. package/esm/RadioTileGroup/RadioTileGroup.js +31 -46
  1104. package/esm/RangeSlider/RangeSlider.js +112 -137
  1105. package/esm/RangeSlider/index.js +0 -0
  1106. package/esm/Rate/Character.js +29 -42
  1107. package/esm/Rate/Rate.js +63 -97
  1108. package/esm/Rate/index.js +0 -0
  1109. package/esm/Rate/utils.js +6 -8
  1110. package/esm/Row/Row.js +32 -40
  1111. package/esm/Row/index.js +0 -0
  1112. package/esm/SafeAnchor/SafeAnchor.js +13 -19
  1113. package/esm/SafeAnchor/index.js +0 -0
  1114. package/esm/Schema/Schema.js +8 -8
  1115. package/esm/Schema/index.js +0 -0
  1116. package/esm/SelectPicker/SelectPicker.d.ts +0 -1
  1117. package/esm/SelectPicker/SelectPicker.js +131 -169
  1118. package/esm/SelectPicker/index.js +0 -0
  1119. package/esm/Sidebar/Sidebar.js +27 -34
  1120. package/esm/Sidebar/index.js +0 -0
  1121. package/esm/Sidenav/ExpandedSidenavDropdown.d.ts +1 -1
  1122. package/esm/Sidenav/ExpandedSidenavDropdown.js +69 -95
  1123. package/esm/Sidenav/ExpandedSidenavDropdownItem.js +50 -73
  1124. package/esm/Sidenav/ExpandedSidenavDropdownMenu.js +47 -64
  1125. package/esm/Sidenav/Node.js +25 -36
  1126. package/esm/Sidenav/Sidenav.js +42 -64
  1127. package/esm/Sidenav/SidenavBody.d.ts +1 -1
  1128. package/esm/Sidenav/SidenavBody.js +1 -1
  1129. package/esm/Sidenav/SidenavDropdown.d.ts +1 -1
  1130. package/esm/Sidenav/SidenavDropdown.js +80 -110
  1131. package/esm/Sidenav/SidenavDropdownCollapse.js +22 -30
  1132. package/esm/Sidenav/SidenavDropdownItem.d.ts +1 -1
  1133. package/esm/Sidenav/SidenavDropdownItem.js +56 -74
  1134. package/esm/Sidenav/SidenavDropdownMenu.d.ts +1 -1
  1135. package/esm/Sidenav/SidenavDropdownMenu.js +63 -74
  1136. package/esm/Sidenav/SidenavDropdownToggle.js +17 -29
  1137. package/esm/Sidenav/SidenavHeader.d.ts +1 -1
  1138. package/esm/Sidenav/SidenavHeader.js +1 -1
  1139. package/esm/Sidenav/SidenavItem.js +63 -81
  1140. package/esm/Sidenav/SidenavToggle.js +19 -28
  1141. package/esm/Sidenav/index.js +0 -0
  1142. package/esm/Slider/Graduated.js +28 -37
  1143. package/esm/Slider/Handle.js +49 -65
  1144. package/esm/Slider/Input.js +10 -7
  1145. package/esm/Slider/Mark.js +16 -24
  1146. package/esm/Slider/ProgressBar.js +24 -34
  1147. package/esm/Slider/Slider.d.ts +0 -26
  1148. package/esm/Slider/Slider.js +75 -116
  1149. package/esm/Slider/index.js +0 -0
  1150. package/esm/Slider/useDrag.js +29 -29
  1151. package/esm/Slider/utils.js +2 -4
  1152. package/esm/Stack/HStack.js +8 -10
  1153. package/esm/Stack/Stack.js +38 -59
  1154. package/esm/Stack/StackItem.d.ts +0 -11
  1155. package/esm/Stack/StackItem.js +25 -36
  1156. package/esm/Stack/VStack.js +9 -12
  1157. package/esm/Stat/Stat.js +20 -25
  1158. package/esm/Stat/StatHelpText.d.ts +1 -1
  1159. package/esm/Stat/StatHelpText.js +1 -1
  1160. package/esm/Stat/StatLabel.js +16 -22
  1161. package/esm/Stat/StatTrend.js +20 -28
  1162. package/esm/Stat/StatValue.js +15 -21
  1163. package/esm/Stat/StatValueUnit.d.ts +1 -1
  1164. package/esm/Stat/StatValueUnit.js +1 -1
  1165. package/esm/StatGroup/StatGroup.js +24 -28
  1166. package/esm/Steps/StepItem.js +31 -43
  1167. package/esm/Steps/Steps.js +33 -45
  1168. package/esm/Steps/index.js +0 -0
  1169. package/esm/Table/Table.js +13 -13
  1170. package/esm/Tabs/Tab.js +1 -9
  1171. package/esm/Tabs/TabPanel.js +13 -14
  1172. package/esm/Tabs/Tabs.js +82 -97
  1173. package/esm/Tag/Tag.js +29 -41
  1174. package/esm/Tag/index.js +0 -0
  1175. package/esm/TagGroup/TagGroup.d.ts +1 -1
  1176. package/esm/TagGroup/TagGroup.js +1 -1
  1177. package/esm/TagGroup/index.js +0 -0
  1178. package/esm/TagInput/index.js +23 -30
  1179. package/esm/TagPicker/index.js +18 -21
  1180. package/esm/Text/Text.js +32 -43
  1181. package/esm/TimePicker/TimePicker.js +10 -13
  1182. package/esm/TimeRangePicker/TimeRangePicker.js +9 -7
  1183. package/esm/Timeline/Timeline.js +29 -47
  1184. package/esm/Timeline/TimelineItem.js +18 -28
  1185. package/esm/Timeline/index.js +0 -0
  1186. package/esm/Toggle/Toggle.js +44 -69
  1187. package/esm/Toggle/index.js +0 -0
  1188. package/esm/Tooltip/Tooltip.js +24 -33
  1189. package/esm/Tooltip/index.js +0 -0
  1190. package/esm/Tree/IndentLine.js +4 -3
  1191. package/esm/Tree/Tree.js +60 -63
  1192. package/esm/Tree/TreeNode.js +61 -60
  1193. package/esm/Tree/TreeNodeToggle.js +19 -16
  1194. package/esm/Tree/TreeView.js +171 -182
  1195. package/esm/Tree/hooks/useExpandTree.js +33 -38
  1196. package/esm/Tree/hooks/useFlattenTree.js +30 -31
  1197. package/esm/Tree/hooks/useFocusTree.d.ts +1 -1
  1198. package/esm/Tree/hooks/useFocusTree.js +76 -79
  1199. package/esm/Tree/hooks/useForceUpdate.js +2 -3
  1200. package/esm/Tree/hooks/useTreeDrag.js +86 -86
  1201. package/esm/Tree/hooks/useTreeNodeProps.js +51 -47
  1202. package/esm/Tree/hooks/useTreeNodeRefs.d.ts +1 -1
  1203. package/esm/Tree/hooks/useTreeNodeRefs.js +3 -3
  1204. package/esm/Tree/hooks/useTreeSearch.js +33 -38
  1205. package/esm/Tree/hooks/useTreeWithChildren.js +21 -35
  1206. package/esm/Tree/hooks/useVirtualizedTreeData.js +25 -22
  1207. package/esm/Tree/index.js +0 -0
  1208. package/esm/Tree/types.js +1 -1
  1209. package/esm/Tree/utils/flattenTree.js +16 -24
  1210. package/esm/Tree/utils/focusableTree.js +59 -58
  1211. package/esm/Tree/utils/formatNodeRefKey.js +1 -1
  1212. package/esm/Tree/utils/getExpandItemValues.js +7 -5
  1213. package/esm/Tree/utils/getNodeParentKeys.js +4 -4
  1214. package/esm/Tree/utils/getTreeActiveNode.js +2 -2
  1215. package/esm/Tree/utils/hasVisibleChildren.js +1 -3
  1216. package/esm/Tree/utils/indentTreeNode.js +7 -5
  1217. package/esm/Tree/utils/treeKeyboardInteractions.js +13 -9
  1218. package/esm/TreePicker/TreePicker.js +168 -178
  1219. package/esm/TreePicker/hooks/useFocusState.js +17 -19
  1220. package/esm/TreePicker/index.js +0 -0
  1221. package/esm/Uploader/UploadFileItem.js +68 -91
  1222. package/esm/Uploader/UploadTrigger.js +46 -69
  1223. package/esm/Uploader/Uploader.js +154 -214
  1224. package/esm/Uploader/index.js +0 -0
  1225. package/esm/Uploader/utils/ajaxUpload.js +26 -27
  1226. package/esm/Uploader/utils/previewFile.js +3 -3
  1227. package/esm/VisuallyHidden/VisuallyHidden.d.ts +1 -1
  1228. package/esm/VisuallyHidden/VisuallyHidden.js +1 -1
  1229. package/esm/Whisper/Whisper.js +14 -32
  1230. package/esm/Whisper/index.js +0 -0
  1231. package/esm/internals/CloseButton/CloseButton.js +19 -18
  1232. package/esm/internals/Disclosure/Disclosure.js +40 -41
  1233. package/esm/internals/Disclosure/DisclosureButton.js +15 -12
  1234. package/esm/internals/Disclosure/DisclosureContent.js +9 -5
  1235. package/esm/internals/Disclosure/DisclosureContext.js +2 -2
  1236. package/esm/internals/Disclosure/useDisclosureContext.js +2 -2
  1237. package/esm/internals/Menu/Menu.d.ts +1 -5
  1238. package/esm/internals/Menu/Menu.js +79 -79
  1239. package/esm/internals/Menu/MenuContext.js +3 -3
  1240. package/esm/internals/Menu/MenuItem.d.ts +0 -7
  1241. package/esm/internals/Menu/MenuItem.js +21 -29
  1242. package/esm/internals/Menu/Menubar.js +24 -24
  1243. package/esm/internals/Menu/useMenu.js +45 -40
  1244. package/esm/internals/Overlay/Modal.d.ts +6 -20
  1245. package/esm/internals/Overlay/Modal.js +76 -115
  1246. package/esm/internals/Overlay/ModalManager.js +22 -28
  1247. package/esm/internals/Overlay/Overlay.d.ts +0 -21
  1248. package/esm/internals/Overlay/Overlay.js +55 -74
  1249. package/esm/internals/Overlay/OverlayContext.js +1 -1
  1250. package/esm/internals/Overlay/OverlayTrigger.js +138 -151
  1251. package/esm/internals/Overlay/Position.js +62 -85
  1252. package/esm/internals/Overlay/positionUtils.js +113 -107
  1253. package/esm/internals/Picker/ListCheckItem.js +43 -48
  1254. package/esm/internals/Picker/ListItem.js +31 -34
  1255. package/esm/internals/Picker/ListItemGroup.js +16 -19
  1256. package/esm/internals/Picker/Listbox.d.ts +1 -1
  1257. package/esm/internals/Picker/Listbox.js +97 -117
  1258. package/esm/internals/Picker/PickerIndicator.js +21 -17
  1259. package/esm/internals/Picker/PickerLabel.js +7 -8
  1260. package/esm/internals/Picker/PickerPopup.js +25 -29
  1261. package/esm/internals/Picker/PickerToggle.js +48 -55
  1262. package/esm/internals/Picker/PickerToggleTrigger.js +21 -22
  1263. package/esm/internals/Picker/SelectedElement.js +19 -18
  1264. package/esm/internals/Picker/ToggleButton.js +1 -1
  1265. package/esm/internals/Picker/hooks/useCombobox.js +10 -9
  1266. package/esm/internals/Picker/hooks/useFocusItemValue.js +91 -97
  1267. package/esm/internals/Picker/hooks/usePickerClassName.js +30 -21
  1268. package/esm/internals/Picker/hooks/usePickerRef.js +23 -19
  1269. package/esm/internals/Picker/hooks/useSearch.js +19 -23
  1270. package/esm/internals/Picker/hooks/useToggleKeyDownEvent.js +21 -20
  1271. package/esm/internals/Picker/index.d.ts +0 -1
  1272. package/esm/internals/Picker/index.js +1 -2
  1273. package/esm/internals/Picker/utils.js +19 -18
  1274. package/esm/internals/Plaintext/Plaintext.js +18 -20
  1275. package/esm/internals/Ripple/Ripple.js +41 -50
  1276. package/esm/internals/ScrollView/ScrollView.js +30 -29
  1277. package/esm/internals/ScrollView/hooks/useScrollState.js +16 -18
  1278. package/esm/internals/SearchBox/SearchBox.js +19 -22
  1279. package/esm/internals/Tree/TreeProvider.d.ts +4 -1
  1280. package/esm/internals/Tree/TreeProvider.js +43 -36
  1281. package/esm/internals/Tree/TreeView.js +26 -24
  1282. package/esm/internals/Tree/utils/filterNodesOfTree.js +6 -6
  1283. package/esm/internals/Tree/utils/findNodeOfTree.js +5 -5
  1284. package/esm/internals/Tree/utils/getParentMap.js +10 -15
  1285. package/esm/internals/Tree/utils/getPathTowardsItem.js +2 -2
  1286. package/esm/internals/Windowing/AutoSizer.js +33 -34
  1287. package/esm/internals/Windowing/List.d.ts +1 -1
  1288. package/esm/internals/Windowing/List.js +40 -45
  1289. package/esm/internals/constants/index.js +12 -12
  1290. package/esm/internals/constants/statusIcons.js +2 -2
  1291. package/esm/internals/hooks/useClassNames.js +16 -24
  1292. package/esm/internals/hooks/useClickOutside.js +11 -10
  1293. package/esm/internals/hooks/useControlled.js +4 -6
  1294. package/esm/internals/hooks/useElementResize.js +4 -4
  1295. package/esm/internals/hooks/useEnsuredRef.js +1 -1
  1296. package/esm/internals/hooks/useEventCallback.js +3 -3
  1297. package/esm/internals/hooks/useEventListener.js +4 -4
  1298. package/esm/internals/hooks/useFocus.js +7 -7
  1299. package/esm/internals/hooks/useFocusVirtualListItem.js +5 -5
  1300. package/esm/internals/hooks/useInternalId.js +2 -2
  1301. package/esm/internals/hooks/useIsMounted.js +4 -6
  1302. package/esm/internals/hooks/useIsomorphicLayoutEffect.js +1 -1
  1303. package/esm/internals/hooks/useMap.js +8 -12
  1304. package/esm/internals/hooks/useMount.js +3 -3
  1305. package/esm/internals/hooks/usePortal.js +20 -24
  1306. package/esm/internals/hooks/useRootClose.js +16 -15
  1307. package/esm/internals/hooks/useTimeout.js +8 -8
  1308. package/esm/internals/hooks/useToggleCaret.js +4 -3
  1309. package/esm/internals/hooks/useUniqueId.js +3 -11
  1310. package/esm/internals/hooks/useUpdateEffect.js +3 -3
  1311. package/esm/internals/hooks/useUpdatedRef.js +1 -1
  1312. package/esm/internals/hooks/useWillUnmount.js +2 -6
  1313. package/esm/internals/symbols.js +2 -2
  1314. package/esm/internals/types/index.d.ts +23 -19
  1315. package/esm/internals/utils/BrowserDetection.d.ts +0 -8
  1316. package/esm/internals/utils/BrowserDetection.js +5 -55
  1317. package/esm/internals/utils/ReactChildren.js +23 -25
  1318. package/esm/internals/utils/composeFunctions.js +1 -5
  1319. package/esm/internals/utils/createChainedFunction.js +1 -3
  1320. package/esm/internals/utils/createComponent.d.ts +1 -1
  1321. package/esm/internals/utils/createComponent.js +22 -28
  1322. package/esm/internals/utils/css.d.ts +4 -0
  1323. package/esm/internals/utils/css.js +18 -0
  1324. package/esm/internals/utils/date/copyTime.js +9 -7
  1325. package/esm/internals/utils/date/disableTime.js +10 -10
  1326. package/esm/internals/utils/date/extractTimeFormat.js +1 -1
  1327. package/esm/internals/utils/date/formatCheck.js +5 -15
  1328. package/esm/internals/utils/date/getWeekKeys.js +1 -1
  1329. package/esm/internals/utils/date/getWeekStartDates.js +13 -12
  1330. package/esm/internals/utils/date/index.d.ts +46 -46
  1331. package/esm/internals/utils/date/index.js +46 -46
  1332. package/esm/internals/utils/date/omitHideDisabledProps.js +1 -5
  1333. package/esm/internals/utils/date/reverseDateRangeOmitTime.js +1 -2
  1334. package/esm/internals/utils/date/types.js +2 -2
  1335. package/esm/internals/utils/date/useDateMode.js +6 -6
  1336. package/esm/internals/utils/deprecateComponent.js +3 -3
  1337. package/esm/internals/utils/dom.js +2 -6
  1338. package/esm/internals/utils/getDOMNode.js +2 -2
  1339. package/esm/internals/utils/getDataGroupBy.js +11 -13
  1340. package/esm/internals/utils/getStringLength.js +2 -2
  1341. package/esm/internals/utils/htmlPropsUtils.js +13 -14
  1342. package/esm/internals/utils/index.d.ts +1 -0
  1343. package/esm/internals/utils/index.js +2 -1
  1344. package/esm/internals/utils/mergeRefs.js +5 -7
  1345. package/esm/internals/utils/placementPolyfill.js +1 -3
  1346. package/esm/internals/utils/prefix.js +6 -12
  1347. package/esm/internals/utils/render.d.ts +1 -1
  1348. package/esm/internals/utils/render.js +10 -28
  1349. package/esm/internals/utils/safeSetSelection.js +2 -4
  1350. package/esm/internals/utils/shallowEqual.js +5 -5
  1351. package/esm/internals/utils/stringifyReactNode.js +6 -6
  1352. package/esm/internals/utils/tplTransform.js +4 -10
  1353. package/esm/internals/utils/warnOnce.js +3 -3
  1354. package/esm/locales/ar_EG.js +11 -10
  1355. package/esm/locales/ca_ES.d.ts +4 -4
  1356. package/esm/locales/ca_ES.js +11 -10
  1357. package/esm/locales/cs_CZ.js +11 -10
  1358. package/esm/locales/da_DK.js +11 -10
  1359. package/esm/locales/de_DE.js +11 -10
  1360. package/esm/locales/en_GB.js +11 -10
  1361. package/esm/locales/en_US.js +11 -10
  1362. package/esm/locales/es_AR.js +11 -10
  1363. package/esm/locales/es_ES.js +11 -10
  1364. package/esm/locales/fa_IR.js +11 -10
  1365. package/esm/locales/fi_FI.js +11 -10
  1366. package/esm/locales/fr_FR.js +11 -10
  1367. package/esm/locales/hu_HU.js +11 -10
  1368. package/esm/locales/it_IT.js +11 -10
  1369. package/esm/locales/ja_JP.js +11 -10
  1370. package/esm/locales/kk_KZ.js +11 -10
  1371. package/esm/locales/ko_KR.js +11 -10
  1372. package/esm/locales/ne_NP.js +11 -10
  1373. package/esm/locales/nl_NL.js +11 -10
  1374. package/esm/locales/pt_BR.js +11 -10
  1375. package/esm/locales/ru_RU.js +11 -10
  1376. package/esm/locales/sv_SE.js +11 -10
  1377. package/esm/locales/tr_TR.js +11 -10
  1378. package/esm/locales/zh_CN.js +11 -10
  1379. package/esm/locales/zh_TW.js +11 -10
  1380. package/esm/toaster/ToastContainer.js +98 -112
  1381. package/esm/toaster/ToastContext.js +1 -1
  1382. package/esm/toaster/hooks/useDelayedClosure.js +20 -17
  1383. package/esm/toaster/toaster.js +20 -43
  1384. package/esm/useBreakpointValue/useBreakpointValue.js +7 -6
  1385. package/esm/useMediaQuery/useMediaQuery.d.ts +1 -7
  1386. package/esm/useMediaQuery/useMediaQuery.js +20 -78
  1387. package/esm/useToaster/useToaster.js +38 -39
  1388. package/internals/Picker/styles/index.less +7 -11
  1389. package/internals/Picker/styles/mixin.less +6 -3
  1390. package/package.json +16 -13
  1391. package/styles/common.less +1 -0
  1392. package/styles/mixins/hacks.less +0 -73
  1393. package/styles/mixins/menu.less +0 -0
  1394. package/styles/mixins/utilities.less +25 -3
  1395. package/styles/scaffolding.less +1 -1
  1396. package/styles/typography.less +11 -6
  1397. package/styles/variables.less +28 -73
  1398. package/toaster/styles/animation.less +0 -0
  1399. package/toaster/styles/index.css +35 -128
  1400. package/useToaster/styles/index.css +35 -128
  1401. package/cjs/internals/Picker/propTypes.d.ts +0 -71
  1402. package/cjs/internals/Picker/propTypes.js +0 -46
  1403. package/cjs/internals/propTypes/deprecatePropType.d.ts +0 -16
  1404. package/cjs/internals/propTypes/deprecatePropType.js +0 -49
  1405. package/cjs/internals/propTypes/index.d.ts +0 -5
  1406. package/cjs/internals/propTypes/index.js +0 -28
  1407. package/cjs/internals/propTypes/oneOf.d.ts +0 -3
  1408. package/cjs/internals/propTypes/oneOf.js +0 -18
  1409. package/esm/internals/Picker/propTypes.d.ts +0 -71
  1410. package/esm/internals/Picker/propTypes.js +0 -41
  1411. package/esm/internals/propTypes/deprecatePropType.d.ts +0 -16
  1412. package/esm/internals/propTypes/deprecatePropType.js +0 -45
  1413. package/esm/internals/propTypes/index.d.ts +0 -5
  1414. package/esm/internals/propTypes/index.js +0 -17
  1415. package/esm/internals/propTypes/oneOf.d.ts +0 -3
  1416. package/esm/internals/propTypes/oneOf.js +0 -13
@@ -3,13 +3,13 @@
3
3
 
4
4
  exports.__esModule = true;
5
5
  exports.default = void 0;
6
- var ACCELERATION = 5; // for auto scroll
6
+ const ACCELERATION = 5; // for auto scroll
7
7
 
8
8
  /***
9
9
  * Auto scroll when approaching the edge
10
10
  * */
11
- var AutoScroller = /*#__PURE__*/function () {
12
- function AutoScroller(container, onScrollCallback) {
11
+ class AutoScroller {
12
+ constructor(container, onScrollCallback) {
13
13
  this.container = void 0;
14
14
  this.onScrollCallback = void 0;
15
15
  this.interval = null;
@@ -17,39 +17,40 @@ var AutoScroller = /*#__PURE__*/function () {
17
17
  this.container = container;
18
18
  this.onScrollCallback = onScrollCallback;
19
19
  }
20
- var _proto = AutoScroller.prototype;
21
- _proto.clear = function clear() {
20
+ clear() {
22
21
  if (this.interval !== null) {
23
22
  clearInterval(this.interval);
24
23
  this.interval = null;
25
24
  }
26
- };
27
- _proto.update = function update(_ref) {
28
- var _this = this;
29
- var translate = _ref.translate,
30
- minTranslate = _ref.minTranslate,
31
- maxTranslate = _ref.maxTranslate,
32
- width = _ref.width,
33
- height = _ref.height;
34
- var direction = {
25
+ }
26
+ update(_ref) {
27
+ let {
28
+ translate,
29
+ minTranslate,
30
+ maxTranslate,
31
+ width,
32
+ height
33
+ } = _ref;
34
+ const direction = {
35
35
  x: 0,
36
36
  y: 0
37
37
  };
38
- var speed = {
38
+ const speed = {
39
39
  x: 0,
40
40
  y: 0
41
41
  };
42
- var _this$container = this.container,
43
- scrollTop = _this$container.scrollTop,
44
- scrollLeft = _this$container.scrollLeft,
45
- scrollHeight = _this$container.scrollHeight,
46
- scrollWidth = _this$container.scrollWidth,
47
- clientHeight = _this$container.clientHeight,
48
- clientWidth = _this$container.clientWidth;
49
- var isTop = scrollTop === 0;
50
- var isBottom = scrollTop === scrollHeight - clientHeight;
51
- var isLeft = scrollLeft === 0;
52
- var isRight = scrollLeft === scrollWidth - clientWidth;
42
+ const {
43
+ scrollTop,
44
+ scrollLeft,
45
+ scrollHeight,
46
+ scrollWidth,
47
+ clientHeight,
48
+ clientWidth
49
+ } = this.container;
50
+ const isTop = scrollTop === 0;
51
+ const isBottom = scrollTop === scrollHeight - clientHeight;
52
+ const isLeft = scrollLeft === 0;
53
+ const isRight = scrollLeft === scrollWidth - clientWidth;
53
54
  if (translate.y >= maxTranslate.y - height / 2 && !isBottom) {
54
55
  // Scroll Down
55
56
  direction.y = 1;
@@ -73,18 +74,17 @@ var AutoScroller = /*#__PURE__*/function () {
73
74
  }
74
75
  if (direction.x !== 0 || direction.y !== 0) {
75
76
  // duration of auto scroll
76
- this.interval = setInterval(function () {
77
- _this.isAutoScrolling = true;
78
- var offset = {
77
+ this.interval = setInterval(() => {
78
+ this.isAutoScrolling = true;
79
+ const offset = {
79
80
  left: speed.x * direction.x,
80
81
  top: speed.y * direction.y
81
82
  };
82
- _this.container.scrollTop += offset.top;
83
- _this.container.scrollLeft += offset.left;
84
- _this.onScrollCallback(offset);
83
+ this.container.scrollTop += offset.top;
84
+ this.container.scrollLeft += offset.left;
85
+ this.onScrollCallback(offset);
85
86
  }, 20);
86
87
  }
87
- };
88
- return AutoScroller;
89
- }();
88
+ }
89
+ }
90
90
  var _default = exports.default = AutoScroller;
@@ -6,39 +6,35 @@ exports.__esModule = true;
6
6
  exports.default = void 0;
7
7
  var _flatten2 = _interopRequireDefault(require("lodash/flatten"));
8
8
  var _react = require("react");
9
- var useManager = function useManager() {
10
- var collectionMapRef = (0, _react.useRef)({});
11
- var listItemRegister = (0, _react.useCallback)(function (item) {
12
- var collection = item.info.collection;
9
+ const useManager = () => {
10
+ const collectionMapRef = (0, _react.useRef)({});
11
+ const listItemRegister = (0, _react.useCallback)(item => {
12
+ const collection = item.info.collection;
13
13
  if (!Array.isArray(collectionMapRef.current[collection])) {
14
14
  // reset collection
15
15
  collectionMapRef.current[collection] = [];
16
16
  }
17
17
  collectionMapRef.current[collection].push(item);
18
18
  return {
19
- unregister: function unregister() {
20
- var index = collectionMapRef.current[collection].indexOf(item);
19
+ unregister: () => {
20
+ const index = collectionMapRef.current[collection].indexOf(item);
21
21
  if (index !== -1) {
22
22
  collectionMapRef.current[collection].splice(index, 1);
23
23
  }
24
24
  }
25
25
  };
26
26
  }, []);
27
- var getManagedItem = (0, _react.useCallback)(function (node) {
28
- var allItems = (0, _flatten2.default)(Object.values(collectionMapRef.current));
29
- return allItems.find(function (managerRef) {
30
- return managerRef.node === node;
31
- });
27
+ const getManagedItem = (0, _react.useCallback)(node => {
28
+ const allItems = (0, _flatten2.default)(Object.values(collectionMapRef.current));
29
+ return allItems.find(managerRef => managerRef.node === node);
32
30
  }, []);
33
- var getOrderedItems = (0, _react.useCallback)(function (collection) {
34
- return collection != null ? [].concat(collectionMapRef.current[collection]).sort(function (nodeInfo1, nodeInfo2) {
35
- return Number(nodeInfo1.info.index) - Number(nodeInfo2.info.index);
36
- }) : [];
31
+ const getOrderedItems = (0, _react.useCallback)(collection => {
32
+ return collection != null ? [...collectionMapRef.current[collection]].sort((nodeInfo1, nodeInfo2) => Number(nodeInfo1.info.index) - Number(nodeInfo2.info.index)) : [];
37
33
  }, []);
38
34
  return {
39
- listItemRegister: listItemRegister,
40
- getManagedItem: getManagedItem,
41
- getOrderedItems: getOrderedItems
35
+ listItemRegister,
36
+ getManagedItem,
37
+ getOrderedItems
42
38
  };
43
39
  };
44
40
  var _default = exports.default = useManager;
@@ -9,97 +9,89 @@ var _react = require("react");
9
9
  var _AutoScroller = _interopRequireDefault(require("./AutoScroller"));
10
10
  var _utils = require("./utils");
11
11
  var _hooks = require("../../internals/hooks");
12
- var _useManager2 = _interopRequireDefault(require("./useManager"));
13
- function _createForOfIteratorHelperLoose(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: !0 } : { done: !1, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
14
- function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
15
- function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
16
- var helperElementClass = 'rs-list-item-helper';
17
- var holderElementClass = 'rs-list-item-holder';
18
- var useSortHelper = function useSortHelper(config) {
19
- var autoScroll = config.autoScroll,
20
- pressDelay = config.pressDelay,
21
- transitionDuration = config.transitionDuration,
22
- onSort = config.onSort,
23
- onSortEnd = config.onSortEnd,
24
- onSortMove = config.onSortMove,
25
- onSortStart = config.onSortStart;
26
- var _useState = (0, _react.useState)(false),
27
- sorting = _useState[0],
28
- setSorting = _useState[1];
29
- var containerRef = (0, _react.useRef)(null);
30
- var pressTimer = (0, _react.useRef)();
31
- var _useManager = (0, _useManager2.default)(),
32
- listItemRegister = _useManager.listItemRegister,
33
- getManagedItem = _useManager.getManagedItem,
34
- getOrderedItems = _useManager.getOrderedItems;
35
- var isMounted = (0, _hooks.useIsMounted)();
12
+ var _useManager = _interopRequireDefault(require("./useManager"));
13
+ const helperElementClass = 'rs-list-item-helper';
14
+ const holderElementClass = 'rs-list-item-holder';
15
+ const useSortHelper = config => {
16
+ const {
17
+ autoScroll,
18
+ pressDelay,
19
+ transitionDuration,
20
+ onSort,
21
+ onSortEnd,
22
+ onSortMove,
23
+ onSortStart
24
+ } = config;
25
+ const [sorting, setSorting] = (0, _react.useState)(false);
26
+ const containerRef = (0, _react.useRef)(null);
27
+ const pressTimer = (0, _react.useRef)();
28
+ const {
29
+ listItemRegister,
30
+ getManagedItem,
31
+ getOrderedItems
32
+ } = (0, _useManager.default)();
33
+ const isMounted = (0, _hooks.useIsMounted)();
36
34
 
37
35
  /**
38
36
  * start dragging
39
37
  * */
40
- var handlePress = (0, _react.useCallback)(function (mouseDownEvent, _targetNode, curManagedItem) {
38
+ const handlePress = (0, _react.useCallback)((mouseDownEvent, _targetNode, curManagedItem) => {
41
39
  var _curManagedItem$info$, _curManagedItem$info$2, _activeNodeHelper;
42
40
  if (!isMounted()) return;
43
41
  // data
44
- var containerElement = containerRef.current;
45
- var activeNode = curManagedItem.node;
46
- var activeNodeOldIndex = (_curManagedItem$info$ = curManagedItem.info.index) !== null && _curManagedItem$info$ !== void 0 ? _curManagedItem$info$ : 0;
47
- var activeNodeNextIndex = (_curManagedItem$info$2 = curManagedItem.info.index) !== null && _curManagedItem$info$2 !== void 0 ? _curManagedItem$info$2 : 0;
48
- var activeNodeHolderTranslate = {
42
+ const containerElement = containerRef.current;
43
+ const activeNode = curManagedItem.node;
44
+ const activeNodeOldIndex = (_curManagedItem$info$ = curManagedItem.info.index) !== null && _curManagedItem$info$ !== void 0 ? _curManagedItem$info$ : 0;
45
+ let activeNodeNextIndex = (_curManagedItem$info$2 = curManagedItem.info.index) !== null && _curManagedItem$info$2 !== void 0 ? _curManagedItem$info$2 : 0;
46
+ let activeNodeHolderTranslate = {
49
47
  x: 0,
50
48
  y: 0
51
49
  };
52
- var animatedNodesOffset = []; // all list item offset
50
+ let animatedNodesOffset = []; // all list item offset
53
51
 
54
52
  // init scroller
55
- var scrollContainer = (0, _utils.getScrollingParent)(containerElement) || containerElement;
56
- var initScroll = {
53
+ const scrollContainer = (0, _utils.getScrollingParent)(containerElement) || containerElement;
54
+ const initScroll = {
57
55
  x: scrollContainer.scrollLeft,
58
56
  y: scrollContainer.scrollTop
59
57
  };
60
- var autoScroller = new _AutoScroller.default(scrollContainer, function (offset) {
58
+ const autoScroller = new _AutoScroller.default(scrollContainer, offset => {
61
59
  activeNodeHolderTranslate.x += offset.left;
62
60
  activeNodeHolderTranslate.y += offset.top;
63
61
  });
64
- var activeNodeBoundingClientRect = activeNode.getBoundingClientRect();
65
- var activeNodeOffsetEdge = (0, _utils.getEdgeOffset)(activeNode, containerElement);
66
- var activeNodeStyle = getComputedStyle(activeNode);
67
- var activeNodeHelper = activeNode.cloneNode(true);
62
+ const activeNodeBoundingClientRect = activeNode.getBoundingClientRect();
63
+ const activeNodeOffsetEdge = (0, _utils.getEdgeOffset)(activeNode, containerElement);
64
+ const activeNodeStyle = getComputedStyle(activeNode);
65
+ let activeNodeHelper = activeNode.cloneNode(true);
68
66
  (_activeNodeHelper = activeNodeHelper) === null || _activeNodeHelper === void 0 || _activeNodeHelper.classList.add(helperElementClass);
69
67
  (0, _utils.setInlineStyles)(activeNodeHelper, {
70
68
  position: 'fixed',
71
- width: activeNodeBoundingClientRect.width + "px",
72
- height: activeNodeBoundingClientRect.height + "px",
73
- left: activeNodeBoundingClientRect.left - parseFloat(activeNodeStyle.marginLeft) + "px",
74
- top: activeNodeBoundingClientRect.top - parseFloat(activeNodeStyle.marginTop) + "px"
69
+ width: `${activeNodeBoundingClientRect.width}px`,
70
+ height: `${activeNodeBoundingClientRect.height}px`,
71
+ left: `${activeNodeBoundingClientRect.left - parseFloat(activeNodeStyle.marginLeft)}px`,
72
+ top: `${activeNodeBoundingClientRect.top - parseFloat(activeNodeStyle.marginTop)}px`
75
73
  });
76
74
  activeNode.classList.add(holderElementClass);
77
75
  document.body.appendChild(activeNodeHelper);
78
- var getContainerScrollDelta = function getContainerScrollDelta() {
79
- return {
80
- left: scrollContainer.scrollLeft - initScroll.x,
81
- top: scrollContainer.scrollTop - initScroll.y
82
- };
83
- };
84
- var getHolderTranslate = function getHolderTranslate() {
85
- return animatedNodesOffset.reduce(function (acc, item) {
86
- return {
87
- x: acc.x + item.x,
88
- y: acc.y + item.y
89
- };
90
- }, {
91
- x: 0,
92
- y: 0
93
- });
94
- };
95
- var sortMouseMoveListener = (0, _on.default)(window, 'mousemove', function (mouseOverEvent) {
76
+ const getContainerScrollDelta = () => ({
77
+ left: scrollContainer.scrollLeft - initScroll.x,
78
+ top: scrollContainer.scrollTop - initScroll.y
79
+ });
80
+ const getHolderTranslate = () => animatedNodesOffset.reduce((acc, item) => ({
81
+ x: acc.x + item.x,
82
+ y: acc.y + item.y
83
+ }), {
84
+ x: 0,
85
+ y: 0
86
+ });
87
+ const sortMouseMoveListener = (0, _on.default)(window, 'mousemove', mouseOverEvent => {
96
88
  // Update helper position
97
- var offset = {
89
+ const offset = {
98
90
  x: (mouseOverEvent === null || mouseOverEvent === void 0 ? void 0 : mouseOverEvent.pageX) || 0,
99
91
  y: (mouseOverEvent === null || mouseOverEvent === void 0 ? void 0 : mouseOverEvent.pageY) || 0
100
92
  };
101
- var containerScrollDelta = getContainerScrollDelta();
102
- var containerBoundingRect = scrollContainer.getBoundingClientRect();
93
+ const containerScrollDelta = getContainerScrollDelta();
94
+ const containerBoundingRect = scrollContainer.getBoundingClientRect();
103
95
  activeNodeHolderTranslate = {
104
96
  x: offset.x - mouseDownEvent.pageX,
105
97
  y: offset.y - mouseDownEvent.pageY
@@ -110,27 +102,27 @@ var useSortHelper = function useSortHelper(config) {
110
102
 
111
103
  // animate
112
104
  activeNodeNextIndex = -1;
113
- var listItemManagerRefs = getOrderedItems(curManagedItem.info.collection);
114
- var aTop = activeNodeOffsetEdge.top || 0;
115
- var cTop = containerScrollDelta.top || 0;
116
- var sortingOffsetY = aTop + activeNodeHolderTranslate.y + cTop;
117
- for (var i = 0, len = listItemManagerRefs.length; i < len; i++) {
105
+ const listItemManagerRefs = getOrderedItems(curManagedItem.info.collection);
106
+ const aTop = activeNodeOffsetEdge.top || 0;
107
+ const cTop = containerScrollDelta.top || 0;
108
+ const sortingOffsetY = aTop + activeNodeHolderTranslate.y + cTop;
109
+ for (let i = 0, len = listItemManagerRefs.length; i < len; i++) {
118
110
  var _listItemManagerRefs$;
119
- var currentNode = listItemManagerRefs[i].node;
120
- var currentNodeIndex = (_listItemManagerRefs$ = listItemManagerRefs[i].info.index) !== null && _listItemManagerRefs$ !== void 0 ? _listItemManagerRefs$ : 0;
121
- var offsetY = activeNodeBoundingClientRect.height > currentNode.offsetHeight ? currentNode.offsetHeight / 2 : activeNodeBoundingClientRect.height / 2;
122
- var translate = {
111
+ const currentNode = listItemManagerRefs[i].node;
112
+ const currentNodeIndex = (_listItemManagerRefs$ = listItemManagerRefs[i].info.index) !== null && _listItemManagerRefs$ !== void 0 ? _listItemManagerRefs$ : 0;
113
+ const offsetY = activeNodeBoundingClientRect.height > currentNode.offsetHeight ? currentNode.offsetHeight / 2 : activeNodeBoundingClientRect.height / 2;
114
+ const translate = {
123
115
  x: 0,
124
116
  y: 0
125
117
  };
126
118
 
127
119
  // If we haven't cached the node's offsetTop / offsetLeft value
128
- var curEdgeOffset = listItemManagerRefs[i].edgeOffset || (0, _utils.getEdgeOffset)(currentNode, containerElement);
120
+ const curEdgeOffset = listItemManagerRefs[i].edgeOffset || (0, _utils.getEdgeOffset)(currentNode, containerElement);
129
121
  listItemManagerRefs[i].edgeOffset = curEdgeOffset;
130
122
 
131
123
  // Get a reference to the next node
132
- var prvNode = i > 0 && listItemManagerRefs[i - 1];
133
- var nextNode = i < len - 1 && listItemManagerRefs[i + 1];
124
+ const prvNode = i > 0 && listItemManagerRefs[i - 1];
125
+ const nextNode = i < len - 1 && listItemManagerRefs[i + 1];
134
126
 
135
127
  // Also cache the node's edge offset if needed.
136
128
  if (prvNode && !prvNode.edgeOffset) {
@@ -144,10 +136,10 @@ var useSortHelper = function useSortHelper(config) {
144
136
  if (currentNodeIndex === activeNodeOldIndex) {
145
137
  continue;
146
138
  }
147
- var curEdgeOffsetTop = curEdgeOffset.top || 0;
139
+ const curEdgeOffsetTop = curEdgeOffset.top || 0;
148
140
  if (prvNode && currentNodeIndex > activeNodeOldIndex && sortingOffsetY + offsetY >= curEdgeOffsetTop) {
149
141
  var _prvNode$edgeOffset;
150
- var yOffset = (((_prvNode$edgeOffset = prvNode.edgeOffset) === null || _prvNode$edgeOffset === void 0 ? void 0 : _prvNode$edgeOffset.top) || 0) - curEdgeOffsetTop;
142
+ const yOffset = (((_prvNode$edgeOffset = prvNode.edgeOffset) === null || _prvNode$edgeOffset === void 0 ? void 0 : _prvNode$edgeOffset.top) || 0) - curEdgeOffsetTop;
151
143
  translate.y = yOffset;
152
144
  animatedNodesOffset[currentNodeIndex] = {
153
145
  x: 0,
@@ -156,11 +148,11 @@ var useSortHelper = function useSortHelper(config) {
156
148
  activeNodeNextIndex = currentNodeIndex;
157
149
  } else if (nextNode && currentNodeIndex < activeNodeOldIndex && sortingOffsetY <= curEdgeOffsetTop + offsetY) {
158
150
  var _nextNode$edgeOffset;
159
- var _yOffset = (((_nextNode$edgeOffset = nextNode.edgeOffset) === null || _nextNode$edgeOffset === void 0 ? void 0 : _nextNode$edgeOffset.top) || 0) - curEdgeOffsetTop;
160
- translate.y = _yOffset;
151
+ const yOffset = (((_nextNode$edgeOffset = nextNode.edgeOffset) === null || _nextNode$edgeOffset === void 0 ? void 0 : _nextNode$edgeOffset.top) || 0) - curEdgeOffsetTop;
152
+ translate.y = yOffset;
161
153
  animatedNodesOffset[currentNodeIndex] = {
162
154
  x: 0,
163
- y: -_yOffset
155
+ y: -yOffset
164
156
  };
165
157
  if (activeNodeNextIndex === -1) {
166
158
  activeNodeNextIndex = currentNodeIndex;
@@ -206,12 +198,12 @@ var useSortHelper = function useSortHelper(config) {
206
198
  }, {
207
199
  passive: false
208
200
  });
209
- var sortMouseEndListener = (0, _on.default)(window, 'mouseup', function (event) {
201
+ const sortMouseEndListener = (0, _on.default)(window, 'mouseup', event => {
210
202
  // Remove the event listeners
211
203
  sortMouseMoveListener.off();
212
204
  sortMouseEndListener.off();
213
- var holderTranslate = getHolderTranslate();
214
- var containerScrollDelta = getContainerScrollDelta();
205
+ const holderTranslate = getHolderTranslate();
206
+ const containerScrollDelta = getContainerScrollDelta();
215
207
  if (activeNodeHelper) {
216
208
  (0, _utils.setTranslate3d)(activeNodeHelper, {
217
209
  x: holderTranslate.x - (containerScrollDelta.left || 0),
@@ -221,7 +213,7 @@ var useSortHelper = function useSortHelper(config) {
221
213
  }
222
214
 
223
215
  // wait for animation
224
- setTimeout(function () {
216
+ setTimeout(() => {
225
217
  var _activeNodeHelper2;
226
218
  if (!isMounted()) return;
227
219
  // Remove the helper from the DOM
@@ -232,13 +224,12 @@ var useSortHelper = function useSortHelper(config) {
232
224
  activeNode.classList.remove(holderElementClass);
233
225
  (0, _utils.setTranslate3d)(activeNode, null);
234
226
  animatedNodesOffset = [];
235
- for (var _iterator = _createForOfIteratorHelperLoose(getOrderedItems(curManagedItem.info.collection)), _step; !(_step = _iterator()).done;) {
236
- var item = _step.value;
227
+ for (const item of getOrderedItems(curManagedItem.info.collection)) {
237
228
  // Clear the cached offsetTop / offsetLeft value
238
229
  item.edgeOffset = null;
239
230
 
240
231
  // Remove the transforms / transitions
241
- var el = item.node;
232
+ const el = item.node;
242
233
  (0, _utils.setTranslate3d)(el, null);
243
234
  (0, _utils.setTransitionDuration)(el, null);
244
235
  }
@@ -250,7 +241,7 @@ var useSortHelper = function useSortHelper(config) {
250
241
  setSorting(false);
251
242
 
252
243
  // callbacks
253
- var callbackPayload = {
244
+ const callbackPayload = {
254
245
  collection: curManagedItem.info.collection,
255
246
  node: curManagedItem.node,
256
247
  newIndex: activeNodeNextIndex,
@@ -275,12 +266,10 @@ var useSortHelper = function useSortHelper(config) {
275
266
  /**
276
267
  * Determine whether to start dragging
277
268
  * */
278
- var handleStart = (0, _react.useCallback)(function (mouseDownEvent) {
279
- var triggeredNode = mouseDownEvent.target;
280
- var targetNode = (0, _utils.closestNode)(triggeredNode, function (el) {
281
- return Boolean(getManagedItem(el));
282
- });
283
- var curManagedItem = getManagedItem(targetNode);
269
+ const handleStart = (0, _react.useCallback)(mouseDownEvent => {
270
+ const triggeredNode = mouseDownEvent.target;
271
+ const targetNode = (0, _utils.closestNode)(triggeredNode, el => Boolean(getManagedItem(el)));
272
+ const curManagedItem = getManagedItem(targetNode);
284
273
  if (
285
274
  // is not secondary button pressed
286
275
  mouseDownEvent.button !== 2 &&
@@ -300,14 +289,12 @@ var useSortHelper = function useSortHelper(config) {
300
289
  /**
301
290
  * Clear timer after drag
302
291
  * */
303
- var handleEnd = (0, _react.useCallback)(function () {
304
- return clearTimeout(pressTimer.current);
305
- }, []);
292
+ const handleEnd = (0, _react.useCallback)(() => clearTimeout(pressTimer.current), []);
306
293
  return {
307
- handleStart: handleStart,
308
- handleEnd: handleEnd,
309
- containerRef: containerRef,
310
- sorting: sorting,
294
+ handleStart,
295
+ handleEnd,
296
+ containerRef,
297
+ sorting,
311
298
  register: listItemRegister
312
299
  };
313
300
  };
@@ -12,28 +12,25 @@ exports.setTranslate3d = setTranslate3d;
12
12
  /**
13
13
  * interactive elements should be skiped
14
14
  * */
15
- var INTERACTIVE_ELEMENTS = ['A', 'BUTTON', 'INPUT', 'OPTION', 'TEXTAREA', 'SELECT'];
15
+ const INTERACTIVE_ELEMENTS = ['A', 'BUTTON', 'INPUT', 'OPTION', 'TEXTAREA', 'SELECT'];
16
16
  function isContainInteractiveElement(targetNode) {
17
17
  return INTERACTIVE_ELEMENTS.includes(targetNode.tagName) || targetNode.contentEditable === 'true';
18
18
  }
19
19
  function setInlineStyles(node, styles) {
20
20
  if (node !== null && styles !== null) {
21
- for (var _i = 0, _Object$entries = Object.entries(styles); _i < _Object$entries.length; _i++) {
22
- var _Object$entries$_i = _Object$entries[_i],
23
- key = _Object$entries$_i[0],
24
- value = _Object$entries$_i[1];
21
+ for (const [key, value] of Object.entries(styles)) {
25
22
  node.style[key] = value;
26
23
  }
27
24
  }
28
25
  }
29
26
  function setTranslate3d(node, translate) {
30
27
  setInlineStyles(node, {
31
- transform: translate ? "translate3d(" + translate.x + "px," + translate.y + "px,0)" : ''
28
+ transform: translate ? `translate3d(${translate.x}px,${translate.y}px,0)` : ''
32
29
  });
33
30
  }
34
31
  function setTransitionDuration(node, duration) {
35
32
  setInlineStyles(node, {
36
- transitionDuration: duration ? duration + "ms" : ''
33
+ transitionDuration: duration ? `${duration}ms` : ''
37
34
  });
38
35
  }
39
36
 
@@ -41,7 +38,7 @@ function setTransitionDuration(node, duration) {
41
38
  * find closest target node from source node
42
39
  * */
43
40
  function closestNode(sourceNode, judge) {
44
- var currentNode = sourceNode;
41
+ let currentNode = sourceNode;
45
42
  while (currentNode) {
46
43
  if (judge(currentNode)) {
47
44
  return currentNode;
@@ -62,7 +59,7 @@ function getEdgeOffset(node, parent, offset) {
62
59
  }
63
60
 
64
61
  // Get the actual offsetTop / offsetLeft value, no matter how deep the node is nested
65
- var nodeOffset = {
62
+ const nodeOffset = {
66
63
  left: (offset.left || 0) + node.offsetLeft,
67
64
  top: (offset.top || 0) + node.offsetTop
68
65
  };
@@ -72,12 +69,10 @@ function getEdgeOffset(node, parent, offset) {
72
69
  return getEdgeOffset(node.parentNode, parent, nodeOffset);
73
70
  }
74
71
  function getScrollingParent(el) {
75
- return closestNode(el, function (el) {
76
- var computedStyle = window.getComputedStyle(el);
77
- var overflowRegex = /(auto|scroll)/;
78
- var properties = ['overflow', 'overflowX', 'overflowY'];
79
- return properties.some(function (property) {
80
- return overflowRegex.test(computedStyle[property]);
81
- });
72
+ return closestNode(el, el => {
73
+ const computedStyle = window.getComputedStyle(el);
74
+ const overflowRegex = /(auto|scroll)/;
75
+ const properties = ['overflow', 'overflowX', 'overflowY'];
76
+ return properties.some(property => overflowRegex.test(computedStyle[property]));
82
77
  });
83
78
  }
package/cjs/List/index.js CHANGED
File without changes
@@ -5,44 +5,41 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  exports.__esModule = true;
6
6
  exports.default = void 0;
7
7
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
8
- var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
9
8
  var _react = _interopRequireDefault(require("react"));
10
- var _propTypes = _interopRequireDefault(require("prop-types"));
11
9
  var _hooks = require("../internals/hooks");
12
- var _propTypes2 = require("../internals/propTypes");
13
10
  var _CustomProvider = require("../CustomProvider");
14
- var _excluded = ["as", "classPrefix", "className", "inverse", "backdrop", "speed", "center", "vertical", "content", "size"];
15
11
  /**
16
12
  * The `Loader` component is used to indicate the loading state of a page or a section.
17
13
  * @see https://rsuitejs.com/components/loader
18
14
  */
19
- var Loader = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
20
- var _useCustom = (0, _CustomProvider.useCustom)('Loader', props),
21
- propsWithDefaults = _useCustom.propsWithDefaults;
22
- var _propsWithDefaults$as = propsWithDefaults.as,
23
- Component = _propsWithDefaults$as === void 0 ? 'div' : _propsWithDefaults$as,
24
- _propsWithDefaults$cl = propsWithDefaults.classPrefix,
25
- classPrefix = _propsWithDefaults$cl === void 0 ? 'loader' : _propsWithDefaults$cl,
26
- className = propsWithDefaults.className,
27
- inverse = propsWithDefaults.inverse,
28
- backdrop = propsWithDefaults.backdrop,
29
- _propsWithDefaults$sp = propsWithDefaults.speed,
30
- speed = _propsWithDefaults$sp === void 0 ? 'normal' : _propsWithDefaults$sp,
31
- center = propsWithDefaults.center,
32
- vertical = propsWithDefaults.vertical,
33
- content = propsWithDefaults.content,
34
- size = propsWithDefaults.size,
35
- rest = (0, _objectWithoutPropertiesLoose2.default)(propsWithDefaults, _excluded);
36
- var _useClassNames = (0, _hooks.useClassNames)(classPrefix),
37
- merge = _useClassNames.merge,
38
- withClassPrefix = _useClassNames.withClassPrefix,
39
- prefix = _useClassNames.prefix;
40
- var labelId = (0, _hooks.useUniqueId)('loader-label-');
41
- var classes = merge(className, prefix('wrapper', "speed-" + speed, size, {
15
+ const Loader = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
16
+ const {
17
+ propsWithDefaults
18
+ } = (0, _CustomProvider.useCustom)('Loader', props);
19
+ const {
20
+ as: Component = 'div',
21
+ classPrefix = 'loader',
22
+ className,
23
+ inverse,
24
+ backdrop,
25
+ speed = 'normal',
26
+ center,
27
+ vertical,
28
+ content,
29
+ size,
30
+ ...rest
31
+ } = propsWithDefaults;
32
+ const {
33
+ merge,
34
+ withClassPrefix,
35
+ prefix
36
+ } = (0, _hooks.useClassNames)(classPrefix);
37
+ const labelId = (0, _hooks.useUniqueId)('loader-label-');
38
+ const classes = merge(className, prefix('wrapper', `speed-${speed}`, size, {
42
39
  'backdrop-wrapper': backdrop,
43
- vertical: vertical,
44
- inverse: inverse,
45
- center: center
40
+ vertical,
41
+ inverse,
42
+ center
46
43
  }));
47
44
  return /*#__PURE__*/_react.default.createElement(Component, (0, _extends2.default)({
48
45
  role: "status",
@@ -62,16 +59,4 @@ var Loader = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
62
59
  }, content)));
63
60
  });
64
61
  Loader.displayName = 'Loader';
65
- Loader.propTypes = {
66
- as: _propTypes.default.elementType,
67
- className: _propTypes.default.string,
68
- classPrefix: _propTypes.default.string,
69
- center: _propTypes.default.bool,
70
- backdrop: _propTypes.default.bool,
71
- inverse: _propTypes.default.bool,
72
- vertical: _propTypes.default.bool,
73
- content: _propTypes.default.node,
74
- size: (0, _propTypes2.oneOf)(['lg', 'md', 'sm', 'xs']),
75
- speed: (0, _propTypes2.oneOf)(['normal', 'fast', 'slow', 'paused'])
76
- };
77
62
  var _default = exports.default = Loader;
File without changes