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