@povio/ui 3.0.0-rc.3 → 3.1.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/README.md +39 -0
- 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/components/Breadcrumbs/Breadcrumbs.js +56 -207
- package/dist/components/Menu/Menu.d.ts +4 -0
- 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.d.ts +1 -1
- package/dist/components/Menu/MenuMobile.js +39 -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 -373
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +5 -12
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +186 -492
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +5 -14
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +47 -273
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +3 -7
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +121 -611
- package/dist/components/inputs/DateTime/shared/Calendar.d.ts +3 -5
- package/dist/components/inputs/DateTime/shared/Calendar.js +120 -338
- package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +2 -4
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +103 -310
- package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +2 -4
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +33 -150
- package/dist/components/inputs/DateTime/shared/CalendarHeader.d.ts +2 -1
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +98 -249
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +137 -318
- package/dist/components/inputs/DateTime/shared/DateField.js +112 -286
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +3 -14
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +129 -356
- 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.d.ts +4 -1
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +28 -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 +45 -88
- 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.d.ts +2 -2
- package/dist/components/inputs/File/shared/ProgressBar.js +20 -53
- package/dist/components/inputs/File/shared/fileUpload.cva.d.ts +1 -1
- package/dist/components/inputs/File/shared/fileUpload.cva.js +1 -1
- package/dist/components/inputs/File/shared/progressBar.cva.d.ts +38 -0
- package/dist/components/inputs/File/shared/progressBar.cva.js +28 -0
- 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 -45
- package/dist/components/inputs/RadioGroup/radio.cva.js +1 -48
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +2 -6
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +22 -217
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +18 -3
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +8 -107
- package/dist/components/inputs/Selection/Select/Select.d.ts +3 -7
- package/dist/components/inputs/Selection/Select/Select.js +18 -227
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +3 -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 -397
- 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 +6 -11
- 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 -28
- package/dist/components/inputs/shared/input.cva.js +4 -38
- 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 +25 -98
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +8 -48
- package/dist/components/overlays/Drawer/Drawer.js +22 -64
- package/dist/components/overlays/Modal/modal.cva.js +1 -1
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.d.ts +5 -1
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +28 -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 +17 -22
- package/dist/components/status/Toast/toast.cva.d.ts +14 -3
- package/dist/components/status/Toast/toast.cva.js +12 -10
- 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 +30 -30
- package/dist/components/table/table.cva.d.ts +7 -0
- package/dist/components/table/table.cva.js +2 -1
- package/dist/components/text/Link/Link.js +7 -19
- package/dist/components/text/Pill/Pill.d.ts +15 -0
- package/dist/components/text/Pill/Pill.js +44 -0
- 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 +10 -21
- package/dist/config/uiConfig.context.js +18 -69
- package/dist/config/uiOverrides.context.d.ts +10 -20
- package/dist/config/uiOverrides.context.js +14 -54
- package/dist/helpers/dynamicInputs.d.ts +5 -5
- package/dist/helpers/dynamicInputs.js +0 -3
- package/dist/hooks/useAutosave.d.ts +1 -2
- package/dist/hooks/useAutosave.js +4 -12
- 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.d.ts +1 -3
- package/dist/hooks/useFormAutosave.js +30 -122
- 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 +7 -16
- package/dist/index.js +6 -13
- 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 -136
- 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 -16
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +0 -16
- 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 -40
- 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 -13
- package/dist/components/inputs/FormField/formFieldHeader.cva.js +0 -14
- 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 -8
- 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 -37
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +0 -14
- package/dist/components/inputs/Selection/Select/QuerySelect.js +0 -178
- 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 -14
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +0 -43
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +0 -6
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +0 -5
- package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +0 -12
- package/dist/components/inputs/Selection/shared/selectInput.cva.js +0 -8
- package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +0 -23
- package/dist/components/inputs/Selection/shared/staticSelect.utils.js +0 -54
- 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 -8
- 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/useAutosave.spec.d.ts +0 -1
- package/dist/hooks/useFormAutosave.spec.d.ts +0 -1
- package/dist/hooks/useKeyInteractions.d.ts +0 -20
- package/dist/hooks/useKeyInteractions.js +0 -54
- package/dist/hooks/useKeyInteractions.spec.d.ts +0 -1
- package/dist/hooks/useQueryAutocomplete.d.ts +0 -14
- package/dist/hooks/useQueryAutocomplete.js +0 -72
- package/dist/utils/query.utils.d.ts +0 -4
- package/dist/utils/query.utils.js +0 -8
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { CalendarDate } from '@internationalized/date';
|
|
2
2
|
import { CalendarState, CalendarStateOptions } from '@react-stately/calendar';
|
|
3
|
-
import { DateValue } from 'react-aria';
|
|
4
3
|
import { DatePickerState } from 'react-stately';
|
|
5
4
|
type DateTimeCalendarProps = {
|
|
6
5
|
includesTime?: false;
|
|
@@ -15,14 +14,13 @@ type CalendarProps = DateTimeCalendarProps & {
|
|
|
15
14
|
className?: string;
|
|
16
15
|
state: CalendarState;
|
|
17
16
|
calendarProps: Omit<CalendarStateOptions, "locale" | "createCalendar">;
|
|
18
|
-
onApply: (
|
|
19
|
-
onDateSelectionChange?: (selectedDate: DateValue) => void;
|
|
20
|
-
setDateValueOnDateSelection?: boolean;
|
|
17
|
+
onApply: () => void;
|
|
21
18
|
onMonthYearChange?: (selectedDate: CalendarDate) => void;
|
|
22
19
|
onMonthYearCommit?: () => void;
|
|
23
20
|
selectedDate?: CalendarDate | null;
|
|
24
21
|
granularity?: "day" | "month" | "year";
|
|
22
|
+
isTimeOptional?: boolean;
|
|
25
23
|
};
|
|
26
24
|
export type ToggleState = "month" | "year" | "time";
|
|
27
|
-
export declare const Calendar: ({ className, includesTime, datePickerState, hourCycle, onApply, onMonthYearChange, onMonthYearCommit, selectedDate, granularity,
|
|
25
|
+
export declare const Calendar: ({ className, includesTime, datePickerState, hourCycle, isTimeOptional, onApply, onMonthYearChange, onMonthYearCommit, selectedDate, granularity, ...props }: CalendarProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
26
|
export {};
|
|
@@ -3,370 +3,152 @@ import { CalendarHeader } from "./CalendarHeader.js";
|
|
|
3
3
|
import { MonthPicker } from "./MonthPicker.js";
|
|
4
4
|
import { TimePickerForm } from "./TimePickerForm.js";
|
|
5
5
|
import { YearPicker } from "./YearPicker.js";
|
|
6
|
-
import { c } from "react/compiler-runtime";
|
|
7
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
7
|
import { clsx } from "clsx";
|
|
9
8
|
import { useEffect, useState } from "react";
|
|
10
9
|
import { useCalendar } from "@react-aria/calendar";
|
|
11
10
|
//#region src/components/inputs/DateTime/shared/Calendar.tsx
|
|
12
|
-
var Calendar = (
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
let onApply;
|
|
19
|
-
let onDateSelectionChange;
|
|
20
|
-
let onMonthYearChange;
|
|
21
|
-
let onMonthYearCommit;
|
|
22
|
-
let props;
|
|
23
|
-
let selectedDate;
|
|
24
|
-
let t1;
|
|
25
|
-
let t2;
|
|
26
|
-
if ($[0] !== t0) {
|
|
27
|
-
({className, includesTime, datePickerState, hourCycle, onApply, onMonthYearChange, onMonthYearCommit, selectedDate, granularity: t1, setDateValueOnDateSelection: t2, onDateSelectionChange, ...props} = t0);
|
|
28
|
-
$[0] = t0;
|
|
29
|
-
$[1] = className;
|
|
30
|
-
$[2] = datePickerState;
|
|
31
|
-
$[3] = hourCycle;
|
|
32
|
-
$[4] = includesTime;
|
|
33
|
-
$[5] = onApply;
|
|
34
|
-
$[6] = onDateSelectionChange;
|
|
35
|
-
$[7] = onMonthYearChange;
|
|
36
|
-
$[8] = onMonthYearCommit;
|
|
37
|
-
$[9] = props;
|
|
38
|
-
$[10] = selectedDate;
|
|
39
|
-
$[11] = t1;
|
|
40
|
-
$[12] = t2;
|
|
41
|
-
} else {
|
|
42
|
-
className = $[1];
|
|
43
|
-
datePickerState = $[2];
|
|
44
|
-
hourCycle = $[3];
|
|
45
|
-
includesTime = $[4];
|
|
46
|
-
onApply = $[5];
|
|
47
|
-
onDateSelectionChange = $[6];
|
|
48
|
-
onMonthYearChange = $[7];
|
|
49
|
-
onMonthYearCommit = $[8];
|
|
50
|
-
props = $[9];
|
|
51
|
-
selectedDate = $[10];
|
|
52
|
-
t1 = $[11];
|
|
53
|
-
t2 = $[12];
|
|
54
|
-
}
|
|
55
|
-
const granularity = t1 === void 0 ? "day" : t1;
|
|
56
|
-
const setDateValueOnDateSelection = t2 === void 0 ? false : t2;
|
|
57
|
-
let t3;
|
|
58
|
-
if ($[13] !== granularity) {
|
|
59
|
-
t3 = () => {
|
|
60
|
-
if (granularity === "year") return "year";
|
|
61
|
-
if (granularity === "month") return "month";
|
|
62
|
-
return null;
|
|
63
|
-
};
|
|
64
|
-
$[13] = granularity;
|
|
65
|
-
$[14] = t3;
|
|
66
|
-
} else t3 = $[14];
|
|
67
|
-
const [toggleState, setToggleState] = useState(t3);
|
|
11
|
+
var Calendar = ({ className, includesTime, datePickerState, hourCycle, isTimeOptional, onApply, onMonthYearChange, onMonthYearCommit, selectedDate, granularity = "day", ...props }) => {
|
|
12
|
+
const [toggleState, setToggleState] = useState(() => {
|
|
13
|
+
if (granularity === "year") return "year";
|
|
14
|
+
if (granularity === "month") return "month";
|
|
15
|
+
return null;
|
|
16
|
+
});
|
|
68
17
|
const { calendarProps, prevButtonProps, nextButtonProps } = useCalendar(props.calendarProps, props.state);
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
if ($[15] !== granularity || $[16] !== includesTime || $[17] !== toggleState) {
|
|
72
|
-
t4 = () => {
|
|
73
|
-
if (granularity === "year" && toggleState !== "year") {
|
|
74
|
-
setToggleState("year");
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
if (granularity === "month" && toggleState === null) {
|
|
78
|
-
setToggleState("month");
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
if (granularity === "month" && toggleState === "time") {
|
|
82
|
-
setToggleState("month");
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
if (granularity === "day" && toggleState === "time" && !includesTime) setToggleState(null);
|
|
86
|
-
};
|
|
87
|
-
t5 = [
|
|
88
|
-
granularity,
|
|
89
|
-
toggleState,
|
|
90
|
-
includesTime
|
|
91
|
-
];
|
|
92
|
-
$[15] = granularity;
|
|
93
|
-
$[16] = includesTime;
|
|
94
|
-
$[17] = toggleState;
|
|
95
|
-
$[18] = t4;
|
|
96
|
-
$[19] = t5;
|
|
97
|
-
} else {
|
|
98
|
-
t4 = $[18];
|
|
99
|
-
t5 = $[19];
|
|
100
|
-
}
|
|
101
|
-
useEffect(t4, t5);
|
|
102
|
-
let t6;
|
|
103
|
-
if ($[20] !== granularity) {
|
|
104
|
-
t6 = () => {
|
|
105
|
-
if (granularity === "day") {
|
|
106
|
-
setToggleState(null);
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
setToggleState("month");
|
|
110
|
-
};
|
|
111
|
-
$[20] = granularity;
|
|
112
|
-
$[21] = t6;
|
|
113
|
-
} else t6 = $[21];
|
|
114
|
-
const onMonthSelectionChange = t6;
|
|
115
|
-
let t7;
|
|
116
|
-
if ($[22] !== granularity) {
|
|
117
|
-
t7 = () => {
|
|
118
|
-
if (granularity === "day") {
|
|
119
|
-
setToggleState(null);
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
if (granularity === "month") {
|
|
123
|
-
setToggleState("month");
|
|
124
|
-
return;
|
|
125
|
-
}
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
if (granularity === "year" && toggleState !== "year") {
|
|
126
20
|
setToggleState("year");
|
|
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
|
-
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
if (granularity === "month" && toggleState === null) {
|
|
24
|
+
setToggleState("month");
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
if (granularity === "month" && toggleState === "time") {
|
|
28
|
+
setToggleState("month");
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
if (granularity === "day" && toggleState === "time" && !includesTime) setToggleState(null);
|
|
32
|
+
}, [
|
|
33
|
+
granularity,
|
|
34
|
+
toggleState,
|
|
35
|
+
includesTime
|
|
36
|
+
]);
|
|
37
|
+
const onMonthSelectionChange = () => {
|
|
38
|
+
if (granularity === "day") {
|
|
39
|
+
setToggleState(null);
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
setToggleState("month");
|
|
43
|
+
};
|
|
44
|
+
const onYearSelectionChange = () => {
|
|
45
|
+
if (granularity === "day") {
|
|
46
|
+
setToggleState(null);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
if (granularity === "month") {
|
|
50
|
+
setToggleState("month");
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
setToggleState("year");
|
|
54
|
+
};
|
|
55
|
+
const handleHeaderMonthNavigation = (months) => {
|
|
56
|
+
if (toggleState) return;
|
|
57
|
+
if (!onMonthYearChange) return;
|
|
58
|
+
const focusedDate = props.state.focusedDate;
|
|
59
|
+
if (months === -1) {
|
|
60
|
+
onMonthYearChange(focusedDate.subtract({ months: 1 }));
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
onMonthYearChange(focusedDate.add({ months: 1 }));
|
|
64
|
+
};
|
|
65
|
+
const headerPrevButtonProps = {
|
|
66
|
+
...prevButtonProps,
|
|
67
|
+
onPress: (event) => {
|
|
153
68
|
prevButtonProps.onPress?.(event);
|
|
154
69
|
handleHeaderMonthNavigation(-1);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
if ($[31] !== prevButtonProps || $[32] !== t9) {
|
|
162
|
-
t10 = {
|
|
163
|
-
...prevButtonProps,
|
|
164
|
-
onPress: t9
|
|
165
|
-
};
|
|
166
|
-
$[31] = prevButtonProps;
|
|
167
|
-
$[32] = t9;
|
|
168
|
-
$[33] = t10;
|
|
169
|
-
} else t10 = $[33];
|
|
170
|
-
const headerPrevButtonProps = t10;
|
|
171
|
-
let t11;
|
|
172
|
-
if ($[34] !== handleHeaderMonthNavigation || $[35] !== nextButtonProps) {
|
|
173
|
-
t11 = (event_0) => {
|
|
174
|
-
nextButtonProps.onPress?.(event_0);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
const headerNextButtonProps = {
|
|
73
|
+
...nextButtonProps,
|
|
74
|
+
onPress: (event) => {
|
|
75
|
+
nextButtonProps.onPress?.(event);
|
|
175
76
|
handleHeaderMonthNavigation(1);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
if ($[44] !== datePickerState || $[45] !== includesTime || $[46] !== onApply || $[47] !== onDateSelectionChange || $[48] !== props.state || $[49] !== setDateValueOnDateSelection || $[50] !== toggleState) {
|
|
206
|
-
t14 = (selectedDate_0) => {
|
|
207
|
-
const resolvedDate = selectedDate_0 ?? props.state.focusedDate;
|
|
208
|
-
if (includesTime && resolvedDate && setDateValueOnDateSelection) {
|
|
209
|
-
datePickerState.setDateValue(resolvedDate);
|
|
210
|
-
onDateSelectionChange?.(resolvedDate);
|
|
211
|
-
}
|
|
212
|
-
if (includesTime && toggleState !== "time") {
|
|
213
|
-
if (!setDateValueOnDateSelection && resolvedDate) {
|
|
214
|
-
datePickerState.setDateValue(resolvedDate);
|
|
215
|
-
onDateSelectionChange?.(resolvedDate);
|
|
216
|
-
}
|
|
217
|
-
setToggleState("time");
|
|
218
|
-
return;
|
|
219
|
-
}
|
|
220
|
-
if (datePickerState?.value && !setDateValueOnDateSelection) onApply(resolvedDate);
|
|
221
|
-
};
|
|
222
|
-
$[44] = datePickerState;
|
|
223
|
-
$[45] = includesTime;
|
|
224
|
-
$[46] = onApply;
|
|
225
|
-
$[47] = onDateSelectionChange;
|
|
226
|
-
$[48] = props.state;
|
|
227
|
-
$[49] = setDateValueOnDateSelection;
|
|
228
|
-
$[50] = toggleState;
|
|
229
|
-
$[51] = t14;
|
|
230
|
-
} else t14 = $[51];
|
|
231
|
-
const handleDateChange = t14;
|
|
232
|
-
let t15;
|
|
233
|
-
if ($[52] !== datePickerState || $[53] !== granularity || $[54] !== handleDateChange || $[55] !== includesTime || $[56] !== onApply || $[57] !== onDateSelection || $[58] !== onMonthSelectionChange || $[59] !== onMonthYearChange || $[60] !== onMonthYearCommit || $[61] !== onYearSelectionChange || $[62] !== props.state || $[63] !== selectedDate || $[64] !== setDateValueOnDateSelection || $[65] !== toggleState) {
|
|
234
|
-
t15 = () => {
|
|
235
|
-
if (!toggleState) {
|
|
236
|
-
if (granularity === "month") return /* @__PURE__ */ jsx(MonthPicker, {
|
|
237
|
-
state: props.state,
|
|
238
|
-
onSelectionChange: onMonthSelectionChange,
|
|
239
|
-
onDateChange: onMonthYearChange,
|
|
240
|
-
onCommit: onMonthYearCommit,
|
|
241
|
-
selectedDate
|
|
242
|
-
});
|
|
243
|
-
if (granularity === "year") return /* @__PURE__ */ jsx(YearPicker, {
|
|
244
|
-
state: props.state,
|
|
245
|
-
onSelectionChange: onYearSelectionChange,
|
|
246
|
-
onDateChange: onMonthYearChange,
|
|
247
|
-
onCommit: onMonthYearCommit,
|
|
248
|
-
selectedDate
|
|
249
|
-
});
|
|
250
|
-
return /* @__PURE__ */ jsx(CalendarGrid, {
|
|
251
|
-
state: props.state,
|
|
252
|
-
onApply: handleDateChange,
|
|
253
|
-
onDoubleClickApply: !includesTime ? onApply : void 0,
|
|
254
|
-
onDateSelection,
|
|
255
|
-
shouldApplyOnDateSelection: !includesTime || setDateValueOnDateSelection
|
|
256
|
-
});
|
|
257
|
-
}
|
|
258
|
-
if (toggleState === "month") {
|
|
259
|
-
if (granularity === "year") return /* @__PURE__ */ jsx(YearPicker, {
|
|
260
|
-
state: props.state,
|
|
261
|
-
onSelectionChange: onYearSelectionChange,
|
|
262
|
-
onDateChange: onMonthYearChange,
|
|
263
|
-
onCommit: onMonthYearCommit,
|
|
264
|
-
selectedDate
|
|
265
|
-
});
|
|
266
|
-
return /* @__PURE__ */ jsx(MonthPicker, {
|
|
267
|
-
state: props.state,
|
|
268
|
-
onSelectionChange: onMonthSelectionChange,
|
|
269
|
-
onDateChange: onMonthYearChange,
|
|
270
|
-
onCommit: onMonthYearCommit,
|
|
271
|
-
selectedDate
|
|
272
|
-
});
|
|
273
|
-
}
|
|
274
|
-
if (toggleState === "year") return /* @__PURE__ */ jsx(YearPicker, {
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
const handleDateChange = () => {
|
|
80
|
+
if (includesTime && !datePickerState.value) setToggleState("time");
|
|
81
|
+
else onApply();
|
|
82
|
+
};
|
|
83
|
+
const getContent = () => {
|
|
84
|
+
if (!toggleState) {
|
|
85
|
+
if (granularity === "month") return /* @__PURE__ */ jsx(MonthPicker, {
|
|
86
|
+
state: props.state,
|
|
87
|
+
onSelectionChange: onMonthSelectionChange,
|
|
88
|
+
onDateChange: onMonthYearChange,
|
|
89
|
+
onCommit: onMonthYearCommit,
|
|
90
|
+
selectedDate
|
|
91
|
+
});
|
|
92
|
+
if (granularity === "year") return /* @__PURE__ */ jsx(YearPicker, {
|
|
93
|
+
state: props.state,
|
|
94
|
+
onSelectionChange: onYearSelectionChange,
|
|
95
|
+
onDateChange: onMonthYearChange,
|
|
96
|
+
onCommit: onMonthYearCommit,
|
|
97
|
+
selectedDate
|
|
98
|
+
});
|
|
99
|
+
return /* @__PURE__ */ jsx(CalendarGrid, {
|
|
100
|
+
state: props.state,
|
|
101
|
+
onApply: handleDateChange
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
if (toggleState === "month") {
|
|
105
|
+
if (granularity === "year") return /* @__PURE__ */ jsx(YearPicker, {
|
|
275
106
|
state: props.state,
|
|
276
107
|
onSelectionChange: onYearSelectionChange,
|
|
277
108
|
onDateChange: onMonthYearChange,
|
|
278
109
|
onCommit: onMonthYearCommit,
|
|
279
110
|
selectedDate
|
|
280
111
|
});
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
112
|
+
return /* @__PURE__ */ jsx(MonthPicker, {
|
|
113
|
+
state: props.state,
|
|
114
|
+
onSelectionChange: onMonthSelectionChange,
|
|
115
|
+
onDateChange: onMonthYearChange,
|
|
116
|
+
onCommit: onMonthYearCommit,
|
|
117
|
+
selectedDate
|
|
284
118
|
});
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
const getContent = t15;
|
|
304
|
-
let t16;
|
|
305
|
-
if ($[67] !== className) {
|
|
306
|
-
t16 = clsx("flex min-h-0 w-full flex-col items-center", className);
|
|
307
|
-
$[67] = className;
|
|
308
|
-
$[68] = t16;
|
|
309
|
-
} else t16 = $[68];
|
|
310
|
-
let t17;
|
|
311
|
-
if ($[69] !== datePickerState || $[70] !== granularity || $[71] !== headerNextButtonProps || $[72] !== headerPrevButtonProps || $[73] !== hourCycle || $[74] !== includesTime || $[75] !== props.state || $[76] !== toggleState) {
|
|
312
|
-
t17 = /* @__PURE__ */ jsx(CalendarHeader, {
|
|
119
|
+
}
|
|
120
|
+
if (toggleState === "year") return /* @__PURE__ */ jsx(YearPicker, {
|
|
121
|
+
state: props.state,
|
|
122
|
+
onSelectionChange: onYearSelectionChange,
|
|
123
|
+
onDateChange: onMonthYearChange,
|
|
124
|
+
onCommit: onMonthYearCommit,
|
|
125
|
+
selectedDate
|
|
126
|
+
});
|
|
127
|
+
if (toggleState === "time" && includesTime) return /* @__PURE__ */ jsx("div", {
|
|
128
|
+
className: "flex h-72 w-80 items-center justify-center",
|
|
129
|
+
children: /* @__PURE__ */ jsx(TimePickerForm, { datePickerState })
|
|
130
|
+
});
|
|
131
|
+
return null;
|
|
132
|
+
};
|
|
133
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
134
|
+
...calendarProps,
|
|
135
|
+
className: clsx("flex min-h-0 w-full flex-col items-center", className),
|
|
136
|
+
children: [/* @__PURE__ */ jsx(CalendarHeader, {
|
|
313
137
|
calendarState: props.state,
|
|
314
138
|
datePickerState,
|
|
315
139
|
prevButtonProps: headerPrevButtonProps,
|
|
316
140
|
nextButtonProps: headerNextButtonProps,
|
|
317
141
|
includesTime,
|
|
142
|
+
isTimeOptional,
|
|
318
143
|
hourCycle,
|
|
319
144
|
granularity,
|
|
320
145
|
toggleState,
|
|
321
146
|
setToggleState
|
|
322
|
-
})
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
$[73] = hourCycle;
|
|
328
|
-
$[74] = includesTime;
|
|
329
|
-
$[75] = props.state;
|
|
330
|
-
$[76] = toggleState;
|
|
331
|
-
$[77] = t17;
|
|
332
|
-
} else t17 = $[77];
|
|
333
|
-
const t18 = toggleState !== "year" && "pb-8 md:pb-0";
|
|
334
|
-
let t19;
|
|
335
|
-
if ($[78] !== t18) {
|
|
336
|
-
t19 = clsx("flex min-h-0 w-full flex-1 flex-col items-center", t18);
|
|
337
|
-
$[78] = t18;
|
|
338
|
-
$[79] = t19;
|
|
339
|
-
} else t19 = $[79];
|
|
340
|
-
let t20;
|
|
341
|
-
if ($[80] !== getContent) {
|
|
342
|
-
t20 = getContent();
|
|
343
|
-
$[80] = getContent;
|
|
344
|
-
$[81] = t20;
|
|
345
|
-
} else t20 = $[81];
|
|
346
|
-
let t21;
|
|
347
|
-
if ($[82] !== t19 || $[83] !== t20) {
|
|
348
|
-
t21 = /* @__PURE__ */ jsx("div", {
|
|
349
|
-
className: t19,
|
|
350
|
-
children: t20
|
|
351
|
-
});
|
|
352
|
-
$[82] = t19;
|
|
353
|
-
$[83] = t20;
|
|
354
|
-
$[84] = t21;
|
|
355
|
-
} else t21 = $[84];
|
|
356
|
-
let t22;
|
|
357
|
-
if ($[85] !== calendarProps || $[86] !== t16 || $[87] !== t17 || $[88] !== t21) {
|
|
358
|
-
t22 = /* @__PURE__ */ jsxs("div", {
|
|
359
|
-
...calendarProps,
|
|
360
|
-
className: t16,
|
|
361
|
-
children: [t17, t21]
|
|
362
|
-
});
|
|
363
|
-
$[85] = calendarProps;
|
|
364
|
-
$[86] = t16;
|
|
365
|
-
$[87] = t17;
|
|
366
|
-
$[88] = t21;
|
|
367
|
-
$[89] = t22;
|
|
368
|
-
} else t22 = $[89];
|
|
369
|
-
return t22;
|
|
147
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
148
|
+
className: clsx("flex min-h-0 w-full flex-1 flex-col items-center", toggleState !== "year" && "pb-8 md:pb-0"),
|
|
149
|
+
children: getContent()
|
|
150
|
+
})]
|
|
151
|
+
});
|
|
370
152
|
};
|
|
371
153
|
//#endregion
|
|
372
154
|
export { Calendar };
|
|
@@ -4,9 +4,7 @@ import { KeyboardEvent } from 'react';
|
|
|
4
4
|
import { DateValue } from 'react-aria';
|
|
5
5
|
interface CalendarCellProps extends AriaCalendarCellProps {
|
|
6
6
|
state: CalendarState | RangeCalendarState;
|
|
7
|
-
onApply?: (
|
|
8
|
-
onDoubleClickApply?: (selectedDate?: DateValue) => void;
|
|
9
|
-
shouldApplyOnDateSelection?: boolean;
|
|
7
|
+
onApply?: () => void;
|
|
10
8
|
shouldCloseOnSelect?: boolean;
|
|
11
9
|
onDateSelection?: (date: DateValue) => void;
|
|
12
10
|
onDateHover?: (date: DateValue | null) => void;
|
|
@@ -18,5 +16,5 @@ interface CalendarCellProps extends AriaCalendarCellProps {
|
|
|
18
16
|
hoverDate?: DateValue | null;
|
|
19
17
|
onKeyboardNavigation?: (event: KeyboardEvent, date: DateValue) => boolean;
|
|
20
18
|
}
|
|
21
|
-
export declare const CalendarCell: ({ state, onApply,
|
|
19
|
+
export declare const CalendarCell: ({ state, onApply, shouldCloseOnSelect, onDateSelection, onDateHover, rangeSelection, hoverDate, onKeyboardNavigation, ...props }: CalendarCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
20
|
export {};
|