@mezzanine-ui/react 0.6.4
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.
- package/Accordion/Accordion.d.ts +24 -0
- package/Accordion/Accordion.js +32 -0
- package/Accordion/AccordionControlContext.d.ts +9 -0
- package/Accordion/AccordionControlContext.js +5 -0
- package/Accordion/AccordionDetails.d.ts +10 -0
- package/Accordion/AccordionDetails.js +25 -0
- package/Accordion/AccordionSummary.d.ts +19 -0
- package/Accordion/AccordionSummary.js +50 -0
- package/Accordion/index.d.ts +3 -0
- package/Accordion/index.js +3 -0
- package/Alert/Alert.d.ts +20 -0
- package/Alert/Alert.js +20 -0
- package/Alert/index.d.ts +2 -0
- package/Alert/index.js +1 -0
- package/AppBar/AppBar.d.ts +14 -0
- package/AppBar/AppBar.js +35 -0
- package/AppBar/AppBarBrand.d.ts +5 -0
- package/AppBar/AppBarBrand.js +11 -0
- package/AppBar/AppBarMain.d.ts +5 -0
- package/AppBar/AppBarMain.js +11 -0
- package/AppBar/AppBarSupport.d.ts +5 -0
- package/AppBar/AppBarSupport.js +11 -0
- package/AppBar/index.d.ts +4 -0
- package/AppBar/index.js +4 -0
- package/Badge/Badge.d.ts +19 -0
- package/Badge/Badge.js +27 -0
- package/Badge/BadgeContainer.d.ts +8 -0
- package/Badge/BadgeContainer.js +14 -0
- package/Badge/index.d.ts +2 -0
- package/Badge/index.js +2 -0
- package/Button/Button.d.ts +11 -0
- package/Button/Button.js +37 -0
- package/Button/ButtonGroup.d.ts +63 -0
- package/Button/ButtonGroup.js +35 -0
- package/Button/IconButton.d.ts +21 -0
- package/Button/IconButton.js +13 -0
- package/Button/index.d.ts +20 -0
- package/Button/index.js +8 -0
- package/Button/typings.d.ts +44 -0
- package/Calendar/Calendar.d.ts +69 -0
- package/Calendar/Calendar.js +53 -0
- package/Calendar/CalendarCell.d.ts +22 -0
- package/Calendar/CalendarCell.js +18 -0
- package/Calendar/CalendarContext.d.ts +22 -0
- package/Calendar/CalendarContext.js +27 -0
- package/Calendar/CalendarControls.d.ts +26 -0
- package/Calendar/CalendarControls.js +20 -0
- package/Calendar/CalendarDayOfWeek.d.ts +15 -0
- package/Calendar/CalendarDayOfWeek.js +18 -0
- package/Calendar/CalendarDays.d.ts +38 -0
- package/Calendar/CalendarDays.js +48 -0
- package/Calendar/CalendarMonths.d.ts +42 -0
- package/Calendar/CalendarMonths.js +30 -0
- package/Calendar/CalendarWeeks.d.ts +41 -0
- package/Calendar/CalendarWeeks.js +54 -0
- package/Calendar/CalendarYears.d.ts +40 -0
- package/Calendar/CalendarYears.js +34 -0
- package/Calendar/index.d.ts +12 -0
- package/Calendar/index.js +12 -0
- package/Calendar/useCalendarControlModifiers.d.ts +7 -0
- package/Calendar/useCalendarControlModifiers.js +26 -0
- package/Calendar/useCalendarControls.d.ts +13 -0
- package/Calendar/useCalendarControls.js +34 -0
- package/Calendar/useCalendarModeStack.d.ts +6 -0
- package/Calendar/useCalendarModeStack.js +15 -0
- package/Card/Card.d.ts +51 -0
- package/Card/Card.js +20 -0
- package/Card/CardActions.d.ts +34 -0
- package/Card/CardActions.js +16 -0
- package/Card/index.d.ts +2 -0
- package/Card/index.js +2 -0
- package/Checkbox/CheckAll.d.ts +13 -0
- package/Checkbox/CheckAll.js +36 -0
- package/Checkbox/Checkbox.d.ts +46 -0
- package/Checkbox/Checkbox.js +33 -0
- package/Checkbox/CheckboxGroup.d.ts +47 -0
- package/Checkbox/CheckboxGroup.js +36 -0
- package/Checkbox/CheckboxGroupContext.d.ts +9 -0
- package/Checkbox/CheckboxGroupContext.js +5 -0
- package/Checkbox/index.d.ts +4 -0
- package/Checkbox/index.js +3 -0
- package/ConfirmActions/ConfirmActions.d.ts +45 -0
- package/ConfirmActions/ConfirmActions.js +16 -0
- package/ConfirmActions/index.d.ts +1 -0
- package/ConfirmActions/index.js +1 -0
- package/DatePicker/DatePicker.d.ts +32 -0
- package/DatePicker/DatePicker.js +135 -0
- package/DatePicker/DatePickerCalendar.d.ts +32 -0
- package/DatePicker/DatePickerCalendar.js +61 -0
- package/DatePicker/index.d.ts +2 -0
- package/DatePicker/index.js +2 -0
- package/DateRangePicker/DateRangePicker.d.ts +38 -0
- package/DateRangePicker/DateRangePicker.js +187 -0
- package/DateRangePicker/DateRangePickerCalendar.d.ts +26 -0
- package/DateRangePicker/DateRangePickerCalendar.js +98 -0
- package/DateRangePicker/index.d.ts +4 -0
- package/DateRangePicker/index.js +4 -0
- package/DateRangePicker/useDateRangeCalendarControls.d.ts +15 -0
- package/DateRangePicker/useDateRangeCalendarControls.js +93 -0
- package/DateRangePicker/useDateRangePickerValue.d.ts +23 -0
- package/DateRangePicker/useDateRangePickerValue.js +87 -0
- package/DateTimePicker/DateTimePicker.d.ts +28 -0
- package/DateTimePicker/DateTimePicker.js +122 -0
- package/DateTimePicker/DateTimePickerPanel.d.ts +29 -0
- package/DateTimePicker/DateTimePickerPanel.js +51 -0
- package/DateTimePicker/index.d.ts +2 -0
- package/DateTimePicker/index.js +2 -0
- package/Drawer/Drawer.d.ts +18 -0
- package/Drawer/Drawer.js +34 -0
- package/Drawer/index.d.ts +2 -0
- package/Drawer/index.js +1 -0
- package/Dropdown/Dropdown.d.ts +25 -0
- package/Dropdown/Dropdown.js +60 -0
- package/Dropdown/index.d.ts +1 -0
- package/Dropdown/index.js +1 -0
- package/Empty/Empty.d.ts +18 -0
- package/Empty/Empty.js +16 -0
- package/Empty/index.d.ts +1 -0
- package/Empty/index.js +1 -0
- package/Form/FormControlContext.d.ts +9 -0
- package/Form/FormControlContext.js +5 -0
- package/Form/FormField.d.ts +27 -0
- package/Form/FormField.js +24 -0
- package/Form/FormLabel.d.ts +11 -0
- package/Form/FormLabel.js +17 -0
- package/Form/FormMessage.d.ts +8 -0
- package/Form/FormMessage.js +18 -0
- package/Form/index.d.ts +5 -0
- package/Form/index.js +4 -0
- package/Form/typings.d.ts +4 -0
- package/Form/useAutoCompleteValueControl.d.ts +23 -0
- package/Form/useAutoCompleteValueControl.js +58 -0
- package/Form/useCheckboxControlValue.d.ts +11 -0
- package/Form/useCheckboxControlValue.js +29 -0
- package/Form/useControlValueState.d.ts +7 -0
- package/Form/useControlValueState.js +15 -0
- package/Form/useCustomControlValue.d.ts +5 -0
- package/Form/useCustomControlValue.js +18 -0
- package/Form/useInputControlValue.d.ts +7 -0
- package/Form/useInputControlValue.js +24 -0
- package/Form/useInputWithClearControlValue.d.ts +6 -0
- package/Form/useInputWithClearControlValue.js +33 -0
- package/Form/useRadioControlValue.d.ts +11 -0
- package/Form/useRadioControlValue.js +24 -0
- package/Form/useSelectValueControl.d.ts +16 -0
- package/Form/useSelectValueControl.js +59 -0
- package/Form/useSwitchControlValue.d.ts +7 -0
- package/Form/useSwitchControlValue.js +24 -0
- package/Icon/Icon.d.ts +24 -0
- package/Icon/Icon.js +23 -0
- package/Icon/index.d.ts +3 -0
- package/Icon/index.js +1 -0
- package/Input/Input.d.ts +50 -0
- package/Input/Input.js +28 -0
- package/Input/index.d.ts +2 -0
- package/Input/index.js +1 -0
- package/LICENSE +21 -0
- package/Loading/Loading.d.ts +34 -0
- package/Loading/Loading.js +28 -0
- package/Loading/index.d.ts +1 -0
- package/Loading/index.js +1 -0
- package/Menu/Menu.d.ts +29 -0
- package/Menu/Menu.js +22 -0
- package/Menu/MenuDivider.d.ts +8 -0
- package/Menu/MenuDivider.js +14 -0
- package/Menu/MenuItem.d.ts +24 -0
- package/Menu/MenuItem.js +26 -0
- package/Menu/MenuItemGroup.d.ts +13 -0
- package/Menu/MenuItemGroup.js +15 -0
- package/Menu/index.d.ts +5 -0
- package/Menu/index.js +4 -0
- package/Message/Message.d.ts +33 -0
- package/Message/Message.js +59 -0
- package/Message/index.d.ts +2 -0
- package/Message/index.js +1 -0
- package/Modal/Modal.d.ts +42 -0
- package/Modal/Modal.js +75 -0
- package/Modal/ModalActions.d.ts +10 -0
- package/Modal/ModalActions.js +18 -0
- package/Modal/ModalBody.d.ts +8 -0
- package/Modal/ModalBody.js +14 -0
- package/Modal/ModalControl.d.ts +7 -0
- package/Modal/ModalControl.js +8 -0
- package/Modal/ModalFooter.d.ts +8 -0
- package/Modal/ModalFooter.js +14 -0
- package/Modal/ModalHeader.d.ts +20 -0
- package/Modal/ModalHeader.js +20 -0
- package/Modal/index.d.ts +6 -0
- package/Modal/index.js +5 -0
- package/Modal/useIsTopModal.d.ts +1 -0
- package/Modal/useIsTopModal.js +22 -0
- package/Navigation/Navigation.d.ts +29 -0
- package/Navigation/Navigation.js +48 -0
- package/Navigation/NavigationContext.d.ts +6 -0
- package/Navigation/NavigationContext.js +7 -0
- package/Navigation/NavigationItem.d.ts +31 -0
- package/Navigation/NavigationItem.js +22 -0
- package/Navigation/NavigationSubMenu.d.ts +17 -0
- package/Navigation/NavigationSubMenu.js +65 -0
- package/Navigation/index.d.ts +4 -0
- package/Navigation/index.js +4 -0
- package/Notification/Notification.d.ts +54 -0
- package/Notification/Notification.js +78 -0
- package/Notification/index.d.ts +2 -0
- package/Notification/index.js +1 -0
- package/Notifier/NotifierManager.d.ts +17 -0
- package/Notifier/NotifierManager.js +31 -0
- package/Notifier/createNotifier.d.ts +21 -0
- package/Notifier/createNotifier.js +67 -0
- package/Notifier/index.d.ts +2 -0
- package/Notifier/index.js +1 -0
- package/Notifier/typings.d.ts +28 -0
- package/Overlay/Overlay.d.ts +43 -0
- package/Overlay/Overlay.js +31 -0
- package/Overlay/index.d.ts +1 -0
- package/Overlay/index.js +1 -0
- package/PageFooter/PageFooter.d.ts +15 -0
- package/PageFooter/PageFooter.js +13 -0
- package/PageFooter/index.d.ts +1 -0
- package/PageFooter/index.js +1 -0
- package/Pagination/Pagination.d.ts +78 -0
- package/Pagination/Pagination.js +29 -0
- package/Pagination/PaginationItem.d.ts +27 -0
- package/Pagination/PaginationItem.js +25 -0
- package/Pagination/PaginationJumper.d.ts +38 -0
- package/Pagination/PaginationJumper.js +52 -0
- package/Pagination/index.d.ts +5 -0
- package/Pagination/index.js +4 -0
- package/Pagination/usePagination.d.ts +16 -0
- package/Pagination/usePagination.js +78 -0
- package/Picker/PickerTrigger.d.ts +40 -0
- package/Picker/PickerTrigger.js +15 -0
- package/Picker/RangePickerTrigger.d.ts +64 -0
- package/Picker/RangePickerTrigger.js +19 -0
- package/Picker/index.d.ts +7 -0
- package/Picker/index.js +7 -0
- package/Picker/usePickerDocumentEventClose.d.ts +10 -0
- package/Picker/usePickerDocumentEventClose.js +27 -0
- package/Picker/usePickerInputValue.d.ts +12 -0
- package/Picker/usePickerInputValue.js +24 -0
- package/Picker/usePickerValue.d.ts +21 -0
- package/Picker/usePickerValue.js +58 -0
- package/Picker/useRangePickerValue.d.ts +21 -0
- package/Picker/useRangePickerValue.js +94 -0
- package/Picker/useTabKeyClose.d.ts +2 -0
- package/Picker/useTabKeyClose.js +12 -0
- package/Popconfirm/Popconfirm.d.ts +16 -0
- package/Popconfirm/Popconfirm.js +15 -0
- package/Popconfirm/index.d.ts +1 -0
- package/Popconfirm/index.js +1 -0
- package/Popover/Popover.d.ts +23 -0
- package/Popover/Popover.js +45 -0
- package/Popover/index.d.ts +1 -0
- package/Popover/index.js +1 -0
- package/Popper/Popper.d.ts +32 -0
- package/Popper/Popper.js +30 -0
- package/Popper/index.d.ts +1 -0
- package/Popper/index.js +1 -0
- package/Portal/Portal.d.ts +20 -0
- package/Portal/Portal.js +22 -0
- package/Portal/index.d.ts +1 -0
- package/Portal/index.js +1 -0
- package/Progress/Progress.d.ts +59 -0
- package/Progress/Progress.js +32 -0
- package/Progress/index.d.ts +2 -0
- package/Progress/index.js +1 -0
- package/README.md +1 -0
- package/Radio/Radio.d.ts +41 -0
- package/Radio/Radio.js +31 -0
- package/Radio/RadioGroup.d.ts +47 -0
- package/Radio/RadioGroup.js +29 -0
- package/Radio/RadioGroupContext.d.ts +9 -0
- package/Radio/RadioGroupContext.js +5 -0
- package/Radio/index.d.ts +3 -0
- package/Radio/index.js +2 -0
- package/Select/AutoComplete.d.ts +75 -0
- package/Select/AutoComplete.js +108 -0
- package/Select/Option.d.ts +19 -0
- package/Select/Option.js +32 -0
- package/Select/Select.d.ts +57 -0
- package/Select/Select.js +145 -0
- package/Select/SelectControlContext.d.ts +3 -0
- package/Select/SelectControlContext.js +5 -0
- package/Select/SelectTrigger.d.ts +54 -0
- package/Select/SelectTrigger.js +27 -0
- package/Select/TreeSelect.d.ts +68 -0
- package/Select/TreeSelect.js +198 -0
- package/Select/index.d.ts +8 -0
- package/Select/index.js +7 -0
- package/Select/typings.d.ts +11 -0
- package/Skeleton/Skeleton.d.ts +22 -0
- package/Skeleton/Skeleton.js +14 -0
- package/Skeleton/index.d.ts +1 -0
- package/Skeleton/index.js +1 -0
- package/Slider/Slider.d.ts +51 -0
- package/Slider/Slider.js +172 -0
- package/Slider/index.d.ts +3 -0
- package/Slider/index.js +2 -0
- package/Slider/useSlider.d.ts +31 -0
- package/Slider/useSlider.js +104 -0
- package/Stepper/Step.d.ts +41 -0
- package/Stepper/Step.js +19 -0
- package/Stepper/Stepper.d.ts +19 -0
- package/Stepper/Stepper.js +33 -0
- package/Stepper/index.d.ts +2 -0
- package/Stepper/index.js +2 -0
- package/Switch/Switch.d.ts +43 -0
- package/Switch/Switch.js +29 -0
- package/Switch/index.d.ts +2 -0
- package/Switch/index.js +1 -0
- package/Table/Table.d.ts +79 -0
- package/Table/Table.js +111 -0
- package/Table/TableBody.d.ts +10 -0
- package/Table/TableBody.js +31 -0
- package/Table/TableBodyRow.d.ts +11 -0
- package/Table/TableBodyRow.js +63 -0
- package/Table/TableCell.d.ts +20 -0
- package/Table/TableCell.js +23 -0
- package/Table/TableContext.d.ts +46 -0
- package/Table/TableContext.js +7 -0
- package/Table/TableHeader.d.ts +3 -0
- package/Table/TableHeader.js +47 -0
- package/Table/editable/TableEditRenderWrapper.d.ts +8 -0
- package/Table/editable/TableEditRenderWrapper.js +15 -0
- package/Table/expandable/TableExpandable.d.ts +24 -0
- package/Table/expandable/TableExpandable.js +15 -0
- package/Table/index.d.ts +4 -0
- package/Table/index.js +3 -0
- package/Table/pagination/TablePagination.d.ts +10 -0
- package/Table/pagination/TablePagination.js +27 -0
- package/Table/pagination/useTablePagination.d.ts +16 -0
- package/Table/pagination/useTablePagination.js +49 -0
- package/Table/refresh/TableRefresh.d.ts +10 -0
- package/Table/refresh/TableRefresh.js +23 -0
- package/Table/rowSelection/TableRowSelection.d.ts +19 -0
- package/Table/rowSelection/TableRowSelection.js +86 -0
- package/Table/rowSelection/useTableRowSelection.d.ts +6 -0
- package/Table/rowSelection/useTableRowSelection.js +53 -0
- package/Table/sorting/TableSortingIcon.d.ts +11 -0
- package/Table/sorting/TableSortingIcon.js +28 -0
- package/Table/sorting/useTableSorting.d.ts +10 -0
- package/Table/sorting/useTableSorting.js +90 -0
- package/Table/useTableFetchMore.d.ts +10 -0
- package/Table/useTableFetchMore.js +50 -0
- package/Table/useTableLoading.d.ts +5 -0
- package/Table/useTableLoading.js +19 -0
- package/Table/useTableScroll.d.ts +272 -0
- package/Table/useTableScroll.js +170 -0
- package/Tabs/Tab.d.ts +19 -0
- package/Tabs/Tab.js +16 -0
- package/Tabs/TabPane.d.ts +14 -0
- package/Tabs/TabPane.js +18 -0
- package/Tabs/Tabs.d.ts +39 -0
- package/Tabs/Tabs.js +49 -0
- package/Tabs/index.d.ts +3 -0
- package/Tabs/index.js +3 -0
- package/Tabs/useTabsOverflow.d.ts +8 -0
- package/Tabs/useTabsOverflow.js +58 -0
- package/Tag/Tag.d.ts +29 -0
- package/Tag/Tag.js +23 -0
- package/Tag/index.d.ts +2 -0
- package/Tag/index.js +1 -0
- package/TextField/TextField.d.ts +54 -0
- package/TextField/TextField.js +39 -0
- package/TextField/index.d.ts +2 -0
- package/TextField/index.js +1 -0
- package/TextField/useTextFieldControl.d.ts +10 -0
- package/TextField/useTextFieldControl.js +15 -0
- package/Textarea/Textarea.d.ts +58 -0
- package/Textarea/Textarea.js +33 -0
- package/Textarea/index.d.ts +2 -0
- package/Textarea/index.js +1 -0
- package/TimePanel/TimePanel.d.ts +66 -0
- package/TimePanel/TimePanel.js +67 -0
- package/TimePanel/TimePanelAction.d.ts +18 -0
- package/TimePanel/TimePanelAction.js +15 -0
- package/TimePanel/TimePanelColumn.d.ts +37 -0
- package/TimePanel/TimePanelColumn.js +39 -0
- package/TimePanel/index.d.ts +3 -0
- package/TimePanel/index.js +3 -0
- package/TimePicker/TimePicker.d.ts +24 -0
- package/TimePicker/TimePicker.js +114 -0
- package/TimePicker/TimePickerPanel.d.ts +24 -0
- package/TimePicker/TimePickerPanel.js +14 -0
- package/TimePicker/index.d.ts +2 -0
- package/TimePicker/index.js +2 -0
- package/Tooltip/Tooltip.d.ts +25 -0
- package/Tooltip/Tooltip.js +37 -0
- package/Tooltip/index.d.ts +1 -0
- package/Tooltip/index.js +1 -0
- package/Tooltip/useDelayMouseEnterLeave.d.ts +12 -0
- package/Tooltip/useDelayMouseEnterLeave.js +41 -0
- package/Transition/Collapse.d.ts +15 -0
- package/Transition/Collapse.js +107 -0
- package/Transition/Fade.d.ts +8 -0
- package/Transition/Fade.js +84 -0
- package/Transition/Grow.d.ts +13 -0
- package/Transition/Grow.js +112 -0
- package/Transition/SlideFade.d.ts +15 -0
- package/Transition/SlideFade.js +93 -0
- package/Transition/Transition.d.ts +98 -0
- package/Transition/Transition.js +27 -0
- package/Transition/Zoom.d.ts +8 -0
- package/Transition/Zoom.js +84 -0
- package/Transition/getAutoSizeDuration.d.ts +1 -0
- package/Transition/getAutoSizeDuration.js +10 -0
- package/Transition/getTransitionStyleProps.d.ts +16 -0
- package/Transition/getTransitionStyleProps.js +25 -0
- package/Transition/index.d.ts +6 -0
- package/Transition/index.js +6 -0
- package/Transition/reflow.d.ts +4 -0
- package/Transition/reflow.js +9 -0
- package/Transition/useAutoTransitionDuration.d.ts +6 -0
- package/Transition/useAutoTransitionDuration.js +15 -0
- package/Transition/useSetNodeTransition.d.ts +7 -0
- package/Transition/useSetNodeTransition.js +35 -0
- package/Tree/Tree.d.ts +70 -0
- package/Tree/Tree.js +131 -0
- package/Tree/TreeNode.d.ts +41 -0
- package/Tree/TreeNode.js +41 -0
- package/Tree/TreeNodeList.d.ts +25 -0
- package/Tree/TreeNodeList.js +29 -0
- package/Tree/getTreeNodeEntities.d.ts +11 -0
- package/Tree/getTreeNodeEntities.js +86 -0
- package/Tree/index.d.ts +8 -0
- package/Tree/index.js +7 -0
- package/Tree/toggleValue.d.ts +4 -0
- package/Tree/toggleValue.js +19 -0
- package/Tree/traverseTree.d.ts +2 -0
- package/Tree/traverseTree.js +11 -0
- package/Tree/typings.d.ts +16 -0
- package/Tree/useTreeExpandedValue.d.ts +15 -0
- package/Tree/useTreeExpandedValue.js +32 -0
- package/Typography/Typography.d.ts +43 -0
- package/Typography/Typography.js +38 -0
- package/Typography/index.d.ts +11 -0
- package/Typography/index.js +2 -0
- package/Upload/UploadButton.d.ts +10 -0
- package/Upload/UploadButton.js +23 -0
- package/Upload/UploadInput.d.ts +21 -0
- package/Upload/UploadInput.js +22 -0
- package/Upload/UploadResult.d.ts +16 -0
- package/Upload/UploadResult.js +30 -0
- package/Upload/index.d.ts +3 -0
- package/Upload/index.js +2 -0
- package/_internal/InputCheck/InputCheck.d.ts +33 -0
- package/_internal/InputCheck/InputCheck.js +19 -0
- package/_internal/InputCheck/InputCheckGroup.d.ts +18 -0
- package/_internal/InputCheck/InputCheckGroup.js +14 -0
- package/_internal/InputCheck/index.d.ts +3 -0
- package/_internal/InputCheck/index.js +2 -0
- package/_internal/InputTriggerPopper/InputTriggerPopper.d.ts +18 -0
- package/_internal/InputTriggerPopper/InputTriggerPopper.js +44 -0
- package/_internal/InputTriggerPopper/index.d.ts +1 -0
- package/_internal/InputTriggerPopper/index.js +1 -0
- package/hooks/useClickAway.d.ts +5 -0
- package/hooks/useClickAway.js +23 -0
- package/hooks/useComposeRefs.d.ts +2 -0
- package/hooks/useComposeRefs.js +8 -0
- package/hooks/useDocumentEscapeKeyDown.d.ts +3 -0
- package/hooks/useDocumentEscapeKeyDown.js +20 -0
- package/hooks/useDocumentEvents.d.ts +5 -0
- package/hooks/useDocumentEvents.js +21 -0
- package/hooks/useDocumentTabKeyDown.d.ts +3 -0
- package/hooks/useDocumentTabKeyDown.js +19 -0
- package/hooks/useIsomorphicLayoutEffect.d.ts +2 -0
- package/hooks/useIsomorphicLayoutEffect.js +7 -0
- package/hooks/useLastCallback.d.ts +1 -0
- package/hooks/useLastCallback.js +11 -0
- package/hooks/useLastValue.d.ts +3 -0
- package/hooks/useLastValue.js +9 -0
- package/hooks/usePreviousValue.d.ts +1 -0
- package/hooks/usePreviousValue.js +11 -0
- package/hooks/useWindowWidth.d.ts +1 -0
- package/hooks/useWindowWidth.js +15 -0
- package/index.d.ts +100 -0
- package/index.js +148 -0
- package/package.json +61 -0
- package/utils/composeRefs.d.ts +21 -0
- package/utils/composeRefs.js +32 -0
- package/utils/cx.d.ts +1 -0
- package/utils/getElement.d.ts +3 -0
- package/utils/getElement.js +14 -0
- package/utils/jsx-types.d.ts +11 -0
- package/utils/rename-types.d.ts +5 -0
- package/utils/scroll-lock.d.ts +2 -0
- package/utils/scroll-lock.js +18 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { DetailedHTMLProps, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { PaginationItemProps } from './PaginationItem';
|
|
3
|
+
export interface PaginationProps extends Omit<DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, 'onChange'> {
|
|
4
|
+
/**
|
|
5
|
+
* Number of always visible pages at the beginning and end.
|
|
6
|
+
* @default 1
|
|
7
|
+
*/
|
|
8
|
+
boundaryCount?: number;
|
|
9
|
+
/**
|
|
10
|
+
* The text displayed in the jumper `button` content.
|
|
11
|
+
*/
|
|
12
|
+
buttonText?: string;
|
|
13
|
+
/**
|
|
14
|
+
* The current page number.
|
|
15
|
+
* @default 1
|
|
16
|
+
*/
|
|
17
|
+
current?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Whether the fields is disabled.
|
|
20
|
+
* @default false
|
|
21
|
+
*/
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* If `true`, hide the next-page button.
|
|
25
|
+
* @default false
|
|
26
|
+
*/
|
|
27
|
+
hideNextButton?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* If `true`, hide the previous-page button.
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
32
|
+
hidePreviousButton?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* The hint text displayed in front of jumper `input`.
|
|
35
|
+
*/
|
|
36
|
+
hintText?: string;
|
|
37
|
+
/**
|
|
38
|
+
* The hint displayed in the jumper `input` before the user enters a value.
|
|
39
|
+
*/
|
|
40
|
+
inputPlaceholder?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Render the item.
|
|
43
|
+
* @param {PaginationRenderItemParams} params The props to spread on a PaginationItem.
|
|
44
|
+
* @returns {ReactNode}
|
|
45
|
+
* @default (item) => <PaginationItem {...item} />
|
|
46
|
+
*/
|
|
47
|
+
itemRender?: (item: PaginationItemProps) => ReactNode;
|
|
48
|
+
/**
|
|
49
|
+
* Callback fired when the page is changed.
|
|
50
|
+
*
|
|
51
|
+
* @param {number} page The page active.
|
|
52
|
+
*/
|
|
53
|
+
onChange?: (page: number) => void;
|
|
54
|
+
/**
|
|
55
|
+
* Number of data per page
|
|
56
|
+
* @default 5
|
|
57
|
+
*/
|
|
58
|
+
pageSize?: number;
|
|
59
|
+
/**
|
|
60
|
+
* Show jumper or not.
|
|
61
|
+
*/
|
|
62
|
+
showJumper?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Number of always visible pages before and after the current page.
|
|
65
|
+
* @default 1
|
|
66
|
+
*/
|
|
67
|
+
siblingCount?: number;
|
|
68
|
+
/**
|
|
69
|
+
* Items total count.
|
|
70
|
+
* @default 0
|
|
71
|
+
*/
|
|
72
|
+
total?: number;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* The react component for `mezzanine` pagination.
|
|
76
|
+
*/
|
|
77
|
+
declare const Pagination: import("react").ForwardRefExoticComponent<Pick<PaginationProps, "onChange" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "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" | "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" | "boundaryCount" | "buttonText" | "current" | "disabled" | "hideNextButton" | "hidePreviousButton" | "hintText" | "inputPlaceholder" | "itemRender" | "pageSize" | "showJumper" | "siblingCount" | "total"> & import("react").RefAttributes<HTMLElement>>;
|
|
78
|
+
export default Pagination;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { paginationClasses } from '@mezzanine-ui/core/pagination';
|
|
4
|
+
import PaginationItem from './PaginationItem.js';
|
|
5
|
+
import PaginationJumper from './PaginationJumper.js';
|
|
6
|
+
import { usePagination } from './usePagination.js';
|
|
7
|
+
import cx from 'clsx';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The react component for `mezzanine` pagination.
|
|
11
|
+
*/
|
|
12
|
+
const Pagination = forwardRef((props, ref) => {
|
|
13
|
+
const { className, boundaryCount = 1, buttonText, current = 1, disabled = false, hideNextButton = false, hidePreviousButton = false, hintText, inputPlaceholder, itemRender = (item) => jsx(PaginationItem, Object.assign({}, item), void 0), onChange, pageSize = 5, showJumper = false, siblingCount = 1, total = 0, ...rest } = props;
|
|
14
|
+
const { items } = usePagination({
|
|
15
|
+
boundaryCount,
|
|
16
|
+
current,
|
|
17
|
+
disabled,
|
|
18
|
+
hideNextButton,
|
|
19
|
+
hidePreviousButton,
|
|
20
|
+
onChange,
|
|
21
|
+
pageSize,
|
|
22
|
+
siblingCount,
|
|
23
|
+
total,
|
|
24
|
+
});
|
|
25
|
+
return (jsx("nav", Object.assign({}, rest, { ref: ref, "aria-label": "pagination navigation", className: cx(paginationClasses.host, className) }, { children: jsxs("ul", Object.assign({ className: paginationClasses.container }, { children: [items.map((item, index) => (jsx("li", Object.assign({ className: paginationClasses.item }, { children: itemRender(item) }), index))),
|
|
26
|
+
showJumper && (jsx("li", Object.assign({ className: paginationClasses.jumper }, { children: jsx(PaginationJumper, { buttonText: buttonText, disabled: disabled, hintText: hintText, inputPlaceholder: inputPlaceholder, onChange: onChange, pageSize: pageSize, total: total }, void 0) }), void 0))] }), void 0) }), void 0));
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export default Pagination;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { DetailedHTMLProps, HTMLAttributes } from 'react';
|
|
2
|
+
import { PaginationItemType } from '@mezzanine-ui/core/pagination';
|
|
3
|
+
export declare 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;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { forwardRef, createElement } from 'react';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { paginationItemClasses } from '@mezzanine-ui/core/pagination';
|
|
4
|
+
import { ChevronRightIcon, ChevronLeftIcon } from '@mezzanine-ui/icons';
|
|
5
|
+
import Icon from '../Icon/Icon.js';
|
|
6
|
+
import cx from 'clsx';
|
|
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", Object.assign({}, rest, { ref: ref, className: cx(paginationItemClasses.host, paginationItemClasses.ellipsis, {
|
|
16
|
+
[paginationItemClasses.disabled]: disabled,
|
|
17
|
+
}, className) }, { children: "..." }), void 0)) : (createElement("button", Object.assign({}, 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 }, void 0),
|
|
22
|
+
type === 'page' && page));
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export default PaginationItem;
|
|
@@ -0,0 +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<Pick<PaginationJumperProps, "onChange" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "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" | "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;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef, useState } from 'react';
|
|
3
|
+
import { paginationJumperClasses } from '@mezzanine-ui/core/pagination';
|
|
4
|
+
import Typography from '../Typography/Typography.js';
|
|
5
|
+
import Button from '../Button/Button.js';
|
|
6
|
+
import Input from '../Input/Input.js';
|
|
7
|
+
import cx from 'clsx';
|
|
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", Object.assign({}, rest, { ref: ref, className: cx(paginationJumperClasses.host, className) }, { children: [jsx(Typography, Object.assign({ color: disabled ? 'text-disabled' : 'text-primary', component: "div", ellipsis: true, variant: "input2" }, { children: hintText }), void 0),
|
|
42
|
+
jsx(Input, { disabled: disabled, error: error, onChange: (e) => {
|
|
43
|
+
setValue(e.target.value);
|
|
44
|
+
}, placeholder: inputPlaceholder, inputProps: {
|
|
45
|
+
type: 'number',
|
|
46
|
+
className: paginationJumperClasses.input,
|
|
47
|
+
onKeyDown: handleKeyDown,
|
|
48
|
+
}, value: value }, void 0),
|
|
49
|
+
jsx(Button, Object.assign({ disabled: disabled, onClick: handleClick }, { children: buttonText }), void 0)] }), void 0));
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
export default PaginationJumper;
|
|
@@ -0,0 +1,5 @@
|
|
|
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 { usePagination } from './usePagination';
|
|
@@ -0,0 +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
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
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 = 5, 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
|
+
}
|
|
77
|
+
|
|
78
|
+
export { range, usePagination };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ChangeEventHandler, RefObject } from 'react';
|
|
2
|
+
import { TextFieldProps } from '../TextField';
|
|
3
|
+
import { NativeElementPropsWithoutKeyAndRef } from '../utils/jsx-types';
|
|
4
|
+
export interface PickerTriggerProps extends Omit<TextFieldProps, 'active' | 'children' | 'suffix' | 'defualtChecked'> {
|
|
5
|
+
/**
|
|
6
|
+
* React ref for the input element.
|
|
7
|
+
*/
|
|
8
|
+
inputRef?: RefObject<HTMLInputElement>;
|
|
9
|
+
/**
|
|
10
|
+
* Change handler for the input element.
|
|
11
|
+
*/
|
|
12
|
+
onChange?: ChangeEventHandler;
|
|
13
|
+
/**
|
|
14
|
+
* Placeholder for the input element.
|
|
15
|
+
*/
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Whether the input is readonly.
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
readOnly?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Whether the input is required.
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
required?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* The value of the input element.
|
|
29
|
+
*/
|
|
30
|
+
value?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Other input props you may provide to input element.
|
|
33
|
+
*/
|
|
34
|
+
inputProps?: Omit<NativeElementPropsWithoutKeyAndRef<'input'>, 'defaultValue' | 'disabled' | 'onChange' | 'placeholder' | 'readOnly' | 'required' | 'value' | `aria-${'disabled' | 'multiline' | 'readonly' | 'required'}`>;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The react component for `mezzanine` picker trigger.
|
|
38
|
+
*/
|
|
39
|
+
declare const PickerTrigger: import("react").ForwardRefExoticComponent<PickerTriggerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
40
|
+
export default PickerTrigger;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { pickerClasses } from '@mezzanine-ui/core/picker';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import TextField from '../TextField/TextField.js';
|
|
5
|
+
import cx from 'clsx';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* The react component for `mezzanine` picker trigger.
|
|
9
|
+
*/
|
|
10
|
+
const PickerTrigger = forwardRef(function PickerTrigger(props, ref) {
|
|
11
|
+
const { className, disabled, inputProps, inputRef, onChange, placeholder, readOnly, required, value, ...restTextFieldProps } = props;
|
|
12
|
+
return (jsx(TextField, Object.assign({}, restTextFieldProps, { ref: ref, active: !!value, className: cx(pickerClasses.host, className), disabled: disabled }, { children: jsx("input", Object.assign({}, inputProps, { ref: inputRef, "aria-disabled": disabled, "aria-multiline": false, "aria-readonly": readOnly, "aria-required": required, disabled: disabled, onChange: onChange, placeholder: placeholder, readOnly: readOnly, required: required, value: value }), void 0) }), void 0));
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export default PickerTrigger;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { ChangeEventHandler, MouseEventHandler, RefObject } from 'react';
|
|
2
|
+
import { TextFieldProps } from '../TextField';
|
|
3
|
+
import { NativeElementPropsWithoutKeyAndRef } from '../utils/jsx-types';
|
|
4
|
+
export interface RangePickerTriggerProps extends Omit<TextFieldProps, 'active' | 'children' | 'suffix' | 'defualtChecked' | 'placeholder'> {
|
|
5
|
+
/**
|
|
6
|
+
* Placeholder for the 'from' input element.
|
|
7
|
+
*/
|
|
8
|
+
inputFromPlaceholder?: string;
|
|
9
|
+
/**
|
|
10
|
+
* React Ref for the 'from' input element.
|
|
11
|
+
*/
|
|
12
|
+
inputFromRef?: RefObject<HTMLInputElement>;
|
|
13
|
+
/**
|
|
14
|
+
* Value of the 'from' input element.
|
|
15
|
+
*/
|
|
16
|
+
inputFromValue?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Placeholder for the 'to' input element.
|
|
19
|
+
*/
|
|
20
|
+
inputToPlaceholder?: string;
|
|
21
|
+
/**
|
|
22
|
+
* React Ref for the 'to' input element.
|
|
23
|
+
*/
|
|
24
|
+
inputToRef?: RefObject<HTMLInputElement>;
|
|
25
|
+
/**
|
|
26
|
+
* Value of the 'to' input element.
|
|
27
|
+
*/
|
|
28
|
+
inputToValue?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Click Handler for the calendar icon.
|
|
31
|
+
*/
|
|
32
|
+
onIconClick?: MouseEventHandler;
|
|
33
|
+
/**
|
|
34
|
+
* Change handler for the 'from' input element.
|
|
35
|
+
*/
|
|
36
|
+
onInputFromChange?: ChangeEventHandler;
|
|
37
|
+
/**
|
|
38
|
+
* Change handler for the 'to' input element.
|
|
39
|
+
*/
|
|
40
|
+
onInputToChange?: ChangeEventHandler;
|
|
41
|
+
/**
|
|
42
|
+
* Whether the inputs are readonly.
|
|
43
|
+
* @default false
|
|
44
|
+
*/
|
|
45
|
+
readOnly?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Whether the inputs are required.
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
required?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Other input props you may provide to the 'from' input element.
|
|
53
|
+
*/
|
|
54
|
+
inputFromProps?: Omit<NativeElementPropsWithoutKeyAndRef<'input'>, 'defaultValue' | 'disabled' | 'onChange' | 'placeholder' | 'readOnly' | 'required' | 'value' | `aria-${'disabled' | 'multiline' | 'readonly' | 'required'}`>;
|
|
55
|
+
/**
|
|
56
|
+
* Other input props you may provide to the 'to' input element.
|
|
57
|
+
*/
|
|
58
|
+
inputToProps?: Omit<NativeElementPropsWithoutKeyAndRef<'input'>, 'defaultValue' | 'disabled' | 'onChange' | 'placeholder' | 'readOnly' | 'required' | 'value' | `aria-${'disabled' | 'multiline' | 'readonly' | 'required'}`>;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* The react component for `mezzanine` date range picker trigger.
|
|
62
|
+
*/
|
|
63
|
+
declare const RangePickerTrigger: import("react").ForwardRefExoticComponent<RangePickerTriggerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
64
|
+
export default RangePickerTrigger;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { ArrowRightIcon } from '@mezzanine-ui/icons';
|
|
3
|
+
import { pickerClasses } from '@mezzanine-ui/core/picker';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
5
|
+
import TextField from '../TextField/TextField.js';
|
|
6
|
+
import Icon from '../Icon/Icon.js';
|
|
7
|
+
import cx from 'clsx';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The react component for `mezzanine` date range picker trigger.
|
|
11
|
+
*/
|
|
12
|
+
const RangePickerTrigger = forwardRef(function DateRangePickerTrigger(props, ref) {
|
|
13
|
+
const { className, disabled, inputFromPlaceholder, inputFromProps, inputFromRef, inputFromValue, inputToPlaceholder, inputToProps, inputToRef, inputToValue, onIconClick, onInputFromChange, onInputToChange, readOnly, required, ...restTextFieldProps } = props;
|
|
14
|
+
return (jsxs(TextField, Object.assign({}, restTextFieldProps, { ref: ref, active: !!inputFromValue || !!inputToValue, className: cx(pickerClasses.host, className), disabled: disabled }, { children: [jsx("input", Object.assign({}, inputFromProps, { ref: inputFromRef, "aria-disabled": disabled, "aria-multiline": false, "aria-readonly": readOnly, "aria-required": required, disabled: disabled, onChange: onInputFromChange, placeholder: inputFromPlaceholder, readOnly: readOnly, required: required, value: inputFromValue }), void 0),
|
|
15
|
+
jsx(Icon, { icon: ArrowRightIcon, className: pickerClasses.arrowIcon }, void 0),
|
|
16
|
+
jsx("input", Object.assign({}, inputToProps, { ref: inputToRef, "aria-disabled": disabled, "aria-multiline": false, "aria-readonly": readOnly, "aria-required": required, disabled: disabled, onChange: onInputToChange, placeholder: inputToPlaceholder, readOnly: readOnly, required: required, value: inputToValue }), void 0)] }), void 0));
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export default RangePickerTrigger;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { useTabKeyClose, } from './useTabKeyClose';
|
|
2
|
+
export { UsePickerDocumentEventCloseProps, usePickerDocumentEventClose, } from './usePickerDocumentEventClose';
|
|
3
|
+
export { UsePickerInputValueProps, usePickerInputValue, } from './usePickerInputValue';
|
|
4
|
+
export { UsePickerValueProps, usePickerValue, } from './usePickerValue';
|
|
5
|
+
export { UseRangePickerValueProps, useRangePickerValue, } from './useRangePickerValue';
|
|
6
|
+
export { PickerTriggerProps, default as PickerTrigger, } from './PickerTrigger';
|
|
7
|
+
export { RangePickerTriggerProps, default as RangePickerTrigger, } from './RangePickerTrigger';
|
package/Picker/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { useTabKeyClose } from './useTabKeyClose.js';
|
|
2
|
+
export { usePickerDocumentEventClose } from './usePickerDocumentEventClose.js';
|
|
3
|
+
export { usePickerInputValue } from './usePickerInputValue.js';
|
|
4
|
+
export { usePickerValue } from './usePickerValue.js';
|
|
5
|
+
export { useRangePickerValue } from './useRangePickerValue.js';
|
|
6
|
+
export { default as PickerTrigger } from './PickerTrigger.js';
|
|
7
|
+
export { default as RangePickerTrigger } from './RangePickerTrigger.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
export interface UsePickerDocumentEventCloseProps {
|
|
3
|
+
anchorRef: RefObject<HTMLElement>;
|
|
4
|
+
lastElementRefInFlow: RefObject<HTMLElement>;
|
|
5
|
+
onClose: VoidFunction;
|
|
6
|
+
onChangeClose: VoidFunction;
|
|
7
|
+
open?: boolean;
|
|
8
|
+
popperRef: RefObject<HTMLElement>;
|
|
9
|
+
}
|
|
10
|
+
export declare function usePickerDocumentEventClose({ anchorRef, lastElementRefInFlow, onClose, onChangeClose, open, popperRef, }: UsePickerDocumentEventCloseProps): void;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { useClickAway } from '../hooks/useClickAway.js';
|
|
2
|
+
import { useDocumentEscapeKeyDown } from '../hooks/useDocumentEscapeKeyDown.js';
|
|
3
|
+
import { useTabKeyClose } from './useTabKeyClose.js';
|
|
4
|
+
|
|
5
|
+
function usePickerDocumentEventClose({ anchorRef, lastElementRefInFlow, onClose, onChangeClose, open, popperRef, }) {
|
|
6
|
+
useClickAway(() => {
|
|
7
|
+
if (!open) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
return (event) => {
|
|
11
|
+
var _a;
|
|
12
|
+
if (!((_a = popperRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target))) {
|
|
13
|
+
onChangeClose();
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
}, anchorRef, [open, onClose]);
|
|
17
|
+
/** Close popper when escape key down */
|
|
18
|
+
useDocumentEscapeKeyDown(() => () => {
|
|
19
|
+
if (open) {
|
|
20
|
+
onClose();
|
|
21
|
+
}
|
|
22
|
+
}, [open, onClose]);
|
|
23
|
+
/** Close popper when tab key down */
|
|
24
|
+
useTabKeyClose(onChangeClose, lastElementRefInFlow, [onChangeClose]);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { usePickerDocumentEventClose };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface UsePickerInputValueProps {
|
|
3
|
+
defaultValue?: string;
|
|
4
|
+
initialValue?: string;
|
|
5
|
+
onChange?: (val: string) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function usePickerInputValue(props?: UsePickerInputValueProps): {
|
|
8
|
+
inputValue: string;
|
|
9
|
+
inputChangeHandler: (event: import("react").ChangeEvent<HTMLInputElement>) => void;
|
|
10
|
+
onChange: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
11
|
+
};
|
|
12
|
+
export default usePickerInputValue;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
|
|
3
|
+
function usePickerInputValue(props) {
|
|
4
|
+
const { defaultValue = '', initialValue = '', onChange: onChangeProp, } = props || {};
|
|
5
|
+
const [value, setValue] = useState(initialValue || defaultValue);
|
|
6
|
+
const onChange = (val) => {
|
|
7
|
+
setValue(val);
|
|
8
|
+
if (onChangeProp) {
|
|
9
|
+
onChangeProp(val);
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
const onInputChange = (event) => {
|
|
13
|
+
const val = event.target.value;
|
|
14
|
+
onChange(val);
|
|
15
|
+
};
|
|
16
|
+
return {
|
|
17
|
+
inputValue: value,
|
|
18
|
+
inputChangeHandler: onInputChange,
|
|
19
|
+
onChange: setValue,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export default usePickerInputValue;
|
|
24
|
+
export { usePickerInputValue };
|