@povio/ui 3.3.0 → 3.4.0-rc.10
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/locales/en/translation.json.d.ts +158 -0
- package/dist/assets/locales/sl/translation.json.d.ts +154 -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 +1 -2
- package/dist/components/inputs/Checkbox/Checkbox.js +95 -102
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +2 -3
- package/dist/components/inputs/Checkbox/CheckboxGroup.d.ts +1 -2
- package/dist/components/inputs/Checkbox/CheckboxGroup.js +111 -115
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +2 -2
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +17 -22
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +2 -2
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +17 -23
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +2 -2
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +21 -25
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +2 -2
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +225 -238
- 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 +7 -10
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +8 -12
- package/dist/components/inputs/DateTime/shared/DateField.d.ts +2 -1
- 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 +8 -16
- 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 +4 -5
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +2 -2
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +10 -11
- package/dist/components/inputs/DateTime/shared/YearPicker.js +2 -2
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +46 -1
- 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 +5 -6
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +5 -6
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +4 -5
- 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 +109 -107
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +2 -1
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +265 -254
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +2 -1
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +25 -24
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.d.ts +1 -1
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +3 -4
- package/dist/components/inputs/Input/TextArea/TextArea.d.ts +2 -1
- package/dist/components/inputs/Input/TextArea/TextArea.js +118 -117
- 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 +2 -1
- package/dist/components/inputs/Input/shared/InputContent.js +50 -48
- 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 +36 -37
- package/dist/components/inputs/Inputs/Inputs.d.ts +2 -2
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +1 -2
- package/dist/components/inputs/RadioGroup/RadioGroup.js +109 -113
- 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 +34 -37
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +58 -56
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +57 -56
- 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 +5 -4
- 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 +5 -9
- package/dist/components/inputs/Selection/shared/select.types.d.ts +1 -1
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +1 -0
- package/dist/components/inputs/Skeleton/InputFrame.js +10 -7
- 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 +5 -8
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +3 -3
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +4 -5
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +4 -5
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +6 -9
- package/dist/components/inputs/Toggle/Toggle.d.ts +1 -2
- package/dist/components/inputs/Toggle/Toggle.js +61 -65
- package/dist/components/inputs/shared/CheckContent.js +1 -1
- package/dist/components/inputs/shared/InputClear.js +45 -28
- package/dist/components/inputs/shared/TooltipWrapper.d.ts +1 -1
- package/dist/components/inputs/shared/form.binding.d.ts +27 -0
- package/dist/components/inputs/shared/form.binding.js +57 -0
- package/dist/components/inputs/shared/form.types.d.ts +9 -8
- package/dist/components/inputs/shared/form.types.js +8 -0
- package/dist/components/inputs/shared/input.cva.js +1 -1
- package/dist/components/inputs/shared/useStaticInputHandoff.js +64 -38
- 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 +15 -8
- 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 +6 -9
- package/dist/components/table/ColumnConfig.js +1 -1
- package/dist/components/table/InfiniteTable.js +1 -1
- package/dist/components/table/Table.js +6 -8
- 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 +14 -5
- package/dist/config/uiConfig.context.js +9 -11
- 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 +64 -49
- package/dist/hooks/useFilters.js +1 -1
- package/dist/hooks/useForm.d.ts +39 -15
- package/dist/hooks/useForm.js +96 -43
- package/dist/hooks/useFormAutosave.d.ts +8 -9
- package/dist/hooks/useFormAutosave.js +23 -9
- 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 +1 -263
- package/dist/index.js +11 -71
- package/dist/rhf/Inputs.d.ts +60 -0
- package/dist/rhf/Inputs.js +148 -0
- package/dist/rhf/components.d.ts +80 -0
- package/dist/rhf/components.js +101 -0
- package/dist/rhf/dynamicInputs.d.ts +18 -0
- package/dist/rhf/dynamicInputs.js +5 -0
- package/dist/rhf/fieldAdapter.d.ts +7 -0
- package/dist/rhf/fieldAdapter.js +40 -0
- package/dist/rhf/form.types.d.ts +12 -0
- package/dist/rhf/useAutosave.d.ts +10 -0
- package/dist/rhf/useAutosave.js +71 -0
- package/dist/rhf/useForm.d.ts +18 -0
- package/dist/rhf/useForm.js +48 -0
- package/dist/rhf/useFormAutosave.d.ts +15 -0
- package/dist/rhf/useFormAutosave.js +59 -0
- package/dist/rhf.d.ts +225 -0
- package/dist/tanstack.d.ts +224 -0
- package/dist/tanstack.js +141 -0
- package/package.json +15 -3
- package/dist/assets/icons/Account.d.ts +0 -2
- package/dist/assets/icons/AlignCenter.d.ts +0 -2
- package/dist/assets/icons/AlignCenter.js +0 -30
- package/dist/assets/icons/AlignLeft.d.ts +0 -2
- package/dist/assets/icons/AlignLeft.js +0 -30
- package/dist/assets/icons/AlignLeftRight.d.ts +0 -2
- package/dist/assets/icons/AlignLeftRight.js +0 -30
- package/dist/assets/icons/AlignRight.d.ts +0 -2
- package/dist/assets/icons/AlignRight.js +0 -30
- package/dist/assets/icons/ArrowDropDown.d.ts +0 -2
- package/dist/assets/icons/ArrowDropDown.js +0 -30
- package/dist/assets/icons/ArrowDropUp.d.ts +0 -2
- package/dist/assets/icons/ArrowDropUp.js +0 -30
- package/dist/assets/icons/ArrowLeft.d.ts +0 -2
- package/dist/assets/icons/ArrowLeft.js +0 -30
- package/dist/assets/icons/ArrowRight.d.ts +0 -2
- package/dist/assets/icons/ArrowRight.js +0 -30
- package/dist/assets/icons/Board.d.ts +0 -2
- package/dist/assets/icons/Bold.d.ts +0 -2
- package/dist/assets/icons/Bold.js +0 -30
- package/dist/assets/icons/BulletedList.d.ts +0 -2
- package/dist/assets/icons/BulletedList.js +0 -30
- package/dist/assets/icons/Calendar.d.ts +0 -2
- package/dist/assets/icons/Calendar.js +0 -32
- package/dist/assets/icons/Check.d.ts +0 -2
- package/dist/assets/icons/Check.js +0 -32
- package/dist/assets/icons/CheckCircle.d.ts +0 -2
- package/dist/assets/icons/CheckCircle.js +0 -30
- package/dist/assets/icons/CheckboxCheckmark.d.ts +0 -2
- package/dist/assets/icons/CheckboxCheckmark.js +0 -33
- package/dist/assets/icons/CheckboxIndeterminate.d.ts +0 -2
- package/dist/assets/icons/CheckboxIndeterminate.js +0 -33
- package/dist/assets/icons/ChevronDown.d.ts +0 -2
- package/dist/assets/icons/ChevronDown.js +0 -32
- package/dist/assets/icons/ChevronLeft.d.ts +0 -2
- package/dist/assets/icons/ChevronLeft.js +0 -32
- package/dist/assets/icons/ChevronRight.d.ts +0 -2
- package/dist/assets/icons/ChevronRight.js +0 -32
- package/dist/assets/icons/ChevronUp.d.ts +0 -2
- package/dist/assets/icons/ChevronUp.js +0 -32
- package/dist/assets/icons/ChevronsLeft.d.ts +0 -2
- package/dist/assets/icons/ChevronsLeft.js +0 -32
- package/dist/assets/icons/ChevronsRight.d.ts +0 -2
- package/dist/assets/icons/ChevronsRight.js +0 -32
- package/dist/assets/icons/Clock.d.ts +0 -2
- package/dist/assets/icons/Clock.js +0 -30
- package/dist/assets/icons/Close.d.ts +0 -2
- package/dist/assets/icons/Close.js +0 -30
- package/dist/assets/icons/DateTime.d.ts +0 -2
- package/dist/assets/icons/DateTime.js +0 -39
- package/dist/assets/icons/DragIndicator.d.ts +0 -2
- package/dist/assets/icons/DragIndicator.js +0 -30
- package/dist/assets/icons/Edit.d.ts +0 -2
- package/dist/assets/icons/Emoji.d.ts +0 -2
- package/dist/assets/icons/File.d.ts +0 -2
- package/dist/assets/icons/File.js +0 -32
- package/dist/assets/icons/Grid.d.ts +0 -2
- package/dist/assets/icons/Highlight.d.ts +0 -2
- package/dist/assets/icons/Highlight.js +0 -30
- package/dist/assets/icons/HighlightOn.d.ts +0 -6
- package/dist/assets/icons/HighlightOn.js +0 -55
- package/dist/assets/icons/Home.d.ts +0 -2
- package/dist/assets/icons/Home.js +0 -30
- package/dist/assets/icons/Image.d.ts +0 -2
- package/dist/assets/icons/ImageError.d.ts +0 -2
- package/dist/assets/icons/Info.d.ts +0 -2
- package/dist/assets/icons/Info.js +0 -41
- package/dist/assets/icons/Italic.d.ts +0 -2
- package/dist/assets/icons/Italic.js +0 -30
- package/dist/assets/icons/Link.d.ts +0 -2
- package/dist/assets/icons/Link.js +0 -30
- package/dist/assets/icons/Loader.d.ts +0 -2
- package/dist/assets/icons/MapPin.d.ts +0 -2
- package/dist/assets/icons/Menu.d.ts +0 -2
- package/dist/assets/icons/Menu.js +0 -30
- package/dist/assets/icons/Minus.d.ts +0 -2
- package/dist/assets/icons/MoreHoriz.d.ts +0 -2
- package/dist/assets/icons/NumberedList.d.ts +0 -2
- package/dist/assets/icons/NumberedList.js +0 -30
- package/dist/assets/icons/Pause.d.ts +0 -2
- package/dist/assets/icons/Plus.d.ts +0 -2
- package/dist/assets/icons/PointerHorizontal.d.ts +0 -2
- package/dist/assets/icons/PointerHorizontal.js +0 -30
- package/dist/assets/icons/PointerVertical.d.ts +0 -2
- package/dist/assets/icons/PointerVertical.js +0 -30
- package/dist/assets/icons/Retry.d.ts +0 -2
- package/dist/assets/icons/Search.d.ts +0 -2
- package/dist/assets/icons/Search.js +0 -30
- package/dist/assets/icons/Send.d.ts +0 -2
- package/dist/assets/icons/Send.js +0 -32
- package/dist/assets/icons/Share.d.ts +0 -2
- package/dist/assets/icons/Slash.d.ts +0 -2
- package/dist/assets/icons/Strikethrough.d.ts +0 -2
- package/dist/assets/icons/Strikethrough.js +0 -30
- package/dist/assets/icons/TextColor.d.ts +0 -6
- package/dist/assets/icons/TextColor.js +0 -52
- package/dist/assets/icons/Today.d.ts +0 -2
- package/dist/assets/icons/Today.js +0 -30
- package/dist/assets/icons/Trash.d.ts +0 -2
- package/dist/assets/icons/Underlined.d.ts +0 -2
- package/dist/assets/icons/Underlined.js +0 -32
- package/dist/assets/icons/Upload.d.ts +0 -2
- package/dist/assets/icons/Upload.js +0 -39
- package/dist/assets/icons/User.d.ts +0 -2
- package/dist/assets/icons/Visibility.d.ts +0 -2
- package/dist/assets/icons/Visibility.js +0 -30
- package/dist/assets/icons/VisibilityOff.d.ts +0 -2
- package/dist/assets/icons/VisibilityOff.js +0 -30
- package/dist/assets/icons/WarningFilled.d.ts +0 -2
- package/dist/assets/icons/WarningFilled.js +0 -32
- package/dist/assets/icons/WarningOutlined.d.ts +0 -2
- /package/dist/{hooks/useAutosave.spec.d.ts → rhf/entrypoints.type-test.d.ts} +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
2
|
+
import { FieldController } from "../../shared/form.binding.js";
|
|
2
3
|
import { FormField } from "../../FormField/FormField.js";
|
|
3
4
|
import { TimePickerForm } from "../shared/TimePickerForm.js";
|
|
4
5
|
import { DateTimeUtils } from "../../../../utils/date-time.utils.js";
|
|
@@ -8,21 +9,19 @@ import { getStaticDateTimeFocusTarget, getStaticTimeSegments } from "../shared/s
|
|
|
8
9
|
import { TooltipWrapper } from "../../shared/TooltipWrapper.js";
|
|
9
10
|
import { InputFrame } from "../../Skeleton/InputFrame.js";
|
|
10
11
|
import { useStaticInputHandoff } from "../../shared/useStaticInputHandoff.js";
|
|
11
|
-
import { useDebounceCallback } from "../../../../hooks/useDebounceCallback.js";
|
|
12
12
|
import { TimePickerInput } from "../shared/TimePickerInput.js";
|
|
13
|
-
import { c } from "react/compiler-runtime";
|
|
14
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
13
|
import { clsx } from "clsx";
|
|
16
14
|
import { useEffect, useRef, useState } from "react";
|
|
15
|
+
import { c } from "react/compiler-runtime";
|
|
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
|
-
import { Controller } from "react-hook-form";
|
|
20
19
|
import { getLocalTimeZone, now, toTime } from "@internationalized/date";
|
|
21
20
|
import { DateTime } from "luxon";
|
|
22
21
|
import { useTimeFieldState } from "react-stately";
|
|
23
22
|
//#region src/components/inputs/DateTime/TimePicker/TimePicker.tsx
|
|
24
23
|
var TimePickerBase = (props) => {
|
|
25
|
-
const $ = c(
|
|
24
|
+
const $ = c(142);
|
|
26
25
|
const ui = UIConfig.useConfig();
|
|
27
26
|
let asProp;
|
|
28
27
|
let className;
|
|
@@ -30,11 +29,11 @@ var TimePickerBase = (props) => {
|
|
|
30
29
|
let disableManualEntryProp;
|
|
31
30
|
let error;
|
|
32
31
|
let errorClassName;
|
|
33
|
-
let fireBlurOnChangeProp;
|
|
34
32
|
let headerClassName;
|
|
35
33
|
let helperText;
|
|
36
34
|
let hideLabelProp;
|
|
37
35
|
let inputClassName;
|
|
36
|
+
let isClearableIfDisabled;
|
|
38
37
|
let isClearableProp;
|
|
39
38
|
let isDirty;
|
|
40
39
|
let isDisabled;
|
|
@@ -53,7 +52,7 @@ var TimePickerBase = (props) => {
|
|
|
53
52
|
let value;
|
|
54
53
|
let variantProp;
|
|
55
54
|
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,
|
|
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);
|
|
57
56
|
$[0] = props;
|
|
58
57
|
$[1] = asProp;
|
|
59
58
|
$[2] = className;
|
|
@@ -61,11 +60,11 @@ var TimePickerBase = (props) => {
|
|
|
61
60
|
$[4] = disableManualEntryProp;
|
|
62
61
|
$[5] = error;
|
|
63
62
|
$[6] = errorClassName;
|
|
64
|
-
$[7] =
|
|
65
|
-
$[8] =
|
|
66
|
-
$[9] =
|
|
67
|
-
$[10] =
|
|
68
|
-
$[11] =
|
|
63
|
+
$[7] = headerClassName;
|
|
64
|
+
$[8] = helperText;
|
|
65
|
+
$[9] = hideLabelProp;
|
|
66
|
+
$[10] = inputClassName;
|
|
67
|
+
$[11] = isClearableIfDisabled;
|
|
69
68
|
$[12] = isClearableProp;
|
|
70
69
|
$[13] = isDirty;
|
|
71
70
|
$[14] = isDisabled;
|
|
@@ -90,11 +89,11 @@ var TimePickerBase = (props) => {
|
|
|
90
89
|
disableManualEntryProp = $[4];
|
|
91
90
|
error = $[5];
|
|
92
91
|
errorClassName = $[6];
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
92
|
+
headerClassName = $[7];
|
|
93
|
+
helperText = $[8];
|
|
94
|
+
hideLabelProp = $[9];
|
|
95
|
+
inputClassName = $[10];
|
|
96
|
+
isClearableIfDisabled = $[11];
|
|
98
97
|
isClearableProp = $[12];
|
|
99
98
|
isDirty = $[13];
|
|
100
99
|
isDisabled = $[14];
|
|
@@ -119,7 +118,6 @@ var TimePickerBase = (props) => {
|
|
|
119
118
|
const hideLabel = hideLabelProp ?? ui.input.hideLabel;
|
|
120
119
|
const isClearable = isClearableProp ?? ui.input.isClearable;
|
|
121
120
|
const disableManualEntry = disableManualEntryProp ?? ui.dateInput.disableManualEntry;
|
|
122
|
-
const fireBlurOnChange = fireBlurOnChangeProp ?? ui.dateInput.fireBlurOnChange;
|
|
123
121
|
const shouldForceLeadingZeros = shouldForceLeadingZerosProp ?? ui.dateInput.shouldForceLeadingZeros;
|
|
124
122
|
const t0 = isHeaderHidden || as === "inline" || as === "filter" || as === "floating";
|
|
125
123
|
let t1;
|
|
@@ -181,233 +179,221 @@ var TimePickerBase = (props) => {
|
|
|
181
179
|
} else t4 = $[47];
|
|
182
180
|
const handleBlur = t4;
|
|
183
181
|
let t5;
|
|
184
|
-
if ($[48]
|
|
185
|
-
t5 =
|
|
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) => {
|
|
182
|
+
if ($[48] !== onChange) {
|
|
183
|
+
t5 = (val_0) => {
|
|
192
184
|
onChange?.(val_0);
|
|
193
|
-
if (fireBlurOnChange) debouncedBlur(val_0);
|
|
194
185
|
};
|
|
195
|
-
$[
|
|
196
|
-
$[
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
if ($[53] !== isDisabled || $[54] !== locale || $[55] !== normalizedValue || $[56] !== rest || $[57] !== shouldForceLeadingZeros || $[58] !== t6) {
|
|
202
|
-
t7 = {
|
|
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 = {
|
|
203
192
|
...rest,
|
|
204
193
|
isDisabled,
|
|
205
194
|
value: normalizedValue,
|
|
206
|
-
onChange:
|
|
195
|
+
onChange: t5,
|
|
207
196
|
locale,
|
|
208
197
|
shouldForceLeadingZeros
|
|
209
198
|
};
|
|
210
|
-
$[
|
|
211
|
-
$[
|
|
212
|
-
$[
|
|
213
|
-
$[
|
|
214
|
-
$[
|
|
215
|
-
$[
|
|
216
|
-
$[
|
|
217
|
-
} else
|
|
218
|
-
const state = useTimeFieldState(
|
|
219
|
-
let
|
|
220
|
-
if ($[
|
|
221
|
-
|
|
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 = () => {
|
|
222
211
|
if (initialDateEmitRef.current) {
|
|
223
212
|
initialDateEmitRef.current = false;
|
|
224
213
|
return;
|
|
225
214
|
}
|
|
226
215
|
if (state.timeValue) onChange?.(state.timeValue);
|
|
227
216
|
};
|
|
228
|
-
$[
|
|
229
|
-
$[
|
|
230
|
-
$[
|
|
231
|
-
} else
|
|
232
|
-
let
|
|
233
|
-
if ($[
|
|
234
|
-
|
|
235
|
-
$[
|
|
236
|
-
$[
|
|
237
|
-
} else
|
|
238
|
-
useEffect(
|
|
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);
|
|
239
228
|
const timeFieldRef = useRef(null);
|
|
240
|
-
let
|
|
241
|
-
if ($[
|
|
242
|
-
|
|
229
|
+
let t9;
|
|
230
|
+
if ($[62] !== disableManualEntry || $[63] !== label || $[64] !== rest || $[65] !== shouldForceLeadingZeros) {
|
|
231
|
+
t9 = {
|
|
243
232
|
...rest,
|
|
244
233
|
label,
|
|
245
234
|
isReadOnly: disableManualEntry,
|
|
246
235
|
shouldForceLeadingZeros
|
|
247
236
|
};
|
|
248
|
-
$[
|
|
249
|
-
$[
|
|
250
|
-
$[
|
|
251
|
-
$[
|
|
252
|
-
$[
|
|
253
|
-
} else
|
|
254
|
-
const { labelProps, fieldProps } = useTimeField(
|
|
255
|
-
const
|
|
256
|
-
let
|
|
257
|
-
if ($[
|
|
258
|
-
|
|
237
|
+
$[62] = disableManualEntry;
|
|
238
|
+
$[63] = label;
|
|
239
|
+
$[64] = rest;
|
|
240
|
+
$[65] = shouldForceLeadingZeros;
|
|
241
|
+
$[66] = t9;
|
|
242
|
+
} else t9 = $[66];
|
|
243
|
+
const { labelProps, fieldProps } = useTimeField(t9, state, timeFieldRef);
|
|
244
|
+
const t10 = hideLabel || isHeaderHidden;
|
|
245
|
+
let t11;
|
|
246
|
+
if ($[67] !== headerClassName || $[68] !== helperText || $[69] !== isDisabled || $[70] !== isRequired || $[71] !== label || $[72] !== labelProps || $[73] !== rightContent || $[74] !== t10 || $[75] !== tooltipText) {
|
|
247
|
+
t11 = {
|
|
259
248
|
label,
|
|
260
249
|
tooltipText,
|
|
261
250
|
helperText,
|
|
262
251
|
isRequired,
|
|
263
252
|
rightContent,
|
|
264
|
-
isHeaderHidden:
|
|
253
|
+
isHeaderHidden: t10,
|
|
265
254
|
isDisabled,
|
|
266
255
|
className: headerClassName,
|
|
267
256
|
labelProps
|
|
268
257
|
};
|
|
269
|
-
$[
|
|
270
|
-
$[
|
|
271
|
-
$[
|
|
272
|
-
$[
|
|
273
|
-
$[
|
|
274
|
-
$[
|
|
275
|
-
$[
|
|
276
|
-
$[
|
|
277
|
-
$[
|
|
278
|
-
$[
|
|
279
|
-
} else
|
|
280
|
-
const headerProps =
|
|
281
|
-
let
|
|
282
|
-
if ($[
|
|
283
|
-
|
|
258
|
+
$[67] = headerClassName;
|
|
259
|
+
$[68] = helperText;
|
|
260
|
+
$[69] = isDisabled;
|
|
261
|
+
$[70] = isRequired;
|
|
262
|
+
$[71] = label;
|
|
263
|
+
$[72] = labelProps;
|
|
264
|
+
$[73] = rightContent;
|
|
265
|
+
$[74] = t10;
|
|
266
|
+
$[75] = tooltipText;
|
|
267
|
+
$[76] = t11;
|
|
268
|
+
} else t11 = $[76];
|
|
269
|
+
const headerProps = t11;
|
|
270
|
+
let t12;
|
|
271
|
+
if ($[77] !== dialogState.value || $[78] !== state) {
|
|
272
|
+
t12 = () => {
|
|
284
273
|
const newValue = dialogState.value;
|
|
285
274
|
state.setValue(newValue);
|
|
286
275
|
setIsOpen(false);
|
|
287
|
-
if (fireBlurOnChange) handleBlur(newValue);
|
|
288
276
|
};
|
|
289
|
-
$[
|
|
290
|
-
$[
|
|
291
|
-
$[
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
if ($[85] !== dialogState || $[86] !== isOpen || $[87] !== state.value) {
|
|
298
|
-
t14 = (open) => {
|
|
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) => {
|
|
299
285
|
setIsOpen(open);
|
|
300
286
|
if (!isOpen) dialogState.setValue(state.value);
|
|
301
287
|
};
|
|
302
|
-
$[
|
|
303
|
-
$[
|
|
304
|
-
$[
|
|
305
|
-
$[
|
|
306
|
-
} else
|
|
307
|
-
const onOpenChange =
|
|
308
|
-
let
|
|
309
|
-
if ($[
|
|
310
|
-
|
|
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 = () => {
|
|
311
297
|
dialogState.setValue(state.value);
|
|
312
298
|
setIsOpen(true);
|
|
313
299
|
};
|
|
314
|
-
$[
|
|
315
|
-
$[
|
|
316
|
-
$[
|
|
317
|
-
} else
|
|
318
|
-
const onOpen =
|
|
319
|
-
let
|
|
320
|
-
if ($[
|
|
321
|
-
|
|
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 = () => {
|
|
322
308
|
onChange?.(null);
|
|
323
309
|
};
|
|
324
|
-
$[
|
|
325
|
-
$[
|
|
326
|
-
} else
|
|
327
|
-
const onInputClear =
|
|
328
|
-
const
|
|
329
|
-
let
|
|
330
|
-
if ($[
|
|
331
|
-
|
|
332
|
-
$[
|
|
333
|
-
$[
|
|
334
|
-
} else
|
|
335
|
-
const
|
|
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];
|
|
336
328
|
let t20;
|
|
337
|
-
if ($[
|
|
338
|
-
t20 =
|
|
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) => {
|
|
329
|
+
if ($[93] !== fieldProps || $[94] !== handleBlur || $[95] !== state.value) {
|
|
330
|
+
t20 = (event) => {
|
|
345
331
|
fieldProps.onBlur?.(event);
|
|
346
332
|
handleBlur(state.value);
|
|
347
333
|
};
|
|
348
|
-
$[
|
|
349
|
-
$[
|
|
350
|
-
$[
|
|
351
|
-
$[
|
|
352
|
-
} else
|
|
353
|
-
let
|
|
354
|
-
if ($[
|
|
355
|
-
|
|
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 = {
|
|
356
342
|
...fieldProps,
|
|
357
|
-
onBlur:
|
|
343
|
+
onBlur: t20
|
|
358
344
|
};
|
|
359
|
-
$[
|
|
360
|
-
$[
|
|
361
|
-
$[
|
|
362
|
-
} else
|
|
363
|
-
const
|
|
364
|
-
let
|
|
365
|
-
if ($[
|
|
366
|
-
|
|
367
|
-
ref:
|
|
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,
|
|
368
354
|
as,
|
|
369
|
-
fieldProps:
|
|
355
|
+
fieldProps: t21,
|
|
370
356
|
state,
|
|
371
357
|
onPress: onOpen,
|
|
372
358
|
isDisabled,
|
|
373
359
|
isDirty,
|
|
374
360
|
isRequired,
|
|
375
|
-
isInvalid:
|
|
361
|
+
isInvalid: t22,
|
|
376
362
|
disableDropdown,
|
|
377
363
|
variant,
|
|
378
364
|
size,
|
|
379
365
|
isClearable,
|
|
366
|
+
isClearableIfDisabled,
|
|
380
367
|
headerProps,
|
|
381
368
|
disableManualEntry,
|
|
382
369
|
placeholder,
|
|
383
370
|
className: inputClassName,
|
|
384
|
-
onClear: onInputClear
|
|
385
|
-
fireBlurOnChange
|
|
371
|
+
onClear: onInputClear
|
|
386
372
|
});
|
|
387
|
-
$[
|
|
388
|
-
$[
|
|
389
|
-
$[
|
|
390
|
-
$[
|
|
391
|
-
$[
|
|
392
|
-
$[
|
|
393
|
-
$[
|
|
394
|
-
$[
|
|
395
|
-
$[
|
|
396
|
-
$[
|
|
397
|
-
$[
|
|
398
|
-
$[
|
|
399
|
-
$[
|
|
400
|
-
$[
|
|
401
|
-
$[
|
|
402
|
-
$[
|
|
403
|
-
$[
|
|
404
|
-
$[
|
|
405
|
-
$[
|
|
406
|
-
$[
|
|
407
|
-
} else
|
|
408
|
-
let
|
|
409
|
-
if ($[
|
|
410
|
-
|
|
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, {
|
|
411
397
|
footer: /* @__PURE__ */ jsx(DateTimeDialogFooter, {
|
|
412
398
|
isDisabled,
|
|
413
399
|
onApply,
|
|
@@ -419,50 +405,50 @@ var TimePickerBase = (props) => {
|
|
|
419
405
|
onOpenChange,
|
|
420
406
|
children: /* @__PURE__ */ jsx(TimePickerForm, { state: dialogState })
|
|
421
407
|
});
|
|
422
|
-
$[
|
|
423
|
-
$[
|
|
424
|
-
$[
|
|
425
|
-
$[
|
|
426
|
-
$[
|
|
427
|
-
$[
|
|
428
|
-
$[
|
|
429
|
-
$[
|
|
430
|
-
$[
|
|
431
|
-
} else
|
|
432
|
-
let
|
|
433
|
-
if ($[
|
|
434
|
-
|
|
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, {
|
|
435
421
|
...formFieldProps,
|
|
436
422
|
as,
|
|
437
423
|
labelProps,
|
|
438
|
-
className:
|
|
439
|
-
tabIndex:
|
|
440
|
-
children: [
|
|
424
|
+
className: t17,
|
|
425
|
+
tabIndex: t18,
|
|
426
|
+
children: [t23, t24]
|
|
441
427
|
});
|
|
442
|
-
$[
|
|
443
|
-
$[
|
|
444
|
-
$[
|
|
445
|
-
$[
|
|
446
|
-
$[
|
|
447
|
-
$[
|
|
448
|
-
$[
|
|
449
|
-
$[
|
|
450
|
-
} else
|
|
451
|
-
let
|
|
452
|
-
if ($[
|
|
453
|
-
|
|
428
|
+
$[129] = as;
|
|
429
|
+
$[130] = formFieldProps;
|
|
430
|
+
$[131] = labelProps;
|
|
431
|
+
$[132] = t17;
|
|
432
|
+
$[133] = t18;
|
|
433
|
+
$[134] = t23;
|
|
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, {
|
|
454
440
|
as,
|
|
455
441
|
error,
|
|
456
|
-
triggerTabIndex:
|
|
457
|
-
children:
|
|
442
|
+
triggerTabIndex: t16,
|
|
443
|
+
children: t25
|
|
458
444
|
});
|
|
459
|
-
$[
|
|
460
|
-
$[
|
|
461
|
-
$[
|
|
462
|
-
$[
|
|
463
|
-
$[
|
|
464
|
-
} else
|
|
465
|
-
return
|
|
445
|
+
$[137] = as;
|
|
446
|
+
$[138] = error;
|
|
447
|
+
$[139] = t16;
|
|
448
|
+
$[140] = t25;
|
|
449
|
+
$[141] = t26;
|
|
450
|
+
} else t26 = $[141];
|
|
451
|
+
return t26;
|
|
466
452
|
};
|
|
467
453
|
var TimePickerInner = (t0) => {
|
|
468
454
|
const $ = c(9);
|
|
@@ -513,6 +499,7 @@ var TimePickerInner = (t0) => {
|
|
|
513
499
|
});
|
|
514
500
|
return /* @__PURE__ */ jsx(InputFrame, {
|
|
515
501
|
...props,
|
|
502
|
+
onClear: () => props.onChange?.(null),
|
|
516
503
|
isDisabled,
|
|
517
504
|
className: clsx("group relative inline-flex w-full flex-col text-left", props.className),
|
|
518
505
|
inputClassName: clsx("min-w-input-width-min-width", props.inputClassName),
|
|
@@ -583,35 +570,35 @@ var TimePicker = (t0) => {
|
|
|
583
570
|
props = $[1];
|
|
584
571
|
renderStaticInput = $[2];
|
|
585
572
|
}
|
|
586
|
-
if ("
|
|
587
|
-
let
|
|
573
|
+
if ("field" in props && props.field) {
|
|
574
|
+
let field;
|
|
588
575
|
let innerProps;
|
|
589
576
|
let ref;
|
|
590
577
|
if ($[3] !== props) {
|
|
591
|
-
({
|
|
578
|
+
({field, ref, ...innerProps} = props);
|
|
592
579
|
$[3] = props;
|
|
593
|
-
$[4] =
|
|
580
|
+
$[4] = field;
|
|
594
581
|
$[5] = innerProps;
|
|
595
582
|
$[6] = ref;
|
|
596
583
|
} else {
|
|
597
|
-
|
|
584
|
+
field = $[4];
|
|
598
585
|
innerProps = $[5];
|
|
599
586
|
ref = $[6];
|
|
600
587
|
}
|
|
601
|
-
const controlWithOptions =
|
|
588
|
+
const controlWithOptions = field.form;
|
|
602
589
|
let t1;
|
|
603
590
|
if ($[7] !== controlWithOptions._options?.disabled || $[8] !== innerProps || $[9] !== props.error || $[10] !== props.isDisabled || $[11] !== ref || $[12] !== renderStaticInput) {
|
|
604
591
|
t1 = (t2) => {
|
|
605
|
-
const { field, fieldState: t3 } = t2;
|
|
592
|
+
const { field: field_0, fieldState: t3 } = t2;
|
|
606
593
|
const { error, isDirty } = t3;
|
|
607
594
|
return /* @__PURE__ */ jsx(TimePickerInner, {
|
|
608
595
|
...innerProps,
|
|
609
|
-
ref: mergeRefs(ref,
|
|
610
|
-
value:
|
|
611
|
-
onChange:
|
|
612
|
-
onBlur:
|
|
596
|
+
ref: mergeRefs(ref, field_0.ref),
|
|
597
|
+
value: field_0.value ?? null,
|
|
598
|
+
onChange: (value) => field_0.onChange(value ?? null),
|
|
599
|
+
onBlur: field_0.onBlur,
|
|
613
600
|
isDirty,
|
|
614
|
-
isDisabled:
|
|
601
|
+
isDisabled: field_0.disabled || props.isDisabled,
|
|
615
602
|
isFormControlDisabled: !!controlWithOptions._options?.disabled,
|
|
616
603
|
error: props.error ?? error?.message,
|
|
617
604
|
renderStaticInput
|
|
@@ -626,14 +613,14 @@ var TimePicker = (t0) => {
|
|
|
626
613
|
$[13] = t1;
|
|
627
614
|
} else t1 = $[13];
|
|
628
615
|
let t2;
|
|
629
|
-
if ($[14] !==
|
|
630
|
-
t2 = /* @__PURE__ */ jsx(
|
|
631
|
-
control:
|
|
632
|
-
name:
|
|
616
|
+
if ($[14] !== field.form || $[15] !== field.name || $[16] !== t1) {
|
|
617
|
+
t2 = /* @__PURE__ */ jsx(FieldController, {
|
|
618
|
+
control: field.form,
|
|
619
|
+
name: field.name,
|
|
633
620
|
render: t1
|
|
634
621
|
});
|
|
635
|
-
$[14] =
|
|
636
|
-
$[15] =
|
|
622
|
+
$[14] = field.form;
|
|
623
|
+
$[15] = field.name;
|
|
637
624
|
$[16] = t1;
|
|
638
625
|
$[17] = t2;
|
|
639
626
|
} 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";
|
|
7
6
|
import { clsx } from "clsx";
|
|
8
7
|
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";
|
|
3
2
|
import { clsx } from "clsx";
|
|
4
3
|
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";
|