@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
|
@@ -7,59 +7,65 @@ import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconBu
|
|
|
7
7
|
import { PillButton } from "../../../buttons/PillButton/PillButton.js";
|
|
8
8
|
import "../../../../config/i18n.js";
|
|
9
9
|
import { Select } from "../../Selection/Select/Select.js";
|
|
10
|
+
import { c } from "react/compiler-runtime";
|
|
10
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
-
import { useMemo } from "react";
|
|
12
12
|
import { useTranslation } from "react-i18next";
|
|
13
13
|
import { useDateFormatter } from "@react-aria/i18n";
|
|
14
14
|
//#region src/components/inputs/DateTime/shared/CalendarSelectHeader.tsx
|
|
15
|
-
var CalendarSelectHeader = (
|
|
15
|
+
var CalendarSelectHeader = (t0) => {
|
|
16
|
+
const $ = c(67);
|
|
17
|
+
const { state, isPrevMonthDisabled, isPrevYearDisabled, isNextMonthDisabled, isNextYearDisabled, offset: t1, onNavigate, maxDate, minDate } = t0;
|
|
18
|
+
const offset = t1 === void 0 ? { months: 0 } : t1;
|
|
16
19
|
const { t } = useTranslation("ui");
|
|
17
20
|
const displayDate = state.visibleRange.start.add(offset);
|
|
18
21
|
const currentMonth = displayDate.month - 1;
|
|
19
22
|
const currentYear = displayDate.year;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
let t2;
|
|
24
|
+
if ($[0] !== state.timeZone) {
|
|
25
|
+
t2 = {
|
|
26
|
+
month: "long",
|
|
27
|
+
timeZone: state.timeZone
|
|
28
|
+
};
|
|
29
|
+
$[0] = state.timeZone;
|
|
30
|
+
$[1] = t2;
|
|
31
|
+
} else t2 = $[1];
|
|
32
|
+
const formatter = useDateFormatter(t2);
|
|
24
33
|
const numMonths = state.focusedDate.calendar.getMonthsInYear(state.focusedDate);
|
|
25
|
-
|
|
26
|
-
|
|
34
|
+
let months;
|
|
35
|
+
if ($[2] !== formatter || $[3] !== numMonths || $[4] !== state.focusedDate || $[5] !== state.timeZone) {
|
|
36
|
+
months = [];
|
|
27
37
|
for (let i = 1; i <= numMonths; i++) {
|
|
28
38
|
const date = state.focusedDate.set({ month: i });
|
|
29
39
|
months.push(formatter.format(date.toDate(state.timeZone)));
|
|
30
40
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const years = Array.from({ length: 201 }, (_,
|
|
39
|
-
const getAvailableMonths = () => {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
isDisabled
|
|
60
|
-
};
|
|
61
|
-
});
|
|
62
|
-
};
|
|
41
|
+
$[2] = formatter;
|
|
42
|
+
$[3] = numMonths;
|
|
43
|
+
$[4] = state.focusedDate;
|
|
44
|
+
$[5] = state.timeZone;
|
|
45
|
+
$[6] = months;
|
|
46
|
+
} else months = $[6];
|
|
47
|
+
const MONTHS = months;
|
|
48
|
+
const years = Array.from({ length: 201 }, (_, i_0) => currentYear - 100 + i_0);
|
|
49
|
+
const getAvailableMonths = () => MONTHS.map((month, i_1) => {
|
|
50
|
+
const monthDate = displayDate.set({ month: i_1 + 1 });
|
|
51
|
+
let isDisabled = false;
|
|
52
|
+
if (maxDate) isDisabled = monthDate.year > maxDate.year || monthDate.year === maxDate.year && monthDate.month >= maxDate.month;
|
|
53
|
+
if (minDate) isDisabled = monthDate.year < minDate.year || monthDate.year === minDate.year && monthDate.month <= minDate.month;
|
|
54
|
+
return {
|
|
55
|
+
month,
|
|
56
|
+
value: i_1,
|
|
57
|
+
isDisabled
|
|
58
|
+
};
|
|
59
|
+
});
|
|
60
|
+
const getAvailableYears = () => years.map((year) => {
|
|
61
|
+
let isDisabled_0 = false;
|
|
62
|
+
if (maxDate) isDisabled_0 = year > maxDate.year || year === maxDate.year && displayDate.month >= maxDate.month;
|
|
63
|
+
if (minDate && !isDisabled_0) isDisabled_0 = year < minDate.year || year === minDate.year && displayDate.month <= minDate.month;
|
|
64
|
+
return {
|
|
65
|
+
year,
|
|
66
|
+
isDisabled: isDisabled_0
|
|
67
|
+
};
|
|
68
|
+
});
|
|
63
69
|
const availableMonths = getAvailableMonths();
|
|
64
70
|
const availableYears = getAvailableYears();
|
|
65
71
|
const handleMonthChange = (value) => {
|
|
@@ -67,111 +73,286 @@ var CalendarSelectHeader = ({ state, isPrevMonthDisabled, isPrevYearDisabled, is
|
|
|
67
73
|
const newDate = displayDate.set({ month: value + 1 });
|
|
68
74
|
onNavigate?.(newDate);
|
|
69
75
|
};
|
|
70
|
-
const handleYearChange = (
|
|
71
|
-
if (
|
|
72
|
-
const
|
|
73
|
-
onNavigate?.(
|
|
76
|
+
const handleYearChange = (value_0) => {
|
|
77
|
+
if (value_0 === null) return;
|
|
78
|
+
const newDate_0 = displayDate.set({ year: value_0 });
|
|
79
|
+
onNavigate?.(newDate_0);
|
|
74
80
|
};
|
|
75
81
|
const handlePrevMonth = (e) => {
|
|
76
82
|
e.preventDefault();
|
|
77
83
|
e.stopPropagation();
|
|
78
|
-
const
|
|
79
|
-
onNavigate?.(
|
|
84
|
+
const newDate_1 = displayDate.subtract({ months: 1 });
|
|
85
|
+
onNavigate?.(newDate_1);
|
|
80
86
|
};
|
|
81
|
-
const handleNextMonth = (
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
const
|
|
85
|
-
onNavigate?.(
|
|
87
|
+
const handleNextMonth = (e_0) => {
|
|
88
|
+
e_0.preventDefault();
|
|
89
|
+
e_0.stopPropagation();
|
|
90
|
+
const newDate_2 = displayDate.add({ months: 1 });
|
|
91
|
+
onNavigate?.(newDate_2);
|
|
86
92
|
};
|
|
87
|
-
const handlePrevYear = (
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
const
|
|
91
|
-
onNavigate?.(
|
|
93
|
+
const handlePrevYear = (e_1) => {
|
|
94
|
+
e_1.preventDefault();
|
|
95
|
+
e_1.stopPropagation();
|
|
96
|
+
const newDate_3 = displayDate.subtract({ years: 1 });
|
|
97
|
+
onNavigate?.(newDate_3);
|
|
92
98
|
};
|
|
93
|
-
const handleNextYear = (
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
const
|
|
97
|
-
onNavigate?.(
|
|
99
|
+
const handleNextYear = (e_2) => {
|
|
100
|
+
e_2.preventDefault();
|
|
101
|
+
e_2.stopPropagation();
|
|
102
|
+
const newDate_4 = displayDate.add({ years: 1 });
|
|
103
|
+
onNavigate?.(newDate_4);
|
|
98
104
|
};
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
]
|
|
174
|
-
|
|
105
|
+
const t3 = "flex w-full items-center justify-between gap-3 border-elevation-outline-default-1 border-b border-solid px-3 py-2-5";
|
|
106
|
+
let t4;
|
|
107
|
+
if ($[7] !== t) {
|
|
108
|
+
t4 = t(_temp);
|
|
109
|
+
$[7] = t;
|
|
110
|
+
$[8] = t4;
|
|
111
|
+
} else t4 = $[8];
|
|
112
|
+
let t5;
|
|
113
|
+
if ($[9] !== handlePrevYear || $[10] !== isPrevYearDisabled || $[11] !== t4) {
|
|
114
|
+
t5 = /* @__PURE__ */ jsx(InlineIconButton, {
|
|
115
|
+
color: "secondary",
|
|
116
|
+
isDisabled: isPrevYearDisabled,
|
|
117
|
+
onClick: handlePrevYear,
|
|
118
|
+
icon: ChevronsLeftIcon,
|
|
119
|
+
label: t4
|
|
120
|
+
});
|
|
121
|
+
$[9] = handlePrevYear;
|
|
122
|
+
$[10] = isPrevYearDisabled;
|
|
123
|
+
$[11] = t4;
|
|
124
|
+
$[12] = t5;
|
|
125
|
+
} else t5 = $[12];
|
|
126
|
+
let t6;
|
|
127
|
+
if ($[13] !== t) {
|
|
128
|
+
t6 = t(_temp2);
|
|
129
|
+
$[13] = t;
|
|
130
|
+
$[14] = t6;
|
|
131
|
+
} else t6 = $[14];
|
|
132
|
+
let t7;
|
|
133
|
+
if ($[15] !== handlePrevMonth || $[16] !== isPrevMonthDisabled || $[17] !== t6) {
|
|
134
|
+
t7 = /* @__PURE__ */ jsx(InlineIconButton, {
|
|
135
|
+
color: "secondary",
|
|
136
|
+
isDisabled: isPrevMonthDisabled,
|
|
137
|
+
onClick: handlePrevMonth,
|
|
138
|
+
icon: ChevronLeftIcon,
|
|
139
|
+
label: t6
|
|
140
|
+
});
|
|
141
|
+
$[15] = handlePrevMonth;
|
|
142
|
+
$[16] = isPrevMonthDisabled;
|
|
143
|
+
$[17] = t6;
|
|
144
|
+
$[18] = t7;
|
|
145
|
+
} else t7 = $[18];
|
|
146
|
+
let t8;
|
|
147
|
+
if ($[19] !== t5 || $[20] !== t7) {
|
|
148
|
+
t8 = /* @__PURE__ */ jsxs("div", {
|
|
149
|
+
className: "flex items-center",
|
|
150
|
+
children: [t5, t7]
|
|
151
|
+
});
|
|
152
|
+
$[19] = t5;
|
|
153
|
+
$[20] = t7;
|
|
154
|
+
$[21] = t8;
|
|
155
|
+
} else t8 = $[21];
|
|
156
|
+
const t9 = "flex gap-2";
|
|
157
|
+
const t10 = MONTHS[currentMonth];
|
|
158
|
+
let t11;
|
|
159
|
+
if ($[22] !== t10) {
|
|
160
|
+
t11 = t10.slice(0, 3);
|
|
161
|
+
$[22] = t10;
|
|
162
|
+
$[23] = t11;
|
|
163
|
+
} else t11 = $[23];
|
|
164
|
+
let t12;
|
|
165
|
+
if ($[24] !== t11) {
|
|
166
|
+
t12 = /* @__PURE__ */ jsx(PillButton, {
|
|
167
|
+
color: "secondary",
|
|
168
|
+
variant: "subtle",
|
|
169
|
+
iconPosition: "right",
|
|
170
|
+
icon: ArrowDropDownIcon,
|
|
171
|
+
children: t11
|
|
172
|
+
});
|
|
173
|
+
$[24] = t11;
|
|
174
|
+
$[25] = t12;
|
|
175
|
+
} else t12 = $[25];
|
|
176
|
+
let t13;
|
|
177
|
+
if ($[26] !== availableMonths) {
|
|
178
|
+
t13 = availableMonths.map(_temp3).filter(_temp4);
|
|
179
|
+
$[26] = availableMonths;
|
|
180
|
+
$[27] = t13;
|
|
181
|
+
} else t13 = $[27];
|
|
182
|
+
let t14;
|
|
183
|
+
if ($[28] !== currentMonth || $[29] !== handleMonthChange || $[30] !== t12 || $[31] !== t13) {
|
|
184
|
+
t14 = /* @__PURE__ */ jsx(Select, {
|
|
185
|
+
label: "Month",
|
|
186
|
+
hideLabel: true,
|
|
187
|
+
customTrigger: t12,
|
|
188
|
+
ignoreTriggerWidth: true,
|
|
189
|
+
items: t13,
|
|
190
|
+
value: currentMonth,
|
|
191
|
+
onChange: handleMonthChange
|
|
192
|
+
});
|
|
193
|
+
$[28] = currentMonth;
|
|
194
|
+
$[29] = handleMonthChange;
|
|
195
|
+
$[30] = t12;
|
|
196
|
+
$[31] = t13;
|
|
197
|
+
$[32] = t14;
|
|
198
|
+
} else t14 = $[32];
|
|
199
|
+
const T0 = Select;
|
|
200
|
+
const t15 = "Year";
|
|
201
|
+
const t16 = true;
|
|
202
|
+
let t17;
|
|
203
|
+
if ($[33] !== currentYear) {
|
|
204
|
+
t17 = currentYear.toString();
|
|
205
|
+
$[33] = currentYear;
|
|
206
|
+
$[34] = t17;
|
|
207
|
+
} else t17 = $[34];
|
|
208
|
+
let t18;
|
|
209
|
+
if ($[35] !== t17) {
|
|
210
|
+
t18 = /* @__PURE__ */ jsx(PillButton, {
|
|
211
|
+
color: "secondary",
|
|
212
|
+
variant: "subtle",
|
|
213
|
+
iconPosition: "right",
|
|
214
|
+
icon: ArrowDropDownIcon,
|
|
215
|
+
children: t17
|
|
216
|
+
});
|
|
217
|
+
$[35] = t17;
|
|
218
|
+
$[36] = t18;
|
|
219
|
+
} else t18 = $[36];
|
|
220
|
+
const t19 = availableYears.map(_temp5);
|
|
221
|
+
let t20;
|
|
222
|
+
if ($[37] !== t19) {
|
|
223
|
+
t20 = t19.filter(_temp6);
|
|
224
|
+
$[37] = t19;
|
|
225
|
+
$[38] = t20;
|
|
226
|
+
} else t20 = $[38];
|
|
227
|
+
let t21;
|
|
228
|
+
if ($[39] !== T0 || $[40] !== currentYear || $[41] !== handleYearChange || $[42] !== t18 || $[43] !== t20) {
|
|
229
|
+
t21 = /* @__PURE__ */ jsx(T0, {
|
|
230
|
+
label: t15,
|
|
231
|
+
hideLabel: t16,
|
|
232
|
+
customTrigger: t18,
|
|
233
|
+
items: t20,
|
|
234
|
+
value: currentYear,
|
|
235
|
+
onChange: handleYearChange
|
|
236
|
+
});
|
|
237
|
+
$[39] = T0;
|
|
238
|
+
$[40] = currentYear;
|
|
239
|
+
$[41] = handleYearChange;
|
|
240
|
+
$[42] = t18;
|
|
241
|
+
$[43] = t20;
|
|
242
|
+
$[44] = t21;
|
|
243
|
+
} else t21 = $[44];
|
|
244
|
+
let t22;
|
|
245
|
+
if ($[45] !== t14 || $[46] !== t21) {
|
|
246
|
+
t22 = /* @__PURE__ */ jsxs("div", {
|
|
247
|
+
className: t9,
|
|
248
|
+
children: [t14, t21]
|
|
249
|
+
});
|
|
250
|
+
$[45] = t14;
|
|
251
|
+
$[46] = t21;
|
|
252
|
+
$[47] = t22;
|
|
253
|
+
} else t22 = $[47];
|
|
254
|
+
let t23;
|
|
255
|
+
if ($[48] !== t) {
|
|
256
|
+
t23 = t(_temp7);
|
|
257
|
+
$[48] = t;
|
|
258
|
+
$[49] = t23;
|
|
259
|
+
} else t23 = $[49];
|
|
260
|
+
let t24;
|
|
261
|
+
if ($[50] !== handleNextMonth || $[51] !== isNextMonthDisabled || $[52] !== t23) {
|
|
262
|
+
t24 = /* @__PURE__ */ jsx(InlineIconButton, {
|
|
263
|
+
color: "secondary",
|
|
264
|
+
isDisabled: isNextMonthDisabled,
|
|
265
|
+
onClick: handleNextMonth,
|
|
266
|
+
icon: ChevronRightIcon,
|
|
267
|
+
label: t23
|
|
268
|
+
});
|
|
269
|
+
$[50] = handleNextMonth;
|
|
270
|
+
$[51] = isNextMonthDisabled;
|
|
271
|
+
$[52] = t23;
|
|
272
|
+
$[53] = t24;
|
|
273
|
+
} else t24 = $[53];
|
|
274
|
+
let t25;
|
|
275
|
+
if ($[54] !== t) {
|
|
276
|
+
t25 = t(_temp8);
|
|
277
|
+
$[54] = t;
|
|
278
|
+
$[55] = t25;
|
|
279
|
+
} else t25 = $[55];
|
|
280
|
+
let t26;
|
|
281
|
+
if ($[56] !== handleNextYear || $[57] !== isNextYearDisabled || $[58] !== t25) {
|
|
282
|
+
t26 = /* @__PURE__ */ jsx(InlineIconButton, {
|
|
283
|
+
color: "secondary",
|
|
284
|
+
isDisabled: isNextYearDisabled,
|
|
285
|
+
onClick: handleNextYear,
|
|
286
|
+
icon: ChevronsRightIcon,
|
|
287
|
+
label: t25
|
|
288
|
+
});
|
|
289
|
+
$[56] = handleNextYear;
|
|
290
|
+
$[57] = isNextYearDisabled;
|
|
291
|
+
$[58] = t25;
|
|
292
|
+
$[59] = t26;
|
|
293
|
+
} else t26 = $[59];
|
|
294
|
+
let t27;
|
|
295
|
+
if ($[60] !== t24 || $[61] !== t26) {
|
|
296
|
+
t27 = /* @__PURE__ */ jsxs("div", {
|
|
297
|
+
className: "flex items-center",
|
|
298
|
+
children: [t24, t26]
|
|
299
|
+
});
|
|
300
|
+
$[60] = t24;
|
|
301
|
+
$[61] = t26;
|
|
302
|
+
$[62] = t27;
|
|
303
|
+
} else t27 = $[62];
|
|
304
|
+
let t28;
|
|
305
|
+
if ($[63] !== t22 || $[64] !== t27 || $[65] !== t8) {
|
|
306
|
+
t28 = /* @__PURE__ */ jsxs("div", {
|
|
307
|
+
className: t3,
|
|
308
|
+
children: [
|
|
309
|
+
t8,
|
|
310
|
+
t22,
|
|
311
|
+
t27
|
|
312
|
+
]
|
|
313
|
+
});
|
|
314
|
+
$[63] = t22;
|
|
315
|
+
$[64] = t27;
|
|
316
|
+
$[65] = t8;
|
|
317
|
+
$[66] = t28;
|
|
318
|
+
} else t28 = $[66];
|
|
319
|
+
return t28;
|
|
175
320
|
};
|
|
321
|
+
function _temp($) {
|
|
322
|
+
return $.ui.datePicker.navigation.previousYear;
|
|
323
|
+
}
|
|
324
|
+
function _temp2($_0) {
|
|
325
|
+
return $_0.ui.datePicker.navigation.previousMonth;
|
|
326
|
+
}
|
|
327
|
+
function _temp3(t0) {
|
|
328
|
+
const { month: month_0, value: value_1, isDisabled: isDisabled_1 } = t0;
|
|
329
|
+
return {
|
|
330
|
+
label: month_0,
|
|
331
|
+
id: value_1,
|
|
332
|
+
isDisabled: isDisabled_1
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
function _temp4(t0) {
|
|
336
|
+
const { isDisabled: isDisabled_2 } = t0;
|
|
337
|
+
return !isDisabled_2;
|
|
338
|
+
}
|
|
339
|
+
function _temp5(t0) {
|
|
340
|
+
const { year: year_0, isDisabled: isDisabled_3 } = t0;
|
|
341
|
+
return {
|
|
342
|
+
label: year_0.toString(),
|
|
343
|
+
id: year_0,
|
|
344
|
+
isDisabled: isDisabled_3
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
function _temp6(t0) {
|
|
348
|
+
const { isDisabled: isDisabled_4 } = t0;
|
|
349
|
+
return !isDisabled_4;
|
|
350
|
+
}
|
|
351
|
+
function _temp7($_1) {
|
|
352
|
+
return $_1.ui.datePicker.navigation.nextMonth;
|
|
353
|
+
}
|
|
354
|
+
function _temp8($_2) {
|
|
355
|
+
return $_2.ui.datePicker.navigation.nextYear;
|
|
356
|
+
}
|
|
176
357
|
//#endregion
|
|
177
358
|
export { CalendarSelectHeader };
|
|
@@ -13,6 +13,7 @@ interface DateFieldProps extends Omit<DateFieldStateOptions, "locale" | "createC
|
|
|
13
13
|
isTimeOptional?: boolean;
|
|
14
14
|
format?: string;
|
|
15
15
|
timeZone?: string;
|
|
16
|
+
segmentGroup?: string;
|
|
16
17
|
}
|
|
17
|
-
export declare const DateField: ({ ref, onClearChange, hidePlaceholder, isDisabled, disableManualEntry, dateGranularity, isTimeOptional, format, timeZone, ...props }: DateFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const DateField: ({ ref, onClearChange, hidePlaceholder, isDisabled, disableManualEntry, dateGranularity, isTimeOptional, format, timeZone, segmentGroup, ...props }: DateFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
19
|
export {};
|