@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
|
@@ -5,6 +5,7 @@ import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconBu
|
|
|
5
5
|
import { useBreakpoint } from "../../../../hooks/useBreakpoint.js";
|
|
6
6
|
import { getPlaceholder } from "./DateSegmentItem.js";
|
|
7
7
|
import { useLongPressRepeat } from "../../../../hooks/useLongPressRepeat.js";
|
|
8
|
+
import { c } from "react/compiler-runtime";
|
|
8
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
10
|
import { clsx } from "clsx";
|
|
10
11
|
import { useEffect, useRef } from "react";
|
|
@@ -13,67 +14,152 @@ import { Time } from "@internationalized/date";
|
|
|
13
14
|
import { useTimeFieldState } from "@react-stately/datepicker";
|
|
14
15
|
//#region src/components/inputs/DateTime/shared/TimePickerForm.tsx
|
|
15
16
|
var INCREMENT_STEP_SIZE = 5;
|
|
16
|
-
var TimePickerForm = (
|
|
17
|
+
var TimePickerForm = (t0) => {
|
|
18
|
+
const $ = c(28);
|
|
19
|
+
const { state, datePickerState } = t0;
|
|
17
20
|
const isDesktop = useBreakpoint("md");
|
|
18
21
|
const { locale } = useLocale();
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
const t1 = datePickerState?.timeValue;
|
|
23
|
+
let t2;
|
|
24
|
+
if ($[0] !== datePickerState) {
|
|
25
|
+
t2 = (value) => {
|
|
23
26
|
datePickerState?.setTimeValue(value ?? new Time(0, 0));
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
};
|
|
28
|
+
$[0] = datePickerState;
|
|
29
|
+
$[1] = t2;
|
|
30
|
+
} else t2 = $[1];
|
|
31
|
+
let t3;
|
|
32
|
+
if ($[2] !== locale || $[3] !== t1 || $[4] !== t2) {
|
|
33
|
+
t3 = {
|
|
34
|
+
locale,
|
|
35
|
+
defaultValue: t1,
|
|
36
|
+
onChange: t2,
|
|
37
|
+
hideTimeZone: true
|
|
38
|
+
};
|
|
39
|
+
$[2] = locale;
|
|
40
|
+
$[3] = t1;
|
|
41
|
+
$[4] = t2;
|
|
42
|
+
$[5] = t3;
|
|
43
|
+
} else t3 = $[5];
|
|
44
|
+
const fieldState = useTimeFieldState(t3);
|
|
27
45
|
const ref = useRef(null);
|
|
28
46
|
const innerState = state ?? fieldState;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
47
|
+
let t4;
|
|
48
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
49
|
+
t4 = { "aria-label": "Time Picker" };
|
|
50
|
+
$[6] = t4;
|
|
51
|
+
} else t4 = $[6];
|
|
52
|
+
const { fieldProps } = useTimeField(t4, innerState, ref);
|
|
53
|
+
let t5;
|
|
54
|
+
if ($[7] !== innerState.segments || $[8] !== isDesktop) {
|
|
55
|
+
t5 = (index) => {
|
|
56
|
+
if (!isDesktop) return false;
|
|
57
|
+
return index === innerState.segments.findIndex(_temp);
|
|
58
|
+
};
|
|
59
|
+
$[7] = innerState.segments;
|
|
60
|
+
$[8] = isDesktop;
|
|
61
|
+
$[9] = t5;
|
|
62
|
+
} else t5 = $[9];
|
|
63
|
+
const getAutoFocus = t5;
|
|
64
|
+
let t6;
|
|
65
|
+
if ($[10] !== innerState) {
|
|
66
|
+
t6 = innerState.segments.map((segment, i) => /* @__PURE__ */ jsx(TimeSegmentButton, {
|
|
67
|
+
segment,
|
|
68
|
+
state: innerState,
|
|
69
|
+
type: "increment"
|
|
70
|
+
}, i));
|
|
71
|
+
$[10] = innerState;
|
|
72
|
+
$[11] = t6;
|
|
73
|
+
} else t6 = $[11];
|
|
74
|
+
let t7;
|
|
75
|
+
if ($[12] !== t6) {
|
|
76
|
+
t7 = /* @__PURE__ */ jsx("div", {
|
|
77
|
+
className: "flex items-center justify-center gap-4",
|
|
78
|
+
children: t6
|
|
79
|
+
});
|
|
80
|
+
$[12] = t6;
|
|
81
|
+
$[13] = t7;
|
|
82
|
+
} else t7 = $[13];
|
|
83
|
+
let t8;
|
|
84
|
+
if ($[14] !== getAutoFocus || $[15] !== innerState) {
|
|
85
|
+
t8 = innerState.segments.map((segment_0, i_0) => /* @__PURE__ */ jsx(TimeSegmentInput, {
|
|
86
|
+
segment: segment_0,
|
|
87
|
+
state: innerState,
|
|
88
|
+
autoFocus: getAutoFocus(i_0)
|
|
89
|
+
}, i_0));
|
|
90
|
+
$[14] = getAutoFocus;
|
|
91
|
+
$[15] = innerState;
|
|
92
|
+
$[16] = t8;
|
|
93
|
+
} else t8 = $[16];
|
|
94
|
+
let t9;
|
|
95
|
+
if ($[17] !== fieldProps || $[18] !== t8) {
|
|
96
|
+
t9 = /* @__PURE__ */ jsx("div", {
|
|
97
|
+
ref,
|
|
98
|
+
...fieldProps,
|
|
99
|
+
className: "flex items-center justify-center gap-4 py-2",
|
|
100
|
+
children: t8
|
|
101
|
+
});
|
|
102
|
+
$[17] = fieldProps;
|
|
103
|
+
$[18] = t8;
|
|
104
|
+
$[19] = t9;
|
|
105
|
+
} else t9 = $[19];
|
|
106
|
+
let t10;
|
|
107
|
+
if ($[20] !== innerState) {
|
|
108
|
+
t10 = innerState.segments.map((segment_1, i_1) => /* @__PURE__ */ jsx(TimeSegmentButton, {
|
|
109
|
+
segment: segment_1,
|
|
110
|
+
state: innerState,
|
|
111
|
+
type: "decrement"
|
|
112
|
+
}, i_1));
|
|
113
|
+
$[20] = innerState;
|
|
114
|
+
$[21] = t10;
|
|
115
|
+
} else t10 = $[21];
|
|
116
|
+
let t11;
|
|
117
|
+
if ($[22] !== t10) {
|
|
118
|
+
t11 = /* @__PURE__ */ jsx("div", {
|
|
119
|
+
className: "flex items-center justify-center gap-4",
|
|
120
|
+
children: t10
|
|
121
|
+
});
|
|
122
|
+
$[22] = t10;
|
|
123
|
+
$[23] = t11;
|
|
124
|
+
} else t11 = $[23];
|
|
125
|
+
let t12;
|
|
126
|
+
if ($[24] !== t11 || $[25] !== t7 || $[26] !== t9) {
|
|
127
|
+
t12 = /* @__PURE__ */ jsxs("div", {
|
|
128
|
+
className: "w-full p-8",
|
|
129
|
+
children: [
|
|
130
|
+
t7,
|
|
131
|
+
t9,
|
|
132
|
+
t11
|
|
133
|
+
]
|
|
134
|
+
});
|
|
135
|
+
$[24] = t11;
|
|
136
|
+
$[25] = t7;
|
|
137
|
+
$[26] = t9;
|
|
138
|
+
$[27] = t12;
|
|
139
|
+
} else t12 = $[27];
|
|
140
|
+
return t12;
|
|
69
141
|
};
|
|
70
|
-
var TimeSegmentInput = (
|
|
142
|
+
var TimeSegmentInput = (t0) => {
|
|
143
|
+
const $ = c(11);
|
|
144
|
+
const { segment, state, autoFocus } = t0;
|
|
71
145
|
const ref = useRef(null);
|
|
72
146
|
const { segmentProps } = useDateSegment(segment, state, ref);
|
|
73
147
|
const isDesktop = useBreakpoint("md");
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
148
|
+
let t1;
|
|
149
|
+
let t2;
|
|
150
|
+
if ($[0] !== autoFocus) {
|
|
151
|
+
t1 = () => {
|
|
152
|
+
if (autoFocus) ref.current?.focus();
|
|
153
|
+
};
|
|
154
|
+
t2 = [autoFocus];
|
|
155
|
+
$[0] = autoFocus;
|
|
156
|
+
$[1] = t1;
|
|
157
|
+
$[2] = t2;
|
|
158
|
+
} else {
|
|
159
|
+
t1 = $[1];
|
|
160
|
+
t2 = $[2];
|
|
161
|
+
}
|
|
162
|
+
useEffect(t1, t2);
|
|
77
163
|
if (![
|
|
78
164
|
"literal",
|
|
79
165
|
"hour",
|
|
@@ -82,47 +168,101 @@ var TimeSegmentInput = ({ segment, state, autoFocus }) => {
|
|
|
82
168
|
].includes(segment.type)) return null;
|
|
83
169
|
if (segment.type === "literal") {
|
|
84
170
|
if (!showSegmentText(segment.text)) return null;
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
171
|
+
let t3;
|
|
172
|
+
if ($[3] !== segment.text) {
|
|
173
|
+
t3 = /* @__PURE__ */ jsx("div", {
|
|
174
|
+
className: "flex flex-col text-center",
|
|
175
|
+
ref,
|
|
176
|
+
children: /* @__PURE__ */ jsx(Typography, {
|
|
177
|
+
as: "span",
|
|
178
|
+
variant: "prominent-1",
|
|
179
|
+
size: "label-2",
|
|
180
|
+
className: "text-text-default-2",
|
|
181
|
+
children: segment.text
|
|
182
|
+
})
|
|
183
|
+
});
|
|
184
|
+
$[3] = segment.text;
|
|
185
|
+
$[4] = t3;
|
|
186
|
+
} else t3 = $[4];
|
|
187
|
+
return t3;
|
|
188
|
+
}
|
|
189
|
+
const t3 = isDesktop && segmentProps;
|
|
190
|
+
let t4;
|
|
191
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
192
|
+
t4 = clsx("w-11 rounded-input-rounding-default bg-input-filled-idle py-input-height-extra-small text-center", "font-labels-default text-text-default-3", "border border-input-filled-idle border-solid", "hover:border-interactive-contained-primary-hover", "focus-within:border-interactive-contained-primary-idle focus-within:outline-none");
|
|
193
|
+
$[5] = t4;
|
|
194
|
+
} else t4 = $[5];
|
|
195
|
+
let t5;
|
|
196
|
+
if ($[6] !== segment) {
|
|
197
|
+
t5 = getPlaceholder(segment) ?? segment.text;
|
|
198
|
+
$[6] = segment;
|
|
199
|
+
$[7] = t5;
|
|
200
|
+
} else t5 = $[7];
|
|
201
|
+
let t6;
|
|
202
|
+
if ($[8] !== t3 || $[9] !== t5) {
|
|
203
|
+
t6 = /* @__PURE__ */ jsx("div", {
|
|
204
|
+
className: "flex flex-col items-center justify-center gap-2",
|
|
205
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
206
|
+
ref,
|
|
207
|
+
...t3,
|
|
208
|
+
className: t4,
|
|
209
|
+
children: t5
|
|
94
210
|
})
|
|
95
211
|
});
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
...isDesktop && segmentProps,
|
|
102
|
-
className: clsx("w-11 rounded-input-rounding-default bg-input-filled-idle py-input-height-extra-small text-center", "font-labels-default text-text-default-3", "border border-input-filled-idle border-solid", "hover:border-interactive-contained-primary-hover", "focus-within:border-interactive-contained-primary-idle focus-within:outline-none"),
|
|
103
|
-
children: getPlaceholder(segment) ?? segment.text
|
|
104
|
-
})
|
|
105
|
-
});
|
|
212
|
+
$[8] = t3;
|
|
213
|
+
$[9] = t5;
|
|
214
|
+
$[10] = t6;
|
|
215
|
+
} else t6 = $[10];
|
|
216
|
+
return t6;
|
|
106
217
|
};
|
|
107
|
-
var TimeSegmentButton = (
|
|
218
|
+
var TimeSegmentButton = (t0) => {
|
|
219
|
+
const $ = c(15);
|
|
220
|
+
const { segment, state, type } = t0;
|
|
108
221
|
const stateRef = useRef(state);
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
222
|
+
let t1;
|
|
223
|
+
let t2;
|
|
224
|
+
if ($[0] !== state) {
|
|
225
|
+
t1 = () => {
|
|
226
|
+
stateRef.current = state;
|
|
227
|
+
};
|
|
228
|
+
t2 = [state];
|
|
229
|
+
$[0] = state;
|
|
230
|
+
$[1] = t1;
|
|
231
|
+
$[2] = t2;
|
|
232
|
+
} else {
|
|
233
|
+
t1 = $[1];
|
|
234
|
+
t2 = $[2];
|
|
235
|
+
}
|
|
236
|
+
useEffect(t1, t2);
|
|
237
|
+
let t3;
|
|
238
|
+
if ($[3] !== segment.type || $[4] !== type) {
|
|
239
|
+
t3 = (isLongPress) => {
|
|
240
|
+
if (isLongPress && segment.type === "minute") {
|
|
241
|
+
const currentValue = stateRef.current.segments.find(_temp2)?.value ?? 0;
|
|
242
|
+
const diff = type === "increment" ? INCREMENT_STEP_SIZE : -INCREMENT_STEP_SIZE;
|
|
243
|
+
const normalizedValue = (Math.round((currentValue + diff) / INCREMENT_STEP_SIZE) * INCREMENT_STEP_SIZE % 60 + 60) % 60;
|
|
244
|
+
stateRef.current.setSegment(segment.type, normalizedValue);
|
|
245
|
+
} else stateRef.current[type](segment.type);
|
|
246
|
+
};
|
|
247
|
+
$[3] = segment.type;
|
|
248
|
+
$[4] = type;
|
|
249
|
+
$[5] = t3;
|
|
250
|
+
} else t3 = $[5];
|
|
251
|
+
const onPress = t3;
|
|
252
|
+
const t4 = segment.type !== "dayPeriod";
|
|
253
|
+
let t5;
|
|
254
|
+
if ($[6] !== onPress || $[7] !== t4) {
|
|
255
|
+
t5 = {
|
|
256
|
+
onPress,
|
|
257
|
+
enabled: t4,
|
|
258
|
+
timeout: 300,
|
|
259
|
+
interval: 300
|
|
260
|
+
};
|
|
261
|
+
$[6] = onPress;
|
|
262
|
+
$[7] = t4;
|
|
263
|
+
$[8] = t5;
|
|
264
|
+
} else t5 = $[8];
|
|
265
|
+
const { onPressStart, onPressEnd } = useLongPressRepeat(t5);
|
|
126
266
|
if (![
|
|
127
267
|
"literal",
|
|
128
268
|
"hour",
|
|
@@ -131,30 +271,59 @@ var TimeSegmentButton = ({ segment, state, type }) => {
|
|
|
131
271
|
].includes(segment.type)) return null;
|
|
132
272
|
if (segment.type === "literal") {
|
|
133
273
|
if (!showSegmentText(segment.text)) return null;
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
274
|
+
let t6;
|
|
275
|
+
if ($[9] !== segment.text) {
|
|
276
|
+
t6 = /* @__PURE__ */ jsx("div", {
|
|
277
|
+
className: "flex shrink-0",
|
|
278
|
+
children: /* @__PURE__ */ jsx(Typography, {
|
|
279
|
+
as: "span",
|
|
280
|
+
variant: "prominent-1",
|
|
281
|
+
size: "label-2",
|
|
282
|
+
className: "invisible text-text-default-2",
|
|
283
|
+
"aria-hidden": true,
|
|
284
|
+
children: segment.text
|
|
285
|
+
})
|
|
286
|
+
});
|
|
287
|
+
$[9] = segment.text;
|
|
288
|
+
$[10] = t6;
|
|
289
|
+
} else t6 = $[10];
|
|
290
|
+
return t6;
|
|
291
|
+
}
|
|
292
|
+
const Icon = type === "increment" ? ChevronUpIcon : ChevronDownIcon;
|
|
293
|
+
let t6;
|
|
294
|
+
if ($[11] !== Icon || $[12] !== onPressEnd || $[13] !== onPressStart) {
|
|
295
|
+
t6 = /* @__PURE__ */ jsx("div", {
|
|
296
|
+
className: "flex w-11 select-none items-center justify-center",
|
|
297
|
+
onContextMenu: _temp3,
|
|
298
|
+
children: /* @__PURE__ */ jsx(InlineIconButton, {
|
|
299
|
+
label: "",
|
|
300
|
+
color: "secondary",
|
|
301
|
+
onPressStart,
|
|
302
|
+
onPressEnd,
|
|
303
|
+
icon: Icon
|
|
143
304
|
})
|
|
144
305
|
});
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
color: "secondary",
|
|
152
|
-
onPressStart,
|
|
153
|
-
onPressEnd,
|
|
154
|
-
icon: type === "increment" ? ChevronUpIcon : ChevronDownIcon
|
|
155
|
-
})
|
|
156
|
-
});
|
|
306
|
+
$[11] = Icon;
|
|
307
|
+
$[12] = onPressEnd;
|
|
308
|
+
$[13] = onPressStart;
|
|
309
|
+
$[14] = t6;
|
|
310
|
+
} else t6 = $[14];
|
|
311
|
+
return t6;
|
|
157
312
|
};
|
|
158
313
|
var showSegmentText = (text) => !/[\u2066\u2069]/.test(text);
|
|
314
|
+
function _temp(t0) {
|
|
315
|
+
const { type } = t0;
|
|
316
|
+
return [
|
|
317
|
+
"hour",
|
|
318
|
+
"minute",
|
|
319
|
+
"dayPeriod"
|
|
320
|
+
].includes(type);
|
|
321
|
+
}
|
|
322
|
+
function _temp2(item) {
|
|
323
|
+
return item.type === "minute";
|
|
324
|
+
}
|
|
325
|
+
function _temp3(e) {
|
|
326
|
+
return e.preventDefault();
|
|
327
|
+
}
|
|
159
328
|
//#endregion
|
|
160
329
|
export { TimePickerForm };
|
|
@@ -9,6 +9,7 @@ interface DatePickerInputProps extends InputVariantProps {
|
|
|
9
9
|
state: TimeFieldState;
|
|
10
10
|
isDisabled?: boolean;
|
|
11
11
|
isDirty?: boolean;
|
|
12
|
+
isRequired?: boolean;
|
|
12
13
|
isInvalid?: boolean;
|
|
13
14
|
disableDropdown?: boolean;
|
|
14
15
|
headerProps?: FormFieldHeaderProps;
|
|
@@ -17,6 +18,8 @@ interface DatePickerInputProps extends InputVariantProps {
|
|
|
17
18
|
placeholder?: string;
|
|
18
19
|
className?: string;
|
|
19
20
|
onPress: () => void;
|
|
21
|
+
onClear?: () => void;
|
|
22
|
+
fireBlurOnChange?: boolean;
|
|
20
23
|
}
|
|
21
|
-
export declare const TimePickerInput: ({ ref, as, fieldProps, state, isDisabled, isDirty, isInvalid, disableDropdown, variant, size, isClearable, headerProps, disableManualEntry, placeholder, className, onPress, ...props }: DatePickerInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare const TimePickerInput: ({ ref, as, fieldProps, state, isDisabled, isDirty, isRequired, isInvalid, disableDropdown, variant, size, isClearable, headerProps, disableManualEntry, placeholder, className, onPress, onClear, fireBlurOnChange, ...props }: DatePickerInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
25
|
export {};
|