rsuite 5.74.2 → 5.75.0

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 (481) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/Card/package.json +7 -0
  3. package/Card/styles/index.css +105 -0
  4. package/Card/styles/index.less +62 -0
  5. package/CardBody/package.json +7 -0
  6. package/CardFooter/package.json +7 -0
  7. package/CardGroup/package.json +7 -0
  8. package/CardGroup/styles/index.css +7 -0
  9. package/CardGroup/styles/index.less +8 -0
  10. package/CardHeader/package.json +7 -0
  11. package/List/styles/index.css +10 -12
  12. package/List/styles/index.less +12 -4
  13. package/Stat/package.json +7 -0
  14. package/Stat/styles/index.css +1749 -0
  15. package/Stat/styles/index.less +106 -0
  16. package/StatGroup/package.json +7 -0
  17. package/StatGroup/styles/index.css +7 -0
  18. package/StatGroup/styles/index.less +8 -0
  19. package/StatHelpText/package.json +7 -0
  20. package/StatLabel/package.json +7 -0
  21. package/StatTrend/package.json +7 -0
  22. package/StatValue/package.json +7 -0
  23. package/StatValueUnit/package.json +7 -0
  24. package/cjs/Affix/Affix.js +2 -2
  25. package/cjs/Animation/Transition.js +7 -7
  26. package/cjs/AutoComplete/AutoComplete.js +7 -7
  27. package/cjs/Avatar/useImage.js +1 -1
  28. package/cjs/Breadcrumb/Breadcrumb.js +1 -1
  29. package/cjs/Calendar/Calendar.js +3 -3
  30. package/cjs/Calendar/CalendarContainer.js +1 -1
  31. package/cjs/Calendar/Grid/GridRow.js +3 -3
  32. package/cjs/Calendar/MonthDropdown/MonthDropdownItem.js +1 -1
  33. package/cjs/Calendar/TimeDropdown/TimeDropdown.js +3 -3
  34. package/cjs/Calendar/hooks/useCalendarState.js +6 -6
  35. package/cjs/Card/Card.d.ts +33 -0
  36. package/cjs/Card/Card.js +63 -0
  37. package/cjs/Card/CardBody.d.ts +4 -0
  38. package/cjs/Card/CardBody.js +11 -0
  39. package/cjs/Card/CardFooter.d.ts +4 -0
  40. package/cjs/Card/CardFooter.js +11 -0
  41. package/cjs/Card/CardHeader.d.ts +4 -0
  42. package/cjs/Card/CardHeader.js +11 -0
  43. package/cjs/Card/index.d.ts +6 -0
  44. package/cjs/Card/index.js +8 -0
  45. package/cjs/CardGroup/CardGroup.d.ts +13 -0
  46. package/cjs/CardGroup/CardGroup.js +47 -0
  47. package/cjs/CardGroup/index.d.ts +3 -0
  48. package/cjs/CardGroup/index.js +8 -0
  49. package/cjs/Carousel/Carousel.js +4 -4
  50. package/cjs/CascadeTree/CascadeTree.js +1 -1
  51. package/cjs/CascadeTree/TreeView.js +1 -1
  52. package/cjs/CascadeTree/hooks/useSearch.js +4 -4
  53. package/cjs/CascadeTree/hooks/useSelect.js +2 -2
  54. package/cjs/Cascader/Cascader.js +13 -13
  55. package/cjs/Cascader/useActive.js +4 -4
  56. package/cjs/CheckPicker/CheckPicker.js +5 -5
  57. package/cjs/CheckTree/CheckTree.js +1 -1
  58. package/cjs/CheckTree/CheckTreeNode.js +3 -3
  59. package/cjs/CheckTree/CheckTreeView.js +7 -7
  60. package/cjs/CheckTree/utils.js +3 -3
  61. package/cjs/CheckTreePicker/CheckTreePicker.js +2 -2
  62. package/cjs/CheckTreePicker/hooks/useFocusState.js +3 -3
  63. package/cjs/Checkbox/Checkbox.js +2 -2
  64. package/cjs/CheckboxGroup/CheckboxGroup.js +1 -1
  65. package/cjs/CustomProvider/FormattedNumber.d.ts +7 -0
  66. package/cjs/CustomProvider/FormattedNumber.js +19 -0
  67. package/cjs/CustomProvider/index.d.ts +1 -0
  68. package/cjs/CustomProvider/index.js +3 -1
  69. package/cjs/CustomProvider/types.d.ts +8 -0
  70. package/cjs/CustomProvider/useCustom.d.ts +1 -0
  71. package/cjs/CustomProvider/useCustom.js +3 -1
  72. package/cjs/DateInput/DateField.js +2 -2
  73. package/cjs/DateInput/DateInput.js +2 -2
  74. package/cjs/DateInput/hooks/useDateInputState.js +2 -2
  75. package/cjs/DateInput/hooks/useIsFocused.js +2 -2
  76. package/cjs/DateInput/hooks/useKeyboardInputEvent.js +5 -5
  77. package/cjs/DatePicker/DatePicker.js +14 -14
  78. package/cjs/DatePicker/PredefinedRanges.js +1 -1
  79. package/cjs/DatePicker/hooks/useFocus.js +1 -1
  80. package/cjs/DatePicker/hooks/useMonthView.js +1 -1
  81. package/cjs/DateRangeInput/DateRangeInput.js +4 -4
  82. package/cjs/DateRangePicker/DateRangePicker.js +8 -8
  83. package/cjs/DateRangePicker/hooks/useCalendarHandlers.js +5 -5
  84. package/cjs/Dropdown/Dropdown.js +3 -3
  85. package/cjs/Dropdown/DropdownItem.js +2 -2
  86. package/cjs/Dropdown/DropdownMenu.js +1 -1
  87. package/cjs/Form/Form.js +8 -8
  88. package/cjs/Form/hooks/useFormValidate.js +19 -19
  89. package/cjs/FormControl/FormControl.js +5 -5
  90. package/cjs/FormControl/hooks/useField.js +1 -1
  91. package/cjs/FormControl/hooks/useRegisterModel.js +2 -2
  92. package/cjs/InlineEdit/renderChildren.js +1 -1
  93. package/cjs/InlineEdit/useEditState.js +7 -7
  94. package/cjs/InlineEdit/useFocusEvent.js +5 -5
  95. package/cjs/Input/Input.js +3 -3
  96. package/cjs/InputGroup/InputGroup.js +2 -2
  97. package/cjs/InputNumber/InputNumber.js +3 -3
  98. package/cjs/InputPicker/InputAutosize.js +1 -1
  99. package/cjs/InputPicker/InputPicker.js +13 -13
  100. package/cjs/InputPicker/InputSearch.js +1 -1
  101. package/cjs/InputPicker/hooks/useData.js +1 -1
  102. package/cjs/InputPicker/hooks/useInput.js +2 -2
  103. package/cjs/List/List.d.ts +19 -1
  104. package/cjs/List/List.js +11 -7
  105. package/cjs/List/ListItem.d.ts +1 -1
  106. package/cjs/List/helper/useSortHelper.js +10 -10
  107. package/cjs/MaskedInput/TextMask.js +3 -3
  108. package/cjs/Message/Message.js +1 -1
  109. package/cjs/Modal/Modal.js +6 -6
  110. package/cjs/Modal/utils.js +2 -2
  111. package/cjs/MultiCascadeTree/SearchView.js +1 -1
  112. package/cjs/MultiCascadeTree/TreeView.js +1 -1
  113. package/cjs/MultiCascadeTree/hooks/useCascadeValue.js +5 -5
  114. package/cjs/MultiCascadeTree/hooks/useSearch.js +1 -1
  115. package/cjs/MultiCascadeTree/hooks/useSelect.js +1 -1
  116. package/cjs/MultiCascadeTree/utils.js +9 -9
  117. package/cjs/MultiCascader/MultiCascader.js +5 -5
  118. package/cjs/Nav/Nav.js +2 -2
  119. package/cjs/Nav/NavDropdown.js +3 -3
  120. package/cjs/Nav/NavDropdownItem.js +2 -2
  121. package/cjs/Nav/NavDropdownMenu.js +1 -1
  122. package/cjs/Nav/NavItem.js +3 -3
  123. package/cjs/Navbar/NavbarDropdown.js +3 -3
  124. package/cjs/Navbar/NavbarDropdownItem.js +4 -4
  125. package/cjs/Navbar/NavbarItem.js +3 -3
  126. package/cjs/Notification/Notification.js +1 -1
  127. package/cjs/Pagination/PaginationButton.js +1 -1
  128. package/cjs/Pagination/PaginationGroup.js +3 -3
  129. package/cjs/Panel/Panel.js +2 -2
  130. package/cjs/PanelGroup/PanelGroup.js +1 -1
  131. package/cjs/Placeholder/PlaceholderGrid.js +2 -2
  132. package/cjs/Placeholder/PlaceholderParagraph.js +1 -1
  133. package/cjs/Radio/Radio.js +2 -2
  134. package/cjs/RadioGroup/RadioGroup.js +1 -1
  135. package/cjs/RadioTile/RadioTile.js +2 -2
  136. package/cjs/RadioTileGroup/RadioTileGroup.js +1 -1
  137. package/cjs/RangeSlider/RangeSlider.js +5 -5
  138. package/cjs/Rate/Character.js +2 -2
  139. package/cjs/Rate/Rate.js +3 -3
  140. package/cjs/SafeAnchor/SafeAnchor.js +1 -1
  141. package/cjs/SelectPicker/SelectPicker.js +7 -7
  142. package/cjs/Sidebar/Sidebar.js +1 -1
  143. package/cjs/Sidenav/ExpandedSidenavDropdown.js +4 -4
  144. package/cjs/Sidenav/ExpandedSidenavDropdownItem.js +3 -3
  145. package/cjs/Sidenav/ExpandedSidenavDropdownMenu.js +2 -2
  146. package/cjs/Sidenav/Sidenav.js +1 -1
  147. package/cjs/Sidenav/SidenavDropdown.js +4 -4
  148. package/cjs/Sidenav/SidenavDropdownItem.js +2 -2
  149. package/cjs/Sidenav/SidenavDropdownMenu.js +1 -1
  150. package/cjs/Sidenav/SidenavItem.js +4 -4
  151. package/cjs/Sidenav/SidenavToggle.js +1 -1
  152. package/cjs/Slider/Graduated.js +1 -1
  153. package/cjs/Slider/Slider.js +3 -3
  154. package/cjs/Slider/useDrag.js +6 -6
  155. package/cjs/Stack/HStack.d.ts +6 -3
  156. package/cjs/Stack/HStack.js +1 -0
  157. package/cjs/Stack/Stack.d.ts +6 -2
  158. package/cjs/Stack/Stack.js +1 -1
  159. package/cjs/Stack/VStack.d.ts +6 -3
  160. package/cjs/Stack/VStack.js +1 -0
  161. package/cjs/Stat/Stat.d.ts +26 -0
  162. package/cjs/Stat/Stat.js +57 -0
  163. package/cjs/Stat/StatHelpText.d.ts +4 -0
  164. package/cjs/Stat/StatHelpText.js +11 -0
  165. package/cjs/Stat/StatLabel.d.ts +14 -0
  166. package/cjs/Stat/StatLabel.js +53 -0
  167. package/cjs/Stat/StatTrend.d.ts +7 -0
  168. package/cjs/Stat/StatTrend.js +68 -0
  169. package/cjs/Stat/StatValue.d.ts +7 -0
  170. package/cjs/Stat/StatValue.js +41 -0
  171. package/cjs/Stat/StatValueUnit.d.ts +4 -0
  172. package/cjs/Stat/StatValueUnit.js +11 -0
  173. package/cjs/Stat/index.d.ts +3 -0
  174. package/cjs/Stat/index.js +8 -0
  175. package/cjs/StatGroup/StatGroup.d.ts +13 -0
  176. package/cjs/StatGroup/StatGroup.js +47 -0
  177. package/cjs/StatGroup/index.d.ts +3 -0
  178. package/cjs/StatGroup/index.js +8 -0
  179. package/cjs/Tabs/Tabs.js +1 -1
  180. package/cjs/Timeline/Timeline.js +1 -1
  181. package/cjs/Toggle/Toggle.js +1 -1
  182. package/cjs/Tree/Tree.js +1 -1
  183. package/cjs/Tree/TreeNode.js +9 -9
  184. package/cjs/Tree/TreeView.js +7 -7
  185. package/cjs/Tree/hooks/useExpandTree.js +1 -1
  186. package/cjs/Tree/hooks/useFlattenTree.js +1 -1
  187. package/cjs/Tree/hooks/useFocusTree.js +6 -6
  188. package/cjs/Tree/hooks/useTreeDrag.js +17 -17
  189. package/cjs/Tree/hooks/useTreeSearch.js +1 -1
  190. package/cjs/Tree/utils/flattenTree.js +6 -6
  191. package/cjs/Tree/utils/focusableTree.js +6 -6
  192. package/cjs/Tree/utils/getNodeParentKeys.js +4 -4
  193. package/cjs/Tree/utils/treeKeyboardInteractions.js +2 -2
  194. package/cjs/TreePicker/TreePicker.js +5 -5
  195. package/cjs/TreePicker/hooks/useFocusState.js +4 -4
  196. package/cjs/Uploader/UploadFileItem.js +5 -5
  197. package/cjs/Uploader/UploadTrigger.js +11 -11
  198. package/cjs/Uploader/Uploader.js +16 -16
  199. package/cjs/Uploader/utils/ajaxUpload.js +5 -5
  200. package/cjs/index.d.ts +8 -0
  201. package/cjs/index.js +10 -2
  202. package/cjs/internals/Disclosure/Disclosure.js +3 -3
  203. package/cjs/internals/Disclosure/DisclosureButton.js +2 -2
  204. package/cjs/internals/Menu/Menu.js +3 -3
  205. package/cjs/internals/Menu/MenuItem.js +1 -1
  206. package/cjs/internals/Menu/Menubar.js +2 -2
  207. package/cjs/internals/Overlay/Modal.js +7 -7
  208. package/cjs/internals/Overlay/Overlay.js +1 -1
  209. package/cjs/internals/Overlay/OverlayTrigger.js +3 -3
  210. package/cjs/internals/Overlay/Position.js +5 -5
  211. package/cjs/internals/Picker/ListCheckItem.js +3 -3
  212. package/cjs/internals/Picker/ListItem.js +1 -1
  213. package/cjs/internals/Picker/Listbox.js +4 -4
  214. package/cjs/internals/Picker/PickerToggle.js +2 -2
  215. package/cjs/internals/Picker/SelectedElement.js +1 -1
  216. package/cjs/internals/Picker/hooks/useFocusItemValue.js +2 -2
  217. package/cjs/internals/Picker/hooks/usePickerRef.js +4 -4
  218. package/cjs/internals/Picker/hooks/useSearch.js +1 -1
  219. package/cjs/internals/Picker/hooks/useToggleKeyDownEvent.js +9 -9
  220. package/cjs/internals/Picker/utils.js +8 -8
  221. package/cjs/internals/Ripple/Ripple.js +2 -2
  222. package/cjs/internals/ScrollView/hooks/useScrollState.js +1 -1
  223. package/cjs/internals/Tree/utils/filterNodesOfTree.js +3 -3
  224. package/cjs/internals/Tree/utils/findNodeOfTree.js +3 -3
  225. package/cjs/internals/Tree/utils/getParentMap.js +3 -3
  226. package/cjs/internals/Windowing/AutoSizer.js +1 -1
  227. package/cjs/internals/Windowing/List.js +4 -4
  228. package/cjs/internals/hooks/useClickOutside.js +1 -1
  229. package/cjs/internals/hooks/useElementResize.js +1 -1
  230. package/cjs/internals/hooks/useEventListener.js +1 -1
  231. package/cjs/internals/hooks/useFocus.js +2 -2
  232. package/cjs/internals/hooks/useMount.js +1 -1
  233. package/cjs/internals/hooks/useRootClose.js +4 -4
  234. package/cjs/internals/hooks/useTimeout.js +1 -1
  235. package/cjs/internals/utils/stringifyReactNode.js +5 -5
  236. package/cjs/toaster/ToastContainer.d.ts +1 -0
  237. package/cjs/toaster/ToastContainer.js +19 -14
  238. package/cjs/toaster/hooks/useDelayedClosure.js +2 -2
  239. package/cjs/toaster/toaster.js +7 -7
  240. package/cjs/useToaster/useToaster.js +1 -1
  241. package/dist/rsuite-no-reset-rtl.css +240 -36
  242. package/dist/rsuite-no-reset-rtl.min.css +1 -1
  243. package/dist/rsuite-no-reset-rtl.min.css.map +1 -1
  244. package/dist/rsuite-no-reset.css +240 -36
  245. package/dist/rsuite-no-reset.min.css +1 -1
  246. package/dist/rsuite-no-reset.min.css.map +1 -1
  247. package/dist/rsuite-rtl.css +240 -36
  248. package/dist/rsuite-rtl.min.css +1 -1
  249. package/dist/rsuite-rtl.min.css.map +1 -1
  250. package/dist/rsuite.css +240 -36
  251. package/dist/rsuite.js +384 -175
  252. package/dist/rsuite.js.map +1 -1
  253. package/dist/rsuite.min.css +1 -1
  254. package/dist/rsuite.min.css.map +1 -1
  255. package/dist/rsuite.min.js +1 -1
  256. package/dist/rsuite.min.js.map +1 -1
  257. package/esm/Affix/Affix.js +2 -2
  258. package/esm/Animation/Transition.js +7 -7
  259. package/esm/AutoComplete/AutoComplete.js +7 -7
  260. package/esm/Avatar/useImage.js +1 -1
  261. package/esm/Breadcrumb/Breadcrumb.js +1 -1
  262. package/esm/Calendar/Calendar.js +3 -3
  263. package/esm/Calendar/CalendarContainer.js +1 -1
  264. package/esm/Calendar/Grid/GridRow.js +3 -3
  265. package/esm/Calendar/MonthDropdown/MonthDropdownItem.js +1 -1
  266. package/esm/Calendar/TimeDropdown/TimeDropdown.js +3 -3
  267. package/esm/Calendar/hooks/useCalendarState.js +6 -6
  268. package/esm/Card/Card.d.ts +33 -0
  269. package/esm/Card/Card.js +58 -0
  270. package/esm/Card/CardBody.d.ts +4 -0
  271. package/esm/Card/CardBody.js +7 -0
  272. package/esm/Card/CardFooter.d.ts +4 -0
  273. package/esm/Card/CardFooter.js +7 -0
  274. package/esm/Card/CardHeader.d.ts +4 -0
  275. package/esm/Card/CardHeader.js +7 -0
  276. package/esm/Card/index.d.ts +6 -0
  277. package/esm/Card/index.js +3 -0
  278. package/esm/CardGroup/CardGroup.d.ts +13 -0
  279. package/esm/CardGroup/CardGroup.js +42 -0
  280. package/esm/CardGroup/index.d.ts +3 -0
  281. package/esm/CardGroup/index.js +3 -0
  282. package/esm/Carousel/Carousel.js +4 -4
  283. package/esm/CascadeTree/CascadeTree.js +1 -1
  284. package/esm/CascadeTree/TreeView.js +1 -1
  285. package/esm/CascadeTree/hooks/useSearch.js +4 -4
  286. package/esm/CascadeTree/hooks/useSelect.js +2 -2
  287. package/esm/Cascader/Cascader.js +13 -13
  288. package/esm/Cascader/useActive.js +4 -4
  289. package/esm/CheckPicker/CheckPicker.js +5 -5
  290. package/esm/CheckTree/CheckTree.js +1 -1
  291. package/esm/CheckTree/CheckTreeNode.js +3 -3
  292. package/esm/CheckTree/CheckTreeView.js +7 -7
  293. package/esm/CheckTree/utils.js +3 -3
  294. package/esm/CheckTreePicker/CheckTreePicker.js +2 -2
  295. package/esm/CheckTreePicker/hooks/useFocusState.js +3 -3
  296. package/esm/Checkbox/Checkbox.js +2 -2
  297. package/esm/CheckboxGroup/CheckboxGroup.js +1 -1
  298. package/esm/CustomProvider/FormattedNumber.d.ts +7 -0
  299. package/esm/CustomProvider/FormattedNumber.js +13 -0
  300. package/esm/CustomProvider/index.d.ts +1 -0
  301. package/esm/CustomProvider/index.js +1 -0
  302. package/esm/CustomProvider/types.d.ts +8 -0
  303. package/esm/CustomProvider/useCustom.d.ts +1 -0
  304. package/esm/CustomProvider/useCustom.js +3 -1
  305. package/esm/DateInput/DateField.js +2 -2
  306. package/esm/DateInput/DateInput.js +2 -2
  307. package/esm/DateInput/hooks/useDateInputState.js +2 -2
  308. package/esm/DateInput/hooks/useIsFocused.js +2 -2
  309. package/esm/DateInput/hooks/useKeyboardInputEvent.js +5 -5
  310. package/esm/DatePicker/DatePicker.js +14 -14
  311. package/esm/DatePicker/PredefinedRanges.js +1 -1
  312. package/esm/DatePicker/hooks/useFocus.js +1 -1
  313. package/esm/DatePicker/hooks/useMonthView.js +1 -1
  314. package/esm/DateRangeInput/DateRangeInput.js +4 -4
  315. package/esm/DateRangePicker/DateRangePicker.js +8 -8
  316. package/esm/DateRangePicker/hooks/useCalendarHandlers.js +5 -5
  317. package/esm/Dropdown/Dropdown.js +3 -3
  318. package/esm/Dropdown/DropdownItem.js +2 -2
  319. package/esm/Dropdown/DropdownMenu.js +1 -1
  320. package/esm/Form/Form.js +8 -8
  321. package/esm/Form/hooks/useFormValidate.js +19 -19
  322. package/esm/FormControl/FormControl.js +5 -5
  323. package/esm/FormControl/hooks/useField.js +1 -1
  324. package/esm/FormControl/hooks/useRegisterModel.js +2 -2
  325. package/esm/InlineEdit/renderChildren.js +1 -1
  326. package/esm/InlineEdit/useEditState.js +7 -7
  327. package/esm/InlineEdit/useFocusEvent.js +5 -5
  328. package/esm/Input/Input.js +3 -3
  329. package/esm/InputGroup/InputGroup.js +2 -2
  330. package/esm/InputNumber/InputNumber.js +3 -3
  331. package/esm/InputPicker/InputAutosize.js +1 -1
  332. package/esm/InputPicker/InputPicker.js +13 -13
  333. package/esm/InputPicker/InputSearch.js +1 -1
  334. package/esm/InputPicker/hooks/useData.js +1 -1
  335. package/esm/InputPicker/hooks/useInput.js +2 -2
  336. package/esm/List/List.d.ts +19 -1
  337. package/esm/List/List.js +11 -7
  338. package/esm/List/ListItem.d.ts +1 -1
  339. package/esm/List/helper/useSortHelper.js +10 -10
  340. package/esm/MaskedInput/TextMask.js +3 -3
  341. package/esm/Message/Message.js +1 -1
  342. package/esm/Modal/Modal.js +6 -6
  343. package/esm/Modal/utils.js +2 -2
  344. package/esm/MultiCascadeTree/SearchView.js +1 -1
  345. package/esm/MultiCascadeTree/TreeView.js +1 -1
  346. package/esm/MultiCascadeTree/hooks/useCascadeValue.js +5 -5
  347. package/esm/MultiCascadeTree/hooks/useSearch.js +1 -1
  348. package/esm/MultiCascadeTree/hooks/useSelect.js +1 -1
  349. package/esm/MultiCascadeTree/utils.js +13 -10
  350. package/esm/MultiCascader/MultiCascader.js +5 -5
  351. package/esm/Nav/Nav.js +2 -2
  352. package/esm/Nav/NavDropdown.js +3 -3
  353. package/esm/Nav/NavDropdownItem.js +2 -2
  354. package/esm/Nav/NavDropdownMenu.js +1 -1
  355. package/esm/Nav/NavItem.js +3 -3
  356. package/esm/Navbar/NavbarDropdown.js +3 -3
  357. package/esm/Navbar/NavbarDropdownItem.js +4 -4
  358. package/esm/Navbar/NavbarItem.js +3 -3
  359. package/esm/Notification/Notification.js +1 -1
  360. package/esm/Pagination/PaginationButton.js +1 -1
  361. package/esm/Pagination/PaginationGroup.js +3 -3
  362. package/esm/Panel/Panel.js +2 -2
  363. package/esm/PanelGroup/PanelGroup.js +1 -1
  364. package/esm/Placeholder/PlaceholderGrid.js +2 -2
  365. package/esm/Placeholder/PlaceholderParagraph.js +1 -1
  366. package/esm/Radio/Radio.js +2 -2
  367. package/esm/RadioGroup/RadioGroup.js +1 -1
  368. package/esm/RadioTile/RadioTile.js +2 -2
  369. package/esm/RadioTileGroup/RadioTileGroup.js +1 -1
  370. package/esm/RangeSlider/RangeSlider.js +5 -5
  371. package/esm/Rate/Character.js +2 -2
  372. package/esm/Rate/Rate.js +3 -3
  373. package/esm/SafeAnchor/SafeAnchor.js +1 -1
  374. package/esm/SelectPicker/SelectPicker.js +7 -7
  375. package/esm/Sidebar/Sidebar.js +1 -1
  376. package/esm/Sidenav/ExpandedSidenavDropdown.js +4 -4
  377. package/esm/Sidenav/ExpandedSidenavDropdownItem.js +3 -3
  378. package/esm/Sidenav/ExpandedSidenavDropdownMenu.js +2 -2
  379. package/esm/Sidenav/Sidenav.js +1 -1
  380. package/esm/Sidenav/SidenavDropdown.js +4 -4
  381. package/esm/Sidenav/SidenavDropdownItem.js +2 -2
  382. package/esm/Sidenav/SidenavDropdownMenu.js +1 -1
  383. package/esm/Sidenav/SidenavItem.js +4 -4
  384. package/esm/Sidenav/SidenavToggle.js +1 -1
  385. package/esm/Slider/Graduated.js +1 -1
  386. package/esm/Slider/Slider.js +3 -3
  387. package/esm/Slider/useDrag.js +6 -6
  388. package/esm/Stack/HStack.d.ts +6 -3
  389. package/esm/Stack/HStack.js +1 -0
  390. package/esm/Stack/Stack.d.ts +6 -2
  391. package/esm/Stack/Stack.js +1 -1
  392. package/esm/Stack/VStack.d.ts +6 -3
  393. package/esm/Stack/VStack.js +1 -0
  394. package/esm/Stat/Stat.d.ts +26 -0
  395. package/esm/Stat/Stat.js +52 -0
  396. package/esm/Stat/StatHelpText.d.ts +4 -0
  397. package/esm/Stat/StatHelpText.js +7 -0
  398. package/esm/Stat/StatLabel.d.ts +14 -0
  399. package/esm/Stat/StatLabel.js +48 -0
  400. package/esm/Stat/StatTrend.d.ts +7 -0
  401. package/esm/Stat/StatTrend.js +63 -0
  402. package/esm/Stat/StatValue.d.ts +7 -0
  403. package/esm/Stat/StatValue.js +36 -0
  404. package/esm/Stat/StatValueUnit.d.ts +4 -0
  405. package/esm/Stat/StatValueUnit.js +7 -0
  406. package/esm/Stat/index.d.ts +3 -0
  407. package/esm/Stat/index.js +3 -0
  408. package/esm/StatGroup/StatGroup.d.ts +13 -0
  409. package/esm/StatGroup/StatGroup.js +42 -0
  410. package/esm/StatGroup/index.d.ts +3 -0
  411. package/esm/StatGroup/index.js +3 -0
  412. package/esm/Tabs/Tabs.js +1 -1
  413. package/esm/Timeline/Timeline.js +1 -1
  414. package/esm/Toggle/Toggle.js +1 -1
  415. package/esm/Tree/Tree.js +1 -1
  416. package/esm/Tree/TreeNode.js +9 -9
  417. package/esm/Tree/TreeView.js +7 -7
  418. package/esm/Tree/hooks/useExpandTree.js +1 -1
  419. package/esm/Tree/hooks/useFlattenTree.js +1 -1
  420. package/esm/Tree/hooks/useFocusTree.js +6 -6
  421. package/esm/Tree/hooks/useTreeDrag.js +17 -17
  422. package/esm/Tree/hooks/useTreeSearch.js +1 -1
  423. package/esm/Tree/utils/flattenTree.js +6 -6
  424. package/esm/Tree/utils/focusableTree.js +6 -6
  425. package/esm/Tree/utils/getNodeParentKeys.js +4 -4
  426. package/esm/Tree/utils/treeKeyboardInteractions.js +2 -2
  427. package/esm/TreePicker/TreePicker.js +5 -5
  428. package/esm/TreePicker/hooks/useFocusState.js +4 -4
  429. package/esm/Uploader/UploadFileItem.js +5 -5
  430. package/esm/Uploader/UploadTrigger.js +11 -11
  431. package/esm/Uploader/Uploader.js +16 -16
  432. package/esm/Uploader/utils/ajaxUpload.js +5 -5
  433. package/esm/index.d.ts +8 -0
  434. package/esm/index.js +4 -0
  435. package/esm/internals/Disclosure/Disclosure.js +3 -3
  436. package/esm/internals/Disclosure/DisclosureButton.js +2 -2
  437. package/esm/internals/Menu/Menu.js +3 -3
  438. package/esm/internals/Menu/MenuItem.js +1 -1
  439. package/esm/internals/Menu/Menubar.js +2 -2
  440. package/esm/internals/Overlay/Modal.js +7 -7
  441. package/esm/internals/Overlay/Overlay.js +1 -1
  442. package/esm/internals/Overlay/OverlayTrigger.js +3 -3
  443. package/esm/internals/Overlay/Position.js +5 -5
  444. package/esm/internals/Picker/ListCheckItem.js +3 -3
  445. package/esm/internals/Picker/ListItem.js +1 -1
  446. package/esm/internals/Picker/Listbox.js +4 -4
  447. package/esm/internals/Picker/PickerToggle.js +2 -2
  448. package/esm/internals/Picker/SelectedElement.js +1 -1
  449. package/esm/internals/Picker/hooks/useFocusItemValue.js +2 -2
  450. package/esm/internals/Picker/hooks/usePickerRef.js +4 -4
  451. package/esm/internals/Picker/hooks/useSearch.js +1 -1
  452. package/esm/internals/Picker/hooks/useToggleKeyDownEvent.js +9 -9
  453. package/esm/internals/Picker/utils.js +8 -8
  454. package/esm/internals/Ripple/Ripple.js +2 -2
  455. package/esm/internals/ScrollView/hooks/useScrollState.js +1 -1
  456. package/esm/internals/Tree/utils/filterNodesOfTree.js +3 -3
  457. package/esm/internals/Tree/utils/findNodeOfTree.js +3 -3
  458. package/esm/internals/Tree/utils/getParentMap.js +3 -3
  459. package/esm/internals/Windowing/AutoSizer.js +1 -1
  460. package/esm/internals/Windowing/List.js +4 -4
  461. package/esm/internals/hooks/useClickOutside.js +1 -1
  462. package/esm/internals/hooks/useElementResize.js +1 -1
  463. package/esm/internals/hooks/useEventListener.js +1 -1
  464. package/esm/internals/hooks/useFocus.js +2 -2
  465. package/esm/internals/hooks/useMount.js +1 -1
  466. package/esm/internals/hooks/useRootClose.js +4 -4
  467. package/esm/internals/hooks/useTimeout.js +1 -1
  468. package/esm/internals/utils/stringifyReactNode.js +5 -5
  469. package/esm/toaster/ToastContainer.d.ts +1 -0
  470. package/esm/toaster/ToastContainer.js +19 -14
  471. package/esm/toaster/hooks/useDelayedClosure.js +2 -2
  472. package/esm/toaster/toaster.js +7 -7
  473. package/esm/useToaster/useToaster.js +1 -1
  474. package/package.json +1 -1
  475. package/styles/color-modes/dark.less +6 -0
  476. package/styles/color-modes/high-contrast.less +6 -0
  477. package/styles/color-modes/light.less +6 -0
  478. package/styles/index.less +4 -0
  479. package/toaster/styles/index.css +24 -24
  480. package/toaster/styles/index.less +29 -29
  481. package/useToaster/styles/index.css +24 -24
@@ -65,41 +65,41 @@ var TreeNode = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
65
65
  var handleExpand = (0, _hooks.useEventCallback)(function (event) {
66
66
  var _event$nativeEvent, _event$nativeEvent$st;
67
67
  // Stop propagation when using custom loading icon
68
- event === null || event === void 0 ? void 0 : (_event$nativeEvent = event.nativeEvent) === null || _event$nativeEvent === void 0 ? void 0 : (_event$nativeEvent$st = _event$nativeEvent.stopImmediatePropagation) === null || _event$nativeEvent$st === void 0 ? void 0 : _event$nativeEvent$st.call(_event$nativeEvent);
68
+ event === null || event === void 0 || (_event$nativeEvent = event.nativeEvent) === null || _event$nativeEvent === void 0 || (_event$nativeEvent$st = _event$nativeEvent.stopImmediatePropagation) === null || _event$nativeEvent$st === void 0 || _event$nativeEvent$st.call(_event$nativeEvent);
69
69
  event.stopPropagation();
70
- onExpand === null || onExpand === void 0 ? void 0 : onExpand(nodeData, expanded);
70
+ onExpand === null || onExpand === void 0 || onExpand(nodeData, expanded);
71
71
  });
72
72
  var handleSelect = (0, _hooks.useEventCallback)(function (event) {
73
73
  if (disabled) {
74
74
  return;
75
75
  }
76
- onSelect === null || onSelect === void 0 ? void 0 : onSelect(nodeData, event);
76
+ onSelect === null || onSelect === void 0 || onSelect(nodeData, event);
77
77
  });
78
78
  var handleDragStart = (0, _hooks.useEventCallback)(function (event) {
79
- onDragStart === null || onDragStart === void 0 ? void 0 : onDragStart(nodeData, event);
79
+ onDragStart === null || onDragStart === void 0 || onDragStart(nodeData, event);
80
80
  });
81
81
  var handleDragEnter = (0, _hooks.useEventCallback)(function (event) {
82
82
  event.preventDefault();
83
83
  event.stopPropagation();
84
- onDragEnter === null || onDragEnter === void 0 ? void 0 : onDragEnter(nodeData, event);
84
+ onDragEnter === null || onDragEnter === void 0 || onDragEnter(nodeData, event);
85
85
  });
86
86
  var handleDragOver = (0, _hooks.useEventCallback)(function (event) {
87
87
  event.preventDefault();
88
88
  event.stopPropagation();
89
- onDragOver === null || onDragOver === void 0 ? void 0 : onDragOver(nodeData, event);
89
+ onDragOver === null || onDragOver === void 0 || onDragOver(nodeData, event);
90
90
  });
91
91
  var handleDragLeave = (0, _hooks.useEventCallback)(function (event) {
92
92
  event.stopPropagation();
93
- onDragLeave === null || onDragLeave === void 0 ? void 0 : onDragLeave(nodeData, event);
93
+ onDragLeave === null || onDragLeave === void 0 || onDragLeave(nodeData, event);
94
94
  });
95
95
  var handleDragEnd = (0, _hooks.useEventCallback)(function (event) {
96
96
  event.stopPropagation();
97
- onDragEnd === null || onDragEnd === void 0 ? void 0 : onDragEnd(nodeData, event);
97
+ onDragEnd === null || onDragEnd === void 0 || onDragEnd(nodeData, event);
98
98
  });
99
99
  var handleDrop = (0, _hooks.useEventCallback)(function (event) {
100
100
  event.preventDefault();
101
101
  event.stopPropagation();
102
- onDrop === null || onDrop === void 0 ? void 0 : onDrop(nodeData, event);
102
+ onDrop === null || onDrop === void 0 || onDrop(nodeData, event);
103
103
  });
104
104
  var classes = merge(className, withClassPrefix({
105
105
  disabled: disabled,
@@ -93,7 +93,7 @@ var TreeView = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
93
93
  merge = _useClassNames.merge,
94
94
  withClassPrefix = _useClassNames.withClassPrefix;
95
95
  var handleSearchCallback = (0, _hooks.useEventCallback)(function (value, _data, event) {
96
- onSearch === null || onSearch === void 0 ? void 0 : onSearch(value, event);
96
+ onSearch === null || onSearch === void 0 || onSearch(value, event);
97
97
  });
98
98
  var _useTreeSearch = (0, _useTreeSearch2.default)({
99
99
  callback: handleSearchCallback,
@@ -184,9 +184,9 @@ var TreeView = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
184
184
  return itemParentMap.get(item[valueKey]);
185
185
  });
186
186
  setFocusItemValue(nextValue);
187
- onChange === null || onChange === void 0 ? void 0 : onChange(nextValue, event);
188
- onSelect === null || onSelect === void 0 ? void 0 : onSelect(nodeData, nextValue, event);
189
- onSelectItem === null || onSelectItem === void 0 ? void 0 : onSelectItem(nodeData, path);
187
+ onChange === null || onChange === void 0 || onChange(nextValue, event);
188
+ onSelect === null || onSelect === void 0 || onSelect(nodeData, nextValue, event);
189
+ onSelectItem === null || onSelectItem === void 0 || onSelectItem(nodeData, path);
190
190
  });
191
191
  var selectActiveItem = (0, _hooks.useEventCallback)(function (event) {
192
192
  if ((0, _isNil.default)(focusItemValue)) return;
@@ -199,7 +199,7 @@ var TreeView = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
199
199
  enter: selectActiveItem
200
200
  });
201
201
  });
202
- var renderNode = function renderNode(node, index, layer) {
202
+ var _renderNode = function renderNode(node, index, layer) {
203
203
  var visible = node.visible;
204
204
  if (!visible) {
205
205
  return null;
@@ -229,7 +229,7 @@ var TreeView = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
229
229
  className: prefix('group'),
230
230
  role: "group"
231
231
  }, children === null || children === void 0 ? void 0 : children.map(function (child, i) {
232
- return renderNode(child, i, layer);
232
+ return _renderNode(child, i, layer);
233
233
  }), showIndentLine && /*#__PURE__*/_react.default.createElement(_IndentLine.default, null)));
234
234
  }
235
235
  return /*#__PURE__*/_react.default.createElement(_TreeNode.default, (0, _extends2.default)({
@@ -267,7 +267,7 @@ var TreeView = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
267
267
  var classes = merge(withClassPrefix({
268
268
  virtualized: virtualized
269
269
  }), className);
270
- var formattedNodes = getFormattedNodes(renderNode);
270
+ var formattedNodes = getFormattedNodes(_renderNode);
271
271
  return /*#__PURE__*/_react.default.createElement(Component, {
272
272
  ref: ref,
273
273
  className: classes,
@@ -60,7 +60,7 @@ function useExpandTree(data, props) {
60
60
  valueKey: valueKey
61
61
  });
62
62
  setExpandItemValues(nextExpandItemValues);
63
- onExpand === null || onExpand === void 0 ? void 0 : onExpand(nextExpandItemValues, node, (0, _Picker.createConcatChildrenFunction)(node, node[valueKey], {
63
+ onExpand === null || onExpand === void 0 || onExpand(nextExpandItemValues, node, (0, _Picker.createConcatChildrenFunction)(node, node[valueKey], {
64
64
  valueKey: valueKey,
65
65
  childrenKey: childrenKey
66
66
  }));
@@ -76,7 +76,7 @@ function useFlattenTree(data, options) {
76
76
  }
77
77
  flattenTreeData(node[childrenKey], node, layer + 1);
78
78
  });
79
- callback === null || callback === void 0 ? void 0 : callback(flattenedNodes.current);
79
+ callback === null || callback === void 0 || callback(flattenedNodes.current);
80
80
  forceUpdate();
81
81
  }, [callback, forceUpdate, valueKey, labelKey, uncheckableItemValues, childrenKey]);
82
82
  (0, _react.useEffect)(function () {
@@ -63,7 +63,7 @@ function useFocusTree(props) {
63
63
  }
64
64
  if (focusedValue) {
65
65
  setFocusItemValue(focusedValue);
66
- onFocused === null || onFocused === void 0 ? void 0 : onFocused(focusedValue);
66
+ onFocused === null || onFocused === void 0 || onFocused(focusedValue);
67
67
  }
68
68
  });
69
69
  var handleLeftArrowEvent = (0, _hooks.useEventCallback)(function () {
@@ -74,10 +74,10 @@ function useFocusTree(props) {
74
74
  var expand = expandItemValues.includes(focusItem === null || focusItem === void 0 ? void 0 : focusItem[valueKey]);
75
75
  var onFocusItem = function onFocusItem() {
76
76
  var _focusItem$parent, _focusItem$parent2;
77
- var focusedValue = focusItem === null || focusItem === void 0 ? void 0 : (_focusItem$parent = focusItem.parent) === null || _focusItem$parent === void 0 ? void 0 : _focusItem$parent[valueKey];
77
+ var focusedValue = focusItem === null || focusItem === void 0 || (_focusItem$parent = focusItem.parent) === null || _focusItem$parent === void 0 ? void 0 : _focusItem$parent[valueKey];
78
78
  setFocusItemValue(focusedValue);
79
- onFocused === null || onFocused === void 0 ? void 0 : onFocused(focusedValue);
80
- (0, _utils.focusTreeNode)(focusItem === null || focusItem === void 0 ? void 0 : (_focusItem$parent2 = focusItem.parent) === null || _focusItem$parent2 === void 0 ? void 0 : _focusItem$parent2.refKey, treeNodesRefs);
79
+ onFocused === null || onFocused === void 0 || onFocused(focusedValue);
80
+ (0, _utils.focusTreeNode)(focusItem === null || focusItem === void 0 || (_focusItem$parent2 = focusItem.parent) === null || _focusItem$parent2 === void 0 ? void 0 : _focusItem$parent2.refKey, treeNodesRefs);
81
81
  };
82
82
  (0, _utils.handleLeftArrow)({
83
83
  focusItem: focusItem,
@@ -128,7 +128,7 @@ function useFocusTree(props) {
128
128
  var node = (_flattenedNodesRef$cu = flattenedNodesRef.current) === null || _flattenedNodesRef$cu === void 0 ? void 0 : _flattenedNodesRef$cu[refKey];
129
129
  if (node) {
130
130
  setFocusItemValue(node[valueKey]);
131
- onFocused === null || onFocused === void 0 ? void 0 : onFocused(node[valueKey]);
131
+ onFocused === null || onFocused === void 0 || onFocused(node[valueKey]);
132
132
  }
133
133
  }
134
134
  }, [onFocused, valueKey]);
@@ -138,7 +138,7 @@ function useFocusTree(props) {
138
138
  focusTreeActiveNode: focusTreeActiveNode
139
139
  });
140
140
  return function () {
141
- unregister === null || unregister === void 0 ? void 0 : unregister();
141
+ unregister === null || unregister === void 0 || unregister();
142
142
  };
143
143
  // eslint-disable-next-line react-hooks/exhaustive-deps
144
144
  }, []);
@@ -65,7 +65,7 @@ function createDragPreview(name, className) {
65
65
  function removeDragPreview() {
66
66
  var _dragPreview$parentNo, _dragPreview$parentNo2;
67
67
  var dragPreview = document.getElementById('rs-tree-drag-preview');
68
- dragPreview === null || dragPreview === void 0 ? void 0 : (_dragPreview$parentNo = dragPreview.parentNode) === null || _dragPreview$parentNo === void 0 ? void 0 : (_dragPreview$parentNo2 = _dragPreview$parentNo.removeChild) === null || _dragPreview$parentNo2 === void 0 ? void 0 : _dragPreview$parentNo2.call(_dragPreview$parentNo, dragPreview);
68
+ dragPreview === null || dragPreview === void 0 || (_dragPreview$parentNo = dragPreview.parentNode) === null || _dragPreview$parentNo === void 0 || (_dragPreview$parentNo2 = _dragPreview$parentNo.removeChild) === null || _dragPreview$parentNo2 === void 0 || _dragPreview$parentNo2.call(_dragPreview$parentNo, dragPreview);
69
69
  }
70
70
  /**
71
71
  * Custom hook for handling tree node dragging.
@@ -106,17 +106,17 @@ function useTreeDrag(props) {
106
106
  */
107
107
  var getDragNodeKeys = (0, _react.useCallback)(function (dragNode) {
108
108
  var dragNodeKeys = [dragNode[valueKey]];
109
- var traverse = function traverse(data) {
109
+ var _traverse = function traverse(data) {
110
110
  if ((data === null || data === void 0 ? void 0 : data.length) > 0) {
111
111
  data.forEach(function (node) {
112
112
  dragNodeKeys = dragNodeKeys.concat([node[valueKey]]);
113
113
  if (node[childrenKey]) {
114
- traverse(node[childrenKey]);
114
+ _traverse(node[childrenKey]);
115
115
  }
116
116
  });
117
117
  }
118
118
  };
119
- traverse(dragNode[childrenKey]);
119
+ _traverse(dragNode[childrenKey]);
120
120
  return dragNodeKeys;
121
121
  }, [childrenKey, valueKey]);
122
122
 
@@ -126,7 +126,7 @@ function useTreeDrag(props) {
126
126
  */
127
127
  var removeDragNode = (0, _react.useCallback)(function (data, params) {
128
128
  var dragNode = params.dragNode;
129
- var traverse = function traverse(items, parent) {
129
+ var _traverse2 = function traverse(items, parent) {
130
130
  for (var index = 0; index < items.length; index += 1) {
131
131
  var item = items[index];
132
132
  if ((0, _utils.shallowEqual)(item[valueKey], dragNode[valueKey])) {
@@ -138,11 +138,11 @@ function useTreeDrag(props) {
138
138
  break;
139
139
  }
140
140
  if (Array.isArray(item[childrenKey])) {
141
- traverse(item[childrenKey], item);
141
+ _traverse2(item[childrenKey], item);
142
142
  }
143
143
  }
144
144
  };
145
- traverse(data);
145
+ _traverse2(data);
146
146
  }, [childrenKey, valueKey]);
147
147
 
148
148
  /**
@@ -156,7 +156,7 @@ function useTreeDrag(props) {
156
156
  dropNodePosition = params.dropNodePosition;
157
157
  var cloneDragNode = (0, _extends2.default)({}, dragNode);
158
158
  removeDragNode(data, params);
159
- var updateTree = function updateTree(items) {
159
+ var _updateTree = function updateTree(items) {
160
160
  for (var index = 0; index < items.length; index += 1) {
161
161
  var item = items[index];
162
162
  if ((0, _utils.shallowEqual)(item[valueKey], dropNode[valueKey])) {
@@ -176,11 +176,11 @@ function useTreeDrag(props) {
176
176
  }
177
177
  }
178
178
  if (Array.isArray(item[childrenKey]) && item[childrenKey].length > 0) {
179
- updateTree(item[childrenKey]);
179
+ _updateTree(item[childrenKey]);
180
180
  }
181
181
  }
182
182
  };
183
- updateTree(data);
183
+ _updateTree(data);
184
184
  return [].concat(data);
185
185
  };
186
186
  }, [childrenKey, removeDragNode, valueKey]);
@@ -198,10 +198,10 @@ function useTreeDrag(props) {
198
198
  if (draggable) {
199
199
  var _event$dataTransfer;
200
200
  var dragMoverNode = createDragPreview((0, _utils.stringifyReactNode)(nodeData[labelKey]), prefix('drag-preview'));
201
- (_event$dataTransfer = event.dataTransfer) === null || _event$dataTransfer === void 0 ? void 0 : _event$dataTransfer.setDragImage(dragMoverNode, 0, 0);
201
+ (_event$dataTransfer = event.dataTransfer) === null || _event$dataTransfer === void 0 || _event$dataTransfer.setDragImage(dragMoverNode, 0, 0);
202
202
  setDragNodeKeys(getDragNodeKeys(nodeData));
203
203
  setDragNode(flattenedNodes[nodeData.refKey]);
204
- onDragStart === null || onDragStart === void 0 ? void 0 : onDragStart(nodeData, event);
204
+ onDragStart === null || onDragStart === void 0 || onDragStart(nodeData, event);
205
205
  }
206
206
  });
207
207
  var handleDragEnter = (0, _hooks.useEventCallback)(function (nodeData, event) {
@@ -214,7 +214,7 @@ function useTreeDrag(props) {
214
214
  setDragOverNodeKey(nodeData[valueKey]);
215
215
  setDropNodePosition(calDropNodePosition(event, treeNodesRefs[nodeData.refKey]));
216
216
  }
217
- onDragEnter === null || onDragEnter === void 0 ? void 0 : onDragEnter(nodeData, event);
217
+ onDragEnter === null || onDragEnter === void 0 || onDragEnter(nodeData, event);
218
218
  });
219
219
  var handleDragOver = (0, _hooks.useEventCallback)(function (nodeData, event) {
220
220
  if (dragNodeKeys.some(function (d) {
@@ -228,17 +228,17 @@ function useTreeDrag(props) {
228
228
  if (lastDropNodePosition === dropNodePosition) return;
229
229
  setDropNodePosition(lastDropNodePosition);
230
230
  }
231
- onDragOver === null || onDragOver === void 0 ? void 0 : onDragOver(nodeData, event);
231
+ onDragOver === null || onDragOver === void 0 || onDragOver(nodeData, event);
232
232
  });
233
233
  var handleDragLeave = (0, _hooks.useEventCallback)(function (nodeData, event) {
234
- onDragLeave === null || onDragLeave === void 0 ? void 0 : onDragLeave(nodeData, event);
234
+ onDragLeave === null || onDragLeave === void 0 || onDragLeave(nodeData, event);
235
235
  });
236
236
  var handleDragEnd = (0, _hooks.useEventCallback)(function (nodeData, event) {
237
237
  removeDragPreview();
238
238
  setDragNode(null);
239
239
  setDragNodeKeys([]);
240
240
  setDragOverNodeKey(null);
241
- onDragEnd === null || onDragEnd === void 0 ? void 0 : onDragEnd(nodeData, event);
241
+ onDragEnd === null || onDragEnd === void 0 || onDragEnd(nodeData, event);
242
242
  });
243
243
  var handleDrop = (0, _hooks.useEventCallback)(function (nodeData, event) {
244
244
  if (dragNodeKeys.some(function (d) {
@@ -247,7 +247,7 @@ function useTreeDrag(props) {
247
247
  console.error('Cannot drag a node to itself and its children');
248
248
  } else {
249
249
  var dropData = getDropData(nodeData);
250
- onDrop === null || onDrop === void 0 ? void 0 : onDrop(dropData, event);
250
+ onDrop === null || onDrop === void 0 || onDrop(dropData, event);
251
251
  }
252
252
  removeDragPreview();
253
253
  setDragNode(null);
@@ -51,7 +51,7 @@ function useTreeSearch(props) {
51
51
  setFilteredData(filteredData);
52
52
  setSearchKeyword(searchKeyword);
53
53
  if (event) {
54
- callback === null || callback === void 0 ? void 0 : callback(searchKeyword, filteredData, event);
54
+ callback === null || callback === void 0 || callback(searchKeyword, filteredData, event);
55
55
  }
56
56
  };
57
57
  (0, _react.useEffect)(function () {
@@ -8,9 +8,9 @@ exports.flattenTree = flattenTree;
8
8
  exports.walkTreeBfs = walkTreeBfs;
9
9
  exports.walkTreeDfs = walkTreeDfs;
10
10
  var _utils = require("../../internals/utils");
11
- function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
12
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
13
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
11
+ 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."); }
12
+ 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; } }
13
+ 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; }
14
14
  /**
15
15
  * Strategy for walking the tree.
16
16
  */
@@ -77,7 +77,7 @@ function UNSAFE_flattenTree(tree, childrenKey, executor) {
77
77
  childrenKey = 'children';
78
78
  }
79
79
  var flattenData = [];
80
- var traverse = function traverse(data, parent) {
80
+ var _traverse = function traverse(data, parent) {
81
81
  if (!Array.isArray(data)) {
82
82
  return;
83
83
  }
@@ -85,10 +85,10 @@ function UNSAFE_flattenTree(tree, childrenKey, executor) {
85
85
  var node = typeof executor === 'function' ? executor(item, index) : item;
86
86
  flattenData.push((0, _utils.attachParent)(node, parent));
87
87
  if (item[childrenKey]) {
88
- traverse(item[childrenKey], item);
88
+ _traverse(item[childrenKey], item);
89
89
  }
90
90
  });
91
91
  };
92
- traverse(tree, null);
92
+ _traverse(tree, null);
93
93
  return flattenData;
94
94
  }
@@ -18,7 +18,7 @@ var getFocusableItems = exports.getFocusableItems = function getFocusableItems(f
18
18
  childrenKey = props.childrenKey,
19
19
  expandItemValues = props.expandItemValues;
20
20
  var items = [];
21
- var loop = function loop(nodes) {
21
+ var _loop = function loop(nodes) {
22
22
  nodes.forEach(function (node) {
23
23
  var disabled = disabledItemValues.some(function (disabledItem) {
24
24
  return (0, _utils.shallowEqual)(disabledItem, node[valueKey]);
@@ -29,11 +29,11 @@ var getFocusableItems = exports.getFocusableItems = function getFocusableItems(f
29
29
  // always expand when searching
30
30
  var expand = isSearching ? true : expandItemValues.includes(node[valueKey]);
31
31
  if (node[childrenKey] && expand) {
32
- loop(node[childrenKey]);
32
+ _loop(node[childrenKey]);
33
33
  }
34
34
  });
35
35
  };
36
- loop(filteredData);
36
+ _loop(filteredData);
37
37
  return items;
38
38
  };
39
39
 
@@ -72,7 +72,7 @@ var getActiveItem = exports.getActiveItem = function getActiveItem(focusItemValu
72
72
  var focusTreeNode = exports.focusTreeNode = function focusTreeNode(refKey, treeNodeRefs) {
73
73
  var _treeItem$focus;
74
74
  var treeItem = treeNodeRefs[refKey];
75
- treeItem === null || treeItem === void 0 ? void 0 : (_treeItem$focus = treeItem.focus) === null || _treeItem$focus === void 0 ? void 0 : _treeItem$focus.call(treeItem);
75
+ treeItem === null || treeItem === void 0 || (_treeItem$focus = treeItem.focus) === null || _treeItem$focus === void 0 || _treeItem$focus.call(treeItem);
76
76
  };
77
77
  /**
78
78
  * Focuses on the next item in a tree.
@@ -135,7 +135,7 @@ function scrollToActiveTreeNode(props) {
135
135
  if (virtualized && value) {
136
136
  var _list$scrollToItem;
137
137
  var scrollIndex = getScrollToIndex(formattedNodes, value, valueKey);
138
- list === null || list === void 0 ? void 0 : (_list$scrollToItem = list.scrollToItem) === null || _list$scrollToItem === void 0 ? void 0 : _list$scrollToItem.call(list, scrollIndex);
138
+ list === null || list === void 0 || (_list$scrollToItem = list.scrollToItem) === null || _list$scrollToItem === void 0 || _list$scrollToItem.call(list, scrollIndex);
139
139
  }
140
140
  }
141
141
  var focusCurrentItem = exports.focusCurrentItem = function focusCurrentItem(props) {
@@ -145,7 +145,7 @@ var focusCurrentItem = exports.focusCurrentItem = function focusCurrentItem(prop
145
145
  var activeItem = container === null || container === void 0 ? void 0 : container.querySelector(selector);
146
146
  if (activeItem) {
147
147
  var _activeItem$focus, _activeItem$dataset;
148
- activeItem === null || activeItem === void 0 ? void 0 : (_activeItem$focus = activeItem.focus) === null || _activeItem$focus === void 0 ? void 0 : _activeItem$focus.call(activeItem);
148
+ activeItem === null || activeItem === void 0 || (_activeItem$focus = activeItem.focus) === null || _activeItem$focus === void 0 || _activeItem$focus.call(activeItem);
149
149
  return (_activeItem$dataset = activeItem.dataset) === null || _activeItem$dataset === void 0 ? void 0 : _activeItem$dataset.key;
150
150
  }
151
151
  };
@@ -8,14 +8,14 @@ exports.getNodeParentKeys = getNodeParentKeys;
8
8
  */
9
9
  function getNodeParentKeys(nodes, node, valueKey) {
10
10
  var parentKeys = [];
11
- var traverse = function traverse(node) {
11
+ var _traverse = function traverse(node) {
12
12
  var _node$parent;
13
13
  if (node !== null && node !== void 0 && (_node$parent = node.parent) !== null && _node$parent !== void 0 && _node$parent.refKey) {
14
14
  var _node$parent2;
15
- traverse(nodes[node.parent.refKey]);
16
- parentKeys.push(node === null || node === void 0 ? void 0 : (_node$parent2 = node.parent) === null || _node$parent2 === void 0 ? void 0 : _node$parent2[valueKey]);
15
+ _traverse(nodes[node.parent.refKey]);
16
+ parentKeys.push(node === null || node === void 0 || (_node$parent2 = node.parent) === null || _node$parent2 === void 0 ? void 0 : _node$parent2[valueKey]);
17
17
  }
18
18
  };
19
- traverse(node);
19
+ _traverse(node);
20
20
  return parentKeys;
21
21
  }
@@ -20,7 +20,7 @@ function handleLeftArrow(props) {
20
20
  return;
21
21
  }
22
22
  if (expand) {
23
- onExpand === null || onExpand === void 0 ? void 0 : onExpand(focusItem, expand);
23
+ onExpand === null || onExpand === void 0 || onExpand(focusItem, expand);
24
24
  } else if (focusItem !== null && focusItem !== void 0 && focusItem.parent) {
25
25
  onFocusItem();
26
26
  }
@@ -42,7 +42,7 @@ function handleRightArrow(props) {
42
42
  return;
43
43
  }
44
44
  if (!expand) {
45
- onExpand === null || onExpand === void 0 ? void 0 : onExpand(focusItem, expand);
45
+ onExpand === null || onExpand === void 0 || onExpand(focusItem, expand);
46
46
  } else {
47
47
  onFocusItem();
48
48
  }
@@ -156,9 +156,9 @@ var TreePicker = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
156
156
  var handleSelect = (0, _hooks.useEventCallback)(function (treeNode, value, event) {
157
157
  var _target$current, _trigger$current, _trigger$current$clos;
158
158
  setFocusItemValue(value);
159
- onSelect === null || onSelect === void 0 ? void 0 : onSelect(treeNode, value, event);
160
- (_target$current = target.current) === null || _target$current === void 0 ? void 0 : _target$current.focus();
161
- (_trigger$current = trigger.current) === null || _trigger$current === void 0 ? void 0 : (_trigger$current$clos = _trigger$current.close) === null || _trigger$current$clos === void 0 ? void 0 : _trigger$current$clos.call(_trigger$current);
159
+ onSelect === null || onSelect === void 0 || onSelect(treeNode, value, event);
160
+ (_target$current = target.current) === null || _target$current === void 0 || _target$current.focus();
161
+ (_trigger$current = trigger.current) === null || _trigger$current === void 0 || (_trigger$current$clos = _trigger$current.close) === null || _trigger$current$clos === void 0 || _trigger$current$clos.call(_trigger$current);
162
162
  });
163
163
  var handleClean = (0, _hooks.useEventCallback)(function (event) {
164
164
  var target = event.target;
@@ -167,7 +167,7 @@ var TreePicker = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
167
167
  return;
168
168
  }
169
169
  setValue(null);
170
- onChange === null || onChange === void 0 ? void 0 : onChange(null, event);
170
+ onChange === null || onChange === void 0 || onChange(null, event);
171
171
  });
172
172
  var handleTreePressEnter = (0, _hooks.useEventCallback)(function (event) {
173
173
  if ((0, _isNil.default)(focusItemValue)) {
@@ -197,7 +197,7 @@ var TreePicker = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
197
197
  }, rest));
198
198
  var handleChange = (0, _hooks.useEventCallback)(function (nextValue, event) {
199
199
  setValue(nextValue);
200
- onChange === null || onChange === void 0 ? void 0 : onChange(nextValue, event);
200
+ onChange === null || onChange === void 0 || onChange(nextValue, event);
201
201
  });
202
202
  var treeContext = (0, _react.useMemo)(function () {
203
203
  return {
@@ -17,18 +17,18 @@ function useFocusState(props) {
17
17
  setFocusItemValue = _useState2[1];
18
18
  var focusTarget = (0, _hooks.useEventCallback)(function () {
19
19
  var _target$current;
20
- (_target$current = target.current) === null || _target$current === void 0 ? void 0 : _target$current.focus();
20
+ (_target$current = target.current) === null || _target$current === void 0 || _target$current.focus();
21
21
  });
22
22
  var onEnter = (0, _hooks.useEventCallback)(function (node) {
23
23
  var _props$onEnter;
24
24
  setActive(true);
25
- (_props$onEnter = props.onEnter) === null || _props$onEnter === void 0 ? void 0 : _props$onEnter.call(props, node);
25
+ (_props$onEnter = props.onEnter) === null || _props$onEnter === void 0 || _props$onEnter.call(props, node);
26
26
  });
27
27
  var onExit = (0, _hooks.useEventCallback)(function (node) {
28
28
  var _props$onExit;
29
29
  setActive(false);
30
30
  focusTarget();
31
- (_props$onExit = props.onExit) === null || _props$onExit === void 0 ? void 0 : _props$onExit.call(props, node);
31
+ (_props$onExit = props.onExit) === null || _props$onExit === void 0 || _props$onExit.call(props, node);
32
32
  });
33
33
  var onEntered = (0, _hooks.useEventCallback)(function (node) {
34
34
  var _props$onEntered;
@@ -36,7 +36,7 @@ function useFocusState(props) {
36
36
  setFocusItemValue(value);
37
37
  focusActiveNode();
38
38
  }
39
- (_props$onEntered = props.onEntered) === null || _props$onEntered === void 0 ? void 0 : _props$onEntered.call(props, node);
39
+ (_props$onEntered = props.onEntered) === null || _props$onEntered === void 0 || _props$onEntered.call(props, node);
40
40
  });
41
41
  return {
42
42
  active: active,
@@ -84,7 +84,7 @@ var UploadFileItem = /*#__PURE__*/_react.default.forwardRef(function (props, ref
84
84
  }
85
85
 
86
86
  // The thumbnail file size cannot be larger than the preset value.
87
- if (!file.blobFile || (file === null || file === void 0 ? void 0 : (_file$blobFile = file.blobFile) === null || _file$blobFile === void 0 ? void 0 : _file$blobFile.size) > maxPreviewFileSize) {
87
+ if (!file.blobFile || (file === null || file === void 0 || (_file$blobFile = file.blobFile) === null || _file$blobFile === void 0 ? void 0 : _file$blobFile.size) > maxPreviewFileSize) {
88
88
  return;
89
89
  }
90
90
  (0, _previewFile.previewFile)(file.blobFile, callback);
@@ -100,19 +100,19 @@ var UploadFileItem = /*#__PURE__*/_react.default.forwardRef(function (props, ref
100
100
  if (disabled) {
101
101
  return;
102
102
  }
103
- onPreview === null || onPreview === void 0 ? void 0 : onPreview(file, event);
103
+ onPreview === null || onPreview === void 0 || onPreview(file, event);
104
104
  }, [disabled, file, onPreview]);
105
105
  var handleRemove = (0, _react.useCallback)(function (event) {
106
106
  if (disabled) {
107
107
  return;
108
108
  }
109
- onCancel === null || onCancel === void 0 ? void 0 : onCancel(file.fileKey, event);
109
+ onCancel === null || onCancel === void 0 || onCancel(file.fileKey, event);
110
110
  }, [disabled, file.fileKey, onCancel]);
111
111
  var handleReupload = (0, _react.useCallback)(function (event) {
112
112
  if (disabled) {
113
113
  return;
114
114
  }
115
- onReupload === null || onReupload === void 0 ? void 0 : onReupload(file, event);
115
+ onReupload === null || onReupload === void 0 || onReupload(file, event);
116
116
  }, [disabled, file, onReupload]);
117
117
 
118
118
  /**
@@ -228,7 +228,7 @@ var UploadFileItem = /*#__PURE__*/_react.default.forwardRef(function (props, ref
228
228
  var _file$blobFile2;
229
229
  return /*#__PURE__*/_react.default.createElement("span", {
230
230
  className: prefix('size')
231
- }, formatSize(file === null || file === void 0 ? void 0 : (_file$blobFile2 = file.blobFile) === null || _file$blobFile2 === void 0 ? void 0 : _file$blobFile2.size));
231
+ }, formatSize(file === null || file === void 0 || (_file$blobFile2 = file.blobFile) === null || _file$blobFile2 === void 0 ? void 0 : _file$blobFile2.size));
232
232
  }
233
233
  return null;
234
234
  };
@@ -50,7 +50,7 @@ var UploadTrigger = /*#__PURE__*/_react.default.forwardRef(function (props, ref)
50
50
  }));
51
51
  var handleClick = (0, _react.useCallback)(function () {
52
52
  var _inputRef$current;
53
- (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.click();
53
+ (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.click();
54
54
  }, []);
55
55
  var handleClearInput = (0, _react.useCallback)(function () {
56
56
  if (inputRef.current) {
@@ -62,40 +62,40 @@ var UploadTrigger = /*#__PURE__*/_react.default.forwardRef(function (props, ref)
62
62
  event.preventDefault();
63
63
  setDragOver(true);
64
64
  }
65
- onDragEnter === null || onDragEnter === void 0 ? void 0 : onDragEnter(event);
65
+ onDragEnter === null || onDragEnter === void 0 || onDragEnter(event);
66
66
  }, [draggable, onDragEnter]);
67
67
  var handleDragLeave = (0, _react.useCallback)(function (event) {
68
68
  if (draggable) {
69
69
  event.preventDefault();
70
70
  setDragOver(false);
71
71
  }
72
- onDragLeave === null || onDragLeave === void 0 ? void 0 : onDragLeave(event);
72
+ onDragLeave === null || onDragLeave === void 0 || onDragLeave(event);
73
73
  }, [draggable, onDragLeave]);
74
74
  var handleDragOver = (0, _react.useCallback)(function (event) {
75
75
  draggable && event.preventDefault();
76
- onDragOver === null || onDragOver === void 0 ? void 0 : onDragOver(event);
76
+ onDragOver === null || onDragOver === void 0 || onDragOver(event);
77
77
  }, [draggable, onDragOver]);
78
78
  var handleDrop = (0, _react.useCallback)(function (event) {
79
79
  if (draggable) {
80
80
  event.preventDefault();
81
81
  setDragOver(false);
82
- onChange === null || onChange === void 0 ? void 0 : onChange(event);
82
+ onChange === null || onChange === void 0 || onChange(event);
83
83
  }
84
- onDrop === null || onDrop === void 0 ? void 0 : onDrop(event);
84
+ onDrop === null || onDrop === void 0 || onDrop(event);
85
85
  }, [draggable, onChange, onDrop]);
86
86
  var handleChange = (0, _react.useCallback)(function (event) {
87
87
  if ((0, _utils.isIE11)()) {
88
- var _event$target, _event$target$files;
88
+ var _event$target;
89
89
  /**
90
90
  * IE11 triggers onChange event of file input when element.value is assigned
91
91
  * https://github.com/facebook/react/issues/8793
92
92
  */
93
- if (((_event$target = event.target) === null || _event$target === void 0 ? void 0 : (_event$target$files = _event$target.files) === null || _event$target$files === void 0 ? void 0 : _event$target$files.length) > 0) {
94
- onChange === null || onChange === void 0 ? void 0 : onChange(event);
93
+ if (((_event$target = event.target) === null || _event$target === void 0 || (_event$target = _event$target.files) === null || _event$target === void 0 ? void 0 : _event$target.length) > 0) {
94
+ onChange === null || onChange === void 0 || onChange(event);
95
95
  }
96
96
  return;
97
97
  }
98
- onChange === null || onChange === void 0 ? void 0 : onChange(event);
98
+ onChange === null || onChange === void 0 || onChange(event);
99
99
  }, [onChange]);
100
100
  (0, _react.useImperativeHandle)(ref, function () {
101
101
  return {
@@ -114,7 +114,7 @@ var UploadTrigger = /*#__PURE__*/_react.default.forwardRef(function (props, ref)
114
114
  buttonProps.onDragOver = handleDragOver;
115
115
  buttonProps.onDrop = handleDrop;
116
116
  }
117
- var trigger = children ? ( /*#__PURE__*/_react.default.cloneElement(_react.default.Children.only(children), buttonProps)) : /*#__PURE__*/_react.default.createElement(Component, buttonProps, locale === null || locale === void 0 ? void 0 : locale.upload);
117
+ var trigger = children ? (/*#__PURE__*/_react.default.cloneElement(_react.default.Children.only(children), buttonProps)) : /*#__PURE__*/_react.default.createElement(Component, buttonProps, locale === null || locale === void 0 ? void 0 : locale.upload);
118
118
  return /*#__PURE__*/_react.default.createElement("div", {
119
119
  ref: rootRef,
120
120
  className: classes