rsuite 5.75.0 → 6.0.0-canary-20241227

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1433) hide show
  1. package/Accordion/styles/index.css +12 -45
  2. package/Animation/styles/animation.less +0 -0
  3. package/Animation/styles/index.css +49 -214
  4. package/Animation/styles/mixin.less +0 -0
  5. package/AutoComplete/styles/index.css +114 -474
  6. package/Avatar/styles/index.css +10 -17
  7. package/AvatarGroup/styles/index.css +12 -16
  8. package/AvatarGroup/styles/index.less +3 -0
  9. package/Badge/styles/index.css +8 -15
  10. package/Badge/styles/index.less +0 -0
  11. package/Breadcrumb/styles/index.css +9 -16
  12. package/Button/styles/index.css +15 -87
  13. package/ButtonGroup/styles/index.css +8 -9
  14. package/ButtonGroup/styles/index.less +0 -0
  15. package/ButtonToolbar/styles/index.css +7 -6
  16. package/CHANGELOG.md +9 -0
  17. package/Calendar/styles/index.css +30 -202
  18. package/Calendar/styles/index.less +0 -5
  19. package/Card/styles/index.css +12 -28
  20. package/Carousel/styles/index.css +21 -75
  21. package/Carousel/styles/index.less +0 -0
  22. package/CascadeTree/styles/index.css +10 -39
  23. package/Cascader/styles/index.css +117 -503
  24. package/CheckPicker/styles/index.css +121 -538
  25. package/CheckTree/styles/index.css +125 -563
  26. package/CheckTreePicker/styles/index.css +126 -569
  27. package/Checkbox/styles/index.css +13 -68
  28. package/CheckboxGroup/styles/index.css +9 -14
  29. package/Col/styles/index.css +7 -4
  30. package/Container/styles/index.css +10 -17
  31. package/Container/styles/index.less +0 -0
  32. package/Content/styles/index.css +8 -7
  33. package/Content/styles/index.less +0 -0
  34. package/DateInput/styles/index.css +7 -43
  35. package/DatePicker/styles/index.css +129 -603
  36. package/DatePicker/styles/mixin.less +0 -0
  37. package/DateRangeInput/styles/index.css +7 -43
  38. package/DateRangePicker/styles/index.css +132 -619
  39. package/Divider/styles/index.css +11 -21
  40. package/Drawer/styles/index.css +15 -46
  41. package/Drawer/styles/mixin.less +0 -0
  42. package/Dropdown/styles/index.css +32 -168
  43. package/FlexboxGrid/styles/index.css +41 -108
  44. package/FlexboxGrid/styles/index.less +0 -0
  45. package/Footer/styles/index.css +11 -20
  46. package/Footer/styles/index.less +0 -0
  47. package/Form/styles/index.css +7 -4
  48. package/Form/styles/index.less +0 -0
  49. package/Form/styles/mixin.less +9 -5
  50. package/FormControl/styles/index.css +8 -6
  51. package/FormControl/styles/index.less +0 -0
  52. package/FormControlLabel/styles/index.css +7 -5
  53. package/FormControlLabel/styles/index.less +0 -0
  54. package/FormErrorMessage/styles/animation.less +0 -0
  55. package/FormErrorMessage/styles/index.css +22 -89
  56. package/FormErrorMessage/styles/index.less +0 -0
  57. package/FormGroup/styles/index.css +7 -4
  58. package/FormHelpText/styles/index.css +8 -10
  59. package/FormHelpText/styles/index.less +0 -0
  60. package/Grid/styles/grid-framework.less +0 -0
  61. package/Grid/styles/index.css +7 -4
  62. package/Grid/styles/mixin.less +0 -0
  63. package/Header/styles/index.css +11 -20
  64. package/Header/styles/index.less +0 -0
  65. package/Heading/styles/index.css +7 -4
  66. package/IconButton/styles/index.css +15 -96
  67. package/IconButton/styles/index.less +0 -0
  68. package/Image/package.json +7 -0
  69. package/Image/styles/index.css +29 -0
  70. package/Image/styles/index.less +34 -0
  71. package/InlineEdit/styles/index.css +9 -29
  72. package/Input/styles/index.css +7 -43
  73. package/Input/styles/index.less +0 -0
  74. package/InputGroup/styles/index.css +19 -181
  75. package/InputNumber/styles/index.css +23 -239
  76. package/InputNumber/styles/index.less +0 -0
  77. package/InputPicker/styles/index.css +115 -490
  78. package/List/styles/index.css +8 -14
  79. package/Loader/styles/index.css +19 -57
  80. package/Message/styles/index.css +33 -155
  81. package/Modal/styles/animation.less +0 -0
  82. package/Modal/styles/index.css +13 -32
  83. package/Modal/styles/mixin.less +0 -0
  84. package/MultiCascadeTree/styles/index.css +123 -567
  85. package/MultiCascader/styles/index.css +123 -567
  86. package/Nav/styles/index.css +41 -226
  87. package/Navbar/styles/index.css +36 -204
  88. package/Notification/styles/index.css +24 -109
  89. package/Notification/styles/mixin.less +0 -0
  90. package/Pagination/styles/index.css +128 -570
  91. package/Pagination/styles/mixin.less +0 -0
  92. package/Panel/styles/index.css +12 -43
  93. package/PanelGroup/styles/index.css +7 -6
  94. package/PanelGroup/styles/index.less +0 -0
  95. package/Placeholder/styles/index.css +15 -47
  96. package/Popover/styles/index.css +16 -124
  97. package/Popover/styles/mixins.less +0 -12
  98. package/Progress/styles/animation.less +0 -0
  99. package/Progress/styles/index.css +19 -89
  100. package/README.md +9 -5
  101. package/Radio/styles/index.css +12 -66
  102. package/Radio/styles/mixin.less +0 -0
  103. package/RadioGroup/styles/index.css +9 -25
  104. package/RadioTile/styles/index.css +7 -13
  105. package/RangeSlider/styles/index.css +20 -144
  106. package/Rate/styles/index.css +13 -32
  107. package/Row/styles/index.css +7 -4
  108. package/Row/styles/index.less +0 -0
  109. package/SelectPicker/styles/index.css +115 -482
  110. package/SelectPicker/styles/index.less +1 -1
  111. package/Sidebar/styles/index.css +10 -20
  112. package/Sidebar/styles/index.less +0 -0
  113. package/Sidenav/styles/index.css +21 -108
  114. package/Sidenav/styles/mixin.less +0 -0
  115. package/Slider/styles/index.css +20 -144
  116. package/Stack/styles/index.css +7 -6
  117. package/Stack/styles/index.less +0 -0
  118. package/Stat/styles/index.css +30 -249
  119. package/Steps/styles/index.css +14 -46
  120. package/Table/styles/index.css +19 -68
  121. package/Table/styles/mixin.less +0 -0
  122. package/Tabs/styles/index.css +46 -249
  123. package/Tag/styles/index.css +7 -15
  124. package/TagGroup/styles/index.css +7 -4
  125. package/TagInput/styles/index.css +125 -562
  126. package/TagPicker/styles/index.css +125 -562
  127. package/Text/styles/index.css +8 -23
  128. package/TimePicker/styles/index.css +129 -603
  129. package/TimeRangePicker/styles/index.css +132 -619
  130. package/Timeline/styles/index.css +9 -22
  131. package/Timeline/styles/index.less +0 -3
  132. package/Timeline/styles/mixin.less +0 -0
  133. package/Toggle/styles/index.css +13 -60
  134. package/Tooltip/styles/index.css +15 -113
  135. package/Tooltip/styles/index.less +0 -0
  136. package/Tooltip/styles/mixins.less +0 -12
  137. package/Tree/styles/index.css +2745 -59
  138. package/Tree/styles/index.less +1 -1
  139. package/TreePicker/styles/index.css +2745 -59
  140. package/Uploader/styles/index.css +34 -211
  141. package/Uploader/styles/mixin.less +0 -0
  142. package/cjs/Accordion/Accordion.js +4 -3
  143. package/cjs/Affix/Affix.d.ts +1 -1
  144. package/cjs/Affix/Affix.js +55 -66
  145. package/cjs/Affix/index.js +0 -0
  146. package/cjs/Animation/Bounce.js +11 -10
  147. package/cjs/Animation/Collapse.js +41 -49
  148. package/cjs/Animation/Fade.js +13 -12
  149. package/cjs/Animation/Slide.js +14 -14
  150. package/cjs/Animation/Transition.d.ts +1 -40
  151. package/cjs/Animation/Transition.js +97 -115
  152. package/cjs/Animation/index.js +1 -1
  153. package/cjs/Animation/utils.d.ts +0 -9
  154. package/cjs/Animation/utils.js +2 -13
  155. package/cjs/AutoComplete/AutoComplete.js +87 -128
  156. package/cjs/AutoComplete/Combobox.js +11 -10
  157. package/cjs/AutoComplete/index.js +0 -0
  158. package/cjs/AutoComplete/utils.js +7 -6
  159. package/cjs/Avatar/Avatar.js +54 -76
  160. package/cjs/Avatar/AvatarIcon.js +12 -14
  161. package/cjs/Avatar/index.js +0 -0
  162. package/cjs/Avatar/useImage.js +19 -19
  163. package/cjs/AvatarGroup/AvatarGroup.js +31 -43
  164. package/cjs/AvatarGroup/index.js +0 -0
  165. package/cjs/Badge/Badge.js +24 -36
  166. package/cjs/Badge/index.js +0 -0
  167. package/cjs/Breadcrumb/Breadcrumb.js +34 -49
  168. package/cjs/Breadcrumb/BreadcrumbItem.d.ts +1 -1
  169. package/cjs/Breadcrumb/BreadcrumbItem.js +21 -34
  170. package/cjs/Breadcrumb/index.js +0 -0
  171. package/cjs/Button/Button.js +44 -63
  172. package/cjs/Button/index.js +0 -0
  173. package/cjs/ButtonGroup/ButtonGroup.js +28 -44
  174. package/cjs/ButtonGroup/ButtonGroupContext.js +1 -1
  175. package/cjs/ButtonGroup/index.js +0 -0
  176. package/cjs/ButtonToolbar/ButtonToolbar.js +17 -23
  177. package/cjs/ButtonToolbar/index.js +0 -0
  178. package/cjs/Calendar/Calendar.js +46 -66
  179. package/cjs/Calendar/CalendarBody.js +26 -26
  180. package/cjs/Calendar/CalendarContainer.js +88 -95
  181. package/cjs/Calendar/CalendarHeader.js +50 -50
  182. package/cjs/Calendar/CalendarProvider.js +2 -2
  183. package/cjs/Calendar/Grid/Grid.js +22 -25
  184. package/cjs/Calendar/Grid/GridCell.js +39 -37
  185. package/cjs/Calendar/Grid/GridHeaderRow.js +27 -29
  186. package/cjs/Calendar/Grid/GridRow.js +48 -53
  187. package/cjs/Calendar/MonthDropdown/MonthDropdown.js +62 -63
  188. package/cjs/Calendar/MonthDropdown/MonthDropdownItem.js +36 -39
  189. package/cjs/Calendar/TimeDropdown/TimeColumn.js +7 -7
  190. package/cjs/Calendar/TimeDropdown/TimeDropdown.js +64 -64
  191. package/cjs/Calendar/TimeDropdown/utils/formatWithLeadingZero.js +3 -2
  192. package/cjs/Calendar/TimeDropdown/utils/getClockTime.js +7 -5
  193. package/cjs/Calendar/TimeDropdown/utils/getTimeLimits.js +3 -3
  194. package/cjs/Calendar/TimeDropdown/utils/scrollToTime.js +6 -7
  195. package/cjs/Calendar/hooks/useCalendar.js +3 -2
  196. package/cjs/Calendar/hooks/useCalendarDate.d.ts +1 -1
  197. package/cjs/Calendar/hooks/useCalendarDate.js +11 -12
  198. package/cjs/Calendar/hooks/useCalendarState.js +18 -19
  199. package/cjs/Calendar/utils/isEveryDateInMonth.js +2 -2
  200. package/cjs/Card/Card.js +30 -39
  201. package/cjs/Card/CardBody.d.ts +1 -1
  202. package/cjs/Card/CardBody.js +1 -1
  203. package/cjs/Card/CardFooter.d.ts +1 -1
  204. package/cjs/Card/CardFooter.js +1 -1
  205. package/cjs/Card/CardHeader.d.ts +1 -1
  206. package/cjs/Card/CardHeader.js +1 -1
  207. package/cjs/CardGroup/CardGroup.js +24 -28
  208. package/cjs/Carousel/Carousel.js +76 -97
  209. package/cjs/Carousel/index.js +0 -0
  210. package/cjs/CascadeTree/CascadeTree.d.ts +0 -1
  211. package/cjs/CascadeTree/CascadeTree.js +93 -105
  212. package/cjs/CascadeTree/SearchView.js +49 -54
  213. package/cjs/CascadeTree/TreeView.js +84 -92
  214. package/cjs/CascadeTree/hooks/usePaths.js +18 -19
  215. package/cjs/CascadeTree/hooks/useSearch.js +22 -22
  216. package/cjs/CascadeTree/hooks/useSelect.js +26 -24
  217. package/cjs/CascadeTree/utils.js +10 -8
  218. package/cjs/Cascader/Cascader.d.ts +0 -1
  219. package/cjs/Cascader/Cascader.js +203 -239
  220. package/cjs/Cascader/index.js +0 -0
  221. package/cjs/Cascader/useActive.js +15 -15
  222. package/cjs/CheckPicker/CheckPicker.d.ts +0 -1
  223. package/cjs/CheckPicker/CheckPicker.js +146 -200
  224. package/cjs/CheckPicker/index.js +0 -0
  225. package/cjs/CheckTree/CheckTree.js +72 -77
  226. package/cjs/CheckTree/CheckTreeNode.js +53 -51
  227. package/cjs/CheckTree/CheckTreeView.js +178 -185
  228. package/cjs/CheckTree/hooks/useTreeCheckState.js +26 -25
  229. package/cjs/CheckTree/hooks/useTreeNodeProps.js +40 -37
  230. package/cjs/CheckTree/hooks/useTreeValue.js +6 -7
  231. package/cjs/CheckTree/utils.js +62 -65
  232. package/cjs/CheckTreePicker/CheckTreePicker.js +175 -190
  233. package/cjs/CheckTreePicker/hooks/useFocusState.js +13 -15
  234. package/cjs/CheckTreePicker/index.js +0 -0
  235. package/cjs/Checkbox/Checkbox.js +65 -102
  236. package/cjs/Checkbox/index.js +0 -0
  237. package/cjs/CheckboxGroup/CheckboxGroup.js +40 -62
  238. package/cjs/CheckboxGroup/CheckboxGroupContext.js +1 -1
  239. package/cjs/CheckboxGroup/index.js +0 -0
  240. package/cjs/Col/Col.js +32 -66
  241. package/cjs/Col/index.js +0 -0
  242. package/cjs/Container/Container.d.ts +1 -1
  243. package/cjs/Container/Container.js +22 -32
  244. package/cjs/Container/index.js +0 -0
  245. package/cjs/Content/Content.d.ts +1 -1
  246. package/cjs/Content/Content.js +1 -1
  247. package/cjs/Content/index.js +0 -0
  248. package/cjs/CustomProvider/CustomProvider.d.ts +8 -16
  249. package/cjs/CustomProvider/CustomProvider.js +47 -54
  250. package/cjs/CustomProvider/FormattedDate.js +8 -5
  251. package/cjs/CustomProvider/FormattedNumber.js +10 -9
  252. package/cjs/CustomProvider/index.js +1 -1
  253. package/cjs/CustomProvider/types.d.ts +2 -0
  254. package/cjs/CustomProvider/useCustom.js +44 -47
  255. package/cjs/DOMHelper/index.js +4 -4
  256. package/cjs/DOMHelper/isElement.js +1 -1
  257. package/cjs/DateInput/DateField.js +106 -105
  258. package/cjs/DateInput/DateInput.js +124 -139
  259. package/cjs/DateInput/hooks/useDateInputState.js +46 -42
  260. package/cjs/DateInput/hooks/useFieldCursor.js +16 -16
  261. package/cjs/DateInput/hooks/useIsFocused.js +9 -9
  262. package/cjs/DateInput/hooks/useKeyboardInputEvent.js +9 -7
  263. package/cjs/DateInput/hooks/useSelectedState.js +4 -6
  264. package/cjs/DateInput/utils.d.ts +1 -1
  265. package/cjs/DateInput/utils.js +76 -72
  266. package/cjs/DatePicker/DatePicker.js +190 -225
  267. package/cjs/DatePicker/PredefinedRanges.js +24 -29
  268. package/cjs/DatePicker/Toolbar.d.ts +1 -1
  269. package/cjs/DatePicker/Toolbar.js +28 -26
  270. package/cjs/DatePicker/hooks/useCustomizedInput.d.ts +1 -1
  271. package/cjs/DatePicker/hooks/useCustomizedInput.js +21 -26
  272. package/cjs/DatePicker/hooks/useFocus.js +45 -39
  273. package/cjs/DatePicker/hooks/useMonthView.js +8 -8
  274. package/cjs/DatePicker/utils.d.ts +0 -7
  275. package/cjs/DatePicker/utils.js +29 -36
  276. package/cjs/DateRangeInput/DateRangeInput.js +131 -152
  277. package/cjs/DateRangeInput/utils.js +50 -50
  278. package/cjs/DateRangePicker/Calendar.js +24 -29
  279. package/cjs/DateRangePicker/DateRangePicker.js +260 -323
  280. package/cjs/DateRangePicker/DateRangePickerProvider.js +5 -4
  281. package/cjs/DateRangePicker/Header.js +20 -23
  282. package/cjs/DateRangePicker/disabledDateUtils.js +17 -35
  283. package/cjs/DateRangePicker/hooks/useCalendarHandlers.js +14 -14
  284. package/cjs/DateRangePicker/hooks/useDateDisabled.js +10 -6
  285. package/cjs/DateRangePicker/hooks/useDateRangePicker.js +3 -2
  286. package/cjs/DateRangePicker/index.js +2 -2
  287. package/cjs/DateRangePicker/utils.js +24 -20
  288. package/cjs/Divider/Divider.js +18 -26
  289. package/cjs/Divider/index.js +0 -0
  290. package/cjs/Drawer/Drawer.js +19 -29
  291. package/cjs/Drawer/DrawerActions.d.ts +1 -1
  292. package/cjs/Drawer/DrawerActions.js +1 -1
  293. package/cjs/Drawer/DrawerBody.js +5 -7
  294. package/cjs/Drawer/DrawerFooter.js +5 -7
  295. package/cjs/Drawer/DrawerHeader.js +5 -7
  296. package/cjs/Drawer/DrawerTitle.js +5 -7
  297. package/cjs/Drawer/index.js +0 -0
  298. package/cjs/Dropdown/Dropdown.d.ts +1 -1
  299. package/cjs/Dropdown/Dropdown.js +74 -106
  300. package/cjs/Dropdown/DropdownContext.js +1 -1
  301. package/cjs/Dropdown/DropdownItem.js +54 -73
  302. package/cjs/Dropdown/DropdownMenu.js +79 -97
  303. package/cjs/Dropdown/DropdownSeparator.js +11 -16
  304. package/cjs/Dropdown/DropdownState.js +22 -23
  305. package/cjs/Dropdown/DropdownToggle.js +20 -34
  306. package/cjs/Dropdown/index.js +0 -0
  307. package/cjs/Dropdown/useRenderDropdownItem.js +2 -2
  308. package/cjs/FlexboxGrid/FlexboxGrid.js +17 -27
  309. package/cjs/FlexboxGrid/FlexboxGridItem.js +17 -26
  310. package/cjs/FlexboxGrid/index.js +0 -0
  311. package/cjs/Footer/Footer.d.ts +1 -1
  312. package/cjs/Footer/Footer.js +1 -1
  313. package/cjs/Footer/index.js +0 -0
  314. package/cjs/Form/Form.js +108 -133
  315. package/cjs/Form/FormContext.js +5 -5
  316. package/cjs/Form/hooks/useFormClassNames.js +15 -14
  317. package/cjs/Form/hooks/useFormRef.js +9 -8
  318. package/cjs/Form/hooks/useFormValidate.js +77 -77
  319. package/cjs/Form/hooks/useFormValue.js +22 -19
  320. package/cjs/Form/hooks/useSchemaModel.js +31 -33
  321. package/cjs/FormControl/FormControl.d.ts +1 -1
  322. package/cjs/FormControl/FormControl.js +83 -97
  323. package/cjs/FormControl/hooks/useField.js +23 -18
  324. package/cjs/FormControl/hooks/useRegisterModel.js +7 -6
  325. package/cjs/FormControl/index.js +0 -0
  326. package/cjs/FormControlLabel/FormControlLabel.js +21 -28
  327. package/cjs/FormControlLabel/index.js +0 -0
  328. package/cjs/FormErrorMessage/FormErrorMessage.js +24 -34
  329. package/cjs/FormErrorMessage/index.js +0 -0
  330. package/cjs/FormGroup/FormGroup.js +33 -40
  331. package/cjs/FormGroup/index.js +1 -1
  332. package/cjs/FormHelpText/FormHelpText.js +22 -29
  333. package/cjs/FormHelpText/index.js +0 -0
  334. package/cjs/Grid/Grid.js +18 -25
  335. package/cjs/Grid/index.js +0 -0
  336. package/cjs/Header/Header.d.ts +1 -1
  337. package/cjs/Header/Header.js +1 -1
  338. package/cjs/Header/index.js +0 -0
  339. package/cjs/Heading/Heading.js +17 -24
  340. package/cjs/HeadingGroup/HeadingGroup.d.ts +1 -1
  341. package/cjs/HeadingGroup/HeadingGroup.js +1 -1
  342. package/cjs/Highlight/Highlight.js +21 -28
  343. package/cjs/Highlight/utils/highlightText.js +10 -10
  344. package/cjs/IconButton/IconButton.js +19 -29
  345. package/cjs/IconButton/index.js +0 -0
  346. package/cjs/Image/Image.d.ts +42 -0
  347. package/cjs/Image/Image.js +95 -0
  348. package/cjs/Image/ImageWrapper.d.ts +1 -0
  349. package/cjs/Image/ImageWrapper.js +10 -0
  350. package/cjs/Image/hooks/useImage.d.ts +14 -0
  351. package/cjs/Image/hooks/useImage.js +65 -0
  352. package/cjs/Image/index.d.ts +3 -0
  353. package/cjs/Image/index.js +8 -0
  354. package/cjs/InlineEdit/EditableControls.js +6 -6
  355. package/cjs/InlineEdit/InlineEdit.d.ts +3 -3
  356. package/cjs/InlineEdit/InlineEdit.js +54 -72
  357. package/cjs/InlineEdit/renderChildren.js +19 -20
  358. package/cjs/InlineEdit/useEditState.js +23 -30
  359. package/cjs/InlineEdit/useFocusEvent.js +17 -15
  360. package/cjs/Input/Input.js +41 -60
  361. package/cjs/Input/index.js +0 -0
  362. package/cjs/InputGroup/InputGroup.js +34 -48
  363. package/cjs/InputGroup/InputGroupAddon.js +14 -21
  364. package/cjs/InputGroup/InputGroupButton.js +14 -13
  365. package/cjs/InputGroup/index.js +0 -0
  366. package/cjs/InputNumber/InputNumber.js +73 -107
  367. package/cjs/InputNumber/index.js +0 -0
  368. package/cjs/InputPicker/InputAutosize.js +49 -66
  369. package/cjs/InputPicker/InputPicker.js +246 -294
  370. package/cjs/InputPicker/InputPickerContext.js +2 -2
  371. package/cjs/InputPicker/InputSearch.js +21 -24
  372. package/cjs/InputPicker/TagList.js +14 -14
  373. package/cjs/InputPicker/TextBox.js +20 -21
  374. package/cjs/InputPicker/hooks/useData.js +14 -18
  375. package/cjs/InputPicker/hooks/useInput.js +15 -13
  376. package/cjs/InputPicker/hooks/useMaxWidth.js +2 -4
  377. package/cjs/InputPicker/utils.js +3 -2
  378. package/cjs/List/List.js +55 -79
  379. package/cjs/List/ListContext.js +4 -6
  380. package/cjs/List/ListItem.js +39 -46
  381. package/cjs/List/helper/AutoScroller.js +35 -35
  382. package/cjs/List/helper/useManager.js +14 -18
  383. package/cjs/List/helper/useSortHelper.js +88 -101
  384. package/cjs/List/helper/utils.js +11 -16
  385. package/cjs/List/index.js +0 -0
  386. package/cjs/Loader/Loader.js +27 -42
  387. package/cjs/Loader/index.js +0 -0
  388. package/cjs/MaskedInput/MaskedInput.js +7 -5
  389. package/cjs/MaskedInput/TextMask.js +29 -43
  390. package/cjs/MaskedInput/adjustCaretPosition.js +64 -82
  391. package/cjs/MaskedInput/conformToMask.js +52 -55
  392. package/cjs/MaskedInput/createTextMaskInputElement.js +62 -58
  393. package/cjs/MaskedInput/index.js +0 -0
  394. package/cjs/MaskedInput/types.js +0 -0
  395. package/cjs/MaskedInput/utilities.js +8 -8
  396. package/cjs/Message/Message.js +51 -71
  397. package/cjs/Message/index.js +0 -0
  398. package/cjs/Modal/Modal.js +91 -118
  399. package/cjs/Modal/ModalBody.js +28 -31
  400. package/cjs/Modal/ModalContext.js +1 -1
  401. package/cjs/Modal/ModalDialog.d.ts +0 -10
  402. package/cjs/Modal/ModalDialog.js +25 -40
  403. package/cjs/Modal/ModalFooter.d.ts +1 -1
  404. package/cjs/Modal/ModalFooter.js +1 -1
  405. package/cjs/Modal/ModalHeader.js +23 -32
  406. package/cjs/Modal/ModalTitle.js +16 -24
  407. package/cjs/Modal/utils.js +28 -29
  408. package/cjs/MultiCascadeTree/MultiCascadeTree.js +76 -80
  409. package/cjs/MultiCascadeTree/SearchView.js +53 -58
  410. package/cjs/MultiCascadeTree/TreeView.js +84 -99
  411. package/cjs/MultiCascadeTree/hooks/useCascadeValue.js +68 -100
  412. package/cjs/MultiCascadeTree/hooks/useColumnData.js +10 -16
  413. package/cjs/MultiCascadeTree/hooks/useFlattenData.js +10 -10
  414. package/cjs/MultiCascadeTree/hooks/useSearch.js +17 -19
  415. package/cjs/MultiCascadeTree/hooks/useSelect.js +39 -37
  416. package/cjs/MultiCascadeTree/utils.js +44 -42
  417. package/cjs/MultiCascader/MultiCascader.js +190 -224
  418. package/cjs/MultiCascader/index.js +0 -0
  419. package/cjs/Nav/AdaptiveNavItem.js +12 -13
  420. package/cjs/Nav/Nav.js +52 -73
  421. package/cjs/Nav/NavContext.js +1 -1
  422. package/cjs/Nav/NavDropdown.d.ts +1 -1
  423. package/cjs/Nav/NavDropdown.js +63 -93
  424. package/cjs/Nav/NavDropdownItem.js +56 -72
  425. package/cjs/Nav/NavDropdownMenu.d.ts +1 -1
  426. package/cjs/Nav/NavDropdownMenu.js +67 -81
  427. package/cjs/Nav/NavDropdownToggle.js +19 -30
  428. package/cjs/Nav/NavItem.js +34 -49
  429. package/cjs/Nav/NavMenu.js +18 -20
  430. package/cjs/Nav/index.js +0 -0
  431. package/cjs/Navbar/Navbar.js +17 -18
  432. package/cjs/Navbar/NavbarBody.d.ts +1 -1
  433. package/cjs/Navbar/NavbarBody.js +1 -1
  434. package/cjs/Navbar/NavbarBrand.d.ts +1 -1
  435. package/cjs/Navbar/NavbarBrand.js +1 -1
  436. package/cjs/Navbar/NavbarDropdown.d.ts +1 -1
  437. package/cjs/Navbar/NavbarDropdown.js +52 -79
  438. package/cjs/Navbar/NavbarDropdownItem.js +50 -72
  439. package/cjs/Navbar/NavbarDropdownMenu.d.ts +1 -1
  440. package/cjs/Navbar/NavbarDropdownMenu.js +60 -76
  441. package/cjs/Navbar/NavbarDropdownToggle.js +18 -30
  442. package/cjs/Navbar/NavbarHeader.d.ts +1 -1
  443. package/cjs/Navbar/NavbarHeader.js +1 -1
  444. package/cjs/Navbar/NavbarItem.js +31 -45
  445. package/cjs/Navbar/index.js +1 -1
  446. package/cjs/Notification/Notification.d.ts +4 -3
  447. package/cjs/Notification/Notification.js +40 -56
  448. package/cjs/Notification/index.js +0 -0
  449. package/cjs/Pagination/LimitPicker.js +16 -18
  450. package/cjs/Pagination/Pagination.js +58 -81
  451. package/cjs/Pagination/PaginationButton.js +23 -24
  452. package/cjs/Pagination/PaginationGroup.js +44 -60
  453. package/cjs/Pagination/index.js +0 -0
  454. package/cjs/Panel/AccordionButton.js +17 -20
  455. package/cjs/Panel/Panel.js +56 -81
  456. package/cjs/Panel/PanelBody.js +35 -34
  457. package/cjs/Panel/PanelHeader.js +24 -25
  458. package/cjs/Panel/hooks/useExpanded.js +14 -13
  459. package/cjs/Panel/index.js +0 -0
  460. package/cjs/PanelGroup/PanelGroup.js +32 -47
  461. package/cjs/PanelGroup/index.js +1 -1
  462. package/cjs/Placeholder/Placeholder.js +1 -1
  463. package/cjs/Placeholder/PlaceholderGraph.js +24 -33
  464. package/cjs/Placeholder/PlaceholderGrid.js +49 -60
  465. package/cjs/Placeholder/PlaceholderParagraph.js +31 -48
  466. package/cjs/Placeholder/index.js +0 -0
  467. package/cjs/Popover/Popover.js +30 -44
  468. package/cjs/Popover/index.js +0 -0
  469. package/cjs/Progress/Progress.js +1 -1
  470. package/cjs/Progress/ProgressCircle.js +55 -76
  471. package/cjs/Progress/ProgressLine.js +39 -50
  472. package/cjs/Progress/index.js +0 -0
  473. package/cjs/Radio/Radio.js +56 -85
  474. package/cjs/Radio/index.js +0 -0
  475. package/cjs/RadioGroup/RadioGroup.js +40 -60
  476. package/cjs/RadioGroup/index.js +0 -0
  477. package/cjs/RadioTile/RadioTile.js +43 -62
  478. package/cjs/RadioTileGroup/RadioTileGroup.js +32 -47
  479. package/cjs/RangeSlider/RangeSlider.js +113 -138
  480. package/cjs/RangeSlider/index.js +0 -0
  481. package/cjs/Rate/Character.js +30 -43
  482. package/cjs/Rate/Rate.js +63 -97
  483. package/cjs/Rate/index.js +0 -0
  484. package/cjs/Rate/utils.js +8 -8
  485. package/cjs/Row/Row.js +32 -40
  486. package/cjs/Row/index.js +0 -0
  487. package/cjs/SafeAnchor/SafeAnchor.js +14 -20
  488. package/cjs/SafeAnchor/index.js +0 -0
  489. package/cjs/Schema/Schema.js +1 -1
  490. package/cjs/Schema/index.js +0 -0
  491. package/cjs/SelectPicker/SelectPicker.d.ts +0 -1
  492. package/cjs/SelectPicker/SelectPicker.js +131 -169
  493. package/cjs/SelectPicker/index.js +0 -0
  494. package/cjs/Sidebar/Sidebar.js +28 -35
  495. package/cjs/Sidebar/index.js +0 -0
  496. package/cjs/Sidenav/ExpandedSidenavDropdown.d.ts +1 -1
  497. package/cjs/Sidenav/ExpandedSidenavDropdown.js +70 -96
  498. package/cjs/Sidenav/ExpandedSidenavDropdownItem.js +51 -74
  499. package/cjs/Sidenav/ExpandedSidenavDropdownMenu.js +48 -65
  500. package/cjs/Sidenav/Node.js +26 -37
  501. package/cjs/Sidenav/Sidenav.js +43 -65
  502. package/cjs/Sidenav/SidenavBody.d.ts +1 -1
  503. package/cjs/Sidenav/SidenavBody.js +1 -1
  504. package/cjs/Sidenav/SidenavDropdown.d.ts +1 -1
  505. package/cjs/Sidenav/SidenavDropdown.js +81 -111
  506. package/cjs/Sidenav/SidenavDropdownCollapse.js +22 -30
  507. package/cjs/Sidenav/SidenavDropdownItem.d.ts +1 -1
  508. package/cjs/Sidenav/SidenavDropdownItem.js +57 -75
  509. package/cjs/Sidenav/SidenavDropdownMenu.d.ts +1 -1
  510. package/cjs/Sidenav/SidenavDropdownMenu.js +67 -78
  511. package/cjs/Sidenav/SidenavDropdownToggle.js +17 -29
  512. package/cjs/Sidenav/SidenavHeader.d.ts +1 -1
  513. package/cjs/Sidenav/SidenavHeader.js +1 -1
  514. package/cjs/Sidenav/SidenavItem.js +64 -82
  515. package/cjs/Sidenav/SidenavToggle.js +20 -29
  516. package/cjs/Sidenav/index.js +0 -0
  517. package/cjs/Slider/Graduated.js +28 -37
  518. package/cjs/Slider/Handle.js +52 -68
  519. package/cjs/Slider/Input.js +10 -7
  520. package/cjs/Slider/Mark.js +16 -24
  521. package/cjs/Slider/ProgressBar.js +24 -34
  522. package/cjs/Slider/Slider.d.ts +0 -26
  523. package/cjs/Slider/Slider.js +77 -118
  524. package/cjs/Slider/index.js +0 -0
  525. package/cjs/Slider/useDrag.js +29 -29
  526. package/cjs/Slider/utils.js +3 -4
  527. package/cjs/Stack/HStack.js +8 -10
  528. package/cjs/Stack/Stack.js +37 -58
  529. package/cjs/Stack/StackItem.d.ts +0 -11
  530. package/cjs/Stack/StackItem.js +25 -36
  531. package/cjs/Stack/VStack.js +9 -12
  532. package/cjs/Stat/Stat.js +20 -25
  533. package/cjs/Stat/StatHelpText.d.ts +1 -1
  534. package/cjs/Stat/StatHelpText.js +1 -1
  535. package/cjs/Stat/StatLabel.js +16 -22
  536. package/cjs/Stat/StatTrend.js +20 -28
  537. package/cjs/Stat/StatValue.js +15 -21
  538. package/cjs/Stat/StatValueUnit.d.ts +1 -1
  539. package/cjs/Stat/StatValueUnit.js +1 -1
  540. package/cjs/StatGroup/StatGroup.js +24 -28
  541. package/cjs/Steps/StepItem.js +31 -43
  542. package/cjs/Steps/Steps.js +33 -45
  543. package/cjs/Steps/index.js +0 -0
  544. package/cjs/Table/Table.js +13 -13
  545. package/cjs/Tabs/Tab.js +1 -9
  546. package/cjs/Tabs/TabPanel.js +13 -14
  547. package/cjs/Tabs/Tabs.js +82 -97
  548. package/cjs/Tag/Tag.js +29 -41
  549. package/cjs/Tag/index.js +0 -0
  550. package/cjs/TagGroup/TagGroup.d.ts +1 -1
  551. package/cjs/TagGroup/TagGroup.js +1 -1
  552. package/cjs/TagGroup/index.js +0 -0
  553. package/cjs/TagInput/index.js +24 -31
  554. package/cjs/TagPicker/index.js +19 -22
  555. package/cjs/Text/Text.js +32 -43
  556. package/cjs/TimePicker/TimePicker.js +11 -14
  557. package/cjs/TimeRangePicker/TimeRangePicker.js +9 -7
  558. package/cjs/Timeline/Timeline.js +29 -47
  559. package/cjs/Timeline/TimelineItem.js +18 -28
  560. package/cjs/Timeline/index.js +0 -0
  561. package/cjs/Toggle/Toggle.js +45 -70
  562. package/cjs/Toggle/index.js +0 -0
  563. package/cjs/Tooltip/Tooltip.js +24 -33
  564. package/cjs/Tooltip/index.js +0 -0
  565. package/cjs/Tree/IndentLine.js +4 -3
  566. package/cjs/Tree/Tree.js +63 -66
  567. package/cjs/Tree/TreeNode.js +62 -61
  568. package/cjs/Tree/TreeNodeToggle.js +19 -16
  569. package/cjs/Tree/TreeView.js +175 -186
  570. package/cjs/Tree/hooks/useExpandTree.js +33 -38
  571. package/cjs/Tree/hooks/useFlattenTree.js +30 -31
  572. package/cjs/Tree/hooks/useFocusTree.d.ts +1 -1
  573. package/cjs/Tree/hooks/useFocusTree.js +77 -80
  574. package/cjs/Tree/hooks/useForceUpdate.js +2 -3
  575. package/cjs/Tree/hooks/useTreeDrag.js +86 -86
  576. package/cjs/Tree/hooks/useTreeNodeProps.js +52 -48
  577. package/cjs/Tree/hooks/useTreeNodeRefs.d.ts +1 -1
  578. package/cjs/Tree/hooks/useTreeNodeRefs.js +3 -3
  579. package/cjs/Tree/hooks/useTreeSearch.js +33 -38
  580. package/cjs/Tree/hooks/useTreeWithChildren.js +21 -35
  581. package/cjs/Tree/hooks/useVirtualizedTreeData.js +25 -22
  582. package/cjs/Tree/index.js +0 -0
  583. package/cjs/Tree/types.js +1 -1
  584. package/cjs/Tree/utils/flattenTree.js +16 -24
  585. package/cjs/Tree/utils/focusableTree.js +66 -59
  586. package/cjs/Tree/utils/formatNodeRefKey.js +1 -1
  587. package/cjs/Tree/utils/getExpandItemValues.js +7 -5
  588. package/cjs/Tree/utils/getNodeParentKeys.js +4 -4
  589. package/cjs/Tree/utils/getTreeActiveNode.js +2 -2
  590. package/cjs/Tree/utils/hasVisibleChildren.js +1 -3
  591. package/cjs/Tree/utils/indentTreeNode.js +7 -5
  592. package/cjs/Tree/utils/treeKeyboardInteractions.js +13 -9
  593. package/cjs/TreePicker/TreePicker.js +172 -182
  594. package/cjs/TreePicker/hooks/useFocusState.js +17 -19
  595. package/cjs/TreePicker/index.js +0 -0
  596. package/cjs/Uploader/UploadFileItem.js +70 -92
  597. package/cjs/Uploader/UploadTrigger.js +47 -70
  598. package/cjs/Uploader/Uploader.js +156 -216
  599. package/cjs/Uploader/index.js +0 -0
  600. package/cjs/Uploader/utils/ajaxUpload.js +26 -27
  601. package/cjs/Uploader/utils/previewFile.js +3 -3
  602. package/cjs/VisuallyHidden/VisuallyHidden.d.ts +1 -1
  603. package/cjs/VisuallyHidden/VisuallyHidden.js +1 -1
  604. package/cjs/Whisper/Whisper.js +14 -32
  605. package/cjs/Whisper/index.js +0 -0
  606. package/cjs/index.d.ts +2 -0
  607. package/cjs/index.js +5 -3
  608. package/cjs/internals/CloseButton/CloseButton.js +19 -18
  609. package/cjs/internals/Disclosure/Disclosure.js +41 -42
  610. package/cjs/internals/Disclosure/DisclosureButton.js +16 -13
  611. package/cjs/internals/Disclosure/DisclosureContent.js +9 -5
  612. package/cjs/internals/Disclosure/DisclosureContext.js +2 -2
  613. package/cjs/internals/Disclosure/useDisclosureContext.js +2 -2
  614. package/cjs/internals/Menu/Menu.d.ts +1 -5
  615. package/cjs/internals/Menu/Menu.js +80 -80
  616. package/cjs/internals/Menu/MenuContext.js +3 -3
  617. package/cjs/internals/Menu/MenuItem.d.ts +0 -7
  618. package/cjs/internals/Menu/MenuItem.js +22 -30
  619. package/cjs/internals/Menu/Menubar.js +25 -25
  620. package/cjs/internals/Menu/useMenu.js +45 -41
  621. package/cjs/internals/Overlay/Modal.d.ts +6 -20
  622. package/cjs/internals/Overlay/Modal.js +78 -117
  623. package/cjs/internals/Overlay/ModalManager.js +22 -28
  624. package/cjs/internals/Overlay/Overlay.d.ts +0 -21
  625. package/cjs/internals/Overlay/Overlay.js +57 -76
  626. package/cjs/internals/Overlay/OverlayContext.js +1 -1
  627. package/cjs/internals/Overlay/OverlayTrigger.js +139 -152
  628. package/cjs/internals/Overlay/Position.js +63 -86
  629. package/cjs/internals/Overlay/positionUtils.js +114 -107
  630. package/cjs/internals/Picker/ListCheckItem.js +44 -49
  631. package/cjs/internals/Picker/ListItem.js +32 -35
  632. package/cjs/internals/Picker/ListItemGroup.js +16 -19
  633. package/cjs/internals/Picker/Listbox.d.ts +1 -1
  634. package/cjs/internals/Picker/Listbox.js +99 -119
  635. package/cjs/internals/Picker/PickerIndicator.js +21 -17
  636. package/cjs/internals/Picker/PickerLabel.js +7 -8
  637. package/cjs/internals/Picker/PickerPopup.js +26 -30
  638. package/cjs/internals/Picker/PickerToggle.js +50 -57
  639. package/cjs/internals/Picker/PickerToggleTrigger.js +21 -22
  640. package/cjs/internals/Picker/SelectedElement.js +19 -18
  641. package/cjs/internals/Picker/ToggleButton.js +1 -1
  642. package/cjs/internals/Picker/hooks/useCombobox.js +10 -9
  643. package/cjs/internals/Picker/hooks/useFocusItemValue.js +91 -97
  644. package/cjs/internals/Picker/hooks/usePickerClassName.js +30 -21
  645. package/cjs/internals/Picker/hooks/usePickerRef.js +23 -19
  646. package/cjs/internals/Picker/hooks/useSearch.js +19 -23
  647. package/cjs/internals/Picker/hooks/useToggleKeyDownEvent.js +21 -20
  648. package/cjs/internals/Picker/index.d.ts +0 -1
  649. package/cjs/internals/Picker/index.js +1 -8
  650. package/cjs/internals/Picker/utils.js +19 -18
  651. package/cjs/internals/Plaintext/Plaintext.js +18 -20
  652. package/cjs/internals/Ripple/Ripple.js +42 -51
  653. package/cjs/internals/ScrollView/ScrollView.js +31 -30
  654. package/cjs/internals/ScrollView/hooks/useScrollState.js +16 -18
  655. package/cjs/internals/SearchBox/SearchBox.js +19 -22
  656. package/cjs/internals/Tree/TreeProvider.d.ts +4 -1
  657. package/cjs/internals/Tree/TreeProvider.js +49 -37
  658. package/cjs/internals/Tree/TreeView.js +27 -25
  659. package/cjs/internals/Tree/utils/filterNodesOfTree.js +6 -6
  660. package/cjs/internals/Tree/utils/findNodeOfTree.js +5 -5
  661. package/cjs/internals/Tree/utils/getParentMap.js +10 -15
  662. package/cjs/internals/Tree/utils/getPathTowardsItem.js +2 -2
  663. package/cjs/internals/Windowing/AutoSizer.js +34 -35
  664. package/cjs/internals/Windowing/List.d.ts +1 -1
  665. package/cjs/internals/Windowing/List.js +42 -46
  666. package/cjs/internals/Windowing/index.js +1 -1
  667. package/cjs/internals/constants/index.js +12 -12
  668. package/cjs/internals/constants/statusIcons.js +2 -2
  669. package/cjs/internals/hooks/useClassNames.js +16 -24
  670. package/cjs/internals/hooks/useClickOutside.js +11 -10
  671. package/cjs/internals/hooks/useControlled.js +4 -6
  672. package/cjs/internals/hooks/useElementResize.js +4 -4
  673. package/cjs/internals/hooks/useEnsuredRef.js +1 -1
  674. package/cjs/internals/hooks/useEventCallback.js +3 -3
  675. package/cjs/internals/hooks/useEventListener.js +4 -4
  676. package/cjs/internals/hooks/useFocus.js +7 -7
  677. package/cjs/internals/hooks/useFocusVirtualListItem.js +5 -5
  678. package/cjs/internals/hooks/useInternalId.js +2 -2
  679. package/cjs/internals/hooks/useIsMounted.js +4 -6
  680. package/cjs/internals/hooks/useIsomorphicLayoutEffect.js +1 -1
  681. package/cjs/internals/hooks/useMap.js +8 -12
  682. package/cjs/internals/hooks/useMount.js +4 -3
  683. package/cjs/internals/hooks/usePortal.js +21 -25
  684. package/cjs/internals/hooks/useRootClose.js +16 -15
  685. package/cjs/internals/hooks/useTimeout.js +8 -8
  686. package/cjs/internals/hooks/useToggleCaret.js +4 -3
  687. package/cjs/internals/hooks/useUniqueId.js +3 -15
  688. package/cjs/internals/hooks/useUpdateEffect.js +4 -3
  689. package/cjs/internals/hooks/useUpdatedRef.js +1 -1
  690. package/cjs/internals/hooks/useWillUnmount.js +2 -6
  691. package/cjs/internals/symbols.js +2 -2
  692. package/cjs/internals/types/index.d.ts +23 -19
  693. package/cjs/internals/utils/BrowserDetection.d.ts +0 -8
  694. package/cjs/internals/utils/BrowserDetection.js +10 -56
  695. package/cjs/internals/utils/ReactChildren.js +23 -25
  696. package/cjs/internals/utils/composeFunctions.js +1 -5
  697. package/cjs/internals/utils/createChainedFunction.js +1 -3
  698. package/cjs/internals/utils/createComponent.d.ts +1 -1
  699. package/cjs/internals/utils/createComponent.js +22 -28
  700. package/cjs/internals/utils/css.d.ts +4 -0
  701. package/cjs/internals/utils/css.js +22 -0
  702. package/cjs/internals/utils/date/copyTime.js +14 -13
  703. package/cjs/internals/utils/date/disableTime.js +13 -13
  704. package/cjs/internals/utils/date/extractTimeFormat.js +1 -1
  705. package/cjs/internals/utils/date/formatCheck.js +10 -15
  706. package/cjs/internals/utils/date/getWeekKeys.js +1 -1
  707. package/cjs/internals/utils/date/getWeekStartDates.js +14 -14
  708. package/cjs/internals/utils/date/index.d.ts +46 -46
  709. package/cjs/internals/utils/date/index.js +92 -93
  710. package/cjs/internals/utils/date/omitHideDisabledProps.js +2 -5
  711. package/cjs/internals/utils/date/reverseDateRangeOmitTime.js +1 -2
  712. package/cjs/internals/utils/date/types.js +2 -2
  713. package/cjs/internals/utils/date/useDateMode.js +8 -7
  714. package/cjs/internals/utils/deprecateComponent.js +3 -3
  715. package/cjs/internals/utils/dom.js +2 -6
  716. package/cjs/internals/utils/getDOMNode.js +4 -3
  717. package/cjs/internals/utils/getDataGroupBy.js +11 -13
  718. package/cjs/internals/utils/getStringLength.js +2 -2
  719. package/cjs/internals/utils/htmlPropsUtils.js +15 -15
  720. package/cjs/internals/utils/index.d.ts +1 -0
  721. package/cjs/internals/utils/index.js +6 -3
  722. package/cjs/internals/utils/mergeRefs.js +5 -7
  723. package/cjs/internals/utils/placementPolyfill.js +1 -3
  724. package/cjs/internals/utils/prefix.js +8 -12
  725. package/cjs/internals/utils/render.d.ts +1 -1
  726. package/cjs/internals/utils/render.js +10 -32
  727. package/cjs/internals/utils/safeSetSelection.js +2 -4
  728. package/cjs/internals/utils/shallowEqual.js +5 -5
  729. package/cjs/internals/utils/stringifyReactNode.js +6 -6
  730. package/cjs/internals/utils/tplTransform.js +4 -10
  731. package/cjs/internals/utils/warnOnce.js +3 -3
  732. package/cjs/locales/ar_EG.js +12 -12
  733. package/cjs/locales/ca_ES.d.ts +4 -4
  734. package/cjs/locales/ca_ES.js +12 -12
  735. package/cjs/locales/cs_CZ.js +12 -12
  736. package/cjs/locales/da_DK.js +12 -12
  737. package/cjs/locales/de_DE.js +12 -12
  738. package/cjs/locales/en_GB.js +12 -12
  739. package/cjs/locales/en_US.js +12 -12
  740. package/cjs/locales/es_AR.js +12 -12
  741. package/cjs/locales/es_ES.js +12 -12
  742. package/cjs/locales/fa_IR.js +12 -12
  743. package/cjs/locales/fi_FI.js +12 -12
  744. package/cjs/locales/fr_FR.js +12 -12
  745. package/cjs/locales/hu_HU.js +12 -12
  746. package/cjs/locales/it_IT.js +12 -12
  747. package/cjs/locales/ja_JP.js +12 -12
  748. package/cjs/locales/kk_KZ.js +12 -12
  749. package/cjs/locales/ko_KR.js +12 -12
  750. package/cjs/locales/ne_NP.js +12 -12
  751. package/cjs/locales/nl_NL.js +12 -12
  752. package/cjs/locales/pt_BR.js +12 -12
  753. package/cjs/locales/ru_RU.js +12 -12
  754. package/cjs/locales/sv_SE.js +12 -12
  755. package/cjs/locales/tr_TR.js +12 -12
  756. package/cjs/locales/zh_CN.js +12 -12
  757. package/cjs/locales/zh_TW.js +12 -12
  758. package/cjs/toaster/ToastContainer.js +99 -113
  759. package/cjs/toaster/ToastContext.js +1 -1
  760. package/cjs/toaster/hooks/useDelayedClosure.js +20 -17
  761. package/cjs/toaster/toaster.js +20 -43
  762. package/cjs/useBreakpointValue/useBreakpointValue.js +7 -6
  763. package/cjs/useMediaQuery/useMediaQuery.d.ts +1 -7
  764. package/cjs/useMediaQuery/useMediaQuery.js +20 -81
  765. package/cjs/useToaster/useToaster.js +38 -39
  766. package/dist/rsuite-no-reset-rtl.css +543 -3053
  767. package/dist/rsuite-no-reset-rtl.min.css +1 -1
  768. package/dist/rsuite-no-reset-rtl.min.css.map +1 -1
  769. package/dist/rsuite-no-reset.css +543 -3053
  770. package/dist/rsuite-no-reset.min.css +1 -1
  771. package/dist/rsuite-no-reset.min.css.map +1 -1
  772. package/dist/rsuite-rtl.css +556 -3076
  773. package/dist/rsuite-rtl.min.css +1 -1
  774. package/dist/rsuite-rtl.min.css.map +1 -1
  775. package/dist/rsuite.css +556 -3076
  776. package/dist/rsuite.js +3350 -3601
  777. package/dist/rsuite.js.map +1 -1
  778. package/dist/rsuite.min.css +1 -1
  779. package/dist/rsuite.min.css.map +1 -1
  780. package/dist/rsuite.min.js +1 -1
  781. package/dist/rsuite.min.js.LICENSE.txt +0 -2
  782. package/dist/rsuite.min.js.map +1 -1
  783. package/esm/Accordion/Accordion.js +4 -3
  784. package/esm/Affix/Affix.d.ts +1 -1
  785. package/esm/Affix/Affix.js +54 -65
  786. package/esm/Affix/index.js +0 -0
  787. package/esm/Animation/Bounce.js +11 -10
  788. package/esm/Animation/Collapse.js +40 -48
  789. package/esm/Animation/Fade.js +13 -12
  790. package/esm/Animation/Slide.js +14 -14
  791. package/esm/Animation/Transition.d.ts +1 -40
  792. package/esm/Animation/Transition.js +97 -115
  793. package/esm/Animation/index.js +6 -6
  794. package/esm/Animation/utils.d.ts +0 -9
  795. package/esm/Animation/utils.js +2 -11
  796. package/esm/AutoComplete/AutoComplete.js +85 -126
  797. package/esm/AutoComplete/Combobox.js +11 -10
  798. package/esm/AutoComplete/index.js +0 -0
  799. package/esm/AutoComplete/utils.js +5 -5
  800. package/esm/Avatar/Avatar.js +50 -72
  801. package/esm/Avatar/AvatarIcon.js +12 -14
  802. package/esm/Avatar/index.js +0 -0
  803. package/esm/Avatar/useImage.js +19 -19
  804. package/esm/AvatarGroup/AvatarGroup.js +30 -42
  805. package/esm/AvatarGroup/index.js +0 -0
  806. package/esm/Badge/Badge.js +24 -36
  807. package/esm/Badge/index.js +0 -0
  808. package/esm/Breadcrumb/Breadcrumb.js +33 -48
  809. package/esm/Breadcrumb/BreadcrumbItem.d.ts +1 -1
  810. package/esm/Breadcrumb/BreadcrumbItem.js +21 -34
  811. package/esm/Breadcrumb/index.js +0 -0
  812. package/esm/Button/Button.js +43 -62
  813. package/esm/Button/index.js +0 -0
  814. package/esm/ButtonGroup/ButtonGroup.js +27 -43
  815. package/esm/ButtonGroup/ButtonGroupContext.js +1 -1
  816. package/esm/ButtonGroup/index.js +0 -0
  817. package/esm/ButtonToolbar/ButtonToolbar.js +17 -23
  818. package/esm/ButtonToolbar/index.js +0 -0
  819. package/esm/Calendar/Calendar.js +46 -66
  820. package/esm/Calendar/CalendarBody.js +26 -26
  821. package/esm/Calendar/CalendarContainer.js +87 -94
  822. package/esm/Calendar/CalendarHeader.js +49 -49
  823. package/esm/Calendar/CalendarProvider.js +2 -2
  824. package/esm/Calendar/Grid/Grid.js +22 -25
  825. package/esm/Calendar/Grid/GridCell.js +39 -37
  826. package/esm/Calendar/Grid/GridHeaderRow.js +27 -29
  827. package/esm/Calendar/Grid/GridRow.js +47 -52
  828. package/esm/Calendar/MonthDropdown/MonthDropdown.js +61 -62
  829. package/esm/Calendar/MonthDropdown/MonthDropdownItem.js +35 -38
  830. package/esm/Calendar/TimeDropdown/TimeColumn.js +7 -7
  831. package/esm/Calendar/TimeDropdown/TimeDropdown.js +63 -63
  832. package/esm/Calendar/TimeDropdown/utils/formatWithLeadingZero.js +1 -1
  833. package/esm/Calendar/TimeDropdown/utils/getClockTime.js +7 -5
  834. package/esm/Calendar/TimeDropdown/utils/getTimeLimits.js +3 -3
  835. package/esm/Calendar/TimeDropdown/utils/scrollToTime.js +6 -7
  836. package/esm/Calendar/hooks/useCalendar.js +1 -1
  837. package/esm/Calendar/hooks/useCalendarDate.d.ts +1 -1
  838. package/esm/Calendar/hooks/useCalendarDate.js +9 -11
  839. package/esm/Calendar/hooks/useCalendarState.js +16 -18
  840. package/esm/Calendar/utils/isEveryDateInMonth.js +2 -2
  841. package/esm/Card/Card.js +30 -39
  842. package/esm/Card/CardBody.d.ts +1 -1
  843. package/esm/Card/CardBody.js +1 -1
  844. package/esm/Card/CardFooter.d.ts +1 -1
  845. package/esm/Card/CardFooter.js +1 -1
  846. package/esm/Card/CardHeader.d.ts +1 -1
  847. package/esm/Card/CardHeader.js +1 -1
  848. package/esm/CardGroup/CardGroup.js +24 -28
  849. package/esm/Carousel/Carousel.js +73 -94
  850. package/esm/Carousel/index.js +0 -0
  851. package/esm/CascadeTree/CascadeTree.d.ts +0 -1
  852. package/esm/CascadeTree/CascadeTree.js +92 -104
  853. package/esm/CascadeTree/SearchView.js +47 -52
  854. package/esm/CascadeTree/TreeView.js +83 -91
  855. package/esm/CascadeTree/hooks/usePaths.js +18 -19
  856. package/esm/CascadeTree/hooks/useSearch.js +22 -22
  857. package/esm/CascadeTree/hooks/useSelect.js +26 -24
  858. package/esm/CascadeTree/utils.js +10 -8
  859. package/esm/Cascader/Cascader.d.ts +0 -1
  860. package/esm/Cascader/Cascader.js +202 -239
  861. package/esm/Cascader/index.js +0 -0
  862. package/esm/Cascader/useActive.js +15 -15
  863. package/esm/CheckPicker/CheckPicker.d.ts +0 -1
  864. package/esm/CheckPicker/CheckPicker.js +146 -200
  865. package/esm/CheckPicker/index.js +0 -0
  866. package/esm/CheckTree/CheckTree.js +68 -73
  867. package/esm/CheckTree/CheckTreeNode.js +52 -50
  868. package/esm/CheckTree/CheckTreeView.js +174 -181
  869. package/esm/CheckTree/hooks/useTreeCheckState.js +26 -25
  870. package/esm/CheckTree/hooks/useTreeNodeProps.js +39 -36
  871. package/esm/CheckTree/hooks/useTreeValue.js +6 -7
  872. package/esm/CheckTree/utils.js +62 -65
  873. package/esm/CheckTreePicker/CheckTreePicker.js +170 -185
  874. package/esm/CheckTreePicker/hooks/useFocusState.js +13 -15
  875. package/esm/CheckTreePicker/index.js +0 -0
  876. package/esm/Checkbox/Checkbox.js +64 -101
  877. package/esm/Checkbox/index.js +0 -0
  878. package/esm/CheckboxGroup/CheckboxGroup.js +39 -61
  879. package/esm/CheckboxGroup/CheckboxGroupContext.js +1 -1
  880. package/esm/CheckboxGroup/index.js +0 -0
  881. package/esm/Col/Col.js +32 -66
  882. package/esm/Col/index.js +0 -0
  883. package/esm/Container/Container.d.ts +1 -1
  884. package/esm/Container/Container.js +21 -31
  885. package/esm/Container/index.js +0 -0
  886. package/esm/Content/Content.d.ts +1 -1
  887. package/esm/Content/Content.js +1 -1
  888. package/esm/Content/index.js +0 -0
  889. package/esm/CustomProvider/CustomProvider.d.ts +8 -16
  890. package/esm/CustomProvider/CustomProvider.js +46 -53
  891. package/esm/CustomProvider/FormattedDate.js +7 -4
  892. package/esm/CustomProvider/FormattedNumber.js +8 -7
  893. package/esm/CustomProvider/types.d.ts +2 -0
  894. package/esm/CustomProvider/useCustom.js +44 -47
  895. package/esm/DOMHelper/index.js +4 -4
  896. package/esm/DOMHelper/isElement.js +1 -1
  897. package/esm/DateInput/DateField.js +101 -102
  898. package/esm/DateInput/DateInput.js +119 -134
  899. package/esm/DateInput/hooks/useDateInputState.js +46 -42
  900. package/esm/DateInput/hooks/useFieldCursor.js +16 -16
  901. package/esm/DateInput/hooks/useIsFocused.js +9 -9
  902. package/esm/DateInput/hooks/useKeyboardInputEvent.js +9 -7
  903. package/esm/DateInput/hooks/useSelectedState.js +4 -6
  904. package/esm/DateInput/utils.d.ts +1 -1
  905. package/esm/DateInput/utils.js +76 -71
  906. package/esm/DatePicker/DatePicker.js +188 -223
  907. package/esm/DatePicker/PredefinedRanges.js +23 -28
  908. package/esm/DatePicker/Toolbar.d.ts +1 -1
  909. package/esm/DatePicker/Toolbar.js +28 -26
  910. package/esm/DatePicker/hooks/useCustomizedInput.d.ts +1 -1
  911. package/esm/DatePicker/hooks/useCustomizedInput.js +21 -26
  912. package/esm/DatePicker/hooks/useFocus.js +45 -39
  913. package/esm/DatePicker/hooks/useMonthView.js +8 -8
  914. package/esm/DatePicker/utils.d.ts +0 -7
  915. package/esm/DatePicker/utils.js +26 -34
  916. package/esm/DateRangeInput/DateRangeInput.js +130 -151
  917. package/esm/DateRangeInput/utils.js +50 -49
  918. package/esm/DateRangePicker/Calendar.js +23 -28
  919. package/esm/DateRangePicker/DateRangePicker.js +259 -322
  920. package/esm/DateRangePicker/DateRangePickerProvider.js +3 -3
  921. package/esm/DateRangePicker/Header.js +20 -23
  922. package/esm/DateRangePicker/disabledDateUtils.js +16 -34
  923. package/esm/DateRangePicker/hooks/useCalendarHandlers.js +14 -14
  924. package/esm/DateRangePicker/hooks/useDateDisabled.js +10 -6
  925. package/esm/DateRangePicker/hooks/useDateRangePicker.js +1 -1
  926. package/esm/DateRangePicker/index.js +1 -1
  927. package/esm/DateRangePicker/utils.js +20 -19
  928. package/esm/Divider/Divider.js +18 -26
  929. package/esm/Divider/index.js +0 -0
  930. package/esm/Drawer/Drawer.js +19 -29
  931. package/esm/Drawer/DrawerActions.d.ts +1 -1
  932. package/esm/Drawer/DrawerActions.js +1 -1
  933. package/esm/Drawer/DrawerBody.js +5 -7
  934. package/esm/Drawer/DrawerFooter.js +5 -7
  935. package/esm/Drawer/DrawerHeader.js +5 -7
  936. package/esm/Drawer/DrawerTitle.js +5 -7
  937. package/esm/Drawer/index.js +0 -0
  938. package/esm/Dropdown/Dropdown.d.ts +1 -1
  939. package/esm/Dropdown/Dropdown.js +73 -105
  940. package/esm/Dropdown/DropdownContext.js +1 -1
  941. package/esm/Dropdown/DropdownItem.js +53 -72
  942. package/esm/Dropdown/DropdownMenu.js +76 -94
  943. package/esm/Dropdown/DropdownSeparator.js +11 -16
  944. package/esm/Dropdown/DropdownState.js +22 -22
  945. package/esm/Dropdown/DropdownToggle.js +20 -34
  946. package/esm/Dropdown/index.js +0 -0
  947. package/esm/Dropdown/useRenderDropdownItem.js +1 -1
  948. package/esm/FlexboxGrid/FlexboxGrid.js +17 -27
  949. package/esm/FlexboxGrid/FlexboxGridItem.js +17 -26
  950. package/esm/FlexboxGrid/index.js +0 -0
  951. package/esm/Footer/Footer.d.ts +1 -1
  952. package/esm/Footer/Footer.js +1 -1
  953. package/esm/Footer/index.js +0 -0
  954. package/esm/Form/Form.js +105 -130
  955. package/esm/Form/FormContext.js +4 -4
  956. package/esm/Form/hooks/useFormClassNames.js +15 -14
  957. package/esm/Form/hooks/useFormRef.js +9 -7
  958. package/esm/Form/hooks/useFormValidate.js +77 -77
  959. package/esm/Form/hooks/useFormValue.js +22 -19
  960. package/esm/Form/hooks/useSchemaModel.js +31 -33
  961. package/esm/FormControl/FormControl.d.ts +1 -1
  962. package/esm/FormControl/FormControl.js +81 -95
  963. package/esm/FormControl/hooks/useField.js +23 -18
  964. package/esm/FormControl/hooks/useRegisterModel.js +7 -6
  965. package/esm/FormControl/index.js +0 -0
  966. package/esm/FormControlLabel/FormControlLabel.js +21 -28
  967. package/esm/FormControlLabel/index.js +0 -0
  968. package/esm/FormErrorMessage/FormErrorMessage.js +24 -34
  969. package/esm/FormErrorMessage/index.js +0 -0
  970. package/esm/FormGroup/FormGroup.js +31 -39
  971. package/esm/FormHelpText/FormHelpText.js +22 -29
  972. package/esm/FormHelpText/index.js +0 -0
  973. package/esm/Grid/Grid.js +18 -25
  974. package/esm/Grid/index.js +0 -0
  975. package/esm/Header/Header.d.ts +1 -1
  976. package/esm/Header/Header.js +1 -1
  977. package/esm/Header/index.js +0 -0
  978. package/esm/Heading/Heading.js +17 -24
  979. package/esm/HeadingGroup/HeadingGroup.d.ts +1 -1
  980. package/esm/HeadingGroup/HeadingGroup.js +1 -1
  981. package/esm/Highlight/Highlight.js +21 -28
  982. package/esm/Highlight/utils/highlightText.js +10 -10
  983. package/esm/IconButton/IconButton.js +19 -29
  984. package/esm/IconButton/index.js +0 -0
  985. package/esm/Image/Image.d.ts +42 -0
  986. package/esm/Image/Image.js +90 -0
  987. package/esm/Image/ImageWrapper.d.ts +1 -0
  988. package/esm/Image/ImageWrapper.js +6 -0
  989. package/esm/Image/hooks/useImage.d.ts +14 -0
  990. package/esm/Image/hooks/useImage.js +59 -0
  991. package/esm/Image/index.d.ts +3 -0
  992. package/esm/Image/index.js +3 -0
  993. package/esm/InlineEdit/EditableControls.js +6 -6
  994. package/esm/InlineEdit/InlineEdit.d.ts +3 -3
  995. package/esm/InlineEdit/InlineEdit.js +52 -70
  996. package/esm/InlineEdit/renderChildren.js +19 -20
  997. package/esm/InlineEdit/useEditState.js +23 -29
  998. package/esm/InlineEdit/useFocusEvent.js +17 -15
  999. package/esm/Input/Input.js +40 -59
  1000. package/esm/Input/index.js +0 -0
  1001. package/esm/InputGroup/InputGroup.js +33 -47
  1002. package/esm/InputGroup/InputGroupAddon.js +14 -21
  1003. package/esm/InputGroup/InputGroupButton.js +14 -13
  1004. package/esm/InputGroup/index.js +0 -0
  1005. package/esm/InputNumber/InputNumber.js +72 -106
  1006. package/esm/InputNumber/index.js +0 -0
  1007. package/esm/InputPicker/InputAutosize.js +48 -65
  1008. package/esm/InputPicker/InputPicker.js +241 -289
  1009. package/esm/InputPicker/InputPickerContext.js +2 -2
  1010. package/esm/InputPicker/InputSearch.js +21 -24
  1011. package/esm/InputPicker/TagList.js +13 -13
  1012. package/esm/InputPicker/TextBox.js +20 -21
  1013. package/esm/InputPicker/hooks/useData.js +14 -18
  1014. package/esm/InputPicker/hooks/useInput.js +15 -13
  1015. package/esm/InputPicker/hooks/useMaxWidth.js +2 -4
  1016. package/esm/InputPicker/utils.js +1 -1
  1017. package/esm/List/List.js +53 -77
  1018. package/esm/List/ListContext.js +4 -6
  1019. package/esm/List/ListItem.js +38 -45
  1020. package/esm/List/helper/AutoScroller.js +35 -35
  1021. package/esm/List/helper/useManager.js +14 -18
  1022. package/esm/List/helper/useSortHelper.js +87 -100
  1023. package/esm/List/helper/utils.js +11 -16
  1024. package/esm/List/index.js +0 -0
  1025. package/esm/Loader/Loader.js +27 -42
  1026. package/esm/Loader/index.js +0 -0
  1027. package/esm/MaskedInput/MaskedInput.js +7 -5
  1028. package/esm/MaskedInput/TextMask.js +28 -42
  1029. package/esm/MaskedInput/adjustCaretPosition.js +64 -82
  1030. package/esm/MaskedInput/conformToMask.js +52 -55
  1031. package/esm/MaskedInput/createTextMaskInputElement.js +61 -57
  1032. package/esm/MaskedInput/index.js +0 -0
  1033. package/esm/MaskedInput/types.js +0 -0
  1034. package/esm/MaskedInput/utilities.js +8 -8
  1035. package/esm/Message/Message.js +49 -69
  1036. package/esm/Message/index.js +0 -0
  1037. package/esm/Modal/Modal.js +90 -117
  1038. package/esm/Modal/ModalBody.js +27 -30
  1039. package/esm/Modal/ModalContext.js +1 -1
  1040. package/esm/Modal/ModalDialog.d.ts +0 -10
  1041. package/esm/Modal/ModalDialog.js +24 -39
  1042. package/esm/Modal/ModalFooter.d.ts +1 -1
  1043. package/esm/Modal/ModalFooter.js +1 -1
  1044. package/esm/Modal/ModalHeader.js +22 -31
  1045. package/esm/Modal/ModalTitle.js +15 -23
  1046. package/esm/Modal/utils.js +26 -28
  1047. package/esm/MultiCascadeTree/MultiCascadeTree.js +76 -80
  1048. package/esm/MultiCascadeTree/SearchView.js +51 -56
  1049. package/esm/MultiCascadeTree/TreeView.js +84 -99
  1050. package/esm/MultiCascadeTree/hooks/useCascadeValue.js +68 -100
  1051. package/esm/MultiCascadeTree/hooks/useColumnData.js +10 -16
  1052. package/esm/MultiCascadeTree/hooks/useFlattenData.js +10 -10
  1053. package/esm/MultiCascadeTree/hooks/useSearch.js +17 -19
  1054. package/esm/MultiCascadeTree/hooks/useSelect.js +37 -35
  1055. package/esm/MultiCascadeTree/utils.js +40 -45
  1056. package/esm/MultiCascader/MultiCascader.js +189 -224
  1057. package/esm/MultiCascader/index.js +0 -0
  1058. package/esm/Nav/AdaptiveNavItem.js +11 -12
  1059. package/esm/Nav/Nav.js +51 -72
  1060. package/esm/Nav/NavContext.js +1 -1
  1061. package/esm/Nav/NavDropdown.d.ts +1 -1
  1062. package/esm/Nav/NavDropdown.js +62 -92
  1063. package/esm/Nav/NavDropdownItem.js +55 -71
  1064. package/esm/Nav/NavDropdownMenu.d.ts +1 -1
  1065. package/esm/Nav/NavDropdownMenu.js +64 -78
  1066. package/esm/Nav/NavDropdownToggle.js +19 -30
  1067. package/esm/Nav/NavItem.js +33 -48
  1068. package/esm/Nav/NavMenu.js +17 -19
  1069. package/esm/Nav/index.js +0 -0
  1070. package/esm/Navbar/Navbar.js +17 -18
  1071. package/esm/Navbar/NavbarBody.d.ts +1 -1
  1072. package/esm/Navbar/NavbarBody.js +1 -1
  1073. package/esm/Navbar/NavbarBrand.d.ts +1 -1
  1074. package/esm/Navbar/NavbarBrand.js +1 -1
  1075. package/esm/Navbar/NavbarDropdown.d.ts +1 -1
  1076. package/esm/Navbar/NavbarDropdown.js +51 -78
  1077. package/esm/Navbar/NavbarDropdownItem.js +49 -71
  1078. package/esm/Navbar/NavbarDropdownMenu.d.ts +1 -1
  1079. package/esm/Navbar/NavbarDropdownMenu.js +58 -74
  1080. package/esm/Navbar/NavbarDropdownToggle.js +18 -30
  1081. package/esm/Navbar/NavbarHeader.d.ts +1 -1
  1082. package/esm/Navbar/NavbarHeader.js +1 -1
  1083. package/esm/Navbar/NavbarItem.js +30 -44
  1084. package/esm/Navbar/index.js +0 -0
  1085. package/esm/Notification/Notification.d.ts +4 -3
  1086. package/esm/Notification/Notification.js +38 -54
  1087. package/esm/Notification/index.js +0 -0
  1088. package/esm/Pagination/LimitPicker.js +15 -17
  1089. package/esm/Pagination/Pagination.js +58 -81
  1090. package/esm/Pagination/PaginationButton.js +23 -24
  1091. package/esm/Pagination/PaginationGroup.js +44 -60
  1092. package/esm/Pagination/index.js +0 -0
  1093. package/esm/Panel/AccordionButton.js +17 -20
  1094. package/esm/Panel/Panel.js +54 -79
  1095. package/esm/Panel/PanelBody.js +35 -34
  1096. package/esm/Panel/PanelHeader.js +23 -24
  1097. package/esm/Panel/hooks/useExpanded.js +14 -13
  1098. package/esm/Panel/index.js +0 -0
  1099. package/esm/PanelGroup/PanelGroup.js +31 -46
  1100. package/esm/PanelGroup/index.js +0 -0
  1101. package/esm/Placeholder/Placeholder.js +1 -1
  1102. package/esm/Placeholder/PlaceholderGraph.js +24 -33
  1103. package/esm/Placeholder/PlaceholderGrid.js +47 -60
  1104. package/esm/Placeholder/PlaceholderParagraph.js +30 -47
  1105. package/esm/Placeholder/index.js +0 -0
  1106. package/esm/Popover/Popover.js +30 -44
  1107. package/esm/Popover/index.js +0 -0
  1108. package/esm/Progress/Progress.js +1 -1
  1109. package/esm/Progress/ProgressCircle.js +54 -75
  1110. package/esm/Progress/ProgressLine.js +39 -50
  1111. package/esm/Progress/index.js +0 -0
  1112. package/esm/Radio/Radio.js +55 -84
  1113. package/esm/Radio/index.js +0 -0
  1114. package/esm/RadioGroup/RadioGroup.js +39 -59
  1115. package/esm/RadioGroup/index.js +0 -0
  1116. package/esm/RadioTile/RadioTile.js +42 -61
  1117. package/esm/RadioTileGroup/RadioTileGroup.js +31 -46
  1118. package/esm/RangeSlider/RangeSlider.js +112 -137
  1119. package/esm/RangeSlider/index.js +0 -0
  1120. package/esm/Rate/Character.js +29 -42
  1121. package/esm/Rate/Rate.js +63 -97
  1122. package/esm/Rate/index.js +0 -0
  1123. package/esm/Rate/utils.js +6 -8
  1124. package/esm/Row/Row.js +32 -40
  1125. package/esm/Row/index.js +0 -0
  1126. package/esm/SafeAnchor/SafeAnchor.js +13 -19
  1127. package/esm/SafeAnchor/index.js +0 -0
  1128. package/esm/Schema/Schema.js +8 -8
  1129. package/esm/Schema/index.js +0 -0
  1130. package/esm/SelectPicker/SelectPicker.d.ts +0 -1
  1131. package/esm/SelectPicker/SelectPicker.js +131 -169
  1132. package/esm/SelectPicker/index.js +0 -0
  1133. package/esm/Sidebar/Sidebar.js +27 -34
  1134. package/esm/Sidebar/index.js +0 -0
  1135. package/esm/Sidenav/ExpandedSidenavDropdown.d.ts +1 -1
  1136. package/esm/Sidenav/ExpandedSidenavDropdown.js +69 -95
  1137. package/esm/Sidenav/ExpandedSidenavDropdownItem.js +50 -73
  1138. package/esm/Sidenav/ExpandedSidenavDropdownMenu.js +47 -64
  1139. package/esm/Sidenav/Node.js +25 -36
  1140. package/esm/Sidenav/Sidenav.js +42 -64
  1141. package/esm/Sidenav/SidenavBody.d.ts +1 -1
  1142. package/esm/Sidenav/SidenavBody.js +1 -1
  1143. package/esm/Sidenav/SidenavDropdown.d.ts +1 -1
  1144. package/esm/Sidenav/SidenavDropdown.js +80 -110
  1145. package/esm/Sidenav/SidenavDropdownCollapse.js +22 -30
  1146. package/esm/Sidenav/SidenavDropdownItem.d.ts +1 -1
  1147. package/esm/Sidenav/SidenavDropdownItem.js +56 -74
  1148. package/esm/Sidenav/SidenavDropdownMenu.d.ts +1 -1
  1149. package/esm/Sidenav/SidenavDropdownMenu.js +63 -74
  1150. package/esm/Sidenav/SidenavDropdownToggle.js +17 -29
  1151. package/esm/Sidenav/SidenavHeader.d.ts +1 -1
  1152. package/esm/Sidenav/SidenavHeader.js +1 -1
  1153. package/esm/Sidenav/SidenavItem.js +63 -81
  1154. package/esm/Sidenav/SidenavToggle.js +19 -28
  1155. package/esm/Sidenav/index.js +0 -0
  1156. package/esm/Slider/Graduated.js +28 -37
  1157. package/esm/Slider/Handle.js +49 -65
  1158. package/esm/Slider/Input.js +10 -7
  1159. package/esm/Slider/Mark.js +16 -24
  1160. package/esm/Slider/ProgressBar.js +24 -34
  1161. package/esm/Slider/Slider.d.ts +0 -26
  1162. package/esm/Slider/Slider.js +75 -116
  1163. package/esm/Slider/index.js +0 -0
  1164. package/esm/Slider/useDrag.js +29 -29
  1165. package/esm/Slider/utils.js +2 -4
  1166. package/esm/Stack/HStack.js +8 -10
  1167. package/esm/Stack/Stack.js +38 -59
  1168. package/esm/Stack/StackItem.d.ts +0 -11
  1169. package/esm/Stack/StackItem.js +25 -36
  1170. package/esm/Stack/VStack.js +9 -12
  1171. package/esm/Stat/Stat.js +20 -25
  1172. package/esm/Stat/StatHelpText.d.ts +1 -1
  1173. package/esm/Stat/StatHelpText.js +1 -1
  1174. package/esm/Stat/StatLabel.js +16 -22
  1175. package/esm/Stat/StatTrend.js +20 -28
  1176. package/esm/Stat/StatValue.js +15 -21
  1177. package/esm/Stat/StatValueUnit.d.ts +1 -1
  1178. package/esm/Stat/StatValueUnit.js +1 -1
  1179. package/esm/StatGroup/StatGroup.js +24 -28
  1180. package/esm/Steps/StepItem.js +31 -43
  1181. package/esm/Steps/Steps.js +33 -45
  1182. package/esm/Steps/index.js +0 -0
  1183. package/esm/Table/Table.js +13 -13
  1184. package/esm/Tabs/Tab.js +1 -9
  1185. package/esm/Tabs/TabPanel.js +13 -14
  1186. package/esm/Tabs/Tabs.js +82 -97
  1187. package/esm/Tag/Tag.js +29 -41
  1188. package/esm/Tag/index.js +0 -0
  1189. package/esm/TagGroup/TagGroup.d.ts +1 -1
  1190. package/esm/TagGroup/TagGroup.js +1 -1
  1191. package/esm/TagGroup/index.js +0 -0
  1192. package/esm/TagInput/index.js +23 -30
  1193. package/esm/TagPicker/index.js +18 -21
  1194. package/esm/Text/Text.js +32 -43
  1195. package/esm/TimePicker/TimePicker.js +10 -13
  1196. package/esm/TimeRangePicker/TimeRangePicker.js +9 -7
  1197. package/esm/Timeline/Timeline.js +29 -47
  1198. package/esm/Timeline/TimelineItem.js +18 -28
  1199. package/esm/Timeline/index.js +0 -0
  1200. package/esm/Toggle/Toggle.js +44 -69
  1201. package/esm/Toggle/index.js +0 -0
  1202. package/esm/Tooltip/Tooltip.js +24 -33
  1203. package/esm/Tooltip/index.js +0 -0
  1204. package/esm/Tree/IndentLine.js +4 -3
  1205. package/esm/Tree/Tree.js +60 -63
  1206. package/esm/Tree/TreeNode.js +61 -60
  1207. package/esm/Tree/TreeNodeToggle.js +19 -16
  1208. package/esm/Tree/TreeView.js +171 -182
  1209. package/esm/Tree/hooks/useExpandTree.js +33 -38
  1210. package/esm/Tree/hooks/useFlattenTree.js +30 -31
  1211. package/esm/Tree/hooks/useFocusTree.d.ts +1 -1
  1212. package/esm/Tree/hooks/useFocusTree.js +76 -79
  1213. package/esm/Tree/hooks/useForceUpdate.js +2 -3
  1214. package/esm/Tree/hooks/useTreeDrag.js +86 -86
  1215. package/esm/Tree/hooks/useTreeNodeProps.js +51 -47
  1216. package/esm/Tree/hooks/useTreeNodeRefs.d.ts +1 -1
  1217. package/esm/Tree/hooks/useTreeNodeRefs.js +3 -3
  1218. package/esm/Tree/hooks/useTreeSearch.js +33 -38
  1219. package/esm/Tree/hooks/useTreeWithChildren.js +21 -35
  1220. package/esm/Tree/hooks/useVirtualizedTreeData.js +25 -22
  1221. package/esm/Tree/index.js +0 -0
  1222. package/esm/Tree/types.js +1 -1
  1223. package/esm/Tree/utils/flattenTree.js +16 -24
  1224. package/esm/Tree/utils/focusableTree.js +59 -58
  1225. package/esm/Tree/utils/formatNodeRefKey.js +1 -1
  1226. package/esm/Tree/utils/getExpandItemValues.js +7 -5
  1227. package/esm/Tree/utils/getNodeParentKeys.js +4 -4
  1228. package/esm/Tree/utils/getTreeActiveNode.js +2 -2
  1229. package/esm/Tree/utils/hasVisibleChildren.js +1 -3
  1230. package/esm/Tree/utils/indentTreeNode.js +7 -5
  1231. package/esm/Tree/utils/treeKeyboardInteractions.js +13 -9
  1232. package/esm/TreePicker/TreePicker.js +168 -178
  1233. package/esm/TreePicker/hooks/useFocusState.js +17 -19
  1234. package/esm/TreePicker/index.js +0 -0
  1235. package/esm/Uploader/UploadFileItem.js +68 -91
  1236. package/esm/Uploader/UploadTrigger.js +46 -69
  1237. package/esm/Uploader/Uploader.js +154 -214
  1238. package/esm/Uploader/index.js +0 -0
  1239. package/esm/Uploader/utils/ajaxUpload.js +26 -27
  1240. package/esm/Uploader/utils/previewFile.js +3 -3
  1241. package/esm/VisuallyHidden/VisuallyHidden.d.ts +1 -1
  1242. package/esm/VisuallyHidden/VisuallyHidden.js +1 -1
  1243. package/esm/Whisper/Whisper.js +14 -32
  1244. package/esm/Whisper/index.js +0 -0
  1245. package/esm/index.d.ts +2 -0
  1246. package/esm/index.js +1 -0
  1247. package/esm/internals/CloseButton/CloseButton.js +19 -18
  1248. package/esm/internals/Disclosure/Disclosure.js +40 -41
  1249. package/esm/internals/Disclosure/DisclosureButton.js +15 -12
  1250. package/esm/internals/Disclosure/DisclosureContent.js +9 -5
  1251. package/esm/internals/Disclosure/DisclosureContext.js +2 -2
  1252. package/esm/internals/Disclosure/useDisclosureContext.js +2 -2
  1253. package/esm/internals/Menu/Menu.d.ts +1 -5
  1254. package/esm/internals/Menu/Menu.js +79 -79
  1255. package/esm/internals/Menu/MenuContext.js +3 -3
  1256. package/esm/internals/Menu/MenuItem.d.ts +0 -7
  1257. package/esm/internals/Menu/MenuItem.js +21 -29
  1258. package/esm/internals/Menu/Menubar.js +24 -24
  1259. package/esm/internals/Menu/useMenu.js +45 -40
  1260. package/esm/internals/Overlay/Modal.d.ts +6 -20
  1261. package/esm/internals/Overlay/Modal.js +76 -115
  1262. package/esm/internals/Overlay/ModalManager.js +22 -28
  1263. package/esm/internals/Overlay/Overlay.d.ts +0 -21
  1264. package/esm/internals/Overlay/Overlay.js +55 -74
  1265. package/esm/internals/Overlay/OverlayContext.js +1 -1
  1266. package/esm/internals/Overlay/OverlayTrigger.js +138 -151
  1267. package/esm/internals/Overlay/Position.js +62 -85
  1268. package/esm/internals/Overlay/positionUtils.js +113 -107
  1269. package/esm/internals/Picker/ListCheckItem.js +43 -48
  1270. package/esm/internals/Picker/ListItem.js +31 -34
  1271. package/esm/internals/Picker/ListItemGroup.js +16 -19
  1272. package/esm/internals/Picker/Listbox.d.ts +1 -1
  1273. package/esm/internals/Picker/Listbox.js +97 -117
  1274. package/esm/internals/Picker/PickerIndicator.js +21 -17
  1275. package/esm/internals/Picker/PickerLabel.js +7 -8
  1276. package/esm/internals/Picker/PickerPopup.js +25 -29
  1277. package/esm/internals/Picker/PickerToggle.js +48 -55
  1278. package/esm/internals/Picker/PickerToggleTrigger.js +21 -22
  1279. package/esm/internals/Picker/SelectedElement.js +19 -18
  1280. package/esm/internals/Picker/ToggleButton.js +1 -1
  1281. package/esm/internals/Picker/hooks/useCombobox.js +10 -9
  1282. package/esm/internals/Picker/hooks/useFocusItemValue.js +91 -97
  1283. package/esm/internals/Picker/hooks/usePickerClassName.js +30 -21
  1284. package/esm/internals/Picker/hooks/usePickerRef.js +23 -19
  1285. package/esm/internals/Picker/hooks/useSearch.js +19 -23
  1286. package/esm/internals/Picker/hooks/useToggleKeyDownEvent.js +21 -20
  1287. package/esm/internals/Picker/index.d.ts +0 -1
  1288. package/esm/internals/Picker/index.js +1 -2
  1289. package/esm/internals/Picker/utils.js +19 -18
  1290. package/esm/internals/Plaintext/Plaintext.js +18 -20
  1291. package/esm/internals/Ripple/Ripple.js +41 -50
  1292. package/esm/internals/ScrollView/ScrollView.js +30 -29
  1293. package/esm/internals/ScrollView/hooks/useScrollState.js +16 -18
  1294. package/esm/internals/SearchBox/SearchBox.js +19 -22
  1295. package/esm/internals/Tree/TreeProvider.d.ts +4 -1
  1296. package/esm/internals/Tree/TreeProvider.js +43 -36
  1297. package/esm/internals/Tree/TreeView.js +26 -24
  1298. package/esm/internals/Tree/utils/filterNodesOfTree.js +6 -6
  1299. package/esm/internals/Tree/utils/findNodeOfTree.js +5 -5
  1300. package/esm/internals/Tree/utils/getParentMap.js +10 -15
  1301. package/esm/internals/Tree/utils/getPathTowardsItem.js +2 -2
  1302. package/esm/internals/Windowing/AutoSizer.js +33 -34
  1303. package/esm/internals/Windowing/List.d.ts +1 -1
  1304. package/esm/internals/Windowing/List.js +40 -45
  1305. package/esm/internals/constants/index.js +12 -12
  1306. package/esm/internals/constants/statusIcons.js +2 -2
  1307. package/esm/internals/hooks/useClassNames.js +16 -24
  1308. package/esm/internals/hooks/useClickOutside.js +11 -10
  1309. package/esm/internals/hooks/useControlled.js +4 -6
  1310. package/esm/internals/hooks/useElementResize.js +4 -4
  1311. package/esm/internals/hooks/useEnsuredRef.js +1 -1
  1312. package/esm/internals/hooks/useEventCallback.js +3 -3
  1313. package/esm/internals/hooks/useEventListener.js +4 -4
  1314. package/esm/internals/hooks/useFocus.js +7 -7
  1315. package/esm/internals/hooks/useFocusVirtualListItem.js +5 -5
  1316. package/esm/internals/hooks/useInternalId.js +2 -2
  1317. package/esm/internals/hooks/useIsMounted.js +4 -6
  1318. package/esm/internals/hooks/useIsomorphicLayoutEffect.js +1 -1
  1319. package/esm/internals/hooks/useMap.js +8 -12
  1320. package/esm/internals/hooks/useMount.js +3 -3
  1321. package/esm/internals/hooks/usePortal.js +20 -24
  1322. package/esm/internals/hooks/useRootClose.js +16 -15
  1323. package/esm/internals/hooks/useTimeout.js +8 -8
  1324. package/esm/internals/hooks/useToggleCaret.js +4 -3
  1325. package/esm/internals/hooks/useUniqueId.js +3 -11
  1326. package/esm/internals/hooks/useUpdateEffect.js +3 -3
  1327. package/esm/internals/hooks/useUpdatedRef.js +1 -1
  1328. package/esm/internals/hooks/useWillUnmount.js +2 -6
  1329. package/esm/internals/symbols.js +2 -2
  1330. package/esm/internals/types/index.d.ts +23 -19
  1331. package/esm/internals/utils/BrowserDetection.d.ts +0 -8
  1332. package/esm/internals/utils/BrowserDetection.js +5 -55
  1333. package/esm/internals/utils/ReactChildren.js +23 -25
  1334. package/esm/internals/utils/composeFunctions.js +1 -5
  1335. package/esm/internals/utils/createChainedFunction.js +1 -3
  1336. package/esm/internals/utils/createComponent.d.ts +1 -1
  1337. package/esm/internals/utils/createComponent.js +22 -28
  1338. package/esm/internals/utils/css.d.ts +4 -0
  1339. package/esm/internals/utils/css.js +18 -0
  1340. package/esm/internals/utils/date/copyTime.js +9 -7
  1341. package/esm/internals/utils/date/disableTime.js +10 -10
  1342. package/esm/internals/utils/date/extractTimeFormat.js +1 -1
  1343. package/esm/internals/utils/date/formatCheck.js +5 -15
  1344. package/esm/internals/utils/date/getWeekKeys.js +1 -1
  1345. package/esm/internals/utils/date/getWeekStartDates.js +13 -12
  1346. package/esm/internals/utils/date/index.d.ts +46 -46
  1347. package/esm/internals/utils/date/index.js +46 -46
  1348. package/esm/internals/utils/date/omitHideDisabledProps.js +1 -5
  1349. package/esm/internals/utils/date/reverseDateRangeOmitTime.js +1 -2
  1350. package/esm/internals/utils/date/types.js +2 -2
  1351. package/esm/internals/utils/date/useDateMode.js +6 -6
  1352. package/esm/internals/utils/deprecateComponent.js +3 -3
  1353. package/esm/internals/utils/dom.js +2 -6
  1354. package/esm/internals/utils/getDOMNode.js +4 -3
  1355. package/esm/internals/utils/getDataGroupBy.js +11 -13
  1356. package/esm/internals/utils/getStringLength.js +2 -2
  1357. package/esm/internals/utils/htmlPropsUtils.js +13 -14
  1358. package/esm/internals/utils/index.d.ts +1 -0
  1359. package/esm/internals/utils/index.js +2 -1
  1360. package/esm/internals/utils/mergeRefs.js +5 -7
  1361. package/esm/internals/utils/placementPolyfill.js +1 -3
  1362. package/esm/internals/utils/prefix.js +6 -12
  1363. package/esm/internals/utils/render.d.ts +1 -1
  1364. package/esm/internals/utils/render.js +10 -28
  1365. package/esm/internals/utils/safeSetSelection.js +2 -4
  1366. package/esm/internals/utils/shallowEqual.js +5 -5
  1367. package/esm/internals/utils/stringifyReactNode.js +6 -6
  1368. package/esm/internals/utils/tplTransform.js +4 -10
  1369. package/esm/internals/utils/warnOnce.js +3 -3
  1370. package/esm/locales/ar_EG.js +11 -10
  1371. package/esm/locales/ca_ES.d.ts +4 -4
  1372. package/esm/locales/ca_ES.js +11 -10
  1373. package/esm/locales/cs_CZ.js +11 -10
  1374. package/esm/locales/da_DK.js +11 -10
  1375. package/esm/locales/de_DE.js +11 -10
  1376. package/esm/locales/en_GB.js +11 -10
  1377. package/esm/locales/en_US.js +11 -10
  1378. package/esm/locales/es_AR.js +11 -10
  1379. package/esm/locales/es_ES.js +11 -10
  1380. package/esm/locales/fa_IR.js +11 -10
  1381. package/esm/locales/fi_FI.js +11 -10
  1382. package/esm/locales/fr_FR.js +11 -10
  1383. package/esm/locales/hu_HU.js +11 -10
  1384. package/esm/locales/it_IT.js +11 -10
  1385. package/esm/locales/ja_JP.js +11 -10
  1386. package/esm/locales/kk_KZ.js +11 -10
  1387. package/esm/locales/ko_KR.js +11 -10
  1388. package/esm/locales/ne_NP.js +11 -10
  1389. package/esm/locales/nl_NL.js +11 -10
  1390. package/esm/locales/pt_BR.js +11 -10
  1391. package/esm/locales/ru_RU.js +11 -10
  1392. package/esm/locales/sv_SE.js +11 -10
  1393. package/esm/locales/tr_TR.js +11 -10
  1394. package/esm/locales/zh_CN.js +11 -10
  1395. package/esm/locales/zh_TW.js +11 -10
  1396. package/esm/toaster/ToastContainer.js +98 -112
  1397. package/esm/toaster/ToastContext.js +1 -1
  1398. package/esm/toaster/hooks/useDelayedClosure.js +20 -17
  1399. package/esm/toaster/toaster.js +20 -43
  1400. package/esm/useBreakpointValue/useBreakpointValue.js +7 -6
  1401. package/esm/useMediaQuery/useMediaQuery.d.ts +1 -7
  1402. package/esm/useMediaQuery/useMediaQuery.js +20 -78
  1403. package/esm/useToaster/useToaster.js +38 -39
  1404. package/internals/Picker/styles/index.less +7 -11
  1405. package/internals/Picker/styles/mixin.less +6 -3
  1406. package/package.json +16 -13
  1407. package/styles/common.less +1 -0
  1408. package/styles/index.less +1 -0
  1409. package/styles/mixins/hacks.less +0 -73
  1410. package/styles/mixins/menu.less +0 -0
  1411. package/styles/mixins/utilities.less +25 -3
  1412. package/styles/scaffolding.less +1 -1
  1413. package/styles/typography.less +11 -6
  1414. package/styles/variables.less +28 -73
  1415. package/toaster/styles/animation.less +0 -0
  1416. package/toaster/styles/index.css +35 -128
  1417. package/useToaster/styles/index.css +35 -128
  1418. package/cjs/internals/Picker/propTypes.d.ts +0 -71
  1419. package/cjs/internals/Picker/propTypes.js +0 -46
  1420. package/cjs/internals/propTypes/deprecatePropType.d.ts +0 -16
  1421. package/cjs/internals/propTypes/deprecatePropType.js +0 -49
  1422. package/cjs/internals/propTypes/index.d.ts +0 -5
  1423. package/cjs/internals/propTypes/index.js +0 -28
  1424. package/cjs/internals/propTypes/oneOf.d.ts +0 -3
  1425. package/cjs/internals/propTypes/oneOf.js +0 -18
  1426. package/esm/internals/Picker/propTypes.d.ts +0 -71
  1427. package/esm/internals/Picker/propTypes.js +0 -41
  1428. package/esm/internals/propTypes/deprecatePropType.d.ts +0 -16
  1429. package/esm/internals/propTypes/deprecatePropType.js +0 -45
  1430. package/esm/internals/propTypes/index.d.ts +0 -5
  1431. package/esm/internals/propTypes/index.js +0 -17
  1432. package/esm/internals/propTypes/oneOf.d.ts +0 -3
  1433. package/esm/internals/propTypes/oneOf.js +0 -13
@@ -9,11 +9,13 @@ var _react = _interopRequireDefault(require("react"));
9
9
  var _TextMask = _interopRequireDefault(require("./TextMask"));
10
10
  var _Input = _interopRequireDefault(require("../Input"));
11
11
  var _CustomProvider = require("../CustomProvider");
12
- var MaskedInput = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
13
- var _useCustom = (0, _CustomProvider.useCustom)('MaskedInput', props),
14
- propsWithDefaults = _useCustom.propsWithDefaults;
15
- var _propsWithDefaults$as = propsWithDefaults.as,
16
- inputAs = _propsWithDefaults$as === void 0 ? _TextMask.default : _propsWithDefaults$as;
12
+ const MaskedInput = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
13
+ const {
14
+ propsWithDefaults
15
+ } = (0, _CustomProvider.useCustom)('MaskedInput', props);
16
+ const {
17
+ as: inputAs = _TextMask.default
18
+ } = propsWithDefaults;
17
19
  return /*#__PURE__*/_react.default.createElement(_Input.default, (0, _extends2.default)({}, propsWithDefaults, {
18
20
  as: inputAs,
19
21
  ref: ref
@@ -4,74 +4,60 @@
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
5
  exports.__esModule = true;
6
6
  exports.default = void 0;
7
- var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
8
7
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
8
  var _react = _interopRequireWildcard(require("react"));
10
9
  var _omit = _interopRequireDefault(require("lodash/omit"));
11
- var _propTypes = _interopRequireDefault(require("prop-types"));
12
10
  var _createTextMaskInputElement = _interopRequireDefault(require("./createTextMaskInputElement"));
13
11
  var _utils = require("../internals/utils");
14
- var _excluded = ["mask", "guide", "placeholderChar", "value", "showMask", "pipe", "render", "onChange"];
15
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
12
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
16
13
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
17
14
  /**
18
15
  * https://github.com/text-mask/text-mask/blob/master/componentDocumentation.md#guide
19
16
  */
20
17
 
21
- var defaultRender = function defaultRender(ref, props) {
22
- return /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({
23
- ref: ref
24
- }, props));
25
- };
18
+ const defaultRender = (ref, props) => /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({
19
+ ref: ref
20
+ }, props));
26
21
 
27
22
  /**
28
23
  * The `TextMask` component is used to format the user input data.
29
24
  * @see https://rsuitejs.com/components/input/#masked-input
30
25
  */
31
- var TextMask = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
32
- var mask = props.mask,
33
- _props$guide = props.guide,
34
- guide = _props$guide === void 0 ? true : _props$guide,
35
- placeholderChar = props.placeholderChar,
36
- value = props.value,
37
- showMask = props.showMask,
38
- pipe = props.pipe,
39
- _props$render = props.render,
40
- render = _props$render === void 0 ? defaultRender : _props$render,
41
- onChange = props.onChange,
42
- rest = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
43
- var inputRef = (0, _react.useRef)(null);
44
- var textMaskInputElement = (0, _react.useRef)();
45
- var initTextMask = (0, _react.useCallback)(function () {
26
+ const TextMask = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
27
+ const {
28
+ mask,
29
+ guide = true,
30
+ placeholderChar,
31
+ value,
32
+ showMask,
33
+ pipe,
34
+ render = defaultRender,
35
+ onChange,
36
+ ...rest
37
+ } = props;
38
+ const inputRef = (0, _react.useRef)(null);
39
+ const textMaskInputElement = (0, _react.useRef)();
40
+ const initTextMask = (0, _react.useCallback)(() => {
46
41
  var _textMaskInputElement;
47
- textMaskInputElement.current = (0, _createTextMaskInputElement.default)((0, _extends2.default)({
48
- inputElement: inputRef.current
49
- }, props));
42
+ textMaskInputElement.current = (0, _createTextMaskInputElement.default)({
43
+ inputElement: inputRef.current,
44
+ ...props
45
+ });
50
46
  (_textMaskInputElement = textMaskInputElement.current) === null || _textMaskInputElement === void 0 || _textMaskInputElement.update(value);
51
47
  }, [props, value]);
52
- var handleChange = (0, _react.useCallback)(function (event) {
48
+ const handleChange = (0, _react.useCallback)(event => {
53
49
  var _textMaskInputElement2;
54
50
  (_textMaskInputElement2 = textMaskInputElement.current) === null || _textMaskInputElement2 === void 0 || _textMaskInputElement2.update();
55
51
  onChange === null || onChange === void 0 || onChange(event);
56
52
  }, [onChange]);
57
- (0, _react.useEffect)(function () {
53
+ (0, _react.useEffect)(() => {
58
54
  initTextMask();
59
55
  }, [guide, placeholderChar, showMask, pipe, mask, value, initTextMask]);
60
- return render((0, _utils.mergeRefs)(inputRef, ref), (0, _extends2.default)({
56
+ return render((0, _utils.mergeRefs)(inputRef, ref), {
61
57
  onChange: handleChange,
62
- defaultValue: value
63
- }, (0, _omit.default)(rest, ['keepCharPositions'])));
58
+ defaultValue: value,
59
+ ...(0, _omit.default)(rest, ['keepCharPositions'])
60
+ });
64
61
  });
65
62
  TextMask.displayName = 'TextMask';
66
- TextMask.propTypes = {
67
- render: _propTypes.default.func,
68
- onChange: _propTypes.default.func,
69
- mask: _propTypes.default.oneOfType([_propTypes.default.array, _propTypes.default.func, _propTypes.default.bool]).isRequired,
70
- guide: _propTypes.default.bool,
71
- value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
72
- pipe: _propTypes.default.func,
73
- placeholderChar: _propTypes.default.string,
74
- keepCharPositions: _propTypes.default.bool,
75
- showMask: _propTypes.default.bool
76
- };
77
63
  var _default = exports.default = TextMask;
@@ -3,42 +3,39 @@
3
3
 
4
4
  exports.__esModule = true;
5
5
  exports.default = adjustCaretPosition;
6
- var defaultArray = [];
7
- var emptyString = '';
6
+ const defaultArray = [];
7
+ const emptyString = '';
8
8
  function adjustCaretPosition(_ref) {
9
- var _ref$previousConforme = _ref.previousConformedValue,
10
- previousConformedValue = _ref$previousConforme === void 0 ? emptyString : _ref$previousConforme,
11
- _ref$previousPlacehol = _ref.previousPlaceholder,
12
- previousPlaceholder = _ref$previousPlacehol === void 0 ? emptyString : _ref$previousPlacehol,
13
- _ref$currentCaretPosi = _ref.currentCaretPosition,
14
- currentCaretPosition = _ref$currentCaretPosi === void 0 ? 0 : _ref$currentCaretPosi,
15
- conformedValue = _ref.conformedValue,
16
- rawValue = _ref.rawValue,
17
- placeholderChar = _ref.placeholderChar,
18
- placeholder = _ref.placeholder,
19
- _ref$indexesOfPipedCh = _ref.indexesOfPipedChars,
20
- indexesOfPipedChars = _ref$indexesOfPipedCh === void 0 ? defaultArray : _ref$indexesOfPipedCh,
21
- _ref$caretTrapIndexes = _ref.caretTrapIndexes,
22
- caretTrapIndexes = _ref$caretTrapIndexes === void 0 ? defaultArray : _ref$caretTrapIndexes;
9
+ let {
10
+ previousConformedValue = emptyString,
11
+ previousPlaceholder = emptyString,
12
+ currentCaretPosition = 0,
13
+ conformedValue,
14
+ rawValue,
15
+ placeholderChar,
16
+ placeholder,
17
+ indexesOfPipedChars = defaultArray,
18
+ caretTrapIndexes = defaultArray
19
+ } = _ref;
23
20
  if (currentCaretPosition === 0 || !rawValue.length) {
24
21
  return 0;
25
22
  }
26
23
 
27
24
  // Store lengths for faster performance?
28
- var rawValueLength = rawValue.length;
29
- var previousConformedValueLength = previousConformedValue.length;
30
- var placeholderLength = placeholder.length;
31
- var conformedValueLength = conformedValue.length;
25
+ const rawValueLength = rawValue.length;
26
+ const previousConformedValueLength = previousConformedValue.length;
27
+ const placeholderLength = placeholder.length;
28
+ const conformedValueLength = conformedValue.length;
32
29
 
33
30
  // This tells us how long the edit is. If user modified input from `(2__)` to `(243__)`,
34
31
  // we know the user in this instance pasted two characters
35
- var editLength = rawValueLength - previousConformedValueLength;
32
+ const editLength = rawValueLength - previousConformedValueLength;
36
33
 
37
34
  // If the edit length is positive, that means the user is adding characters, not deleting.
38
- var isAddition = editLength > 0;
35
+ const isAddition = editLength > 0;
39
36
 
40
37
  // This is the first raw value the user entered that needs to be conformed to mask
41
- var isFirstRawValue = previousConformedValueLength === 0;
38
+ const isFirstRawValue = previousConformedValueLength === 0;
42
39
 
43
40
  // A partial multi-character edit happens when the user makes a partial selection in their
44
41
  // input and edits that selection. That is going from `(123) 432-4348` to `() 432-4348` by
@@ -46,7 +43,7 @@ function adjustCaretPosition(_ref) {
46
43
  //
47
44
  // Such cases can also happen when the user presses the backspace while holding down the ALT
48
45
  // key.
49
- var isPartialMultiCharEdit = editLength > 1 && !isFirstRawValue;
46
+ const isPartialMultiCharEdit = editLength > 1 && !isFirstRawValue;
50
47
 
51
48
  // This algorithm doesn't support all cases of multi-character edits, so we just return
52
49
  // the current caret position.
@@ -60,10 +57,10 @@ function adjustCaretPosition(_ref) {
60
57
  // `f` so the `rawValue` becomes (1f__), the new `conformedValue` would be (1__), which is the
61
58
  // same as the original `previousConformedValue`. We handle this case differently for caret
62
59
  // positioning.
63
- var possiblyHasRejectedChar = isAddition && (previousConformedValue === conformedValue || conformedValue === placeholder);
64
- var startingSearchIndex = 0;
65
- var trackRightCharacter;
66
- var targetChar;
60
+ const possiblyHasRejectedChar = isAddition && (previousConformedValue === conformedValue || conformedValue === placeholder);
61
+ let startingSearchIndex = 0;
62
+ let trackRightCharacter;
63
+ let targetChar;
67
64
  if (possiblyHasRejectedChar) {
68
65
  startingSearchIndex = currentCaretPosition - editLength;
69
66
  } else {
@@ -75,17 +72,15 @@ function adjustCaretPosition(_ref) {
75
72
 
76
73
  // First, we need to normalize the inputs so that letter capitalization between raw input and
77
74
  // conformed input wouldn't matter.
78
- var normalizedConformedValue = conformedValue.toLowerCase();
79
- var normalizedRawValue = rawValue.toLowerCase();
75
+ const normalizedConformedValue = conformedValue.toLowerCase();
76
+ const normalizedRawValue = rawValue.toLowerCase();
80
77
 
81
78
  // Then we take all characters that come before where the caret currently is.
82
- var leftHalfChars = normalizedRawValue.substr(0, currentCaretPosition).split(emptyString);
79
+ const leftHalfChars = normalizedRawValue.substr(0, currentCaretPosition).split(emptyString);
83
80
 
84
81
  // Now we find all the characters in the left half that exist in the conformed input
85
82
  // This step ensures that we don't look for a character that was filtered out or rejected by `conformToMask`.
86
- var intersection = leftHalfChars.filter(function (char) {
87
- return normalizedConformedValue.indexOf(char) !== -1;
88
- });
83
+ const intersection = leftHalfChars.filter(char => normalizedConformedValue.indexOf(char) !== -1);
89
84
 
90
85
  // The last character in the intersection is the character we want to look for in the conformed
91
86
  // value and the one we want to adjust the caret close to
@@ -93,21 +88,17 @@ function adjustCaretPosition(_ref) {
93
88
 
94
89
  // Calculate the number of mask characters in the previous placeholder
95
90
  // from the start of the string up to the place where the caret is
96
- var previousLeftMaskChars = previousPlaceholder.substr(0, intersection.length).split(emptyString).filter(function (char) {
97
- return char !== placeholderChar;
98
- }).length;
91
+ const previousLeftMaskChars = previousPlaceholder.substr(0, intersection.length).split(emptyString).filter(char => char !== placeholderChar).length;
99
92
 
100
93
  // Calculate the number of mask characters in the current placeholder
101
94
  // from the start of the string up to the place where the caret is
102
- var leftMaskChars = placeholder.substr(0, intersection.length).split(emptyString).filter(function (char) {
103
- return char !== placeholderChar;
104
- }).length;
95
+ const leftMaskChars = placeholder.substr(0, intersection.length).split(emptyString).filter(char => char !== placeholderChar).length;
105
96
 
106
97
  // Has the number of mask characters up to the caret changed?
107
- var masklengthChanged = leftMaskChars !== previousLeftMaskChars;
98
+ const masklengthChanged = leftMaskChars !== previousLeftMaskChars;
108
99
 
109
100
  // Detect if `targetChar` is a mask character and has moved to the left
110
- var targetIsMaskMovingLeft = previousPlaceholder[intersection.length - 1] !== undefined && placeholder[intersection.length - 2] !== undefined && previousPlaceholder[intersection.length - 1] !== placeholderChar && previousPlaceholder[intersection.length - 1] !== placeholder[intersection.length - 1] && previousPlaceholder[intersection.length - 1] === placeholder[intersection.length - 2];
101
+ const targetIsMaskMovingLeft = previousPlaceholder[intersection.length - 1] !== undefined && placeholder[intersection.length - 2] !== undefined && previousPlaceholder[intersection.length - 1] !== placeholderChar && previousPlaceholder[intersection.length - 1] !== placeholder[intersection.length - 1] && previousPlaceholder[intersection.length - 1] === placeholder[intersection.length - 2];
111
102
 
112
103
  // If deleting and the `targetChar` `is a mask character and `masklengthChanged` is true
113
104
  // or the mask is moving to the left, we can't use the selected `targetChar` any longer
@@ -125,36 +116,27 @@ function adjustCaretPosition(_ref) {
125
116
 
126
117
  // If the `conformedValue` got piped, we need to know which characters were piped in so that when we look for
127
118
  // our `targetChar`, we don't select a piped char by mistake
128
- var pipedChars = indexesOfPipedChars.map(function (index) {
129
- return normalizedConformedValue[index];
130
- });
119
+ const pipedChars = indexesOfPipedChars.map(index => normalizedConformedValue[index]);
131
120
 
132
121
  // We need to know how many times the `targetChar` occurs in the piped characters.
133
- var countTargetCharInPipedChars = pipedChars.filter(function (char) {
134
- return char === targetChar;
135
- }).length;
122
+ const countTargetCharInPipedChars = pipedChars.filter(char => char === targetChar).length;
136
123
 
137
124
  // We need to know how many times it occurs in the intersection
138
- var countTargetCharInIntersection = intersection.filter(function (char) {
139
- return char === targetChar;
140
- }).length;
125
+ const countTargetCharInIntersection = intersection.filter(char => char === targetChar).length;
141
126
 
142
127
  // We need to know if the placeholder contains characters that look like
143
128
  // our `targetChar`, so we don't select one of those by mistake.
144
- var countTargetCharInPlaceholder = placeholder.substr(0, placeholder.indexOf(placeholderChar)).split(emptyString).filter(function (char, index) {
145
- return (
146
- // Check if `char` is the same as our `targetChar`, so we account for it
147
- char === targetChar &&
148
- // but also make sure that both the `rawValue` and placeholder don't have the same character at the same
149
- // index because if they are equal, that means we are already counting those characters in
150
- // `countTargetCharInIntersection`
151
- rawValue[index] !== char
152
- );
153
- }).length;
129
+ const countTargetCharInPlaceholder = placeholder.substr(0, placeholder.indexOf(placeholderChar)).split(emptyString).filter((char, index) =>
130
+ // Check if `char` is the same as our `targetChar`, so we account for it
131
+ char === targetChar &&
132
+ // but also make sure that both the `rawValue` and placeholder don't have the same character at the same
133
+ // index because if they are equal, that means we are already counting those characters in
134
+ // `countTargetCharInIntersection`
135
+ rawValue[index] !== char).length;
154
136
 
155
137
  // The number of times we need to see occurrences of the `targetChar` before we know it is the one we're looking
156
138
  // for is:
157
- var requiredNumberOfMatches = countTargetCharInPlaceholder + countTargetCharInIntersection + countTargetCharInPipedChars + (
139
+ const requiredNumberOfMatches = countTargetCharInPlaceholder + countTargetCharInIntersection + countTargetCharInPipedChars + (
158
140
  // The character to the right of the caret isn't included in `intersection`
159
141
  // so add one if we are tracking the character to the right
160
142
  trackRightCharacter ? 1 : 0);
@@ -163,9 +145,9 @@ function adjustCaretPosition(_ref) {
163
145
  // We keep looping forward and store the index in every iteration. Once we have encountered
164
146
  // enough occurrences of the target character, we break out of the loop
165
147
  // If are searching for the second `1` in `1214`, `startingSearchIndex` will point at `4`.
166
- var numberOfEncounteredMatches = 0;
167
- for (var i = 0; i < conformedValueLength; i++) {
168
- var conformedValueChar = normalizedConformedValue[i];
148
+ let numberOfEncounteredMatches = 0;
149
+ for (let i = 0; i < conformedValueLength; i++) {
150
+ const conformedValueChar = normalizedConformedValue[i];
169
151
  startingSearchIndex = i + 1;
170
152
  if (conformedValueChar === targetChar) {
171
153
  numberOfEncounteredMatches++;
@@ -186,18 +168,18 @@ function adjustCaretPosition(_ref) {
186
168
  // We want to remember the last placeholder character encountered so that if the mask
187
169
  // contains more characters after the last placeholder character, we don't forward the caret
188
170
  // that far to the right. Instead, we stop it at the last encountered placeholder character.
189
- var lastPlaceholderChar = startingSearchIndex;
190
- for (var _i = startingSearchIndex; _i <= placeholderLength; _i++) {
191
- if (placeholder[_i] === placeholderChar) {
192
- lastPlaceholderChar = _i;
171
+ let lastPlaceholderChar = startingSearchIndex;
172
+ for (let i = startingSearchIndex; i <= placeholderLength; i++) {
173
+ if (placeholder[i] === placeholderChar) {
174
+ lastPlaceholderChar = i;
193
175
  }
194
176
  if (
195
177
  // If we're adding, we can position the caret at the next placeholder character.
196
- placeholder[_i] === placeholderChar ||
178
+ placeholder[i] === placeholderChar ||
197
179
  // If a caret trap was set by a mask function, we need to stop at the trap.
198
- caretTrapIndexes.indexOf(_i) !== -1 ||
180
+ caretTrapIndexes.indexOf(i) !== -1 ||
199
181
  // This is the end of the placeholder. We cannot move any further. Let's put the caret there.
200
- _i === placeholderLength) {
182
+ i === placeholderLength) {
201
183
  return lastPlaceholderChar;
202
184
  }
203
185
  }
@@ -206,26 +188,26 @@ function adjustCaretPosition(_ref) {
206
188
  if (trackRightCharacter) {
207
189
  // Searching for the character that was to the right of the caret
208
190
  // We start at `startingSearchIndex` - 1 because it includes one character extra to the right
209
- for (var _i2 = startingSearchIndex - 1; _i2 >= 0; _i2--) {
191
+ for (let i = startingSearchIndex - 1; i >= 0; i--) {
210
192
  // If tracking the character to the right of the cursor, we move to the left until
211
193
  // we found the character and then place the caret right before it
212
194
 
213
195
  if (
214
196
  // `targetChar` should be in `conformedValue`, since it was in `rawValue`, just
215
197
  // to the right of the caret
216
- conformedValue[_i2] === targetChar ||
198
+ conformedValue[i] === targetChar ||
217
199
  // If a caret trap was set by a mask function, we need to stop at the trap.
218
- caretTrapIndexes.indexOf(_i2) !== -1 ||
200
+ caretTrapIndexes.indexOf(i) !== -1 ||
219
201
  // This is the beginning of the placeholder. We cannot move any further.
220
202
  // Let's put the caret there.
221
- _i2 === 0) {
222
- return _i2;
203
+ i === 0) {
204
+ return i;
223
205
  }
224
206
  }
225
207
  } else {
226
208
  // Searching for the first placeholder or caret trap to the left
227
209
 
228
- for (var _i3 = startingSearchIndex; _i3 >= 0; _i3--) {
210
+ for (let i = startingSearchIndex; i >= 0; i--) {
229
211
  // If we're deleting, we stop the caret right before the placeholder character.
230
212
  // For example, for mask `(111) 11`, current conformed input `(456) 86`. If user
231
213
  // modifies input to `(456 86`. That is, they deleted the `)`, we place the caret
@@ -233,13 +215,13 @@ function adjustCaretPosition(_ref) {
233
215
 
234
216
  if (
235
217
  // If we're deleting, we can position the caret right before the placeholder character
236
- placeholder[_i3 - 1] === placeholderChar ||
218
+ placeholder[i - 1] === placeholderChar ||
237
219
  // If a caret trap was set by a mask function, we need to stop at the trap.
238
- caretTrapIndexes.indexOf(_i3) !== -1 ||
220
+ caretTrapIndexes.indexOf(i) !== -1 ||
239
221
  // This is the beginning of the placeholder. We cannot move any further.
240
222
  // Let's put the caret there.
241
- _i3 === 0) {
242
- return _i3;
223
+ i === 0) {
224
+ return i;
243
225
  }
244
226
  }
245
227
  }
@@ -36,39 +36,35 @@ function conformToMask(rawValue, mask, config) {
36
36
  }
37
37
 
38
38
  // These configurations tell us how to conform the mask
39
- var _config = config,
40
- _config$guide = _config.guide,
41
- guide = _config$guide === void 0 ? true : _config$guide,
42
- _config$previousConfo = _config.previousConformedValue,
43
- previousConformedValue = _config$previousConfo === void 0 ? '' : _config$previousConfo,
44
- _config$placeholderCh = _config.placeholderChar,
45
- placeholderChar = _config$placeholderCh === void 0 ? _utilities.defaultPlaceholderChar : _config$placeholderCh,
46
- _config$placeholder = _config.placeholder,
47
- placeholder = _config$placeholder === void 0 ? (0, _utilities.convertMaskToPlaceholder)(mask, placeholderChar) : _config$placeholder,
48
- _config$currentCaretP = _config.currentCaretPosition,
49
- currentCaretPosition = _config$currentCaretP === void 0 ? 0 : _config$currentCaretP,
50
- keepCharPositions = _config.keepCharPositions;
39
+ const {
40
+ guide = true,
41
+ previousConformedValue = '',
42
+ placeholderChar = _utilities.defaultPlaceholderChar,
43
+ placeholder = (0, _utilities.convertMaskToPlaceholder)(mask, placeholderChar),
44
+ currentCaretPosition = 0,
45
+ keepCharPositions
46
+ } = config;
51
47
 
52
48
  // The configs below indicate that the user wants the algorithm to work in *no guide* mode
53
- var suppressGuide = guide === false && previousConformedValue !== undefined;
49
+ const suppressGuide = guide === false && previousConformedValue !== undefined;
54
50
 
55
51
  // Calculate lengths once for performance
56
- var rawValueLength = rawValue.length;
57
- var previousConformedValueLength = previousConformedValue.length;
58
- var placeholderLength = placeholder.length;
59
- var maskLength = mask.length;
52
+ const rawValueLength = rawValue.length;
53
+ const previousConformedValueLength = previousConformedValue.length;
54
+ const placeholderLength = placeholder.length;
55
+ const maskLength = mask.length;
60
56
 
61
57
  // This tells us the number of edited characters and the direction in which they were edited (+/-)
62
- var editDistance = rawValueLength - previousConformedValueLength;
58
+ const editDistance = rawValueLength - previousConformedValueLength;
63
59
 
64
60
  // In *no guide* mode, we need to know if the user is trying to add a character or not
65
- var isAddition = editDistance > 0;
61
+ const isAddition = editDistance > 0;
66
62
 
67
63
  // Tells us the index of the first change. For (438) 394-4938 to (38) 394-4938, that would be 1
68
- var indexOfFirstChange = currentCaretPosition + (isAddition ? -editDistance : 0);
64
+ const indexOfFirstChange = currentCaretPosition + (isAddition ? -editDistance : 0);
69
65
 
70
66
  // We're also gonna need the index of last change, which we can derive as follows...
71
- var indexOfLastChange = indexOfFirstChange + Math.abs(editDistance);
67
+ const indexOfLastChange = indexOfFirstChange + Math.abs(editDistance);
72
68
 
73
69
  // If `conformToMask` is configured to keep character positions, that is, for mask 111, previous value
74
70
  // _2_ and raw value 3_2_, the new conformed value should be 32_, not 3_2 (default behavior). That's in the case of
@@ -80,10 +76,10 @@ function conformToMask(rawValue, mask, config) {
80
76
  // To do this, we want to compensate for all characters that were deleted
81
77
  if (keepCharPositions === true && !isAddition) {
82
78
  // We will be storing the new placeholder characters in this variable.
83
- var compensatingPlaceholderChars = '';
79
+ let compensatingPlaceholderChars = '';
84
80
 
85
81
  // For every character that was deleted from a placeholder position, we add a placeholder char
86
- for (var i = indexOfFirstChange; i < indexOfLastChange; i++) {
82
+ for (let i = indexOfFirstChange; i < indexOfLastChange; i++) {
87
83
  if (placeholder[i] === placeholderChar) {
88
84
  compensatingPlaceholderChars += placeholderChar;
89
85
  }
@@ -98,35 +94,35 @@ function conformToMask(rawValue, mask, config) {
98
94
  // Convert `rawValue` string to an array, and mark characters based on whether they are newly added or have
99
95
  // existed in the previous conformed value. Identifying new and old characters is needed for `conformToMask`
100
96
  // to work if it is configured to keep character positions.
101
- var rawValueArr = rawValue.split('').map(function (char, i) {
102
- return {
103
- char: char,
104
- isNew: i >= indexOfFirstChange && i < indexOfLastChange
105
- };
106
- });
97
+ const rawValueArr = rawValue.split('').map((char, i) => ({
98
+ char,
99
+ isNew: i >= indexOfFirstChange && i < indexOfLastChange
100
+ }));
107
101
 
108
102
  // The loop below removes masking characters from user input. For example, for mask
109
103
  // `00 (111)`, the placeholder would be `00 (___)`. If user input is `00 (234)`, the loop below
110
104
  // would remove all characters but `234` from the `rawValueArr`. The rest of the algorithm
111
105
  // then would lay `234` on top of the available placeholder positions in the mask.
112
- for (var _i = rawValueLength - 1; _i >= 0; _i--) {
113
- var char = rawValueArr[_i].char;
106
+ for (let i = rawValueLength - 1; i >= 0; i--) {
107
+ const {
108
+ char
109
+ } = rawValueArr[i];
114
110
  if (char !== placeholderChar) {
115
- var shouldOffset = _i >= indexOfFirstChange && previousConformedValueLength === maskLength;
116
- if (char === placeholder[shouldOffset ? _i - editDistance : _i]) {
117
- rawValueArr.splice(_i, 1);
111
+ const shouldOffset = i >= indexOfFirstChange && previousConformedValueLength === maskLength;
112
+ if (char === placeholder[shouldOffset ? i - editDistance : i]) {
113
+ rawValueArr.splice(i, 1);
118
114
  }
119
115
  }
120
116
  }
121
117
 
122
118
  // This is the variable that we will be filling with characters as we figure them out
123
119
  // in the algorithm below
124
- var conformedValue = '';
125
- var someCharsRejected = false;
120
+ let conformedValue = '';
121
+ let someCharsRejected = false;
126
122
 
127
123
  // Ok, so first we loop through the placeholder looking for placeholder characters to fill up.
128
- placeholderLoop: for (var _i2 = 0; _i2 < placeholderLength; _i2++) {
129
- var charInPlaceholder = placeholder[_i2];
124
+ placeholderLoop: for (let i = 0; i < placeholderLength; i++) {
125
+ const charInPlaceholder = placeholder[i];
130
126
 
131
127
  // We see one. Let's find out what we can put in it.
132
128
  if (charInPlaceholder === placeholderChar) {
@@ -137,9 +133,10 @@ function conformToMask(rawValue, mask, config) {
137
133
  while (rawValueArr.length > 0) {
138
134
  // Let's retrieve the first user character in the queue of characters we have left
139
135
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
140
- var _ref = rawValueArr.shift(),
141
- rawValueChar = _ref.char,
142
- isNew = _ref.isNew;
136
+ const {
137
+ char: rawValueChar,
138
+ isNew
139
+ } = rawValueArr.shift();
143
140
 
144
141
  // If the character we got from the user input is a placeholder character (which happens
145
142
  // regularly because user input could be something like (540) 90_-____, which includes
@@ -153,7 +150,7 @@ function conformToMask(rawValue, mask, config) {
153
150
 
154
151
  // Else if, the character we got from the user input is not a placeholder, let's see
155
152
  // if the current position in the mask can accept it.
156
- } else if (mask[_i2].test(rawValueChar)) {
153
+ } else if (mask[i].test(rawValueChar)) {
157
154
  // we map the character differently based on whether we are keeping character positions or not.
158
155
  // If any of the conditions below are met, we simply map the raw value character to the
159
156
  // placeholder position.
@@ -167,20 +164,20 @@ function conformToMask(rawValue, mask, config) {
167
164
  // For example, for mask `1111`, previous conformed value `_2__`, raw value `942_2__`. We can map the
168
165
  // `9`, to the first available placeholder position, but then, there are no more spots available for the
169
166
  // `4` and `2`. So, we discard them and end up with a conformed value of `92__`.
170
- var rawValueArrLength = rawValueArr.length;
171
- var indexOfNextAvailablePlaceholderChar = null;
167
+ const rawValueArrLength = rawValueArr.length;
168
+ let indexOfNextAvailablePlaceholderChar = null;
172
169
 
173
170
  // Let's loop through the remaining raw value characters. We are looking for either a suitable spot, ie,
174
171
  // a placeholder character or a non-suitable spot, ie, a non-placeholder character that is not new.
175
172
  // If we see a suitable spot first, we store its position and exit the loop. If we see a non-suitable
176
173
  // spot first, we exit the loop and our `indexOfNextAvailablePlaceholderChar` will stay as `null`.
177
- for (var _i3 = 0; _i3 < rawValueArrLength; _i3++) {
178
- var charData = rawValueArr[_i3];
174
+ for (let i = 0; i < rawValueArrLength; i++) {
175
+ const charData = rawValueArr[i];
179
176
  if (charData.char !== placeholderChar && charData.isNew === false) {
180
177
  break;
181
178
  }
182
179
  if (charData.char === placeholderChar) {
183
- indexOfNextAvailablePlaceholderChar = _i3;
180
+ indexOfNextAvailablePlaceholderChar = i;
184
181
  break;
185
182
  }
186
183
  }
@@ -195,7 +192,7 @@ function conformToMask(rawValue, mask, config) {
195
192
  // If `indexOfNextAvailablePlaceholderChar` is `null`, that means the character is blocked. We have to
196
193
  // discard it.
197
194
  } else {
198
- _i2--;
195
+ i--;
199
196
  }
200
197
  }
201
198
 
@@ -213,7 +210,7 @@ function conformToMask(rawValue, mask, config) {
213
210
  //
214
211
  // That is, for mask `(111)` and user input `2`, we want to return `(2`, not `(2__)`.
215
212
  if (suppressGuide === false) {
216
- conformedValue += placeholder.substr(_i2, placeholderLength);
213
+ conformedValue += placeholder.substr(i, placeholderLength);
217
214
  }
218
215
 
219
216
  // And we break
@@ -233,12 +230,12 @@ function conformToMask(rawValue, mask, config) {
233
230
  // That's why the logic below finds the last filled placeholder character, and removes everything
234
231
  // from that point on.
235
232
  if (suppressGuide && isAddition === false) {
236
- var indexOfLastFilledPlaceholderChar = null;
233
+ let indexOfLastFilledPlaceholderChar = null;
237
234
 
238
235
  // Find the last filled placeholder position and substring from there
239
- for (var _i4 = 0; _i4 < conformedValue.length; _i4++) {
240
- if (placeholder[_i4] === placeholderChar) {
241
- indexOfLastFilledPlaceholderChar = _i4;
236
+ for (let i = 0; i < conformedValue.length; i++) {
237
+ if (placeholder[i] === placeholderChar) {
238
+ indexOfLastFilledPlaceholderChar = i;
242
239
  }
243
240
  }
244
241
  if (indexOfLastFilledPlaceholderChar !== null) {
@@ -251,9 +248,9 @@ function conformToMask(rawValue, mask, config) {
251
248
  }
252
249
  }
253
250
  return {
254
- conformedValue: conformedValue,
251
+ conformedValue,
255
252
  meta: {
256
- someCharsRejected: someCharsRejected
253
+ someCharsRejected
257
254
  }
258
255
  };
259
256
  }