@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
|
@@ -3,118 +3,253 @@ import { ArrowDropUpIcon } from "../../../../assets/icons/ArrowDropUp.js";
|
|
|
3
3
|
import { ChevronLeftIcon } from "../../../../assets/icons/ChevronLeft.js";
|
|
4
4
|
import { ChevronRightIcon } from "../../../../assets/icons/ChevronRight.js";
|
|
5
5
|
import { PillButton } from "../../../buttons/PillButton/PillButton.js";
|
|
6
|
+
import { c } from "react/compiler-runtime";
|
|
6
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
8
|
import { clsx } from "clsx";
|
|
8
9
|
import { Button, ToggleButtonGroup } from "react-aria-components";
|
|
9
|
-
import { Time } from "@internationalized/date";
|
|
10
|
+
import { CalendarDateTime, Time } from "@internationalized/date";
|
|
10
11
|
import { useDateFormatter } from "@react-aria/i18n";
|
|
11
12
|
//#region src/components/inputs/DateTime/shared/CalendarHeader.tsx
|
|
12
13
|
var HourCycle = {
|
|
13
14
|
12: "h12",
|
|
14
15
|
24: "h23"
|
|
15
16
|
};
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
var getTimeFormatterDate = (timeValue, timeZone) => {
|
|
18
|
+
return new CalendarDateTime(2e3, 1, 1, timeValue.hour, timeValue.minute).toDate(timeZone);
|
|
19
|
+
};
|
|
20
|
+
var CalendarHeader = (t0) => {
|
|
21
|
+
const $ = c(55);
|
|
22
|
+
const { calendarState, datePickerState, prevButtonProps, nextButtonProps, includesTime, isTimeOptional, hourCycle, granularity: t1, toggleState, setToggleState } = t0;
|
|
23
|
+
const granularity = t1 === void 0 ? "day" : t1;
|
|
24
|
+
let t2;
|
|
25
|
+
if ($[0] !== calendarState.timeZone) {
|
|
26
|
+
t2 = {
|
|
27
|
+
month: "long",
|
|
28
|
+
timeZone: calendarState.timeZone
|
|
29
|
+
};
|
|
30
|
+
$[0] = calendarState.timeZone;
|
|
31
|
+
$[1] = t2;
|
|
32
|
+
} else t2 = $[1];
|
|
33
|
+
const formatter = useDateFormatter(t2);
|
|
34
|
+
const t3 = hourCycle ? HourCycle[hourCycle] : void 0;
|
|
35
|
+
let t4;
|
|
36
|
+
if ($[2] !== calendarState.timeZone || $[3] !== t3) {
|
|
37
|
+
t4 = {
|
|
38
|
+
timeStyle: "short",
|
|
39
|
+
timeZone: calendarState.timeZone,
|
|
40
|
+
hourCycle: t3
|
|
41
|
+
};
|
|
42
|
+
$[2] = calendarState.timeZone;
|
|
43
|
+
$[3] = t3;
|
|
44
|
+
$[4] = t4;
|
|
45
|
+
} else t4 = $[4];
|
|
46
|
+
const timeFormatter = useDateFormatter(t4);
|
|
47
|
+
let t5;
|
|
48
|
+
if ($[5] !== calendarState.focusedDate.year) {
|
|
49
|
+
t5 = calendarState.focusedDate.year.toString();
|
|
50
|
+
$[5] = calendarState.focusedDate.year;
|
|
51
|
+
$[6] = t5;
|
|
52
|
+
} else t5 = $[6];
|
|
53
|
+
const year = t5;
|
|
54
|
+
let t6;
|
|
55
|
+
if ($[7] !== calendarState.focusedDate || $[8] !== calendarState.timeZone || $[9] !== formatter) {
|
|
56
|
+
t6 = formatter.format(calendarState.focusedDate.toDate(calendarState.timeZone));
|
|
57
|
+
$[7] = calendarState.focusedDate;
|
|
58
|
+
$[8] = calendarState.timeZone;
|
|
59
|
+
$[9] = formatter;
|
|
60
|
+
$[10] = t6;
|
|
61
|
+
} else t6 = $[10];
|
|
62
|
+
const month = t6;
|
|
28
63
|
const hasTimeValue = !!datePickerState?.timeValue;
|
|
29
64
|
let timeLabel = "--:--";
|
|
30
65
|
if (isTimeOptional || hasTimeValue) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
66
|
+
let t7;
|
|
67
|
+
if ($[11] !== calendarState.timeZone || $[12] !== datePickerState?.timeValue || $[13] !== timeFormatter) {
|
|
68
|
+
const date = getTimeFormatterDate(datePickerState?.timeValue || new Time(0, 0), calendarState.timeZone);
|
|
69
|
+
t7 = timeFormatter.format(date);
|
|
70
|
+
$[11] = calendarState.timeZone;
|
|
71
|
+
$[12] = datePickerState?.timeValue;
|
|
72
|
+
$[13] = timeFormatter;
|
|
73
|
+
$[14] = t7;
|
|
74
|
+
} else t7 = $[14];
|
|
75
|
+
timeLabel = t7;
|
|
35
76
|
}
|
|
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
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
77
|
+
const t7 = !!toggleState;
|
|
78
|
+
const t8 = !!toggleState && "opacity-0";
|
|
79
|
+
let t9;
|
|
80
|
+
if ($[15] !== t8) {
|
|
81
|
+
t9 = clsx("shrink-0 focus-visible:outline-interactive-contained-secondary-focus", t8);
|
|
82
|
+
$[15] = t8;
|
|
83
|
+
$[16] = t9;
|
|
84
|
+
} else t9 = $[16];
|
|
85
|
+
let t10;
|
|
86
|
+
if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
|
|
87
|
+
t10 = /* @__PURE__ */ jsx(ChevronLeftIcon, { className: "size-6 text-interactive-text-secondary-idle" });
|
|
88
|
+
$[17] = t10;
|
|
89
|
+
} else t10 = $[17];
|
|
90
|
+
let t11;
|
|
91
|
+
if ($[18] !== prevButtonProps || $[19] !== t7 || $[20] !== t9) {
|
|
92
|
+
t11 = /* @__PURE__ */ jsx("div", {
|
|
93
|
+
className: "inline-flex h-12 items-center p-3",
|
|
94
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
95
|
+
...prevButtonProps,
|
|
96
|
+
isDisabled: t7,
|
|
97
|
+
className: t9,
|
|
98
|
+
children: t10
|
|
99
|
+
})
|
|
100
|
+
});
|
|
101
|
+
$[18] = prevButtonProps;
|
|
102
|
+
$[19] = t7;
|
|
103
|
+
$[20] = t9;
|
|
104
|
+
$[21] = t11;
|
|
105
|
+
} else t11 = $[21];
|
|
106
|
+
let t12;
|
|
107
|
+
if ($[22] !== granularity || $[23] !== month || $[24] !== setToggleState || $[25] !== toggleState) {
|
|
108
|
+
t12 = granularity !== "year" && /* @__PURE__ */ jsx(PillButton, {
|
|
109
|
+
color: "secondary",
|
|
110
|
+
variant: "subtle",
|
|
111
|
+
iconPosition: "right",
|
|
112
|
+
icon: toggleState === "month" ? ArrowDropUpIcon : ArrowDropDownIcon,
|
|
113
|
+
toggle: true,
|
|
114
|
+
isSelected: toggleState === "month",
|
|
115
|
+
onChange: (isSelected) => {
|
|
116
|
+
if (!isSelected) {
|
|
117
|
+
if (granularity === "day") {
|
|
118
|
+
setToggleState(null);
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
setToggleState("month");
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
setToggleState("month");
|
|
125
|
+
},
|
|
126
|
+
children: month
|
|
127
|
+
});
|
|
128
|
+
$[22] = granularity;
|
|
129
|
+
$[23] = month;
|
|
130
|
+
$[24] = setToggleState;
|
|
131
|
+
$[25] = toggleState;
|
|
132
|
+
$[26] = t12;
|
|
133
|
+
} else t12 = $[26];
|
|
134
|
+
const t13 = toggleState === "year" ? ArrowDropUpIcon : ArrowDropDownIcon;
|
|
135
|
+
const t14 = toggleState === "year";
|
|
136
|
+
let t15;
|
|
137
|
+
if ($[27] !== granularity || $[28] !== setToggleState) {
|
|
138
|
+
t15 = (isSelected_0) => {
|
|
139
|
+
if (isSelected_0) {
|
|
140
|
+
setToggleState("year");
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
if (granularity === "day") {
|
|
144
|
+
setToggleState(null);
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
if (granularity === "month") {
|
|
148
|
+
setToggleState("month");
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
setToggleState("year");
|
|
152
|
+
};
|
|
153
|
+
$[27] = granularity;
|
|
154
|
+
$[28] = setToggleState;
|
|
155
|
+
$[29] = t15;
|
|
156
|
+
} else t15 = $[29];
|
|
157
|
+
let t16;
|
|
158
|
+
if ($[30] !== t13 || $[31] !== t14 || $[32] !== t15 || $[33] !== year) {
|
|
159
|
+
t16 = /* @__PURE__ */ jsx(PillButton, {
|
|
160
|
+
color: "secondary",
|
|
161
|
+
variant: "subtle",
|
|
162
|
+
iconPosition: "right",
|
|
163
|
+
icon: t13,
|
|
164
|
+
toggle: true,
|
|
165
|
+
isSelected: t14,
|
|
166
|
+
onChange: t15,
|
|
167
|
+
children: year
|
|
168
|
+
});
|
|
169
|
+
$[30] = t13;
|
|
170
|
+
$[31] = t14;
|
|
171
|
+
$[32] = t15;
|
|
172
|
+
$[33] = year;
|
|
173
|
+
$[34] = t16;
|
|
174
|
+
} else t16 = $[34];
|
|
175
|
+
let t17;
|
|
176
|
+
if ($[35] !== includesTime || $[36] !== setToggleState || $[37] !== timeLabel || $[38] !== toggleState) {
|
|
177
|
+
t17 = includesTime && /* @__PURE__ */ jsx(PillButton, {
|
|
178
|
+
color: "secondary",
|
|
179
|
+
variant: "subtle",
|
|
180
|
+
iconPosition: "right",
|
|
181
|
+
icon: toggleState === "time" ? ArrowDropUpIcon : ArrowDropDownIcon,
|
|
182
|
+
toggle: true,
|
|
183
|
+
isSelected: toggleState === "time",
|
|
184
|
+
onChange: (isSelected_1) => setToggleState(isSelected_1 ? "time" : null),
|
|
185
|
+
children: timeLabel
|
|
186
|
+
});
|
|
187
|
+
$[35] = includesTime;
|
|
188
|
+
$[36] = setToggleState;
|
|
189
|
+
$[37] = timeLabel;
|
|
190
|
+
$[38] = toggleState;
|
|
191
|
+
$[39] = t17;
|
|
192
|
+
} else t17 = $[39];
|
|
193
|
+
let t18;
|
|
194
|
+
if ($[40] !== t12 || $[41] !== t16 || $[42] !== t17) {
|
|
195
|
+
t18 = /* @__PURE__ */ jsxs(ToggleButtonGroup, {
|
|
196
|
+
className: "flex gap-2",
|
|
197
|
+
children: [
|
|
198
|
+
t12,
|
|
199
|
+
t16,
|
|
200
|
+
t17
|
|
201
|
+
]
|
|
202
|
+
});
|
|
203
|
+
$[40] = t12;
|
|
204
|
+
$[41] = t16;
|
|
205
|
+
$[42] = t17;
|
|
206
|
+
$[43] = t18;
|
|
207
|
+
} else t18 = $[43];
|
|
208
|
+
const t19 = !!toggleState;
|
|
209
|
+
const t20 = !!toggleState && "opacity-0";
|
|
210
|
+
let t21;
|
|
211
|
+
if ($[44] !== t20) {
|
|
212
|
+
t21 = clsx("shrink-0 focus-visible:outline-interactive-contained-secondary-focus", t20);
|
|
213
|
+
$[44] = t20;
|
|
214
|
+
$[45] = t21;
|
|
215
|
+
} else t21 = $[45];
|
|
216
|
+
let t22;
|
|
217
|
+
if ($[46] === Symbol.for("react.memo_cache_sentinel")) {
|
|
218
|
+
t22 = /* @__PURE__ */ jsx(ChevronRightIcon, { className: "size-6 text-interactive-text-secondary-idle" });
|
|
219
|
+
$[46] = t22;
|
|
220
|
+
} else t22 = $[46];
|
|
221
|
+
let t23;
|
|
222
|
+
if ($[47] !== nextButtonProps || $[48] !== t19 || $[49] !== t21) {
|
|
223
|
+
t23 = /* @__PURE__ */ jsx("div", {
|
|
224
|
+
className: "inline-flex h-12 items-center p-3",
|
|
225
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
226
|
+
...nextButtonProps,
|
|
227
|
+
isDisabled: t19,
|
|
228
|
+
className: t21,
|
|
229
|
+
children: t22
|
|
115
230
|
})
|
|
116
|
-
|
|
117
|
-
|
|
231
|
+
});
|
|
232
|
+
$[47] = nextButtonProps;
|
|
233
|
+
$[48] = t19;
|
|
234
|
+
$[49] = t21;
|
|
235
|
+
$[50] = t23;
|
|
236
|
+
} else t23 = $[50];
|
|
237
|
+
let t24;
|
|
238
|
+
if ($[51] !== t11 || $[52] !== t18 || $[53] !== t23) {
|
|
239
|
+
t24 = /* @__PURE__ */ jsxs("div", {
|
|
240
|
+
className: "inline-flex w-full items-center justify-between border-elevation-outline-default-1 border-b border-solid px-1",
|
|
241
|
+
children: [
|
|
242
|
+
t11,
|
|
243
|
+
t18,
|
|
244
|
+
t23
|
|
245
|
+
]
|
|
246
|
+
});
|
|
247
|
+
$[51] = t11;
|
|
248
|
+
$[52] = t18;
|
|
249
|
+
$[53] = t23;
|
|
250
|
+
$[54] = t24;
|
|
251
|
+
} else t24 = $[54];
|
|
252
|
+
return t24;
|
|
118
253
|
};
|
|
119
254
|
//#endregion
|
|
120
255
|
export { CalendarHeader };
|