@mezzanine-ui/react 0.13.10 → 0.13.12
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 -24
- package/Accordion/Accordion.js +25 -25
- package/Accordion/AccordionControlContext.d.ts +9 -9
- package/Accordion/AccordionDetails.d.ts +10 -10
- package/Accordion/AccordionDetails.js +16 -16
- package/Accordion/AccordionSummary.d.ts +18 -18
- package/Accordion/AccordionSummary.js +39 -39
- package/Accordion/index.d.ts +3 -3
- package/Alert/Alert.d.ts +20 -20
- package/Alert/Alert.js +9 -9
- package/Alert/index.d.ts +2 -2
- package/AppBar/AppBar.d.ts +14 -14
- package/AppBar/AppBar.js +25 -25
- package/AppBar/AppBarBrand.d.ts +5 -5
- package/AppBar/AppBarBrand.js +4 -4
- package/AppBar/AppBarMain.d.ts +5 -5
- package/AppBar/AppBarMain.js +4 -4
- package/AppBar/AppBarSupport.d.ts +5 -5
- package/AppBar/AppBarSupport.js +4 -4
- package/AppBar/index.d.ts +4 -4
- package/Badge/Badge.d.ts +19 -19
- package/Badge/Badge.js +20 -20
- package/Badge/BadgeContainer.d.ts +8 -8
- package/Badge/BadgeContainer.js +7 -7
- package/Badge/index.d.ts +2 -2
- package/Button/Button.d.ts +11 -11
- package/Button/Button.js +29 -29
- package/Button/ButtonGroup.d.ts +63 -63
- package/Button/ButtonGroup.js +29 -29
- package/Button/IconButton.d.ts +21 -21
- package/Button/IconButton.js +7 -7
- package/Button/index.d.ts +20 -20
- package/Button/index.js +1 -2
- package/Button/typings.d.ts +44 -44
- package/Calendar/Calendar.d.ts +69 -69
- package/Calendar/Calendar.js +38 -38
- package/Calendar/CalendarCell.d.ts +22 -22
- package/Calendar/CalendarCell.js +11 -11
- package/Calendar/CalendarContext.d.ts +22 -22
- package/Calendar/CalendarContext.js +28 -28
- package/Calendar/CalendarControls.d.ts +26 -26
- package/Calendar/CalendarControls.js +11 -11
- package/Calendar/CalendarDayOfWeek.d.ts +15 -15
- package/Calendar/CalendarDayOfWeek.js +9 -9
- package/Calendar/CalendarDays.d.ts +38 -38
- package/Calendar/CalendarDays.js +36 -36
- package/Calendar/CalendarMonths.d.ts +42 -42
- package/Calendar/CalendarMonths.js +22 -22
- package/Calendar/CalendarWeeks.d.ts +41 -41
- package/Calendar/CalendarWeeks.js +42 -42
- package/Calendar/CalendarYears.d.ts +40 -40
- package/Calendar/CalendarYears.js +25 -25
- package/Calendar/index.d.ts +12 -12
- package/Calendar/useCalendarControlModifiers.d.ts +7 -7
- package/Calendar/useCalendarControlModifiers.js +20 -20
- package/Calendar/useCalendarControls.d.ts +12 -12
- package/Calendar/useCalendarControls.js +27 -27
- package/Calendar/useCalendarModeStack.d.ts +6 -6
- package/Calendar/useCalendarModeStack.js +10 -10
- package/Card/Card.d.ts +51 -51
- package/Card/Card.js +12 -12
- package/Card/CardActions.d.ts +34 -34
- package/Card/CardActions.js +7 -7
- package/Card/index.d.ts +2 -2
- package/Checkbox/CheckAll.d.ts +13 -13
- package/Checkbox/CheckAll.js +28 -28
- package/Checkbox/Checkbox.d.ts +46 -46
- package/Checkbox/Checkbox.js +23 -23
- package/Checkbox/CheckboxGroup.d.ts +47 -47
- package/Checkbox/CheckboxGroup.js +27 -27
- package/Checkbox/CheckboxGroupContext.d.ts +9 -9
- package/Checkbox/index.d.ts +4 -4
- package/ConfirmActions/ConfirmActions.d.ts +45 -45
- package/ConfirmActions/ConfirmActions.js +8 -8
- package/ConfirmActions/index.d.ts +1 -1
- package/DatePicker/DatePicker.d.ts +32 -32
- package/DatePicker/DatePicker.js +119 -119
- package/DatePicker/DatePickerCalendar.d.ts +32 -32
- package/DatePicker/DatePickerCalendar.js +52 -52
- package/DatePicker/index.d.ts +2 -2
- package/DateRangePicker/DateRangePicker.d.ts +38 -38
- package/DateRangePicker/DateRangePicker.js +173 -173
- package/DateRangePicker/DateRangePickerCalendar.d.ts +26 -26
- package/DateRangePicker/DateRangePickerCalendar.js +86 -86
- package/DateRangePicker/index.d.ts +4 -4
- package/DateRangePicker/useDateRangeCalendarControls.d.ts +14 -14
- package/DateRangePicker/useDateRangeCalendarControls.js +84 -84
- package/DateRangePicker/useDateRangePickerValue.d.ts +23 -23
- package/DateRangePicker/useDateRangePickerValue.js +81 -81
- package/DateTimePicker/DateTimePicker.d.ts +28 -28
- package/DateTimePicker/DateTimePicker.js +107 -107
- package/DateTimePicker/DateTimePickerPanel.d.ts +29 -29
- package/DateTimePicker/DateTimePickerPanel.js +36 -36
- package/DateTimePicker/index.d.ts +2 -2
- package/Drawer/Drawer.d.ts +13 -13
- package/Drawer/Drawer.js +10 -10
- package/Drawer/index.d.ts +2 -2
- package/Dropdown/Dropdown.d.ts +25 -25
- package/Dropdown/Dropdown.js +52 -52
- package/Dropdown/index.d.ts +1 -1
- package/Empty/Empty.d.ts +18 -18
- package/Empty/Empty.js +6 -6
- package/Empty/index.d.ts +1 -1
- package/Form/FormControlContext.d.ts +9 -9
- package/Form/FormField.d.ts +27 -27
- package/Form/FormField.js +16 -16
- package/Form/FormLabel.d.ts +11 -11
- package/Form/FormLabel.js +8 -8
- package/Form/FormMessage.d.ts +8 -8
- package/Form/FormMessage.js +9 -9
- package/Form/index.d.ts +5 -5
- package/Form/typings.d.ts +4 -4
- package/Form/useAutoCompleteValueControl.d.ts +42 -42
- package/Form/useAutoCompleteValueControl.js +97 -94
- package/Form/useCheckboxControlValue.d.ts +11 -11
- package/Form/useCheckboxControlValue.js +24 -24
- package/Form/useControlValueState.d.ts +7 -7
- package/Form/useControlValueState.js +10 -10
- package/Form/useCustomControlValue.d.ts +5 -5
- package/Form/useCustomControlValue.js +12 -12
- package/Form/useInputControlValue.d.ts +7 -7
- package/Form/useInputControlValue.js +18 -18
- package/Form/useInputWithClearControlValue.d.ts +6 -6
- package/Form/useInputWithClearControlValue.js +28 -28
- package/Form/useInputWithTagsModeValue.d.ts +37 -37
- package/Form/useInputWithTagsModeValue.js +83 -83
- package/Form/useRadioControlValue.d.ts +11 -11
- package/Form/useRadioControlValue.js +19 -19
- package/Form/useSelectValueControl.d.ts +33 -33
- package/Form/useSelectValueControl.js +71 -71
- package/Form/useSwitchControlValue.d.ts +7 -7
- package/Form/useSwitchControlValue.js +18 -18
- package/Icon/Icon.d.ts +32 -32
- package/Icon/Icon.js +18 -18
- package/Icon/index.d.ts +3 -3
- package/Input/Input.d.ts +78 -78
- package/Input/Input.js +34 -34
- package/Input/index.d.ts +2 -2
- package/Loading/Loading.d.ts +34 -34
- package/Loading/Loading.js +19 -19
- package/Loading/index.d.ts +1 -1
- package/Menu/Menu.d.ts +29 -29
- package/Menu/Menu.js +16 -16
- package/Menu/MenuDivider.d.ts +8 -8
- package/Menu/MenuDivider.js +7 -7
- package/Menu/MenuItem.d.ts +24 -24
- package/Menu/MenuItem.js +16 -16
- package/Menu/MenuItemGroup.d.ts +13 -13
- package/Menu/MenuItemGroup.js +7 -7
- package/Menu/index.d.ts +5 -5
- package/Message/Message.d.ts +36 -36
- package/Message/Message.js +63 -63
- package/Message/index.d.ts +2 -2
- package/Modal/Modal.d.ts +37 -37
- package/Modal/Modal.js +15 -15
- package/Modal/ModalActions.d.ts +10 -10
- package/Modal/ModalActions.js +10 -10
- package/Modal/ModalBody.d.ts +8 -8
- package/Modal/ModalBody.js +7 -7
- package/Modal/ModalControl.d.ts +7 -7
- package/Modal/ModalControl.js +3 -3
- package/Modal/ModalFooter.d.ts +8 -8
- package/Modal/ModalFooter.js +7 -7
- package/Modal/ModalHeader.d.ts +20 -20
- package/Modal/ModalHeader.js +10 -10
- package/Modal/index.d.ts +7 -7
- package/Modal/useModalContainer.d.ts +6 -6
- package/Modal/useModalContainer.js +19 -19
- package/Navigation/Navigation.d.ts +29 -29
- package/Navigation/Navigation.js +45 -45
- package/Navigation/NavigationContext.d.ts +6 -6
- package/Navigation/NavigationContext.js +2 -2
- package/Navigation/NavigationItem.d.ts +31 -31
- package/Navigation/NavigationItem.js +13 -13
- package/Navigation/NavigationSubMenu.d.ts +22 -22
- package/Navigation/NavigationSubMenu.js +48 -48
- package/Navigation/index.d.ts +4 -4
- package/Notification/Notification.d.ts +54 -54
- package/Notification/Notification.js +60 -60
- package/Notification/index.d.ts +2 -2
- package/Notifier/NotifierManager.d.ts +17 -17
- package/Notifier/NotifierManager.js +25 -25
- package/Notifier/createNotifier.d.ts +21 -21
- package/Notifier/createNotifier.js +65 -65
- package/Notifier/index.d.ts +2 -2
- package/Notifier/typings.d.ts +28 -28
- package/Overlay/Overlay.d.ts +43 -43
- package/Overlay/Overlay.js +22 -22
- package/Overlay/index.d.ts +1 -1
- package/PageFooter/PageFooter.d.ts +15 -15
- package/PageFooter/PageFooter.js +4 -4
- package/PageFooter/index.d.ts +1 -1
- package/Pagination/Pagination.d.ts +105 -105
- package/Pagination/Pagination.js +18 -18
- package/Pagination/PaginationItem.d.ts +27 -27
- package/Pagination/PaginationItem.js +16 -16
- package/Pagination/PaginationJumper.d.ts +38 -38
- package/Pagination/PaginationJumper.js +40 -40
- package/Pagination/PaginationPageSize.d.ts +38 -38
- package/Pagination/PaginationPageSize.js +8 -8
- package/Pagination/index.d.ts +6 -6
- package/Pagination/usePagination.d.ts +16 -16
- package/Pagination/usePagination.js +73 -73
- package/Picker/PickerTrigger.d.ts +40 -40
- package/Picker/PickerTrigger.js +7 -7
- package/Picker/RangePickerTrigger.d.ts +64 -64
- package/Picker/RangePickerTrigger.js +7 -7
- package/Picker/index.d.ts +7 -7
- package/Picker/usePickerDocumentEventClose.d.ts +10 -10
- package/Picker/usePickerDocumentEventClose.js +20 -20
- package/Picker/usePickerInputValue.d.ts +12 -12
- package/Picker/usePickerInputValue.js +18 -18
- package/Picker/usePickerValue.d.ts +20 -20
- package/Picker/usePickerValue.js +51 -51
- package/Picker/useRangePickerValue.d.ts +20 -20
- package/Picker/useRangePickerValue.js +88 -88
- package/Picker/useTabKeyClose.d.ts +2 -2
- package/Picker/useTabKeyClose.js +7 -7
- package/Popconfirm/Popconfirm.d.ts +16 -16
- package/Popconfirm/Popconfirm.js +4 -4
- package/Popconfirm/index.d.ts +1 -1
- package/Popover/Popover.d.ts +23 -23
- package/Popover/Popover.js +34 -34
- package/Popover/index.d.ts +1 -1
- package/Popper/Popper.d.ts +32 -32
- package/Popper/Popper.js +21 -21
- package/Popper/index.d.ts +1 -1
- package/Portal/Portal.d.ts +20 -20
- package/Portal/Portal.js +15 -15
- package/Portal/index.d.ts +1 -1
- package/Progress/Progress.d.ts +59 -59
- package/Progress/Progress.js +21 -21
- package/Progress/index.d.ts +2 -2
- package/Provider/ConfigProvider.d.ts +8 -8
- package/Provider/ConfigProvider.js +6 -6
- package/Provider/context.d.ts +6 -6
- package/Provider/context.js +2 -2
- package/Provider/index.d.ts +4 -4
- package/Radio/Radio.d.ts +41 -41
- package/Radio/Radio.js +21 -21
- package/Radio/RadioGroup.d.ts +47 -47
- package/Radio/RadioGroup.js +20 -20
- package/Radio/RadioGroupContext.d.ts +9 -9
- package/Radio/index.d.ts +3 -3
- package/Select/AutoComplete.d.ts +101 -101
- package/Select/AutoComplete.js +101 -101
- package/Select/Option.d.ts +19 -19
- package/Select/Option.js +37 -37
- package/Select/Select.d.ts +94 -94
- package/Select/Select.js +111 -111
- package/Select/SelectControlContext.d.ts +3 -3
- package/Select/SelectTrigger.d.ts +89 -89
- package/Select/SelectTrigger.js +44 -44
- package/Select/SelectTriggerTags.d.ts +19 -19
- package/Select/SelectTriggerTags.js +21 -21
- package/Select/TreeSelect.d.ts +68 -68
- package/Select/TreeSelect.js +183 -183
- package/Select/index.d.ts +9 -9
- package/Select/typings.d.ts +12 -12
- package/Select/useSelectTriggerTags.d.ts +19 -19
- package/Select/useSelectTriggerTags.js +53 -53
- package/Skeleton/Skeleton.d.ts +22 -22
- package/Skeleton/Skeleton.js +7 -7
- package/Skeleton/index.d.ts +1 -1
- package/Slider/Slider.d.ts +51 -51
- package/Slider/Slider.js +174 -174
- package/Slider/index.d.ts +3 -3
- package/Slider/useSlider.d.ts +31 -31
- package/Slider/useSlider.js +99 -99
- package/Stepper/Step.d.ts +41 -41
- package/Stepper/Step.js +9 -9
- package/Stepper/Stepper.d.ts +19 -19
- package/Stepper/Stepper.js +26 -26
- package/Stepper/index.d.ts +2 -2
- package/Switch/Switch.d.ts +43 -43
- package/Switch/Switch.js +18 -18
- package/Switch/index.d.ts +2 -2
- package/Table/Table.d.ts +110 -110
- package/Table/Table.js +146 -146
- package/Table/TableBody.d.ts +10 -10
- package/Table/TableBody.js +13 -13
- package/Table/TableBodyRow.d.ts +12 -12
- package/Table/TableBodyRow.js +45 -45
- package/Table/TableCell.d.ts +20 -20
- package/Table/TableCell.js +15 -15
- package/Table/TableContext.d.ts +52 -52
- package/Table/TableContext.js +2 -2
- package/Table/TableExpandedTable.d.ts +12 -12
- package/Table/TableExpandedTable.js +14 -14
- package/Table/TableHeader.d.ts +4 -4
- package/Table/TableHeader.js +20 -20
- package/Table/draggable/useTableDraggable.d.ts +14 -14
- package/Table/draggable/useTableDraggable.js +54 -54
- package/Table/editable/TableEditRenderWrapper.d.ts +8 -8
- package/Table/editable/TableEditRenderWrapper.js +8 -8
- package/Table/expandable/TableExpandable.d.ts +28 -28
- package/Table/expandable/TableExpandable.js +15 -15
- package/Table/index.d.ts +6 -6
- package/Table/pagination/TablePagination.d.ts +10 -10
- package/Table/pagination/TablePagination.js +15 -15
- package/Table/pagination/useTablePagination.d.ts +8 -8
- package/Table/pagination/useTablePagination.js +21 -21
- package/Table/refresh/TableRefresh.d.ts +10 -10
- package/Table/refresh/TableRefresh.js +13 -13
- package/Table/rowSelection/TableRowSelection.d.ts +19 -19
- package/Table/rowSelection/TableRowSelection.js +70 -70
- package/Table/rowSelection/useTableRowSelection.d.ts +6 -6
- package/Table/rowSelection/useTableRowSelection.js +47 -47
- package/Table/sorting/TableSortingIcon.d.ts +11 -11
- package/Table/sorting/TableSortingIcon.js +18 -18
- package/Table/sorting/useTableSorting.d.ts +12 -12
- package/Table/sorting/useTableSorting.js +103 -103
- package/Table/useTableFetchMore.d.ts +10 -10
- package/Table/useTableFetchMore.js +42 -42
- package/Table/useTableLoading.d.ts +5 -5
- package/Table/useTableLoading.js +13 -13
- package/Table/useTableScroll.d.ts +550 -550
- package/Table/useTableScroll.js +275 -275
- package/Tabs/Tab.d.ts +19 -19
- package/Tabs/Tab.js +9 -9
- package/Tabs/TabPane.d.ts +14 -14
- package/Tabs/TabPane.js +11 -11
- package/Tabs/Tabs.d.ts +39 -39
- package/Tabs/Tabs.js +36 -36
- package/Tabs/index.d.ts +3 -3
- package/Tabs/useTabsOverflow.d.ts +8 -8
- package/Tabs/useTabsOverflow.js +56 -56
- package/Tag/Tag.d.ts +29 -29
- package/Tag/Tag.js +14 -14
- package/Tag/index.d.ts +2 -2
- package/TextField/TextField.d.ts +54 -54
- package/TextField/TextField.js +33 -33
- package/TextField/index.d.ts +2 -2
- package/TextField/useTextFieldControl.d.ts +10 -10
- package/TextField/useTextFieldControl.js +12 -12
- package/Textarea/Textarea.d.ts +58 -58
- package/Textarea/Textarea.js +22 -22
- package/Textarea/index.d.ts +2 -2
- package/TimePanel/TimePanel.d.ts +66 -66
- package/TimePanel/TimePanel.js +54 -54
- package/TimePanel/TimePanelAction.d.ts +18 -18
- package/TimePanel/TimePanelAction.js +7 -7
- package/TimePanel/TimePanelColumn.d.ts +37 -37
- package/TimePanel/TimePanelColumn.js +28 -28
- package/TimePanel/index.d.ts +3 -3
- package/TimePicker/TimePicker.d.ts +24 -24
- package/TimePicker/TimePicker.js +99 -99
- package/TimePicker/TimePickerPanel.d.ts +24 -24
- package/TimePicker/TimePickerPanel.js +7 -7
- package/TimePicker/index.d.ts +2 -2
- package/Tooltip/Tooltip.d.ts +25 -25
- package/Tooltip/Tooltip.js +27 -27
- package/Tooltip/index.d.ts +1 -1
- package/Tooltip/useDelayMouseEnterLeave.d.ts +12 -12
- package/Tooltip/useDelayMouseEnterLeave.js +36 -36
- package/Transition/Collapse.d.ts +15 -15
- package/Transition/Collapse.js +96 -96
- package/Transition/Fade.d.ts +8 -8
- package/Transition/Fade.js +74 -74
- package/Transition/Grow.d.ts +13 -13
- package/Transition/Grow.js +101 -101
- package/Transition/SlideFade.d.ts +15 -15
- package/Transition/SlideFade.js +83 -83
- package/Transition/Transition.d.ts +98 -98
- package/Transition/Transition.js +21 -21
- package/Transition/Zoom.d.ts +8 -8
- package/Transition/Zoom.js +74 -74
- package/Transition/getAutoSizeDuration.d.ts +1 -1
- package/Transition/getAutoSizeDuration.js +7 -7
- package/Transition/getTransitionStyleProps.d.ts +16 -16
- package/Transition/getTransitionStyleProps.js +22 -22
- package/Transition/index.d.ts +6 -6
- package/Transition/reflow.d.ts +4 -4
- package/Transition/reflow.js +6 -6
- package/Transition/useAutoTransitionDuration.d.ts +6 -6
- package/Transition/useAutoTransitionDuration.js +10 -10
- package/Transition/useSetNodeTransition.d.ts +7 -7
- package/Transition/useSetNodeTransition.js +30 -30
- package/Tree/Tree.d.ts +70 -70
- package/Tree/Tree.js +116 -116
- package/Tree/TreeNode.d.ts +41 -41
- package/Tree/TreeNode.js +29 -29
- package/Tree/TreeNodeList.d.ts +25 -25
- package/Tree/TreeNodeList.js +22 -22
- package/Tree/getTreeNodeEntities.d.ts +11 -11
- package/Tree/getTreeNodeEntities.js +84 -84
- package/Tree/index.d.ts +8 -8
- package/Tree/toggleValue.d.ts +4 -4
- package/Tree/toggleValue.js +13 -13
- package/Tree/traverseTree.d.ts +2 -2
- package/Tree/traverseTree.js +8 -8
- package/Tree/typings.d.ts +16 -16
- package/Tree/useTreeExpandedValue.d.ts +15 -15
- package/Tree/useTreeExpandedValue.js +26 -26
- package/Typography/Typography.d.ts +43 -43
- package/Typography/Typography.js +31 -31
- package/Typography/index.d.ts +11 -11
- package/Typography/index.js +4 -1
- package/Upload/UploadButton.d.ts +10 -10
- package/Upload/UploadButton.js +14 -14
- package/Upload/UploadInput.d.ts +21 -21
- package/Upload/UploadInput.js +18 -18
- package/Upload/UploadPicture.d.ts +49 -49
- package/Upload/UploadPicture.js +43 -43
- package/Upload/UploadPictureBlock.d.ts +20 -20
- package/Upload/UploadPictureBlock.js +70 -70
- package/Upload/UploadPictureWall.d.ts +81 -81
- package/Upload/UploadPictureWall.js +144 -144
- package/Upload/UploadPictureWallItem.d.ts +15 -15
- package/Upload/UploadPictureWallItem.js +10 -10
- package/Upload/UploadResult.d.ts +35 -35
- package/Upload/UploadResult.js +19 -19
- package/Upload/index.d.ts +6 -6
- package/_internal/InputCheck/InputCheck.d.ts +33 -33
- package/_internal/InputCheck/InputCheck.js +11 -11
- package/_internal/InputCheck/InputCheckGroup.d.ts +18 -18
- package/_internal/InputCheck/InputCheckGroup.js +7 -7
- package/_internal/InputCheck/index.d.ts +3 -3
- package/_internal/InputTriggerPopper/InputTriggerPopper.d.ts +18 -18
- package/_internal/InputTriggerPopper/InputTriggerPopper.js +35 -35
- package/_internal/InputTriggerPopper/index.d.ts +1 -1
- package/_internal/SlideFadeOverlay/SlideFadeOverlay.d.ts +21 -21
- package/_internal/SlideFadeOverlay/SlideFadeOverlay.js +53 -53
- package/_internal/SlideFadeOverlay/index.d.ts +1 -1
- package/_internal/SlideFadeOverlay/useTopStack.d.ts +1 -1
- package/_internal/SlideFadeOverlay/useTopStack.js +17 -17
- package/hooks/useClickAway.d.ts +5 -5
- package/hooks/useClickAway.js +18 -18
- package/hooks/useComposeRefs.d.ts +2 -2
- package/hooks/useComposeRefs.js +2 -2
- package/hooks/useDocumentEscapeKeyDown.d.ts +3 -3
- package/hooks/useDocumentEscapeKeyDown.js +15 -15
- package/hooks/useDocumentEvents.d.ts +5 -5
- package/hooks/useDocumentEvents.js +16 -16
- package/hooks/useDocumentTabKeyDown.d.ts +3 -3
- package/hooks/useDocumentTabKeyDown.js +14 -14
- package/hooks/useIsomorphicLayoutEffect.d.ts +2 -2
- package/hooks/useIsomorphicLayoutEffect.js +2 -2
- package/hooks/useLastCallback.d.ts +1 -1
- package/hooks/useLastCallback.js +5 -5
- package/hooks/useLastValue.d.ts +3 -3
- package/hooks/useLastValue.js +4 -4
- package/hooks/usePreviousValue.d.ts +1 -1
- package/hooks/usePreviousValue.js +6 -6
- package/hooks/useWindowWidth.d.ts +1 -1
- package/hooks/useWindowWidth.js +10 -10
- package/index.d.ts +102 -102
- package/package.json +6 -20
- package/utils/array-move.d.ts +1 -1
- package/utils/array-move.js +10 -10
- package/utils/composeRefs.d.ts +21 -21
- package/utils/composeRefs.js +29 -29
- package/utils/cx.d.ts +1 -1
- package/utils/general.d.ts +8 -8
- package/utils/getElement.d.ts +3 -3
- package/utils/getElement.js +11 -11
- package/utils/jsx-types.d.ts +11 -11
- package/utils/scroll-lock.d.ts +2 -2
- package/utils/scroll-lock.js +17 -17
package/Drawer/Drawer.js
CHANGED
|
@@ -4,16 +4,16 @@ import { drawerClasses } from '@mezzanine-ui/core/drawer';
|
|
|
4
4
|
import SlideFadeOverlay from '../_internal/SlideFadeOverlay/SlideFadeOverlay.js';
|
|
5
5
|
import cx from 'clsx';
|
|
6
6
|
|
|
7
|
-
const Drawer = forwardRef((props, ref) => {
|
|
8
|
-
const { className, children, container, disableCloseOnBackdropClick = false, disableCloseOnEscapeKeyDown = false, disablePortal, hideBackdrop, invisibleBackdrop, onBackdropClick, onClose, open, placement = 'left', ...rest } = props;
|
|
9
|
-
const slideFadeDirection = useMemo(() => ({
|
|
10
|
-
top: 'down',
|
|
11
|
-
left: 'right',
|
|
12
|
-
right: 'left',
|
|
13
|
-
bottom: 'up',
|
|
14
|
-
}), []);
|
|
15
|
-
return (jsx(SlideFadeOverlay, { className: drawerClasses.overlay, container: container, direction: slideFadeDirection[placement], disableCloseOnBackdropClick: disableCloseOnBackdropClick, disableCloseOnEscapeKeyDown: disableCloseOnEscapeKeyDown, disablePortal: disablePortal, hideBackdrop: hideBackdrop, invisibleBackdrop: invisibleBackdrop, onBackdropClick: onBackdropClick, onClose: onClose, open: open, ref: ref, children: jsx("div", { ...rest, className: cx(drawerClasses.host, drawerClasses[placement], className), children: children }) }));
|
|
16
|
-
});
|
|
7
|
+
const Drawer = forwardRef((props, ref) => {
|
|
8
|
+
const { className, children, container, disableCloseOnBackdropClick = false, disableCloseOnEscapeKeyDown = false, disablePortal, hideBackdrop, invisibleBackdrop, onBackdropClick, onClose, open, placement = 'left', ...rest } = props;
|
|
9
|
+
const slideFadeDirection = useMemo(() => ({
|
|
10
|
+
top: 'down',
|
|
11
|
+
left: 'right',
|
|
12
|
+
right: 'left',
|
|
13
|
+
bottom: 'up',
|
|
14
|
+
}), []);
|
|
15
|
+
return (jsx(SlideFadeOverlay, { className: drawerClasses.overlay, container: container, direction: slideFadeDirection[placement], disableCloseOnBackdropClick: disableCloseOnBackdropClick, disableCloseOnEscapeKeyDown: disableCloseOnEscapeKeyDown, disablePortal: disablePortal, hideBackdrop: hideBackdrop, invisibleBackdrop: invisibleBackdrop, onBackdropClick: onBackdropClick, onClose: onClose, open: open, ref: ref, children: jsx("div", { ...rest, className: cx(drawerClasses.host, drawerClasses[placement], className), children: children }) }));
|
|
16
|
+
});
|
|
17
17
|
var Drawer$1 = Drawer;
|
|
18
18
|
|
|
19
19
|
export { Drawer$1 as default };
|
package/Drawer/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { DrawerPlacement } from '@mezzanine-ui/core/drawer';
|
|
2
|
-
export { DrawerProps, default, } from './Drawer';
|
|
1
|
+
export type { DrawerPlacement } from '@mezzanine-ui/core/drawer';
|
|
2
|
+
export { DrawerProps, default, } from './Drawer';
|
package/Dropdown/Dropdown.d.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { DetailedHTMLProps, HTMLAttributes, ReactNode, Ref } from 'react';
|
|
2
|
-
import { PopperProps } from '../Popper';
|
|
3
|
-
import { ClickAwayEvent } from '../hooks/useClickAway';
|
|
4
|
-
export interface DropdownProps extends Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'ref' | 'children'> {
|
|
5
|
-
children: (ref: Ref<any>) => ReactNode;
|
|
6
|
-
/**
|
|
7
|
-
* Whether to disable triggering onClose while clicked away.
|
|
8
|
-
* @default false
|
|
9
|
-
*/
|
|
10
|
-
disableClickAway?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* The dropdown menu
|
|
13
|
-
*/
|
|
14
|
-
menu?: ReactNode;
|
|
15
|
-
/**
|
|
16
|
-
* The handler fired while clicked away.
|
|
17
|
-
*/
|
|
18
|
-
onClose?: (event: ClickAwayEvent) => void;
|
|
19
|
-
/**
|
|
20
|
-
* the props of popper
|
|
21
|
-
*/
|
|
22
|
-
popperProps?: PopperProps;
|
|
23
|
-
}
|
|
24
|
-
declare const Dropdown: import("react").ForwardRefExoticComponent<DropdownProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
25
|
-
export default Dropdown;
|
|
1
|
+
import { DetailedHTMLProps, HTMLAttributes, ReactNode, Ref } from 'react';
|
|
2
|
+
import { PopperProps } from '../Popper';
|
|
3
|
+
import { ClickAwayEvent } from '../hooks/useClickAway';
|
|
4
|
+
export interface DropdownProps extends Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'ref' | 'children'> {
|
|
5
|
+
children: (ref: Ref<any>) => ReactNode;
|
|
6
|
+
/**
|
|
7
|
+
* Whether to disable triggering onClose while clicked away.
|
|
8
|
+
* @default false
|
|
9
|
+
*/
|
|
10
|
+
disableClickAway?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* The dropdown menu
|
|
13
|
+
*/
|
|
14
|
+
menu?: ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* The handler fired while clicked away.
|
|
17
|
+
*/
|
|
18
|
+
onClose?: (event: ClickAwayEvent) => void;
|
|
19
|
+
/**
|
|
20
|
+
* the props of popper
|
|
21
|
+
*/
|
|
22
|
+
popperProps?: PopperProps;
|
|
23
|
+
}
|
|
24
|
+
declare const Dropdown: import("react").ForwardRefExoticComponent<DropdownProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
25
|
+
export default Dropdown;
|
package/Dropdown/Dropdown.js
CHANGED
|
@@ -4,58 +4,58 @@ import { useClickAway } from '../hooks/useClickAway.js';
|
|
|
4
4
|
import { useComposeRefs } from '../hooks/useComposeRefs.js';
|
|
5
5
|
import Popper from '../Popper/Popper.js';
|
|
6
6
|
|
|
7
|
-
const popperOptions = {
|
|
8
|
-
modifiers: [
|
|
9
|
-
{
|
|
10
|
-
name: 'sameWidth',
|
|
11
|
-
enabled: true,
|
|
12
|
-
phase: 'beforeWrite',
|
|
13
|
-
requires: ['computeStyles'],
|
|
14
|
-
fn: ({ state }) => {
|
|
15
|
-
const reassignState = state;
|
|
16
|
-
reassignState.styles.popper.width = 'auto';
|
|
17
|
-
reassignState.styles.popper.minWidth = `${state.rects.reference.width}px`;
|
|
18
|
-
},
|
|
19
|
-
effect: ({ state }) => {
|
|
20
|
-
const reassignState = state;
|
|
21
|
-
reassignState.elements.popper.style.width = 'auto';
|
|
22
|
-
reassignState.elements.popper.style.minWidth = `${state.elements.reference.getBoundingClientRect().width}px`;
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
],
|
|
26
|
-
};
|
|
27
|
-
const Dropdown = forwardRef(function Dropdown(props, ref) {
|
|
28
|
-
var _a;
|
|
29
|
-
const { children, disableClickAway = false, menu, onClose, popperProps, ...rest } = props;
|
|
30
|
-
const anchor = useRef(null);
|
|
31
|
-
const popperRef = useRef(null);
|
|
32
|
-
const composedRef = useComposeRefs([ref, popperRef]);
|
|
33
|
-
const open = popperProps === null || popperProps === void 0 ? void 0 : popperProps.open;
|
|
34
|
-
const modifiers = ((_a = popperProps === null || popperProps === void 0 ? void 0 : popperProps.options) === null || _a === void 0 ? void 0 : _a.modifiers) || [];
|
|
35
|
-
useClickAway(() => {
|
|
36
|
-
if (!open || disableClickAway || !onClose) {
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
return (event) => {
|
|
40
|
-
if (onClose) {
|
|
41
|
-
onClose(event);
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
}, popperRef, [
|
|
45
|
-
disableClickAway,
|
|
46
|
-
onClose,
|
|
47
|
-
open,
|
|
48
|
-
popperRef,
|
|
49
|
-
]);
|
|
50
|
-
return (jsxs(Fragment, { children: [children(anchor), jsx(Popper, { ...popperProps, ref: composedRef, ...rest, anchor: anchor, options: {
|
|
51
|
-
placement: 'top-start',
|
|
52
|
-
...popperProps === null || popperProps === void 0 ? void 0 : popperProps.options,
|
|
53
|
-
modifiers: [
|
|
54
|
-
...(popperOptions.modifiers || []),
|
|
55
|
-
...modifiers,
|
|
56
|
-
],
|
|
57
|
-
}, children: menu })] }));
|
|
58
|
-
});
|
|
7
|
+
const popperOptions = {
|
|
8
|
+
modifiers: [
|
|
9
|
+
{
|
|
10
|
+
name: 'sameWidth',
|
|
11
|
+
enabled: true,
|
|
12
|
+
phase: 'beforeWrite',
|
|
13
|
+
requires: ['computeStyles'],
|
|
14
|
+
fn: ({ state }) => {
|
|
15
|
+
const reassignState = state;
|
|
16
|
+
reassignState.styles.popper.width = 'auto';
|
|
17
|
+
reassignState.styles.popper.minWidth = `${state.rects.reference.width}px`;
|
|
18
|
+
},
|
|
19
|
+
effect: ({ state }) => {
|
|
20
|
+
const reassignState = state;
|
|
21
|
+
reassignState.elements.popper.style.width = 'auto';
|
|
22
|
+
reassignState.elements.popper.style.minWidth = `${state.elements.reference.getBoundingClientRect().width}px`;
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
};
|
|
27
|
+
const Dropdown = forwardRef(function Dropdown(props, ref) {
|
|
28
|
+
var _a;
|
|
29
|
+
const { children, disableClickAway = false, menu, onClose, popperProps, ...rest } = props;
|
|
30
|
+
const anchor = useRef(null);
|
|
31
|
+
const popperRef = useRef(null);
|
|
32
|
+
const composedRef = useComposeRefs([ref, popperRef]);
|
|
33
|
+
const open = popperProps === null || popperProps === void 0 ? void 0 : popperProps.open;
|
|
34
|
+
const modifiers = ((_a = popperProps === null || popperProps === void 0 ? void 0 : popperProps.options) === null || _a === void 0 ? void 0 : _a.modifiers) || [];
|
|
35
|
+
useClickAway(() => {
|
|
36
|
+
if (!open || disableClickAway || !onClose) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
return (event) => {
|
|
40
|
+
if (onClose) {
|
|
41
|
+
onClose(event);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}, popperRef, [
|
|
45
|
+
disableClickAway,
|
|
46
|
+
onClose,
|
|
47
|
+
open,
|
|
48
|
+
popperRef,
|
|
49
|
+
]);
|
|
50
|
+
return (jsxs(Fragment, { children: [children(anchor), jsx(Popper, { ...popperProps, ref: composedRef, ...rest, anchor: anchor, options: {
|
|
51
|
+
placement: 'top-start',
|
|
52
|
+
...popperProps === null || popperProps === void 0 ? void 0 : popperProps.options,
|
|
53
|
+
modifiers: [
|
|
54
|
+
...(popperOptions.modifiers || []),
|
|
55
|
+
...modifiers,
|
|
56
|
+
],
|
|
57
|
+
}, children: menu })] }));
|
|
58
|
+
});
|
|
59
59
|
var Dropdown$1 = Dropdown;
|
|
60
60
|
|
|
61
61
|
export { Dropdown$1 as default };
|
package/Dropdown/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { DropdownProps, default, } from './Dropdown';
|
|
1
|
+
export { DropdownProps, default, } from './Dropdown';
|
package/Empty/Empty.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { NativeElementPropsWithoutKeyAndRef } from '../utils/jsx-types';
|
|
3
|
-
export interface EmptyProps extends Omit<NativeElementPropsWithoutKeyAndRef<'div'>, 'title'> {
|
|
4
|
-
/**
|
|
5
|
-
* if true, the empty component will be 100% height of it's parent
|
|
6
|
-
*/
|
|
7
|
-
fullHeight?: boolean;
|
|
8
|
-
/**
|
|
9
|
-
* Override default icon.
|
|
10
|
-
*/
|
|
11
|
-
image?: ReactNode;
|
|
12
|
-
/**
|
|
13
|
-
* Optionally given a title. If not required, simply use react children to display description.
|
|
14
|
-
*/
|
|
15
|
-
title?: ReactNode;
|
|
16
|
-
}
|
|
17
|
-
declare const Empty: import("react").ForwardRefExoticComponent<EmptyProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
|
-
export default Empty;
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { NativeElementPropsWithoutKeyAndRef } from '../utils/jsx-types';
|
|
3
|
+
export interface EmptyProps extends Omit<NativeElementPropsWithoutKeyAndRef<'div'>, 'title'> {
|
|
4
|
+
/**
|
|
5
|
+
* if true, the empty component will be 100% height of it's parent
|
|
6
|
+
*/
|
|
7
|
+
fullHeight?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Override default icon.
|
|
10
|
+
*/
|
|
11
|
+
image?: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Optionally given a title. If not required, simply use react children to display description.
|
|
14
|
+
*/
|
|
15
|
+
title?: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
declare const Empty: import("react").ForwardRefExoticComponent<EmptyProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
|
+
export default Empty;
|
package/Empty/Empty.js
CHANGED
|
@@ -5,12 +5,12 @@ import { FolderOpenIcon } from '@mezzanine-ui/icons';
|
|
|
5
5
|
import Icon from '../Icon/Icon.js';
|
|
6
6
|
import cx from 'clsx';
|
|
7
7
|
|
|
8
|
-
const Empty = forwardRef(function Empty(props, ref) {
|
|
9
|
-
const { children, className, fullHeight, image = jsx(Icon, { className: emptyClasses.icon, icon: FolderOpenIcon }), title, ...rest } = props;
|
|
10
|
-
return (jsxs("div", { ref: ref, ...rest, className: cx(emptyClasses.host, {
|
|
11
|
-
[emptyClasses.fullHeight]: fullHeight,
|
|
12
|
-
}, className), children: [image, title && jsx("div", { className: emptyClasses.title, children: title }), children && jsx("div", { className: emptyClasses.description, children: children })] }));
|
|
13
|
-
});
|
|
8
|
+
const Empty = forwardRef(function Empty(props, ref) {
|
|
9
|
+
const { children, className, fullHeight, image = jsx(Icon, { className: emptyClasses.icon, icon: FolderOpenIcon }), title, ...rest } = props;
|
|
10
|
+
return (jsxs("div", { ref: ref, ...rest, className: cx(emptyClasses.host, {
|
|
11
|
+
[emptyClasses.fullHeight]: fullHeight,
|
|
12
|
+
}, className), children: [image, title && jsx("div", { className: emptyClasses.title, children: title }), children && jsx("div", { className: emptyClasses.description, children: children })] }));
|
|
13
|
+
});
|
|
14
14
|
var Empty$1 = Empty;
|
|
15
15
|
|
|
16
16
|
export { Empty$1 as default };
|
package/Empty/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { EmptyProps, default, } from './Empty';
|
|
1
|
+
export { EmptyProps, default, } from './Empty';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Severity } from '@mezzanine-ui/system/severity';
|
|
3
|
-
export interface FormControl {
|
|
4
|
-
disabled: boolean;
|
|
5
|
-
fullWidth: boolean;
|
|
6
|
-
required: boolean;
|
|
7
|
-
severity?: Severity;
|
|
8
|
-
}
|
|
9
|
-
export declare const FormControlContext: import("react").Context<FormControl | undefined>;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Severity } from '@mezzanine-ui/system/severity';
|
|
3
|
+
export interface FormControl {
|
|
4
|
+
disabled: boolean;
|
|
5
|
+
fullWidth: boolean;
|
|
6
|
+
required: boolean;
|
|
7
|
+
severity?: Severity;
|
|
8
|
+
}
|
|
9
|
+
export declare const FormControlContext: import("react").Context<FormControl | undefined>;
|
package/Form/FormField.d.ts
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Severity } from '@mezzanine-ui/system/severity';
|
|
3
|
-
import { NativeElementPropsWithoutKeyAndRef } from '../utils/jsx-types';
|
|
4
|
-
export interface FormFieldProps extends NativeElementPropsWithoutKeyAndRef<'div'> {
|
|
5
|
-
/**
|
|
6
|
-
* To control the field passed from children whether should be disabled.
|
|
7
|
-
* The form message won't appear if disabled.
|
|
8
|
-
*/
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
/**
|
|
11
|
-
* To control the field passed from children whether should be fullWidth.
|
|
12
|
-
*/
|
|
13
|
-
fullWidth?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* To control the field passed from children whether should be required.
|
|
16
|
-
*/
|
|
17
|
-
required?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* To control the severity of field passed from children and form message.
|
|
20
|
-
*/
|
|
21
|
-
severity?: Severity;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* The react component for `mezzanine` form field.
|
|
25
|
-
*/
|
|
26
|
-
declare const FormField: import("react").ForwardRefExoticComponent<FormFieldProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
27
|
-
export default FormField;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Severity } from '@mezzanine-ui/system/severity';
|
|
3
|
+
import { NativeElementPropsWithoutKeyAndRef } from '../utils/jsx-types';
|
|
4
|
+
export interface FormFieldProps extends NativeElementPropsWithoutKeyAndRef<'div'> {
|
|
5
|
+
/**
|
|
6
|
+
* To control the field passed from children whether should be disabled.
|
|
7
|
+
* The form message won't appear if disabled.
|
|
8
|
+
*/
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* To control the field passed from children whether should be fullWidth.
|
|
12
|
+
*/
|
|
13
|
+
fullWidth?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* To control the field passed from children whether should be required.
|
|
16
|
+
*/
|
|
17
|
+
required?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* To control the severity of field passed from children and form message.
|
|
20
|
+
*/
|
|
21
|
+
severity?: Severity;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The react component for `mezzanine` form field.
|
|
25
|
+
*/
|
|
26
|
+
declare const FormField: import("react").ForwardRefExoticComponent<FormFieldProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
27
|
+
export default FormField;
|
package/Form/FormField.js
CHANGED
|
@@ -4,22 +4,22 @@ import { formFieldClasses } from '@mezzanine-ui/core/form';
|
|
|
4
4
|
import { FormControlContext } from './FormControlContext.js';
|
|
5
5
|
import cx from 'clsx';
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
* The react component for `mezzanine` form field.
|
|
9
|
-
*/
|
|
10
|
-
const FormField = forwardRef(function FormField(props, ref) {
|
|
11
|
-
const { children, className, disabled = false, fullWidth = false, required = false, severity, ...rest } = props;
|
|
12
|
-
const formControl = {
|
|
13
|
-
disabled,
|
|
14
|
-
fullWidth,
|
|
15
|
-
required,
|
|
16
|
-
severity,
|
|
17
|
-
};
|
|
18
|
-
return (jsx("div", { ...rest, ref: ref, className: cx(formFieldClasses.host, severity && formFieldClasses.severity(severity), {
|
|
19
|
-
[formFieldClasses.disabled]: disabled,
|
|
20
|
-
[formFieldClasses.fullWidth]: fullWidth,
|
|
21
|
-
}, className), children: jsx(FormControlContext.Provider, { value: formControl, children: children }) }));
|
|
22
|
-
});
|
|
7
|
+
/**
|
|
8
|
+
* The react component for `mezzanine` form field.
|
|
9
|
+
*/
|
|
10
|
+
const FormField = forwardRef(function FormField(props, ref) {
|
|
11
|
+
const { children, className, disabled = false, fullWidth = false, required = false, severity, ...rest } = props;
|
|
12
|
+
const formControl = {
|
|
13
|
+
disabled,
|
|
14
|
+
fullWidth,
|
|
15
|
+
required,
|
|
16
|
+
severity,
|
|
17
|
+
};
|
|
18
|
+
return (jsx("div", { ...rest, ref: ref, className: cx(formFieldClasses.host, severity && formFieldClasses.severity(severity), {
|
|
19
|
+
[formFieldClasses.disabled]: disabled,
|
|
20
|
+
[formFieldClasses.fullWidth]: fullWidth,
|
|
21
|
+
}, className), children: jsx(FormControlContext.Provider, { value: formControl, children: children }) }));
|
|
22
|
+
});
|
|
23
23
|
var FormField$1 = FormField;
|
|
24
24
|
|
|
25
25
|
export { FormField$1 as default };
|
package/Form/FormLabel.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { NativeElementPropsWithoutKeyAndRef } from '../utils/jsx-types';
|
|
3
|
-
export interface FormLabelProps extends NativeElementPropsWithoutKeyAndRef<'label'> {
|
|
4
|
-
remark?: ReactNode;
|
|
5
|
-
remarkIcon?: ReactNode;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* The react component for `mezzanine` form label.
|
|
9
|
-
*/
|
|
10
|
-
declare const FormLabel: import("react").ForwardRefExoticComponent<FormLabelProps & import("react").RefAttributes<HTMLLabelElement>>;
|
|
11
|
-
export default FormLabel;
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { NativeElementPropsWithoutKeyAndRef } from '../utils/jsx-types';
|
|
3
|
+
export interface FormLabelProps extends NativeElementPropsWithoutKeyAndRef<'label'> {
|
|
4
|
+
remark?: ReactNode;
|
|
5
|
+
remarkIcon?: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The react component for `mezzanine` form label.
|
|
9
|
+
*/
|
|
10
|
+
declare const FormLabel: import("react").ForwardRefExoticComponent<FormLabelProps & import("react").RefAttributes<HTMLLabelElement>>;
|
|
11
|
+
export default FormLabel;
|
package/Form/FormLabel.js
CHANGED
|
@@ -4,14 +4,14 @@ import { formFieldClasses } from '@mezzanine-ui/core/form';
|
|
|
4
4
|
import { FormControlContext } from './FormControlContext.js';
|
|
5
5
|
import cx from 'clsx';
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
* The react component for `mezzanine` form label.
|
|
9
|
-
*/
|
|
10
|
-
const FormLabel = forwardRef(function FormLabel(props, ref) {
|
|
11
|
-
const { children, className, htmlFor, remark, remarkIcon, ...rest } = props;
|
|
12
|
-
const { required } = useContext(FormControlContext) || {};
|
|
13
|
-
return (jsxs("label", { ...rest, ref: ref, className: cx(formFieldClasses.label, className), htmlFor: htmlFor, children: [jsxs("span", { children: [children, required && jsx("span", { className: formFieldClasses.asterisk, children: "*" })] }), (remark || remarkIcon) && (jsxs("span", { className: formFieldClasses.remark, children: [jsx("span", { children: remark }), remarkIcon] }))] }));
|
|
14
|
-
});
|
|
7
|
+
/**
|
|
8
|
+
* The react component for `mezzanine` form label.
|
|
9
|
+
*/
|
|
10
|
+
const FormLabel = forwardRef(function FormLabel(props, ref) {
|
|
11
|
+
const { children, className, htmlFor, remark, remarkIcon, ...rest } = props;
|
|
12
|
+
const { required } = useContext(FormControlContext) || {};
|
|
13
|
+
return (jsxs("label", { ...rest, ref: ref, className: cx(formFieldClasses.label, className), htmlFor: htmlFor, children: [jsxs("span", { children: [children, required && jsx("span", { className: formFieldClasses.asterisk, children: "*" })] }), (remark || remarkIcon) && (jsxs("span", { className: formFieldClasses.remark, children: [jsx("span", { children: remark }), remarkIcon] }))] }));
|
|
14
|
+
});
|
|
15
15
|
var FormLabel$1 = FormLabel;
|
|
16
16
|
|
|
17
17
|
export { FormLabel$1 as default };
|
package/Form/FormMessage.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { NativeElementPropsWithoutKeyAndRef } from '../utils/jsx-types';
|
|
3
|
-
export
|
|
4
|
-
/**
|
|
5
|
-
* The react component for `mezzanine` form message.
|
|
6
|
-
*/
|
|
7
|
-
declare const FormMessage: import("react").ForwardRefExoticComponent<FormMessageProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
8
|
-
export default FormMessage;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { NativeElementPropsWithoutKeyAndRef } from '../utils/jsx-types';
|
|
3
|
+
export type FormMessageProps = NativeElementPropsWithoutKeyAndRef<'span'>;
|
|
4
|
+
/**
|
|
5
|
+
* The react component for `mezzanine` form message.
|
|
6
|
+
*/
|
|
7
|
+
declare const FormMessage: import("react").ForwardRefExoticComponent<FormMessageProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
8
|
+
export default FormMessage;
|
package/Form/FormMessage.js
CHANGED
|
@@ -5,15 +5,15 @@ import { FormControlContext } from './FormControlContext.js';
|
|
|
5
5
|
import Icon from '../Icon/Icon.js';
|
|
6
6
|
import cx from 'clsx';
|
|
7
7
|
|
|
8
|
-
/**
|
|
9
|
-
* The react component for `mezzanine` form message.
|
|
10
|
-
*/
|
|
11
|
-
const FormMessage = forwardRef(function FormMessage(props, ref) {
|
|
12
|
-
const { children, className, ...rest } = props;
|
|
13
|
-
const { severity } = useContext(FormControlContext) || {};
|
|
14
|
-
const icon = severity ? formMessageIcons[severity] : null;
|
|
15
|
-
return (jsxs("span", { ...rest, ref: ref, className: cx(formFieldClasses.message, className), children: [icon && (jsx(Icon, { className: formFieldClasses.severityIcon, icon: icon })), children] }));
|
|
16
|
-
});
|
|
8
|
+
/**
|
|
9
|
+
* The react component for `mezzanine` form message.
|
|
10
|
+
*/
|
|
11
|
+
const FormMessage = forwardRef(function FormMessage(props, ref) {
|
|
12
|
+
const { children, className, ...rest } = props;
|
|
13
|
+
const { severity } = useContext(FormControlContext) || {};
|
|
14
|
+
const icon = severity ? formMessageIcons[severity] : null;
|
|
15
|
+
return (jsxs("span", { ...rest, ref: ref, className: cx(formFieldClasses.message, className), children: [icon && (jsx(Icon, { className: formFieldClasses.severityIcon, icon: icon })), children] }));
|
|
16
|
+
});
|
|
17
17
|
var FormMessage$1 = FormMessage;
|
|
18
18
|
|
|
19
19
|
export { FormMessage$1 as default };
|
package/Form/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './typings';
|
|
2
|
-
export * from './FormControlContext';
|
|
3
|
-
export { FormFieldProps, default as FormField } from './FormField';
|
|
4
|
-
export { FormLabelProps, default as FormLabel } from './FormLabel';
|
|
5
|
-
export { FormMessageProps, default as FormMessage } from './FormMessage';
|
|
1
|
+
export * from './typings';
|
|
2
|
+
export * from './FormControlContext';
|
|
3
|
+
export { FormFieldProps, default as FormField } from './FormField';
|
|
4
|
+
export { FormLabelProps, default as FormLabel } from './FormLabel';
|
|
5
|
+
export { FormMessageProps, default as FormMessage } from './FormMessage';
|
package/Form/typings.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
onBlur?: VoidFunction;
|
|
3
|
-
onFocus?: VoidFunction;
|
|
4
|
-
};
|
|
1
|
+
export type FormElementFocusHandlers = {
|
|
2
|
+
onBlur?: VoidFunction;
|
|
3
|
+
onFocus?: VoidFunction;
|
|
4
|
+
};
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { Dispatch, MouseEvent, SetStateAction } from 'react';
|
|
2
|
-
import { SelectValue } from '../Select/typings';
|
|
3
|
-
export interface UseAutoCompleteBaseValueControl {
|
|
4
|
-
disabledOptionsFilter: boolean;
|
|
5
|
-
onChange?(newOptions: SelectValue[] | SelectValue | null): any;
|
|
6
|
-
onClear?(e: MouseEvent<Element>): void;
|
|
7
|
-
onClose?(): void;
|
|
8
|
-
onSearch?(input: string): any;
|
|
9
|
-
options: SelectValue[];
|
|
10
|
-
}
|
|
11
|
-
export
|
|
12
|
-
defaultValue?: SelectValue[];
|
|
13
|
-
mode: 'multiple';
|
|
14
|
-
onChange?(newOptions: SelectValue[]): any;
|
|
15
|
-
value?: SelectValue[];
|
|
16
|
-
};
|
|
17
|
-
export
|
|
18
|
-
defaultValue?: SelectValue;
|
|
19
|
-
mode: 'single';
|
|
20
|
-
onChange?(newOption: SelectValue | null): any;
|
|
21
|
-
value?: SelectValue | null;
|
|
22
|
-
};
|
|
23
|
-
export
|
|
24
|
-
export interface AutoCompleteBaseValueControl {
|
|
25
|
-
focused: boolean;
|
|
26
|
-
onClear(e: MouseEvent<Element>): void;
|
|
27
|
-
onFocus: (f: boolean) => void;
|
|
28
|
-
options: SelectValue[];
|
|
29
|
-
searchText: string;
|
|
30
|
-
selectedOptions: SelectValue[];
|
|
31
|
-
setSearchText: Dispatch<SetStateAction<string>>;
|
|
32
|
-
unselectedOptions: SelectValue[];
|
|
33
|
-
}
|
|
34
|
-
export
|
|
35
|
-
onChange: (v: SelectValue | null) => SelectValue[];
|
|
36
|
-
value: SelectValue[];
|
|
37
|
-
};
|
|
38
|
-
export
|
|
39
|
-
onChange: (v: SelectValue | null) => SelectValue | null;
|
|
40
|
-
value: SelectValue | null;
|
|
41
|
-
};
|
|
42
|
-
export declare const useAutoCompleteValueControl: (props: UseAutoCompleteValueControl) => AutoCompleteMultipleValueControl | AutoCompleteSingleValueControl;
|
|
1
|
+
import { Dispatch, MouseEvent, SetStateAction } from 'react';
|
|
2
|
+
import { SelectValue } from '../Select/typings';
|
|
3
|
+
export interface UseAutoCompleteBaseValueControl {
|
|
4
|
+
disabledOptionsFilter: boolean;
|
|
5
|
+
onChange?(newOptions: SelectValue[] | SelectValue | null): any;
|
|
6
|
+
onClear?(e: MouseEvent<Element>): void;
|
|
7
|
+
onClose?(): void;
|
|
8
|
+
onSearch?(input: string): any;
|
|
9
|
+
options: SelectValue[];
|
|
10
|
+
}
|
|
11
|
+
export type UseAutoCompleteMultipleValueControl = UseAutoCompleteBaseValueControl & {
|
|
12
|
+
defaultValue?: SelectValue[];
|
|
13
|
+
mode: 'multiple';
|
|
14
|
+
onChange?(newOptions: SelectValue[]): any;
|
|
15
|
+
value?: SelectValue[];
|
|
16
|
+
};
|
|
17
|
+
export type UseAutoCompleteSingleValueControl = UseAutoCompleteBaseValueControl & {
|
|
18
|
+
defaultValue?: SelectValue;
|
|
19
|
+
mode: 'single';
|
|
20
|
+
onChange?(newOption: SelectValue | null): any;
|
|
21
|
+
value?: SelectValue | null;
|
|
22
|
+
};
|
|
23
|
+
export type UseAutoCompleteValueControl = UseAutoCompleteMultipleValueControl | UseAutoCompleteSingleValueControl;
|
|
24
|
+
export interface AutoCompleteBaseValueControl {
|
|
25
|
+
focused: boolean;
|
|
26
|
+
onClear(e: MouseEvent<Element>): void;
|
|
27
|
+
onFocus: (f: boolean) => void;
|
|
28
|
+
options: SelectValue[];
|
|
29
|
+
searchText: string;
|
|
30
|
+
selectedOptions: SelectValue[];
|
|
31
|
+
setSearchText: Dispatch<SetStateAction<string>>;
|
|
32
|
+
unselectedOptions: SelectValue[];
|
|
33
|
+
}
|
|
34
|
+
export type AutoCompleteMultipleValueControl = AutoCompleteBaseValueControl & {
|
|
35
|
+
onChange: (v: SelectValue | null) => SelectValue[];
|
|
36
|
+
value: SelectValue[];
|
|
37
|
+
};
|
|
38
|
+
export type AutoCompleteSingleValueControl = AutoCompleteBaseValueControl & {
|
|
39
|
+
onChange: (v: SelectValue | null) => SelectValue | null;
|
|
40
|
+
value: SelectValue | null;
|
|
41
|
+
};
|
|
42
|
+
export declare const useAutoCompleteValueControl: (props: UseAutoCompleteValueControl) => AutoCompleteMultipleValueControl | AutoCompleteSingleValueControl;
|