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