@povio/ui 3.4.0-rc.10 → 3.4.0-rc.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/icons/Account.d.ts +2 -0
- package/dist/assets/icons/AlignCenter.d.ts +2 -0
- package/dist/assets/icons/AlignCenter.js +30 -0
- package/dist/assets/icons/AlignLeft.d.ts +2 -0
- package/dist/assets/icons/AlignLeft.js +30 -0
- package/dist/assets/icons/AlignLeftRight.d.ts +2 -0
- package/dist/assets/icons/AlignLeftRight.js +30 -0
- package/dist/assets/icons/AlignRight.d.ts +2 -0
- package/dist/assets/icons/AlignRight.js +30 -0
- package/dist/assets/icons/ArrowDropDown.d.ts +2 -0
- package/dist/assets/icons/ArrowDropDown.js +30 -0
- package/dist/assets/icons/ArrowDropUp.d.ts +2 -0
- package/dist/assets/icons/ArrowDropUp.js +30 -0
- package/dist/assets/icons/ArrowLeft.d.ts +2 -0
- package/dist/assets/icons/ArrowLeft.js +30 -0
- package/dist/assets/icons/ArrowRight.d.ts +2 -0
- package/dist/assets/icons/ArrowRight.js +30 -0
- package/dist/assets/icons/Board.d.ts +2 -0
- package/dist/assets/icons/Bold.d.ts +2 -0
- package/dist/assets/icons/Bold.js +30 -0
- package/dist/assets/icons/BulletedList.d.ts +2 -0
- package/dist/assets/icons/BulletedList.js +30 -0
- package/dist/assets/icons/Calendar.d.ts +2 -0
- package/dist/assets/icons/Calendar.js +32 -0
- package/dist/assets/icons/Check.d.ts +2 -0
- package/dist/assets/icons/Check.js +32 -0
- package/dist/assets/icons/CheckCircle.d.ts +2 -0
- package/dist/assets/icons/CheckCircle.js +30 -0
- package/dist/assets/icons/CheckboxCheckmark.d.ts +2 -0
- package/dist/assets/icons/CheckboxCheckmark.js +33 -0
- package/dist/assets/icons/CheckboxIndeterminate.d.ts +2 -0
- package/dist/assets/icons/CheckboxIndeterminate.js +33 -0
- package/dist/assets/icons/ChevronDown.d.ts +2 -0
- package/dist/assets/icons/ChevronDown.js +32 -0
- package/dist/assets/icons/ChevronLeft.d.ts +2 -0
- package/dist/assets/icons/ChevronLeft.js +32 -0
- package/dist/assets/icons/ChevronRight.d.ts +2 -0
- package/dist/assets/icons/ChevronRight.js +32 -0
- package/dist/assets/icons/ChevronUp.d.ts +2 -0
- package/dist/assets/icons/ChevronUp.js +32 -0
- package/dist/assets/icons/ChevronsLeft.d.ts +2 -0
- package/dist/assets/icons/ChevronsLeft.js +32 -0
- package/dist/assets/icons/ChevronsRight.d.ts +2 -0
- package/dist/assets/icons/ChevronsRight.js +32 -0
- package/dist/assets/icons/Clock.d.ts +2 -0
- package/dist/assets/icons/Clock.js +30 -0
- package/dist/assets/icons/Close.d.ts +2 -0
- package/dist/assets/icons/Close.js +30 -0
- package/dist/assets/icons/DateTime.d.ts +2 -0
- package/dist/assets/icons/DateTime.js +39 -0
- package/dist/assets/icons/DragIndicator.d.ts +2 -0
- package/dist/assets/icons/DragIndicator.js +30 -0
- package/dist/assets/icons/Edit.d.ts +2 -0
- package/dist/assets/icons/Emoji.d.ts +2 -0
- package/dist/assets/icons/File.d.ts +2 -0
- package/dist/assets/icons/File.js +32 -0
- package/dist/assets/icons/Grid.d.ts +2 -0
- package/dist/assets/icons/Highlight.d.ts +2 -0
- package/dist/assets/icons/Highlight.js +30 -0
- package/dist/assets/icons/HighlightOn.d.ts +6 -0
- package/dist/assets/icons/HighlightOn.js +55 -0
- package/dist/assets/icons/Home.d.ts +2 -0
- package/dist/assets/icons/Home.js +30 -0
- package/dist/assets/icons/Image.d.ts +2 -0
- package/dist/assets/icons/ImageError.d.ts +2 -0
- package/dist/assets/icons/Info.d.ts +2 -0
- package/dist/assets/icons/Info.js +41 -0
- package/dist/assets/icons/Italic.d.ts +2 -0
- package/dist/assets/icons/Italic.js +30 -0
- package/dist/assets/icons/Link.d.ts +2 -0
- package/dist/assets/icons/Link.js +30 -0
- package/dist/assets/icons/Loader.d.ts +2 -0
- package/dist/assets/icons/MapPin.d.ts +2 -0
- package/dist/assets/icons/Menu.d.ts +2 -0
- package/dist/assets/icons/Menu.js +30 -0
- package/dist/assets/icons/Minus.d.ts +2 -0
- package/dist/assets/icons/MoreHoriz.d.ts +2 -0
- package/dist/assets/icons/NumberedList.d.ts +2 -0
- package/dist/assets/icons/NumberedList.js +30 -0
- package/dist/assets/icons/Pause.d.ts +2 -0
- package/dist/assets/icons/Plus.d.ts +2 -0
- package/dist/assets/icons/PointerHorizontal.d.ts +2 -0
- package/dist/assets/icons/PointerHorizontal.js +30 -0
- package/dist/assets/icons/PointerVertical.d.ts +2 -0
- package/dist/assets/icons/PointerVertical.js +30 -0
- package/dist/assets/icons/Retry.d.ts +2 -0
- package/dist/assets/icons/Search.d.ts +2 -0
- package/dist/assets/icons/Search.js +30 -0
- package/dist/assets/icons/Send.d.ts +2 -0
- package/dist/assets/icons/Send.js +32 -0
- package/dist/assets/icons/Share.d.ts +2 -0
- package/dist/assets/icons/Slash.d.ts +2 -0
- package/dist/assets/icons/Strikethrough.d.ts +2 -0
- package/dist/assets/icons/Strikethrough.js +30 -0
- package/dist/assets/icons/TextColor.d.ts +6 -0
- package/dist/assets/icons/TextColor.js +52 -0
- package/dist/assets/icons/Today.d.ts +2 -0
- package/dist/assets/icons/Today.js +30 -0
- package/dist/assets/icons/Trash.d.ts +2 -0
- package/dist/assets/icons/Underlined.d.ts +2 -0
- package/dist/assets/icons/Underlined.js +32 -0
- package/dist/assets/icons/Upload.d.ts +2 -0
- package/dist/assets/icons/Upload.js +39 -0
- package/dist/assets/icons/User.d.ts +2 -0
- package/dist/assets/icons/Visibility.d.ts +2 -0
- package/dist/assets/icons/Visibility.js +30 -0
- package/dist/assets/icons/VisibilityOff.d.ts +2 -0
- package/dist/assets/icons/VisibilityOff.js +30 -0
- package/dist/assets/icons/WarningFilled.d.ts +2 -0
- package/dist/assets/icons/WarningFilled.js +32 -0
- package/dist/assets/icons/WarningOutlined.d.ts +2 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.js +7 -7
- package/dist/components/Menu/MenuDesktop.js +1 -1
- package/dist/components/Menu/MenuItem.js +4 -4
- package/dist/components/Menu/MenuMobile.js +5 -5
- package/dist/components/Menu/MenuPopover.js +2 -2
- package/dist/components/buttons/Button/Button.js +1 -1
- package/dist/components/buttons/PillButton/PillButton.js +4 -4
- package/dist/components/buttons/PillButton/pillButton.cva.d.ts +1 -1
- package/dist/components/buttons/SplitButton/SplitButton.js +3 -3
- package/dist/components/buttons/shared/ButtonContent.js +2 -2
- package/dist/components/buttons/shared/buttonContent.cva.d.ts +1 -1
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +2 -1
- package/dist/components/inputs/Checkbox/Checkbox.js +102 -95
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +3 -2
- package/dist/components/inputs/Checkbox/CheckboxGroup.d.ts +2 -1
- package/dist/components/inputs/Checkbox/CheckboxGroup.js +115 -111
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +2 -2
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +22 -17
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +2 -2
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +23 -17
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +2 -2
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +25 -21
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +2 -2
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +238 -225
- package/dist/components/inputs/DateTime/shared/Calendar.js +1 -1
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +1 -1
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +1 -1
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +10 -7
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +12 -8
- package/dist/components/inputs/DateTime/shared/DateField.d.ts +1 -2
- package/dist/components/inputs/DateTime/shared/DateField.js +4 -4
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +2 -2
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +16 -8
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +3 -3
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +2 -2
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +1 -1
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +2 -2
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +2 -2
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +5 -4
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +2 -2
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +11 -10
- package/dist/components/inputs/DateTime/shared/YearPicker.js +2 -2
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +1 -46
- package/dist/components/inputs/DateTime/shared/useFirefoxDateSegmentSelectionGuard.js +1 -1
- package/dist/components/inputs/File/FileUpload.d.ts +1 -1
- package/dist/components/inputs/File/FileUpload.js +20 -20
- package/dist/components/inputs/File/InputUpload.d.ts +1 -1
- package/dist/components/inputs/File/InputUpload.js +19 -19
- package/dist/components/inputs/File/fileUpload.types.d.ts +1 -1
- package/dist/components/inputs/File/inputUpload.types.d.ts +1 -1
- package/dist/components/inputs/File/shared/FileCard.js +1 -1
- package/dist/components/inputs/File/shared/FileCardList.js +1 -1
- package/dist/components/inputs/File/shared/FileUploadContent.js +1 -1
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +3 -3
- package/dist/components/inputs/File/shared/FileUploadContentError.js +6 -5
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +6 -5
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +5 -4
- package/dist/components/inputs/File/shared/InputUploadContent.js +4 -4
- package/dist/components/inputs/File/shared/InputUploadFilled.js +3 -3
- package/dist/components/inputs/FormField/FormFieldError.js +1 -1
- package/dist/components/inputs/FormField/FormFieldHeader.js +4 -4
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +3 -3
- package/dist/components/inputs/FormField/FormFieldHelper.js +1 -1
- package/dist/components/inputs/FormField/FormFieldLabel.js +2 -2
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +1 -1
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +107 -109
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +1 -2
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +254 -265
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +1 -2
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +24 -25
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.d.ts +1 -1
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +4 -3
- package/dist/components/inputs/Input/TextArea/TextArea.d.ts +1 -2
- package/dist/components/inputs/Input/TextArea/TextArea.js +117 -118
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +2 -2
- package/dist/components/inputs/Input/TextInput/TextInput.js +129 -129
- package/dist/components/inputs/Input/shared/InputContent.d.ts +1 -2
- package/dist/components/inputs/Input/shared/InputContent.js +48 -50
- package/dist/components/inputs/Inputs/Form.d.ts +4 -4
- package/dist/components/inputs/Inputs/Form.js +1 -1
- package/dist/components/inputs/Inputs/InputItem.d.ts +22 -22
- package/dist/components/inputs/Inputs/InputItem.js +37 -36
- package/dist/components/inputs/Inputs/Inputs.d.ts +2 -2
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +2 -1
- package/dist/components/inputs/RadioGroup/RadioGroup.js +113 -109
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +1 -1
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +16 -16
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +1 -1
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +20 -20
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +1 -1
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +1 -1
- package/dist/components/inputs/Selection/Select/QuerySelect.js +20 -20
- package/dist/components/inputs/Selection/Select/Select.d.ts +1 -1
- package/dist/components/inputs/Selection/Select/Select.js +23 -23
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectBase.js +37 -34
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +56 -58
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +56 -57
- package/dist/components/inputs/Selection/shared/SelectListBox.js +1 -1
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +2 -2
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +2 -2
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +1 -1
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +1 -1
- package/dist/components/inputs/Selection/shared/SelectMobile.js +4 -5
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +3 -3
- package/dist/components/inputs/Selection/shared/select.context.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/select.context.js +9 -5
- package/dist/components/inputs/Selection/shared/select.types.d.ts +1 -1
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +0 -1
- package/dist/components/inputs/Skeleton/InputFrame.js +7 -10
- package/dist/components/inputs/Slider/Slider.d.ts +1 -1
- package/dist/components/inputs/Slider/Slider.js +20 -20
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +1 -1
- package/dist/components/inputs/TextEditor/TextEditor.js +20 -20
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +2 -2
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +4 -4
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +4 -4
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +8 -5
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +3 -3
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +5 -4
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +5 -4
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +9 -6
- package/dist/components/inputs/Toggle/Toggle.d.ts +2 -1
- package/dist/components/inputs/Toggle/Toggle.js +65 -61
- package/dist/components/inputs/shared/CheckContent.js +1 -1
- package/dist/components/inputs/shared/InputClear.js +28 -45
- package/dist/components/inputs/shared/TooltipWrapper.d.ts +1 -1
- package/dist/components/inputs/shared/form.types.d.ts +8 -9
- package/dist/components/inputs/shared/input.cva.js +1 -1
- package/dist/components/inputs/shared/useStaticInputHandoff.js +38 -64
- package/dist/components/navigation/Accordion/Accordion.js +1 -1
- package/dist/components/navigation/Accordion/AccordionItem.js +3 -3
- package/dist/components/navigation/Stepper/Stepper.js +2 -2
- package/dist/components/navigation/Stepper/StepperItem.js +4 -4
- package/dist/components/overlays/ActionModal/ActionModal.js +1 -1
- package/dist/components/overlays/BottomSheet/BottomSheet.js +3 -3
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +4 -4
- package/dist/components/overlays/Drawer/Drawer.js +2 -2
- package/dist/components/overlays/Modal/Modal.js +3 -3
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +1 -1
- package/dist/components/overlays/Tooltip/Tooltip.js +8 -15
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +1 -1
- package/dist/components/segment/Segment.d.ts +1 -1
- package/dist/components/segment/Segment.js +21 -21
- package/dist/components/segment/SegmentItem.js +1 -1
- package/dist/components/segment/segment.types.d.ts +1 -1
- package/dist/components/shared/pagination/Pagination.js +1 -1
- package/dist/components/shared/pagination/PaginationList.js +9 -6
- package/dist/components/table/ColumnConfig.js +1 -1
- package/dist/components/table/InfiniteTable.js +1 -1
- package/dist/components/table/Table.js +8 -6
- package/dist/components/text/Link/Link.js +1 -1
- package/dist/components/text/Pill/Pill.js +3 -3
- package/dist/components/text/Tag/Tag.js +3 -3
- package/dist/config/confirmation.context.js +1 -1
- package/dist/config/link.context.js +1 -1
- package/dist/config/router.context.js +1 -1
- package/dist/config/theme.context.js +1 -1
- package/dist/config/uiConfig.context.d.ts +5 -14
- package/dist/config/uiConfig.context.js +11 -9
- package/dist/config/uiOverrides.context.js +2 -2
- package/dist/helpers/dynamicColumns.d.ts +1 -1
- package/dist/helpers/dynamicInputs.d.ts +7 -7
- package/dist/hooks/useAutosave.d.ts +4 -4
- package/dist/hooks/useAutosave.js +49 -64
- package/dist/hooks/useFilters.js +1 -1
- package/dist/hooks/useForm.d.ts +15 -39
- package/dist/hooks/useForm.js +43 -96
- package/dist/hooks/useFormAutosave.d.ts +9 -8
- package/dist/hooks/useFormAutosave.js +9 -23
- package/dist/hooks/useIntersectionObserver.js +1 -1
- package/dist/hooks/useLocalStorage.js +1 -1
- package/dist/hooks/usePagination.js +1 -1
- package/dist/hooks/useScrollableListBox.js +1 -1
- package/dist/hooks/useSorting.js +1 -1
- package/dist/hooks/useStateAndRef.js +1 -1
- package/dist/hooks/useTableColumnConfig.js +1 -1
- package/dist/index.d.ts +263 -1
- package/dist/index.js +71 -11
- package/package.json +3 -15
- 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/inputs/shared/form.binding.d.ts +0 -27
- package/dist/components/inputs/shared/form.binding.js +0 -57
- package/dist/components/inputs/shared/form.types.js +0 -8
- package/dist/rhf/Inputs.d.ts +0 -60
- package/dist/rhf/Inputs.js +0 -148
- package/dist/rhf/components.d.ts +0 -80
- package/dist/rhf/components.js +0 -101
- package/dist/rhf/dynamicInputs.d.ts +0 -18
- package/dist/rhf/dynamicInputs.js +0 -5
- package/dist/rhf/fieldAdapter.d.ts +0 -7
- package/dist/rhf/fieldAdapter.js +0 -40
- package/dist/rhf/form.types.d.ts +0 -12
- package/dist/rhf/useAutosave.d.ts +0 -10
- package/dist/rhf/useAutosave.js +0 -71
- package/dist/rhf/useForm.d.ts +0 -18
- package/dist/rhf/useForm.js +0 -48
- package/dist/rhf/useFormAutosave.d.ts +0 -15
- package/dist/rhf/useFormAutosave.js +0 -59
- package/dist/rhf.d.ts +0 -225
- package/dist/tanstack.d.ts +0 -224
- package/dist/tanstack.js +0 -141
- /package/dist/{rhf/entrypoints.type-test.d.ts → hooks/useAutosave.spec.d.ts} +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
2
|
-
import { FieldController } from "../../shared/form.binding.js";
|
|
3
2
|
import { FormField } from "../../FormField/FormField.js";
|
|
4
3
|
import { TimePickerForm } from "../shared/TimePickerForm.js";
|
|
5
4
|
import { DateTimeUtils } from "../../../../utils/date-time.utils.js";
|
|
@@ -9,19 +8,21 @@ import { getStaticDateTimeFocusTarget, getStaticTimeSegments } from "../shared/s
|
|
|
9
8
|
import { TooltipWrapper } from "../../shared/TooltipWrapper.js";
|
|
10
9
|
import { InputFrame } from "../../Skeleton/InputFrame.js";
|
|
11
10
|
import { useStaticInputHandoff } from "../../shared/useStaticInputHandoff.js";
|
|
11
|
+
import { useDebounceCallback } from "../../../../hooks/useDebounceCallback.js";
|
|
12
12
|
import { TimePickerInput } from "../shared/TimePickerInput.js";
|
|
13
|
-
import { clsx } from "clsx";
|
|
14
|
-
import { useEffect, useRef, useState } from "react";
|
|
15
13
|
import { c } from "react/compiler-runtime";
|
|
16
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
+
import { clsx } from "clsx";
|
|
16
|
+
import { useEffect, useRef, useState } from "react";
|
|
17
17
|
import { useLocale, useTimeField } from "react-aria";
|
|
18
18
|
import { mergeRefs } from "@react-aria/utils";
|
|
19
|
+
import { Controller } from "react-hook-form";
|
|
19
20
|
import { getLocalTimeZone, now, toTime } from "@internationalized/date";
|
|
20
21
|
import { DateTime } from "luxon";
|
|
21
22
|
import { useTimeFieldState } from "react-stately";
|
|
22
23
|
//#region src/components/inputs/DateTime/TimePicker/TimePicker.tsx
|
|
23
24
|
var TimePickerBase = (props) => {
|
|
24
|
-
const $ = c(
|
|
25
|
+
const $ = c(147);
|
|
25
26
|
const ui = UIConfig.useConfig();
|
|
26
27
|
let asProp;
|
|
27
28
|
let className;
|
|
@@ -29,11 +30,11 @@ var TimePickerBase = (props) => {
|
|
|
29
30
|
let disableManualEntryProp;
|
|
30
31
|
let error;
|
|
31
32
|
let errorClassName;
|
|
33
|
+
let fireBlurOnChangeProp;
|
|
32
34
|
let headerClassName;
|
|
33
35
|
let helperText;
|
|
34
36
|
let hideLabelProp;
|
|
35
37
|
let inputClassName;
|
|
36
|
-
let isClearableIfDisabled;
|
|
37
38
|
let isClearableProp;
|
|
38
39
|
let isDirty;
|
|
39
40
|
let isDisabled;
|
|
@@ -52,7 +53,7 @@ var TimePickerBase = (props) => {
|
|
|
52
53
|
let value;
|
|
53
54
|
let variantProp;
|
|
54
55
|
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,
|
|
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);
|
|
56
57
|
$[0] = props;
|
|
57
58
|
$[1] = asProp;
|
|
58
59
|
$[2] = className;
|
|
@@ -60,11 +61,11 @@ var TimePickerBase = (props) => {
|
|
|
60
61
|
$[4] = disableManualEntryProp;
|
|
61
62
|
$[5] = error;
|
|
62
63
|
$[6] = errorClassName;
|
|
63
|
-
$[7] =
|
|
64
|
-
$[8] =
|
|
65
|
-
$[9] =
|
|
66
|
-
$[10] =
|
|
67
|
-
$[11] =
|
|
64
|
+
$[7] = fireBlurOnChangeProp;
|
|
65
|
+
$[8] = headerClassName;
|
|
66
|
+
$[9] = helperText;
|
|
67
|
+
$[10] = hideLabelProp;
|
|
68
|
+
$[11] = inputClassName;
|
|
68
69
|
$[12] = isClearableProp;
|
|
69
70
|
$[13] = isDirty;
|
|
70
71
|
$[14] = isDisabled;
|
|
@@ -89,11 +90,11 @@ var TimePickerBase = (props) => {
|
|
|
89
90
|
disableManualEntryProp = $[4];
|
|
90
91
|
error = $[5];
|
|
91
92
|
errorClassName = $[6];
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
fireBlurOnChangeProp = $[7];
|
|
94
|
+
headerClassName = $[8];
|
|
95
|
+
helperText = $[9];
|
|
96
|
+
hideLabelProp = $[10];
|
|
97
|
+
inputClassName = $[11];
|
|
97
98
|
isClearableProp = $[12];
|
|
98
99
|
isDirty = $[13];
|
|
99
100
|
isDisabled = $[14];
|
|
@@ -118,6 +119,7 @@ var TimePickerBase = (props) => {
|
|
|
118
119
|
const hideLabel = hideLabelProp ?? ui.input.hideLabel;
|
|
119
120
|
const isClearable = isClearableProp ?? ui.input.isClearable;
|
|
120
121
|
const disableManualEntry = disableManualEntryProp ?? ui.dateInput.disableManualEntry;
|
|
122
|
+
const fireBlurOnChange = fireBlurOnChangeProp ?? ui.dateInput.fireBlurOnChange;
|
|
121
123
|
const shouldForceLeadingZeros = shouldForceLeadingZerosProp ?? ui.dateInput.shouldForceLeadingZeros;
|
|
122
124
|
const t0 = isHeaderHidden || as === "inline" || as === "filter" || as === "floating";
|
|
123
125
|
let t1;
|
|
@@ -179,221 +181,233 @@ var TimePickerBase = (props) => {
|
|
|
179
181
|
} else t4 = $[47];
|
|
180
182
|
const handleBlur = t4;
|
|
181
183
|
let t5;
|
|
182
|
-
if ($[48]
|
|
183
|
-
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) => {
|
|
184
192
|
onChange?.(val_0);
|
|
193
|
+
if (fireBlurOnChange) debouncedBlur(val_0);
|
|
185
194
|
};
|
|
186
|
-
$[
|
|
187
|
-
$[
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
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 = {
|
|
192
203
|
...rest,
|
|
193
204
|
isDisabled,
|
|
194
205
|
value: normalizedValue,
|
|
195
|
-
onChange:
|
|
206
|
+
onChange: t6,
|
|
196
207
|
locale,
|
|
197
208
|
shouldForceLeadingZeros
|
|
198
209
|
};
|
|
199
|
-
$[
|
|
200
|
-
$[
|
|
201
|
-
$[
|
|
202
|
-
$[
|
|
203
|
-
$[
|
|
204
|
-
$[
|
|
205
|
-
$[
|
|
206
|
-
} else
|
|
207
|
-
const state = useTimeFieldState(
|
|
208
|
-
let
|
|
209
|
-
if ($[
|
|
210
|
-
|
|
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 = () => {
|
|
211
222
|
if (initialDateEmitRef.current) {
|
|
212
223
|
initialDateEmitRef.current = false;
|
|
213
224
|
return;
|
|
214
225
|
}
|
|
215
226
|
if (state.timeValue) onChange?.(state.timeValue);
|
|
216
227
|
};
|
|
217
|
-
$[
|
|
218
|
-
$[
|
|
219
|
-
$[
|
|
220
|
-
} else
|
|
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);
|
|
228
|
-
const timeFieldRef = useRef(null);
|
|
228
|
+
$[60] = onChange;
|
|
229
|
+
$[61] = state.timeValue;
|
|
230
|
+
$[62] = t8;
|
|
231
|
+
} else t8 = $[62];
|
|
229
232
|
let t9;
|
|
230
|
-
if ($[
|
|
231
|
-
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);
|
|
239
|
+
const timeFieldRef = useRef(null);
|
|
240
|
+
let t10;
|
|
241
|
+
if ($[65] !== disableManualEntry || $[66] !== label || $[67] !== rest || $[68] !== shouldForceLeadingZeros) {
|
|
242
|
+
t10 = {
|
|
232
243
|
...rest,
|
|
233
244
|
label,
|
|
234
245
|
isReadOnly: disableManualEntry,
|
|
235
246
|
shouldForceLeadingZeros
|
|
236
247
|
};
|
|
237
|
-
$[
|
|
238
|
-
$[
|
|
239
|
-
$[
|
|
240
|
-
$[
|
|
241
|
-
$[
|
|
242
|
-
} else
|
|
243
|
-
const { labelProps, fieldProps } = useTimeField(
|
|
244
|
-
const
|
|
245
|
-
let
|
|
246
|
-
if ($[
|
|
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 = {
|
|
248
259
|
label,
|
|
249
260
|
tooltipText,
|
|
250
261
|
helperText,
|
|
251
262
|
isRequired,
|
|
252
263
|
rightContent,
|
|
253
|
-
isHeaderHidden:
|
|
264
|
+
isHeaderHidden: t11,
|
|
254
265
|
isDisabled,
|
|
255
266
|
className: headerClassName,
|
|
256
267
|
labelProps
|
|
257
268
|
};
|
|
258
|
-
$[
|
|
259
|
-
$[
|
|
260
|
-
$[
|
|
261
|
-
$[
|
|
262
|
-
$[
|
|
263
|
-
$[
|
|
264
|
-
$[
|
|
265
|
-
$[
|
|
266
|
-
$[
|
|
267
|
-
$[
|
|
268
|
-
} else
|
|
269
|
-
const headerProps =
|
|
270
|
-
let
|
|
271
|
-
if ($[
|
|
272
|
-
|
|
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 = () => {
|
|
273
284
|
const newValue = dialogState.value;
|
|
274
285
|
state.setValue(newValue);
|
|
275
286
|
setIsOpen(false);
|
|
287
|
+
if (fireBlurOnChange) handleBlur(newValue);
|
|
276
288
|
};
|
|
277
|
-
$[
|
|
278
|
-
$[
|
|
279
|
-
$[
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
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) => {
|
|
285
299
|
setIsOpen(open);
|
|
286
300
|
if (!isOpen) dialogState.setValue(state.value);
|
|
287
301
|
};
|
|
288
|
-
$[
|
|
289
|
-
$[
|
|
290
|
-
$[
|
|
291
|
-
$[
|
|
292
|
-
} else
|
|
293
|
-
const onOpenChange =
|
|
294
|
-
let
|
|
295
|
-
if ($[
|
|
296
|
-
|
|
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 = () => {
|
|
297
311
|
dialogState.setValue(state.value);
|
|
298
312
|
setIsOpen(true);
|
|
299
313
|
};
|
|
300
|
-
$[
|
|
301
|
-
$[
|
|
302
|
-
$[
|
|
303
|
-
} else
|
|
304
|
-
const onOpen =
|
|
305
|
-
let
|
|
306
|
-
if ($[
|
|
307
|
-
|
|
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 = () => {
|
|
308
322
|
onChange?.(null);
|
|
309
323
|
};
|
|
310
|
-
$[
|
|
311
|
-
$[
|
|
312
|
-
} else
|
|
313
|
-
const onInputClear =
|
|
314
|
-
const
|
|
315
|
-
let
|
|
316
|
-
if ($[
|
|
317
|
-
|
|
318
|
-
$[
|
|
319
|
-
$[
|
|
320
|
-
} else
|
|
321
|
-
const
|
|
322
|
-
let t19;
|
|
323
|
-
if ($[91] !== ref) {
|
|
324
|
-
t19 = mergeRefs(ref, timeFieldRef);
|
|
325
|
-
$[91] = ref;
|
|
326
|
-
$[92] = t19;
|
|
327
|
-
} else t19 = $[92];
|
|
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;
|
|
328
336
|
let t20;
|
|
329
|
-
if ($[
|
|
330
|
-
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) => {
|
|
331
345
|
fieldProps.onBlur?.(event);
|
|
332
346
|
handleBlur(state.value);
|
|
333
347
|
};
|
|
334
|
-
$[
|
|
335
|
-
$[
|
|
336
|
-
$[
|
|
337
|
-
$[
|
|
338
|
-
} else
|
|
339
|
-
let
|
|
340
|
-
if ($[
|
|
341
|
-
|
|
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 = {
|
|
342
356
|
...fieldProps,
|
|
343
|
-
onBlur:
|
|
357
|
+
onBlur: t21
|
|
344
358
|
};
|
|
345
|
-
$[
|
|
346
|
-
$[
|
|
347
|
-
$[
|
|
348
|
-
} else
|
|
349
|
-
const
|
|
350
|
-
let
|
|
351
|
-
if ($[
|
|
352
|
-
|
|
353
|
-
ref:
|
|
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,
|
|
354
368
|
as,
|
|
355
|
-
fieldProps:
|
|
369
|
+
fieldProps: t22,
|
|
356
370
|
state,
|
|
357
371
|
onPress: onOpen,
|
|
358
372
|
isDisabled,
|
|
359
373
|
isDirty,
|
|
360
374
|
isRequired,
|
|
361
|
-
isInvalid:
|
|
375
|
+
isInvalid: t23,
|
|
362
376
|
disableDropdown,
|
|
363
377
|
variant,
|
|
364
378
|
size,
|
|
365
379
|
isClearable,
|
|
366
|
-
isClearableIfDisabled,
|
|
367
380
|
headerProps,
|
|
368
381
|
disableManualEntry,
|
|
369
382
|
placeholder,
|
|
370
383
|
className: inputClassName,
|
|
371
|
-
onClear: onInputClear
|
|
384
|
+
onClear: onInputClear,
|
|
385
|
+
fireBlurOnChange
|
|
372
386
|
});
|
|
373
|
-
$[
|
|
374
|
-
$[
|
|
375
|
-
$[
|
|
376
|
-
$[
|
|
377
|
-
$[
|
|
378
|
-
$[
|
|
379
|
-
$[
|
|
380
|
-
$[
|
|
381
|
-
$[
|
|
382
|
-
$[
|
|
383
|
-
$[
|
|
384
|
-
$[
|
|
385
|
-
$[
|
|
386
|
-
$[
|
|
387
|
-
$[
|
|
388
|
-
$[
|
|
389
|
-
$[
|
|
390
|
-
$[
|
|
391
|
-
$[
|
|
392
|
-
$[
|
|
393
|
-
} else
|
|
394
|
-
let
|
|
395
|
-
if ($[
|
|
396
|
-
|
|
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, {
|
|
397
411
|
footer: /* @__PURE__ */ jsx(DateTimeDialogFooter, {
|
|
398
412
|
isDisabled,
|
|
399
413
|
onApply,
|
|
@@ -405,50 +419,50 @@ var TimePickerBase = (props) => {
|
|
|
405
419
|
onOpenChange,
|
|
406
420
|
children: /* @__PURE__ */ jsx(TimePickerForm, { state: dialogState })
|
|
407
421
|
});
|
|
408
|
-
$[
|
|
409
|
-
$[
|
|
410
|
-
$[
|
|
411
|
-
$[
|
|
412
|
-
$[
|
|
413
|
-
$[
|
|
414
|
-
$[
|
|
415
|
-
$[
|
|
416
|
-
$[
|
|
417
|
-
} else
|
|
418
|
-
let
|
|
419
|
-
if ($[
|
|
420
|
-
|
|
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, {
|
|
421
435
|
...formFieldProps,
|
|
422
436
|
as,
|
|
423
437
|
labelProps,
|
|
424
|
-
className:
|
|
425
|
-
tabIndex:
|
|
426
|
-
children: [
|
|
438
|
+
className: t18,
|
|
439
|
+
tabIndex: t19,
|
|
440
|
+
children: [t24, t25]
|
|
427
441
|
});
|
|
428
|
-
$[
|
|
429
|
-
$[
|
|
430
|
-
$[
|
|
431
|
-
$[
|
|
432
|
-
$[
|
|
433
|
-
$[
|
|
434
|
-
$[135] = t24;
|
|
435
|
-
$[136] = t25;
|
|
436
|
-
} else t25 = $[136];
|
|
437
|
-
let t26;
|
|
438
|
-
if ($[137] !== as || $[138] !== error || $[139] !== t16 || $[140] !== t25) {
|
|
439
|
-
t26 = /* @__PURE__ */ jsx(TooltipWrapper, {
|
|
440
|
-
as,
|
|
441
|
-
error,
|
|
442
|
-
triggerTabIndex: t16,
|
|
443
|
-
children: t25
|
|
444
|
-
});
|
|
445
|
-
$[137] = as;
|
|
446
|
-
$[138] = error;
|
|
447
|
-
$[139] = t16;
|
|
442
|
+
$[134] = as;
|
|
443
|
+
$[135] = formFieldProps;
|
|
444
|
+
$[136] = labelProps;
|
|
445
|
+
$[137] = t18;
|
|
446
|
+
$[138] = t19;
|
|
447
|
+
$[139] = t24;
|
|
448
448
|
$[140] = t25;
|
|
449
449
|
$[141] = t26;
|
|
450
450
|
} else t26 = $[141];
|
|
451
|
-
|
|
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;
|
|
452
466
|
};
|
|
453
467
|
var TimePickerInner = (t0) => {
|
|
454
468
|
const $ = c(9);
|
|
@@ -499,7 +513,6 @@ var TimePickerInner = (t0) => {
|
|
|
499
513
|
});
|
|
500
514
|
return /* @__PURE__ */ jsx(InputFrame, {
|
|
501
515
|
...props,
|
|
502
|
-
onClear: () => props.onChange?.(null),
|
|
503
516
|
isDisabled,
|
|
504
517
|
className: clsx("group relative inline-flex w-full flex-col text-left", props.className),
|
|
505
518
|
inputClassName: clsx("min-w-input-width-min-width", props.inputClassName),
|
|
@@ -570,35 +583,35 @@ var TimePicker = (t0) => {
|
|
|
570
583
|
props = $[1];
|
|
571
584
|
renderStaticInput = $[2];
|
|
572
585
|
}
|
|
573
|
-
if ("
|
|
574
|
-
let
|
|
586
|
+
if ("formControl" in props && props.formControl) {
|
|
587
|
+
let formControl;
|
|
575
588
|
let innerProps;
|
|
576
589
|
let ref;
|
|
577
590
|
if ($[3] !== props) {
|
|
578
|
-
({
|
|
591
|
+
({formControl, ref, ...innerProps} = props);
|
|
579
592
|
$[3] = props;
|
|
580
|
-
$[4] =
|
|
593
|
+
$[4] = formControl;
|
|
581
594
|
$[5] = innerProps;
|
|
582
595
|
$[6] = ref;
|
|
583
596
|
} else {
|
|
584
|
-
|
|
597
|
+
formControl = $[4];
|
|
585
598
|
innerProps = $[5];
|
|
586
599
|
ref = $[6];
|
|
587
600
|
}
|
|
588
|
-
const controlWithOptions =
|
|
601
|
+
const controlWithOptions = formControl.control;
|
|
589
602
|
let t1;
|
|
590
603
|
if ($[7] !== controlWithOptions._options?.disabled || $[8] !== innerProps || $[9] !== props.error || $[10] !== props.isDisabled || $[11] !== ref || $[12] !== renderStaticInput) {
|
|
591
604
|
t1 = (t2) => {
|
|
592
|
-
const { field
|
|
605
|
+
const { field, fieldState: t3 } = t2;
|
|
593
606
|
const { error, isDirty } = t3;
|
|
594
607
|
return /* @__PURE__ */ jsx(TimePickerInner, {
|
|
595
608
|
...innerProps,
|
|
596
|
-
ref: mergeRefs(ref,
|
|
597
|
-
value:
|
|
598
|
-
onChange:
|
|
599
|
-
onBlur:
|
|
609
|
+
ref: mergeRefs(ref, field.ref),
|
|
610
|
+
value: field.value ?? null,
|
|
611
|
+
onChange: field.onChange,
|
|
612
|
+
onBlur: field.onBlur,
|
|
600
613
|
isDirty,
|
|
601
|
-
isDisabled:
|
|
614
|
+
isDisabled: field.disabled || props.isDisabled,
|
|
602
615
|
isFormControlDisabled: !!controlWithOptions._options?.disabled,
|
|
603
616
|
error: props.error ?? error?.message,
|
|
604
617
|
renderStaticInput
|
|
@@ -613,14 +626,14 @@ var TimePicker = (t0) => {
|
|
|
613
626
|
$[13] = t1;
|
|
614
627
|
} else t1 = $[13];
|
|
615
628
|
let t2;
|
|
616
|
-
if ($[14] !==
|
|
617
|
-
t2 = /* @__PURE__ */ jsx(
|
|
618
|
-
control:
|
|
619
|
-
name:
|
|
629
|
+
if ($[14] !== formControl.control || $[15] !== formControl.name || $[16] !== t1) {
|
|
630
|
+
t2 = /* @__PURE__ */ jsx(Controller, {
|
|
631
|
+
control: formControl.control,
|
|
632
|
+
name: formControl.name,
|
|
620
633
|
render: t1
|
|
621
634
|
});
|
|
622
|
-
$[14] =
|
|
623
|
-
$[15] =
|
|
635
|
+
$[14] = formControl.control;
|
|
636
|
+
$[15] = formControl.name;
|
|
624
637
|
$[16] = t1;
|
|
625
638
|
$[17] = t2;
|
|
626
639
|
} else t2 = $[17];
|
|
@@ -3,9 +3,9 @@ import { CalendarHeader } from "./CalendarHeader.js";
|
|
|
3
3
|
import { MonthPicker } from "./MonthPicker.js";
|
|
4
4
|
import { TimePickerForm } from "./TimePickerForm.js";
|
|
5
5
|
import { YearPicker } from "./YearPicker.js";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
import { clsx } from "clsx";
|
|
7
8
|
import { useCallback, useEffect, useState } from "react";
|
|
8
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { useCalendar } from "@react-aria/calendar";
|
|
10
10
|
//#region src/components/inputs/DateTime/shared/Calendar.tsx
|
|
11
11
|
var Calendar = ({ className, includesTime, datePickerState, hourCycle, isTimeOptional, onApply, onMonthYearChange, onMonthYearCommit, selectedDate, granularity = "day", setDateValueOnDateSelection = false, onDateSelectionChange, ...props }) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Typography } from "../../../text/Typography/Typography.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import { clsx } from "clsx";
|
|
3
4
|
import { useCallback, useMemo, useRef } from "react";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import { mergeProps } from "@react-aria/utils";
|
|
6
6
|
import { isSameDay } from "@internationalized/date";
|
|
7
7
|
import { useCalendarCell } from "@react-aria/calendar";
|