@mezzanine-ui/react 0.13.10 → 0.13.11

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 (459) hide show
  1. package/Accordion/Accordion.d.ts +24 -24
  2. package/Accordion/Accordion.js +25 -25
  3. package/Accordion/AccordionControlContext.d.ts +9 -9
  4. package/Accordion/AccordionDetails.d.ts +10 -10
  5. package/Accordion/AccordionDetails.js +16 -16
  6. package/Accordion/AccordionSummary.d.ts +18 -18
  7. package/Accordion/AccordionSummary.js +39 -39
  8. package/Accordion/index.d.ts +3 -3
  9. package/Alert/Alert.d.ts +20 -20
  10. package/Alert/Alert.js +9 -9
  11. package/Alert/index.d.ts +2 -2
  12. package/AppBar/AppBar.d.ts +14 -14
  13. package/AppBar/AppBar.js +25 -25
  14. package/AppBar/AppBarBrand.d.ts +5 -5
  15. package/AppBar/AppBarBrand.js +4 -4
  16. package/AppBar/AppBarMain.d.ts +5 -5
  17. package/AppBar/AppBarMain.js +4 -4
  18. package/AppBar/AppBarSupport.d.ts +5 -5
  19. package/AppBar/AppBarSupport.js +4 -4
  20. package/AppBar/index.d.ts +4 -4
  21. package/Badge/Badge.d.ts +19 -19
  22. package/Badge/Badge.js +20 -20
  23. package/Badge/BadgeContainer.d.ts +8 -8
  24. package/Badge/BadgeContainer.js +7 -7
  25. package/Badge/index.d.ts +2 -2
  26. package/Button/Button.d.ts +11 -11
  27. package/Button/Button.js +29 -29
  28. package/Button/ButtonGroup.d.ts +63 -63
  29. package/Button/ButtonGroup.js +29 -29
  30. package/Button/IconButton.d.ts +21 -21
  31. package/Button/IconButton.js +7 -7
  32. package/Button/index.d.ts +20 -20
  33. package/Button/index.js +1 -2
  34. package/Button/typings.d.ts +44 -44
  35. package/Calendar/Calendar.d.ts +69 -69
  36. package/Calendar/Calendar.js +38 -38
  37. package/Calendar/CalendarCell.d.ts +22 -22
  38. package/Calendar/CalendarCell.js +11 -11
  39. package/Calendar/CalendarContext.d.ts +22 -22
  40. package/Calendar/CalendarContext.js +28 -28
  41. package/Calendar/CalendarControls.d.ts +26 -26
  42. package/Calendar/CalendarControls.js +11 -11
  43. package/Calendar/CalendarDayOfWeek.d.ts +15 -15
  44. package/Calendar/CalendarDayOfWeek.js +9 -9
  45. package/Calendar/CalendarDays.d.ts +38 -38
  46. package/Calendar/CalendarDays.js +36 -36
  47. package/Calendar/CalendarMonths.d.ts +42 -42
  48. package/Calendar/CalendarMonths.js +22 -22
  49. package/Calendar/CalendarWeeks.d.ts +41 -41
  50. package/Calendar/CalendarWeeks.js +42 -42
  51. package/Calendar/CalendarYears.d.ts +40 -40
  52. package/Calendar/CalendarYears.js +25 -25
  53. package/Calendar/index.d.ts +12 -12
  54. package/Calendar/useCalendarControlModifiers.d.ts +7 -7
  55. package/Calendar/useCalendarControlModifiers.js +20 -20
  56. package/Calendar/useCalendarControls.d.ts +12 -12
  57. package/Calendar/useCalendarControls.js +27 -27
  58. package/Calendar/useCalendarModeStack.d.ts +6 -6
  59. package/Calendar/useCalendarModeStack.js +10 -10
  60. package/Card/Card.d.ts +51 -51
  61. package/Card/Card.js +12 -12
  62. package/Card/CardActions.d.ts +34 -34
  63. package/Card/CardActions.js +7 -7
  64. package/Card/index.d.ts +2 -2
  65. package/Checkbox/CheckAll.d.ts +13 -13
  66. package/Checkbox/CheckAll.js +28 -28
  67. package/Checkbox/Checkbox.d.ts +46 -46
  68. package/Checkbox/Checkbox.js +23 -23
  69. package/Checkbox/CheckboxGroup.d.ts +47 -47
  70. package/Checkbox/CheckboxGroup.js +27 -27
  71. package/Checkbox/CheckboxGroupContext.d.ts +9 -9
  72. package/Checkbox/index.d.ts +4 -4
  73. package/ConfirmActions/ConfirmActions.d.ts +45 -45
  74. package/ConfirmActions/ConfirmActions.js +8 -8
  75. package/ConfirmActions/index.d.ts +1 -1
  76. package/DatePicker/DatePicker.d.ts +32 -32
  77. package/DatePicker/DatePicker.js +119 -119
  78. package/DatePicker/DatePickerCalendar.d.ts +32 -32
  79. package/DatePicker/DatePickerCalendar.js +52 -52
  80. package/DatePicker/index.d.ts +2 -2
  81. package/DateRangePicker/DateRangePicker.d.ts +38 -38
  82. package/DateRangePicker/DateRangePicker.js +173 -173
  83. package/DateRangePicker/DateRangePickerCalendar.d.ts +26 -26
  84. package/DateRangePicker/DateRangePickerCalendar.js +86 -86
  85. package/DateRangePicker/index.d.ts +4 -4
  86. package/DateRangePicker/useDateRangeCalendarControls.d.ts +14 -14
  87. package/DateRangePicker/useDateRangeCalendarControls.js +84 -84
  88. package/DateRangePicker/useDateRangePickerValue.d.ts +23 -23
  89. package/DateRangePicker/useDateRangePickerValue.js +81 -81
  90. package/DateTimePicker/DateTimePicker.d.ts +28 -28
  91. package/DateTimePicker/DateTimePicker.js +107 -107
  92. package/DateTimePicker/DateTimePickerPanel.d.ts +29 -29
  93. package/DateTimePicker/DateTimePickerPanel.js +36 -36
  94. package/DateTimePicker/index.d.ts +2 -2
  95. package/Drawer/Drawer.d.ts +13 -13
  96. package/Drawer/Drawer.js +10 -10
  97. package/Drawer/index.d.ts +2 -2
  98. package/Dropdown/Dropdown.d.ts +25 -25
  99. package/Dropdown/Dropdown.js +52 -52
  100. package/Dropdown/index.d.ts +1 -1
  101. package/Empty/Empty.d.ts +18 -18
  102. package/Empty/Empty.js +6 -6
  103. package/Empty/index.d.ts +1 -1
  104. package/Form/FormControlContext.d.ts +9 -9
  105. package/Form/FormField.d.ts +27 -27
  106. package/Form/FormField.js +16 -16
  107. package/Form/FormLabel.d.ts +11 -11
  108. package/Form/FormLabel.js +8 -8
  109. package/Form/FormMessage.d.ts +8 -8
  110. package/Form/FormMessage.js +9 -9
  111. package/Form/index.d.ts +5 -5
  112. package/Form/typings.d.ts +4 -4
  113. package/Form/useAutoCompleteValueControl.d.ts +42 -42
  114. package/Form/useAutoCompleteValueControl.js +94 -94
  115. package/Form/useCheckboxControlValue.d.ts +11 -11
  116. package/Form/useCheckboxControlValue.js +24 -24
  117. package/Form/useControlValueState.d.ts +7 -7
  118. package/Form/useControlValueState.js +10 -10
  119. package/Form/useCustomControlValue.d.ts +5 -5
  120. package/Form/useCustomControlValue.js +12 -12
  121. package/Form/useInputControlValue.d.ts +7 -7
  122. package/Form/useInputControlValue.js +18 -18
  123. package/Form/useInputWithClearControlValue.d.ts +6 -6
  124. package/Form/useInputWithClearControlValue.js +28 -28
  125. package/Form/useInputWithTagsModeValue.d.ts +37 -37
  126. package/Form/useInputWithTagsModeValue.js +83 -83
  127. package/Form/useRadioControlValue.d.ts +11 -11
  128. package/Form/useRadioControlValue.js +19 -19
  129. package/Form/useSelectValueControl.d.ts +33 -33
  130. package/Form/useSelectValueControl.js +71 -71
  131. package/Form/useSwitchControlValue.d.ts +7 -7
  132. package/Form/useSwitchControlValue.js +18 -18
  133. package/Icon/Icon.d.ts +32 -32
  134. package/Icon/Icon.js +18 -18
  135. package/Icon/index.d.ts +3 -3
  136. package/Input/Input.d.ts +78 -78
  137. package/Input/Input.js +34 -34
  138. package/Input/index.d.ts +2 -2
  139. package/Loading/Loading.d.ts +34 -34
  140. package/Loading/Loading.js +19 -19
  141. package/Loading/index.d.ts +1 -1
  142. package/Menu/Menu.d.ts +29 -29
  143. package/Menu/Menu.js +16 -16
  144. package/Menu/MenuDivider.d.ts +8 -8
  145. package/Menu/MenuDivider.js +7 -7
  146. package/Menu/MenuItem.d.ts +24 -24
  147. package/Menu/MenuItem.js +16 -16
  148. package/Menu/MenuItemGroup.d.ts +13 -13
  149. package/Menu/MenuItemGroup.js +7 -7
  150. package/Menu/index.d.ts +5 -5
  151. package/Message/Message.d.ts +36 -36
  152. package/Message/Message.js +63 -63
  153. package/Message/index.d.ts +2 -2
  154. package/Modal/Modal.d.ts +37 -37
  155. package/Modal/Modal.js +15 -15
  156. package/Modal/ModalActions.d.ts +10 -10
  157. package/Modal/ModalActions.js +10 -10
  158. package/Modal/ModalBody.d.ts +8 -8
  159. package/Modal/ModalBody.js +7 -7
  160. package/Modal/ModalControl.d.ts +7 -7
  161. package/Modal/ModalControl.js +3 -3
  162. package/Modal/ModalFooter.d.ts +8 -8
  163. package/Modal/ModalFooter.js +7 -7
  164. package/Modal/ModalHeader.d.ts +20 -20
  165. package/Modal/ModalHeader.js +10 -10
  166. package/Modal/index.d.ts +7 -7
  167. package/Modal/useModalContainer.d.ts +6 -6
  168. package/Modal/useModalContainer.js +19 -19
  169. package/Navigation/Navigation.d.ts +29 -29
  170. package/Navigation/Navigation.js +45 -45
  171. package/Navigation/NavigationContext.d.ts +6 -6
  172. package/Navigation/NavigationContext.js +2 -2
  173. package/Navigation/NavigationItem.d.ts +31 -31
  174. package/Navigation/NavigationItem.js +13 -13
  175. package/Navigation/NavigationSubMenu.d.ts +22 -22
  176. package/Navigation/NavigationSubMenu.js +48 -48
  177. package/Navigation/index.d.ts +4 -4
  178. package/Notification/Notification.d.ts +54 -54
  179. package/Notification/Notification.js +60 -60
  180. package/Notification/index.d.ts +2 -2
  181. package/Notifier/NotifierManager.d.ts +17 -17
  182. package/Notifier/NotifierManager.js +25 -25
  183. package/Notifier/createNotifier.d.ts +21 -21
  184. package/Notifier/createNotifier.js +65 -65
  185. package/Notifier/index.d.ts +2 -2
  186. package/Notifier/typings.d.ts +28 -28
  187. package/Overlay/Overlay.d.ts +43 -43
  188. package/Overlay/Overlay.js +22 -22
  189. package/Overlay/index.d.ts +1 -1
  190. package/PageFooter/PageFooter.d.ts +15 -15
  191. package/PageFooter/PageFooter.js +4 -4
  192. package/PageFooter/index.d.ts +1 -1
  193. package/Pagination/Pagination.d.ts +105 -105
  194. package/Pagination/Pagination.js +18 -18
  195. package/Pagination/PaginationItem.d.ts +27 -27
  196. package/Pagination/PaginationItem.js +16 -16
  197. package/Pagination/PaginationJumper.d.ts +38 -38
  198. package/Pagination/PaginationJumper.js +40 -40
  199. package/Pagination/PaginationPageSize.d.ts +38 -38
  200. package/Pagination/PaginationPageSize.js +8 -8
  201. package/Pagination/index.d.ts +6 -6
  202. package/Pagination/usePagination.d.ts +16 -16
  203. package/Pagination/usePagination.js +73 -73
  204. package/Picker/PickerTrigger.d.ts +40 -40
  205. package/Picker/PickerTrigger.js +7 -7
  206. package/Picker/RangePickerTrigger.d.ts +64 -64
  207. package/Picker/RangePickerTrigger.js +7 -7
  208. package/Picker/index.d.ts +7 -7
  209. package/Picker/usePickerDocumentEventClose.d.ts +10 -10
  210. package/Picker/usePickerDocumentEventClose.js +20 -20
  211. package/Picker/usePickerInputValue.d.ts +12 -12
  212. package/Picker/usePickerInputValue.js +18 -18
  213. package/Picker/usePickerValue.d.ts +20 -20
  214. package/Picker/usePickerValue.js +51 -51
  215. package/Picker/useRangePickerValue.d.ts +20 -20
  216. package/Picker/useRangePickerValue.js +88 -88
  217. package/Picker/useTabKeyClose.d.ts +2 -2
  218. package/Picker/useTabKeyClose.js +7 -7
  219. package/Popconfirm/Popconfirm.d.ts +16 -16
  220. package/Popconfirm/Popconfirm.js +4 -4
  221. package/Popconfirm/index.d.ts +1 -1
  222. package/Popover/Popover.d.ts +23 -23
  223. package/Popover/Popover.js +34 -34
  224. package/Popover/index.d.ts +1 -1
  225. package/Popper/Popper.d.ts +32 -32
  226. package/Popper/Popper.js +21 -21
  227. package/Popper/index.d.ts +1 -1
  228. package/Portal/Portal.d.ts +20 -20
  229. package/Portal/Portal.js +15 -15
  230. package/Portal/index.d.ts +1 -1
  231. package/Progress/Progress.d.ts +59 -59
  232. package/Progress/Progress.js +21 -21
  233. package/Progress/index.d.ts +2 -2
  234. package/Provider/ConfigProvider.d.ts +8 -8
  235. package/Provider/ConfigProvider.js +6 -6
  236. package/Provider/context.d.ts +6 -6
  237. package/Provider/context.js +2 -2
  238. package/Provider/index.d.ts +4 -4
  239. package/Radio/Radio.d.ts +41 -41
  240. package/Radio/Radio.js +21 -21
  241. package/Radio/RadioGroup.d.ts +47 -47
  242. package/Radio/RadioGroup.js +20 -20
  243. package/Radio/RadioGroupContext.d.ts +9 -9
  244. package/Radio/index.d.ts +3 -3
  245. package/Select/AutoComplete.d.ts +101 -101
  246. package/Select/AutoComplete.js +101 -101
  247. package/Select/Option.d.ts +19 -19
  248. package/Select/Option.js +37 -37
  249. package/Select/Select.d.ts +94 -94
  250. package/Select/Select.js +111 -111
  251. package/Select/SelectControlContext.d.ts +3 -3
  252. package/Select/SelectTrigger.d.ts +89 -89
  253. package/Select/SelectTrigger.js +44 -44
  254. package/Select/SelectTriggerTags.d.ts +19 -19
  255. package/Select/SelectTriggerTags.js +21 -21
  256. package/Select/TreeSelect.d.ts +68 -68
  257. package/Select/TreeSelect.js +183 -183
  258. package/Select/index.d.ts +9 -9
  259. package/Select/typings.d.ts +12 -12
  260. package/Select/useSelectTriggerTags.d.ts +19 -19
  261. package/Select/useSelectTriggerTags.js +53 -53
  262. package/Skeleton/Skeleton.d.ts +22 -22
  263. package/Skeleton/Skeleton.js +7 -7
  264. package/Skeleton/index.d.ts +1 -1
  265. package/Slider/Slider.d.ts +51 -51
  266. package/Slider/Slider.js +174 -174
  267. package/Slider/index.d.ts +3 -3
  268. package/Slider/useSlider.d.ts +31 -31
  269. package/Slider/useSlider.js +99 -99
  270. package/Stepper/Step.d.ts +41 -41
  271. package/Stepper/Step.js +9 -9
  272. package/Stepper/Stepper.d.ts +19 -19
  273. package/Stepper/Stepper.js +26 -26
  274. package/Stepper/index.d.ts +2 -2
  275. package/Switch/Switch.d.ts +43 -43
  276. package/Switch/Switch.js +18 -18
  277. package/Switch/index.d.ts +2 -2
  278. package/Table/Table.d.ts +110 -110
  279. package/Table/Table.js +146 -146
  280. package/Table/TableBody.d.ts +10 -10
  281. package/Table/TableBody.js +13 -13
  282. package/Table/TableBodyRow.d.ts +12 -12
  283. package/Table/TableBodyRow.js +45 -45
  284. package/Table/TableCell.d.ts +20 -20
  285. package/Table/TableCell.js +15 -15
  286. package/Table/TableContext.d.ts +52 -52
  287. package/Table/TableContext.js +2 -2
  288. package/Table/TableExpandedTable.d.ts +12 -12
  289. package/Table/TableExpandedTable.js +14 -14
  290. package/Table/TableHeader.d.ts +4 -4
  291. package/Table/TableHeader.js +20 -20
  292. package/Table/draggable/useTableDraggable.d.ts +14 -14
  293. package/Table/draggable/useTableDraggable.js +54 -54
  294. package/Table/editable/TableEditRenderWrapper.d.ts +8 -8
  295. package/Table/editable/TableEditRenderWrapper.js +8 -8
  296. package/Table/expandable/TableExpandable.d.ts +28 -28
  297. package/Table/expandable/TableExpandable.js +15 -15
  298. package/Table/index.d.ts +6 -6
  299. package/Table/pagination/TablePagination.d.ts +10 -10
  300. package/Table/pagination/TablePagination.js +15 -15
  301. package/Table/pagination/useTablePagination.d.ts +8 -8
  302. package/Table/pagination/useTablePagination.js +21 -21
  303. package/Table/refresh/TableRefresh.d.ts +10 -10
  304. package/Table/refresh/TableRefresh.js +13 -13
  305. package/Table/rowSelection/TableRowSelection.d.ts +19 -19
  306. package/Table/rowSelection/TableRowSelection.js +70 -70
  307. package/Table/rowSelection/useTableRowSelection.d.ts +6 -6
  308. package/Table/rowSelection/useTableRowSelection.js +47 -47
  309. package/Table/sorting/TableSortingIcon.d.ts +11 -11
  310. package/Table/sorting/TableSortingIcon.js +18 -18
  311. package/Table/sorting/useTableSorting.d.ts +12 -12
  312. package/Table/sorting/useTableSorting.js +103 -103
  313. package/Table/useTableFetchMore.d.ts +10 -10
  314. package/Table/useTableFetchMore.js +42 -42
  315. package/Table/useTableLoading.d.ts +5 -5
  316. package/Table/useTableLoading.js +13 -13
  317. package/Table/useTableScroll.d.ts +550 -550
  318. package/Table/useTableScroll.js +275 -275
  319. package/Tabs/Tab.d.ts +19 -19
  320. package/Tabs/Tab.js +9 -9
  321. package/Tabs/TabPane.d.ts +14 -14
  322. package/Tabs/TabPane.js +11 -11
  323. package/Tabs/Tabs.d.ts +39 -39
  324. package/Tabs/Tabs.js +36 -36
  325. package/Tabs/index.d.ts +3 -3
  326. package/Tabs/useTabsOverflow.d.ts +8 -8
  327. package/Tabs/useTabsOverflow.js +56 -56
  328. package/Tag/Tag.d.ts +29 -29
  329. package/Tag/Tag.js +14 -14
  330. package/Tag/index.d.ts +2 -2
  331. package/TextField/TextField.d.ts +54 -54
  332. package/TextField/TextField.js +33 -33
  333. package/TextField/index.d.ts +2 -2
  334. package/TextField/useTextFieldControl.d.ts +10 -10
  335. package/TextField/useTextFieldControl.js +12 -12
  336. package/Textarea/Textarea.d.ts +58 -58
  337. package/Textarea/Textarea.js +22 -22
  338. package/Textarea/index.d.ts +2 -2
  339. package/TimePanel/TimePanel.d.ts +66 -66
  340. package/TimePanel/TimePanel.js +54 -54
  341. package/TimePanel/TimePanelAction.d.ts +18 -18
  342. package/TimePanel/TimePanelAction.js +7 -7
  343. package/TimePanel/TimePanelColumn.d.ts +37 -37
  344. package/TimePanel/TimePanelColumn.js +28 -28
  345. package/TimePanel/index.d.ts +3 -3
  346. package/TimePicker/TimePicker.d.ts +24 -24
  347. package/TimePicker/TimePicker.js +99 -99
  348. package/TimePicker/TimePickerPanel.d.ts +24 -24
  349. package/TimePicker/TimePickerPanel.js +7 -7
  350. package/TimePicker/index.d.ts +2 -2
  351. package/Tooltip/Tooltip.d.ts +25 -25
  352. package/Tooltip/Tooltip.js +27 -27
  353. package/Tooltip/index.d.ts +1 -1
  354. package/Tooltip/useDelayMouseEnterLeave.d.ts +12 -12
  355. package/Tooltip/useDelayMouseEnterLeave.js +36 -36
  356. package/Transition/Collapse.d.ts +15 -15
  357. package/Transition/Collapse.js +96 -96
  358. package/Transition/Fade.d.ts +8 -8
  359. package/Transition/Fade.js +74 -74
  360. package/Transition/Grow.d.ts +13 -13
  361. package/Transition/Grow.js +101 -101
  362. package/Transition/SlideFade.d.ts +15 -15
  363. package/Transition/SlideFade.js +83 -83
  364. package/Transition/Transition.d.ts +98 -98
  365. package/Transition/Transition.js +21 -21
  366. package/Transition/Zoom.d.ts +8 -8
  367. package/Transition/Zoom.js +74 -74
  368. package/Transition/getAutoSizeDuration.d.ts +1 -1
  369. package/Transition/getAutoSizeDuration.js +7 -7
  370. package/Transition/getTransitionStyleProps.d.ts +16 -16
  371. package/Transition/getTransitionStyleProps.js +22 -22
  372. package/Transition/index.d.ts +6 -6
  373. package/Transition/reflow.d.ts +4 -4
  374. package/Transition/reflow.js +6 -6
  375. package/Transition/useAutoTransitionDuration.d.ts +6 -6
  376. package/Transition/useAutoTransitionDuration.js +10 -10
  377. package/Transition/useSetNodeTransition.d.ts +7 -7
  378. package/Transition/useSetNodeTransition.js +30 -30
  379. package/Tree/Tree.d.ts +70 -70
  380. package/Tree/Tree.js +116 -116
  381. package/Tree/TreeNode.d.ts +41 -41
  382. package/Tree/TreeNode.js +29 -29
  383. package/Tree/TreeNodeList.d.ts +25 -25
  384. package/Tree/TreeNodeList.js +22 -22
  385. package/Tree/getTreeNodeEntities.d.ts +11 -11
  386. package/Tree/getTreeNodeEntities.js +84 -84
  387. package/Tree/index.d.ts +8 -8
  388. package/Tree/toggleValue.d.ts +4 -4
  389. package/Tree/toggleValue.js +13 -13
  390. package/Tree/traverseTree.d.ts +2 -2
  391. package/Tree/traverseTree.js +8 -8
  392. package/Tree/typings.d.ts +16 -16
  393. package/Tree/useTreeExpandedValue.d.ts +15 -15
  394. package/Tree/useTreeExpandedValue.js +26 -26
  395. package/Typography/Typography.d.ts +43 -43
  396. package/Typography/Typography.js +31 -31
  397. package/Typography/index.d.ts +11 -11
  398. package/Typography/index.js +4 -1
  399. package/Upload/UploadButton.d.ts +10 -10
  400. package/Upload/UploadButton.js +14 -14
  401. package/Upload/UploadInput.d.ts +21 -21
  402. package/Upload/UploadInput.js +18 -18
  403. package/Upload/UploadPicture.d.ts +49 -49
  404. package/Upload/UploadPicture.js +43 -43
  405. package/Upload/UploadPictureBlock.d.ts +20 -20
  406. package/Upload/UploadPictureBlock.js +70 -70
  407. package/Upload/UploadPictureWall.d.ts +81 -81
  408. package/Upload/UploadPictureWall.js +144 -144
  409. package/Upload/UploadPictureWallItem.d.ts +15 -15
  410. package/Upload/UploadPictureWallItem.js +10 -10
  411. package/Upload/UploadResult.d.ts +35 -35
  412. package/Upload/UploadResult.js +19 -19
  413. package/Upload/index.d.ts +6 -6
  414. package/_internal/InputCheck/InputCheck.d.ts +33 -33
  415. package/_internal/InputCheck/InputCheck.js +11 -11
  416. package/_internal/InputCheck/InputCheckGroup.d.ts +18 -18
  417. package/_internal/InputCheck/InputCheckGroup.js +7 -7
  418. package/_internal/InputCheck/index.d.ts +3 -3
  419. package/_internal/InputTriggerPopper/InputTriggerPopper.d.ts +18 -18
  420. package/_internal/InputTriggerPopper/InputTriggerPopper.js +35 -35
  421. package/_internal/InputTriggerPopper/index.d.ts +1 -1
  422. package/_internal/SlideFadeOverlay/SlideFadeOverlay.d.ts +21 -21
  423. package/_internal/SlideFadeOverlay/SlideFadeOverlay.js +53 -53
  424. package/_internal/SlideFadeOverlay/index.d.ts +1 -1
  425. package/_internal/SlideFadeOverlay/useTopStack.d.ts +1 -1
  426. package/_internal/SlideFadeOverlay/useTopStack.js +17 -17
  427. package/hooks/useClickAway.d.ts +5 -5
  428. package/hooks/useClickAway.js +18 -18
  429. package/hooks/useComposeRefs.d.ts +2 -2
  430. package/hooks/useComposeRefs.js +2 -2
  431. package/hooks/useDocumentEscapeKeyDown.d.ts +3 -3
  432. package/hooks/useDocumentEscapeKeyDown.js +15 -15
  433. package/hooks/useDocumentEvents.d.ts +5 -5
  434. package/hooks/useDocumentEvents.js +16 -16
  435. package/hooks/useDocumentTabKeyDown.d.ts +3 -3
  436. package/hooks/useDocumentTabKeyDown.js +14 -14
  437. package/hooks/useIsomorphicLayoutEffect.d.ts +2 -2
  438. package/hooks/useIsomorphicLayoutEffect.js +2 -2
  439. package/hooks/useLastCallback.d.ts +1 -1
  440. package/hooks/useLastCallback.js +5 -5
  441. package/hooks/useLastValue.d.ts +3 -3
  442. package/hooks/useLastValue.js +4 -4
  443. package/hooks/usePreviousValue.d.ts +1 -1
  444. package/hooks/usePreviousValue.js +6 -6
  445. package/hooks/useWindowWidth.d.ts +1 -1
  446. package/hooks/useWindowWidth.js +10 -10
  447. package/index.d.ts +102 -102
  448. package/package.json +6 -20
  449. package/utils/array-move.d.ts +1 -1
  450. package/utils/array-move.js +10 -10
  451. package/utils/composeRefs.d.ts +21 -21
  452. package/utils/composeRefs.js +29 -29
  453. package/utils/cx.d.ts +1 -1
  454. package/utils/general.d.ts +8 -8
  455. package/utils/getElement.d.ts +3 -3
  456. package/utils/getElement.js +11 -11
  457. package/utils/jsx-types.d.ts +11 -11
  458. package/utils/scroll-lock.d.ts +2 -2
  459. package/utils/scroll-lock.js +17 -17
@@ -5,34 +5,34 @@ import { forwardRef, useRef, useEffect } from 'react';
5
5
  import Icon from '../Icon/Icon.js';
6
6
  import cx from 'clsx';
7
7
 
8
- /**
9
- * The react component for `mezzanine` time panel column.
10
- */
11
- const TimePanelColumn = forwardRef(function TimePanelColumn(props, ref) {
12
- const { activeUnit, cellHeight = 32, onChange, onNext, onPrev, prefix, units, } = props;
13
- const cellsRef = useRef(null);
14
- const getChangeHandler = (unit) => {
15
- if (!onChange)
16
- return undefined;
17
- return () => {
18
- onChange(unit);
19
- };
20
- };
21
- const prevetSmoothScrollTo = useRef(true);
22
- useEffect(() => {
23
- const activeIndex = units.findIndex(({ value }) => value === activeUnit);
24
- if (cellsRef.current) {
25
- cellsRef.current.scrollTo({
26
- top: activeIndex * cellHeight,
27
- behavior: prevetSmoothScrollTo.current ? 'auto' : 'smooth',
28
- });
29
- }
30
- prevetSmoothScrollTo.current = false;
31
- }, [activeUnit, cellHeight, units]);
32
- return (jsxs("div", { ref: ref, className: timePanelClasses.column, children: [prefix && jsx("div", { className: timePanelClasses.columnPrefix, children: prefix }), jsx("button", { type: "button", className: cx(timePanelClasses.button, timePanelClasses.columnControlButton), onClick: onPrev, children: jsx(Icon, { icon: ChevronUpIcon }) }), jsx("div", { ref: cellsRef, className: timePanelClasses.columnCells, children: units.map((unit) => (jsx("button", { type: "button", className: cx(timePanelClasses.button, timePanelClasses.columnButton, {
33
- [timePanelClasses.buttonActive]: unit.value === activeUnit,
34
- }), onClick: getChangeHandler(unit), children: unit.label }, unit.value))) }), jsx("button", { type: "button", className: cx(timePanelClasses.button, timePanelClasses.columnControlButton), onClick: onNext, children: jsx(Icon, { icon: ChevronDownIcon }) })] }));
35
- });
8
+ /**
9
+ * The react component for `mezzanine` time panel column.
10
+ */
11
+ const TimePanelColumn = forwardRef(function TimePanelColumn(props, ref) {
12
+ const { activeUnit, cellHeight = 32, onChange, onNext, onPrev, prefix, units, } = props;
13
+ const cellsRef = useRef(null);
14
+ const getChangeHandler = (unit) => {
15
+ if (!onChange)
16
+ return undefined;
17
+ return () => {
18
+ onChange(unit);
19
+ };
20
+ };
21
+ const prevetSmoothScrollTo = useRef(true);
22
+ useEffect(() => {
23
+ const activeIndex = units.findIndex(({ value }) => value === activeUnit);
24
+ if (cellsRef.current) {
25
+ cellsRef.current.scrollTo({
26
+ top: activeIndex * cellHeight,
27
+ behavior: prevetSmoothScrollTo.current ? 'auto' : 'smooth',
28
+ });
29
+ }
30
+ prevetSmoothScrollTo.current = false;
31
+ }, [activeUnit, cellHeight, units]);
32
+ return (jsxs("div", { ref: ref, className: timePanelClasses.column, children: [prefix && jsx("div", { className: timePanelClasses.columnPrefix, children: prefix }), jsx("button", { type: "button", className: cx(timePanelClasses.button, timePanelClasses.columnControlButton), onClick: onPrev, children: jsx(Icon, { icon: ChevronUpIcon }) }), jsx("div", { ref: cellsRef, className: timePanelClasses.columnCells, children: units.map((unit) => (jsx("button", { type: "button", className: cx(timePanelClasses.button, timePanelClasses.columnButton, {
33
+ [timePanelClasses.buttonActive]: unit.value === activeUnit,
34
+ }), onClick: getChangeHandler(unit), children: unit.label }, unit.value))) }), jsx("button", { type: "button", className: cx(timePanelClasses.button, timePanelClasses.columnControlButton), onClick: onNext, children: jsx(Icon, { icon: ChevronDownIcon }) })] }));
35
+ });
36
36
  var TimePanelColumn$1 = TimePanelColumn;
37
37
 
38
38
  export { TimePanelColumn$1 as default };
@@ -1,3 +1,3 @@
1
- export { TimePanelActionProps, default as TimePanelAction, } from './TimePanelAction';
2
- export { TimePanelColumnProps, default as TimePanelColumn, } from './TimePanelColumn';
3
- export { TimePanelProps, default, } from './TimePanel';
1
+ export { TimePanelActionProps, default as TimePanelAction, } from './TimePanelAction';
2
+ export { TimePanelColumnProps, default as TimePanelColumn, } from './TimePanelColumn';
3
+ export { TimePanelProps, default, } from './TimePanel';
@@ -1,24 +1,24 @@
1
- /// <reference types="react" />
2
- import { DateType } from '@mezzanine-ui/core/calendar';
3
- import { PickerTriggerProps } from '../Picker';
4
- import { TimePickerPanelProps } from './TimePickerPanel';
5
- export interface TimePickerProps extends Omit<TimePickerPanelProps, 'onConfirm'>, Omit<PickerTriggerProps, 'anchor' | 'defaultValue' | 'inputRef' | 'onChange' | 'onClear' | 'onClick' | 'onIconClick' | 'onKeyDown' | 'open' | 'suffixActionIcon' | 'value'> {
6
- /**
7
- * Default value for time picker.
8
- */
9
- defaultValue?: DateType;
10
- /**
11
- * The format for displaying time.
12
- */
13
- format?: string;
14
- /**
15
- * A function that fires when panel toggled. Receive open status in boolean format as props.
16
- */
17
- onPanelToggle?: (open: boolean) => void;
18
- }
19
- /**
20
- * The react component for `mezzanine` time picker.
21
- * Notice that any component related to time-picker should be used along with `CalendarContext`.
22
- */
23
- declare const TimePicker: import("react").ForwardRefExoticComponent<TimePickerProps & import("react").RefAttributes<HTMLDivElement>>;
24
- export default TimePicker;
1
+ /// <reference types="react" />
2
+ import { DateType } from '@mezzanine-ui/core/calendar';
3
+ import { PickerTriggerProps } from '../Picker';
4
+ import { TimePickerPanelProps } from './TimePickerPanel';
5
+ export interface TimePickerProps extends Omit<TimePickerPanelProps, 'onConfirm'>, Omit<PickerTriggerProps, 'anchor' | 'defaultValue' | 'inputRef' | 'onChange' | 'onClear' | 'onClick' | 'onIconClick' | 'onKeyDown' | 'open' | 'suffixActionIcon' | 'value'> {
6
+ /**
7
+ * Default value for time picker.
8
+ */
9
+ defaultValue?: DateType;
10
+ /**
11
+ * The format for displaying time.
12
+ */
13
+ format?: string;
14
+ /**
15
+ * A function that fires when panel toggled. Receive open status in boolean format as props.
16
+ */
17
+ onPanelToggle?: (open: boolean) => void;
18
+ }
19
+ /**
20
+ * The react component for `mezzanine` time picker.
21
+ * Notice that any component related to time-picker should be used along with `CalendarContext`.
22
+ */
23
+ declare const TimePicker: import("react").ForwardRefExoticComponent<TimePickerProps & import("react").RefAttributes<HTMLDivElement>>;
24
+ export default TimePicker;
@@ -10,105 +10,105 @@ import Icon from '../Icon/Icon.js';
10
10
  import PickerTrigger from '../Picker/PickerTrigger.js';
11
11
  import { FormControlContext } from '../Form/FormControlContext.js';
12
12
 
13
- /**
14
- * The react component for `mezzanine` time picker.
15
- * Notice that any component related to time-picker should be used along with `CalendarContext`.
16
- */
17
- const TimePicker = forwardRef(function TimePicker(props, ref) {
18
- const { disabled: disabledFromFormControl, fullWidth: fullWidthFromFormControl, required: requiredFromFormControl, severity, } = useContext(FormControlContext) || {};
19
- const { defaultTimeFormat, } = useCalendarContext();
20
- const { className, clearable = true, confirmText, defaultValue, disabled = disabledFromFormControl, error = severity === 'error' || false, format = defaultTimeFormat, fullWidth = fullWidthFromFormControl, hideHour, hideMinute, hideSecond, hourPrefix, hourStep, inputProps, minutePrefix, minuteStep, onChange: onChangeProp, onPanelToggle: onPanelToggleProp, placeholder, popperProps, prefix, readOnly, required = requiredFromFormControl, secondPrefix, secondStep, size: sizeProp, value: valueProp, } = props;
21
- const { onBlur: onBlurProp, onKeyDown: onKeyDownProp, onFocus: onFocusProp, size: inputSize = format.length + 2, ...restInputProp } = inputProps || {};
22
- const formats = useMemo(() => [format], [format]);
23
- /** Panel open control */
24
- const [open, setOpen] = useState(false);
25
- const preventOpen = readOnly;
26
- const onPanelToggle = useCallback((nextOpen) => {
27
- if (!preventOpen) {
28
- setOpen(nextOpen);
29
- if (onPanelToggleProp) {
30
- onPanelToggleProp(nextOpen);
31
- }
32
- }
33
- }, [onPanelToggleProp, preventOpen]);
34
- const onFocus = useCallback((event) => {
35
- if (onFocusProp) {
36
- onFocusProp(event);
37
- }
38
- onPanelToggle(true);
39
- }, [onFocusProp, onPanelToggle]);
40
- /** Controlling input value and bind change handler */
41
- const inputRef = useRef(null);
42
- const { inputValue, onBlur, onChange, onInputChange, onKeyDown, value: internalValue, } = usePickerValue({
43
- defaultValue,
44
- format,
45
- formats,
46
- inputRef,
47
- value: valueProp,
48
- });
49
- /** Panel confirm handler */
50
- const onConfirm = useCallback(() => {
51
- if (onChangeProp) {
52
- onChangeProp(internalValue);
53
- }
54
- onPanelToggle(false);
55
- }, [internalValue, onChangeProp, onPanelToggle]);
56
- /** Bind input props */
57
- const onResolvedKeyDown = useCallback((event) => {
58
- if (onKeyDownProp) {
59
- onKeyDownProp(event);
60
- }
61
- onKeyDown(event);
62
- if (event.key === 'Enter') {
63
- onConfirm();
64
- }
65
- }, [onConfirm, onKeyDown, onKeyDownProp]);
66
- const onResolvedBlur = useCallback((event) => {
67
- if (onBlurProp) {
68
- onBlurProp(event);
69
- }
70
- onBlur(event);
71
- }, [onBlur, onBlurProp]);
72
- const resolvedInputProps = {
73
- ...restInputProp,
74
- size: inputSize,
75
- onFocus,
76
- onKeyDown: onResolvedKeyDown,
77
- onBlur: onResolvedBlur,
78
- };
79
- /** Popper positioning */
80
- const anchorRef = useRef(null);
81
- const panelRef = useRef(null);
82
- const triggerComposedRef = useComposeRefs([anchorRef, ref]);
83
- /** Blur, click away and key down close */
84
- const onClose = () => {
85
- onChange(valueProp);
86
- onPanelToggle(false);
87
- };
88
- usePickerDocumentEventClose({
89
- open,
90
- anchorRef,
91
- popperRef: panelRef,
92
- lastElementRefInFlow: inputRef,
93
- onClose,
94
- onChangeClose: onClose,
95
- });
96
- /** Bind on change to on clear */
97
- const onClear = () => {
98
- onChange(undefined);
99
- onChangeProp === null || onChangeProp === void 0 ? void 0 : onChangeProp(undefined);
100
- };
101
- /** Icon */
102
- const onIconClick = (e) => {
103
- e.stopPropagation();
104
- if (open) {
105
- onChange(valueProp);
106
- }
107
- onPanelToggle(!open);
108
- };
109
- const suffixActionIcon = (jsx(Icon, { icon: ClockIcon, onClick: onIconClick }));
110
- return (jsxs(Fragment, { children: [jsx(PickerTrigger, { ref: triggerComposedRef, className: className, clearable: clearable, disabled: disabled, error: error, fullWidth: fullWidth, inputProps: resolvedInputProps, inputRef: inputRef, onChange: onInputChange, onClear: onClear, placeholder: placeholder, prefix: prefix, readOnly: readOnly, required: required, size: sizeProp, suffixActionIcon: suffixActionIcon, value: inputValue }), jsx(TimePickerPanel, { ref: panelRef, anchor: anchorRef, confirmText: confirmText, hideHour: hideHour, hideMinute: hideMinute, hideSecond: hideSecond, hourPrefix: hourPrefix, hourStep: hourStep, minutePrefix: minutePrefix, minuteStep: minuteStep, onChange: onChange, onConfirm: onConfirm, open: open, popperProps: popperProps, secondPrefix: secondPrefix, secondStep: secondStep, value: internalValue })] }));
111
- });
13
+ /**
14
+ * The react component for `mezzanine` time picker.
15
+ * Notice that any component related to time-picker should be used along with `CalendarContext`.
16
+ */
17
+ const TimePicker = forwardRef(function TimePicker(props, ref) {
18
+ const { disabled: disabledFromFormControl, fullWidth: fullWidthFromFormControl, required: requiredFromFormControl, severity, } = useContext(FormControlContext) || {};
19
+ const { defaultTimeFormat, } = useCalendarContext();
20
+ const { className, clearable = true, confirmText, defaultValue, disabled = disabledFromFormControl, error = severity === 'error' || false, format = defaultTimeFormat, fullWidth = fullWidthFromFormControl, hideHour, hideMinute, hideSecond, hourPrefix, hourStep, inputProps, minutePrefix, minuteStep, onChange: onChangeProp, onPanelToggle: onPanelToggleProp, placeholder, popperProps, prefix, readOnly, required = requiredFromFormControl, secondPrefix, secondStep, size: sizeProp, value: valueProp, } = props;
21
+ const { onBlur: onBlurProp, onKeyDown: onKeyDownProp, onFocus: onFocusProp, size: inputSize = format.length + 2, ...restInputProp } = inputProps || {};
22
+ const formats = useMemo(() => [format], [format]);
23
+ /** Panel open control */
24
+ const [open, setOpen] = useState(false);
25
+ const preventOpen = readOnly;
26
+ const onPanelToggle = useCallback((nextOpen) => {
27
+ if (!preventOpen) {
28
+ setOpen(nextOpen);
29
+ if (onPanelToggleProp) {
30
+ onPanelToggleProp(nextOpen);
31
+ }
32
+ }
33
+ }, [onPanelToggleProp, preventOpen]);
34
+ const onFocus = useCallback((event) => {
35
+ if (onFocusProp) {
36
+ onFocusProp(event);
37
+ }
38
+ onPanelToggle(true);
39
+ }, [onFocusProp, onPanelToggle]);
40
+ /** Controlling input value and bind change handler */
41
+ const inputRef = useRef(null);
42
+ const { inputValue, onBlur, onChange, onInputChange, onKeyDown, value: internalValue, } = usePickerValue({
43
+ defaultValue,
44
+ format,
45
+ formats,
46
+ inputRef,
47
+ value: valueProp,
48
+ });
49
+ /** Panel confirm handler */
50
+ const onConfirm = useCallback(() => {
51
+ if (onChangeProp) {
52
+ onChangeProp(internalValue);
53
+ }
54
+ onPanelToggle(false);
55
+ }, [internalValue, onChangeProp, onPanelToggle]);
56
+ /** Bind input props */
57
+ const onResolvedKeyDown = useCallback((event) => {
58
+ if (onKeyDownProp) {
59
+ onKeyDownProp(event);
60
+ }
61
+ onKeyDown(event);
62
+ if (event.key === 'Enter') {
63
+ onConfirm();
64
+ }
65
+ }, [onConfirm, onKeyDown, onKeyDownProp]);
66
+ const onResolvedBlur = useCallback((event) => {
67
+ if (onBlurProp) {
68
+ onBlurProp(event);
69
+ }
70
+ onBlur(event);
71
+ }, [onBlur, onBlurProp]);
72
+ const resolvedInputProps = {
73
+ ...restInputProp,
74
+ size: inputSize,
75
+ onFocus,
76
+ onKeyDown: onResolvedKeyDown,
77
+ onBlur: onResolvedBlur,
78
+ };
79
+ /** Popper positioning */
80
+ const anchorRef = useRef(null);
81
+ const panelRef = useRef(null);
82
+ const triggerComposedRef = useComposeRefs([anchorRef, ref]);
83
+ /** Blur, click away and key down close */
84
+ const onClose = () => {
85
+ onChange(valueProp);
86
+ onPanelToggle(false);
87
+ };
88
+ usePickerDocumentEventClose({
89
+ open,
90
+ anchorRef,
91
+ popperRef: panelRef,
92
+ lastElementRefInFlow: inputRef,
93
+ onClose,
94
+ onChangeClose: onClose,
95
+ });
96
+ /** Bind on change to on clear */
97
+ const onClear = () => {
98
+ onChange(undefined);
99
+ onChangeProp === null || onChangeProp === void 0 ? void 0 : onChangeProp(undefined);
100
+ };
101
+ /** Icon */
102
+ const onIconClick = (e) => {
103
+ e.stopPropagation();
104
+ if (open) {
105
+ onChange(valueProp);
106
+ }
107
+ onPanelToggle(!open);
108
+ };
109
+ const suffixActionIcon = (jsx(Icon, { icon: ClockIcon, onClick: onIconClick }));
110
+ return (jsxs(Fragment, { children: [jsx(PickerTrigger, { ref: triggerComposedRef, className: className, clearable: clearable, disabled: disabled, error: error, fullWidth: fullWidth, inputProps: resolvedInputProps, inputRef: inputRef, onChange: onInputChange, onClear: onClear, placeholder: placeholder, prefix: prefix, readOnly: readOnly, required: required, size: sizeProp, suffixActionIcon: suffixActionIcon, value: inputValue }), jsx(TimePickerPanel, { ref: panelRef, anchor: anchorRef, confirmText: confirmText, hideHour: hideHour, hideMinute: hideMinute, hideSecond: hideSecond, hourPrefix: hourPrefix, hourStep: hourStep, minutePrefix: minutePrefix, minuteStep: minuteStep, onChange: onChange, onConfirm: onConfirm, open: open, popperProps: popperProps, secondPrefix: secondPrefix, secondStep: secondStep, value: internalValue })] }));
111
+ });
112
112
  var TimePicker$1 = TimePicker;
113
113
 
114
114
  export { TimePicker$1 as default };
@@ -1,24 +1,24 @@
1
- /// <reference types="react" />
2
- import { DateType } from '@mezzanine-ui/core/calendar';
3
- import { TimePanelProps } from '../TimePanel';
4
- import { NativeElementPropsWithoutKeyAndRef } from '../utils/jsx-types';
5
- import { InputTriggerPopperProps } from '../_internal/InputTriggerPopper';
6
- export interface TimePickerPanelProps extends Omit<TimePanelProps, Exclude<keyof NativeElementPropsWithoutKeyAndRef<'div'>, 'className' | 'style' | 'id'> | 'withoutAction' | 'onChange' | 'value'>, Pick<InputTriggerPopperProps, 'anchor' | 'fadeProps' | 'open'> {
7
- /**
8
- * Change Handler. Receive `DateType` as props.
9
- */
10
- onChange?: (value?: DateType) => void;
11
- /**
12
- * Other props you may provide to `Popper` component
13
- */
14
- popperProps?: Omit<InputTriggerPopperProps, 'anchor' | 'children' | 'fadeProps' | 'open'>;
15
- /**
16
- * Display value of the panel.
17
- */
18
- value?: DateType;
19
- }
20
- /**
21
- * The react component for `mezzanine` time picker panel.
22
- */
23
- declare const TimePickerPanel: import("react").ForwardRefExoticComponent<TimePickerPanelProps & import("react").RefAttributes<HTMLDivElement>>;
24
- export default TimePickerPanel;
1
+ /// <reference types="react" />
2
+ import { DateType } from '@mezzanine-ui/core/calendar';
3
+ import { TimePanelProps } from '../TimePanel';
4
+ import { NativeElementPropsWithoutKeyAndRef } from '../utils/jsx-types';
5
+ import { InputTriggerPopperProps } from '../_internal/InputTriggerPopper';
6
+ export interface TimePickerPanelProps extends Omit<TimePanelProps, Exclude<keyof NativeElementPropsWithoutKeyAndRef<'div'>, 'className' | 'style' | 'id'> | 'withoutAction' | 'onChange' | 'value'>, Pick<InputTriggerPopperProps, 'anchor' | 'fadeProps' | 'open'> {
7
+ /**
8
+ * Change Handler. Receive `DateType` as props.
9
+ */
10
+ onChange?: (value?: DateType) => void;
11
+ /**
12
+ * Other props you may provide to `Popper` component
13
+ */
14
+ popperProps?: Omit<InputTriggerPopperProps, 'anchor' | 'children' | 'fadeProps' | 'open'>;
15
+ /**
16
+ * Display value of the panel.
17
+ */
18
+ value?: DateType;
19
+ }
20
+ /**
21
+ * The react component for `mezzanine` time picker panel.
22
+ */
23
+ declare const TimePickerPanel: import("react").ForwardRefExoticComponent<TimePickerPanelProps & import("react").RefAttributes<HTMLDivElement>>;
24
+ export default TimePickerPanel;
@@ -3,13 +3,13 @@ import { forwardRef } from 'react';
3
3
  import InputTriggerPopper from '../_internal/InputTriggerPopper/InputTriggerPopper.js';
4
4
  import TimePanel from '../TimePanel/TimePanel.js';
5
5
 
6
- /**
7
- * The react component for `mezzanine` time picker panel.
8
- */
9
- const TimePickerPanel = forwardRef(function TimePickerPanel(props, ref) {
10
- const { anchor, confirmText, fadeProps, hideHour, hideMinute, hideSecond, hourPrefix, hourStep, minutePrefix, minuteStep, onChange, onConfirm, open, popperProps, secondPrefix, secondStep, value, ...restHostProps } = props;
11
- return (jsx(InputTriggerPopper, { ...popperProps, ref: ref, anchor: anchor, open: open, fadeProps: fadeProps, children: jsx(TimePanel, { ...restHostProps, hideHour: hideHour, hourStep: hourStep, hideMinute: hideMinute, minuteStep: minuteStep, hideSecond: hideSecond, secondStep: secondStep, hourPrefix: hourPrefix, minutePrefix: minutePrefix, secondPrefix: secondPrefix, onChange: onChange, value: value, onConfirm: onConfirm, confirmText: confirmText }) }));
12
- });
6
+ /**
7
+ * The react component for `mezzanine` time picker panel.
8
+ */
9
+ const TimePickerPanel = forwardRef(function TimePickerPanel(props, ref) {
10
+ const { anchor, confirmText, fadeProps, hideHour, hideMinute, hideSecond, hourPrefix, hourStep, minutePrefix, minuteStep, onChange, onConfirm, open, popperProps, secondPrefix, secondStep, value, ...restHostProps } = props;
11
+ return (jsx(InputTriggerPopper, { ...popperProps, ref: ref, anchor: anchor, open: open, fadeProps: fadeProps, children: jsx(TimePanel, { ...restHostProps, hideHour: hideHour, hourStep: hourStep, hideMinute: hideMinute, minuteStep: minuteStep, hideSecond: hideSecond, secondStep: secondStep, hourPrefix: hourPrefix, minutePrefix: minutePrefix, secondPrefix: secondPrefix, onChange: onChange, value: value, onConfirm: onConfirm, confirmText: confirmText }) }));
12
+ });
13
13
  var TimePickerPanel$1 = TimePickerPanel;
14
14
 
15
15
  export { TimePickerPanel$1 as default };
@@ -1,2 +1,2 @@
1
- export { TimePickerPanelProps, default as TimePickerPanel, } from './TimePickerPanel';
2
- export { TimePickerProps, default, } from './TimePicker';
1
+ export { TimePickerPanelProps, default as TimePickerPanel, } from './TimePickerPanel';
2
+ export { TimePickerProps, default, } from './TimePicker';
@@ -1,25 +1,25 @@
1
- import { ReactElement, MouseEventHandler } from 'react';
2
- import { PopperProps } from '../Popper';
3
- export interface TooltipProps extends Omit<PopperProps, 'children'> {
4
- /**
5
- * child function that can receive events
6
- */
7
- children(opt: {
8
- onMouseEnter: MouseEventHandler;
9
- onMouseLeave: MouseEventHandler;
10
- }): ReactElement;
11
- /**
12
- * delay time to hide when mouse leave. unit: s.
13
- * @default 0.1
14
- */
15
- mouseLeaveDelay?: number;
16
- /**
17
- * title of tooltip
18
- */
19
- title?: string;
20
- }
21
- /**
22
- * The react component for `mezzanine` tooltip.
23
- */
24
- declare const Tooltip: import("react").ForwardRefExoticComponent<TooltipProps & import("react").RefAttributes<HTMLDivElement>>;
25
- export default Tooltip;
1
+ import { ReactElement, MouseEventHandler } from 'react';
2
+ import { PopperProps } from '../Popper';
3
+ export interface TooltipProps extends Omit<PopperProps, 'children'> {
4
+ /**
5
+ * child function that can receive events
6
+ */
7
+ children(opt: {
8
+ onMouseEnter: MouseEventHandler;
9
+ onMouseLeave: MouseEventHandler;
10
+ }): ReactElement;
11
+ /**
12
+ * delay time to hide when mouse leave. unit: s.
13
+ * @default 0.1
14
+ */
15
+ mouseLeaveDelay?: number;
16
+ /**
17
+ * title of tooltip
18
+ */
19
+ title?: string;
20
+ }
21
+ /**
22
+ * The react component for `mezzanine` tooltip.
23
+ */
24
+ declare const Tooltip: import("react").ForwardRefExoticComponent<TooltipProps & import("react").RefAttributes<HTMLDivElement>>;
25
+ export default Tooltip;
@@ -6,33 +6,33 @@ import { useDelayMouseEnterLeave } from './useDelayMouseEnterLeave.js';
6
6
  import Popper from '../Popper/Popper.js';
7
7
  import cx from 'clsx';
8
8
 
9
- const offsetModifier = {
10
- name: 'offset',
11
- options: {
12
- offset: [0, 8],
13
- },
14
- };
15
- /**
16
- * The react component for `mezzanine` tooltip.
17
- */
18
- const Tooltip = forwardRef(function Tooltip(props, ref) {
19
- const { anchor: anchorProp, children, className, mouseLeaveDelay = 0.1, open = false, options = {}, title, ...rest } = props;
20
- const { modifiers = [] } = options;
21
- const tooltipRef = useRef(null);
22
- const composedRef = useComposeRefs([ref, tooltipRef]);
23
- const { anchor, onLeave, onPopperEnter, onTargetEnter, visible, } = useDelayMouseEnterLeave({
24
- mouseLeaveDelay,
25
- });
26
- /** tooltip shown only when title existed && visible is true */
27
- const isTooltipVisible = open || (visible && Boolean(title));
28
- return (jsxs(Fragment, { children: [jsx(Popper, { ...rest, ref: composedRef, anchor: anchorProp || anchor, className: cx(tooltipClasses.host, className), onMouseEnter: onPopperEnter, onMouseLeave: onLeave, open: isTooltipVisible, options: {
29
- ...options,
30
- modifiers: [...modifiers, offsetModifier],
31
- }, children: title }), typeof children === 'function' && children({
32
- onMouseEnter: onTargetEnter,
33
- onMouseLeave: onLeave,
34
- })] }));
35
- });
9
+ const offsetModifier = {
10
+ name: 'offset',
11
+ options: {
12
+ offset: [0, 8],
13
+ },
14
+ };
15
+ /**
16
+ * The react component for `mezzanine` tooltip.
17
+ */
18
+ const Tooltip = forwardRef(function Tooltip(props, ref) {
19
+ const { anchor: anchorProp, children, className, mouseLeaveDelay = 0.1, open = false, options = {}, title, ...rest } = props;
20
+ const { modifiers = [] } = options;
21
+ const tooltipRef = useRef(null);
22
+ const composedRef = useComposeRefs([ref, tooltipRef]);
23
+ const { anchor, onLeave, onPopperEnter, onTargetEnter, visible, } = useDelayMouseEnterLeave({
24
+ mouseLeaveDelay,
25
+ });
26
+ /** tooltip shown only when title existed && visible is true */
27
+ const isTooltipVisible = open || (visible && Boolean(title));
28
+ return (jsxs(Fragment, { children: [jsx(Popper, { ...rest, ref: composedRef, anchor: anchorProp || anchor, className: cx(tooltipClasses.host, className), onMouseEnter: onPopperEnter, onMouseLeave: onLeave, open: isTooltipVisible, options: {
29
+ ...options,
30
+ modifiers: [...modifiers, offsetModifier],
31
+ }, children: title }), typeof children === 'function' && children({
32
+ onMouseEnter: onTargetEnter,
33
+ onMouseLeave: onLeave,
34
+ })] }));
35
+ });
36
36
  var Tooltip$1 = Tooltip;
37
37
 
38
38
  export { Tooltip$1 as default };
@@ -1 +1 @@
1
- export { default, TooltipProps, } from './Tooltip';
1
+ export { default, TooltipProps, } from './Tooltip';
@@ -1,12 +1,12 @@
1
- /// <reference types="react" />
2
- export interface UseDelayMouseEnterLeave {
3
- mouseLeaveDelay?: number;
4
- }
5
- export interface DelayMouseEnterLeave {
6
- anchor: HTMLButtonElement | null;
7
- onLeave(v: any): void;
8
- onPopperEnter(v: any): void;
9
- onTargetEnter(v: React.MouseEvent<HTMLButtonElement, MouseEvent>): void;
10
- visible: boolean;
11
- }
12
- export declare function useDelayMouseEnterLeave(opt: UseDelayMouseEnterLeave): DelayMouseEnterLeave;
1
+ /// <reference types="react" />
2
+ export interface UseDelayMouseEnterLeave {
3
+ mouseLeaveDelay?: number;
4
+ }
5
+ export interface DelayMouseEnterLeave {
6
+ anchor: HTMLButtonElement | null;
7
+ onLeave(v: any): void;
8
+ onPopperEnter(v: any): void;
9
+ onTargetEnter(v: React.MouseEvent<HTMLButtonElement, MouseEvent>): void;
10
+ visible: boolean;
11
+ }
12
+ export declare function useDelayMouseEnterLeave(opt: UseDelayMouseEnterLeave): DelayMouseEnterLeave;
@@ -1,41 +1,41 @@
1
1
  import { useState, useCallback } from 'react';
2
2
 
3
- function useDelayMouseEnterLeave(opt) {
4
- const { mouseLeaveDelay = 0.1, } = opt || {};
5
- /** state that control tooltip visible/invisible */
6
- const [visible, setVisible] = useState(false);
7
- /** tooltip reference anchor */
8
- const [anchor, setAnchor] = useState(null);
9
- /** timer for mouse leaving delay */
10
- let timer;
11
- const clearVisibilityDelayTimeout = useCallback(() => {
12
- if (timer) {
13
- clearTimeout(timer);
14
- }
15
- }, []);
16
- const onLeave = useCallback(() => {
17
- timer = setTimeout(() => {
18
- setVisible(false);
19
- clearVisibilityDelayTimeout();
20
- }, mouseLeaveDelay * 1000);
21
- }, [mouseLeaveDelay]);
22
- const onPopperEnter = useCallback(() => {
23
- clearVisibilityDelayTimeout();
24
- setVisible(true);
25
- }, []);
26
- const onTargetEnter = useCallback((event) => {
27
- event.stopPropagation();
28
- setAnchor(event.currentTarget);
29
- clearVisibilityDelayTimeout();
30
- setVisible(true);
31
- }, []);
32
- return {
33
- anchor,
34
- onLeave,
35
- onPopperEnter,
36
- onTargetEnter,
37
- visible,
38
- };
3
+ function useDelayMouseEnterLeave(opt) {
4
+ const { mouseLeaveDelay = 0.1, } = opt || {};
5
+ /** state that control tooltip visible/invisible */
6
+ const [visible, setVisible] = useState(false);
7
+ /** tooltip reference anchor */
8
+ const [anchor, setAnchor] = useState(null);
9
+ /** timer for mouse leaving delay */
10
+ let timer;
11
+ const clearVisibilityDelayTimeout = useCallback(() => {
12
+ if (timer) {
13
+ clearTimeout(timer);
14
+ }
15
+ }, []);
16
+ const onLeave = useCallback(() => {
17
+ timer = setTimeout(() => {
18
+ setVisible(false);
19
+ clearVisibilityDelayTimeout();
20
+ }, mouseLeaveDelay * 1000);
21
+ }, [mouseLeaveDelay]);
22
+ const onPopperEnter = useCallback(() => {
23
+ clearVisibilityDelayTimeout();
24
+ setVisible(true);
25
+ }, []);
26
+ const onTargetEnter = useCallback((event) => {
27
+ event.stopPropagation();
28
+ setAnchor(event.currentTarget);
29
+ clearVisibilityDelayTimeout();
30
+ setVisible(true);
31
+ }, []);
32
+ return {
33
+ anchor,
34
+ onLeave,
35
+ onPopperEnter,
36
+ onTargetEnter,
37
+ visible,
38
+ };
39
39
  }
40
40
 
41
41
  export { useDelayMouseEnterLeave };