@povio/ui 3.4.0-rc.14 → 3.4.0-rc.16
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/README.md +1 -1
- package/dist/assets/locales/en/{translation.json.js → translation.js} +1 -0
- package/dist/assets/locales/sl/{translation.json.js → translation.js} +1 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +17 -14
- package/dist/components/Breadcrumbs/Breadcrumbs.js +206 -55
- package/dist/components/Breadcrumbs/breadcrumbs.cva.d.ts +39 -40
- package/dist/components/Breadcrumbs/breadcrumbs.cva.js +5 -5
- package/dist/components/Menu/Menu.d.ts +20 -18
- package/dist/components/Menu/Menu.js +1 -1
- package/dist/components/Menu/MenuDesktop.js +2 -2
- package/dist/components/Menu/MenuItem.d.ts +6 -3
- package/dist/components/Menu/MenuItem.js +2 -2
- package/dist/components/Menu/MenuMobile.js +2 -2
- package/dist/components/Menu/MenuPopover.d.ts +7 -5
- package/dist/components/Menu/MenuPopover.js +2 -2
- package/dist/components/Menu/menu.cva.d.ts +35 -35
- package/dist/components/Menu/menu.cva.js +4 -4
- package/dist/components/buttons/Button/Button.d.ts +25 -23
- package/dist/components/buttons/Button/Button.js +1 -1
- package/dist/components/buttons/Button/button.cva.d.ts +89 -95
- package/dist/components/buttons/Button/button.cva.js +8 -44
- package/dist/components/buttons/IconButton/IconButton.d.ts +13 -10
- package/dist/components/buttons/IconButton/IconButton.js +1 -1
- package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +15 -12
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +34 -9
- package/dist/components/buttons/PillButton/PillButton.d.ts +14 -11
- package/dist/components/buttons/PillButton/PillButton.js +2 -2
- package/dist/components/buttons/PillButton/pillButton.cva.d.ts +33 -38
- package/dist/components/buttons/PillButton/pillButton.cva.js +5 -5
- package/dist/components/buttons/SplitButton/SplitButton.d.ts +14 -11
- package/dist/components/buttons/SplitButton/SplitButton.js +2 -2
- package/dist/components/buttons/TextButton/TextButton.d.ts +14 -11
- package/dist/components/buttons/TextButton/TextButton.js +1 -1
- package/dist/components/buttons/ToggleButton/ToggleButton.d.ts +11 -8
- package/dist/components/buttons/ToggleButton/ToggleButton.js +1 -1
- package/dist/components/buttons/shared/ButtonContent.js +80 -22
- package/dist/components/buttons/shared/buttonContent.cva.d.ts +6 -8
- package/dist/components/buttons/shared/buttonContent.cva.js +1 -1
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +22 -19
- package/dist/components/inputs/Checkbox/Checkbox.js +45 -201
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +1 -1
- package/dist/components/inputs/Checkbox/CheckboxGroup.d.ts +27 -25
- package/dist/components/inputs/Checkbox/CheckboxGroup.js +126 -355
- package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +73 -89
- package/dist/components/inputs/Checkbox/checkbox.cva.js +8 -8
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +40 -37
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +44 -35
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +46 -43
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +172 -168
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +41 -38
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +21 -18
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +29 -26
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +166 -541
- package/dist/components/inputs/DateTime/shared/Calendar.js +17 -14
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +17 -17
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +5 -4
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +8 -7
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +43 -43
- package/dist/components/inputs/DateTime/shared/DateField.js +19 -20
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +11 -45
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +1 -1
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +26 -102
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +28 -83
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +2 -2
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +58 -103
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +82 -193
- package/dist/components/inputs/DateTime/shared/TimeField.js +8 -27
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +111 -281
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +71 -214
- package/dist/components/inputs/DateTime/shared/YearPicker.js +68 -119
- package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +8 -5
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +16 -15
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +1 -1
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +11 -50
- package/dist/components/inputs/DateTime/shared/datePickerValue.utils.js +4 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +12 -11
- package/dist/components/inputs/DateTime/shared/useFirefoxDateSegmentSelectionGuard.js +12 -26
- package/dist/components/inputs/File/FileUpload.d.ts +7 -4
- package/dist/components/inputs/File/FileUpload.js +49 -88
- package/dist/components/inputs/File/FileUploadContainer.d.ts +5 -3
- package/dist/components/inputs/File/FileUploadContainer.js +10 -17
- package/dist/components/inputs/File/InputUpload.d.ts +7 -4
- package/dist/components/inputs/File/InputUpload.js +26 -65
- package/dist/components/inputs/File/fileUpload.types.d.ts +87 -84
- package/dist/components/inputs/File/inputUpload.types.d.ts +34 -32
- package/dist/components/inputs/File/inputUpload.types.js +1 -1
- package/dist/components/inputs/File/shared/FileCard.js +47 -110
- package/dist/components/inputs/File/shared/FileCardList.js +16 -54
- package/dist/components/inputs/File/shared/FileUploadContent.js +47 -188
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +1 -1
- package/dist/components/inputs/File/shared/FileUploadContentError.js +3 -3
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +3 -3
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +1 -1
- package/dist/components/inputs/File/shared/InputUploadContent.js +36 -149
- package/dist/components/inputs/File/shared/InputUploadFilled.js +8 -48
- package/dist/components/inputs/File/shared/ProgressBar.d.ts +6 -4
- package/dist/components/inputs/File/shared/ProgressBar.js +1 -1
- package/dist/components/inputs/File/shared/fileUpload.cva.d.ts +17 -16
- package/dist/components/inputs/File/shared/fileUpload.cva.js +1 -1
- package/dist/components/inputs/File/shared/inputUploadButton.cva.d.ts +24 -25
- package/dist/components/inputs/File/shared/inputUploadButton.cva.js +5 -5
- package/dist/components/inputs/File/shared/progressBar.cva.d.ts +34 -33
- package/dist/components/inputs/File/shared/progressBar.cva.js +5 -5
- package/dist/components/inputs/FormField/FormField.d.ts +21 -17
- package/dist/components/inputs/FormField/FormField.js +39 -119
- package/dist/components/inputs/FormField/FormFieldError.d.ts +9 -6
- package/dist/components/inputs/FormField/FormFieldError.js +6 -24
- package/dist/components/inputs/FormField/FormFieldHeader.d.ts +15 -13
- package/dist/components/inputs/FormField/FormFieldHeader.js +22 -78
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +7 -31
- package/dist/components/inputs/FormField/FormFieldHelper.js +7 -25
- package/dist/components/inputs/FormField/FormFieldLabel.js +9 -40
- package/dist/components/inputs/FormField/formFieldError.cva.d.ts +13 -12
- package/dist/components/inputs/FormField/formFieldError.cva.js +1 -1
- package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +13 -12
- package/dist/components/inputs/FormField/formFieldHeader.cva.js +1 -1
- package/dist/components/inputs/FormField/formFieldHelper.cva.d.ts +13 -12
- package/dist/components/inputs/FormField/formFieldHelper.cva.js +1 -1
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +25 -21
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +145 -394
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +11 -45
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +120 -553
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +37 -34
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +93 -164
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.d.ts +10 -7
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +12 -50
- package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +8 -7
- package/dist/components/inputs/Input/TextArea/TextArea.cva.js +1 -1
- package/dist/components/inputs/Input/TextArea/TextArea.d.ts +20 -18
- package/dist/components/inputs/Input/TextArea/TextArea.js +96 -304
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +24 -20
- package/dist/components/inputs/Input/TextInput/TextInput.js +151 -380
- package/dist/components/inputs/Input/shared/InputContent.d.ts +25 -27
- package/dist/components/inputs/Input/shared/InputContent.js +59 -193
- package/dist/components/inputs/Input/shared/numberStatic.utils.js +1 -1
- package/dist/components/inputs/Inputs/Form.d.ts +19 -19
- package/dist/components/inputs/Inputs/Form.js +23 -51
- package/dist/components/inputs/Inputs/InputItem.d.ts +77 -58
- package/dist/components/inputs/Inputs/InputItem.js +16 -65
- package/dist/components/inputs/Inputs/Inputs.d.ts +12 -9
- package/dist/components/inputs/Inputs/Inputs.js +11 -37
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +23 -21
- package/dist/components/inputs/RadioGroup/RadioGroup.js +114 -320
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +49 -59
- package/dist/components/inputs/RadioGroup/radio.cva.js +6 -6
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +15 -11
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +25 -55
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +8 -4
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +46 -117
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +25 -38
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +18 -14
- package/dist/components/inputs/Selection/Select/QuerySelect.js +58 -115
- package/dist/components/inputs/Selection/Select/Select.d.ts +15 -11
- package/dist/components/inputs/Selection/Select/Select.js +35 -111
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +39 -37
- package/dist/components/inputs/Selection/shared/SelectBase.js +26 -70
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +144 -392
- package/dist/components/inputs/Selection/shared/SelectInput.js +161 -428
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +26 -100
- package/dist/components/inputs/Selection/shared/SelectListBox.js +1 -1
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +35 -85
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +16 -69
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +23 -71
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +9 -58
- package/dist/components/inputs/Selection/shared/SelectMobile.js +1 -1
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +14 -39
- package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +8 -15
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +6 -6
- package/dist/components/inputs/Selection/shared/select.context.js +52 -52
- package/dist/components/inputs/Selection/shared/select.types.d.ts +60 -62
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +8 -5
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +1 -1
- package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +12 -11
- package/dist/components/inputs/Selection/shared/selectInput.cva.js +1 -1
- package/dist/components/inputs/Selection/shared/selectItem.cva.d.ts +16 -15
- package/dist/components/inputs/Selection/shared/selectItem.cva.js +1 -1
- package/dist/components/inputs/Selection/shared/staticSelect.utils.js +3 -3
- package/dist/components/inputs/Selection/shared/useSelectItems.js +12 -12
- package/dist/components/inputs/Skeleton/InputFrame.js +27 -27
- package/dist/components/inputs/Slider/Slider.d.ts +20 -17
- package/dist/components/inputs/Slider/Slider.js +86 -268
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +24 -20
- package/dist/components/inputs/TextEditor/TextEditor.js +21 -62
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +11 -37
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +30 -102
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +45 -194
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +28 -88
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +14 -48
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +19 -66
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +15 -49
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +32 -92
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +54 -126
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +38 -141
- package/dist/components/inputs/TextEditor/textEditor.types.js +1 -1
- package/dist/components/inputs/Toggle/Toggle.d.ts +18 -15
- package/dist/components/inputs/Toggle/Toggle.js +50 -210
- package/dist/components/inputs/Toggle/toggle.cva.d.ts +15 -18
- package/dist/components/inputs/Toggle/toggle.cva.js +3 -3
- package/dist/components/inputs/shared/CheckContent.js +11 -21
- package/dist/components/inputs/shared/InputClear.js +30 -102
- package/dist/components/inputs/shared/TooltipWrapper.js +13 -48
- package/dist/components/inputs/shared/form.binding.d.ts +7 -27
- package/dist/components/inputs/shared/form.binding.js +8 -37
- package/dist/components/inputs/shared/form.types.d.ts +11 -11
- package/dist/components/inputs/shared/form.types.js +1 -1
- package/dist/components/inputs/shared/input.cva.d.ts +76 -85
- package/dist/components/inputs/shared/input.cva.js +9 -19
- package/dist/components/inputs/shared/label.cva.d.ts +18 -18
- package/dist/components/inputs/shared/label.cva.js +2 -2
- package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +10 -7
- package/dist/components/inputs/shared/tooltipWrapper.cva.js +1 -1
- package/dist/components/inputs/shared/useFieldAccessibility.js +19 -0
- package/dist/components/inputs/shared/useStaticInputHandoff.js +50 -105
- package/dist/components/navigation/Accordion/Accordion.d.ts +5 -3
- package/dist/components/navigation/Accordion/Accordion.js +69 -22
- package/dist/components/navigation/Accordion/AccordionItem.js +86 -41
- package/dist/components/navigation/Accordion/accordion.cva.d.ts +76 -100
- package/dist/components/navigation/Accordion/accordion.cva.js +10 -10
- package/dist/components/navigation/Accordion/accordion.types.d.ts +52 -49
- package/dist/components/navigation/Stepper/Stepper.d.ts +5 -2
- package/dist/components/navigation/Stepper/Stepper.js +67 -22
- package/dist/components/navigation/Stepper/StepperItem.js +2 -2
- package/dist/components/navigation/Stepper/StepperSeparator.js +1 -1
- package/dist/components/navigation/Stepper/stepper.cva.d.ts +73 -86
- package/dist/components/navigation/Stepper/stepper.cva.js +7 -7
- package/dist/components/navigation/Stepper/stepper.types.d.ts +29 -37
- package/dist/components/outline.clsx.d.ts +4 -2
- package/dist/components/outline.clsx.js +2 -2
- package/dist/components/overlays/ActionModal/ActionModal.d.ts +23 -21
- package/dist/components/overlays/ActionModal/ActionModal.js +170 -36
- package/dist/components/overlays/BottomSheet/BottomSheet.d.ts +30 -28
- package/dist/components/overlays/BottomSheet/BottomSheet.js +13 -10
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +2 -2
- package/dist/components/overlays/Drawer/Drawer.d.ts +17 -14
- package/dist/components/overlays/Drawer/Drawer.js +3 -3
- package/dist/components/overlays/Modal/Modal.d.ts +18 -14
- package/dist/components/overlays/Modal/Modal.js +3 -1
- package/dist/components/overlays/Modal/modal.cva.d.ts +34 -34
- package/dist/components/overlays/Modal/modal.cva.js +4 -4
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.d.ts +16 -14
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +110 -29
- package/dist/components/overlays/Tooltip/Tooltip.d.ts +15 -12
- package/dist/components/overlays/Tooltip/Tooltip.js +3 -3
- package/dist/components/overlays/Tooltip/TooltipEllipsis.d.ts +10 -7
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +2 -2
- package/dist/components/overlays/Tooltip/tooltip.cva.d.ts +39 -45
- package/dist/components/overlays/Tooltip/tooltip.cva.js +4 -4
- package/dist/components/segment/Segment.d.ts +7 -4
- package/dist/components/segment/Segment.js +3 -3
- package/dist/components/segment/SegmentItem.js +2 -2
- package/dist/components/segment/segment.cva.d.ts +20 -18
- package/dist/components/segment/segment.cva.js +2 -2
- package/dist/components/segment/segment.types.d.ts +33 -30
- package/dist/components/shared/pagination/Pagination.d.ts +11 -8
- package/dist/components/shared/pagination/Pagination.js +108 -22
- package/dist/components/shared/pagination/PaginationList.d.ts +17 -14
- package/dist/components/shared/pagination/PaginationList.js +2 -2
- package/dist/components/shared/pagination/minWidth.cva.js +1 -1
- package/dist/components/shared/popover.cva.d.ts +8 -7
- package/dist/components/shared/popover.cva.js +1 -1
- package/dist/components/status/Alert/Alert.d.ts +13 -10
- package/dist/components/status/Alert/Alert.js +97 -30
- package/dist/components/status/Alert/alert.cva.d.ts +21 -18
- package/dist/components/status/Alert/alert.cva.js +1 -1
- package/dist/components/status/Loader/Loader.d.ts +7 -5
- package/dist/components/status/Loader/Loader.js +1 -1
- package/dist/components/status/Loader/loader.cva.d.ts +23 -26
- package/dist/components/status/Loader/loader.cva.js +4 -4
- package/dist/components/status/Toast/Toast.d.ts +15 -12
- package/dist/components/status/Toast/Toast.js +2 -2
- package/dist/components/status/Toast/toast.cva.d.ts +58 -77
- package/dist/components/status/Toast/toast.cva.js +6 -6
- package/dist/components/status/Toast/useToast.d.ts +14 -11
- package/dist/components/status/Toast/useToast.js +1 -1
- package/dist/components/status/shared/status.cva.d.ts +32 -28
- package/dist/components/status/shared/status.cva.js +2 -2
- package/dist/components/table/CellText.d.ts +10 -7
- package/dist/components/table/CellText.js +3 -2
- package/dist/components/table/ColumnConfig.d.ts +12 -9
- package/dist/components/table/ColumnConfig.js +6 -5
- package/dist/components/table/HeaderText.d.ts +10 -7
- package/dist/components/table/HeaderText.js +3 -2
- package/dist/components/table/InfiniteTable.d.ts +10 -8
- package/dist/components/table/InfiniteTable.js +67 -16
- package/dist/components/table/PaginatedTable.d.ts +12 -10
- package/dist/components/table/PaginatedTable.js +1 -1
- package/dist/components/table/Table.d.ts +34 -35
- package/dist/components/table/Table.js +18 -16
- package/dist/components/table/table.cva.d.ts +40 -59
- package/dist/components/table/table.cva.js +7 -7
- package/dist/components/text/Link/Link.d.ts +10 -8
- package/dist/components/text/Link/Link.js +2 -2
- package/dist/components/text/Link/link.cva.d.ts +14 -11
- package/dist/components/text/Link/link.cva.js +1 -1
- package/dist/components/text/Pill/Pill.d.ts +17 -14
- package/dist/components/text/Pill/Pill.js +1 -1
- package/dist/components/text/Tag/Tag.d.ts +17 -14
- package/dist/components/text/Tag/Tag.js +1 -1
- package/dist/components/text/Tag/tag.cva.d.ts +18 -15
- package/dist/components/text/Tag/tag.cva.js +1 -1
- package/dist/components/text/Typography/Typography.d.ts +10 -9
- package/dist/components/text/Typography/Typography.js +23 -8
- package/dist/components/text/Typography/typography.cva.d.ts +51 -48
- package/dist/components/text/Typography/typography.cva.js +1 -1
- package/dist/config/confirmation.context.d.ts +22 -19
- package/dist/config/confirmation.context.js +2 -2
- package/dist/config/i18n.d.ts +311 -308
- package/dist/config/i18n.js +4 -4
- package/dist/config/link.context.d.ts +9 -7
- package/dist/config/link.context.js +2 -2
- package/dist/config/router.context.d.ts +11 -9
- package/dist/config/router.context.js +2 -2
- package/dist/config/theme.context.d.ts +19 -16
- package/dist/config/theme.context.js +99 -46
- package/dist/config/uiConfig.context.d.ts +80 -75
- package/dist/config/uiConfig.context.js +46 -9
- package/dist/config/uiOverrides.context.d.ts +205 -204
- package/dist/config/uiOverrides.context.js +2 -2
- package/dist/helpers/dynamicColumns.d.ts +27 -28
- package/dist/helpers/dynamicColumns.js +32 -31
- package/dist/helpers/dynamicInputs.d.ts +66 -74
- package/dist/helpers/dynamicInputs.js +21 -20
- package/dist/hooks/useAutosave.d.ts +12 -9
- package/dist/hooks/useAutosave.js +1 -1
- package/dist/hooks/useBreakpoint.d.ts +4 -2
- package/dist/hooks/useBreakpoint.js +37 -10
- package/dist/hooks/useDebounceCallback.d.ts +7 -4
- package/dist/hooks/useDebounceCallback.js +51 -17
- package/dist/hooks/useDeepCompare.d.ts +7 -4
- package/dist/hooks/useDeepCompare.js +4 -4
- package/dist/hooks/useFilters.d.ts +10 -7
- package/dist/hooks/useFilters.js +8 -6
- package/dist/hooks/useForm.d.ts +35 -35
- package/dist/hooks/useForm.js +6 -6
- package/dist/hooks/useFormAutosave.d.ts +16 -13
- package/dist/hooks/useFormAutosave.js +18 -17
- package/dist/hooks/useIntersectionObserver.d.ts +7 -5
- package/dist/hooks/useIntersectionObserver.js +2 -2
- package/dist/hooks/useKeyInteractions.d.ts +19 -16
- package/dist/hooks/useKeyInteractions.js +5 -5
- package/dist/hooks/useLocalStorage.d.ts +10 -8
- package/dist/hooks/useLocalStorage.js +3 -3
- package/dist/hooks/useLongPressRepeat.d.ts +10 -7
- package/dist/hooks/useLongPressRepeat.js +55 -20
- package/dist/hooks/usePagination.d.ts +9 -6
- package/dist/hooks/usePagination.js +2 -2
- package/dist/hooks/useQueryAutocomplete.js +2 -2
- package/dist/hooks/useScrollableListBox.d.ts +5 -2
- package/dist/hooks/useScrollableListBox.js +1 -1
- package/dist/hooks/useSorting.d.ts +8 -5
- package/dist/hooks/useSorting.js +1 -1
- package/dist/hooks/useStateAndRef.d.ts +5 -3
- package/dist/hooks/useStateAndRef.js +2 -2
- package/dist/hooks/useTableColumnConfig.d.ts +15 -13
- package/dist/hooks/useTableColumnConfig.js +1 -1
- package/dist/hooks/useTableNav.d.ts +79 -77
- package/dist/hooks/useTableNav.js +19 -37
- package/dist/hooks/useTranslationMemo.d.ts +5 -3
- package/dist/index.d.ts +145 -1
- package/dist/index.js +3 -3
- package/dist/rhf/Inputs.d.ts +55 -54
- package/dist/rhf/Inputs.js +62 -17
- package/dist/rhf/components.d.ts +77 -75
- package/dist/rhf/components.js +27 -27
- package/dist/rhf/dynamicInputs.d.ts +16 -14
- package/dist/rhf/dynamicInputs.js +1 -1
- package/dist/rhf/fieldAdapter.d.ts +8 -6
- package/dist/rhf/form.types.d.ts +11 -10
- package/dist/rhf/useAutosave.d.ts +12 -9
- package/dist/rhf/useForm.d.ts +13 -13
- package/dist/rhf/useFormAutosave.d.ts +17 -14
- package/dist/rhf/useFormAutosave.js +121 -34
- package/dist/rhf.d.ts +146 -225
- package/dist/rhf.js +120 -0
- package/dist/tanstack.d.ts +151 -224
- package/dist/tanstack.js +3 -3
- package/dist/text-editor.d.ts +2 -2
- package/dist/tw-ui-plugin.d.ts +4 -2
- package/dist/tw-ui-plugin.js +1 -1
- package/dist/types/common.d.ts +11 -12
- package/dist/types/error-handling.d.ts +8 -5
- package/dist/utils/array.utils.d.ts +5 -2
- package/dist/utils/array.utils.js +1 -1
- package/dist/utils/compoundMapper.d.ts +12 -14
- package/dist/utils/compoundMapper.js +1 -1
- package/dist/utils/date-time.utils.d.ts +44 -41
- package/dist/utils/date-time.utils.js +7 -9
- package/dist/utils/date.utils.d.ts +6 -4
- package/dist/utils/date.utils.js +29 -6
- package/dist/utils/dom.utils.d.ts +7 -4
- package/dist/utils/dom.utils.js +2 -2
- package/dist/utils/file.utils.d.ts +20 -12
- package/dist/utils/file.utils.js +19 -8
- package/dist/utils/intl.utils.d.ts +7 -5
- package/dist/utils/intl.utils.js +2 -2
- package/dist/utils/isEqual.d.ts +4 -1
- package/dist/utils/isEqual.js +3 -3
- package/dist/utils/logger.d.ts +9 -6
- package/dist/utils/logger.js +1 -1
- package/dist/utils/object.utils.d.ts +12 -9
- package/dist/utils/object.utils.js +1 -1
- package/dist/utils/queries.utils.d.ts +6 -3
- package/dist/utils/queries.utils.js +1 -1
- package/dist/utils/query.utils.js +1 -1
- package/dist/utils/routing.utils.d.ts +6 -3
- package/dist/utils/routing.utils.js +1 -1
- package/dist/utils/string.utils.d.ts +6 -3
- package/dist/utils/string.utils.js +1 -1
- package/dist/utils/style-merge.util.d.ts +38 -41
- package/dist/utils/style-merge.util.js +7 -4
- package/dist/utils/zod.utils.d.ts +22 -19
- package/dist/utils/zod.utils.js +1 -1
- package/package.json +30 -8
- package/dist/assets/locales/en/translation.json.d.ts +0 -158
- package/dist/assets/locales/sl/translation.json.d.ts +0 -154
- package/dist/components/Menu/MenuDesktop.d.ts +0 -2
- package/dist/components/Menu/MenuMobile.d.ts +0 -2
- package/dist/components/buttons/shared/ButtonContent.d.ts +0 -14
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.d.ts +0 -9
- package/dist/components/inputs/DateTime/shared/Calendar.d.ts +0 -29
- package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +0 -22
- package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +0 -27
- package/dist/components/inputs/DateTime/shared/CalendarHeader.d.ts +0 -18
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.d.ts +0 -17
- package/dist/components/inputs/DateTime/shared/DateField.d.ts +0 -21
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +0 -28
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.d.ts +0 -18
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.d.ts +0 -8
- package/dist/components/inputs/DateTime/shared/MonthPicker.d.ts +0 -11
- package/dist/components/inputs/DateTime/shared/RangeCalendar.d.ts +0 -26
- package/dist/components/inputs/DateTime/shared/TimeField.d.ts +0 -12
- package/dist/components/inputs/DateTime/shared/TimePickerForm.d.ts +0 -10
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +0 -25
- package/dist/components/inputs/DateTime/shared/YearPicker.d.ts +0 -12
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +0 -15
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +0 -2
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +0 -1
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +0 -41
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +0 -1
- package/dist/components/inputs/DateTime/shared/useFirefoxDateSegmentSelectionGuard.d.ts +0 -2
- package/dist/components/inputs/File/index.d.ts +0 -9
- package/dist/components/inputs/File/shared/FileCard.d.ts +0 -9
- package/dist/components/inputs/File/shared/FileCardList.d.ts +0 -9
- package/dist/components/inputs/File/shared/FileUploadContent.d.ts +0 -10
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.d.ts +0 -9
- package/dist/components/inputs/File/shared/FileUploadContentError.d.ts +0 -11
- package/dist/components/inputs/File/shared/FileUploadContentFilled.d.ts +0 -11
- package/dist/components/inputs/File/shared/FileUploadContentLoading.d.ts +0 -9
- package/dist/components/inputs/File/shared/InputUploadContent.d.ts +0 -9
- package/dist/components/inputs/File/shared/InputUploadFilled.d.ts +0 -8
- package/dist/components/inputs/FormField/FormFieldHeaderClose.d.ts +0 -5
- package/dist/components/inputs/FormField/FormFieldHelper.d.ts +0 -8
- package/dist/components/inputs/FormField/FormFieldLabel.d.ts +0 -13
- package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +0 -1
- package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +0 -5
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +0 -15
- package/dist/components/inputs/Selection/shared/SelectInputTags.d.ts +0 -12
- package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +0 -9
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.d.ts +0 -7
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.d.ts +0 -4
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.d.ts +0 -6
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.d.ts +0 -5
- package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +0 -5
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +0 -9
- package/dist/components/inputs/Selection/shared/select.context.d.ts +0 -32
- package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +0 -23
- package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +0 -1
- package/dist/components/inputs/Selection/shared/useSelectItems.d.ts +0 -23
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +0 -84
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.d.ts +0 -7
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.d.ts +0 -10
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.d.ts +0 -6
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.d.ts +0 -2
- package/dist/components/inputs/TextEditor/textEditor.types.d.ts +0 -5
- package/dist/components/inputs/shared/CheckContent.d.ts +0 -9
- package/dist/components/inputs/shared/InputClear.d.ts +0 -10
- package/dist/components/inputs/shared/TooltipWrapper.d.ts +0 -10
- package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +0 -15
- package/dist/components/navigation/Accordion/AccordionItem.d.ts +0 -2
- package/dist/components/navigation/Stepper/StepperItem.d.ts +0 -2
- package/dist/components/navigation/Stepper/StepperSeparator.d.ts +0 -5
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.d.ts +0 -13
- package/dist/components/segment/SegmentItem.d.ts +0 -2
- package/dist/components/shared/pagination/minWidth.cva.d.ts +0 -3
- package/dist/hooks/useFormAutosave.spec.d.ts +0 -1
- package/dist/hooks/useKeyInteractions.spec.d.ts +0 -1
- package/dist/hooks/useQueryAutocomplete.d.ts +0 -13
- package/dist/rhf/entrypoints.type-test.d.ts +0 -1
- package/dist/types/react-query.d.ts +0 -6
- package/dist/utils/array.utils.spec.d.ts +0 -1
- package/dist/utils/compoundMapper.spec.d.ts +0 -1
- package/dist/utils/date-time.utils.spec.d.ts +0 -1
- package/dist/utils/date.utils.spec.d.ts +0 -1
- package/dist/utils/intl.utils.spec.d.ts +0 -1
- package/dist/utils/query.utils.d.ts +0 -4
- package/dist/utils/rest.utils.d.ts +0 -10
- package/dist/utils/rest.utils.js +0 -33
- package/dist/utils/style-merge.util.spec.d.ts +0 -1
|
@@ -3,6 +3,7 @@ import { FieldController } from "../../shared/form.binding.js";
|
|
|
3
3
|
import { FormField } from "../../FormField/FormField.js";
|
|
4
4
|
import { TimePickerForm } from "../shared/TimePickerForm.js";
|
|
5
5
|
import { DateTimeUtils } from "../../../../utils/date-time.utils.js";
|
|
6
|
+
import { normalizeDatePickerValue } from "../shared/datePickerValue.utils.js";
|
|
6
7
|
import { DateTimeDialog } from "../shared/DateTimeDialog.js";
|
|
7
8
|
import { DateTimeDialogFooter } from "../shared/DateTimeDialogFooter.js";
|
|
8
9
|
import { getStaticDateTimeFocusTarget, getStaticTimeSegments } from "../shared/staticDateTimeSegments.js";
|
|
@@ -11,107 +12,16 @@ import { InputFrame } from "../../Skeleton/InputFrame.js";
|
|
|
11
12
|
import { useStaticInputHandoff } from "../../shared/useStaticInputHandoff.js";
|
|
12
13
|
import { TimePickerInput } from "../shared/TimePickerInput.js";
|
|
13
14
|
import { clsx } from "clsx";
|
|
14
|
-
import { useEffect, useRef, useState } from "react";
|
|
15
|
-
import { c } from "react/compiler-runtime";
|
|
15
|
+
import { memo, useEffect, useRef, useState } from "react";
|
|
16
16
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
17
|
import { useLocale, useTimeField } from "react-aria";
|
|
18
18
|
import { mergeRefs } from "@react-aria/utils";
|
|
19
19
|
import { getLocalTimeZone, now, toTime } from "@internationalized/date";
|
|
20
|
-
import { DateTime } from "luxon";
|
|
21
20
|
import { useTimeFieldState } from "react-stately";
|
|
22
21
|
//#region src/components/inputs/DateTime/TimePicker/TimePicker.tsx
|
|
23
|
-
|
|
24
|
-
const $ = c(142);
|
|
22
|
+
const TimePickerBase = (props) => {
|
|
25
23
|
const ui = UIConfig.useConfig();
|
|
26
|
-
|
|
27
|
-
let className;
|
|
28
|
-
let disableDropdown;
|
|
29
|
-
let disableManualEntryProp;
|
|
30
|
-
let error;
|
|
31
|
-
let errorClassName;
|
|
32
|
-
let headerClassName;
|
|
33
|
-
let helperText;
|
|
34
|
-
let hideLabelProp;
|
|
35
|
-
let inputClassName;
|
|
36
|
-
let isClearableIfDisabled;
|
|
37
|
-
let isClearableProp;
|
|
38
|
-
let isDirty;
|
|
39
|
-
let isDisabled;
|
|
40
|
-
let isHeaderHidden;
|
|
41
|
-
let isRequired;
|
|
42
|
-
let label;
|
|
43
|
-
let onBlur;
|
|
44
|
-
let onChange;
|
|
45
|
-
let placeholder;
|
|
46
|
-
let ref;
|
|
47
|
-
let rest;
|
|
48
|
-
let rightContent;
|
|
49
|
-
let shouldForceLeadingZerosProp;
|
|
50
|
-
let sizeProp;
|
|
51
|
-
let tooltipText;
|
|
52
|
-
let value;
|
|
53
|
-
let variantProp;
|
|
54
|
-
if ($[0] !== props) {
|
|
55
|
-
({ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, onChange, onBlur, value, disableDropdown, placeholder, className, inputClassName, variant: variantProp, as: asProp, size: sizeProp, hideLabel: hideLabelProp, isClearable: isClearableProp, isClearableIfDisabled, disableManualEntry: disableManualEntryProp, shouldForceLeadingZeros: shouldForceLeadingZerosProp, ...rest} = props);
|
|
56
|
-
$[0] = props;
|
|
57
|
-
$[1] = asProp;
|
|
58
|
-
$[2] = className;
|
|
59
|
-
$[3] = disableDropdown;
|
|
60
|
-
$[4] = disableManualEntryProp;
|
|
61
|
-
$[5] = error;
|
|
62
|
-
$[6] = errorClassName;
|
|
63
|
-
$[7] = headerClassName;
|
|
64
|
-
$[8] = helperText;
|
|
65
|
-
$[9] = hideLabelProp;
|
|
66
|
-
$[10] = inputClassName;
|
|
67
|
-
$[11] = isClearableIfDisabled;
|
|
68
|
-
$[12] = isClearableProp;
|
|
69
|
-
$[13] = isDirty;
|
|
70
|
-
$[14] = isDisabled;
|
|
71
|
-
$[15] = isHeaderHidden;
|
|
72
|
-
$[16] = isRequired;
|
|
73
|
-
$[17] = label;
|
|
74
|
-
$[18] = onBlur;
|
|
75
|
-
$[19] = onChange;
|
|
76
|
-
$[20] = placeholder;
|
|
77
|
-
$[21] = ref;
|
|
78
|
-
$[22] = rest;
|
|
79
|
-
$[23] = rightContent;
|
|
80
|
-
$[24] = shouldForceLeadingZerosProp;
|
|
81
|
-
$[25] = sizeProp;
|
|
82
|
-
$[26] = tooltipText;
|
|
83
|
-
$[27] = value;
|
|
84
|
-
$[28] = variantProp;
|
|
85
|
-
} else {
|
|
86
|
-
asProp = $[1];
|
|
87
|
-
className = $[2];
|
|
88
|
-
disableDropdown = $[3];
|
|
89
|
-
disableManualEntryProp = $[4];
|
|
90
|
-
error = $[5];
|
|
91
|
-
errorClassName = $[6];
|
|
92
|
-
headerClassName = $[7];
|
|
93
|
-
helperText = $[8];
|
|
94
|
-
hideLabelProp = $[9];
|
|
95
|
-
inputClassName = $[10];
|
|
96
|
-
isClearableIfDisabled = $[11];
|
|
97
|
-
isClearableProp = $[12];
|
|
98
|
-
isDirty = $[13];
|
|
99
|
-
isDisabled = $[14];
|
|
100
|
-
isHeaderHidden = $[15];
|
|
101
|
-
isRequired = $[16];
|
|
102
|
-
label = $[17];
|
|
103
|
-
onBlur = $[18];
|
|
104
|
-
onChange = $[19];
|
|
105
|
-
placeholder = $[20];
|
|
106
|
-
ref = $[21];
|
|
107
|
-
rest = $[22];
|
|
108
|
-
rightContent = $[23];
|
|
109
|
-
shouldForceLeadingZerosProp = $[24];
|
|
110
|
-
sizeProp = $[25];
|
|
111
|
-
tooltipText = $[26];
|
|
112
|
-
value = $[27];
|
|
113
|
-
variantProp = $[28];
|
|
114
|
-
}
|
|
24
|
+
const { ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, onChange, onBlur, value, disableDropdown, placeholder, className, inputClassName, variant: variantProp, as: asProp, size: sizeProp, hideLabel: hideLabelProp, isClearable: isClearableProp, isClearableIfDisabled, disableManualEntry: disableManualEntryProp, shouldForceLeadingZeros: shouldForceLeadingZerosProp, ...rest } = props;
|
|
115
25
|
const variant = variantProp ?? ui.input.variant;
|
|
116
26
|
const as = asProp ?? ui.input.as;
|
|
117
27
|
const size = sizeProp ?? ui.input.size;
|
|
@@ -119,340 +29,135 @@ var TimePickerBase = (props) => {
|
|
|
119
29
|
const isClearable = isClearableProp ?? ui.input.isClearable;
|
|
120
30
|
const disableManualEntry = disableManualEntryProp ?? ui.dateInput.disableManualEntry;
|
|
121
31
|
const shouldForceLeadingZeros = shouldForceLeadingZerosProp ?? ui.dateInput.shouldForceLeadingZeros;
|
|
122
|
-
const
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
headerClassName,
|
|
136
|
-
errorClassName
|
|
137
|
-
};
|
|
138
|
-
$[29] = error;
|
|
139
|
-
$[30] = errorClassName;
|
|
140
|
-
$[31] = headerClassName;
|
|
141
|
-
$[32] = helperText;
|
|
142
|
-
$[33] = hideLabel;
|
|
143
|
-
$[34] = isDisabled;
|
|
144
|
-
$[35] = isRequired;
|
|
145
|
-
$[36] = label;
|
|
146
|
-
$[37] = rightContent;
|
|
147
|
-
$[38] = t0;
|
|
148
|
-
$[39] = tooltipText;
|
|
149
|
-
$[40] = t1;
|
|
150
|
-
} else t1 = $[40];
|
|
151
|
-
const formFieldProps = t1;
|
|
32
|
+
const formFieldProps = {
|
|
33
|
+
error,
|
|
34
|
+
label,
|
|
35
|
+
tooltipText,
|
|
36
|
+
helperText,
|
|
37
|
+
isRequired,
|
|
38
|
+
rightContent,
|
|
39
|
+
isHeaderHidden: isHeaderHidden || as === "inline" || as === "filter" || as === "floating",
|
|
40
|
+
hideLabel,
|
|
41
|
+
isDisabled,
|
|
42
|
+
headerClassName,
|
|
43
|
+
errorClassName
|
|
44
|
+
};
|
|
152
45
|
const [isOpen, setIsOpen] = useState(false);
|
|
153
46
|
const initialDateEmitRef = useRef(true);
|
|
154
47
|
const { locale } = useLocale();
|
|
155
48
|
const normalizedValue = value ?? null;
|
|
156
|
-
const
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
if ($[48] !== onChange) {
|
|
183
|
-
t5 = (val_0) => {
|
|
184
|
-
onChange?.(val_0);
|
|
185
|
-
};
|
|
186
|
-
$[48] = onChange;
|
|
187
|
-
$[49] = t5;
|
|
188
|
-
} else t5 = $[49];
|
|
189
|
-
let t6;
|
|
190
|
-
if ($[50] !== isDisabled || $[51] !== locale || $[52] !== normalizedValue || $[53] !== rest || $[54] !== shouldForceLeadingZeros || $[55] !== t5) {
|
|
191
|
-
t6 = {
|
|
192
|
-
...rest,
|
|
193
|
-
isDisabled,
|
|
194
|
-
value: normalizedValue,
|
|
195
|
-
onChange: t5,
|
|
196
|
-
locale,
|
|
197
|
-
shouldForceLeadingZeros
|
|
198
|
-
};
|
|
199
|
-
$[50] = isDisabled;
|
|
200
|
-
$[51] = locale;
|
|
201
|
-
$[52] = normalizedValue;
|
|
202
|
-
$[53] = rest;
|
|
203
|
-
$[54] = shouldForceLeadingZeros;
|
|
204
|
-
$[55] = t5;
|
|
205
|
-
$[56] = t6;
|
|
206
|
-
} else t6 = $[56];
|
|
207
|
-
const state = useTimeFieldState(t6);
|
|
208
|
-
let t7;
|
|
209
|
-
if ($[57] !== onChange || $[58] !== state.timeValue) {
|
|
210
|
-
t7 = () => {
|
|
211
|
-
if (initialDateEmitRef.current) {
|
|
212
|
-
initialDateEmitRef.current = false;
|
|
213
|
-
return;
|
|
214
|
-
}
|
|
215
|
-
if (state.timeValue) onChange?.(state.timeValue);
|
|
216
|
-
};
|
|
217
|
-
$[57] = onChange;
|
|
218
|
-
$[58] = state.timeValue;
|
|
219
|
-
$[59] = t7;
|
|
220
|
-
} else t7 = $[59];
|
|
221
|
-
let t8;
|
|
222
|
-
if ($[60] !== rest.date) {
|
|
223
|
-
t8 = [rest.date];
|
|
224
|
-
$[60] = rest.date;
|
|
225
|
-
$[61] = t8;
|
|
226
|
-
} else t8 = $[61];
|
|
227
|
-
useEffect(t7, t8);
|
|
49
|
+
const dialogState = useTimeFieldState({
|
|
50
|
+
...rest,
|
|
51
|
+
defaultValue: normalizedValue ?? rest.defaultValue ?? null,
|
|
52
|
+
locale,
|
|
53
|
+
shouldForceLeadingZeros
|
|
54
|
+
});
|
|
55
|
+
const handleBlur = (val) => {
|
|
56
|
+
onBlur?.({ target: { value: val } });
|
|
57
|
+
};
|
|
58
|
+
const state = useTimeFieldState({
|
|
59
|
+
...rest,
|
|
60
|
+
isDisabled,
|
|
61
|
+
value: normalizedValue,
|
|
62
|
+
onChange: (val) => {
|
|
63
|
+
onChange?.(normalizeDatePickerValue(val));
|
|
64
|
+
},
|
|
65
|
+
locale,
|
|
66
|
+
shouldForceLeadingZeros
|
|
67
|
+
});
|
|
68
|
+
useEffect(() => {
|
|
69
|
+
if (initialDateEmitRef.current) {
|
|
70
|
+
initialDateEmitRef.current = false;
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
if (state.timeValue) onChange?.(state.timeValue);
|
|
74
|
+
}, [rest.date]);
|
|
228
75
|
const timeFieldRef = useRef(null);
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
$[76] = t11;
|
|
268
|
-
} else t11 = $[76];
|
|
269
|
-
const headerProps = t11;
|
|
270
|
-
let t12;
|
|
271
|
-
if ($[77] !== dialogState.value || $[78] !== state) {
|
|
272
|
-
t12 = () => {
|
|
273
|
-
const newValue = dialogState.value;
|
|
274
|
-
state.setValue(newValue);
|
|
275
|
-
setIsOpen(false);
|
|
276
|
-
};
|
|
277
|
-
$[77] = dialogState.value;
|
|
278
|
-
$[78] = state;
|
|
279
|
-
$[79] = t12;
|
|
280
|
-
} else t12 = $[79];
|
|
281
|
-
const onApply = t12;
|
|
282
|
-
let t13;
|
|
283
|
-
if ($[80] !== dialogState || $[81] !== isOpen || $[82] !== state.value) {
|
|
284
|
-
t13 = (open) => {
|
|
285
|
-
setIsOpen(open);
|
|
286
|
-
if (!isOpen) dialogState.setValue(state.value);
|
|
287
|
-
};
|
|
288
|
-
$[80] = dialogState;
|
|
289
|
-
$[81] = isOpen;
|
|
290
|
-
$[82] = state.value;
|
|
291
|
-
$[83] = t13;
|
|
292
|
-
} else t13 = $[83];
|
|
293
|
-
const onOpenChange = t13;
|
|
294
|
-
let t14;
|
|
295
|
-
if ($[84] !== dialogState || $[85] !== state.value) {
|
|
296
|
-
t14 = () => {
|
|
297
|
-
dialogState.setValue(state.value);
|
|
298
|
-
setIsOpen(true);
|
|
299
|
-
};
|
|
300
|
-
$[84] = dialogState;
|
|
301
|
-
$[85] = state.value;
|
|
302
|
-
$[86] = t14;
|
|
303
|
-
} else t14 = $[86];
|
|
304
|
-
const onOpen = t14;
|
|
305
|
-
let t15;
|
|
306
|
-
if ($[87] !== onChange) {
|
|
307
|
-
t15 = () => {
|
|
308
|
-
onChange?.(null);
|
|
309
|
-
};
|
|
310
|
-
$[87] = onChange;
|
|
311
|
-
$[88] = t15;
|
|
312
|
-
} else t15 = $[88];
|
|
313
|
-
const onInputClear = t15;
|
|
314
|
-
const t16 = as === "inline" ? -1 : void 0;
|
|
315
|
-
let t17;
|
|
316
|
-
if ($[89] !== className) {
|
|
317
|
-
t17 = clsx("group relative inline-flex w-full flex-col text-left", className);
|
|
318
|
-
$[89] = className;
|
|
319
|
-
$[90] = t17;
|
|
320
|
-
} else t17 = $[90];
|
|
321
|
-
const t18 = as === "inline" ? -1 : void 0;
|
|
322
|
-
let t19;
|
|
323
|
-
if ($[91] !== ref) {
|
|
324
|
-
t19 = mergeRefs(ref, timeFieldRef);
|
|
325
|
-
$[91] = ref;
|
|
326
|
-
$[92] = t19;
|
|
327
|
-
} else t19 = $[92];
|
|
328
|
-
let t20;
|
|
329
|
-
if ($[93] !== fieldProps || $[94] !== handleBlur || $[95] !== state.value) {
|
|
330
|
-
t20 = (event) => {
|
|
331
|
-
fieldProps.onBlur?.(event);
|
|
332
|
-
handleBlur(state.value);
|
|
333
|
-
};
|
|
334
|
-
$[93] = fieldProps;
|
|
335
|
-
$[94] = handleBlur;
|
|
336
|
-
$[95] = state.value;
|
|
337
|
-
$[96] = t20;
|
|
338
|
-
} else t20 = $[96];
|
|
339
|
-
let t21;
|
|
340
|
-
if ($[97] !== fieldProps || $[98] !== t20) {
|
|
341
|
-
t21 = {
|
|
342
|
-
...fieldProps,
|
|
343
|
-
onBlur: t20
|
|
344
|
-
};
|
|
345
|
-
$[97] = fieldProps;
|
|
346
|
-
$[98] = t20;
|
|
347
|
-
$[99] = t21;
|
|
348
|
-
} else t21 = $[99];
|
|
349
|
-
const t22 = !!error;
|
|
350
|
-
let t23;
|
|
351
|
-
if ($[100] !== as || $[101] !== disableDropdown || $[102] !== disableManualEntry || $[103] !== headerProps || $[104] !== inputClassName || $[105] !== isClearable || $[106] !== isClearableIfDisabled || $[107] !== isDirty || $[108] !== isDisabled || $[109] !== isRequired || $[110] !== onInputClear || $[111] !== onOpen || $[112] !== placeholder || $[113] !== size || $[114] !== state || $[115] !== t19 || $[116] !== t21 || $[117] !== t22 || $[118] !== variant) {
|
|
352
|
-
t23 = /* @__PURE__ */ jsx(TimePickerInput, {
|
|
353
|
-
ref: t19,
|
|
354
|
-
as,
|
|
355
|
-
fieldProps: t21,
|
|
356
|
-
state,
|
|
357
|
-
onPress: onOpen,
|
|
358
|
-
isDisabled,
|
|
359
|
-
isDirty,
|
|
360
|
-
isRequired,
|
|
361
|
-
isInvalid: t22,
|
|
362
|
-
disableDropdown,
|
|
363
|
-
variant,
|
|
364
|
-
size,
|
|
365
|
-
isClearable,
|
|
366
|
-
isClearableIfDisabled,
|
|
367
|
-
headerProps,
|
|
368
|
-
disableManualEntry,
|
|
369
|
-
placeholder,
|
|
370
|
-
className: inputClassName,
|
|
371
|
-
onClear: onInputClear
|
|
372
|
-
});
|
|
373
|
-
$[100] = as;
|
|
374
|
-
$[101] = disableDropdown;
|
|
375
|
-
$[102] = disableManualEntry;
|
|
376
|
-
$[103] = headerProps;
|
|
377
|
-
$[104] = inputClassName;
|
|
378
|
-
$[105] = isClearable;
|
|
379
|
-
$[106] = isClearableIfDisabled;
|
|
380
|
-
$[107] = isDirty;
|
|
381
|
-
$[108] = isDisabled;
|
|
382
|
-
$[109] = isRequired;
|
|
383
|
-
$[110] = onInputClear;
|
|
384
|
-
$[111] = onOpen;
|
|
385
|
-
$[112] = placeholder;
|
|
386
|
-
$[113] = size;
|
|
387
|
-
$[114] = state;
|
|
388
|
-
$[115] = t19;
|
|
389
|
-
$[116] = t21;
|
|
390
|
-
$[117] = t22;
|
|
391
|
-
$[118] = variant;
|
|
392
|
-
$[119] = t23;
|
|
393
|
-
} else t23 = $[119];
|
|
394
|
-
let t24;
|
|
395
|
-
if ($[120] !== dialogState || $[121] !== disableDropdown || $[122] !== disableManualEntry || $[123] !== isDisabled || $[124] !== isOpen || $[125] !== label || $[126] !== onApply || $[127] !== onOpenChange) {
|
|
396
|
-
t24 = (!disableDropdown || disableManualEntry) && /* @__PURE__ */ jsx(DateTimeDialog, {
|
|
397
|
-
footer: /* @__PURE__ */ jsx(DateTimeDialogFooter, {
|
|
398
|
-
isDisabled,
|
|
399
|
-
onApply,
|
|
400
|
-
isValid: !dialogState.isInvalid && !!dialogState.value
|
|
401
|
-
}),
|
|
402
|
-
label,
|
|
403
|
-
triggerRef: timeFieldRef,
|
|
404
|
-
isOpen,
|
|
405
|
-
onOpenChange,
|
|
406
|
-
children: /* @__PURE__ */ jsx(TimePickerForm, { state: dialogState })
|
|
407
|
-
});
|
|
408
|
-
$[120] = dialogState;
|
|
409
|
-
$[121] = disableDropdown;
|
|
410
|
-
$[122] = disableManualEntry;
|
|
411
|
-
$[123] = isDisabled;
|
|
412
|
-
$[124] = isOpen;
|
|
413
|
-
$[125] = label;
|
|
414
|
-
$[126] = onApply;
|
|
415
|
-
$[127] = onOpenChange;
|
|
416
|
-
$[128] = t24;
|
|
417
|
-
} else t24 = $[128];
|
|
418
|
-
let t25;
|
|
419
|
-
if ($[129] !== as || $[130] !== formFieldProps || $[131] !== labelProps || $[132] !== t17 || $[133] !== t18 || $[134] !== t23 || $[135] !== t24) {
|
|
420
|
-
t25 = /* @__PURE__ */ jsxs(FormField, {
|
|
76
|
+
const { labelProps, fieldProps } = useTimeField({
|
|
77
|
+
...rest,
|
|
78
|
+
label,
|
|
79
|
+
isReadOnly: disableManualEntry,
|
|
80
|
+
shouldForceLeadingZeros
|
|
81
|
+
}, state, timeFieldRef);
|
|
82
|
+
const headerProps = {
|
|
83
|
+
label,
|
|
84
|
+
tooltipText,
|
|
85
|
+
helperText,
|
|
86
|
+
isRequired,
|
|
87
|
+
rightContent,
|
|
88
|
+
isHeaderHidden: hideLabel || isHeaderHidden,
|
|
89
|
+
isDisabled,
|
|
90
|
+
className: headerClassName,
|
|
91
|
+
labelProps
|
|
92
|
+
};
|
|
93
|
+
const onApply = () => {
|
|
94
|
+
const newValue = dialogState.value;
|
|
95
|
+
state.setValue(newValue);
|
|
96
|
+
setIsOpen(false);
|
|
97
|
+
};
|
|
98
|
+
const onOpenChange = (open) => {
|
|
99
|
+
setIsOpen(open);
|
|
100
|
+
if (!isOpen) dialogState.setValue(state.value);
|
|
101
|
+
};
|
|
102
|
+
const onOpen = () => {
|
|
103
|
+
dialogState.setValue(state.value);
|
|
104
|
+
setIsOpen(true);
|
|
105
|
+
};
|
|
106
|
+
const onInputClear = () => {
|
|
107
|
+
onChange?.(null);
|
|
108
|
+
};
|
|
109
|
+
return /* @__PURE__ */ jsx(TooltipWrapper, {
|
|
110
|
+
as,
|
|
111
|
+
error,
|
|
112
|
+
triggerTabIndex: as === "inline" ? -1 : void 0,
|
|
113
|
+
children: /* @__PURE__ */ jsxs(FormField, {
|
|
421
114
|
...formFieldProps,
|
|
422
115
|
as,
|
|
423
116
|
labelProps,
|
|
424
|
-
className:
|
|
425
|
-
tabIndex:
|
|
426
|
-
children: [
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
117
|
+
className: clsx("group relative inline-flex w-full flex-col text-left", className),
|
|
118
|
+
tabIndex: as === "inline" ? -1 : void 0,
|
|
119
|
+
children: [/* @__PURE__ */ jsx(TimePickerInput, {
|
|
120
|
+
ref: mergeRefs(ref, timeFieldRef),
|
|
121
|
+
as,
|
|
122
|
+
fieldProps: {
|
|
123
|
+
...fieldProps,
|
|
124
|
+
onBlur: (event) => {
|
|
125
|
+
fieldProps.onBlur?.(event);
|
|
126
|
+
handleBlur(state.value);
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
state,
|
|
130
|
+
onPress: onOpen,
|
|
131
|
+
isDisabled,
|
|
132
|
+
isDirty,
|
|
133
|
+
isRequired,
|
|
134
|
+
isInvalid: !!error,
|
|
135
|
+
disableDropdown,
|
|
136
|
+
variant,
|
|
137
|
+
size,
|
|
138
|
+
isClearable,
|
|
139
|
+
isClearableIfDisabled,
|
|
140
|
+
headerProps,
|
|
141
|
+
disableManualEntry,
|
|
142
|
+
placeholder,
|
|
143
|
+
className: inputClassName,
|
|
144
|
+
onClear: onInputClear
|
|
145
|
+
}), (!disableDropdown || disableManualEntry) && /* @__PURE__ */ jsx(DateTimeDialog, {
|
|
146
|
+
footer: /* @__PURE__ */ jsx(DateTimeDialogFooter, {
|
|
147
|
+
isDisabled,
|
|
148
|
+
onApply,
|
|
149
|
+
isValid: !dialogState.isInvalid && !!dialogState.value
|
|
150
|
+
}),
|
|
151
|
+
label,
|
|
152
|
+
triggerRef: timeFieldRef,
|
|
153
|
+
isOpen,
|
|
154
|
+
onOpenChange,
|
|
155
|
+
children: /* @__PURE__ */ jsx(TimePickerForm, { state: dialogState })
|
|
156
|
+
})]
|
|
157
|
+
})
|
|
158
|
+
});
|
|
452
159
|
};
|
|
453
|
-
|
|
454
|
-
const $ = c(9);
|
|
455
|
-
const { renderStaticInput, isFormControlDisabled, ...props } = t0;
|
|
160
|
+
const TimePickerInner = ({ renderStaticInput, isFormControlDisabled, ...props }) => {
|
|
456
161
|
const ui = UIConfig.useConfig();
|
|
457
162
|
const timeZone = props.timeZone ?? ui.dateInput.timeZone;
|
|
458
163
|
let effectiveTimeZone = getLocalTimeZone();
|
|
@@ -464,14 +169,14 @@ var TimePickerInner = (t0) => {
|
|
|
464
169
|
inputRef,
|
|
465
170
|
renderInput,
|
|
466
171
|
setRenderInput,
|
|
467
|
-
getFocusTarget:
|
|
468
|
-
getPressTarget:
|
|
172
|
+
getFocusTarget: (input, staticTarget) => getStaticDateTimeFocusTarget(input, staticTarget),
|
|
173
|
+
getPressTarget: (input) => input.querySelector("[data-static-press-action]")
|
|
469
174
|
});
|
|
470
175
|
const normalizedValue = props.value ?? null;
|
|
471
176
|
const formatTimeValue = (timeValue) => {
|
|
472
177
|
if (timeValue === null) return null;
|
|
473
178
|
let parsedDate;
|
|
474
|
-
if (props.date) parsedDate =
|
|
179
|
+
if (props.date) parsedDate = new Date(props.date);
|
|
475
180
|
let dateValue = now(effectiveTimeZone);
|
|
476
181
|
if (parsedDate) dateValue = DateTimeUtils.fromLocalToZonedDateTime(parsedDate, effectiveTimeZone);
|
|
477
182
|
const dateTimeValue = dateValue.set(timeValue);
|
|
@@ -479,21 +184,22 @@ var TimePickerInner = (t0) => {
|
|
|
479
184
|
};
|
|
480
185
|
const parseTimeValue = (isoString) => {
|
|
481
186
|
if (isoString == null) return null;
|
|
482
|
-
|
|
187
|
+
const zonedDateTime = DateTimeUtils.fromISOtoZonedDateTime(isoString, effectiveTimeZone);
|
|
188
|
+
return toTime(zonedDateTime);
|
|
483
189
|
};
|
|
484
190
|
if (!renderInput) {
|
|
485
|
-
const
|
|
191
|
+
const timeValue = normalizedValue ? parseTimeValue(normalizedValue) : null;
|
|
486
192
|
const as = props.as ?? ui.input.as;
|
|
487
193
|
const isDisabled = isFormControlDisabled || !!props.isDisabled;
|
|
488
194
|
const disableManualEntry = props.disableManualEntry ?? ui.dateInput.disableManualEntry;
|
|
489
195
|
const shouldForceLeadingZeros = props.shouldForceLeadingZeros ?? ui.dateInput.shouldForceLeadingZeros;
|
|
490
196
|
const showDropdown = !props.disableDropdown || disableManualEntry;
|
|
491
197
|
const staticSegments = getStaticTimeSegments({
|
|
492
|
-
value:
|
|
198
|
+
value: timeValue,
|
|
493
199
|
locale,
|
|
494
200
|
shouldForceLeadingZeros,
|
|
495
201
|
isDisabled,
|
|
496
|
-
hidePlaceholder: as === "floating" && !
|
|
202
|
+
hidePlaceholder: as === "floating" && !timeValue,
|
|
497
203
|
disableManualEntry,
|
|
498
204
|
placeholder: props.placeholder
|
|
499
205
|
});
|
|
@@ -507,143 +213,62 @@ var TimePickerInner = (t0) => {
|
|
|
507
213
|
contentGroup: "date-picker",
|
|
508
214
|
labelPlacement: "content-row",
|
|
509
215
|
dataAttributes: {
|
|
510
|
-
dataIsEmpty:
|
|
511
|
-
dataIsFilled:
|
|
216
|
+
dataIsEmpty: timeValue == null,
|
|
217
|
+
dataIsFilled: timeValue != null,
|
|
512
218
|
dataIsDirty: props.isDirty,
|
|
513
219
|
dataIsRequired: props.isRequired,
|
|
514
220
|
dataIsDisabled: isDisabled,
|
|
515
221
|
dataDisabled: isDisabled,
|
|
516
222
|
dataInvalid: !!props.error,
|
|
517
|
-
dataHasSelection:
|
|
223
|
+
dataHasSelection: timeValue != null
|
|
518
224
|
},
|
|
519
225
|
onStaticInteract: renderRealInput,
|
|
520
226
|
onStaticPress: replayStaticInputPress,
|
|
521
227
|
staticPressTarget: "action",
|
|
522
|
-
showClear:
|
|
228
|
+
showClear: timeValue != null,
|
|
523
229
|
wrapContentAndTrailing: true,
|
|
524
230
|
trailingClassName: "py-0! pl-0!",
|
|
525
231
|
action: showDropdown ? {
|
|
526
232
|
icon: ui.dateInput.timeIcon,
|
|
527
|
-
onClick:
|
|
233
|
+
onClick: () => {},
|
|
528
234
|
altText: ""
|
|
529
235
|
} : void 0,
|
|
530
236
|
children: staticSegments
|
|
531
237
|
});
|
|
532
238
|
}
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
$[0] = formatTimeValue;
|
|
540
|
-
$[1] = props;
|
|
541
|
-
$[2] = t3;
|
|
542
|
-
} else t3 = $[2];
|
|
543
|
-
let t4;
|
|
544
|
-
if ($[3] !== T0 || $[4] !== props || $[5] !== t1 || $[6] !== t2 || $[7] !== t3) {
|
|
545
|
-
t4 = /* @__PURE__ */ jsx(T0, {
|
|
546
|
-
...props,
|
|
547
|
-
ref: t1,
|
|
548
|
-
value: t2,
|
|
549
|
-
onChange: t3
|
|
550
|
-
});
|
|
551
|
-
$[3] = T0;
|
|
552
|
-
$[4] = props;
|
|
553
|
-
$[5] = t1;
|
|
554
|
-
$[6] = t2;
|
|
555
|
-
$[7] = t3;
|
|
556
|
-
$[8] = t4;
|
|
557
|
-
} else t4 = $[8];
|
|
558
|
-
return t4;
|
|
239
|
+
return /* @__PURE__ */ jsx(TimePickerBase, {
|
|
240
|
+
...props,
|
|
241
|
+
ref: mergeRefs(props.ref, inputRef),
|
|
242
|
+
value: parseTimeValue(normalizedValue),
|
|
243
|
+
onChange: (value) => props.onChange?.(formatTimeValue(value))
|
|
244
|
+
});
|
|
559
245
|
};
|
|
560
|
-
|
|
561
|
-
const $ = c(21);
|
|
562
|
-
let props;
|
|
563
|
-
let renderStaticInput;
|
|
564
|
-
if ($[0] !== t0) {
|
|
565
|
-
({renderStaticInput, ...props} = t0);
|
|
566
|
-
$[0] = t0;
|
|
567
|
-
$[1] = props;
|
|
568
|
-
$[2] = renderStaticInput;
|
|
569
|
-
} else {
|
|
570
|
-
props = $[1];
|
|
571
|
-
renderStaticInput = $[2];
|
|
572
|
-
}
|
|
246
|
+
const TimePickerComponent = ({ renderStaticInput, ...props }) => {
|
|
573
247
|
if ("field" in props && props.field) {
|
|
574
|
-
|
|
575
|
-
let innerProps;
|
|
576
|
-
let ref;
|
|
577
|
-
if ($[3] !== props) {
|
|
578
|
-
({field, ref, ...innerProps} = props);
|
|
579
|
-
$[3] = props;
|
|
580
|
-
$[4] = field;
|
|
581
|
-
$[5] = innerProps;
|
|
582
|
-
$[6] = ref;
|
|
583
|
-
} else {
|
|
584
|
-
field = $[4];
|
|
585
|
-
innerProps = $[5];
|
|
586
|
-
ref = $[6];
|
|
587
|
-
}
|
|
248
|
+
const { field, ref, ...innerProps } = props;
|
|
588
249
|
const controlWithOptions = field.form;
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
renderStaticInput
|
|
605
|
-
});
|
|
606
|
-
};
|
|
607
|
-
$[7] = controlWithOptions._options?.disabled;
|
|
608
|
-
$[8] = innerProps;
|
|
609
|
-
$[9] = props.error;
|
|
610
|
-
$[10] = props.isDisabled;
|
|
611
|
-
$[11] = ref;
|
|
612
|
-
$[12] = renderStaticInput;
|
|
613
|
-
$[13] = t1;
|
|
614
|
-
} else t1 = $[13];
|
|
615
|
-
let t2;
|
|
616
|
-
if ($[14] !== field.form || $[15] !== field.name || $[16] !== t1) {
|
|
617
|
-
t2 = /* @__PURE__ */ jsx(FieldController, {
|
|
618
|
-
control: field.form,
|
|
619
|
-
name: field.name,
|
|
620
|
-
render: t1
|
|
621
|
-
});
|
|
622
|
-
$[14] = field.form;
|
|
623
|
-
$[15] = field.name;
|
|
624
|
-
$[16] = t1;
|
|
625
|
-
$[17] = t2;
|
|
626
|
-
} else t2 = $[17];
|
|
627
|
-
return t2;
|
|
628
|
-
}
|
|
629
|
-
let t1;
|
|
630
|
-
if ($[18] !== props || $[19] !== renderStaticInput) {
|
|
631
|
-
t1 = /* @__PURE__ */ jsx(TimePickerInner, {
|
|
632
|
-
...props,
|
|
633
|
-
renderStaticInput
|
|
250
|
+
return /* @__PURE__ */ jsx(FieldController, {
|
|
251
|
+
control: field.form,
|
|
252
|
+
name: field.name,
|
|
253
|
+
render: ({ field, fieldState: { error, isDirty } }) => /* @__PURE__ */ jsx(TimePickerInner, {
|
|
254
|
+
...innerProps,
|
|
255
|
+
ref: mergeRefs(ref, field.ref),
|
|
256
|
+
value: field.value ?? null,
|
|
257
|
+
onChange: (value) => field.onChange(value ?? null),
|
|
258
|
+
onBlur: field.onBlur,
|
|
259
|
+
isDirty,
|
|
260
|
+
isDisabled: field.disabled || props.isDisabled,
|
|
261
|
+
isFormControlDisabled: !!controlWithOptions._options?.disabled,
|
|
262
|
+
error: props.error ?? error?.message,
|
|
263
|
+
renderStaticInput
|
|
264
|
+
})
|
|
634
265
|
});
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
266
|
+
}
|
|
267
|
+
return /* @__PURE__ */ jsx(TimePickerInner, {
|
|
268
|
+
...props,
|
|
269
|
+
renderStaticInput
|
|
270
|
+
});
|
|
640
271
|
};
|
|
641
|
-
|
|
642
|
-
return getStaticDateTimeFocusTarget(input, staticTarget);
|
|
643
|
-
}
|
|
644
|
-
function _temp2(input_0) {
|
|
645
|
-
return input_0.querySelector("[data-static-press-action]");
|
|
646
|
-
}
|
|
647
|
-
function _temp3() {}
|
|
272
|
+
const TimePicker = memo(TimePickerComponent);
|
|
648
273
|
//#endregion
|
|
649
274
|
export { TimePicker };
|