@mezzanine-ui/react 0.13.9 → 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 (457) 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/typings.d.ts +44 -44
  34. package/Calendar/Calendar.d.ts +69 -69
  35. package/Calendar/Calendar.js +38 -38
  36. package/Calendar/CalendarCell.d.ts +22 -21
  37. package/Calendar/CalendarCell.js +11 -11
  38. package/Calendar/CalendarContext.d.ts +22 -22
  39. package/Calendar/CalendarContext.js +28 -28
  40. package/Calendar/CalendarControls.d.ts +26 -25
  41. package/Calendar/CalendarControls.js +11 -11
  42. package/Calendar/CalendarDayOfWeek.d.ts +15 -14
  43. package/Calendar/CalendarDayOfWeek.js +9 -9
  44. package/Calendar/CalendarDays.d.ts +38 -37
  45. package/Calendar/CalendarDays.js +36 -36
  46. package/Calendar/CalendarMonths.d.ts +42 -41
  47. package/Calendar/CalendarMonths.js +22 -22
  48. package/Calendar/CalendarWeeks.d.ts +41 -40
  49. package/Calendar/CalendarWeeks.js +42 -42
  50. package/Calendar/CalendarYears.d.ts +40 -39
  51. package/Calendar/CalendarYears.js +25 -25
  52. package/Calendar/index.d.ts +12 -12
  53. package/Calendar/useCalendarControlModifiers.d.ts +7 -7
  54. package/Calendar/useCalendarControlModifiers.js +20 -20
  55. package/Calendar/useCalendarControls.d.ts +12 -12
  56. package/Calendar/useCalendarControls.js +27 -27
  57. package/Calendar/useCalendarModeStack.d.ts +6 -6
  58. package/Calendar/useCalendarModeStack.js +10 -10
  59. package/Card/Card.d.ts +51 -51
  60. package/Card/Card.js +12 -12
  61. package/Card/CardActions.d.ts +34 -34
  62. package/Card/CardActions.js +7 -7
  63. package/Card/index.d.ts +2 -2
  64. package/Checkbox/CheckAll.d.ts +13 -13
  65. package/Checkbox/CheckAll.js +28 -28
  66. package/Checkbox/Checkbox.d.ts +46 -46
  67. package/Checkbox/Checkbox.js +23 -23
  68. package/Checkbox/CheckboxGroup.d.ts +47 -47
  69. package/Checkbox/CheckboxGroup.js +27 -27
  70. package/Checkbox/CheckboxGroupContext.d.ts +9 -9
  71. package/Checkbox/index.d.ts +4 -4
  72. package/ConfirmActions/ConfirmActions.d.ts +45 -45
  73. package/ConfirmActions/ConfirmActions.js +8 -8
  74. package/ConfirmActions/index.d.ts +1 -1
  75. package/DatePicker/DatePicker.d.ts +32 -32
  76. package/DatePicker/DatePicker.js +119 -119
  77. package/DatePicker/DatePickerCalendar.d.ts +32 -32
  78. package/DatePicker/DatePickerCalendar.js +52 -52
  79. package/DatePicker/index.d.ts +2 -2
  80. package/DateRangePicker/DateRangePicker.d.ts +38 -38
  81. package/DateRangePicker/DateRangePicker.js +173 -173
  82. package/DateRangePicker/DateRangePickerCalendar.d.ts +26 -26
  83. package/DateRangePicker/DateRangePickerCalendar.js +86 -86
  84. package/DateRangePicker/index.d.ts +4 -4
  85. package/DateRangePicker/useDateRangeCalendarControls.d.ts +14 -14
  86. package/DateRangePicker/useDateRangeCalendarControls.js +84 -84
  87. package/DateRangePicker/useDateRangePickerValue.d.ts +23 -23
  88. package/DateRangePicker/useDateRangePickerValue.js +81 -81
  89. package/DateTimePicker/DateTimePicker.d.ts +28 -28
  90. package/DateTimePicker/DateTimePicker.js +107 -107
  91. package/DateTimePicker/DateTimePickerPanel.d.ts +29 -29
  92. package/DateTimePicker/DateTimePickerPanel.js +36 -36
  93. package/DateTimePicker/index.d.ts +2 -2
  94. package/Drawer/Drawer.d.ts +13 -13
  95. package/Drawer/Drawer.js +10 -10
  96. package/Drawer/index.d.ts +2 -2
  97. package/Dropdown/Dropdown.d.ts +25 -25
  98. package/Dropdown/Dropdown.js +52 -52
  99. package/Dropdown/index.d.ts +1 -1
  100. package/Empty/Empty.d.ts +18 -18
  101. package/Empty/Empty.js +6 -6
  102. package/Empty/index.d.ts +1 -1
  103. package/Form/FormControlContext.d.ts +9 -9
  104. package/Form/FormField.d.ts +27 -27
  105. package/Form/FormField.js +16 -16
  106. package/Form/FormLabel.d.ts +11 -11
  107. package/Form/FormLabel.js +8 -8
  108. package/Form/FormMessage.d.ts +8 -8
  109. package/Form/FormMessage.js +9 -9
  110. package/Form/index.d.ts +5 -5
  111. package/Form/typings.d.ts +4 -4
  112. package/Form/useAutoCompleteValueControl.d.ts +42 -42
  113. package/Form/useAutoCompleteValueControl.js +94 -94
  114. package/Form/useCheckboxControlValue.d.ts +11 -11
  115. package/Form/useCheckboxControlValue.js +24 -24
  116. package/Form/useControlValueState.d.ts +7 -7
  117. package/Form/useControlValueState.js +10 -10
  118. package/Form/useCustomControlValue.d.ts +5 -5
  119. package/Form/useCustomControlValue.js +12 -12
  120. package/Form/useInputControlValue.d.ts +7 -7
  121. package/Form/useInputControlValue.js +18 -18
  122. package/Form/useInputWithClearControlValue.d.ts +6 -6
  123. package/Form/useInputWithClearControlValue.js +28 -28
  124. package/Form/useInputWithTagsModeValue.d.ts +37 -37
  125. package/Form/useInputWithTagsModeValue.js +83 -83
  126. package/Form/useRadioControlValue.d.ts +11 -11
  127. package/Form/useRadioControlValue.js +19 -19
  128. package/Form/useSelectValueControl.d.ts +33 -33
  129. package/Form/useSelectValueControl.js +71 -71
  130. package/Form/useSwitchControlValue.d.ts +7 -7
  131. package/Form/useSwitchControlValue.js +18 -18
  132. package/Icon/Icon.d.ts +32 -32
  133. package/Icon/Icon.js +18 -18
  134. package/Icon/index.d.ts +3 -3
  135. package/Input/Input.d.ts +78 -78
  136. package/Input/Input.js +34 -34
  137. package/Input/index.d.ts +2 -2
  138. package/Loading/Loading.d.ts +34 -34
  139. package/Loading/Loading.js +19 -19
  140. package/Loading/index.d.ts +1 -1
  141. package/Menu/Menu.d.ts +29 -29
  142. package/Menu/Menu.js +16 -16
  143. package/Menu/MenuDivider.d.ts +8 -8
  144. package/Menu/MenuDivider.js +7 -7
  145. package/Menu/MenuItem.d.ts +24 -24
  146. package/Menu/MenuItem.js +16 -16
  147. package/Menu/MenuItemGroup.d.ts +13 -13
  148. package/Menu/MenuItemGroup.js +7 -7
  149. package/Menu/index.d.ts +5 -5
  150. package/Message/Message.d.ts +36 -36
  151. package/Message/Message.js +63 -63
  152. package/Message/index.d.ts +2 -2
  153. package/Modal/Modal.d.ts +37 -37
  154. package/Modal/Modal.js +15 -15
  155. package/Modal/ModalActions.d.ts +10 -10
  156. package/Modal/ModalActions.js +10 -10
  157. package/Modal/ModalBody.d.ts +8 -8
  158. package/Modal/ModalBody.js +7 -7
  159. package/Modal/ModalControl.d.ts +7 -7
  160. package/Modal/ModalControl.js +3 -3
  161. package/Modal/ModalFooter.d.ts +8 -8
  162. package/Modal/ModalFooter.js +7 -7
  163. package/Modal/ModalHeader.d.ts +20 -20
  164. package/Modal/ModalHeader.js +10 -10
  165. package/Modal/index.d.ts +7 -7
  166. package/Modal/useModalContainer.d.ts +6 -6
  167. package/Modal/useModalContainer.js +19 -19
  168. package/Navigation/Navigation.d.ts +29 -29
  169. package/Navigation/Navigation.js +45 -45
  170. package/Navigation/NavigationContext.d.ts +6 -6
  171. package/Navigation/NavigationContext.js +2 -2
  172. package/Navigation/NavigationItem.d.ts +31 -31
  173. package/Navigation/NavigationItem.js +13 -13
  174. package/Navigation/NavigationSubMenu.d.ts +22 -22
  175. package/Navigation/NavigationSubMenu.js +48 -48
  176. package/Navigation/index.d.ts +4 -4
  177. package/Notification/Notification.d.ts +54 -54
  178. package/Notification/Notification.js +60 -60
  179. package/Notification/index.d.ts +2 -2
  180. package/Notifier/NotifierManager.d.ts +17 -17
  181. package/Notifier/NotifierManager.js +25 -25
  182. package/Notifier/createNotifier.d.ts +21 -21
  183. package/Notifier/createNotifier.js +65 -65
  184. package/Notifier/index.d.ts +2 -2
  185. package/Notifier/typings.d.ts +28 -28
  186. package/Overlay/Overlay.d.ts +43 -43
  187. package/Overlay/Overlay.js +22 -22
  188. package/Overlay/index.d.ts +1 -1
  189. package/PageFooter/PageFooter.d.ts +15 -15
  190. package/PageFooter/PageFooter.js +4 -4
  191. package/PageFooter/index.d.ts +1 -1
  192. package/Pagination/Pagination.d.ts +105 -105
  193. package/Pagination/Pagination.js +18 -18
  194. package/Pagination/PaginationItem.d.ts +27 -27
  195. package/Pagination/PaginationItem.js +16 -16
  196. package/Pagination/PaginationJumper.d.ts +38 -38
  197. package/Pagination/PaginationJumper.js +40 -40
  198. package/Pagination/PaginationPageSize.d.ts +38 -38
  199. package/Pagination/PaginationPageSize.js +8 -8
  200. package/Pagination/index.d.ts +6 -6
  201. package/Pagination/usePagination.d.ts +16 -16
  202. package/Pagination/usePagination.js +73 -73
  203. package/Picker/PickerTrigger.d.ts +40 -40
  204. package/Picker/PickerTrigger.js +7 -7
  205. package/Picker/RangePickerTrigger.d.ts +64 -64
  206. package/Picker/RangePickerTrigger.js +7 -7
  207. package/Picker/index.d.ts +7 -7
  208. package/Picker/usePickerDocumentEventClose.d.ts +10 -10
  209. package/Picker/usePickerDocumentEventClose.js +20 -20
  210. package/Picker/usePickerInputValue.d.ts +12 -12
  211. package/Picker/usePickerInputValue.js +18 -18
  212. package/Picker/usePickerValue.d.ts +20 -20
  213. package/Picker/usePickerValue.js +51 -51
  214. package/Picker/useRangePickerValue.d.ts +20 -20
  215. package/Picker/useRangePickerValue.js +88 -88
  216. package/Picker/useTabKeyClose.d.ts +2 -2
  217. package/Picker/useTabKeyClose.js +7 -7
  218. package/Popconfirm/Popconfirm.d.ts +16 -16
  219. package/Popconfirm/Popconfirm.js +4 -4
  220. package/Popconfirm/index.d.ts +1 -1
  221. package/Popover/Popover.d.ts +23 -23
  222. package/Popover/Popover.js +34 -34
  223. package/Popover/index.d.ts +1 -1
  224. package/Popper/Popper.d.ts +32 -32
  225. package/Popper/Popper.js +21 -21
  226. package/Popper/index.d.ts +1 -1
  227. package/Portal/Portal.d.ts +20 -20
  228. package/Portal/Portal.js +15 -15
  229. package/Portal/index.d.ts +1 -1
  230. package/Progress/Progress.d.ts +59 -59
  231. package/Progress/Progress.js +21 -21
  232. package/Progress/index.d.ts +2 -2
  233. package/Provider/ConfigProvider.d.ts +8 -8
  234. package/Provider/ConfigProvider.js +6 -6
  235. package/Provider/context.d.ts +6 -6
  236. package/Provider/context.js +2 -2
  237. package/Provider/index.d.ts +4 -4
  238. package/Radio/Radio.d.ts +41 -41
  239. package/Radio/Radio.js +21 -21
  240. package/Radio/RadioGroup.d.ts +47 -47
  241. package/Radio/RadioGroup.js +20 -20
  242. package/Radio/RadioGroupContext.d.ts +9 -9
  243. package/Radio/index.d.ts +3 -3
  244. package/Select/AutoComplete.d.ts +101 -101
  245. package/Select/AutoComplete.js +101 -101
  246. package/Select/Option.d.ts +19 -19
  247. package/Select/Option.js +37 -37
  248. package/Select/Select.d.ts +94 -94
  249. package/Select/Select.js +111 -111
  250. package/Select/SelectControlContext.d.ts +3 -3
  251. package/Select/SelectTrigger.d.ts +89 -89
  252. package/Select/SelectTrigger.js +44 -39
  253. package/Select/SelectTriggerTags.d.ts +19 -19
  254. package/Select/SelectTriggerTags.js +21 -21
  255. package/Select/TreeSelect.d.ts +68 -68
  256. package/Select/TreeSelect.js +183 -183
  257. package/Select/index.d.ts +9 -9
  258. package/Select/typings.d.ts +12 -12
  259. package/Select/useSelectTriggerTags.d.ts +19 -19
  260. package/Select/useSelectTriggerTags.js +53 -53
  261. package/Skeleton/Skeleton.d.ts +22 -22
  262. package/Skeleton/Skeleton.js +7 -7
  263. package/Skeleton/index.d.ts +1 -1
  264. package/Slider/Slider.d.ts +51 -51
  265. package/Slider/Slider.js +174 -174
  266. package/Slider/index.d.ts +3 -3
  267. package/Slider/useSlider.d.ts +31 -31
  268. package/Slider/useSlider.js +99 -99
  269. package/Stepper/Step.d.ts +41 -41
  270. package/Stepper/Step.js +9 -9
  271. package/Stepper/Stepper.d.ts +19 -19
  272. package/Stepper/Stepper.js +26 -26
  273. package/Stepper/index.d.ts +2 -2
  274. package/Switch/Switch.d.ts +43 -43
  275. package/Switch/Switch.js +18 -18
  276. package/Switch/index.d.ts +2 -2
  277. package/Table/Table.d.ts +110 -110
  278. package/Table/Table.js +146 -146
  279. package/Table/TableBody.d.ts +10 -10
  280. package/Table/TableBody.js +13 -13
  281. package/Table/TableBodyRow.d.ts +12 -12
  282. package/Table/TableBodyRow.js +45 -45
  283. package/Table/TableCell.d.ts +20 -20
  284. package/Table/TableCell.js +15 -15
  285. package/Table/TableContext.d.ts +52 -52
  286. package/Table/TableContext.js +2 -2
  287. package/Table/TableExpandedTable.d.ts +12 -12
  288. package/Table/TableExpandedTable.js +14 -14
  289. package/Table/TableHeader.d.ts +4 -4
  290. package/Table/TableHeader.js +20 -20
  291. package/Table/draggable/useTableDraggable.d.ts +14 -14
  292. package/Table/draggable/useTableDraggable.js +54 -54
  293. package/Table/editable/TableEditRenderWrapper.d.ts +8 -7
  294. package/Table/editable/TableEditRenderWrapper.js +8 -8
  295. package/Table/expandable/TableExpandable.d.ts +28 -28
  296. package/Table/expandable/TableExpandable.js +15 -15
  297. package/Table/index.d.ts +6 -6
  298. package/Table/pagination/TablePagination.d.ts +10 -10
  299. package/Table/pagination/TablePagination.js +15 -15
  300. package/Table/pagination/useTablePagination.d.ts +8 -8
  301. package/Table/pagination/useTablePagination.js +21 -21
  302. package/Table/refresh/TableRefresh.d.ts +10 -10
  303. package/Table/refresh/TableRefresh.js +13 -13
  304. package/Table/rowSelection/TableRowSelection.d.ts +19 -19
  305. package/Table/rowSelection/TableRowSelection.js +70 -70
  306. package/Table/rowSelection/useTableRowSelection.d.ts +6 -6
  307. package/Table/rowSelection/useTableRowSelection.js +47 -47
  308. package/Table/sorting/TableSortingIcon.d.ts +11 -11
  309. package/Table/sorting/TableSortingIcon.js +18 -18
  310. package/Table/sorting/useTableSorting.d.ts +12 -12
  311. package/Table/sorting/useTableSorting.js +103 -103
  312. package/Table/useTableFetchMore.d.ts +10 -10
  313. package/Table/useTableFetchMore.js +42 -42
  314. package/Table/useTableLoading.d.ts +5 -5
  315. package/Table/useTableLoading.js +13 -13
  316. package/Table/useTableScroll.d.ts +550 -568
  317. package/Table/useTableScroll.js +275 -275
  318. package/Tabs/Tab.d.ts +19 -19
  319. package/Tabs/Tab.js +9 -9
  320. package/Tabs/TabPane.d.ts +14 -14
  321. package/Tabs/TabPane.js +11 -11
  322. package/Tabs/Tabs.d.ts +39 -39
  323. package/Tabs/Tabs.js +36 -36
  324. package/Tabs/index.d.ts +3 -3
  325. package/Tabs/useTabsOverflow.d.ts +8 -8
  326. package/Tabs/useTabsOverflow.js +56 -56
  327. package/Tag/Tag.d.ts +29 -29
  328. package/Tag/Tag.js +14 -14
  329. package/Tag/index.d.ts +2 -2
  330. package/TextField/TextField.d.ts +54 -54
  331. package/TextField/TextField.js +33 -33
  332. package/TextField/index.d.ts +2 -2
  333. package/TextField/useTextFieldControl.d.ts +10 -10
  334. package/TextField/useTextFieldControl.js +12 -12
  335. package/Textarea/Textarea.d.ts +58 -58
  336. package/Textarea/Textarea.js +22 -22
  337. package/Textarea/index.d.ts +2 -2
  338. package/TimePanel/TimePanel.d.ts +66 -66
  339. package/TimePanel/TimePanel.js +54 -54
  340. package/TimePanel/TimePanelAction.d.ts +18 -18
  341. package/TimePanel/TimePanelAction.js +7 -7
  342. package/TimePanel/TimePanelColumn.d.ts +37 -37
  343. package/TimePanel/TimePanelColumn.js +28 -28
  344. package/TimePanel/index.d.ts +3 -3
  345. package/TimePicker/TimePicker.d.ts +24 -24
  346. package/TimePicker/TimePicker.js +99 -99
  347. package/TimePicker/TimePickerPanel.d.ts +24 -24
  348. package/TimePicker/TimePickerPanel.js +7 -7
  349. package/TimePicker/index.d.ts +2 -2
  350. package/Tooltip/Tooltip.d.ts +25 -25
  351. package/Tooltip/Tooltip.js +27 -27
  352. package/Tooltip/index.d.ts +1 -1
  353. package/Tooltip/useDelayMouseEnterLeave.d.ts +12 -12
  354. package/Tooltip/useDelayMouseEnterLeave.js +36 -36
  355. package/Transition/Collapse.d.ts +15 -15
  356. package/Transition/Collapse.js +96 -96
  357. package/Transition/Fade.d.ts +8 -8
  358. package/Transition/Fade.js +74 -74
  359. package/Transition/Grow.d.ts +13 -13
  360. package/Transition/Grow.js +101 -101
  361. package/Transition/SlideFade.d.ts +15 -15
  362. package/Transition/SlideFade.js +83 -83
  363. package/Transition/Transition.d.ts +98 -98
  364. package/Transition/Transition.js +21 -21
  365. package/Transition/Zoom.d.ts +8 -8
  366. package/Transition/Zoom.js +74 -74
  367. package/Transition/getAutoSizeDuration.d.ts +1 -1
  368. package/Transition/getAutoSizeDuration.js +7 -7
  369. package/Transition/getTransitionStyleProps.d.ts +16 -16
  370. package/Transition/getTransitionStyleProps.js +22 -22
  371. package/Transition/index.d.ts +6 -6
  372. package/Transition/reflow.d.ts +4 -4
  373. package/Transition/reflow.js +6 -6
  374. package/Transition/useAutoTransitionDuration.d.ts +6 -6
  375. package/Transition/useAutoTransitionDuration.js +10 -10
  376. package/Transition/useSetNodeTransition.d.ts +7 -7
  377. package/Transition/useSetNodeTransition.js +30 -30
  378. package/Tree/Tree.d.ts +70 -70
  379. package/Tree/Tree.js +116 -116
  380. package/Tree/TreeNode.d.ts +41 -41
  381. package/Tree/TreeNode.js +29 -29
  382. package/Tree/TreeNodeList.d.ts +25 -25
  383. package/Tree/TreeNodeList.js +22 -22
  384. package/Tree/getTreeNodeEntities.d.ts +11 -11
  385. package/Tree/getTreeNodeEntities.js +84 -84
  386. package/Tree/index.d.ts +8 -8
  387. package/Tree/toggleValue.d.ts +4 -4
  388. package/Tree/toggleValue.js +13 -13
  389. package/Tree/traverseTree.d.ts +2 -2
  390. package/Tree/traverseTree.js +8 -8
  391. package/Tree/typings.d.ts +16 -16
  392. package/Tree/useTreeExpandedValue.d.ts +15 -15
  393. package/Tree/useTreeExpandedValue.js +26 -26
  394. package/Typography/Typography.d.ts +43 -43
  395. package/Typography/Typography.js +31 -31
  396. package/Typography/index.d.ts +11 -11
  397. package/Upload/UploadButton.d.ts +10 -10
  398. package/Upload/UploadButton.js +14 -14
  399. package/Upload/UploadInput.d.ts +21 -21
  400. package/Upload/UploadInput.js +18 -18
  401. package/Upload/UploadPicture.d.ts +49 -49
  402. package/Upload/UploadPicture.js +43 -43
  403. package/Upload/UploadPictureBlock.d.ts +20 -20
  404. package/Upload/UploadPictureBlock.js +70 -70
  405. package/Upload/UploadPictureWall.d.ts +81 -81
  406. package/Upload/UploadPictureWall.js +144 -144
  407. package/Upload/UploadPictureWallItem.d.ts +15 -15
  408. package/Upload/UploadPictureWallItem.js +10 -10
  409. package/Upload/UploadResult.d.ts +35 -35
  410. package/Upload/UploadResult.js +19 -19
  411. package/Upload/index.d.ts +6 -6
  412. package/_internal/InputCheck/InputCheck.d.ts +33 -33
  413. package/_internal/InputCheck/InputCheck.js +11 -11
  414. package/_internal/InputCheck/InputCheckGroup.d.ts +18 -18
  415. package/_internal/InputCheck/InputCheckGroup.js +7 -7
  416. package/_internal/InputCheck/index.d.ts +3 -3
  417. package/_internal/InputTriggerPopper/InputTriggerPopper.d.ts +18 -18
  418. package/_internal/InputTriggerPopper/InputTriggerPopper.js +35 -35
  419. package/_internal/InputTriggerPopper/index.d.ts +1 -1
  420. package/_internal/SlideFadeOverlay/SlideFadeOverlay.d.ts +21 -21
  421. package/_internal/SlideFadeOverlay/SlideFadeOverlay.js +53 -53
  422. package/_internal/SlideFadeOverlay/index.d.ts +1 -1
  423. package/_internal/SlideFadeOverlay/useTopStack.d.ts +1 -1
  424. package/_internal/SlideFadeOverlay/useTopStack.js +17 -17
  425. package/hooks/useClickAway.d.ts +5 -5
  426. package/hooks/useClickAway.js +18 -18
  427. package/hooks/useComposeRefs.d.ts +2 -2
  428. package/hooks/useComposeRefs.js +2 -2
  429. package/hooks/useDocumentEscapeKeyDown.d.ts +3 -3
  430. package/hooks/useDocumentEscapeKeyDown.js +15 -15
  431. package/hooks/useDocumentEvents.d.ts +5 -5
  432. package/hooks/useDocumentEvents.js +16 -16
  433. package/hooks/useDocumentTabKeyDown.d.ts +3 -3
  434. package/hooks/useDocumentTabKeyDown.js +14 -14
  435. package/hooks/useIsomorphicLayoutEffect.d.ts +2 -2
  436. package/hooks/useIsomorphicLayoutEffect.js +2 -2
  437. package/hooks/useLastCallback.d.ts +1 -1
  438. package/hooks/useLastCallback.js +5 -5
  439. package/hooks/useLastValue.d.ts +3 -3
  440. package/hooks/useLastValue.js +4 -4
  441. package/hooks/usePreviousValue.d.ts +1 -1
  442. package/hooks/usePreviousValue.js +6 -6
  443. package/hooks/useWindowWidth.d.ts +1 -1
  444. package/hooks/useWindowWidth.js +10 -10
  445. package/index.d.ts +102 -102
  446. package/package.json +14 -30
  447. package/utils/array-move.d.ts +1 -1
  448. package/utils/array-move.js +10 -10
  449. package/utils/composeRefs.d.ts +21 -21
  450. package/utils/composeRefs.js +29 -29
  451. package/utils/cx.d.ts +1 -1
  452. package/utils/general.d.ts +8 -8
  453. package/utils/getElement.d.ts +3 -3
  454. package/utils/getElement.js +11 -11
  455. package/utils/jsx-types.d.ts +11 -11
  456. package/utils/scroll-lock.d.ts +2 -2
  457. package/utils/scroll-lock.js +17 -17
@@ -7,24 +7,24 @@ import PaginationPageSize from './PaginationPageSize.js';
7
7
  import { usePagination } from './usePagination.js';
8
8
  import cx from 'clsx';
9
9
 
10
- /**
11
- * The react component for `mezzanine` pagination.
12
- */
13
- const Pagination = forwardRef((props, ref) => {
14
- const { className, boundaryCount = 1, buttonText, current = 1, disabled = false, hideNextButton = false, hidePreviousButton = false, hintText, inputPlaceholder, itemRender = (item) => jsx(PaginationItem, { ...item }), onChange, onChangePageSize, pageSize = 10, pageSizeLabel, pageSizeOptions, pageSizeUnit, renderPageSizeOptionName, showJumper = false, showPageSizeOptions = false, siblingCount = 1, total = 0, ...rest } = props;
15
- const { items } = usePagination({
16
- boundaryCount,
17
- current,
18
- disabled,
19
- hideNextButton,
20
- hidePreviousButton,
21
- onChange,
22
- pageSize,
23
- siblingCount,
24
- total,
25
- });
26
- return (jsx("nav", { ...rest, ref: ref, "aria-label": "pagination navigation", className: cx(paginationClasses.host, className), children: jsxs("ul", { className: paginationClasses.container, children: [showPageSizeOptions && (jsx("li", { className: paginationClasses.pageSize, children: jsx(PaginationPageSize, { disabled: disabled, label: pageSizeLabel, onChange: onChangePageSize, options: pageSizeOptions, renderOptionName: renderPageSizeOptionName, unit: pageSizeUnit, value: pageSize }) })), items.map((item, index) => (jsx("li", { className: paginationClasses.item, children: itemRender(item) }, index))), showJumper && (jsx("li", { className: paginationClasses.jumper, children: jsx(PaginationJumper, { buttonText: buttonText, disabled: disabled, hintText: hintText, inputPlaceholder: inputPlaceholder, onChange: onChange, pageSize: pageSize, total: total }) }))] }) }));
27
- });
10
+ /**
11
+ * The react component for `mezzanine` pagination.
12
+ */
13
+ const Pagination = forwardRef((props, ref) => {
14
+ const { className, boundaryCount = 1, buttonText, current = 1, disabled = false, hideNextButton = false, hidePreviousButton = false, hintText, inputPlaceholder, itemRender = (item) => jsx(PaginationItem, { ...item }), onChange, onChangePageSize, pageSize = 10, pageSizeLabel, pageSizeOptions, pageSizeUnit, renderPageSizeOptionName, showJumper = false, showPageSizeOptions = false, siblingCount = 1, total = 0, ...rest } = props;
15
+ const { items } = usePagination({
16
+ boundaryCount,
17
+ current,
18
+ disabled,
19
+ hideNextButton,
20
+ hidePreviousButton,
21
+ onChange,
22
+ pageSize,
23
+ siblingCount,
24
+ total,
25
+ });
26
+ return (jsx("nav", { ...rest, ref: ref, "aria-label": "pagination navigation", className: cx(paginationClasses.host, className), children: jsxs("ul", { className: paginationClasses.container, children: [showPageSizeOptions && (jsx("li", { className: paginationClasses.pageSize, children: jsx(PaginationPageSize, { disabled: disabled, label: pageSizeLabel, onChange: onChangePageSize, options: pageSizeOptions, renderOptionName: renderPageSizeOptionName, unit: pageSizeUnit, value: pageSize }) })), items.map((item, index) => (jsx("li", { className: paginationClasses.item, children: itemRender(item) }, index))), showJumper && (jsx("li", { className: paginationClasses.jumper, children: jsx(PaginationJumper, { buttonText: buttonText, disabled: disabled, hintText: hintText, inputPlaceholder: inputPlaceholder, onChange: onChange, pageSize: pageSize, total: total }) }))] }) }));
27
+ });
28
28
  var Pagination$1 = Pagination;
29
29
 
30
30
  export { Pagination$1 as default };
@@ -1,27 +1,27 @@
1
- import { DetailedHTMLProps, HTMLAttributes } from 'react';
2
- import { PaginationItemType } from '@mezzanine-ui/core/pagination';
3
- export type PaginationItemElement = HTMLButtonElement | HTMLDivElement;
4
- export interface PaginationItemProps extends Omit<DetailedHTMLProps<HTMLAttributes<PaginationItemElement>, PaginationItemElement>, 'ref'> {
5
- /**
6
- * If `true`, the pagination item is active.
7
- * @default false
8
- */
9
- active?: boolean;
10
- /**
11
- * If `true`, the pagination item is disabled.
12
- * @default false
13
- */
14
- disabled?: boolean;
15
- /**
16
- * The page number.
17
- * @default 1
18
- */
19
- page?: number;
20
- /**
21
- * Whether the field type.
22
- * @default 'page'
23
- */
24
- type?: PaginationItemType;
25
- }
26
- declare const PaginationItem: import("react").ForwardRefExoticComponent<PaginationItemProps & import("react").RefAttributes<PaginationItemElement>>;
27
- export default PaginationItem;
1
+ import { DetailedHTMLProps, HTMLAttributes } from 'react';
2
+ import { PaginationItemType } from '@mezzanine-ui/core/pagination';
3
+ export type PaginationItemElement = HTMLButtonElement | HTMLDivElement;
4
+ export interface PaginationItemProps extends Omit<DetailedHTMLProps<HTMLAttributes<PaginationItemElement>, PaginationItemElement>, 'ref'> {
5
+ /**
6
+ * If `true`, the pagination item is active.
7
+ * @default false
8
+ */
9
+ active?: boolean;
10
+ /**
11
+ * If `true`, the pagination item is disabled.
12
+ * @default false
13
+ */
14
+ disabled?: boolean;
15
+ /**
16
+ * The page number.
17
+ * @default 1
18
+ */
19
+ page?: number;
20
+ /**
21
+ * Whether the field type.
22
+ * @default 'page'
23
+ */
24
+ type?: PaginationItemType;
25
+ }
26
+ declare const PaginationItem: import("react").ForwardRefExoticComponent<PaginationItemProps & import("react").RefAttributes<PaginationItemElement>>;
27
+ export default PaginationItem;
@@ -5,22 +5,22 @@ import { ChevronRightIcon, ChevronLeftIcon } from '@mezzanine-ui/icons';
5
5
  import Icon from '../Icon/Icon.js';
6
6
  import cx from 'clsx';
7
7
 
8
- const PaginationItem = forwardRef((props, ref) => {
9
- const { active = false, className, disabled = false, page = 1, type = 'page', ...rest } = props;
10
- const icons = {
11
- next: ChevronRightIcon,
12
- previous: ChevronLeftIcon,
13
- };
14
- const ButtonIcon = icons[type];
15
- return type === 'ellipsis' ? (jsx("div", { ...rest, ref: ref, className: cx(paginationItemClasses.host, paginationItemClasses.ellipsis, {
16
- [paginationItemClasses.disabled]: disabled,
17
- }, className), children: "..." })) : (createElement("button", { ...rest, ref: ref, key: page, disabled: disabled, className: cx(paginationItemClasses.host, paginationItemClasses.button, {
18
- [paginationItemClasses.active]: active,
19
- [paginationItemClasses.disabled]: disabled,
20
- }, className), type: "button" },
21
- ButtonIcon && jsx(Icon, { icon: ButtonIcon }),
22
- type === 'page' && page));
23
- });
8
+ const PaginationItem = forwardRef((props, ref) => {
9
+ const { active = false, className, disabled = false, page = 1, type = 'page', ...rest } = props;
10
+ const icons = {
11
+ next: ChevronRightIcon,
12
+ previous: ChevronLeftIcon,
13
+ };
14
+ const ButtonIcon = icons[type];
15
+ return type === 'ellipsis' ? (jsx("div", { ...rest, ref: ref, className: cx(paginationItemClasses.host, paginationItemClasses.ellipsis, {
16
+ [paginationItemClasses.disabled]: disabled,
17
+ }, className), children: "..." })) : (createElement("button", { ...rest, ref: ref, key: page, disabled: disabled, className: cx(paginationItemClasses.host, paginationItemClasses.button, {
18
+ [paginationItemClasses.active]: active,
19
+ [paginationItemClasses.disabled]: disabled,
20
+ }, className), type: "button" },
21
+ ButtonIcon && jsx(Icon, { icon: ButtonIcon }),
22
+ type === 'page' && page));
23
+ });
24
24
  var PaginationItem$1 = PaginationItem;
25
25
 
26
26
  export { PaginationItem$1 as default };
@@ -1,38 +1,38 @@
1
- import { DetailedHTMLProps, HTMLAttributes } from 'react';
2
- export interface PaginationJumperProps extends Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'onChange'> {
3
- /**
4
- * The text displayed in the `button` content.
5
- */
6
- buttonText?: string;
7
- /**
8
- * If `true`, the pagination jumper fields is disabled.
9
- * @default false
10
- */
11
- disabled?: boolean;
12
- /**
13
- * The hint text displayed in front of `input`.
14
- */
15
- hintText?: string;
16
- /**
17
- * The hint displayed in the `input` before the user enters a value.
18
- */
19
- inputPlaceholder?: string;
20
- /**
21
- * Callback fired when the page is changed.
22
- *
23
- * @param {number} page The page active.
24
- */
25
- onChange?: (page: number) => void;
26
- /**
27
- * Number of data per page
28
- * @default 5
29
- */
30
- pageSize?: number;
31
- /**
32
- * Items total count.
33
- * @default 0
34
- */
35
- total?: number;
36
- }
37
- declare const PaginationJumper: import("react").ForwardRefExoticComponent<Omit<PaginationJumperProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
38
- export default PaginationJumper;
1
+ import { DetailedHTMLProps, HTMLAttributes } from 'react';
2
+ export interface PaginationJumperProps extends Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'onChange'> {
3
+ /**
4
+ * The text displayed in the `button` content.
5
+ */
6
+ buttonText?: string;
7
+ /**
8
+ * If `true`, the pagination jumper fields is disabled.
9
+ * @default false
10
+ */
11
+ disabled?: boolean;
12
+ /**
13
+ * The hint text displayed in front of `input`.
14
+ */
15
+ hintText?: string;
16
+ /**
17
+ * The hint displayed in the `input` before the user enters a value.
18
+ */
19
+ inputPlaceholder?: string;
20
+ /**
21
+ * Callback fired when the page is changed.
22
+ *
23
+ * @param {number} page The page active.
24
+ */
25
+ onChange?: (page: number) => void;
26
+ /**
27
+ * Number of data per page
28
+ * @default 5
29
+ */
30
+ pageSize?: number;
31
+ /**
32
+ * Items total count.
33
+ * @default 0
34
+ */
35
+ total?: number;
36
+ }
37
+ declare const PaginationJumper: import("react").ForwardRefExoticComponent<Pick<PaginationJumperProps, "onChange" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "buttonText" | "disabled" | "hintText" | "inputPlaceholder" | "pageSize" | "total"> & import("react").RefAttributes<HTMLDivElement>>;
38
+ export default PaginationJumper;
@@ -6,46 +6,46 @@ import Button from '../Button/Button.js';
6
6
  import Input from '../Input/Input.js';
7
7
  import cx from 'clsx';
8
8
 
9
- const PaginationJumper = forwardRef((props, ref) => {
10
- const { buttonText, className, disabled = false, hintText, inputPlaceholder, onChange: handleChange, pageSize = 5, total = 0, ...rest } = props;
11
- const [value, setValue] = useState('');
12
- const [error, setError] = useState(false);
13
- const totalPages = (total ? Math.ceil(total / pageSize) : 1);
14
- const valueValidator = () => {
15
- const stringToNumber = +value;
16
- const validNumber = !!stringToNumber;
17
- if (validNumber) {
18
- return !(stringToNumber > totalPages || stringToNumber < 1);
19
- }
20
- return false;
21
- };
22
- const handleClick = () => {
23
- const valid = valueValidator();
24
- if (valid) {
25
- setError(false);
26
- if (handleChange) {
27
- handleChange(+value);
28
- setValue('');
29
- }
30
- }
31
- else {
32
- setError(true);
33
- setValue('');
34
- }
35
- };
36
- const handleKeyDown = (e) => {
37
- if (e.key === 'Enter') {
38
- handleClick();
39
- }
40
- };
41
- return (jsxs("div", { ...rest, ref: ref, className: cx(paginationJumperClasses.host, className), children: [jsx(Typography, { color: disabled ? 'text-disabled' : 'text-primary', component: "div", ellipsis: true, variant: "input2", children: hintText }), jsx(Input, { disabled: disabled, error: error, onChange: (e) => {
42
- setValue(e.target.value);
43
- }, placeholder: inputPlaceholder, inputProps: {
44
- type: 'number',
45
- className: paginationJumperClasses.input,
46
- onKeyDown: handleKeyDown,
47
- }, value: value }), jsx(Button, { disabled: disabled, onClick: handleClick, children: buttonText })] }));
48
- });
9
+ const PaginationJumper = forwardRef((props, ref) => {
10
+ const { buttonText, className, disabled = false, hintText, inputPlaceholder, onChange: handleChange, pageSize = 5, total = 0, ...rest } = props;
11
+ const [value, setValue] = useState('');
12
+ const [error, setError] = useState(false);
13
+ const totalPages = (total ? Math.ceil(total / pageSize) : 1);
14
+ const valueValidator = () => {
15
+ const stringToNumber = +value;
16
+ const validNumber = !!stringToNumber;
17
+ if (validNumber) {
18
+ return !(stringToNumber > totalPages || stringToNumber < 1);
19
+ }
20
+ return false;
21
+ };
22
+ const handleClick = () => {
23
+ const valid = valueValidator();
24
+ if (valid) {
25
+ setError(false);
26
+ if (handleChange) {
27
+ handleChange(+value);
28
+ setValue('');
29
+ }
30
+ }
31
+ else {
32
+ setError(true);
33
+ setValue('');
34
+ }
35
+ };
36
+ const handleKeyDown = (e) => {
37
+ if (e.key === 'Enter') {
38
+ handleClick();
39
+ }
40
+ };
41
+ return (jsxs("div", { ...rest, ref: ref, className: cx(paginationJumperClasses.host, className), children: [jsx(Typography, { color: disabled ? 'text-disabled' : 'text-primary', component: "div", ellipsis: true, variant: "input2", children: hintText }), jsx(Input, { disabled: disabled, error: error, onChange: (e) => {
42
+ setValue(e.target.value);
43
+ }, placeholder: inputPlaceholder, inputProps: {
44
+ type: 'number',
45
+ className: paginationJumperClasses.input,
46
+ onKeyDown: handleKeyDown,
47
+ }, value: value }), jsx(Button, { disabled: disabled, onClick: handleClick, children: buttonText })] }));
48
+ });
49
49
  var PaginationJumper$1 = PaginationJumper;
50
50
 
51
51
  export { PaginationJumper$1 as default };
@@ -1,38 +1,38 @@
1
- import { DetailedHTMLProps, HTMLAttributes } from 'react';
2
- export interface PaginationPageSizeProps extends Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'onChange'> {
3
- /**
4
- * If `true`, the pagination page size fields is disabled.
5
- * @default false
6
- */
7
- disabled?: boolean;
8
- /**
9
- * Label display before `select`
10
- */
11
- label?: string;
12
- /**
13
- * Callback fired when the page size is changed.
14
- *
15
- * @param {number} pageSize The page active.
16
- */
17
- onChange?: (pageSize: number) => void;
18
- /**
19
- * options for `select` to use
20
- * @default [10, 20, 50, 100]
21
- */
22
- options?: number[];
23
- /**
24
- * Callback to custom render option name
25
- * @default (p) => `${p}`
26
- */
27
- renderOptionName?: (pageSize: number) => string;
28
- /**
29
- * unit display after `select`
30
- */
31
- unit?: string;
32
- /**
33
- * Current page size value
34
- */
35
- value?: number;
36
- }
37
- declare const PaginationPageSize: import("react").ForwardRefExoticComponent<Omit<PaginationPageSizeProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
38
- export default PaginationPageSize;
1
+ import { DetailedHTMLProps, HTMLAttributes } from 'react';
2
+ export interface PaginationPageSizeProps extends Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'onChange'> {
3
+ /**
4
+ * If `true`, the pagination page size fields is disabled.
5
+ * @default false
6
+ */
7
+ disabled?: boolean;
8
+ /**
9
+ * Label display before `select`
10
+ */
11
+ label?: string;
12
+ /**
13
+ * Callback fired when the page size is changed.
14
+ *
15
+ * @param {number} pageSize The page active.
16
+ */
17
+ onChange?: (pageSize: number) => void;
18
+ /**
19
+ * options for `select` to use
20
+ * @default [10, 20, 50, 100]
21
+ */
22
+ options?: number[];
23
+ /**
24
+ * Callback to custom render option name
25
+ * @default (p) => `${p}`
26
+ */
27
+ renderOptionName?: (pageSize: number) => string;
28
+ /**
29
+ * unit display after `select`
30
+ */
31
+ unit?: string;
32
+ /**
33
+ * Current page size value
34
+ */
35
+ value?: number;
36
+ }
37
+ declare const PaginationPageSize: import("react").ForwardRefExoticComponent<Pick<PaginationPageSizeProps, "onChange" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "disabled" | "label" | "options" | "renderOptionName" | "unit" | "value"> & import("react").RefAttributes<HTMLDivElement>>;
38
+ export default PaginationPageSize;
@@ -6,14 +6,14 @@ import Select from '../Select/Select.js';
6
6
  import Option from '../Select/Option.js';
7
7
  import cx from 'clsx';
8
8
 
9
- const PaginationPageSize = forwardRef((props, ref) => {
10
- const { className, disabled = false, label, onChange, options = [10, 20, 50, 100], renderOptionName = (p) => `${p}`, unit, value, ...rest } = props;
11
- const currentValue = useMemo(() => (value ? ({
12
- id: `${value}`,
13
- name: renderOptionName(value),
14
- }) : undefined), [value, renderOptionName]);
15
- return (jsxs("div", { ...rest, ref: ref, className: cx(paginationPageSizeClasses.host, className), children: [label ? (jsx(Typography, { color: "text-secondary", component: "div", ellipsis: true, variant: "button3", children: label })) : null, jsx(Select, { disabled: disabled, value: currentValue, onChange: (nextSelection) => onChange === null || onChange === void 0 ? void 0 : onChange(Number(nextSelection.id)), className: paginationPageSizeClasses.select, children: options.map((opt) => (jsx(Option, { value: `${opt}`, children: renderOptionName(opt) }, opt))) }), unit ? (jsx(Typography, { color: "text-secondary", component: "div", ellipsis: true, variant: "button3", children: unit })) : null] }));
16
- });
9
+ const PaginationPageSize = forwardRef((props, ref) => {
10
+ const { className, disabled = false, label, onChange, options = [10, 20, 50, 100], renderOptionName = (p) => `${p}`, unit, value, ...rest } = props;
11
+ const currentValue = useMemo(() => (value ? ({
12
+ id: `${value}`,
13
+ name: renderOptionName(value),
14
+ }) : undefined), [value, renderOptionName]);
15
+ return (jsxs("div", { ...rest, ref: ref, className: cx(paginationPageSizeClasses.host, className), children: [label ? (jsx(Typography, { color: "text-secondary", component: "div", ellipsis: true, variant: "button3", children: label })) : null, jsx(Select, { disabled: disabled, value: currentValue, onChange: (nextSelection) => onChange === null || onChange === void 0 ? void 0 : onChange(Number(nextSelection.id)), className: paginationPageSizeClasses.select, children: options.map((opt) => (jsx(Option, { value: `${opt}`, children: renderOptionName(opt) }, opt))) }), unit ? (jsx(Typography, { color: "text-secondary", component: "div", ellipsis: true, variant: "button3", children: unit })) : null] }));
16
+ });
17
17
  var PaginationPageSize$1 = PaginationPageSize;
18
18
 
19
19
  export { PaginationPageSize$1 as default };
@@ -1,6 +1,6 @@
1
- export type { PaginationItemType, } from '@mezzanine-ui/core/pagination';
2
- export { PaginationProps, default } from './Pagination';
3
- export { PaginationItemProps, default as PaginationItem } from './PaginationItem';
4
- export { PaginationJumperProps, default as PaginationJumper } from './PaginationJumper';
5
- export { PaginationPageSizeProps, default as PaginationPageSize } from './PaginationPageSize';
6
- export { usePagination } from './usePagination';
1
+ export type { PaginationItemType, } from '@mezzanine-ui/core/pagination';
2
+ export { PaginationProps, default } from './Pagination';
3
+ export { PaginationItemProps, default as PaginationItem } from './PaginationItem';
4
+ export { PaginationJumperProps, default as PaginationJumper } from './PaginationJumper';
5
+ export { PaginationPageSizeProps, default as PaginationPageSize } from './PaginationPageSize';
6
+ export { usePagination } from './usePagination';
@@ -1,16 +1,16 @@
1
- import { PaginationItemProps } from './PaginationItem';
2
- export interface UsePaginationParams {
3
- boundaryCount?: number;
4
- current?: number;
5
- disabled?: boolean;
6
- hideNextButton?: boolean;
7
- hidePreviousButton?: boolean;
8
- pageSize?: number;
9
- onChange?: (page: number) => void;
10
- siblingCount?: number;
11
- total?: number;
12
- }
13
- export declare const range: (start: number, end: number) => number[];
14
- export declare function usePagination(props?: UsePaginationParams): {
15
- items: PaginationItemProps[];
16
- };
1
+ import { PaginationItemProps } from './PaginationItem';
2
+ export interface UsePaginationParams {
3
+ boundaryCount?: number;
4
+ current?: number;
5
+ disabled?: boolean;
6
+ hideNextButton?: boolean;
7
+ hidePreviousButton?: boolean;
8
+ pageSize?: number;
9
+ onChange?: (page: number) => void;
10
+ siblingCount?: number;
11
+ total?: number;
12
+ }
13
+ export declare const range: (start: number, end: number) => number[];
14
+ export declare function usePagination(props?: UsePaginationParams): {
15
+ items: PaginationItemProps[];
16
+ };
@@ -1,78 +1,78 @@
1
1
  import { useMemo } from 'react';
2
2
 
3
- const range = (start, end) => {
4
- const length = end - start + 1;
5
- return Array.from({ length }, (_, i) => start + i);
6
- };
7
- function usePagination(props = {}) {
8
- const { boundaryCount = 1, current = 1, disabled = false, hideNextButton = false, hidePreviousButton = false, pageSize = 10, onChange: handleChange, siblingCount = 1, total = 0, } = props;
9
- const totalPages = (total ? Math.ceil(total / pageSize) : 1);
10
- const itemList = useMemo(() => {
11
- const startPages = range(1, Math.min(boundaryCount, totalPages));
12
- const endPages = range(Math.max(totalPages - boundaryCount + 1, boundaryCount + 1), totalPages);
13
- const siblingsStart = Math.max(Math.min(current - siblingCount, totalPages - boundaryCount - siblingCount * 2 - 1), boundaryCount + 2);
14
- const siblingsEnd = Math.min(Math.max(current + siblingCount, boundaryCount + siblingCount * 2 + 2), endPages.length > 0 ? endPages[0] - 2 : totalPages - 1);
15
- return [
16
- ...(hidePreviousButton ? [] : ['previous']),
17
- ...startPages,
18
- // eslint-disable-next-line no-nested-ternary
19
- ...(siblingsStart > boundaryCount + 2
20
- ? ['ellipsis']
21
- : boundaryCount + 1 < totalPages - boundaryCount
22
- ? [boundaryCount + 1]
23
- : []),
24
- ...range(siblingsStart, siblingsEnd),
25
- // eslint-disable-next-line no-nested-ternary
26
- ...(siblingsEnd < totalPages - boundaryCount - 1
27
- ? ['ellipsis']
28
- : totalPages - boundaryCount > boundaryCount
29
- ? [totalPages - boundaryCount]
30
- : []),
31
- ...endPages,
32
- ...(hideNextButton ? [] : ['next']),
33
- ];
34
- }, [boundaryCount, current, hideNextButton, hidePreviousButton, siblingCount, totalPages]);
35
- const handleClick = (page) => {
36
- if (handleChange) {
37
- handleChange(page);
38
- }
39
- };
40
- const items = useMemo(() => itemList.map((item) => {
41
- if (typeof item === 'number') {
42
- return {
43
- active: item === current,
44
- 'aria-current': item === current ? true : undefined,
45
- 'aria-disabled': disabled ? true : undefined,
46
- 'aria-label': `Go to ${item} page`,
47
- disabled,
48
- onClick: () => { handleClick(item); },
49
- page: item,
50
- type: 'page',
51
- };
52
- }
53
- const restItemProps = {
54
- previous: {
55
- 'aria-label': 'Go to previous Page',
56
- disabled: disabled || (current - 1 < 1),
57
- onClick: () => { handleClick(current - 1); },
58
- type: item,
59
- },
60
- next: {
61
- 'aria-label': 'Go to next Page',
62
- disabled: disabled || (current + 1 > totalPages),
63
- onClick: () => { handleClick(current + 1); },
64
- type: item,
65
- },
66
- ellipsis: {
67
- disabled,
68
- type: item,
69
- },
70
- };
71
- return restItemProps[item] || { type: item };
72
- }), [current, disabled, itemList, totalPages]);
73
- return {
74
- items,
75
- };
3
+ const range = (start, end) => {
4
+ const length = end - start + 1;
5
+ return Array.from({ length }, (_, i) => start + i);
6
+ };
7
+ function usePagination(props = {}) {
8
+ const { boundaryCount = 1, current = 1, disabled = false, hideNextButton = false, hidePreviousButton = false, pageSize = 10, onChange: handleChange, siblingCount = 1, total = 0, } = props;
9
+ const totalPages = (total ? Math.ceil(total / pageSize) : 1);
10
+ const itemList = useMemo(() => {
11
+ const startPages = range(1, Math.min(boundaryCount, totalPages));
12
+ const endPages = range(Math.max(totalPages - boundaryCount + 1, boundaryCount + 1), totalPages);
13
+ const siblingsStart = Math.max(Math.min(current - siblingCount, totalPages - boundaryCount - siblingCount * 2 - 1), boundaryCount + 2);
14
+ const siblingsEnd = Math.min(Math.max(current + siblingCount, boundaryCount + siblingCount * 2 + 2), endPages.length > 0 ? endPages[0] - 2 : totalPages - 1);
15
+ return [
16
+ ...(hidePreviousButton ? [] : ['previous']),
17
+ ...startPages,
18
+ // eslint-disable-next-line no-nested-ternary
19
+ ...(siblingsStart > boundaryCount + 2
20
+ ? ['ellipsis']
21
+ : boundaryCount + 1 < totalPages - boundaryCount
22
+ ? [boundaryCount + 1]
23
+ : []),
24
+ ...range(siblingsStart, siblingsEnd),
25
+ // eslint-disable-next-line no-nested-ternary
26
+ ...(siblingsEnd < totalPages - boundaryCount - 1
27
+ ? ['ellipsis']
28
+ : totalPages - boundaryCount > boundaryCount
29
+ ? [totalPages - boundaryCount]
30
+ : []),
31
+ ...endPages,
32
+ ...(hideNextButton ? [] : ['next']),
33
+ ];
34
+ }, [boundaryCount, current, hideNextButton, hidePreviousButton, siblingCount, totalPages]);
35
+ const handleClick = (page) => {
36
+ if (handleChange) {
37
+ handleChange(page);
38
+ }
39
+ };
40
+ const items = useMemo(() => itemList.map((item) => {
41
+ if (typeof item === 'number') {
42
+ return {
43
+ active: item === current,
44
+ 'aria-current': item === current ? true : undefined,
45
+ 'aria-disabled': disabled ? true : undefined,
46
+ 'aria-label': `Go to ${item} page`,
47
+ disabled,
48
+ onClick: () => { handleClick(item); },
49
+ page: item,
50
+ type: 'page',
51
+ };
52
+ }
53
+ const restItemProps = {
54
+ previous: {
55
+ 'aria-label': 'Go to previous Page',
56
+ disabled: disabled || (current - 1 < 1),
57
+ onClick: () => { handleClick(current - 1); },
58
+ type: item,
59
+ },
60
+ next: {
61
+ 'aria-label': 'Go to next Page',
62
+ disabled: disabled || (current + 1 > totalPages),
63
+ onClick: () => { handleClick(current + 1); },
64
+ type: item,
65
+ },
66
+ ellipsis: {
67
+ disabled,
68
+ type: item,
69
+ },
70
+ };
71
+ return restItemProps[item] || { type: item };
72
+ }), [current, disabled, itemList, totalPages]);
73
+ return {
74
+ items,
75
+ };
76
76
  }
77
77
 
78
78
  export { range, usePagination };