@povio/ui 2.3.2-rc.3 → 2.3.3
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 +11 -26
- package/dist/assets/icons/AlignLeft.js +11 -26
- package/dist/assets/icons/AlignLeftRight.js +11 -26
- package/dist/assets/icons/AlignRight.js +11 -26
- package/dist/assets/icons/ArrowDropDown.js +11 -26
- package/dist/assets/icons/ArrowDropUp.js +11 -26
- package/dist/assets/icons/ArrowLeft.js +11 -26
- package/dist/assets/icons/ArrowRight.js +11 -26
- package/dist/assets/icons/Bold.js +11 -26
- package/dist/assets/icons/BulletedList.js +11 -26
- package/dist/assets/icons/Calendar.js +13 -28
- package/dist/assets/icons/Check.js +13 -28
- package/dist/assets/icons/CheckCircle.js +11 -26
- package/dist/assets/icons/CheckboxCheckmark.js +14 -29
- package/dist/assets/icons/CheckboxIndeterminate.js +14 -29
- package/dist/assets/icons/ChevronDown.js +13 -28
- package/dist/assets/icons/ChevronLeft.js +13 -28
- package/dist/assets/icons/ChevronRight.js +13 -28
- package/dist/assets/icons/ChevronUp.js +13 -28
- package/dist/assets/icons/ChevronsLeft.js +13 -28
- package/dist/assets/icons/ChevronsRight.js +13 -28
- package/dist/assets/icons/Clock.js +11 -26
- package/dist/assets/icons/Close.js +11 -26
- package/dist/assets/icons/DateTime.js +14 -35
- package/dist/assets/icons/DragIndicator.js +11 -26
- package/dist/assets/icons/File.js +13 -28
- package/dist/assets/icons/Highlight.js +11 -26
- package/dist/assets/icons/HighlightOn.js +15 -49
- package/dist/assets/icons/Home.js +11 -26
- package/dist/assets/icons/Info.js +16 -37
- package/dist/assets/icons/Italic.js +11 -26
- package/dist/assets/icons/Link.js +11 -26
- package/dist/assets/icons/Menu.js +11 -26
- package/dist/assets/icons/NumberedList.js +11 -26
- package/dist/assets/icons/PointerHorizontal.js +11 -26
- package/dist/assets/icons/PointerVertical.js +11 -26
- package/dist/assets/icons/Search.js +11 -26
- package/dist/assets/icons/Send.js +13 -28
- package/dist/assets/icons/Strikethrough.js +11 -26
- package/dist/assets/icons/TextColor.js +14 -48
- package/dist/assets/icons/Today.js +11 -26
- package/dist/assets/icons/Underlined.js +13 -28
- package/dist/assets/icons/Upload.js +14 -35
- package/dist/assets/icons/Visibility.js +11 -26
- package/dist/assets/icons/VisibilityOff.js +11 -26
- package/dist/assets/icons/WarningFilled.js +13 -28
- package/dist/assets/locales/sl/translation.json.js +2 -2
- package/dist/components/Breadcrumbs/Breadcrumbs.js +56 -207
- package/dist/components/Menu/Menu.js +2 -18
- package/dist/components/Menu/MenuDesktop.js +7 -41
- package/dist/components/Menu/MenuItem.js +9 -32
- package/dist/components/Menu/MenuMobile.js +38 -97
- package/dist/components/Menu/MenuPopover.js +29 -105
- package/dist/components/buttons/IconButton/IconButton.js +8 -40
- package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +1 -2
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +9 -34
- package/dist/components/buttons/PillButton/PillButton.js +17 -55
- package/dist/components/buttons/SplitButton/SplitButton.js +18 -103
- package/dist/components/buttons/TextButton/TextButton.js +8 -30
- package/dist/components/buttons/ToggleButton/ToggleButton.js +8 -28
- package/dist/components/buttons/shared/ButtonContent.js +22 -80
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +0 -1
- package/dist/components/inputs/Checkbox/Checkbox.js +35 -201
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +10 -24
- package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +0 -3
- package/dist/components/inputs/Checkbox/checkbox.cva.js +1 -2
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +5 -12
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +75 -368
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +5 -12
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +298 -506
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +5 -13
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +56 -273
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +3 -6
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +130 -606
- package/dist/components/inputs/DateTime/shared/Calendar.d.ts +2 -5
- package/dist/components/inputs/DateTime/shared/Calendar.js +119 -332
- package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +2 -3
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +102 -301
- package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +2 -3
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +33 -146
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +93 -249
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +137 -318
- package/dist/components/inputs/DateTime/shared/DateField.js +112 -311
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +3 -13
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +139 -383
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +0 -15
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +11 -96
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +27 -81
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +10 -59
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +58 -103
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +82 -193
- package/dist/components/inputs/DateTime/shared/TimeField.js +8 -27
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +110 -279
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +1 -4
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +65 -210
- package/dist/components/inputs/DateTime/shared/YearPicker.js +68 -119
- package/dist/components/inputs/File/FileUpload.js +44 -87
- package/dist/components/inputs/File/FileUploadContainer.js +7 -15
- package/dist/components/inputs/File/InputUpload.js +79 -317
- package/dist/components/inputs/File/shared/FileCard.js +41 -104
- package/dist/components/inputs/File/shared/FileCardList.js +12 -47
- package/dist/components/inputs/File/shared/FileUploadContent.js +44 -175
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +46 -149
- package/dist/components/inputs/File/shared/FileUploadContentError.js +93 -234
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +97 -230
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +55 -199
- package/dist/components/inputs/File/shared/InputUploadContent.js +34 -148
- package/dist/components/inputs/File/shared/InputUploadFilled.js +8 -49
- package/dist/components/inputs/File/shared/ProgressBar.js +9 -48
- package/dist/components/inputs/FormField/FormField.d.ts +3 -3
- package/dist/components/inputs/FormField/FormField.js +37 -119
- package/dist/components/inputs/FormField/FormFieldError.js +5 -25
- package/dist/components/inputs/FormField/FormFieldHeader.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldHeader.js +22 -81
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +7 -31
- package/dist/components/inputs/FormField/FormFieldHelper.js +6 -26
- package/dist/components/inputs/FormField/FormFieldLabel.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldLabel.js +9 -40
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +2 -5
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +97 -447
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +9 -48
- package/dist/components/inputs/Input/TextArea/TextArea.js +90 -305
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +1 -3
- package/dist/components/inputs/Input/TextInput/TextInput.js +90 -419
- package/dist/components/inputs/Input/shared/InputContent.js +59 -192
- package/dist/components/inputs/Inputs/Form.js +11 -40
- package/dist/components/inputs/Inputs/InputItem.d.ts +21 -15
- package/dist/components/inputs/Inputs/InputItem.js +14 -69
- package/dist/components/inputs/Inputs/Inputs.js +11 -37
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +1 -3
- package/dist/components/inputs/RadioGroup/RadioGroup.js +61 -353
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +0 -17
- package/dist/components/inputs/RadioGroup/radio.cva.js +1 -42
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +2 -6
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +22 -214
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +18 -3
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +8 -104
- package/dist/components/inputs/Selection/Select/Select.d.ts +3 -7
- package/dist/components/inputs/Selection/Select/Select.js +18 -225
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +1 -8
- package/dist/components/inputs/Selection/shared/SelectBase.js +18 -69
- package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +138 -393
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +116 -330
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +25 -99
- package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectListBox.js +52 -164
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +35 -85
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +16 -69
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +21 -70
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +9 -58
- package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectMobile.js +3 -9
- package/dist/components/inputs/Selection/shared/select.context.d.ts +2 -3
- package/dist/components/inputs/Selection/shared/select.context.js +36 -67
- package/dist/components/inputs/Selection/shared/select.types.d.ts +2 -3
- package/dist/components/inputs/Selection/shared/useSelectItems.js +49 -109
- package/dist/components/inputs/Slider/Slider.d.ts +1 -2
- package/dist/components/inputs/Slider/Slider.js +76 -265
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +0 -1
- package/dist/components/inputs/TextEditor/TextEditor.js +98 -447
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +11 -37
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +30 -102
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +45 -194
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +28 -88
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +14 -48
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +19 -66
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +15 -49
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +32 -92
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +54 -126
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +38 -141
- package/dist/components/inputs/Toggle/Toggle.d.ts +0 -1
- package/dist/components/inputs/Toggle/Toggle.js +37 -214
- package/dist/components/inputs/Toggle/toggle.cva.d.ts +0 -3
- package/dist/components/inputs/Toggle/toggle.cva.js +1 -2
- package/dist/components/inputs/shared/CheckContent.d.ts +1 -2
- package/dist/components/inputs/shared/CheckContent.js +11 -21
- package/dist/components/inputs/shared/InputClear.d.ts +1 -2
- package/dist/components/inputs/shared/InputClear.js +12 -88
- package/dist/components/inputs/shared/TooltipWrapper.js +11 -50
- package/dist/components/inputs/shared/input.cva.d.ts +0 -10
- package/dist/components/inputs/shared/input.cva.js +4 -32
- package/dist/components/navigation/Accordion/Accordion.js +22 -69
- package/dist/components/navigation/Accordion/AccordionItem.js +41 -86
- package/dist/components/navigation/Stepper/Stepper.js +22 -67
- package/dist/components/navigation/Stepper/StepperItem.js +31 -104
- package/dist/components/navigation/Stepper/StepperSeparator.js +5 -23
- package/dist/components/overlays/ActionModal/ActionModal.js +35 -169
- package/dist/components/overlays/BottomSheet/BottomSheet.js +23 -96
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +8 -48
- package/dist/components/overlays/Drawer/Drawer.js +20 -62
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +27 -83
- package/dist/components/overlays/Tooltip/Tooltip.js +28 -137
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +12 -37
- package/dist/components/segment/Segment.js +57 -218
- package/dist/components/segment/SegmentItem.js +10 -67
- package/dist/components/shared/pagination/Pagination.js +22 -108
- package/dist/components/shared/pagination/PaginationList.js +64 -167
- package/dist/components/status/Alert/Alert.js +30 -97
- package/dist/components/status/Loader/Loader.js +22 -77
- package/dist/components/status/Toast/Toast.js +13 -21
- package/dist/components/status/Toast/useToast.js +57 -62
- package/dist/components/table/ColumnConfig.js +54 -158
- package/dist/components/table/InfiniteTable.js +16 -67
- package/dist/components/table/PaginatedTable.js +18 -84
- package/dist/components/table/Table.js +27 -28
- package/dist/components/text/Link/Link.js +7 -19
- package/dist/components/text/Typography/Typography.js +8 -23
- package/dist/config/confirmation.context.js +1 -1
- package/dist/config/link.context.js +9 -23
- package/dist/config/router.context.js +16 -42
- package/dist/config/theme.context.js +45 -98
- package/dist/config/uiConfig.context.d.ts +6 -19
- package/dist/config/uiConfig.context.js +14 -67
- package/dist/config/uiStyle.context.d.ts +4 -27
- package/dist/config/uiStyle.context.js +5 -15
- package/dist/helpers/dynamicInputs.d.ts +5 -5
- package/dist/helpers/dynamicInputs.js +0 -3
- package/dist/hooks/useBreakpoint.js +3 -16
- package/dist/hooks/useDebounceCallback.js +17 -51
- package/dist/hooks/useFilters.js +64 -125
- package/dist/hooks/useForm.js +8 -42
- package/dist/hooks/useFormAutosave.js +30 -101
- package/dist/hooks/useIntersectionObserver.d.ts +1 -1
- package/dist/hooks/useIntersectionObserver.js +24 -91
- package/dist/hooks/useLocalStorage.js +10 -43
- package/dist/hooks/useLongPressRepeat.js +20 -55
- package/dist/hooks/usePagination.js +19 -49
- package/dist/hooks/useScrollableListBox.js +16 -37
- package/dist/hooks/useSorting.js +28 -69
- package/dist/hooks/useStateAndRef.js +7 -21
- package/dist/hooks/useTableColumnConfig.js +31 -124
- package/dist/hooks/useTranslationMemo.js +5 -25
- package/dist/index.d.ts +0 -7
- package/dist/index.js +2 -4
- package/dist/tw-ui-plugin.js +0 -6
- package/dist/utils/date-time.utils.d.ts +10 -38
- package/dist/utils/date-time.utils.js +22 -134
- package/package.json +1 -1
- package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +0 -5
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +0 -7
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +0 -13
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +0 -15
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +0 -32
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +0 -2
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +0 -1
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +0 -39
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +0 -85
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +0 -1
- package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +0 -6
- package/dist/components/inputs/FormField/formFieldHeader.cva.js +0 -11
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +0 -45
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +0 -571
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +0 -35
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +0 -575
- package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +0 -4
- package/dist/components/inputs/Input/TextArea/TextArea.cva.js +0 -5
- package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +0 -1
- package/dist/components/inputs/Input/shared/numberStatic.utils.js +0 -7
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +0 -36
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +0 -14
- package/dist/components/inputs/Selection/Select/QuerySelect.js +0 -173
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +0 -9
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +0 -47
- package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +0 -12
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +0 -36
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +0 -3
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +0 -5
- package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +0 -5
- package/dist/components/inputs/Selection/shared/selectInput.cva.js +0 -5
- package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +0 -23
- package/dist/components/inputs/Selection/shared/staticSelect.utils.js +0 -37
- package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +0 -1
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +0 -82
- package/dist/components/inputs/Skeleton/InputFrame.js +0 -548
- package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +0 -4
- package/dist/components/inputs/shared/tooltipWrapper.cva.js +0 -5
- package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +0 -14
- package/dist/components/inputs/shared/useStaticInputHandoff.js +0 -100
- package/dist/hooks/useQueryAutocomplete.d.ts +0 -14
- package/dist/hooks/useQueryAutocomplete.js +0 -57
- package/dist/utils/query.utils.d.ts +0 -4
- package/dist/utils/query.utils.js +0 -8
|
@@ -1,411 +1,167 @@
|
|
|
1
|
+
import { CalendarIcon } from "../../../../assets/icons/Calendar.js";
|
|
2
|
+
import { DateTimeIcon } from "../../../../assets/icons/DateTime.js";
|
|
1
3
|
import { UIStyle } from "../../../../config/uiStyle.context.js";
|
|
2
4
|
import { Typography } from "../../../text/Typography/Typography.js";
|
|
3
|
-
import {
|
|
5
|
+
import { IconButton } from "../../../buttons/IconButton/IconButton.js";
|
|
4
6
|
import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
|
|
5
|
-
import {
|
|
7
|
+
import { TodayIcon } from "../../../../assets/icons/Today.js";
|
|
6
8
|
import { DateField } from "./DateField.js";
|
|
7
|
-
import { datePickerInputContentRow } from "./datePickerInput.cva.js";
|
|
8
|
-
import { renderDatePickerTodayIcon } from "./datePickerTodayIcon.js";
|
|
9
9
|
import { FormFieldLabel } from "../../FormField/FormFieldLabel.js";
|
|
10
10
|
import { InputClear } from "../../shared/InputClear.js";
|
|
11
11
|
import { inputBase, inputSize } from "../../shared/input.cva.js";
|
|
12
|
-
import { c } from "react/compiler-runtime";
|
|
13
12
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
14
13
|
import { clsx } from "clsx";
|
|
15
|
-
import { useImperativeHandle, useRef, useState } from "react";
|
|
14
|
+
import { useCallback, useImperativeHandle, useRef, useState } from "react";
|
|
16
15
|
import { Button } from "react-aria-components";
|
|
17
16
|
import { useFocusVisible, useFocusWithin, useHover } from "react-aria";
|
|
18
|
-
import { today } from "@internationalized/date";
|
|
17
|
+
import { getLocalTimeZone, now, toCalendarDateTime, today } from "@internationalized/date";
|
|
19
18
|
//#region src/components/inputs/DateTime/shared/DatePickerInput.tsx
|
|
20
|
-
var DatePickerInput = (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const todayIconButtonSize = t1 === void 0 ? "none" : t1;
|
|
24
|
-
const todayIconPlacement = t2 === void 0 ? "content" : t2;
|
|
25
|
-
const autoFixYear = t3 === void 0 ? false : t3;
|
|
26
|
-
const dateGranularity = t4 === void 0 ? "day" : t4;
|
|
27
|
-
const isTimeOptional = t5 === void 0 ? false : t5;
|
|
28
|
-
const uiConfig = UIConfig.useConfig();
|
|
29
|
-
const effectiveTimeZone = timeZone ?? "UTC";
|
|
19
|
+
var DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, buttonProps, isDisabled, isInvalid, disableDropdown, variant, size, isDateTime, isClearable, headerProps, todayIcon, isDirty, isRequired, disableManualEntry, placeholder, className, onOpenDropdown, dateGranularity = "day", timeZone, autoFixYear, isTimeOptional = false, format, ...props }) => {
|
|
20
|
+
let effectiveTimeZone = getLocalTimeZone();
|
|
21
|
+
if (timeZone) effectiveTimeZone = timeZone;
|
|
30
22
|
const inputBaseCva = UIStyle.useCva("input.baseCva", inputBase);
|
|
31
23
|
const inputSizeCva = UIStyle.useCva("input.sizeCva", inputSize);
|
|
32
|
-
const datePickerInputContentRowCva = UIStyle.useCva("datePickerInput.contentRowCva", datePickerInputContentRow);
|
|
33
24
|
const [canClear, setCanClear] = useState(false);
|
|
34
|
-
|
|
35
|
-
if ($[0] !== isDisabled) {
|
|
36
|
-
t6 = { isDisabled };
|
|
37
|
-
$[0] = isDisabled;
|
|
38
|
-
$[1] = t6;
|
|
39
|
-
} else t6 = $[1];
|
|
40
|
-
const { hoverProps, isHovered } = useHover(t6);
|
|
25
|
+
const { hoverProps, isHovered } = useHover({ isDisabled });
|
|
41
26
|
const [isFocused, setIsFocused] = useState(false);
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
} };
|
|
51
|
-
$[2] = autoFixYear;
|
|
52
|
-
$[3] = t7;
|
|
53
|
-
} else t7 = $[3];
|
|
54
|
-
const { focusWithinProps } = useFocusWithin(t7);
|
|
27
|
+
const { focusWithinProps } = useFocusWithin({ onFocusWithinChange: (isFocusWithin) => {
|
|
28
|
+
setIsFocused(isFocusWithin);
|
|
29
|
+
if (!isFocusWithin && autoFixYear) {
|
|
30
|
+
dateFieldRef.current?.autoFixYear();
|
|
31
|
+
endDateFieldRef.current?.autoFixYear();
|
|
32
|
+
}
|
|
33
|
+
} });
|
|
55
34
|
const { isFocusVisible } = useFocusVisible();
|
|
56
35
|
const dateFieldRef = useRef(null);
|
|
57
36
|
const endDateFieldRef = useRef(null);
|
|
58
37
|
const containerRef = useRef(null);
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
if ($[4] !== fieldProps || $[5] !== t8) {
|
|
62
|
-
t9 = {
|
|
63
|
-
...fieldProps,
|
|
64
|
-
value: t8
|
|
65
|
-
};
|
|
66
|
-
$[4] = fieldProps;
|
|
67
|
-
$[5] = t8;
|
|
68
|
-
$[6] = t9;
|
|
69
|
-
} else t9 = $[6];
|
|
70
|
-
const normalizedFieldProps = t9;
|
|
71
|
-
let t10;
|
|
72
|
-
if ($[7] !== endFieldProps || $[8] !== endFieldValue || $[9] !== isValueControlled) {
|
|
73
|
-
t10 = endFieldProps ? {
|
|
74
|
-
...endFieldProps,
|
|
75
|
-
value: isValueControlled ? endFieldValue ?? null : endFieldProps.value ?? null
|
|
76
|
-
} : void 0;
|
|
77
|
-
$[7] = endFieldProps;
|
|
78
|
-
$[8] = endFieldValue;
|
|
79
|
-
$[9] = isValueControlled;
|
|
80
|
-
$[10] = t10;
|
|
81
|
-
} else t10 = $[10];
|
|
82
|
-
const normalizedEndFieldProps = t10;
|
|
83
|
-
let t11;
|
|
84
|
-
if ($[11] !== endFieldProps || $[12] !== fieldProps || $[13] !== fireBlurOnChange || $[14] !== onClearProp) {
|
|
85
|
-
t11 = () => {
|
|
38
|
+
useImperativeHandle(ref, () => ({
|
|
39
|
+
clear: () => {
|
|
86
40
|
dateFieldRef.current?.clearField();
|
|
41
|
+
fieldProps.onChange?.(null);
|
|
87
42
|
endDateFieldRef.current?.clearField();
|
|
88
|
-
if (
|
|
89
|
-
else {
|
|
90
|
-
fieldProps.onChange?.(null);
|
|
91
|
-
endFieldProps?.onChange?.(null);
|
|
92
|
-
if (fireBlurOnChange) {
|
|
93
|
-
fieldProps.onBlur?.(null);
|
|
94
|
-
endFieldProps?.onBlur?.(null);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
43
|
+
if (endFieldProps) endFieldProps.onChange?.(null);
|
|
97
44
|
setCanClear(false);
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}
|
|
121
|
-
useImperativeHandle(ref, t12, t13);
|
|
122
|
-
let t14;
|
|
123
|
-
if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
|
|
124
|
-
t14 = (canClearInput) => {
|
|
125
|
-
setCanClear(canClearInput);
|
|
126
|
-
};
|
|
127
|
-
$[19] = t14;
|
|
128
|
-
} else t14 = $[19];
|
|
129
|
-
const onClearChange = t14;
|
|
130
|
-
const showClear = canClear || hasValue || normalizedFieldProps.value != null || normalizedEndFieldProps?.value != null;
|
|
131
|
-
const isTodayIconDisabled = isDisabled || buttonProps.isDisabled;
|
|
132
|
-
let t15;
|
|
133
|
-
if ($[20] !== effectiveTimeZone || $[21] !== endFieldProps || $[22] !== fieldProps || $[23] !== fireBlurOnChange || $[24] !== isDateTime || $[25] !== isTodayIconDisabled) {
|
|
134
|
-
t15 = () => {
|
|
135
|
-
if (isTodayIconDisabled) return;
|
|
136
|
-
if (isDateTime) {
|
|
137
|
-
const calendarDateTime = DateTimeUtils.getCurrentWallClockCalendarDateTime();
|
|
138
|
-
fieldProps.onChange?.(calendarDateTime);
|
|
139
|
-
if (endFieldProps) endFieldProps.onChange?.(calendarDateTime);
|
|
140
|
-
} else {
|
|
141
|
-
fieldProps.onChange?.(today(effectiveTimeZone));
|
|
142
|
-
if (endFieldProps) endFieldProps.onChange?.(today(effectiveTimeZone));
|
|
143
|
-
}
|
|
144
|
-
if (fireBlurOnChange) {
|
|
145
|
-
fieldProps.onBlur?.(null);
|
|
146
|
-
endFieldProps?.onBlur?.(null);
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
$[20] = effectiveTimeZone;
|
|
150
|
-
$[21] = endFieldProps;
|
|
151
|
-
$[22] = fieldProps;
|
|
152
|
-
$[23] = fireBlurOnChange;
|
|
153
|
-
$[24] = isDateTime;
|
|
154
|
-
$[25] = isTodayIconDisabled;
|
|
155
|
-
$[26] = t15;
|
|
156
|
-
} else t15 = $[26];
|
|
157
|
-
const onToday = t15;
|
|
45
|
+
fieldProps.onBlur?.(null);
|
|
46
|
+
},
|
|
47
|
+
getContainer: () => containerRef.current
|
|
48
|
+
}));
|
|
49
|
+
const onClearChange = useCallback((canClearInput) => {
|
|
50
|
+
setCanClear(canClearInput);
|
|
51
|
+
}, []);
|
|
52
|
+
const onClear = () => {
|
|
53
|
+
dateFieldRef.current?.clearField();
|
|
54
|
+
fieldProps.onChange?.(null);
|
|
55
|
+
endDateFieldRef.current?.clearField();
|
|
56
|
+
setCanClear(false);
|
|
57
|
+
};
|
|
58
|
+
const onToday = () => {
|
|
59
|
+
if (isDateTime) {
|
|
60
|
+
const calendarDateTime = toCalendarDateTime(now(effectiveTimeZone));
|
|
61
|
+
fieldProps.onChange?.(calendarDateTime);
|
|
62
|
+
if (endFieldProps) endFieldProps.onChange?.(calendarDateTime);
|
|
63
|
+
} else {
|
|
64
|
+
fieldProps.onChange?.(today(effectiveTimeZone));
|
|
65
|
+
if (endFieldProps) endFieldProps.onChange?.(today(effectiveTimeZone));
|
|
66
|
+
}
|
|
67
|
+
};
|
|
158
68
|
const hidePlaceholder = as === "floating" && !fieldProps.value && !isFocused;
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
onPress: onToday,
|
|
164
|
-
size: todayIconButtonSize,
|
|
165
|
-
todayIconButtonComponent
|
|
166
|
-
});
|
|
167
|
-
$[27] = isTodayIconDisabled;
|
|
168
|
-
$[28] = onToday;
|
|
169
|
-
$[29] = todayIcon;
|
|
170
|
-
$[30] = todayIconButtonComponent;
|
|
171
|
-
$[31] = todayIconButtonSize;
|
|
172
|
-
$[32] = t16;
|
|
173
|
-
} else t16 = $[32];
|
|
174
|
-
const todayIconButton = t16;
|
|
175
|
-
const shouldRenderTodayIconWithFieldLabel = todayIconPlacement === "fieldLabel";
|
|
176
|
-
const pickerIcon = isDateTime ? uiConfig.dateInput.dateTimeIcon : uiConfig.dateInput.calendarIcon;
|
|
177
|
-
const t17 = clsx("group group/date-picker-content relative flex min-w-input-width-min-width items-center justify-between gap-2", groupProps.className, inputBaseCva({
|
|
178
|
-
variant,
|
|
179
|
-
as,
|
|
180
|
-
...props
|
|
181
|
-
}), className);
|
|
182
|
-
const t18 = isHovered || void 0;
|
|
183
|
-
const t19 = isDisabled || void 0;
|
|
184
|
-
const t20 = isDisabled || void 0;
|
|
185
|
-
const t21 = isInvalid || void 0;
|
|
186
|
-
const t22 = normalizedFieldProps.value == null || void 0;
|
|
187
|
-
const t23 = isFocused || void 0;
|
|
188
|
-
const t24 = isFocused && isFocusVisible || void 0;
|
|
189
|
-
const t25 = normalizedFieldProps.value != null || void 0;
|
|
190
|
-
const t26 = isDirty || void 0;
|
|
191
|
-
const t27 = isRequired || void 0;
|
|
192
|
-
const t28 = normalizedFieldProps.value != null || void 0;
|
|
193
|
-
let t29;
|
|
194
|
-
if ($[33] !== as || $[34] !== inputSizeCva || $[35] !== size) {
|
|
195
|
-
t29 = clsx("flex w-full items-center gap-input-gap-input-text-to-elements pr-0!", inputSizeCva({
|
|
196
|
-
size,
|
|
197
|
-
as
|
|
198
|
-
}));
|
|
199
|
-
$[33] = as;
|
|
200
|
-
$[34] = inputSizeCva;
|
|
201
|
-
$[35] = size;
|
|
202
|
-
$[36] = t29;
|
|
203
|
-
} else t29 = $[36];
|
|
204
|
-
let t30;
|
|
205
|
-
if ($[37] !== as || $[38] !== headerProps) {
|
|
206
|
-
t30 = as && ["filter", "floating"].includes(as) && headerProps && /* @__PURE__ */ jsx(FormFieldLabel, {
|
|
69
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
70
|
+
ref: containerRef,
|
|
71
|
+
className: clsx(inputBaseCva({
|
|
72
|
+
variant,
|
|
207
73
|
as,
|
|
208
|
-
...
|
|
209
|
-
})
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
} else t36 = $[66];
|
|
300
|
-
let t37;
|
|
301
|
-
if ($[67] !== t29 || $[68] !== t30 || $[69] !== t31 || $[70] !== t36) {
|
|
302
|
-
t37 = /* @__PURE__ */ jsxs("div", {
|
|
303
|
-
className: t29,
|
|
304
|
-
children: [
|
|
305
|
-
t30,
|
|
306
|
-
t31,
|
|
307
|
-
t36
|
|
308
|
-
]
|
|
309
|
-
});
|
|
310
|
-
$[67] = t29;
|
|
311
|
-
$[68] = t30;
|
|
312
|
-
$[69] = t31;
|
|
313
|
-
$[70] = t36;
|
|
314
|
-
$[71] = t37;
|
|
315
|
-
} else t37 = $[71];
|
|
316
|
-
let t38;
|
|
317
|
-
if ($[72] !== as || $[73] !== inputSizeCva || $[74] !== size) {
|
|
318
|
-
t38 = clsx(inputSizeCva({
|
|
319
|
-
size,
|
|
320
|
-
as
|
|
321
|
-
}), "flex items-center gap-input-gap-trailing-elements py-0! pl-0!");
|
|
322
|
-
$[72] = as;
|
|
323
|
-
$[73] = inputSizeCva;
|
|
324
|
-
$[74] = size;
|
|
325
|
-
$[75] = t38;
|
|
326
|
-
} else t38 = $[75];
|
|
327
|
-
let t39;
|
|
328
|
-
if ($[76] !== clearInput || $[77] !== isClearable || $[78] !== showClear) {
|
|
329
|
-
t39 = isClearable && /* @__PURE__ */ jsx(InputClear, {
|
|
330
|
-
onClear: clearInput,
|
|
331
|
-
show: showClear
|
|
332
|
-
});
|
|
333
|
-
$[76] = clearInput;
|
|
334
|
-
$[77] = isClearable;
|
|
335
|
-
$[78] = showClear;
|
|
336
|
-
$[79] = t39;
|
|
337
|
-
} else t39 = $[79];
|
|
338
|
-
let t40;
|
|
339
|
-
if ($[80] !== buttonProps || $[81] !== disableDropdown || $[82] !== disableManualEntry || $[83] !== isDisabled || $[84] !== pickerIcon) {
|
|
340
|
-
t40 = (!disableDropdown || disableManualEntry) && /* @__PURE__ */ jsx(InlineIconButton, {
|
|
341
|
-
label: "",
|
|
342
|
-
color: "secondary",
|
|
343
|
-
...buttonProps,
|
|
344
|
-
icon: pickerIcon,
|
|
345
|
-
isDisabled,
|
|
346
|
-
className: "border-0!"
|
|
347
|
-
});
|
|
348
|
-
$[80] = buttonProps;
|
|
349
|
-
$[81] = disableDropdown;
|
|
350
|
-
$[82] = disableManualEntry;
|
|
351
|
-
$[83] = isDisabled;
|
|
352
|
-
$[84] = pickerIcon;
|
|
353
|
-
$[85] = t40;
|
|
354
|
-
} else t40 = $[85];
|
|
355
|
-
let t41;
|
|
356
|
-
if ($[86] !== t38 || $[87] !== t39 || $[88] !== t40) {
|
|
357
|
-
t41 = /* @__PURE__ */ jsxs("div", {
|
|
358
|
-
className: t38,
|
|
359
|
-
children: [t39, t40]
|
|
360
|
-
});
|
|
361
|
-
$[86] = t38;
|
|
362
|
-
$[87] = t39;
|
|
363
|
-
$[88] = t40;
|
|
364
|
-
$[89] = t41;
|
|
365
|
-
} else t41 = $[89];
|
|
366
|
-
let t42;
|
|
367
|
-
if ($[90] !== focusWithinProps || $[91] !== groupProps || $[92] !== hoverProps || $[93] !== t17 || $[94] !== t18 || $[95] !== t19 || $[96] !== t20 || $[97] !== t21 || $[98] !== t22 || $[99] !== t23 || $[100] !== t24 || $[101] !== t25 || $[102] !== t26 || $[103] !== t27 || $[104] !== t28 || $[105] !== t37 || $[106] !== t41) {
|
|
368
|
-
t42 = /* @__PURE__ */ jsxs("div", {
|
|
369
|
-
ref: containerRef,
|
|
370
|
-
...groupProps,
|
|
371
|
-
...focusWithinProps,
|
|
372
|
-
...hoverProps,
|
|
373
|
-
className: t17,
|
|
374
|
-
"data-rac": "",
|
|
375
|
-
"data-datetime-input": "",
|
|
376
|
-
"data-hovered": t18,
|
|
377
|
-
"data-disabled": t19,
|
|
378
|
-
"data-is-disabled": t20,
|
|
379
|
-
"data-invalid": t21,
|
|
380
|
-
"data-is-empty": t22,
|
|
381
|
-
"data-focus-within": t23,
|
|
382
|
-
"data-focus-visible": t24,
|
|
383
|
-
"data-has-selection": t25,
|
|
384
|
-
"data-is-dirty": t26,
|
|
385
|
-
"data-is-required": t27,
|
|
386
|
-
"data-is-filled": t28,
|
|
387
|
-
children: [t37, t41]
|
|
388
|
-
});
|
|
389
|
-
$[90] = focusWithinProps;
|
|
390
|
-
$[91] = groupProps;
|
|
391
|
-
$[92] = hoverProps;
|
|
392
|
-
$[93] = t17;
|
|
393
|
-
$[94] = t18;
|
|
394
|
-
$[95] = t19;
|
|
395
|
-
$[96] = t20;
|
|
396
|
-
$[97] = t21;
|
|
397
|
-
$[98] = t22;
|
|
398
|
-
$[99] = t23;
|
|
399
|
-
$[100] = t24;
|
|
400
|
-
$[101] = t25;
|
|
401
|
-
$[102] = t26;
|
|
402
|
-
$[103] = t27;
|
|
403
|
-
$[104] = t28;
|
|
404
|
-
$[105] = t37;
|
|
405
|
-
$[106] = t41;
|
|
406
|
-
$[107] = t42;
|
|
407
|
-
} else t42 = $[107];
|
|
408
|
-
return t42;
|
|
74
|
+
...props
|
|
75
|
+
}), "group/date-picker-content relative flex min-w-input-width-min-width items-center justify-between gap-2", className),
|
|
76
|
+
"data-rac": "",
|
|
77
|
+
"data-datetime-input": "",
|
|
78
|
+
"data-hovered": isHovered || void 0,
|
|
79
|
+
"data-disabled": isDisabled || void 0,
|
|
80
|
+
"data-invalid": isInvalid || void 0,
|
|
81
|
+
"data-is-empty": fieldProps.value === null || void 0,
|
|
82
|
+
"data-focus-within": isFocused || void 0,
|
|
83
|
+
"data-focus-visible": isFocused && isFocusVisible || void 0,
|
|
84
|
+
"data-has-selection": fieldProps.value !== null || void 0,
|
|
85
|
+
"data-is-dirty": isDirty || void 0,
|
|
86
|
+
"data-is-required": isRequired || void 0,
|
|
87
|
+
...groupProps,
|
|
88
|
+
...focusWithinProps,
|
|
89
|
+
...hoverProps,
|
|
90
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
91
|
+
className: clsx(inputSizeCva({
|
|
92
|
+
size,
|
|
93
|
+
as
|
|
94
|
+
}), "flex w-full items-center gap-input-gap-input-text-to-elements pr-0!"),
|
|
95
|
+
children: [as && ["filter", "floating"].includes(as) && headerProps && /* @__PURE__ */ jsx(FormFieldLabel, {
|
|
96
|
+
as,
|
|
97
|
+
...headerProps
|
|
98
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
99
|
+
className: "flex items-center gap-input-gap-input-text-to-elements",
|
|
100
|
+
children: [
|
|
101
|
+
disableManualEntry && /* @__PURE__ */ jsx(Button, {
|
|
102
|
+
onPress: onOpenDropdown,
|
|
103
|
+
className: "absolute inset-0 z-0",
|
|
104
|
+
isDisabled
|
|
105
|
+
}),
|
|
106
|
+
todayIcon && /* @__PURE__ */ jsx(IconButton, {
|
|
107
|
+
label: "",
|
|
108
|
+
icon: TodayIcon,
|
|
109
|
+
size: "none",
|
|
110
|
+
onPress: onToday,
|
|
111
|
+
className: "relative z-1",
|
|
112
|
+
isDisabled
|
|
113
|
+
}),
|
|
114
|
+
disableManualEntry && placeholder && !fieldProps.value ? /* @__PURE__ */ jsx(Typography, {
|
|
115
|
+
size: "label-1",
|
|
116
|
+
className: "text-text-default-3",
|
|
117
|
+
children: placeholder
|
|
118
|
+
}) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(DateField, {
|
|
119
|
+
ref: dateFieldRef,
|
|
120
|
+
...fieldProps,
|
|
121
|
+
isDisabled,
|
|
122
|
+
isInvalid,
|
|
123
|
+
onClearChange,
|
|
124
|
+
hidePlaceholder,
|
|
125
|
+
disableManualEntry,
|
|
126
|
+
dateGranularity,
|
|
127
|
+
isTimeOptional,
|
|
128
|
+
format,
|
|
129
|
+
timeZone: effectiveTimeZone
|
|
130
|
+
}), endFieldProps && /* @__PURE__ */ jsxs(Fragment, { children: [!((as === "floating" || as === "filter") && hidePlaceholder) && /* @__PURE__ */ jsx("span", {
|
|
131
|
+
className: clsx("pointer-events-none select-none", isDisabled && "text-interactive-text-secondary-disabled"),
|
|
132
|
+
children: "–"
|
|
133
|
+
}), /* @__PURE__ */ jsx(DateField, {
|
|
134
|
+
ref: endDateFieldRef,
|
|
135
|
+
...endFieldProps,
|
|
136
|
+
isDisabled,
|
|
137
|
+
isInvalid,
|
|
138
|
+
onClearChange,
|
|
139
|
+
hidePlaceholder,
|
|
140
|
+
disableManualEntry,
|
|
141
|
+
isTimeOptional,
|
|
142
|
+
format,
|
|
143
|
+
timeZone: effectiveTimeZone
|
|
144
|
+
})] })] })
|
|
145
|
+
]
|
|
146
|
+
})]
|
|
147
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
148
|
+
className: clsx(inputSizeCva({
|
|
149
|
+
size,
|
|
150
|
+
as
|
|
151
|
+
}), "flex items-center gap-input-gap-trailing-elements py-0! pl-0!"),
|
|
152
|
+
children: [isClearable && /* @__PURE__ */ jsx(InputClear, {
|
|
153
|
+
onClear,
|
|
154
|
+
show: canClear
|
|
155
|
+
}), (!disableDropdown || disableManualEntry) && /* @__PURE__ */ jsx(InlineIconButton, {
|
|
156
|
+
label: "",
|
|
157
|
+
color: "secondary",
|
|
158
|
+
...buttonProps,
|
|
159
|
+
icon: isDateTime ? DateTimeIcon : CalendarIcon,
|
|
160
|
+
isDisabled,
|
|
161
|
+
className: "border-0!"
|
|
162
|
+
})]
|
|
163
|
+
})]
|
|
164
|
+
});
|
|
409
165
|
};
|
|
410
166
|
//#endregion
|
|
411
167
|
export { DatePickerInput };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DateFieldState, DateSegment } from '@react-stately/datepicker';
|
|
2
|
-
import { HTMLAttributes, ReactNode, Ref } from 'react';
|
|
3
2
|
interface DateSegmentProps {
|
|
4
3
|
state: DateFieldState;
|
|
5
4
|
segment: DateSegment;
|
|
@@ -9,18 +8,4 @@ interface DateSegmentProps {
|
|
|
9
8
|
}
|
|
10
9
|
export declare const getPlaceholder: (segment: DateSegment) => string | null;
|
|
11
10
|
export declare const DateSegmentItem: ({ segment, state, isDisabled, timePickerOnly, hidePlaceholder }: DateSegmentProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
interface DateSegmentItemViewProps {
|
|
13
|
-
ref?: Ref<HTMLDivElement>;
|
|
14
|
-
segmentProps?: HTMLAttributes<HTMLDivElement>;
|
|
15
|
-
role?: HTMLAttributes<HTMLDivElement>["role"];
|
|
16
|
-
type?: DateSegment["type"] | Intl.DateTimeFormatPartTypes;
|
|
17
|
-
text: ReactNode;
|
|
18
|
-
placeholder?: ReactNode;
|
|
19
|
-
isPlaceholder?: boolean;
|
|
20
|
-
isInputEmpty?: boolean;
|
|
21
|
-
isDisabled?: boolean;
|
|
22
|
-
timePickerOnly?: boolean;
|
|
23
|
-
hidePlaceholder?: boolean;
|
|
24
|
-
}
|
|
25
|
-
export declare const DateSegmentItemView: ({ ref, segmentProps, role, type, text, placeholder, isPlaceholder, isInputEmpty, isDisabled, timePickerOnly, hidePlaceholder, }: DateSegmentItemViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
11
|
export {};
|