@mantine-vue/dates 2.4.0 → 3.0.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/cjs/index.cjs +179 -48
- package/cjs/index.cjs.map +1 -1
- package/esm/index.mjs +179 -48
- package/esm/index.mjs.map +1 -1
- package/lib/index.d.mts +151 -42
- package/lib/index.d.ts +151 -42
- package/package.json +3 -3
package/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":[],"sources":["../src/Dates.module.css","../src/index.ts"],"sourcesContent":[".calendar {\n display: flex;\n gap: var(--mantine-spacing-md);\n width: max-content;\n}\n\n.calendar[data-full-width] {\n width: 100%;\n}\n\n.calendar[data-full-width] > * {\n flex: 1;\n}\n\n.calendarLevel {\n min-width: 16.25rem;\n}\n\n.calendarHeader {\n --dch-control-size: 2.25rem;\n\n display: flex;\n max-width: calc(var(--dch-control-size) * 8 + 0.4375rem);\n margin-bottom: var(--mantine-spacing-xs);\n}\n\n.calendarHeader[data-full-width] {\n max-width: none;\n width: 100%;\n}\n\n.calendarHeaderLevel,\n.calendarHeaderControl {\n height: var(--dch-control-size);\n border-radius: var(--mantine-radius-default);\n display: flex;\n justify-content: center;\n align-items: center;\n user-select: none;\n opacity: 1;\n cursor: pointer;\n color: var(--mantine-color-text);\n}\n\n.calendarHeaderLevel[data-static],\n.calendarHeaderControl[data-static] {\n cursor: default;\n}\n\n.calendarHeaderLevel:not(:disabled):not([data-disabled]):not([data-static]):hover,\n.calendarHeaderControl:not(:disabled):not([data-disabled]):not([data-static]):hover {\n background-color: var(--mantine-color-gray-light-hover);\n}\n\n.calendarHeaderLevel:disabled,\n.calendarHeaderLevel[data-disabled],\n.calendarHeaderControl:disabled,\n.calendarHeaderControl[data-disabled] {\n opacity: 0.2;\n cursor: not-allowed;\n}\n\n.calendarHeaderControl {\n width: var(--dch-control-size);\n}\n\n.calendarHeaderLevel {\n flex: 1;\n font-size: var(--mantine-font-size-sm);\n font-weight: 500;\n text-transform: capitalize;\n}\n\n.calendarHeaderLevel[data-native-level-select] {\n cursor: default;\n gap: var(--mantine-spacing-md);\n}\n\n.calendarHeaderSelect {\n appearance: none;\n background: transparent;\n border: none;\n font-size: inherit;\n font-weight: var(--mantine-font-weight-medium);\n text-transform: capitalize;\n color: inherit;\n font-family: inherit;\n cursor: pointer;\n padding: 0 rem(16px) 0 0;\n line-height: var(--dch-control-size);\n height: var(--dch-control-size);\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 15' fill='none'%3E%3Cpath d='M4.9 5.4 7.5 2.8l2.6 2.6M10.1 9.6 7.5 12.2 4.9 9.6' stroke='currentColor'/%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-position: right center;\n background-size: rem(14px) rem(14px);\n\n &:focus-visible {\n outline: rem(2px) solid var(--mantine-primary-color-filled);\n outline-offset: rem(2px);\n border-radius: var(--mantine-radius-sm);\n }\n\n &:disabled {\n cursor: not-allowed;\n color: var(--mantine-color-dimmed);\n }\n}\n\n.calendarHeaderControlIcon {\n width: 45%;\n height: 45%;\n}\n\n.calendarHeaderControlIcon[data-direction='next'] {\n transform: rotate(270deg);\n}\n\n.calendarHeaderControlIcon[data-direction='previous'] {\n transform: rotate(90deg);\n}\n\n.month {\n table-layout: fixed;\n border-collapse: separate;\n border-spacing: 0;\n}\n\n.month[data-full-width] {\n width: 100%;\n}\n\n.monthRow {\n border: 0;\n}\n\n.monthCell {\n padding: 0;\n text-align: center;\n}\n\n.monthCell[data-with-spacing] {\n padding: 0.125rem;\n}\n\n.weekday {\n height: 1.75rem;\n color: var(--mantine-color-dimmed);\n font-size: var(--mantine-font-size-xs);\n font-weight: 500;\n text-align: center;\n}\n\n.weekday[data-weekend] {\n color: var(--mantine-color-red-filled);\n}\n\n.weekNumber {\n color: var(--mantine-color-dimmed);\n font-size: var(--mantine-font-size-xs);\n text-align: center;\n}\n\n.day {\n --day-size: 2.25rem;\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--day-size);\n height: var(--day-size);\n border-radius: var(--mantine-radius-sm);\n color: var(--mantine-color-text);\n font-size: var(--mantine-font-size-sm);\n line-height: 1;\n user-select: none;\n}\n\n.day[data-full-width] {\n width: 100%;\n height: auto;\n min-height: var(--day-size);\n aspect-ratio: 1;\n}\n\n.day:not(:disabled):not([data-static]):not([data-selected]):not([data-in-range]):hover {\n background-color: var(--mantine-color-gray-light-hover);\n}\n\n.day[data-outside] {\n color: var(--mantine-color-dimmed);\n opacity: 0.65;\n}\n\n.day[data-weekend] {\n color: var(--mantine-color-red-filled);\n}\n\n.day[data-today][data-highlight-today] {\n border: 1px solid var(--mantine-primary-color-filled);\n}\n\n.day[data-in-range] {\n background-color: var(--mantine-primary-color-light);\n color: var(--mantine-primary-color-light-color);\n border-radius: 0;\n}\n\n.day[data-in-range]:not(:disabled):not([data-static]):hover {\n background-color: var(--mantine-primary-color-light);\n}\n\n.day[data-selected],\n.day[data-first-in-range],\n.day[data-last-in-range] {\n background-color: var(--mantine-primary-color-filled);\n color: var(--mantine-color-white);\n}\n\n.day[data-selected]:not(:disabled):not([data-static]):hover {\n background-color: var(--mantine-primary-color-filled-hover);\n}\n\n.day:disabled,\n.pickerControl:disabled {\n cursor: not-allowed;\n color: var(--mantine-color-dimmed);\n opacity: 0.55;\n}\n\n.controlsGrid[data-full-width] {\n width: 100%;\n}\n\n.pickerControl {\n height: 2.25rem;\n width: calc(2.25rem * 7 / 3 + 0.09375rem);\n display: flex;\n justify-content: center;\n align-items: center;\n padding-inline: var(--mantine-spacing-xs);\n border-radius: var(--mantine-radius-sm);\n color: var(--mantine-color-text);\n font-size: var(--mantine-font-size-sm);\n user-select: none;\n background-color: transparent;\n}\n\n.pickerControl[data-full-width] {\n width: 100%;\n}\n\n.pickerControl:not(:disabled):not([data-selected]):not([data-in-range]):hover {\n background-color: var(--mantine-color-gray-light-hover);\n}\n\n.pickerControl[data-selected] {\n background-color: var(--mantine-primary-color-filled);\n color: var(--mantine-color-white);\n}\n\n.pickerControl[data-selected]:hover {\n background-color: var(--mantine-primary-color-filled-hover);\n}\n\n.pickerControl[data-in-range] {\n background-color: var(--mantine-primary-color-light-hover);\n color: var(--mantine-primary-color-light-color);\n}\n\n.pickerControl[data-in-range]:hover {\n background-color: var(--mantine-primary-color-light);\n}\n\n.pickerControl[data-first-in-range] {\n border-radius: 0;\n border-start-start-radius: var(--mantine-radius-default);\n border-end-start-radius: var(--mantine-radius-default);\n}\n\n.pickerControl[data-last-in-range] {\n border-radius: 0;\n border-end-end-radius: var(--mantine-radius-default);\n border-start-end-radius: var(--mantine-radius-default);\n}\n\n.pickerControl[data-first-in-range][data-last-in-range] {\n border-radius: var(--mantine-radius-default);\n}\n\n.timePicker,\n.dateTimePicker {\n width: max-content;\n}\n\n.datePickerRoot {\n display: flex;\n font-size: var(--mantine-font-size-sm);\n}\n\n.dateTimePicker {\n display: grid;\n gap: var(--mantine-spacing-sm);\n}\n\n.timeWrapper {\n display: flex;\n align-items: stretch;\n margin-top: var(--mantine-spacing-md);\n}\n\n.timeInput {\n flex: 1;\n margin-inline-end: var(--mantine-spacing-md);\n}\n\n.presetsList {\n display: flex;\n flex-direction: column;\n border-inline-end: 1px solid var(--mantine-color-default-border);\n padding-inline-end: 0.5em;\n margin-inline-end: 0.5em;\n}\n\n.presetButton {\n padding: 0.52em 0.8em;\n border-radius: var(--mantine-radius-default);\n font-size: inherit;\n white-space: nowrap;\n}\n\n.presetButton:hover {\n background-color: var(--mantine-color-gray-light-hover);\n}\n\n.timePickerPresetsGroup {\n margin-bottom: var(--mantine-spacing-xs);\n}\n\n.dropdown {\n padding: var(--mantine-spacing-xs);\n}\n\n.placeholder {\n color: var(--mantine-color-placeholder);\n}\n\n.timeGridControl {\n text-align: center;\n padding-inline: 1em;\n padding-block: 0.25em;\n border: 1px solid var(--mantine-color-default-border);\n background-color: var(--mantine-color-default);\n color: var(--mantine-color-default-color);\n border-radius: var(--mantine-radius-default);\n font-size: var(--mantine-font-size-sm);\n}\n\n.timeGridControl:not(:disabled):not([data-disabled]):not([data-active]):hover {\n background-color: var(--mantine-color-default-hover);\n}\n\n.timeGridControl[data-active] {\n background-color: var(--mantine-primary-color-filled);\n color: var(--mantine-color-white);\n border-color: transparent;\n}\n\n.timeGridControl[data-active]:not(:disabled):not([data-disabled]):hover {\n background-color: var(--mantine-primary-color-filled-hover);\n}\n\n.timeGridControl:disabled,\n.timeGridControl[data-disabled] {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.timePickerFieldsRoot {\n display: flex;\n align-items: center;\n height: 100%;\n overflow: hidden;\n}\n\n.timePickerFieldsGroup {\n display: flex;\n align-items: center;\n height: calc(var(--input-height) - 15px);\n}\n\n.timePickerField {\n width: calc(2ch + 0.3em);\n caret-color: transparent;\n font-variant-numeric: tabular-nums;\n position: relative;\n height: 100%;\n line-height: 1;\n padding-inline: 0.15em;\n border: 0;\n text-align: center;\n text-align-last: center;\n background-color: transparent;\n color: var(--input-color);\n border-radius: 2px;\n appearance: none;\n}\n\n.timePickerField[data-am-pm] {\n width: auto;\n}\n\n.timePickerField:disabled {\n cursor: not-allowed;\n}\n\n.timePickerField::selection {\n background-color: transparent;\n}\n\n.timePickerField::placeholder {\n opacity: 1;\n color: inherit;\n}\n\n.timePickerField:focus {\n background-color: var(--mantine-primary-color-filled);\n color: var(--mantine-color-white);\n outline: 0;\n}\n\n.timePickerField:focus::placeholder {\n color: var(--mantine-color-white);\n}\n\n.timePickerDropdown {\n padding: 4px;\n}\n\n.timePickerControlsListGroup {\n display: flex;\n gap: 4px;\n}\n\n.timePickerControlsList {\n display: flex;\n flex-direction: column;\n}\n\n.timePickerControl {\n text-align: center;\n min-width: 2.5em;\n width: max-content;\n height: 2em;\n border-radius: var(--mantine-radius-default);\n font-size: var(--mantine-font-size-sm);\n}\n\n.timePickerControl[data-active] {\n background-color: var(--mantine-primary-color-filled);\n color: var(--mantine-color-white);\n}\n\n.timePickerControl:not([data-active]):hover {\n color: var(--mantine-color-bright);\n background-color: var(--mantine-color-gray-light-hover);\n}\n\n.miniCalendarRoot {\n width: fit-content;\n display: flex;\n align-items: center;\n font-size: var(--mantine-font-size-sm);\n}\n\n.miniCalendarDays {\n display: flex;\n font-size: inherit;\n}\n\n.miniCalendarDay {\n display: flex;\n min-width: 3em;\n gap: 0.5em;\n font-size: inherit;\n flex-direction: column;\n align-items: center;\n line-height: 1;\n padding: 0.75em;\n border-radius: var(--mantine-radius-default);\n}\n\n.miniCalendarDay[data-selected] {\n color: var(--mantine-primary-color-contrast);\n background-color: var(--mantine-primary-color-filled);\n}\n\n.miniCalendarDay[data-selected]:not([data-disabled]):hover {\n background-color: var(--mantine-primary-color-filled-hover);\n}\n\n.miniCalendarDay[data-disabled] {\n opacity: 0.3;\n cursor: not-allowed;\n}\n\n.miniCalendarDay:not([data-disabled]):not([data-selected]):hover {\n background-color: var(--mantine-color-gray-light-hover);\n}\n\n.miniCalendarDayMonth {\n font-size: 0.75em;\n font-weight: var(--mantine-font-weight-medium);\n opacity: 0.65;\n}\n\n.miniCalendarDayNumber {\n font-size: 0.9em;\n font-weight: var(--mantine-font-weight-medium);\n}\n\n.miniCalendarControl {\n align-self: stretch;\n font-size: inherit;\n width: 2em;\n border-radius: var(--mantine-radius-default);\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--mantine-color-bright);\n}\n\n.miniCalendarControl[data-disabled] {\n opacity: 0.3;\n cursor: not-allowed;\n}\n\n.miniCalendarControl:not([data-disabled]):hover {\n background-color: var(--mantine-color-gray-light-hover);\n}\n\n.miniCalendarControl [data-chevron] {\n font-size: inherit;\n width: 60%;\n}\n\n.miniCalendarControl[data-direction='previous'] [data-chevron] {\n transform: rotate(90deg);\n}\n\n.miniCalendarControl[data-direction='next'] [data-chevron] {\n transform: rotate(-90deg);\n}\n","import dayjs from 'dayjs'\nimport customParseFormat from 'dayjs/plugin/customParseFormat'\nimport {\n computed,\n defineComponent,\n h,\n inject,\n provide,\n ref,\n watch,\n type CSSProperties,\n type InjectionKey,\n type PropType,\n type SlotsType,\n type VNodeChild,\n} from 'vue'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport {\n AccordionChevron,\n ActionIcon,\n Box,\n Button,\n CheckIcon,\n CloseButton,\n Group,\n InputBase,\n Modal,\n Popover,\n ScrollArea,\n SimpleGrid,\n Text,\n UnstyledButton,\n type MantineSize,\n} from '@mantine-vue/core'\nimport classes from './Dates.module.css'\n\ndayjs.extend(customParseFormat)\n\nexport type DateStringValue = string\nexport type DateValue = DateStringValue | null\nexport type DatesRangeValue = [DateValue, DateValue]\nexport type DatePickerType = 'default' | 'multiple' | 'range'\nexport type CalendarLevel = 'month' | 'year' | 'decade'\nexport interface RenderDaySlots {\n renderDay?: (input: { date: DateStringValue }) => VNodeChild\n /** Short alias for `renderDay`. */\n day?: (input: { date: DateStringValue }) => VNodeChild\n}\nexport type DatePickerValue<Type extends DatePickerType = 'default'> = Type extends 'range'\n ? DatesRangeValue\n : Type extends 'multiple'\n ? DateStringValue[]\n : DateValue\nexport type DatePickerValueType = DateValue | DateStringValue[] | DatesRangeValue\nexport type ControlKeydownPayload = {\n rowIndex: number\n cellIndex: number\n event: KeyboardEvent\n controlsRef: HTMLElement[][]\n}\nexport type DateFormatter = (payload: {\n type: DatePickerType\n date: DatePickerValueType\n locale?: string\n format: string\n labelSeparator: string\n}) => string\n\nexport interface DatesProviderSettings {\n locale?: string\n firstDayOfWeek?: number\n weekendDays?: number[]\n timezone?: string\n consistentWeeks?: boolean\n}\n\nconst DATES_PROVIDER_DEFAULT_SETTINGS: Required<DatesProviderSettings> = {\n locale: 'en',\n firstDayOfWeek: 1,\n weekendDays: [0, 6],\n timezone: 'UTC',\n consistentWeeks: false,\n}\n\nconst DatesContextKey: InjectionKey<Required<DatesProviderSettings>> = Symbol('DatesContext')\n\nexport const DatesProvider = defineComponent({\n name: 'DatesProvider',\n props: {\n settings: { type: Object as PropType<DatesProviderSettings>, default: () => ({}) },\n },\n setup(props, { slots }) {\n const settings = computed(() => ({ ...DATES_PROVIDER_DEFAULT_SETTINGS, ...props.settings }))\n provide(DatesContextKey, settings.value)\n watch(settings, (value) => provide(DatesContextKey, value))\n return () => slots.default?.()\n },\n})\n\nexport function useDatesContext() {\n return inject(DatesContextKey, DATES_PROVIDER_DEFAULT_SETTINGS)\n}\n\nfunction normalizeDate(value: Date | string | null | undefined): DateStringValue | null {\n if (value == null || value === '') {\n return null\n }\n\n const parsed = dayjs(value)\n return parsed.isValid() ? parsed.format('YYYY-MM-DD') : null\n}\n\nexport function toDateString(value: Date | string | null | undefined): DateStringValue | null {\n return normalizeDate(value)\n}\n\nexport function shiftTimezone<T>(direction: 'add' | 'remove', date: T, timezone?: string): T {\n void direction\n void timezone\n return date\n}\n\nexport function getTimezoneOffset(date: Date | string, timezone?: string) {\n void timezone\n return new Date(date).getTimezoneOffset()\n}\n\nexport function clampDate(date: DateStringValue, minDate?: Date | string, maxDate?: Date | string) {\n const value = dayjs(date)\n const min = normalizeDate(minDate)\n const max = normalizeDate(maxDate)\n\n if (min && value.isBefore(min, 'day')) {\n return min\n }\n\n if (max && value.isAfter(max, 'day')) {\n return max\n }\n\n return value.format('YYYY-MM-DD')\n}\n\nexport function getDefaultClampedDate({\n minDate,\n maxDate,\n defaultDate,\n}: {\n minDate?: Date | string\n maxDate?: Date | string\n defaultDate?: Date | string\n} = {}) {\n return clampDate(normalizeDate(defaultDate) || dayjs().format('YYYY-MM-DD'), minDate, maxDate)\n}\n\nexport function assignTime(date: Date | string, time: Date | string) {\n const timeValue = dayjs(time)\n return dayjs(date)\n .hour(timeValue.hour())\n .minute(timeValue.minute())\n .second(timeValue.second())\n .millisecond(timeValue.millisecond())\n .toDate()\n}\n\nexport function getFormattedDate({\n date,\n format = 'MMMM D, YYYY',\n locale,\n}: {\n date: Date | string\n format?: string\n locale?: string\n}) {\n return dayjs(date)\n .locale(locale || 'en')\n .format(format)\n}\n\nexport function isSameDate(\n a: Date | string | null | undefined,\n b: Date | string | null | undefined,\n) {\n if (!a || !b) return false\n return dayjs(a).isSame(b, 'day')\n}\n\nexport function isSameMonth(a: Date | string, b: Date | string) {\n return dayjs(a).isSame(b, 'month')\n}\n\nexport function isSameYear(a: Date | string, b: Date | string) {\n return dayjs(a).isSame(b, 'year')\n}\n\nexport function getStartOfWeek(date: Date | string, firstDayOfWeek = 1) {\n const value = dayjs(date)\n const diff = (value.day() - firstDayOfWeek + 7) % 7\n return value.subtract(diff, 'day').format('YYYY-MM-DD')\n}\n\nexport function getEndOfWeek(date: Date | string, firstDayOfWeek = 1) {\n return dayjs(getStartOfWeek(date, firstDayOfWeek)).add(6, 'day').format('YYYY-MM-DD')\n}\n\nexport function getWeekNumber(date: Date | string) {\n const current = dayjs(date)\n const yearStart = dayjs(`${current.year()}-01-01`)\n return Math.ceil((current.diff(yearStart, 'day') + yearStart.day() + 1) / 7)\n}\n\nexport function handleControlKeyDown({\n rowIndex,\n cellIndex,\n event,\n controlsRef,\n}: ControlKeydownPayload) {\n const rows = controlsRef.length\n const cols = controlsRef[0]?.length || 0\n let nextRow = rowIndex\n let nextCell = cellIndex\n\n if (event.key === 'ArrowRight') nextCell += 1\n if (event.key === 'ArrowLeft') nextCell -= 1\n if (event.key === 'ArrowDown') nextRow += 1\n if (event.key === 'ArrowUp') nextRow -= 1\n if (event.key === 'Home') nextCell = 0\n if (event.key === 'End') nextCell = cols - 1\n\n if (nextCell < 0) {\n nextCell = cols - 1\n nextRow -= 1\n }\n\n if (nextCell >= cols) {\n nextCell = 0\n nextRow += 1\n }\n\n const next = controlsRef[(nextRow + rows) % rows]?.[(nextCell + cols) % cols]\n if (next) {\n event.preventDefault()\n next.focus()\n }\n}\n\nfunction focusAdjacentControl(\n refs: (HTMLElement | null | undefined)[][],\n rowIndex: number,\n cellIndex: number,\n direction: 'up' | 'down' | 'left' | 'right',\n) {\n const isFocusable = (el: HTMLElement | null | undefined) =>\n !!el &&\n !(el as any).disabled &&\n !el.hasAttribute('data-hidden') &&\n !el.hasAttribute('data-outside')\n\n let nextRow = rowIndex\n let nextCell = cellIndex\n\n for (let i = 0; i < 60; i += 1) {\n if (direction === 'up') nextRow -= 1\n if (direction === 'down') nextRow += 1\n if (direction === 'left') {\n nextCell -= 1\n if (nextCell < 0) {\n nextRow -= 1\n nextCell = (refs[nextRow]?.length || 1) - 1\n }\n }\n if (direction === 'right') {\n nextCell += 1\n if (nextCell >= (refs[nextRow]?.length || 0)) {\n nextRow += 1\n nextCell = 0\n }\n }\n\n const row = refs[nextRow]\n if (!row) return\n const el = row[nextCell]\n if (el === undefined) return\n if (isFocusable(el)) {\n el!.focus()\n return\n }\n }\n}\n\nfunction keyToDirection(key: string): 'up' | 'down' | 'left' | 'right' | null {\n if (key === 'ArrowUp') return 'up'\n if (key === 'ArrowDown') return 'down'\n if (key === 'ArrowLeft') return 'left'\n if (key === 'ArrowRight') return 'right'\n return null\n}\n\n// A ref callback used on grid cells (Day/PickerControl) to capture the real\n// DOM node into a [row][cell] array - components resolve to their instance\n// proxy (`.$el`), not the DOM node directly.\nfunction setGridRef(\n refs: (HTMLElement | null | undefined)[][],\n rowIndex: number,\n cellIndex: number,\n node: any,\n) {\n if (!refs[rowIndex]) refs[rowIndex] = []\n refs[rowIndex][cellIndex] = node?.$el ?? node ?? undefined\n}\n\nfunction getMonthDays(month: DateStringValue, firstDayOfWeek: number, consistentWeeks = false) {\n const startOfMonth = dayjs(month).startOf('month')\n const start = dayjs(getStartOfWeek(startOfMonth.format('YYYY-MM-DD'), firstDayOfWeek))\n const weeks = consistentWeeks\n ? 6\n : Math.ceil((startOfMonth.daysInMonth() + startOfMonth.day()) / 7)\n\n return Array.from({ length: weeks }, (_, week) =>\n Array.from({ length: 7 }, (__, day) => start.add(week * 7 + day, 'day').format('YYYY-MM-DD')),\n )\n}\n\nfunction isBeforeMin(date: DateStringValue, minDate?: Date | string) {\n const min = normalizeDate(minDate)\n return !!min && dayjs(date).isBefore(min, 'day')\n}\n\nfunction isAfterMax(date: DateStringValue, maxDate?: Date | string) {\n const max = normalizeDate(maxDate)\n return !!max && dayjs(date).isAfter(max, 'day')\n}\n\nfunction formatValue(\n value: DatePickerValueType,\n type: DatePickerType,\n format: string,\n locale?: string,\n labelSeparator = '–',\n valueFormatter?: DateFormatter,\n) {\n if (valueFormatter) {\n return valueFormatter({ type, date: value, locale, format, labelSeparator })\n }\n\n if (type === 'multiple') {\n return Array.isArray(value)\n ? value\n .map((item) =>\n dayjs(item)\n .locale(locale || 'en')\n .format(format),\n )\n .join(', ')\n : ''\n }\n\n if (type === 'range') {\n const [start, end] = Array.isArray(value) ? (value as DatesRangeValue) : [null, null]\n if (!start && !end) return ''\n if (start && !end)\n return `${dayjs(start)\n .locale(locale || 'en')\n .format(format)} ${labelSeparator} `\n if (!start && end)\n return `${labelSeparator} ${dayjs(end)\n .locale(locale || 'en')\n .format(format)}`\n return `${dayjs(start)\n .locale(locale || 'en')\n .format(format)} ${labelSeparator} ${dayjs(end)\n .locale(locale || 'en')\n .format(format)}`\n }\n\n return value\n ? dayjs(value as DateStringValue)\n .locale(locale || 'en')\n .format(format)\n : ''\n}\n\nfunction getMonthLabel(date: DateStringValue, format = 'MMMM YYYY', locale?: string) {\n return dayjs(date)\n .locale(locale || 'en')\n .format(format)\n}\n\nfunction getYearRange(date: DateStringValue) {\n const year = dayjs(date).year()\n const start = year - (year % 10)\n return Array.from({ length: 10 }, (_, index) =>\n dayjs(`${start + index}-01-01`).format('YYYY-MM-DD'),\n )\n}\n\nfunction getDecadeLabel(date: DateStringValue) {\n const years = getYearRange(date)\n return `${dayjs(years[0]).year()} – ${dayjs(years[years.length - 1]).year()}`\n}\n\nexport const Day = defineComponent({\n name: 'Day',\n inheritAttrs: false,\n slots: Object as SlotsType<RenderDaySlots>,\n props: {\n date: { type: String, required: true },\n size: { type: [String, Number], default: 'sm' },\n static: { type: Boolean, default: false },\n weekend: Boolean,\n outside: Boolean,\n selected: Boolean,\n hidden: Boolean,\n inRange: Boolean,\n firstInRange: Boolean,\n lastInRange: Boolean,\n highlightToday: Boolean,\n fullWidth: Boolean,\n disabled: Boolean,\n renderDay: Function as PropType<(date: DateStringValue) => VNodeChild>,\n classNames: { type: [Object, Function], default: undefined },\n styles: { type: [Object, Function], default: undefined },\n unstyled: Boolean,\n },\n setup(props, { attrs, slots }) {\n return () =>\n h(\n UnstyledButton,\n {\n ...attrs,\n component: props.static ? 'div' : 'button',\n class: [classes.day, (attrs as any).class],\n disabled: props.disabled,\n style: [{ display: props.hidden ? 'none' : undefined }, (attrs as any).style],\n 'data-today': dayjs(props.date).isSame(new Date(), 'day') || undefined,\n 'data-hidden': props.hidden || undefined,\n 'data-highlight-today': props.highlightToday || undefined,\n 'data-disabled': props.disabled || undefined,\n 'data-weekend': (!props.disabled && !props.outside && props.weekend) || undefined,\n 'data-outside': (!props.disabled && props.outside) || undefined,\n 'data-selected': (!props.disabled && props.selected) || undefined,\n 'data-in-range': (props.inRange && !props.disabled) || undefined,\n 'data-first-in-range': (props.firstInRange && !props.disabled) || undefined,\n 'data-last-in-range': (props.lastInRange && !props.disabled) || undefined,\n 'data-static': props.static || undefined,\n 'data-full-width': props.fullWidth || undefined,\n },\n () =>\n (props.renderDay\n ? props.renderDay(props.date)\n : (slots.renderDay ?? slots.day)?.({ date: props.date })) || dayjs(props.date).date(),\n )\n },\n})\n\nexport const PickerControl = defineComponent({\n name: 'PickerControl',\n inheritAttrs: false,\n props: {\n selected: Boolean,\n disabled: Boolean,\n inRange: Boolean,\n firstInRange: Boolean,\n lastInRange: Boolean,\n withCellSpacing: { type: Boolean, default: true },\n fullWidth: Boolean,\n },\n setup(props, { attrs, slots }) {\n return () =>\n h(\n UnstyledButton,\n {\n ...attrs,\n class: [classes.pickerControl, (attrs as any).class],\n disabled: props.disabled,\n 'data-selected': (props.selected && !props.disabled) || undefined,\n 'data-disabled': props.disabled || undefined,\n 'data-in-range': (props.inRange && !props.disabled && !props.selected) || undefined,\n 'data-first-in-range': (props.firstInRange && !props.disabled) || undefined,\n 'data-last-in-range': (props.lastInRange && !props.disabled) || undefined,\n 'data-with-cell-spacing': props.withCellSpacing || undefined,\n 'data-full-width': props.fullWidth || undefined,\n },\n () => slots.default?.(),\n )\n },\n})\n\nexport const CalendarHeader = defineComponent({\n name: 'CalendarHeader',\n props: {\n label: { type: String, required: true },\n hasNextLevel: { type: Boolean, default: true },\n withNext: { type: Boolean, default: true },\n withPrevious: { type: Boolean, default: true },\n nextDisabled: Boolean,\n previousDisabled: Boolean,\n nextLabel: { type: String, default: 'Next' },\n previousLabel: { type: String, default: 'Previous' },\n levelControlAriaLabel: String,\n fullWidth: Boolean,\n withNativeLevelSelect: Boolean,\n yearsSelectRange: Array as unknown as PropType<[number, number]>,\n calendarLevel: String as PropType<CalendarLevel>,\n date: [String, Date] as PropType<string | Date>,\n locale: String,\n onDateChange: Function as PropType<(date: DateStringValue) => void>,\n minDate: [String, Date] as PropType<string | Date>,\n maxDate: [String, Date] as PropType<string | Date>,\n disableNativeLevelSelect: Boolean,\n onNext: Function as PropType<() => void>,\n onPrevious: Function as PropType<() => void>,\n onLevelClick: Function as PropType<() => void>,\n },\n setup(props) {\n return () => {\n const previousControl = props.withPrevious\n ? h(\n UnstyledButton,\n {\n class: classes.calendarHeaderControl,\n 'data-direction': 'previous',\n 'aria-label': props.previousLabel,\n onClick: props.onPrevious,\n disabled: props.previousDisabled,\n 'data-disabled': props.previousDisabled || undefined,\n },\n () =>\n h(AccordionChevron, {\n class: classes.calendarHeaderControlIcon,\n 'data-direction': 'previous',\n size: '45%',\n }),\n )\n : null\n\n const displayed = props.date ? dayjs(props.date) : dayjs()\n const currentYear = new Date().getFullYear()\n const rawMinYear =\n props.yearsSelectRange?.[0] ??\n (props.minDate ? dayjs(props.minDate).year() : currentYear - 100)\n const rawMaxYear =\n props.yearsSelectRange?.[1] ??\n (props.maxDate ? dayjs(props.maxDate).year() : currentYear + 50)\n const minYear = Math.min(rawMinYear, rawMaxYear, displayed.year())\n const maxYear = Math.max(rawMinYear, rawMaxYear, displayed.year())\n const updateNativeDate = (next: dayjs.Dayjs) => {\n let result = next\n if (props.minDate && result.isBefore(dayjs(props.minDate), 'day'))\n result = dayjs(props.minDate)\n if (props.maxDate && result.isAfter(dayjs(props.maxDate), 'day'))\n result = dayjs(props.maxDate)\n props.onDateChange?.(result.format('YYYY-MM-DD'))\n }\n const nativeLevelControl =\n props.withNativeLevelSelect &&\n props.date &&\n props.onDateChange &&\n props.calendarLevel !== 'decade'\n ? h(\n 'div',\n {\n class: classes.calendarHeaderLevel,\n 'data-static': true,\n 'data-native-level-select': true,\n },\n [\n props.calendarLevel === 'month'\n ? h(\n 'select',\n {\n class: classes.calendarHeaderSelect,\n 'data-select': 'month',\n disabled: props.disableNativeLevelSelect,\n value: displayed.month(),\n 'aria-label': props.levelControlAriaLabel,\n onChange: (event: Event) =>\n updateNativeDate(\n displayed.month(Number((event.target as HTMLSelectElement).value)),\n ),\n },\n Array.from({ length: 12 }, (_, month) =>\n h(\n 'option',\n { value: month },\n dayjs()\n .locale(props.locale || 'en')\n .month(month)\n .format('MMMM'),\n ),\n ),\n )\n : null,\n h(\n 'select',\n {\n class: classes.calendarHeaderSelect,\n 'data-select': 'year',\n disabled: props.disableNativeLevelSelect,\n value: displayed.year(),\n 'aria-label': props.levelControlAriaLabel,\n onChange: (event: Event) =>\n updateNativeDate(\n displayed.year(Number((event.target as HTMLSelectElement).value)),\n ),\n },\n Array.from({ length: maxYear - minYear + 1 }, (_, index) => {\n const year = minYear + index\n return h('option', { value: year }, year)\n }),\n ),\n ],\n )\n : null\n const levelControl =\n nativeLevelControl ??\n h(\n UnstyledButton,\n {\n component: props.hasNextLevel ? 'button' : 'div',\n class: classes.calendarHeaderLevel,\n onClick: props.hasNextLevel ? props.onLevelClick : undefined,\n disabled: !props.hasNextLevel,\n 'data-static': !props.hasNextLevel || undefined,\n 'aria-label': props.levelControlAriaLabel,\n },\n () => props.label,\n )\n\n const nextControl = props.withNext\n ? h(\n UnstyledButton,\n {\n class: classes.calendarHeaderControl,\n 'data-direction': 'next',\n 'aria-label': props.nextLabel,\n onClick: props.onNext,\n disabled: props.nextDisabled,\n 'data-disabled': props.nextDisabled || undefined,\n },\n () =>\n h(AccordionChevron, {\n class: classes.calendarHeaderControlIcon,\n 'data-direction': 'next',\n size: '45%',\n }),\n )\n : null\n\n return h(\n 'div',\n { class: classes.calendarHeader, 'data-full-width': props.fullWidth || undefined },\n [previousControl, levelControl, nextControl],\n )\n }\n },\n})\n\nexport const WeekdaysRow = defineComponent({\n name: 'WeekdaysRow',\n props: {\n firstDayOfWeek: Number,\n weekendDays: Array as PropType<number[]>,\n locale: String,\n weekdayFormat: {\n type: [String, Function] as PropType<string | ((date: DateStringValue) => string)>,\n default: 'dd',\n },\n withWeekNumbers: Boolean,\n },\n setup(props) {\n const ctx = useDatesContext()\n return () => {\n const first = props.firstDayOfWeek ?? ctx.firstDayOfWeek\n const days = Array.from({ length: 7 }, (_, index) =>\n dayjs('2024-01-07').add((first + index) % 7, 'day'),\n )\n return h('tr', { class: classes.weekdaysRow }, [\n props.withWeekNumbers ? h('th', { class: classes.weekday }) : null,\n ...days.map((date) =>\n h(\n 'th',\n {\n class: classes.weekday,\n 'data-weekend':\n (props.weekendDays ?? ctx.weekendDays).includes(date.day()) || undefined,\n },\n typeof props.weekdayFormat === 'function'\n ? props.weekdayFormat(date.format('YYYY-MM-DD'))\n : date.locale(props.locale || ctx.locale).format(props.weekdayFormat),\n ),\n ),\n ])\n }\n },\n})\n\nexport const Month = defineComponent({\n name: 'Month',\n slots: Object as SlotsType<RenderDaySlots>,\n props: {\n month: { type: String, default: () => dayjs().format('YYYY-MM-DD') },\n value: { type: [String, Array, null] as PropType<DatePickerValueType>, default: null },\n type: { type: String as PropType<DatePickerType>, default: 'default' },\n firstDayOfWeek: Number,\n weekendDays: Array as PropType<number[]>,\n minDate: [String, Date] as PropType<string | Date>,\n maxDate: [String, Date] as PropType<string | Date>,\n excludeDate: Function as PropType<(date: DateStringValue) => boolean>,\n renderDay: Function as PropType<(date: DateStringValue) => VNodeChild>,\n hideOutsideDates: Boolean,\n hideWeekdays: Boolean,\n getDayProps: Function as PropType<(date: DateStringValue) => Record<string, any>>,\n getDayAriaLabel: Function as PropType<(date: DateStringValue) => string>,\n onDayClick: Function as PropType<(date: DateStringValue) => void>,\n onDayMouseEnter: Function as PropType<(date: DateStringValue) => void>,\n withCellSpacing: { type: Boolean, default: true },\n highlightToday: Boolean,\n withWeekNumbers: Boolean,\n static: Boolean,\n fullWidth: Boolean,\n },\n setup(props, { slots }) {\n const ctx = useDatesContext()\n const hovered = ref<string | null>(null)\n\n const dayRefs: (HTMLElement | null | undefined)[][] = []\n\n const isSelected = (date: DateStringValue) => {\n if (props.type === 'multiple') return Array.isArray(props.value) && props.value.includes(date)\n if (props.type === 'range') {\n const [start, end] = Array.isArray(props.value)\n ? (props.value as DatesRangeValue)\n : [null, null]\n return isSameDate(date, start) || isSameDate(date, end)\n }\n return isSameDate(date, props.value as DateValue)\n }\n\n const isInRange = (date: DateStringValue) => {\n if (props.type !== 'range' || !Array.isArray(props.value)) return false\n const [start, end] = props.value as DatesRangeValue\n const rangeEnd = end || hovered.value\n if (!start || !rangeEnd) return false\n return dayjs(date).isAfter(start, 'day') && dayjs(date).isBefore(rangeEnd, 'day')\n }\n\n return () => {\n const first = props.firstDayOfWeek ?? ctx.firstDayOfWeek\n const rows = getMonthDays(props.month, first, ctx.consistentWeeks)\n\n // Only one day in the whole grid is in the tab order (roving tabindex) -\n // prefer the selected date, then today, then the first enabled date.\n const flatDates = rows.flat()\n const isEnabled = (date: DateStringValue) => {\n const outside = !dayjs(date).isSame(props.month, 'month')\n const disabled =\n isBeforeMin(date, props.minDate) ||\n isAfterMax(date, props.maxDate) ||\n props.excludeDate?.(date) ||\n props.getDayProps?.(date)?.disabled\n return !disabled && (!props.hideOutsideDates || !outside)\n }\n const enabledDates = flatDates.filter(isEnabled)\n const dateInTabOrder =\n enabledDates.find((date) => isSelected(date)) ??\n enabledDates.find((date) => dayjs().isSame(date, 'date')) ??\n enabledDates[0]\n\n return h('table', { class: classes.month, 'data-full-width': props.fullWidth || undefined }, [\n props.hideWeekdays\n ? null\n : h('thead', [\n h(WeekdaysRow, {\n firstDayOfWeek: first,\n weekendDays: props.weekendDays,\n withWeekNumbers: props.withWeekNumbers,\n }),\n ]),\n h(\n 'tbody',\n rows.map((week, rowIndex) =>\n h('tr', { class: classes.monthRow }, [\n props.withWeekNumbers\n ? h('td', { class: classes.weekNumber }, getWeekNumber(week[0]))\n : null,\n ...week.map((date, cellIndex) => {\n const outside = !dayjs(date).isSame(props.month, 'month')\n const disabled =\n isBeforeMin(date, props.minDate) ||\n isAfterMax(date, props.maxDate) ||\n props.excludeDate?.(date)\n const dayProps = props.getDayProps?.(date) || {}\n const selected = isSelected(date)\n const [start, end] =\n props.type === 'range' && Array.isArray(props.value)\n ? (props.value as DatesRangeValue)\n : [null, null]\n\n return h(\n 'td',\n {\n class: classes.monthCell,\n 'data-with-spacing': props.withCellSpacing || undefined,\n },\n [\n h(Day, {\n ...dayProps,\n date,\n static: props.static,\n disabled: disabled || dayProps.disabled,\n weekend: (props.weekendDays ?? ctx.weekendDays).includes(dayjs(date).day()),\n outside,\n hidden: props.hideOutsideDates && outside,\n selected,\n inRange: isInRange(date),\n firstInRange: isSameDate(date, start),\n lastInRange: isSameDate(date, end),\n highlightToday: props.highlightToday,\n fullWidth: props.fullWidth,\n renderDay:\n props.renderDay ??\n ((slots.renderDay ?? slots.day)\n ? (date: DateStringValue) => (slots.renderDay ?? slots.day)?.({ date })\n : undefined),\n 'aria-label': props.getDayAriaLabel?.(date),\n tabindex: props.static ? undefined : date === dateInTabOrder ? 0 : -1,\n // Lets a focus-trapped Popover (e.g. DatePickerInput's\n // dropdown) land directly on the selected date instead\n // of the first tabbable element.\n 'data-autofocus': selected || undefined,\n ref: (node: any) => setGridRef(dayRefs, rowIndex, cellIndex, node),\n onClick: (event: MouseEvent) => {\n dayProps.onClick?.(event)\n if (!disabled && !props.static) props.onDayClick?.(date)\n },\n onMouseenter: (event: MouseEvent) => {\n hovered.value = date\n dayProps.onMouseenter?.(event)\n props.onDayMouseEnter?.(date)\n },\n onKeydown: (event: KeyboardEvent) => {\n dayProps.onKeydown?.(event)\n const direction = keyToDirection(event.key)\n if (direction) {\n event.preventDefault()\n focusAdjacentControl(dayRefs, rowIndex, cellIndex, direction)\n }\n },\n }),\n ],\n )\n }),\n ]),\n ),\n ),\n ])\n }\n },\n})\n\nexport const MonthsList = defineComponent({\n name: 'MonthsList',\n props: {\n year: { type: String, default: () => dayjs().format('YYYY-MM-DD') },\n value: [String, Array, null] as PropType<DatePickerValueType>,\n minDate: [String, Date] as PropType<string | Date>,\n maxDate: [String, Date] as PropType<string | Date>,\n locale: String,\n monthsListFormat: {\n type: [String, Function] as PropType<string | ((date: DateStringValue) => string)>,\n default: 'MMM',\n },\n getMonthControlProps: Function as PropType<(date: DateStringValue) => Record<string, any>>,\n onMonthSelect: Function as PropType<(date: DateStringValue) => void>,\n onMonthMouseEnter: Function as PropType<(date: DateStringValue) => void>,\n fullWidth: Boolean,\n },\n setup(props) {\n const controlRefs: (HTMLElement | null | undefined)[][] = []\n return () => {\n const months = Array.from({ length: 12 }, (_, index) =>\n dayjs(props.year).month(index).startOf('month').format('YYYY-MM-DD'),\n )\n const isEnabled = (date: DateStringValue) =>\n !(\n (props.minDate && dayjs(date).endOf('month').isBefore(props.minDate, 'day')) ||\n (props.maxDate && dayjs(date).startOf('month').isAfter(props.maxDate, 'day')) ||\n props.getMonthControlProps?.(date)?.disabled\n )\n const isSelected = (date: DateStringValue) =>\n Array.isArray(props.value)\n ? (props.value as DateStringValue[]).some((item) => dayjs(item).isSame(date, 'month'))\n : !!props.value && dayjs(props.value as any).isSame(date, 'month')\n const enabledMonths = months.filter(isEnabled)\n const monthInTabOrder =\n enabledMonths.find(isSelected) ??\n enabledMonths.find((date) => dayjs().isSame(date, 'month')) ??\n enabledMonths[0]\n\n return h(\n SimpleGrid,\n {\n cols: 3,\n spacing: 4,\n class: classes.controlsGrid,\n 'data-full-width': props.fullWidth || undefined,\n },\n () =>\n months.map((date, index) => {\n const rowIndex = Math.floor(index / 3)\n const cellIndex = index % 3\n const disabled = !isEnabled(date)\n const controlProps = props.getMonthControlProps?.(date) || {}\n return h(\n PickerControl,\n {\n fullWidth: props.fullWidth,\n ...controlProps,\n disabled: disabled || controlProps.disabled,\n selected: isSelected(date),\n tabindex: date === monthInTabOrder ? 0 : -1,\n 'data-autofocus': isSelected(date) || undefined,\n ref: (node: any) => setGridRef(controlRefs, rowIndex, cellIndex, node),\n onClick: (event: MouseEvent) => {\n controlProps.onClick?.(event)\n if (!disabled) props.onMonthSelect?.(date)\n },\n onMouseenter: (event: MouseEvent) => {\n controlProps.onMouseenter?.(event)\n props.onMonthMouseEnter?.(date)\n },\n onKeydown: (event: KeyboardEvent) => {\n controlProps.onKeydown?.(event)\n const direction = keyToDirection(event.key)\n if (direction) {\n event.preventDefault()\n focusAdjacentControl(controlRefs, rowIndex, cellIndex, direction)\n }\n },\n },\n () =>\n typeof props.monthsListFormat === 'function'\n ? props.monthsListFormat(date)\n : dayjs(date)\n .locale(props.locale || 'en')\n .format(props.monthsListFormat),\n )\n }),\n )\n }\n },\n})\n\nexport const YearsList = defineComponent({\n name: 'YearsList',\n props: {\n decade: { type: String, default: () => dayjs().format('YYYY-MM-DD') },\n value: [String, Array, null] as PropType<DatePickerValueType>,\n minDate: [String, Date] as PropType<string | Date>,\n maxDate: [String, Date] as PropType<string | Date>,\n yearsListFormat: {\n type: [String, Function] as PropType<string | ((date: DateStringValue) => string)>,\n default: 'YYYY',\n },\n getYearControlProps: Function as PropType<(date: DateStringValue) => Record<string, any>>,\n onYearSelect: Function as PropType<(date: DateStringValue) => void>,\n onYearMouseEnter: Function as PropType<(date: DateStringValue) => void>,\n fullWidth: Boolean,\n },\n setup(props) {\n const controlRefs: (HTMLElement | null | undefined)[][] = []\n return () => {\n const years = getYearRange(props.decade)\n const isEnabled = (date: DateStringValue) =>\n !(\n (props.minDate && dayjs(date).endOf('year').isBefore(props.minDate, 'day')) ||\n (props.maxDate && dayjs(date).startOf('year').isAfter(props.maxDate, 'day')) ||\n props.getYearControlProps?.(date)?.disabled\n )\n const isSelected = (date: DateStringValue) =>\n Array.isArray(props.value)\n ? (props.value as DateStringValue[]).some((item) => dayjs(item).isSame(date, 'year'))\n : !!props.value && dayjs(props.value as any).isSame(date, 'year')\n const enabledYears = years.filter(isEnabled)\n const yearInTabOrder =\n enabledYears.find(isSelected) ??\n enabledYears.find((date) => dayjs().isSame(date, 'year')) ??\n enabledYears[0]\n\n return h(\n SimpleGrid,\n {\n cols: 3,\n spacing: 4,\n class: classes.controlsGrid,\n 'data-full-width': props.fullWidth || undefined,\n },\n () =>\n years.map((date, index) => {\n const rowIndex = Math.floor(index / 3)\n const cellIndex = index % 3\n const disabled = !isEnabled(date)\n const controlProps = props.getYearControlProps?.(date) || {}\n return h(\n PickerControl,\n {\n fullWidth: props.fullWidth,\n ...controlProps,\n disabled: disabled || controlProps.disabled,\n selected: isSelected(date),\n tabindex: date === yearInTabOrder ? 0 : -1,\n 'data-autofocus': isSelected(date) || undefined,\n ref: (node: any) => setGridRef(controlRefs, rowIndex, cellIndex, node),\n onClick: (event: MouseEvent) => {\n controlProps.onClick?.(event)\n if (!disabled) props.onYearSelect?.(date)\n },\n onMouseenter: (event: MouseEvent) => {\n controlProps.onMouseenter?.(event)\n props.onYearMouseEnter?.(date)\n },\n onKeydown: (event: KeyboardEvent) => {\n controlProps.onKeydown?.(event)\n const direction = keyToDirection(event.key)\n if (direction) {\n event.preventDefault()\n focusAdjacentControl(controlRefs, rowIndex, cellIndex, direction)\n }\n },\n },\n () =>\n typeof props.yearsListFormat === 'function'\n ? props.yearsListFormat(date)\n : dayjs(date).format(props.yearsListFormat),\n )\n }),\n )\n }\n },\n})\n\nfunction getNextLevel(level: CalendarLevel, direction: 'up' | 'down'): CalendarLevel {\n const order: CalendarLevel[] = ['month', 'year', 'decade']\n return order[\n Math.max(0, Math.min(order.length - 1, order.indexOf(level) + (direction === 'up' ? 1 : -1)))\n ]\n}\n\nfunction clampLevel(\n level: CalendarLevel | undefined,\n minLevel: CalendarLevel | undefined,\n maxLevel: CalendarLevel | undefined,\n): CalendarLevel {\n const order: CalendarLevel[] = ['month', 'year', 'decade']\n const toNumber = (value: CalendarLevel | undefined, fallback: number) =>\n value ? order.indexOf(value) : fallback\n const clamped = Math.max(\n toNumber(minLevel, 0),\n Math.min(toNumber(maxLevel, 2), toNumber(level, 0)),\n )\n return order[clamped]\n}\n\nexport const Calendar = defineComponent({\n name: 'Calendar',\n slots: Object as SlotsType<RenderDaySlots>,\n props: {\n defaultLevel: String as PropType<CalendarLevel>,\n level: String as PropType<CalendarLevel>,\n onLevelChange: Function as PropType<(level: CalendarLevel) => void>,\n maxLevel: { type: String as PropType<CalendarLevel>, default: 'decade' },\n minLevel: { type: String as PropType<CalendarLevel>, default: 'month' },\n defaultDate: [String, Date] as PropType<string | Date>,\n date: [String, Date] as PropType<string | Date>,\n onDateChange: Function as PropType<(date: DateStringValue) => void>,\n numberOfColumns: { type: Number, default: 1 },\n columnsToScroll: Number,\n type: { type: String as PropType<DatePickerType>, default: 'default' },\n value: [String, Array, null] as PropType<DatePickerValueType>,\n minDate: [String, Date] as PropType<string | Date>,\n maxDate: [String, Date] as PropType<string | Date>,\n locale: String,\n firstDayOfWeek: Number,\n weekendDays: Array as PropType<number[]>,\n renderDay: Function as PropType<(date: DateStringValue) => VNodeChild>,\n getDayProps: Function as PropType<(date: DateStringValue) => Record<string, any>>,\n getDayAriaLabel: Function as PropType<(date: DateStringValue) => string>,\n getMonthControlProps: Function as PropType<(date: DateStringValue) => Record<string, any>>,\n getYearControlProps: Function as PropType<(date: DateStringValue) => Record<string, any>>,\n excludeDate: Function as PropType<(date: DateStringValue) => boolean>,\n hideOutsideDates: Boolean,\n hideWeekdays: Boolean,\n monthLabelFormat: {\n type: [String, Function] as PropType<string | ((date: DateStringValue) => string)>,\n default: 'MMMM YYYY',\n },\n yearLabelFormat: {\n type: [String, Function] as PropType<string | ((date: DateStringValue) => string)>,\n default: 'YYYY',\n },\n decadeLabelFormat: Function as PropType<\n (start: DateStringValue, end: DateStringValue) => string\n >,\n monthsListFormat: {\n type: [String, Function] as PropType<string | ((date: DateStringValue) => string)>,\n default: 'MMM',\n },\n yearsListFormat: {\n type: [String, Function] as PropType<string | ((date: DateStringValue) => string)>,\n default: 'YYYY',\n },\n onYearSelect: Function as PropType<(date: DateStringValue) => void>,\n onMonthSelect: Function as PropType<(date: DateStringValue) => void>,\n onMonthMouseEnter: Function as PropType<(date: DateStringValue) => void>,\n onYearMouseEnter: Function as PropType<(date: DateStringValue) => void>,\n onDayClick: Function as PropType<(date: DateStringValue) => void>,\n withCellSpacing: { type: Boolean, default: true },\n highlightToday: Boolean,\n withWeekNumbers: Boolean,\n static: Boolean,\n fullWidth: Boolean,\n withNativeLevelSelect: Boolean,\n yearsSelectRange: Array as unknown as PropType<[number, number]>,\n },\n setup(props, { attrs, slots }) {\n const [_level, setLevel] = useUncontrolled<CalendarLevel>({\n value: computed(() =>\n props.level === undefined\n ? undefined\n : clampLevel(props.level, props.minLevel, props.maxLevel),\n ),\n defaultValue:\n props.defaultLevel === undefined\n ? undefined\n : clampLevel(props.defaultLevel, props.minLevel, props.maxLevel),\n finalValue: clampLevel(undefined, props.minLevel, props.maxLevel),\n onChange: (value) => props.onLevelChange?.(value),\n })\n const [_date, setDate] = useUncontrolled<DateStringValue>({\n value: computed(() => normalizeDate(props.date) || undefined),\n defaultValue: normalizeDate(props.defaultDate) || undefined,\n finalValue: getDefaultClampedDate({ minDate: props.minDate, maxDate: props.maxDate }),\n onChange: (value) => props.onDateChange?.(value),\n })\n\n const scroll = props.columnsToScroll || props.numberOfColumns || 1\n const updateDate = (amount: number, unit: 'month' | 'year') => {\n setDate(dayjs(_date.value).add(amount, unit).format('YYYY-MM-DD'))\n }\n\n return () =>\n h(\n Box,\n {\n ...attrs,\n class: [classes.calendar, (attrs as any).class],\n 'data-calendar': true,\n 'data-full-width': props.fullWidth || undefined,\n },\n () =>\n Array.from({ length: props.numberOfColumns || 1 }, (_, column) => {\n const currentDate = dayjs(_date.value)\n .add(\n column * scroll,\n _level.value === 'month' ? 'month' : _level.value === 'year' ? 'year' : 'year',\n )\n .format('YYYY-MM-DD')\n if (_level.value === 'month') {\n return h('div', { class: classes.calendarLevel }, [\n h(CalendarHeader, {\n label:\n typeof props.monthLabelFormat === 'function'\n ? props.monthLabelFormat(currentDate)\n : getMonthLabel(currentDate, props.monthLabelFormat, props.locale),\n hasNextLevel: props.maxLevel !== 'month',\n withPrevious: column === 0,\n withNext: column === (props.numberOfColumns || 1) - 1,\n fullWidth: props.fullWidth,\n withNativeLevelSelect: props.withNativeLevelSelect,\n yearsSelectRange: props.yearsSelectRange,\n calendarLevel: 'month',\n date: currentDate,\n locale: props.locale,\n onDateChange: setDate,\n minDate: props.minDate,\n maxDate: props.maxDate,\n disableNativeLevelSelect: props.date !== undefined && !props.onDateChange,\n onPrevious: () => updateDate(-scroll, 'month'),\n onNext: () => updateDate(scroll, 'month'),\n onLevelClick: () => setLevel(getNextLevel(_level.value, 'up')),\n }),\n h(Month, {\n month: currentDate,\n value: props.value,\n type: props.type,\n minDate: props.minDate,\n maxDate: props.maxDate,\n firstDayOfWeek: props.firstDayOfWeek,\n weekendDays: props.weekendDays,\n renderDay:\n props.renderDay ??\n ((slots.renderDay ?? slots.day)\n ? (date: DateStringValue) => (slots.renderDay ?? slots.day)?.({ date })\n : undefined),\n getDayProps: props.getDayProps,\n getDayAriaLabel: props.getDayAriaLabel,\n excludeDate: props.excludeDate,\n hideOutsideDates: props.hideOutsideDates,\n hideWeekdays: props.hideWeekdays,\n withCellSpacing: props.withCellSpacing,\n highlightToday: props.highlightToday,\n withWeekNumbers: props.withWeekNumbers,\n static: props.static,\n fullWidth: props.fullWidth,\n onDayClick: props.onDayClick,\n }),\n ])\n }\n\n if (_level.value === 'year') {\n return h('div', { class: classes.calendarLevel }, [\n h(CalendarHeader, {\n label:\n typeof props.yearLabelFormat === 'function'\n ? props.yearLabelFormat(currentDate)\n : dayjs(currentDate).format(props.yearLabelFormat),\n hasNextLevel: props.maxLevel === 'decade',\n withPrevious: column === 0,\n withNext: column === (props.numberOfColumns || 1) - 1,\n fullWidth: props.fullWidth,\n withNativeLevelSelect: props.withNativeLevelSelect,\n yearsSelectRange: props.yearsSelectRange,\n calendarLevel: 'year',\n date: currentDate,\n locale: props.locale,\n onDateChange: setDate,\n minDate: props.minDate,\n maxDate: props.maxDate,\n disableNativeLevelSelect: props.date !== undefined && !props.onDateChange,\n onPrevious: () => updateDate(-scroll, 'year'),\n onNext: () => updateDate(scroll, 'year'),\n onLevelClick: () => setLevel(getNextLevel(_level.value, 'up')),\n }),\n h(MonthsList, {\n year: currentDate,\n value: props.value,\n minDate: props.minDate,\n maxDate: props.maxDate,\n monthsListFormat: props.monthsListFormat,\n getMonthControlProps: props.getMonthControlProps,\n fullWidth: props.fullWidth,\n onMonthMouseEnter: props.onMonthMouseEnter,\n onMonthSelect: (date: DateStringValue) => {\n setDate(date)\n props.onMonthSelect?.(date)\n // Clamp instead of forcing 'month': for MonthPicker\n // (minLevel: 'year') this keeps the view at 'year'\n // instead of incorrectly drilling into a day grid.\n setLevel(clampLevel('month', props.minLevel, props.maxLevel))\n },\n }),\n ])\n }\n\n const years = getYearRange(currentDate)\n return h('div', { class: classes.calendarLevel }, [\n h(CalendarHeader, {\n label: props.decadeLabelFormat\n ? props.decadeLabelFormat(years[0], years[years.length - 1])\n : getDecadeLabel(currentDate),\n withPrevious: column === 0,\n withNext: column === (props.numberOfColumns || 1) - 1,\n hasNextLevel: false,\n fullWidth: props.fullWidth,\n onPrevious: () => updateDate(-10 * scroll, 'year'),\n onNext: () => updateDate(10 * scroll, 'year'),\n }),\n h(YearsList, {\n decade: currentDate,\n value: props.value,\n minDate: props.minDate,\n maxDate: props.maxDate,\n yearsListFormat: props.yearsListFormat,\n getYearControlProps: props.getYearControlProps,\n fullWidth: props.fullWidth,\n onYearMouseEnter: props.onYearMouseEnter,\n onYearSelect: (date: DateStringValue) => {\n setDate(date)\n props.onYearSelect?.(date)\n // Clamp instead of forcing 'year': for YearPicker\n // (minLevel: 'decade') this keeps the view at 'decade'\n // instead of incorrectly drilling into the months grid.\n setLevel(clampLevel('year', props.minLevel, props.maxLevel))\n },\n }),\n ])\n }),\n )\n },\n})\n\nexport const MonthLevel = Calendar\nexport const YearLevel = Calendar\nexport const DecadeLevel = Calendar\nexport const MonthLevelGroup = Calendar\nexport const YearLevelGroup = Calendar\nexport const DecadeLevelGroup = Calendar\nexport const LevelsGroup = Calendar\n\n// Granularity-aware range check for month/year range hover-previews, where\n// day-level ms precision doesn't apply - sorts the range endpoints then checks\n// date falls within [min, max] inclusive at the given unit.\nfunction isInRangeGranular(\n date: DateStringValue,\n range: [DateStringValue, DateStringValue],\n unit: 'month' | 'year',\n) {\n const sorted = [...range].sort((a, b) => (dayjs(a).isAfter(dayjs(b)) ? 1 : -1))\n return !dayjs(date).isBefore(sorted[0], unit) && !dayjs(date).isAfter(sorted[1], unit)\n}\n\nfunction getNextPickerValue(\n value: DatePickerValueType,\n date: DateStringValue,\n type: DatePickerType,\n sortDates = true,\n) {\n if (type === 'multiple') {\n const next = Array.isArray(value) ? [...(value as DateStringValue[])] : []\n const index = next.findIndex((item) => isSameDate(item, date))\n if (index >= 0) next.splice(index, 1)\n else next.push(date)\n return sortDates ? next.sort((a, b) => dayjs(a).valueOf() - dayjs(b).valueOf()) : next\n }\n\n if (type === 'range') {\n const [start, end] = Array.isArray(value) ? (value as DatesRangeValue) : [null, null]\n if (!start || (start && end) || dayjs(date).isBefore(start, 'day')) {\n return [date, null] as DatesRangeValue\n }\n return [start, date] as DatesRangeValue\n }\n\n return date\n}\n\nexport const DatePicker = defineComponent({\n name: 'DatePicker',\n slots: Object as SlotsType<RenderDaySlots>,\n props: {\n type: { type: String as PropType<DatePickerType>, default: 'default' },\n value: [String, Array, null] as PropType<DatePickerValueType>,\n defaultValue: [String, Array, null] as PropType<DatePickerValueType>,\n onChange: Function as PropType<(value: DatePickerValueType) => void>,\n allowDeselect: { type: Boolean, default: true },\n sortDates: { type: Boolean, default: true },\n presets: Array as PropType<Array<{ value: DatePickerValueType; label: string }>>,\n withNativeLevelSelect: Boolean,\n yearsSelectRange: Array as unknown as PropType<[number, number]>,\n },\n setup(props, { attrs, slots }) {\n const finalValue = computed<DatePickerValueType>(() =>\n props.type === 'multiple' ? [] : props.type === 'range' ? [null, null] : null,\n )\n const [_value, setValue] = useUncontrolled<DatePickerValueType>({\n value: computed(() => props.value),\n defaultValue: props.defaultValue,\n finalValue: finalValue.value,\n onChange: (value) => props.onChange?.(value),\n })\n const selectDate = (date: DateStringValue) => {\n if (\n props.type === 'default' &&\n props.allowDeselect &&\n isSameDate(_value.value as DateValue, date)\n ) {\n setValue(null)\n } else {\n setValue(getNextPickerValue(_value.value, date, props.type, props.sortDates))\n }\n }\n\n // When presets are used, selecting one must also jump the Calendar's\n // displayed date/level to the preset's month. Calendar's onDateChange/\n // onLevelChange mirror its internal navigation back into these refs even\n // while `date`/`level` stay undefined (uncontrolled) - useUncontrolled\n // always invokes onChange regardless of controlled state - so passing\n // them through is a no-op until a preset click gives them a real value.\n const calendarDate = ref<DateStringValue | undefined>(undefined)\n const calendarLevel = ref<CalendarLevel | undefined>(undefined)\n const selectPreset = (value: DatePickerValueType) => {\n const date = Array.isArray(value) ? value[0] : value\n if (date != null) {\n calendarDate.value = date\n calendarLevel.value = 'month'\n }\n setValue(value)\n }\n\n return () => {\n const calendar = h(\n Calendar,\n {\n ...attrs,\n type: props.type,\n value: _value.value,\n date: calendarDate.value,\n onDateChange: (date: DateStringValue) => (calendarDate.value = date),\n level: calendarLevel.value,\n onLevelChange: (level: CalendarLevel) => (calendarLevel.value = level),\n withNativeLevelSelect: props.withNativeLevelSelect,\n yearsSelectRange: props.yearsSelectRange,\n onDayClick: selectDate,\n },\n {\n renderDay: slots.renderDay,\n day: slots.day,\n },\n )\n\n if (!props.presets?.length) return calendar\n\n return h('div', { class: classes.datePickerRoot }, [\n h(\n 'div',\n { class: classes.presetsList },\n props.presets.map((preset, index) =>\n h(\n UnstyledButton,\n {\n key: index,\n class: classes.presetButton,\n onClick: () => selectPreset(preset.value),\n onMousedown: (event: MouseEvent) => event.preventDefault(),\n },\n () => preset.label,\n ),\n ),\n ),\n calendar,\n ])\n }\n },\n})\n\n// YearPicker/MonthPicker used to be thin wrappers around DatePicker with\n// just a different minLevel/defaultLevel. That doesn't work: DatePicker only\n// ever wires Calendar's `onDayClick` to update its value, but with\n// minLevel=\"year\"/\"decade\" the day grid is never reached at all - selection\n// happens via Calendar's onMonthSelect/onYearSelect instead, which DatePicker\n// never listens to. The value was therefore never updated, so nothing ever\n// appeared selected. These are real, separate implementations now, each\n// wiring the selection callback that actually fires at their level.\nexport const YearPicker = defineComponent({\n name: 'YearPicker',\n props: {\n type: { type: String as PropType<DatePickerType>, default: 'default' },\n value: [String, Array, null] as PropType<DatePickerValueType>,\n defaultValue: [String, Array, null] as PropType<DatePickerValueType>,\n onChange: Function as PropType<(value: DatePickerValueType) => void>,\n allowDeselect: { type: Boolean, default: true },\n sortDates: { type: Boolean, default: true },\n presets: Array as PropType<Array<{ value: DatePickerValueType; label: string }>>,\n onYearSelect: Function as PropType<(date: DateStringValue) => void>,\n withNativeLevelSelect: Boolean,\n yearsSelectRange: Array as unknown as PropType<[number, number]>,\n },\n setup(props, { attrs }) {\n const finalValue = computed<DatePickerValueType>(() =>\n props.type === 'multiple' ? [] : props.type === 'range' ? [null, null] : null,\n )\n const [_value, setValue] = useUncontrolled<DatePickerValueType>({\n value: computed(() => props.value),\n defaultValue: props.defaultValue,\n finalValue: finalValue.value,\n onChange: (value) => props.onChange?.(value),\n })\n const hoveredDate = ref<DateStringValue | null>(null)\n const selectYear = (date: DateStringValue) => {\n if (\n props.type === 'default' &&\n props.allowDeselect &&\n isSameDate(_value.value as DateValue, date)\n ) {\n setValue(null)\n } else {\n setValue(getNextPickerValue(_value.value, date, props.type, props.sortDates))\n }\n hoveredDate.value = null\n props.onYearSelect?.(date)\n }\n // For type=\"range\", PickerControl needs inRange/firstInRange/lastInRange\n // (not just `selected`) to draw the connecting highlight between the\n // start and end year. While only the start of the range is picked,\n // hovering over other years previews the highlight up to the hovered year.\n const yearControlProps = (date: DateStringValue) => {\n const external = (attrs as any).getYearControlProps?.(date) || {}\n if (props.type !== 'range' || !Array.isArray(_value.value)) return external\n const [start, end] = _value.value as DatesRangeValue\n const hovered = start && !end ? hoveredDate.value : null\n const inRange =\n start && hovered\n ? isInRangeGranular(date, [hovered, start], 'year')\n : start && end\n ? isInRangeGranular(date, [start, end], 'year')\n : false\n const firstInRange = start\n ? dayjs(date).isSame(start, 'year') && !(hovered && dayjs(hovered).isBefore(start, 'year'))\n : false\n const lastInRange = end\n ? dayjs(date).isSame(end, 'year')\n : !!(\n start &&\n hovered &&\n dayjs(hovered).isBefore(start, 'year') &&\n dayjs(date).isSame(start, 'year')\n )\n return {\n inRange,\n firstInRange,\n lastInRange,\n ...external,\n }\n }\n const calendarDate = ref<DateStringValue | undefined>(undefined)\n const selectPreset = (value: DatePickerValueType) => {\n const date = Array.isArray(value) ? value[0] : value\n if (date != null) calendarDate.value = date\n setValue(value)\n }\n\n return () => {\n const calendar = h(Calendar, {\n ...attrs,\n type: props.type,\n value: _value.value,\n date: calendarDate.value,\n onDateChange: (date: DateStringValue) => (calendarDate.value = date),\n defaultLevel: 'decade',\n minLevel: 'decade',\n withNativeLevelSelect: props.withNativeLevelSelect,\n yearsSelectRange: props.yearsSelectRange,\n onYearSelect: selectYear,\n getYearControlProps: yearControlProps,\n onYearMouseEnter: (date: DateStringValue) => {\n const [start, end] = Array.isArray(_value.value)\n ? (_value.value as DatesRangeValue)\n : [null, null]\n if (props.type === 'range' && start && !end) hoveredDate.value = date\n },\n onMouseleave: () => {\n hoveredDate.value = null\n },\n })\n\n if (!props.presets?.length) return calendar\n\n return h('div', { class: classes.datePickerRoot }, [\n h(\n 'div',\n { class: classes.presetsList },\n props.presets.map((preset, index) =>\n h(\n UnstyledButton,\n {\n key: index,\n class: classes.presetButton,\n onClick: () => selectPreset(preset.value),\n onMousedown: (event: MouseEvent) => event.preventDefault(),\n },\n () => preset.label,\n ),\n ),\n ),\n calendar,\n ])\n }\n },\n})\n\nexport const MonthPicker = defineComponent({\n name: 'MonthPicker',\n props: {\n type: { type: String as PropType<DatePickerType>, default: 'default' },\n value: [String, Array, null] as PropType<DatePickerValueType>,\n defaultValue: [String, Array, null] as PropType<DatePickerValueType>,\n onChange: Function as PropType<(value: DatePickerValueType) => void>,\n allowDeselect: { type: Boolean, default: true },\n sortDates: { type: Boolean, default: true },\n presets: Array as PropType<Array<{ value: DatePickerValueType; label: string }>>,\n onMonthSelect: Function as PropType<(date: DateStringValue) => void>,\n withNativeLevelSelect: Boolean,\n yearsSelectRange: Array as unknown as PropType<[number, number]>,\n },\n setup(props, { attrs }) {\n const finalValue = computed<DatePickerValueType>(() =>\n props.type === 'multiple' ? [] : props.type === 'range' ? [null, null] : null,\n )\n const [_value, setValue] = useUncontrolled<DatePickerValueType>({\n value: computed(() => props.value),\n defaultValue: props.defaultValue,\n finalValue: finalValue.value,\n onChange: (value) => props.onChange?.(value),\n })\n const hoveredDate = ref<DateStringValue | null>(null)\n const selectMonth = (date: DateStringValue) => {\n if (\n props.type === 'default' &&\n props.allowDeselect &&\n isSameDate(_value.value as DateValue, date)\n ) {\n setValue(null)\n } else {\n setValue(getNextPickerValue(_value.value, date, props.type, props.sortDates))\n }\n hoveredDate.value = null\n props.onMonthSelect?.(date)\n }\n // For type=\"range\", PickerControl needs inRange/firstInRange/lastInRange\n // (not just `selected`) to draw the connecting highlight between the\n // start and end month. While only the start of the range is picked,\n // hovering over other months previews the highlight up to the hovered month.\n const monthControlProps = (date: DateStringValue) => {\n const external = (attrs as any).getMonthControlProps?.(date) || {}\n if (props.type !== 'range' || !Array.isArray(_value.value)) return external\n const [start, end] = _value.value as DatesRangeValue\n const hovered = start && !end ? hoveredDate.value : null\n const inRange =\n start && hovered\n ? isInRangeGranular(date, [hovered, start], 'month')\n : start && end\n ? isInRangeGranular(date, [start, end], 'month')\n : false\n const firstInRange = start\n ? dayjs(date).isSame(start, 'month') &&\n !(hovered && dayjs(hovered).isBefore(start, 'month'))\n : false\n const lastInRange = end\n ? dayjs(date).isSame(end, 'month')\n : !!(\n start &&\n hovered &&\n dayjs(hovered).isBefore(start, 'month') &&\n dayjs(date).isSame(start, 'month')\n )\n return {\n inRange,\n firstInRange,\n lastInRange,\n ...external,\n }\n }\n const calendarDate = ref<DateStringValue | undefined>(undefined)\n const selectPreset = (value: DatePickerValueType) => {\n const date = Array.isArray(value) ? value[0] : value\n if (date != null) calendarDate.value = date\n setValue(value)\n }\n\n return () => {\n const calendar = h(Calendar, {\n ...attrs,\n type: props.type,\n value: _value.value,\n date: calendarDate.value,\n onDateChange: (date: DateStringValue) => (calendarDate.value = date),\n defaultLevel: 'year',\n minLevel: 'year',\n withNativeLevelSelect: props.withNativeLevelSelect,\n yearsSelectRange: props.yearsSelectRange,\n onMonthSelect: selectMonth,\n getMonthControlProps: monthControlProps,\n onMonthMouseEnter: (date: DateStringValue) => {\n const [start, end] = Array.isArray(_value.value)\n ? (_value.value as DatesRangeValue)\n : [null, null]\n if (props.type === 'range' && start && !end) hoveredDate.value = date\n },\n onMouseleave: () => {\n hoveredDate.value = null\n },\n })\n\n if (!props.presets?.length) return calendar\n\n return h('div', { class: classes.datePickerRoot }, [\n h(\n 'div',\n { class: classes.presetsList },\n props.presets.map((preset, index) =>\n h(\n UnstyledButton,\n {\n key: index,\n class: classes.presetButton,\n onClick: () => selectPreset(preset.value),\n onMousedown: (event: MouseEvent) => event.preventDefault(),\n },\n () => preset.label,\n ),\n ),\n ),\n calendar,\n ])\n }\n },\n})\n\nexport const PickerInputBase = defineComponent({\n name: 'PickerInputBase',\n props: {\n formattedValue: { type: String, default: '' },\n dropdownOpened: Boolean,\n dropdownType: { type: String as PropType<'popover' | 'modal'>, default: 'popover' },\n label: [String, Number, Object, Function] as PropType<any>,\n placeholder: String,\n clearable: Boolean,\n disabled: Boolean,\n required: Boolean,\n error: [String, Boolean] as PropType<any>,\n size: { type: [String, Number], default: 'sm' },\n variant: String as PropType<'default' | 'filled' | 'unstyled'>,\n onClear: Function as PropType<() => void>,\n onDropdownClose: Function as PropType<() => void>,\n onDropdownOpen: Function as PropType<() => void>,\n },\n emits: ['click'],\n inheritAttrs: false,\n setup(props, { slots, emit, attrs }) {\n const opened = ref(props.dropdownOpened)\n watch(\n () => props.dropdownOpened,\n (value) => {\n opened.value = value\n },\n )\n const close = () => {\n opened.value = false\n props.onDropdownClose?.()\n }\n const open = () => {\n if (!props.disabled) {\n opened.value = true\n props.onDropdownOpen?.()\n }\n }\n\n const target = () =>\n h(\n InputBase,\n {\n ...attrs,\n component: 'button',\n type: 'button',\n label: props.label,\n placeholder: props.placeholder,\n disabled: props.disabled,\n required: props.required,\n error: props.error,\n pointer: true,\n size: props.size,\n variant: props.variant,\n rightSection:\n props.clearable && props.formattedValue\n ? h(CloseButton, {\n size: props.size,\n onMousedown: (event: MouseEvent) => event.stopPropagation(),\n onClick: (event: MouseEvent) => {\n event.stopPropagation()\n props.onClear?.()\n },\n })\n : undefined,\n // A manually-supplied rightSection defaults to pointer-events:none\n // (it's normally just a decorative icon), so the clear button would\n // render but never receive clicks unless we explicitly re-enable\n // pointer events for it here.\n rightSectionPointerEvents: props.clearable && props.formattedValue ? 'all' : undefined,\n onClick: (event: MouseEvent) => {\n emit('click', event)\n open()\n },\n },\n () =>\n props.formattedValue\n ? h('span', props.formattedValue)\n : h('span', { class: classes.placeholder }, props.placeholder),\n )\n\n return () =>\n props.dropdownType === 'modal'\n ? h(Box, null, () => [\n target(),\n h(\n Modal,\n { opened: opened.value, onClose: close, title: props.label, size: 'auto' },\n () => slots.default?.({ close }),\n ),\n ])\n : h(\n Popover,\n {\n opened: opened.value,\n onChange: (value: boolean) => (value ? open() : close()),\n position: 'bottom-start',\n trapFocus: true,\n returnFocus: false,\n },\n () => [\n h(Popover.Target, null, target),\n h(Popover.Dropdown, { class: classes.dropdown }, () => slots.default?.({ close })),\n ],\n )\n },\n})\n\nfunction createPickerInput(\n name: string,\n Picker: any,\n defaultLevel?: CalendarLevel,\n defaultValueFormat: string = 'MMMM D, YYYY',\n) {\n return defineComponent({\n name,\n props: {\n type: { type: String as PropType<DatePickerType>, default: 'default' },\n value: [String, Array, null] as PropType<DatePickerValueType>,\n defaultValue: [String, Array, null] as PropType<DatePickerValueType>,\n onChange: Function as PropType<(value: DatePickerValueType) => void>,\n valueFormat: { type: String, default: defaultValueFormat },\n labelSeparator: { type: String, default: '–' },\n locale: String,\n placeholder: String,\n label: [String, Number, Object, Function] as PropType<any>,\n clearable: Boolean,\n closeOnChange: { type: Boolean, default: true },\n sortDates: { type: Boolean, default: true },\n valueFormatter: Function as PropType<DateFormatter>,\n withNativeLevelSelect: Boolean,\n yearsSelectRange: Array as unknown as PropType<[number, number]>,\n },\n setup(props, { attrs }) {\n const finalValue = computed<DatePickerValueType>(() =>\n props.type === 'multiple' ? [] : props.type === 'range' ? [null, null] : null,\n )\n const [_value, setValue] = useUncontrolled<DatePickerValueType>({\n value: computed(() => props.value),\n defaultValue: props.defaultValue,\n finalValue: finalValue.value,\n onChange: (value) => props.onChange?.(value),\n })\n const opened = ref(false)\n const formattedValue = computed(() =>\n formatValue(\n _value.value,\n props.type,\n props.valueFormat,\n props.locale,\n props.labelSeparator,\n props.valueFormatter,\n ),\n )\n return () =>\n h(\n PickerInputBase,\n {\n ...attrs,\n formattedValue: formattedValue.value,\n dropdownOpened: opened.value,\n label: props.label,\n placeholder: props.placeholder,\n clearable: props.clearable,\n onDropdownOpen: () => (opened.value = true),\n onDropdownClose: () => (opened.value = false),\n onClear: () => setValue(finalValue.value),\n },\n {\n default: ({ close }: any) =>\n h(Picker, {\n ...attrs,\n type: props.type,\n value: _value.value,\n sortDates: props.sortDates,\n defaultLevel,\n locale: props.locale,\n withNativeLevelSelect: props.withNativeLevelSelect,\n yearsSelectRange: props.yearsSelectRange,\n onChange: (value: DatePickerValueType) => {\n setValue(value)\n if (props.closeOnChange && props.type === 'default') close()\n },\n }),\n },\n )\n },\n })\n}\n\nexport const DatePickerInput = createPickerInput('DatePickerInput', DatePicker)\nexport const MonthPickerInput = createPickerInput(\n 'MonthPickerInput',\n MonthPicker,\n 'year',\n 'MMMM YYYY',\n)\nexport const YearPickerInput = createPickerInput('YearPickerInput', YearPicker, 'decade', 'YYYY')\n\nexport const HiddenDatesInput = defineComponent({\n name: 'HiddenDatesInput',\n props: {\n name: String,\n value: [String, Array, null] as PropType<DatePickerValueType>,\n },\n setup(props) {\n return () => {\n const value = Array.isArray(props.value)\n ? props.value.filter(Boolean).join(',')\n : props.value || ''\n return h('input', { type: 'hidden', name: props.name, value })\n }\n },\n})\n\nexport function dateStringParser(value: string, format = 'MMMM D, YYYY', locale?: string) {\n return dayjs(value, format, locale || 'en', true).format('YYYY-MM-DD')\n}\n\nexport function isDateValid({\n date,\n minDate,\n maxDate,\n}: {\n date: string\n minDate?: string | Date\n maxDate?: string | Date\n}) {\n const parsed = dayjs(date)\n return (\n parsed.isValid() &&\n !isBeforeMin(parsed.format('YYYY-MM-DD'), minDate) &&\n !isAfterMax(parsed.format('YYYY-MM-DD'), maxDate)\n )\n}\n\nexport const DateInput = defineComponent({\n name: 'DateInput',\n inheritAttrs: false,\n props: {\n value: [String, Date, null] as PropType<string | Date | null>,\n defaultValue: [String, Date, null] as PropType<string | Date | null>,\n onChange: Function as PropType<(value: DateValue) => void>,\n valueFormat: { type: String, default: 'MMMM D, YYYY' },\n dateParser: Function as PropType<(value: string) => DateStringValue | null>,\n locale: String,\n clearable: Boolean,\n minDate: [String, Date] as PropType<string | Date>,\n maxDate: [String, Date] as PropType<string | Date>,\n presets: Array as PropType<Array<{ value: DateValue; label: string }>>,\n },\n // A free-text input that also opens a Calendar dropdown (in a Popover,\n // same as DatePickerInput) on focus/click, so users can either type a\n // date or pick it from the calendar.\n setup(props, { attrs }) {\n const [_value, setValue] = useUncontrolled<DateValue>({\n // normalizeDate() coerces a missing prop to `null`, but useUncontrolled\n // relies on strict `undefined` to detect \"no value prop passed\" (i.e.\n // uncontrolled usage). Coercing to null here made the component always\n // look controlled-with-null, so setValue() never actually updated\n // anything without an external value/onChange binding.\n value: computed(() => (props.value === undefined ? undefined : normalizeDate(props.value))),\n defaultValue: normalizeDate(props.defaultValue),\n finalValue: null,\n onChange: (value) => props.onChange?.(value),\n })\n const formatValue = (value: DateValue) =>\n value\n ? dayjs(value)\n .locale(props.locale || 'en')\n .format(props.valueFormat)\n : ''\n const inputValue = ref(formatValue(_value.value))\n const opened = ref(false)\n watch(_value, (value) => {\n if (!opened.value) inputValue.value = formatValue(value)\n })\n const parseInput = (raw: string): DateStringValue | null => {\n const parsed =\n props.dateParser?.(raw) || dateStringParser(raw, props.valueFormat, props.locale)\n return dayjs(parsed).isValid() &&\n isDateValid({ date: parsed, minDate: props.minDate, maxDate: props.maxDate })\n ? parsed\n : null\n }\n const commit = () => {\n opened.value = false\n if (!inputValue.value.trim()) {\n if (props.clearable) setValue(null)\n else inputValue.value = formatValue(_value.value)\n return\n }\n const parsed = parseInput(inputValue.value)\n if (parsed) {\n setValue(parsed)\n } else {\n // Invalid input reverts to the last known valid value on blur.\n inputValue.value = formatValue(_value.value)\n }\n }\n const selectDay = (date: DateStringValue) => {\n setValue(date)\n inputValue.value = formatValue(date)\n opened.value = false\n }\n return () =>\n h(Box, null, () =>\n h(\n Popover,\n {\n opened: opened.value,\n onChange: (v: boolean) => (opened.value = v),\n position: 'bottom-start',\n },\n () => [\n h(Popover.Target, null, () =>\n h(InputBase, {\n ...attrs,\n value: inputValue.value,\n onInput: (event: Event) =>\n (inputValue.value = (event.target as HTMLInputElement).value),\n onFocus: () => (opened.value = true),\n onClick: () => (opened.value = true),\n onBlur: commit,\n onKeydown: (event: KeyboardEvent) => {\n if (event.key === 'Escape') opened.value = false\n },\n rightSection:\n props.clearable && _value.value\n ? h(CloseButton, {\n onMousedown: (event: MouseEvent) => event.stopPropagation(),\n onClick: (event: MouseEvent) => {\n event.stopPropagation()\n inputValue.value = ''\n setValue(null)\n },\n })\n : undefined,\n // Without this, the rightSection div defaults to\n // pointer-events:none (it's normally a decorative icon),\n // so the clear button would render but never be clickable.\n rightSectionPointerEvents: props.clearable && _value.value ? 'all' : undefined,\n }),\n ),\n h(\n Popover.Dropdown,\n { onMousedown: (event: MouseEvent) => event.preventDefault() },\n () => [\n props.presets?.length\n ? h(Group, { gap: 4, mb: 4 }, () =>\n props.presets?.map((preset, index) =>\n h(\n Button,\n {\n key: index,\n size: 'xs',\n variant: 'light',\n onClick: () => selectDay(preset.value as DateStringValue),\n },\n () => preset.label,\n ),\n ),\n )\n : null,\n h(Calendar, {\n defaultDate: _value.value || undefined,\n minDate: props.minDate,\n maxDate: props.maxDate,\n locale: props.locale,\n getDayProps: (date: DateStringValue) => ({\n selected: isSameDate(date, _value.value),\n onClick: () => selectDay(date),\n }),\n }),\n ],\n ),\n ],\n ),\n )\n },\n})\n\nfunction splitTimeString(value = '') {\n const [time = '', period] = value.split(' ')\n const [hours = '00', minutes = '00', seconds = '00'] = time.split(':')\n return { hours, minutes, seconds, period }\n}\n\nexport function padTime(value: number | string) {\n return String(value).padStart(2, '0')\n}\n\nexport interface TimePickerAmPmLabels {\n am: string\n pm: string\n}\n\nconst defaultAmPmLabels: TimePickerAmPmLabels = { am: 'AM', pm: 'PM' }\n\nexport function getParsedTime({\n time,\n format,\n amPmLabels = defaultAmPmLabels,\n}: {\n time: string\n format: '12h' | '24h'\n amPmLabels?: TimePickerAmPmLabels\n}): { hours: number | null; minutes: number | null; seconds: number | null; amPm: string | null } {\n if (!time) return { hours: null, minutes: null, seconds: null, amPm: null }\n const { hours, minutes, seconds } = splitTimeString(time)\n const h24 = Number(hours)\n const m = Number(minutes)\n const s = Number(seconds)\n if (format === '12h') {\n const amPm = h24 >= 12 ? amPmLabels.pm : amPmLabels.am\n const hour12 = h24 % 12 === 0 ? 12 : h24 % 12\n return { hours: hour12, minutes: m, seconds: s, amPm }\n }\n return { hours: h24, minutes: m, seconds: s, amPm: null }\n}\n\nexport function getTimeString({\n hours,\n minutes,\n seconds,\n format = '24h',\n withSeconds = false,\n amPm = null,\n amPmLabels = defaultAmPmLabels,\n}: {\n hours: number | null\n minutes: number | null\n seconds?: number | null\n format?: '12h' | '24h'\n withSeconds?: boolean\n amPm?: string | null\n amPmLabels?: TimePickerAmPmLabels\n}): { valid: boolean; value: string } {\n if (hours === null || minutes === null) return { valid: false, value: '' }\n if (withSeconds && (seconds === null || seconds === undefined)) return { valid: false, value: '' }\n\n if (format === '24h') {\n return {\n valid: true,\n value: `${padTime(hours)}:${padTime(minutes)}${withSeconds ? `:${padTime(seconds || 0)}` : ''}`,\n }\n }\n\n if (amPm === null) return { valid: false, value: '' }\n let h24 = hours\n if (amPm === amPmLabels.pm && hours !== 12) h24 += 12\n else if (amPm === amPmLabels.am && hours === 12) h24 = 0\n return {\n valid: true,\n value: `${padTime(h24)}:${padTime(minutes)}${withSeconds ? `:${padTime(seconds || 0)}` : ''}`,\n }\n}\n\nexport function timeToSeconds(value: string) {\n const { hours, minutes, seconds } = splitTimeString(value)\n return Number(hours) * 3600 + Number(minutes) * 60 + Number(seconds || 0)\n}\n\nexport function isSameTime(a?: string, b?: string) {\n return !!a && !!b && timeToSeconds(a) === timeToSeconds(b)\n}\n\nexport function compareTime(a: string, b: string) {\n return timeToSeconds(a) - timeToSeconds(b)\n}\n\nexport function clampTime(value: string, min?: string, max?: string) {\n if (min && compareTime(value, min) < 0) return min\n if (max && compareTime(value, max) > 0) return max\n return value\n}\n\nexport function getTimeRange(start: string, end: string, step = 60) {\n const result: string[] = []\n for (let current = timeToSeconds(start); current <= timeToSeconds(end); current += step) {\n const hours = Math.floor(current / 3600)\n const minutes = Math.floor((current % 3600) / 60)\n result.push(`${padTime(hours)}:${padTime(minutes)}`)\n }\n return result\n}\n\nexport const TimeInput = defineComponent({\n name: 'TimeInput',\n props: {\n withSeconds: Boolean,\n value: String,\n defaultValue: String,\n onChange: Function as PropType<(event: Event) => void>,\n },\n setup(props, { attrs }) {\n return () =>\n h(InputBase, {\n ...attrs,\n type: 'time',\n step: props.withSeconds ? 1 : 60,\n value: props.value,\n defaultValue: props.defaultValue,\n onChange: props.onChange,\n })\n },\n})\n\n// TimeGrid renders its own TimeGridControl (a bordered/pill-shaped\n// default-variant button) rather than reusing PickerControl (which is styled\n// for square date-picker day/month/year cells).\nexport const TimeGrid = defineComponent({\n name: 'TimeGrid',\n props: {\n data: { type: Array as PropType<string[]>, default: () => [] },\n value: String,\n defaultValue: String,\n minTime: String,\n maxTime: String,\n allowDeselect: Boolean,\n disabled: Boolean,\n onChange: Function as PropType<(value: string | null) => void>,\n getControlProps: Function as PropType<(value: string) => Record<string, any>>,\n },\n setup(props, { attrs }) {\n const [_value, setValue] = useUncontrolled<string | null>({\n value: computed(() => props.value),\n defaultValue: props.defaultValue,\n finalValue: null,\n onChange: (value) => props.onChange?.(value),\n })\n return () =>\n h(Box, { ...attrs, class: [classes.timeGridRoot, (attrs as any).class] }, () =>\n h(SimpleGrid, { cols: 3, spacing: 'xs', class: classes.timeGrid }, () =>\n props.data.map((item) => {\n const isDisabled =\n props.disabled ||\n (props.minTime && compareTime(item, props.minTime) < 0) ||\n (props.maxTime && compareTime(item, props.maxTime) > 0)\n const controlProps = props.getControlProps?.(item) || {}\n const active = isSameTime(_value.value ?? undefined, item)\n return h(\n UnstyledButton,\n {\n ...controlProps,\n class: [classes.timeGridControl, controlProps.class],\n disabled: isDisabled || controlProps.disabled,\n 'data-active': active || undefined,\n 'data-disabled': isDisabled || controlProps.disabled || undefined,\n onClick: (event: MouseEvent) => {\n controlProps.onClick?.(event)\n if (isDisabled) return\n const nextValue = props.allowDeselect && active ? null : item\n if (nextValue !== _value.value) setValue(nextValue)\n },\n },\n () => item,\n )\n }),\n ),\n )\n },\n})\n\n// Real Mantine's SpinInput is a distinct component from TimeInput: a bare\n// numeric text field with digit-typing, arrow-key increment/decrement, and\n// auto-advance to the next field once enough digits are typed. It powers\n// each hour/minute/second segment inside TimePicker.\nexport const SpinInput = defineComponent({\n name: 'SpinInput',\n inheritAttrs: false,\n props: {\n value: { type: Number as PropType<number | null>, default: null },\n min: { type: Number, required: true },\n max: { type: Number, required: true },\n onChange: Function as PropType<(value: number | null) => void>,\n step: { type: Number, default: 1 },\n onNextInput: Function as PropType<() => void>,\n onPreviousInput: Function as PropType<() => void>,\n allowTemporaryZero: Boolean,\n placeholder: { type: String, default: '--' },\n disableAutoAdvance: Boolean,\n disabled: Boolean,\n readOnly: Boolean,\n },\n setup(props, { attrs }) {\n const finiteMax = () => Number.isFinite(props.max)\n const maxDigit = () => (finiteMax() ? Number(props.max.toFixed(0)[0]) : Infinity)\n const arrowsMax = () => props.max + 1 - props.step\n\n const handleChange = (raw: string) => {\n if (props.readOnly) return\n const clearValue = raw.replace(/\\D/g, '')\n if (clearValue === '') return\n let parsedValue = 0\n for (let i = 0; i < clearValue.length; i += 1) {\n const digit = clearValue.charCodeAt(i) - 48\n const next = parsedValue * 10 + digit\n parsedValue = finiteMax() && next > props.max ? digit : next\n }\n const clampedValue =\n props.allowTemporaryZero && parsedValue === 0 && props.min > 0\n ? 0\n : finiteMax()\n ? Math.min(Math.max(parsedValue, props.min), props.max)\n : Math.max(parsedValue, props.min)\n props.onChange?.(clampedValue)\n if (!props.disableAutoAdvance && (clampedValue > maxDigit() || raw.startsWith('00'))) {\n props.onNextInput?.()\n }\n }\n\n const handleKeydown = (event: KeyboardEvent) => {\n if (props.readOnly) return\n if (event.key === '0' || event.key === 'Num0') {\n const target = event.currentTarget as HTMLInputElement\n const { selectionStart, selectionEnd, value: inputValue } = target\n const isEntireValueSelected =\n inputValue.length > 0 && selectionStart === 0 && selectionEnd === inputValue.length\n if (props.value === 0 && !isEntireValueSelected) {\n event.preventDefault()\n props.onNextInput?.()\n }\n }\n if (event.key === 'Home') {\n event.preventDefault()\n props.onChange?.(props.min)\n }\n if (event.key === 'End') {\n event.preventDefault()\n if (finiteMax()) props.onChange?.(props.max)\n }\n if (event.key === 'Backspace' || event.key === 'Delete') {\n event.preventDefault()\n if (props.value !== null) props.onChange?.(null)\n else props.onPreviousInput?.()\n }\n if (event.key === 'ArrowRight') {\n event.preventDefault()\n props.onNextInput?.()\n }\n if (event.key === 'ArrowLeft') {\n event.preventDefault()\n props.onPreviousInput?.()\n }\n if (event.key === 'ArrowUp') {\n event.preventDefault()\n const newValue =\n props.value === null\n ? props.min\n : finiteMax()\n ? Math.min(Math.max(props.value + props.step, props.min), arrowsMax())\n : Math.max(props.value + props.step, props.min)\n props.onChange?.(newValue)\n }\n if (event.key === 'ArrowDown') {\n event.preventDefault()\n const newValue =\n props.value === null\n ? finiteMax()\n ? arrowsMax()\n : props.min\n : Math.min(Math.max(props.value - props.step, props.min), arrowsMax())\n props.onChange?.(newValue)\n }\n }\n\n return () =>\n h('input', {\n ...attrs,\n type: 'text',\n role: 'spinbutton',\n 'aria-valuemin': props.min,\n 'aria-valuemax': finiteMax() ? props.max : undefined,\n 'aria-valuenow': props.value === null ? 0 : props.value,\n 'data-empty': props.value === null || undefined,\n inputmode: 'numeric',\n placeholder: props.placeholder,\n disabled: props.disabled,\n readonly: props.readOnly,\n value: props.value === null ? '' : padTime(props.value),\n onInput: (event: Event) => handleChange((event.target as HTMLInputElement).value),\n onKeydown: handleKeydown,\n onFocus: (event: FocusEvent) => (event.target as HTMLInputElement).select(),\n onClick: (event: MouseEvent) => {\n event.stopPropagation()\n ;(event.target as HTMLInputElement).select()\n },\n onMousedown: (event: MouseEvent) => event.stopPropagation(),\n })\n },\n})\n\nexport const AmPmInput = defineComponent({\n name: 'AmPmInput',\n props: {\n value: { type: String as PropType<string | null>, default: null },\n labels: { type: Object as PropType<TimePickerAmPmLabels>, default: () => defaultAmPmLabels },\n onChange: Function as PropType<(value: string) => void>,\n disabled: Boolean,\n readOnly: Boolean,\n },\n setup(props, { attrs }) {\n return () =>\n h(\n 'select',\n {\n ...attrs,\n class: classes.timePickerField,\n 'data-am-pm': true,\n disabled: props.disabled,\n value: props.value ?? props.labels.am,\n onChange: (event: Event) => props.onChange?.((event.target as HTMLSelectElement).value),\n },\n [\n h('option', { value: props.labels.am }, props.labels.am),\n h('option', { value: props.labels.pm }, props.labels.pm),\n ],\n )\n },\n})\n\nexport const TimeControlsList = defineComponent({\n name: 'TimeControlsList',\n props: {\n min: { type: Number, required: true },\n max: { type: Number, required: true },\n step: { type: Number, default: 1 },\n value: { type: Number as PropType<number | null>, default: null },\n onSelect: Function as PropType<(value: number) => void>,\n formatValue: Function as PropType<(value: number) => string>,\n },\n setup(props) {\n return () =>\n h(ScrollArea, { h: 200 }, () =>\n h(\n 'div',\n { class: classes.timePickerControlsList },\n Array.from(\n { length: Math.floor((props.max - props.min) / props.step) + 1 },\n (_, index) => props.min + index * props.step,\n ).map((item) =>\n h(\n UnstyledButton,\n {\n key: item,\n class: classes.timePickerControl,\n 'data-active': item === props.value || undefined,\n onClick: () => props.onSelect?.(item),\n },\n () => (props.formatValue ? props.formatValue(item) : padTime(item)),\n ),\n ),\n ),\n )\n },\n})\n\nexport const TimePicker = defineComponent({\n name: 'TimePicker',\n props: {\n value: String,\n defaultValue: String,\n onChange: Function as PropType<(value: string) => void>,\n type: { type: String as PropType<'time' | 'duration'>, default: 'time' },\n withSeconds: Boolean,\n min: String,\n max: String,\n format: { type: String as PropType<'12h' | '24h'>, default: '24h' },\n amPmLabels: {\n type: Object as PropType<TimePickerAmPmLabels>,\n default: () => defaultAmPmLabels,\n },\n hoursStep: { type: Number, default: 1 },\n minutesStep: { type: Number, default: 1 },\n secondsStep: { type: Number, default: 1 },\n clearable: Boolean,\n withDropdown: Boolean,\n disabled: Boolean,\n readOnly: Boolean,\n size: { type: [String, Number], default: 'sm' },\n presets: Array as PropType<Array<{ value: string; label: string }>>,\n closeDropdownOnPresetSelect: Boolean,\n // A ref object supplied by the parent (e.g. DateTimePicker) that gets\n // populated with the actual hours <input> DOM node, so the parent can\n // call .focus() on it directly to auto-focus the time input after a\n // date is picked.\n hoursRef: Object as PropType<{ value: any }>,\n },\n setup(props, { attrs }) {\n const effectiveFormat = computed<'12h' | '24h'>(() =>\n props.type === 'duration' ? '24h' : props.format,\n )\n const [_value, setValue] = useUncontrolled<string>({\n value: computed(() => props.value),\n defaultValue: props.defaultValue,\n finalValue: '',\n onChange: (value) => props.onChange?.(value),\n })\n\n const parsed = computed(() =>\n getParsedTime({\n time: _value.value,\n format: effectiveFormat.value,\n amPmLabels: props.amPmLabels,\n }),\n )\n const hours = ref(parsed.value.hours)\n const minutes = ref(parsed.value.minutes)\n const seconds = ref(parsed.value.seconds)\n const amPm = ref(parsed.value.amPm)\n watch(_value, (value) => {\n const next = getParsedTime({\n time: value,\n format: effectiveFormat.value,\n amPmLabels: props.amPmLabels,\n })\n hours.value = next.hours\n minutes.value = next.minutes\n seconds.value = next.seconds\n amPm.value = next.amPm\n })\n\n // Refs to the SpinInput/AmPmInput component instances (not raw DOM\n // nodes) - see focusRef() below for how these are used to call .focus().\n const hoursRef = ref<any>()\n const minutesRef = ref<any>()\n const secondsRef = ref<any>()\n const amPmRef = ref<any>()\n // SpinInput/AmPmInput are components, so their `ref` resolves to the\n // component instance rather than the underlying DOM node - fall back to\n // `.$el` (or use the value directly if it's already an element, e.g. a\n // plain DOM ref) to actually call .focus() on the input.\n const focusRef = (target: any) => {\n const el = target?.$el ?? target\n el?.focus?.()\n }\n const focus = (field: 'hours' | 'minutes' | 'seconds' | 'amPm') => {\n focusRef(\n (field === 'hours'\n ? hoursRef\n : field === 'minutes'\n ? minutesRef\n : field === 'seconds'\n ? secondsRef\n : amPmRef\n ).value,\n )\n }\n watch(\n hoursRef,\n (val) => {\n // hoursRef is a ref-forwarding prop: the parent passes a ref object\n // whose `.value` we populate with the resolved element, mirroring\n // how minutesRef/secondsRef/amPmRef forward focus targets elsewhere.\n // eslint-disable-next-line vue/no-mutating-props\n if (props.hoursRef) props.hoursRef.value = val?.$el ?? val\n },\n { immediate: true },\n )\n\n const commit = () => {\n const result = getTimeString({\n hours: hours.value,\n minutes: minutes.value,\n seconds: seconds.value,\n format: effectiveFormat.value,\n withSeconds: props.withSeconds,\n amPm: amPm.value,\n amPmLabels: props.amPmLabels,\n })\n setValue(result.valid ? result.value : '')\n }\n\n const setHours = (value: number | null) => {\n let adjusted = value\n if (effectiveFormat.value === '12h' && typeof value === 'number' && value > 12) {\n adjusted = ((value - 1) % 12) + 1\n }\n hours.value = adjusted\n commit()\n focus('hours')\n }\n const setMinutes = (value: number | null) => {\n minutes.value = value\n commit()\n focus('minutes')\n }\n const setSeconds = (value: number | null) => {\n seconds.value = value\n commit()\n focus('seconds')\n }\n const setAmPm = (value: string | null) => {\n amPm.value = value\n commit()\n focus('amPm')\n }\n const clear = () => {\n hours.value = null\n minutes.value = null\n seconds.value = null\n amPm.value = null\n setValue('')\n focus('hours')\n }\n\n const isClearable = computed(\n () =>\n props.clearable &&\n !props.readOnly &&\n !props.disabled &&\n (hours.value !== null ||\n minutes.value !== null ||\n seconds.value !== null ||\n amPm.value !== null),\n )\n\n const opened = ref(false)\n\n const handlePresetSelect = (timeString: string) => {\n setValue(timeString)\n if (props.closeDropdownOnPresetSelect) {\n opened.value = false\n }\n }\n\n const handlePaste = (event: ClipboardEvent) => {\n if (props.readOnly || props.disabled) return\n const value = event.clipboardData?.getData('text').trim()\n if (!value || !/^\\d+:\\d{2}(?::\\d{2})?(?:\\s+[aApP][mM])?$/.test(value)) return\n const next = getParsedTime({\n time: value,\n format: effectiveFormat.value,\n amPmLabels: props.amPmLabels,\n })\n if (\n next.hours === null ||\n next.minutes === null ||\n next.minutes > 59 ||\n (props.withSeconds && (next.seconds === null || next.seconds > 59)) ||\n (props.type === 'time' && effectiveFormat.value === '24h' && next.hours > 23)\n )\n return\n event.preventDefault()\n hours.value = next.hours\n minutes.value = next.minutes\n seconds.value = props.withSeconds ? next.seconds : null\n amPm.value = next.amPm\n const result = getTimeString({\n ...next,\n seconds: props.withSeconds ? next.seconds : null,\n format: effectiveFormat.value,\n withSeconds: props.withSeconds,\n amPmLabels: props.amPmLabels,\n })\n if (result.valid) setValue(clampTime(result.value, props.min, props.max))\n }\n\n return () =>\n h(\n Popover,\n {\n opened: props.type !== 'duration' && props.withDropdown && opened.value,\n position: 'bottom-start',\n transitionProps: { duration: 0 },\n },\n () => [\n h(Popover.Target, null, () =>\n h(\n InputBase,\n {\n ...attrs,\n component: 'div',\n size: props.size,\n disabled: props.disabled,\n onClick: () => {\n focus('hours')\n if (props.type !== 'duration' && props.withDropdown) opened.value = true\n },\n onMousedown: (event: MouseEvent) => event.preventDefault(),\n onFocusin: () => {\n if (props.type !== 'duration' && props.withDropdown) opened.value = true\n },\n onFocusout: () => {\n if (props.withDropdown) opened.value = false\n },\n rightSection: isClearable.value\n ? h(CloseButton, {\n size: props.size,\n onMousedown: (event: MouseEvent) => event.preventDefault(),\n onClick: clear,\n })\n : undefined,\n rightSectionPointerEvents: isClearable.value ? 'all' : undefined,\n },\n () => [\n h('div', { class: classes.timePickerFieldsRoot, dir: 'ltr' }, [\n h('div', { class: classes.timePickerFieldsGroup }, [\n h(SpinInput, {\n ref: hoursRef,\n class: classes.timePickerField,\n value: hours.value,\n min: effectiveFormat.value === '12h' ? 1 : 0,\n max:\n props.type === 'duration'\n ? Infinity\n : effectiveFormat.value === '12h'\n ? 12\n : 23,\n step: props.hoursStep,\n onChange: setHours,\n onNextInput: () => focus('minutes'),\n allowTemporaryZero: effectiveFormat.value === '12h',\n disableAutoAdvance: props.type === 'duration',\n onPaste: handlePaste,\n readOnly: props.readOnly,\n disabled: props.disabled,\n placeholder: '--',\n }),\n h('span', ':'),\n h(SpinInput, {\n ref: minutesRef,\n class: classes.timePickerField,\n value: minutes.value,\n min: 0,\n max: 59,\n step: props.minutesStep,\n onChange: setMinutes,\n onPreviousInput: () => focus('hours'),\n onNextInput: () => focus(props.withSeconds ? 'seconds' : 'amPm'),\n readOnly: props.readOnly,\n disabled: props.disabled,\n placeholder: '--',\n }),\n props.withSeconds ? h('span', ':') : null,\n props.withSeconds\n ? h(SpinInput, {\n ref: secondsRef,\n class: classes.timePickerField,\n value: seconds.value,\n min: 0,\n max: 59,\n step: props.secondsStep,\n onChange: setSeconds,\n onPreviousInput: () => focus('minutes'),\n onNextInput: () => focus('amPm'),\n readOnly: props.readOnly,\n disabled: props.disabled,\n placeholder: '--',\n })\n : null,\n effectiveFormat.value === '12h'\n ? h(AmPmInput, {\n ref: amPmRef,\n value: amPm.value,\n labels: props.amPmLabels,\n onChange: setAmPm,\n readOnly: props.readOnly,\n disabled: props.disabled,\n })\n : null,\n ]),\n ]),\n ],\n ),\n ),\n h(\n Popover.Dropdown,\n {\n class: classes.timePickerDropdown,\n onMousedown: (event: MouseEvent) => event.preventDefault(),\n },\n () => [\n props.presets?.length\n ? h(Group, { gap: 4, class: classes.timePickerPresetsGroup }, () =>\n props.presets?.map((preset) =>\n h(\n Button,\n {\n size: 'xs',\n variant: 'light',\n onClick: () => handlePresetSelect(preset.value),\n },\n () => preset.label,\n ),\n ),\n )\n : h('div', { class: classes.timePickerControlsListGroup }, [\n h(TimeControlsList, {\n min: effectiveFormat.value === '12h' ? 1 : 0,\n max: effectiveFormat.value === '12h' ? 12 : 23,\n step: props.hoursStep,\n value: hours.value,\n onSelect: setHours,\n }),\n h(TimeControlsList, {\n min: 0,\n max: 59,\n step: props.minutesStep,\n value: minutes.value,\n onSelect: setMinutes,\n }),\n props.withSeconds\n ? h(TimeControlsList, {\n min: 0,\n max: 59,\n step: props.secondsStep,\n value: seconds.value,\n onSelect: setSeconds,\n })\n : null,\n ]),\n ],\n ),\n ],\n )\n },\n})\n\nexport const TimeValue = defineComponent({\n name: 'TimeValue',\n props: {\n value: { type: [String, Date] as PropType<string | Date>, required: true },\n format: { type: String, default: 'HH:mm' },\n locale: String,\n },\n setup(props, { attrs }) {\n return () =>\n h(Text, attrs, () =>\n (props.value instanceof Date ? dayjs(props.value) : dayjs(`2024-01-01 ${props.value}`))\n .locale(props.locale || 'en')\n .format(props.format),\n )\n },\n})\n\nexport const DateTimePicker = defineComponent({\n name: 'DateTimePicker',\n props: {\n value: [String, Date, null] as PropType<string | Date | null>,\n defaultValue: [String, Date, null] as PropType<string | Date | null>,\n onChange: Function as PropType<(value: Date | null) => void>,\n valueFormat: { type: String, default: 'MMMM D, YYYY h:mm A' },\n clearable: Boolean,\n withSeconds: Boolean,\n size: { type: [String, Number], default: 'sm' },\n submitButtonProps: Object as PropType<Record<string, any>>,\n },\n setup(props, { attrs }) {\n // Populated with the actual hours <input> DOM node once TimePicker\n // mounts (see TimePicker's hoursRef prop) so we can auto-focus it right\n // after a date is picked from the calendar.\n const hoursRef = ref<any>()\n const [_value, setValue] = useUncontrolled<Date | null>({\n // Must stay `undefined` (not coerced to null) when props.value isn't\n // passed at all - useUncontrolled uses strict undefined-checking to\n // decide whether the component is controlled. Coercing a missing prop\n // to null made this component permanently \"controlled with null\",\n // so picking a date/time in the dropdown never updated anything\n // without an external value/onChange binding - the picker looked\n // completely broken/inert.\n value: computed(() =>\n props.value === undefined ? undefined : props.value === null ? null : new Date(props.value),\n ),\n defaultValue: props.defaultValue ? new Date(props.defaultValue) : null,\n finalValue: null,\n onChange: (value) => props.onChange?.(value),\n })\n const date = computed(() => (_value.value ? dayjs(_value.value).format('YYYY-MM-DD') : null))\n const time = computed(() =>\n _value.value ? dayjs(_value.value).format(props.withSeconds ? 'HH:mm:ss' : 'HH:mm') : '',\n )\n const updateDate = (nextDate: DatePickerValueType) => {\n if (!nextDate || Array.isArray(nextDate)) return\n setValue(assignTime(nextDate, `2024-01-01 ${time.value || '00:00'}`))\n // As soon as a date is picked, move focus straight to the time input's\n // hours field.\n hoursRef.value?.focus?.()\n }\n const updateTime = (nextTime: string) => {\n if (date.value) setValue(assignTime(date.value, `2024-01-01 ${nextTime}`))\n }\n return () =>\n h(\n PickerInputBase,\n {\n ...attrs,\n formattedValue: _value.value ? dayjs(_value.value).format(props.valueFormat) : '',\n clearable: props.clearable,\n onClear: () => setValue(null),\n },\n {\n default: ({ close }: { close: () => void }) =>\n h('div', { class: classes.dateTimePicker }, [\n // fullWidth is explicitly overridden to false here -\n // fullWidth:true is only meant for a standalone\n // InlineDateTimePicker embedded directly in a page. Inside a\n // Popover dropdown (this component), the dropdown itself sizes\n // to content (width:max-content), so a fullWidth calendar has\n // nothing definite to size against and blows out to fill the\n // viewport instead, with its contents getting squashed.\n h(DatePicker, { fullWidth: false, value: date.value, onChange: updateDate }),\n h('div', { class: classes.timeWrapper }, [\n // `class` can't be passed directly to TimePicker here: its\n // render root is a Popover call, and Popover has\n // inheritAttrs:false and never even reads `attrs` in its own\n // setup(), so a class handed to TimePicker silently gets\n // dropped along that path and never reaches any real DOM\n // node. Wrapping it in a plain div instead guarantees\n // `.timeInput`'s `flex: 1` actually lands on an element\n // inside the `.timeWrapper` flex row.\n // For a plain DOM element (not a component), h()'s third\n // argument must be actual children - a bare function is only\n // auto-invoked as the default slot for component vnodes, so\n // passing one here silently rendered an empty div.\n h('div', { class: classes.timeInput }, [\n h(TimePicker, {\n value: time.value,\n withSeconds: props.withSeconds,\n size: props.size,\n hoursRef,\n onChange: updateTime,\n }),\n ]),\n h(\n ActionIcon,\n {\n variant: 'default',\n size: `input-${props.size || 'sm'}`,\n 'data-mantine-stop-propagation': true,\n ...props.submitButtonProps,\n onClick: (event: MouseEvent) => {\n props.submitButtonProps?.onClick?.(event)\n close()\n },\n },\n () => h(CheckIcon, { size: '30%' }),\n ),\n ]),\n ]),\n },\n )\n },\n})\n\nexport const InlineDateTimePicker = DateTimePicker\n\nexport const MiniCalendar = defineComponent({\n name: 'MiniCalendar',\n props: {\n date: [String, Date] as PropType<string | Date>,\n defaultDate: [String, Date] as PropType<string | Date>,\n onDateChange: Function as PropType<(date: DateStringValue) => void>,\n value: [String, Date, null] as PropType<string | Date | null>,\n onChange: Function as PropType<(date: DateStringValue) => void>,\n maxDate: [String, Date] as PropType<string | Date>,\n minDate: [String, Date] as PropType<string | Date>,\n numberOfDays: { type: Number, default: 7 },\n monthLabelFormat: { type: String, default: 'MMM' },\n onNext: Function as PropType<() => void>,\n onPrevious: Function as PropType<() => void>,\n getDayProps: Function as PropType<(date: DateStringValue) => Record<string, any>>,\n size: { type: String as PropType<MantineSize>, default: 'sm' },\n previousControlProps: Object as PropType<Record<string, any>>,\n nextControlProps: Object as PropType<Record<string, any>>,\n locale: String,\n },\n setup(props, { attrs }) {\n const ctx = useDatesContext()\n const [_date, setDate] = useUncontrolled<DateStringValue>({\n value: computed(() => toDateString(props.date ?? null) ?? undefined),\n defaultValue: toDateString(props.defaultDate ?? null) ?? undefined,\n finalValue: toDateString(props.value ?? null) || dayjs().format('YYYY-MM-DD'),\n onChange: (value) => props.onDateChange?.(value),\n })\n\n const handleNext = () => {\n props.onNext?.()\n setDate(dayjs(_date.value).add(props.numberOfDays, 'days').format('YYYY-MM-DD'))\n }\n const handlePrevious = () => {\n props.onPrevious?.()\n setDate(dayjs(_date.value).subtract(props.numberOfDays, 'days').format('YYYY-MM-DD'))\n }\n\n return () => {\n const previousDisabled = props.minDate\n ? dayjs(_date.value).subtract(1, 'days').isBefore(dayjs(props.minDate))\n : false\n const nextDisabled = props.maxDate\n ? dayjs(_date.value).add(props.numberOfDays, 'days').isAfter(dayjs(props.maxDate))\n : false\n\n const range = Array.from({ length: props.numberOfDays }, (_, index) =>\n dayjs(_date.value).add(index, 'days'),\n ).map((date) => {\n const disabled =\n (props.minDate && date.isBefore(dayjs(props.minDate), 'day')) ||\n (props.maxDate && date.isAfter(dayjs(props.maxDate), 'day')) ||\n false\n const dayProps = props.getDayProps?.(toDateString(date.format('YYYY-MM-DD'))!) || {}\n\n return h(\n UnstyledButton,\n {\n key: date.toString(),\n disabled,\n 'aria-label': date.format('YYYY-MM-DD'),\n 'data-disabled': disabled || undefined,\n 'data-selected': (props.value && dayjs(date).isSame(props.value, 'day')) || undefined,\n ...dayProps,\n class: [classes.miniCalendarDay, dayProps.class],\n onClick: (event: MouseEvent) => {\n dayProps.onClick?.(event)\n props.onChange?.(toDateString(date.format('YYYY-MM-DD'))!)\n },\n },\n () => [\n h(\n 'span',\n { class: classes.miniCalendarDayMonth },\n date.locale(props.locale || ctx.locale).format(props.monthLabelFormat),\n ),\n h('span', { class: classes.miniCalendarDayNumber }, String(date.date())),\n ],\n )\n })\n\n return h(Box, { ...attrs, class: [classes.miniCalendarRoot, (attrs as any).class] }, () => [\n h(\n UnstyledButton,\n {\n onClick: handlePrevious,\n disabled: previousDisabled,\n 'data-disabled': previousDisabled || undefined,\n 'data-direction': 'previous',\n ...props.previousControlProps,\n class: [classes.miniCalendarControl, props.previousControlProps?.class],\n },\n () =>\n props.previousControlProps?.children ||\n h(AccordionChevron, { 'data-chevron': true, size: props.size }),\n ),\n h('div', { class: classes.miniCalendarDays }, range),\n h(\n UnstyledButton,\n {\n onClick: handleNext,\n disabled: nextDisabled,\n 'data-disabled': nextDisabled || undefined,\n 'data-direction': 'next',\n ...props.nextControlProps,\n class: [classes.miniCalendarControl, props.nextControlProps?.class],\n },\n () =>\n props.nextControlProps?.children ||\n h(AccordionChevron, { 'data-chevron': true, size: props.size }),\n ),\n ])\n }\n },\n})\n\nexport const getFormattedTime = ({\n value,\n format = 'HH:mm',\n}: {\n value: string | Date\n format?: string\n}) => (value instanceof Date ? dayjs(value) : dayjs(`2024-01-01 ${value}`)).format(format)\n\nexport type DayProps = InstanceType<typeof Day>['$props']\nexport type CalendarProps = InstanceType<typeof Calendar>['$props']\nexport type DatePickerProps = InstanceType<typeof DatePicker>['$props']\nexport type DatePickerInputProps = InstanceType<typeof DatePickerInput>['$props']\nexport type DateInputProps = InstanceType<typeof DateInput>['$props']\nexport type TimeInputProps = InstanceType<typeof TimeInput>['$props']\nexport type TimePickerProps = InstanceType<typeof TimePicker>['$props']\nexport type TimeGridProps = InstanceType<typeof TimeGrid>['$props']\nexport type TimeValueProps = InstanceType<typeof TimeValue>['$props']\nexport type DateTimePickerProps = InstanceType<typeof DateTimePicker>['$props']\nexport type MiniCalendarProps = InstanceType<typeof MiniCalendar>['$props']\nexport type DatesStylesNames = keyof typeof classes\nexport type PickerBaseProps = Record<string, any>\nexport type ControlsGroupSettings = Record<string, any>\nexport type DateInputSharedProps = Record<string, any>\nexport type CalendarSettings = Record<string, any>\nexport type CalendarBaseProps = Record<string, any>\nexport type CalendarAriaLabels = Record<string, string>\nexport type MonthLevelSettings = Record<string, any>\nexport type YearLevelSettings = Record<string, any>\nexport type DecadeLevelSettings = Record<string, any>\nexport type TimePickerPresets = Array<{ value: string; label: string }>\nexport type TimeGridData = string[]\nexport type TimeGridStylesNames = DatesStylesNames\nexport type TimePickerStylesNames = DatesStylesNames\nexport type DatePickerStylesNames = DatesStylesNames\nexport type DatePickerInputStylesNames = DatesStylesNames\nexport type DateInputStylesNames = DatesStylesNames\nexport type CalendarStylesNames = DatesStylesNames\n\nvoid ({} as CSSProperties)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACoCA,MAAA,QAAM,OAAO,+BAAA,OAAiB;AAwC9B,IAAM,kCAAmE;CACvE,QAAQ;CACR,gBAAgB;CAChB,aAAa,CAAC,GAAG,CAAC;CAClB,UAAU;CACV,iBAAiB;AACnB;AAEA,IAAM,kBAAiE,OAAO,cAAc;AAE5F,IAAa,iBAAA,GAAA,IAAA,iBAAgC;CAC3C,MAAM;CACN,OAAO,EACL,UAAU;EAAE,MAAM;EAA2C,gBAAgB,CAAC;CAAG,EACnF;CACA,MAAM,OAAO,EAAE,SAAS;EACtB,MAAM,YAAA,GAAA,IAAA,iBAA2B;GAAE,GAAG;GAAiC,GAAG,MAAM;EAAS,EAAE;EAC3F,CAAA,GAAA,IAAA,SAAQ,iBAAiB,SAAS,KAAK;EACvC,CAAA,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U;KACV,iBAAiB,gBAAgB,KAAA;KACjC,kBAAkB;KAClB,GAAG,MAAM;KACT,OAAO,CAAC,qBAAQ,qBAAqB,MAAM,kBAAkB,KAAK;IACpE,SAEE,MAAM,kBAAkB,aAAA,GAAA,IAAA,GACtB,kBAAA,kBAAkB;KAAE,gBAAgB;KAAM,MAAM,MAAM;IAAK,CAAC,CAClE;GACF,CAAC;EACH;CACF;AACF,CAAC;AAED,IAAa,oBAAoB,EAC/B,OACA,SAAS,eAIJ,iBAAiB,QAAA,GAAA,MAAA,SAAa,KAAK,KAAA,GAAA,MAAA,SAAU,cAAc,OAAO,GAAG,OAAO,MAAM"}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../src/Dates.module.css","../src/index.ts"],"sourcesContent":[".calendar {\n display: flex;\n gap: var(--mantine-spacing-md);\n width: max-content;\n}\n\n.calendar[data-full-width] {\n width: 100%;\n}\n\n.calendar[data-full-width] > * {\n flex: 1;\n}\n\n.calendarLevel {\n min-width: 16.25rem;\n}\n\n.calendarHeader {\n --dch-control-size: 2.25rem;\n\n display: flex;\n max-width: calc(var(--dch-control-size) * 8 + 0.4375rem);\n margin-bottom: var(--mantine-spacing-xs);\n}\n\n.calendarHeader[data-full-width] {\n max-width: none;\n width: 100%;\n}\n\n.calendarHeaderLevel,\n.calendarHeaderControl {\n height: var(--dch-control-size);\n border-radius: var(--mantine-radius-default);\n display: flex;\n justify-content: center;\n align-items: center;\n user-select: none;\n opacity: 1;\n cursor: pointer;\n color: var(--mantine-color-text);\n}\n\n.calendarHeaderLevel[data-static],\n.calendarHeaderControl[data-static] {\n cursor: default;\n}\n\n.calendarHeaderLevel:not(:disabled):not([data-disabled]):not([data-static]):hover,\n.calendarHeaderControl:not(:disabled):not([data-disabled]):not([data-static]):hover {\n background-color: var(--mantine-color-gray-light-hover);\n}\n\n.calendarHeaderLevel:disabled,\n.calendarHeaderLevel[data-disabled],\n.calendarHeaderControl:disabled,\n.calendarHeaderControl[data-disabled] {\n opacity: 0.2;\n cursor: not-allowed;\n}\n\n.calendarHeaderControl {\n width: var(--dch-control-size);\n}\n\n.calendarHeaderLevel {\n flex: 1;\n font-size: var(--mantine-font-size-sm);\n font-weight: 500;\n text-transform: capitalize;\n}\n\n.calendarHeaderLevel[data-native-level-select] {\n cursor: default;\n gap: var(--mantine-spacing-md);\n}\n\n.calendarHeaderSelect {\n appearance: none;\n background: transparent;\n border: none;\n font-size: inherit;\n font-weight: var(--mantine-font-weight-medium);\n text-transform: capitalize;\n color: inherit;\n font-family: inherit;\n cursor: pointer;\n padding: 0 rem(16px) 0 0;\n line-height: var(--dch-control-size);\n height: var(--dch-control-size);\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 15' fill='none'%3E%3Cpath d='M4.9 5.4 7.5 2.8l2.6 2.6M10.1 9.6 7.5 12.2 4.9 9.6' stroke='currentColor'/%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-position: right center;\n background-size: rem(14px) rem(14px);\n\n &:focus-visible {\n outline: rem(2px) solid var(--mantine-primary-color-filled);\n outline-offset: rem(2px);\n border-radius: var(--mantine-radius-sm);\n }\n\n &:disabled {\n cursor: not-allowed;\n color: var(--mantine-color-dimmed);\n }\n}\n\n.calendarHeaderControlIcon {\n width: 45%;\n height: 45%;\n}\n\n.calendarHeaderControlIcon[data-direction='next'] {\n transform: rotate(270deg);\n}\n\n.calendarHeaderControlIcon[data-direction='previous'] {\n transform: rotate(90deg);\n}\n\n.month {\n table-layout: fixed;\n border-collapse: separate;\n border-spacing: 0;\n}\n\n.month[data-full-width] {\n width: 100%;\n}\n\n.monthRow {\n border: 0;\n}\n\n.monthCell {\n padding: 0;\n text-align: center;\n}\n\n.monthCell[data-with-spacing] {\n padding: 0.125rem;\n}\n\n.weekday {\n height: 1.75rem;\n color: var(--mantine-color-dimmed);\n font-size: var(--mantine-font-size-xs);\n font-weight: 500;\n text-align: center;\n}\n\n.weekday[data-weekend] {\n color: var(--mantine-color-red-filled);\n}\n\n.weekNumber {\n color: var(--mantine-color-dimmed);\n font-size: var(--mantine-font-size-xs);\n text-align: center;\n}\n\n.day {\n --day-size: 2.25rem;\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--day-size);\n height: var(--day-size);\n border-radius: var(--mantine-radius-sm);\n color: var(--mantine-color-text);\n font-size: var(--mantine-font-size-sm);\n line-height: 1;\n user-select: none;\n}\n\n.day[data-full-width] {\n width: 100%;\n height: auto;\n min-height: var(--day-size);\n aspect-ratio: 1;\n}\n\n.day:not(:disabled):not([data-static]):not([data-selected]):not([data-in-range]):hover {\n background-color: var(--mantine-color-gray-light-hover);\n}\n\n.day[data-outside] {\n color: var(--mantine-color-dimmed);\n opacity: 0.65;\n}\n\n.day[data-weekend] {\n color: var(--mantine-color-red-filled);\n}\n\n.day[data-today][data-highlight-today] {\n border: 1px solid var(--mantine-primary-color-filled);\n}\n\n.day[data-in-range] {\n background-color: var(--mantine-primary-color-light);\n color: var(--mantine-primary-color-light-color);\n border-radius: 0;\n}\n\n.day[data-in-range]:not(:disabled):not([data-static]):hover {\n background-color: var(--mantine-primary-color-light);\n}\n\n.day[data-selected],\n.day[data-first-in-range],\n.day[data-last-in-range] {\n background-color: var(--mantine-primary-color-filled);\n color: var(--mantine-color-white);\n}\n\n.day[data-selected]:not(:disabled):not([data-static]):hover {\n background-color: var(--mantine-primary-color-filled-hover);\n}\n\n.day:disabled,\n.pickerControl:disabled {\n cursor: not-allowed;\n color: var(--mantine-color-dimmed);\n opacity: 0.55;\n}\n\n.controlsGrid[data-full-width] {\n width: 100%;\n}\n\n.pickerControl {\n height: 2.25rem;\n width: calc(2.25rem * 7 / 3 + 0.09375rem);\n display: flex;\n justify-content: center;\n align-items: center;\n padding-inline: var(--mantine-spacing-xs);\n border-radius: var(--mantine-radius-sm);\n color: var(--mantine-color-text);\n font-size: var(--mantine-font-size-sm);\n user-select: none;\n background-color: transparent;\n}\n\n.pickerControl[data-full-width] {\n width: 100%;\n}\n\n.pickerControl:not(:disabled):not([data-selected]):not([data-in-range]):hover {\n background-color: var(--mantine-color-gray-light-hover);\n}\n\n.pickerControl[data-selected] {\n background-color: var(--mantine-primary-color-filled);\n color: var(--mantine-color-white);\n}\n\n.pickerControl[data-selected]:hover {\n background-color: var(--mantine-primary-color-filled-hover);\n}\n\n.pickerControl[data-in-range] {\n background-color: var(--mantine-primary-color-light-hover);\n color: var(--mantine-primary-color-light-color);\n}\n\n.pickerControl[data-in-range]:hover {\n background-color: var(--mantine-primary-color-light);\n}\n\n.pickerControl[data-first-in-range] {\n border-radius: 0;\n border-start-start-radius: var(--mantine-radius-default);\n border-end-start-radius: var(--mantine-radius-default);\n}\n\n.pickerControl[data-last-in-range] {\n border-radius: 0;\n border-end-end-radius: var(--mantine-radius-default);\n border-start-end-radius: var(--mantine-radius-default);\n}\n\n.pickerControl[data-first-in-range][data-last-in-range] {\n border-radius: var(--mantine-radius-default);\n}\n\n.timePicker,\n.dateTimePicker {\n width: max-content;\n}\n\n.datePickerRoot {\n display: flex;\n font-size: var(--mantine-font-size-sm);\n}\n\n.dateTimePicker {\n display: grid;\n gap: var(--mantine-spacing-sm);\n}\n\n.timeWrapper {\n display: flex;\n align-items: stretch;\n margin-top: var(--mantine-spacing-md);\n}\n\n.timeInput {\n flex: 1;\n margin-inline-end: var(--mantine-spacing-md);\n}\n\n.presetsList {\n display: flex;\n flex-direction: column;\n border-inline-end: 1px solid var(--mantine-color-default-border);\n padding-inline-end: 0.5em;\n margin-inline-end: 0.5em;\n}\n\n.presetButton {\n padding: 0.52em 0.8em;\n border-radius: var(--mantine-radius-default);\n font-size: inherit;\n white-space: nowrap;\n}\n\n.presetButton:hover {\n background-color: var(--mantine-color-gray-light-hover);\n}\n\n.timePickerPresetsGroup {\n margin-bottom: var(--mantine-spacing-xs);\n}\n\n.dropdown {\n padding: var(--mantine-spacing-xs);\n}\n\n.placeholder {\n color: var(--mantine-color-placeholder);\n}\n\n.timeGridControl {\n text-align: center;\n padding-inline: 1em;\n padding-block: 0.25em;\n border: 1px solid var(--mantine-color-default-border);\n background-color: var(--mantine-color-default);\n color: var(--mantine-color-default-color);\n border-radius: var(--mantine-radius-default);\n font-size: var(--mantine-font-size-sm);\n}\n\n.timeGridControl:not(:disabled):not([data-disabled]):not([data-active]):hover {\n background-color: var(--mantine-color-default-hover);\n}\n\n.timeGridControl[data-active] {\n background-color: var(--mantine-primary-color-filled);\n color: var(--mantine-color-white);\n border-color: transparent;\n}\n\n.timeGridControl[data-active]:not(:disabled):not([data-disabled]):hover {\n background-color: var(--mantine-primary-color-filled-hover);\n}\n\n.timeGridControl:disabled,\n.timeGridControl[data-disabled] {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.timePickerFieldsRoot {\n display: flex;\n align-items: center;\n height: 100%;\n overflow: hidden;\n}\n\n.timePickerFieldsGroup {\n display: flex;\n align-items: center;\n height: calc(var(--input-height) - 15px);\n}\n\n.timePickerField {\n width: calc(2ch + 0.3em);\n caret-color: transparent;\n font-variant-numeric: tabular-nums;\n position: relative;\n height: 100%;\n line-height: 1;\n padding-inline: 0.15em;\n border: 0;\n text-align: center;\n text-align-last: center;\n background-color: transparent;\n color: var(--input-color);\n border-radius: 2px;\n appearance: none;\n}\n\n.timePickerField[data-am-pm] {\n width: auto;\n}\n\n.timePickerField:disabled {\n cursor: not-allowed;\n}\n\n.timePickerField::selection {\n background-color: transparent;\n}\n\n.timePickerField::placeholder {\n opacity: 1;\n color: inherit;\n}\n\n.timePickerField:focus {\n background-color: var(--mantine-primary-color-filled);\n color: var(--mantine-color-white);\n outline: 0;\n}\n\n.timePickerField:focus::placeholder {\n color: var(--mantine-color-white);\n}\n\n.timePickerDropdown {\n padding: 4px;\n}\n\n.timePickerControlsListGroup {\n display: flex;\n gap: 4px;\n}\n\n.timePickerControlsList {\n display: flex;\n flex-direction: column;\n}\n\n.timePickerControl {\n text-align: center;\n min-width: 2.5em;\n width: max-content;\n height: 2em;\n border-radius: var(--mantine-radius-default);\n font-size: var(--mantine-font-size-sm);\n}\n\n.timePickerControl[data-active] {\n background-color: var(--mantine-primary-color-filled);\n color: var(--mantine-color-white);\n}\n\n.timePickerControl:not([data-active]):hover {\n color: var(--mantine-color-bright);\n background-color: var(--mantine-color-gray-light-hover);\n}\n\n.miniCalendarRoot {\n width: fit-content;\n display: flex;\n align-items: center;\n font-size: var(--mantine-font-size-sm);\n}\n\n.miniCalendarDays {\n display: flex;\n font-size: inherit;\n}\n\n.miniCalendarDay {\n display: flex;\n min-width: 3em;\n gap: 0.5em;\n font-size: inherit;\n flex-direction: column;\n align-items: center;\n line-height: 1;\n padding: 0.75em;\n border-radius: var(--mantine-radius-default);\n}\n\n.miniCalendarDay[data-selected] {\n color: var(--mantine-primary-color-contrast);\n background-color: var(--mantine-primary-color-filled);\n}\n\n.miniCalendarDay[data-selected]:not([data-disabled]):hover {\n background-color: var(--mantine-primary-color-filled-hover);\n}\n\n.miniCalendarDay[data-disabled] {\n opacity: 0.3;\n cursor: not-allowed;\n}\n\n.miniCalendarDay:not([data-disabled]):not([data-selected]):hover {\n background-color: var(--mantine-color-gray-light-hover);\n}\n\n.miniCalendarDayMonth {\n font-size: 0.75em;\n font-weight: var(--mantine-font-weight-medium);\n opacity: 0.65;\n}\n\n.miniCalendarDayNumber {\n font-size: 0.9em;\n font-weight: var(--mantine-font-weight-medium);\n}\n\n.miniCalendarControl {\n align-self: stretch;\n font-size: inherit;\n width: 2em;\n border-radius: var(--mantine-radius-default);\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--mantine-color-bright);\n}\n\n.miniCalendarControl[data-disabled] {\n opacity: 0.3;\n cursor: not-allowed;\n}\n\n.miniCalendarControl:not([data-disabled]):hover {\n background-color: var(--mantine-color-gray-light-hover);\n}\n\n.miniCalendarControl [data-chevron] {\n font-size: inherit;\n width: 60%;\n}\n\n.miniCalendarControl[data-direction='previous'] [data-chevron] {\n transform: rotate(90deg);\n}\n\n.miniCalendarControl[data-direction='next'] [data-chevron] {\n transform: rotate(-90deg);\n}\n","import dayjs from 'dayjs'\nimport customParseFormat from 'dayjs/plugin/customParseFormat'\nimport {\n computed,\n defineComponent,\n h,\n inject,\n provide,\n ref,\n watch,\n type CSSProperties,\n type InjectionKey,\n type PropType,\n type SlotsType,\n type VNodeChild,\n} from 'vue'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport {\n AccordionChevron,\n ActionIcon,\n Box,\n Button,\n CheckIcon,\n CloseButton,\n Group,\n InputBase,\n Modal,\n Popover,\n ScrollArea,\n SimpleGrid,\n Text,\n UnstyledButton,\n type MantineSize,\n} from '@mantine-vue/core'\nimport classes from './Dates.module.css'\n\ndayjs.extend(customParseFormat)\n\nexport type DateStringValue = string\nexport type DateValue = DateStringValue | null\nexport type DatesRangeValue = [DateValue, DateValue]\nexport type DatePickerType = 'default' | 'multiple' | 'range'\nexport type CalendarLevel = 'month' | 'year' | 'decade'\nexport interface RenderDaySlots {\n renderDay?: (input: { date: DateStringValue }) => VNodeChild\n /** Short alias for `renderDay`. */\n day?: (input: { date: DateStringValue }) => VNodeChild\n}\nexport type DatePickerValue<Type extends DatePickerType = 'default'> = Type extends 'range'\n ? DatesRangeValue\n : Type extends 'multiple'\n ? DateStringValue[]\n : DateValue\nexport type DatePickerValueType = DateValue | DateStringValue[] | DatesRangeValue\nexport type ControlKeydownPayload = {\n rowIndex: number\n cellIndex: number\n event: KeyboardEvent\n controlsRef: HTMLElement[][]\n}\nexport type DateFormatter = (payload: {\n type: DatePickerType\n date: DatePickerValueType\n locale?: string\n format: string\n labelSeparator: string\n}) => string\n\nexport interface DatesProviderSettings {\n locale?: string\n firstDayOfWeek?: number\n weekendDays?: number[]\n timezone?: string\n consistentWeeks?: boolean\n}\n\nconst DATES_PROVIDER_DEFAULT_SETTINGS: Required<DatesProviderSettings> = {\n locale: 'en',\n firstDayOfWeek: 1,\n weekendDays: [0, 6],\n timezone: 'UTC',\n consistentWeeks: false,\n}\n\nconst DatesContextKey: InjectionKey<Required<DatesProviderSettings>> = Symbol('DatesContext')\n\nexport const DatesProvider = defineComponent({\n name: 'DatesProvider',\n props: {\n settings: { type: Object as PropType<DatesProviderSettings>, default: () => ({}) },\n },\n setup(props, { slots }) {\n const settings = computed(() => ({ ...DATES_PROVIDER_DEFAULT_SETTINGS, ...props.settings }))\n provide(DatesContextKey, settings.value)\n watch(settings, (value) => provide(DatesContextKey, value))\n return () => slots.default?.()\n },\n})\n\nexport function useDatesContext() {\n return inject(DatesContextKey, DATES_PROVIDER_DEFAULT_SETTINGS)\n}\n\nfunction normalizeDate(value: Date | string | null | undefined): DateStringValue | null {\n if (value == null || value === '') {\n return null\n }\n\n const parsed = dayjs(value)\n return parsed.isValid() ? parsed.format('YYYY-MM-DD') : null\n}\n\nexport function toDateString(value: Date | string | null | undefined): DateStringValue | null {\n return normalizeDate(value)\n}\n\nexport function shiftTimezone<T>(direction: 'add' | 'remove', date: T, timezone?: string): T {\n void direction\n void timezone\n return date\n}\n\nexport function getTimezoneOffset(date: Date | string, timezone?: string) {\n void timezone\n return new Date(date).getTimezoneOffset()\n}\n\nexport function clampDate(date: DateStringValue, minDate?: Date | string, maxDate?: Date | string) {\n const value = dayjs(date)\n const min = normalizeDate(minDate)\n const max = normalizeDate(maxDate)\n\n if (min && value.isBefore(min, 'day')) {\n return min\n }\n\n if (max && value.isAfter(max, 'day')) {\n return max\n }\n\n return value.format('YYYY-MM-DD')\n}\n\nexport function getDefaultClampedDate({\n minDate,\n maxDate,\n defaultDate,\n}: {\n minDate?: Date | string\n maxDate?: Date | string\n defaultDate?: Date | string\n} = {}) {\n return clampDate(normalizeDate(defaultDate) || dayjs().format('YYYY-MM-DD'), minDate, maxDate)\n}\n\nexport function assignTime(date: Date | string, time: Date | string) {\n const timeValue = dayjs(time)\n return dayjs(date)\n .hour(timeValue.hour())\n .minute(timeValue.minute())\n .second(timeValue.second())\n .millisecond(timeValue.millisecond())\n .toDate()\n}\n\nexport function getFormattedDate({\n date,\n format = 'MMMM D, YYYY',\n locale,\n}: {\n date: Date | string\n format?: string\n locale?: string\n}) {\n return dayjs(date)\n .locale(locale || 'en')\n .format(format)\n}\n\nexport function isSameDate(\n a: Date | string | null | undefined,\n b: Date | string | null | undefined,\n) {\n if (!a || !b) return false\n return dayjs(a).isSame(b, 'day')\n}\n\nexport function isSameMonth(a: Date | string, b: Date | string) {\n return dayjs(a).isSame(b, 'month')\n}\n\nexport function isSameYear(a: Date | string, b: Date | string) {\n return dayjs(a).isSame(b, 'year')\n}\n\nexport function getStartOfWeek(date: Date | string, firstDayOfWeek = 1) {\n const value = dayjs(date)\n const diff = (value.day() - firstDayOfWeek + 7) % 7\n return value.subtract(diff, 'day').format('YYYY-MM-DD')\n}\n\nexport function getEndOfWeek(date: Date | string, firstDayOfWeek = 1) {\n return dayjs(getStartOfWeek(date, firstDayOfWeek)).add(6, 'day').format('YYYY-MM-DD')\n}\n\nexport function getWeekNumber(date: Date | string) {\n const current = dayjs(date)\n const yearStart = dayjs(`${current.year()}-01-01`)\n return Math.ceil((current.diff(yearStart, 'day') + yearStart.day() + 1) / 7)\n}\n\nexport function handleControlKeyDown({\n rowIndex,\n cellIndex,\n event,\n controlsRef,\n}: ControlKeydownPayload) {\n const rows = controlsRef.length\n const cols = controlsRef[0]?.length || 0\n let nextRow = rowIndex\n let nextCell = cellIndex\n\n if (event.key === 'ArrowRight') nextCell += 1\n if (event.key === 'ArrowLeft') nextCell -= 1\n if (event.key === 'ArrowDown') nextRow += 1\n if (event.key === 'ArrowUp') nextRow -= 1\n if (event.key === 'Home') nextCell = 0\n if (event.key === 'End') nextCell = cols - 1\n\n if (nextCell < 0) {\n nextCell = cols - 1\n nextRow -= 1\n }\n\n if (nextCell >= cols) {\n nextCell = 0\n nextRow += 1\n }\n\n const next = controlsRef[(nextRow + rows) % rows]?.[(nextCell + cols) % cols]\n if (next) {\n event.preventDefault()\n next.focus()\n }\n}\n\nfunction focusAdjacentControl(\n refs: (HTMLElement | null | undefined)[][],\n rowIndex: number,\n cellIndex: number,\n direction: 'up' | 'down' | 'left' | 'right',\n) {\n const isFocusable = (el: HTMLElement | null | undefined) =>\n !!el &&\n !(el as any).disabled &&\n !el.hasAttribute('data-hidden') &&\n !el.hasAttribute('data-outside')\n\n let nextRow = rowIndex\n let nextCell = cellIndex\n\n for (let i = 0; i < 60; i += 1) {\n if (direction === 'up') nextRow -= 1\n if (direction === 'down') nextRow += 1\n if (direction === 'left') {\n nextCell -= 1\n if (nextCell < 0) {\n nextRow -= 1\n nextCell = (refs[nextRow]?.length || 1) - 1\n }\n }\n if (direction === 'right') {\n nextCell += 1\n if (nextCell >= (refs[nextRow]?.length || 0)) {\n nextRow += 1\n nextCell = 0\n }\n }\n\n const row = refs[nextRow]\n if (!row) return\n const el = row[nextCell]\n if (el === undefined) return\n if (isFocusable(el)) {\n el!.focus()\n return\n }\n }\n}\n\nfunction keyToDirection(key: string): 'up' | 'down' | 'left' | 'right' | null {\n if (key === 'ArrowUp') return 'up'\n if (key === 'ArrowDown') return 'down'\n if (key === 'ArrowLeft') return 'left'\n if (key === 'ArrowRight') return 'right'\n return null\n}\n\n// A ref callback used on grid cells (Day/PickerControl) to capture the real\n// DOM node into a [row][cell] array - components resolve to their instance\n// proxy (`.$el`), not the DOM node directly.\nfunction setGridRef(\n refs: (HTMLElement | null | undefined)[][],\n rowIndex: number,\n cellIndex: number,\n node: any,\n) {\n if (!refs[rowIndex]) refs[rowIndex] = []\n refs[rowIndex][cellIndex] = node?.$el ?? node ?? undefined\n}\n\nfunction getMonthDays(month: DateStringValue, firstDayOfWeek: number, consistentWeeks = false) {\n const startOfMonth = dayjs(month).startOf('month')\n const start = dayjs(getStartOfWeek(startOfMonth.format('YYYY-MM-DD'), firstDayOfWeek))\n const weeks = consistentWeeks\n ? 6\n : Math.ceil((startOfMonth.daysInMonth() + startOfMonth.day()) / 7)\n\n return Array.from({ length: weeks }, (_, week) =>\n Array.from({ length: 7 }, (__, day) => start.add(week * 7 + day, 'day').format('YYYY-MM-DD')),\n )\n}\n\nfunction isBeforeMin(date: DateStringValue, minDate?: Date | string) {\n const min = normalizeDate(minDate)\n return !!min && dayjs(date).isBefore(min, 'day')\n}\n\nfunction isAfterMax(date: DateStringValue, maxDate?: Date | string) {\n const max = normalizeDate(maxDate)\n return !!max && dayjs(date).isAfter(max, 'day')\n}\n\nfunction formatValue(\n value: DatePickerValueType,\n type: DatePickerType,\n format: string,\n locale?: string,\n labelSeparator = '–',\n valueFormatter?: DateFormatter,\n) {\n if (valueFormatter) {\n return valueFormatter({ type, date: value, locale, format, labelSeparator })\n }\n\n if (type === 'multiple') {\n return Array.isArray(value)\n ? value\n .map((item) =>\n dayjs(item)\n .locale(locale || 'en')\n .format(format),\n )\n .join(', ')\n : ''\n }\n\n if (type === 'range') {\n const [start, end] = Array.isArray(value) ? (value as DatesRangeValue) : [null, null]\n if (!start && !end) return ''\n if (start && !end)\n return `${dayjs(start)\n .locale(locale || 'en')\n .format(format)} ${labelSeparator} `\n if (!start && end)\n return `${labelSeparator} ${dayjs(end)\n .locale(locale || 'en')\n .format(format)}`\n return `${dayjs(start)\n .locale(locale || 'en')\n .format(format)} ${labelSeparator} ${dayjs(end)\n .locale(locale || 'en')\n .format(format)}`\n }\n\n return value\n ? dayjs(value as DateStringValue)\n .locale(locale || 'en')\n .format(format)\n : ''\n}\n\nfunction getMonthLabel(date: DateStringValue, format = 'MMMM YYYY', locale?: string) {\n return dayjs(date)\n .locale(locale || 'en')\n .format(format)\n}\n\nfunction getYearRange(date: DateStringValue) {\n const year = dayjs(date).year()\n const start = year - (year % 10)\n return Array.from({ length: 10 }, (_, index) =>\n dayjs(`${start + index}-01-01`).format('YYYY-MM-DD'),\n )\n}\n\nfunction getDecadeLabel(date: DateStringValue) {\n const years = getYearRange(date)\n return `${dayjs(years[0]).year()} – ${dayjs(years[years.length - 1]).year()}`\n}\n\nexport const Day = defineComponent({\n name: 'Day',\n inheritAttrs: false,\n slots: Object as SlotsType<RenderDaySlots>,\n props: {\n date: { type: String, required: true },\n size: { type: [String, Number], default: 'sm' },\n static: { type: Boolean, default: false },\n weekend: Boolean,\n outside: Boolean,\n selected: Boolean,\n hidden: Boolean,\n inRange: Boolean,\n firstInRange: Boolean,\n lastInRange: Boolean,\n highlightToday: Boolean,\n fullWidth: Boolean,\n disabled: Boolean,\n renderDay: Function as PropType<(date: DateStringValue) => VNodeChild>,\n classNames: { type: [Object, Function], default: undefined },\n styles: { type: [Object, Function], default: undefined },\n unstyled: Boolean,\n },\n setup(props, { attrs, slots }) {\n return () =>\n h(\n UnstyledButton,\n {\n ...attrs,\n component: props.static ? 'div' : 'button',\n class: [classes.day, (attrs as any).class],\n disabled: props.disabled,\n style: [{ display: props.hidden ? 'none' : undefined }, (attrs as any).style],\n 'data-today': dayjs(props.date).isSame(new Date(), 'day') || undefined,\n 'data-hidden': props.hidden || undefined,\n 'data-highlight-today': props.highlightToday || undefined,\n 'data-disabled': props.disabled || undefined,\n 'data-weekend': (!props.disabled && !props.outside && props.weekend) || undefined,\n 'data-outside': (!props.disabled && props.outside) || undefined,\n 'data-selected': (!props.disabled && props.selected) || undefined,\n 'data-in-range': (props.inRange && !props.disabled) || undefined,\n 'data-first-in-range': (props.firstInRange && !props.disabled) || undefined,\n 'data-last-in-range': (props.lastInRange && !props.disabled) || undefined,\n 'data-static': props.static || undefined,\n 'data-full-width': props.fullWidth || undefined,\n },\n () =>\n (props.renderDay\n ? props.renderDay(props.date)\n : (slots.renderDay ?? slots.day)?.({ date: props.date })) || dayjs(props.date).date(),\n )\n },\n})\n\nexport const PickerControl = defineComponent({\n name: 'PickerControl',\n inheritAttrs: false,\n props: {\n selected: Boolean,\n disabled: Boolean,\n inRange: Boolean,\n firstInRange: Boolean,\n lastInRange: Boolean,\n withCellSpacing: { type: Boolean, default: true },\n fullWidth: Boolean,\n },\n setup(props, { attrs, slots }) {\n return () =>\n h(\n UnstyledButton,\n {\n ...attrs,\n class: [classes.pickerControl, (attrs as any).class],\n disabled: props.disabled,\n 'data-selected': (props.selected && !props.disabled) || undefined,\n 'data-disabled': props.disabled || undefined,\n 'data-in-range': (props.inRange && !props.disabled && !props.selected) || undefined,\n 'data-first-in-range': (props.firstInRange && !props.disabled) || undefined,\n 'data-last-in-range': (props.lastInRange && !props.disabled) || undefined,\n 'data-with-cell-spacing': props.withCellSpacing || undefined,\n 'data-full-width': props.fullWidth || undefined,\n },\n () => slots.default?.(),\n )\n },\n})\n\nexport const CalendarHeader = defineComponent({\n name: 'CalendarHeader',\n props: {\n label: { type: String, required: true },\n hasNextLevel: { type: Boolean, default: true },\n withNext: { type: Boolean, default: true },\n withPrevious: { type: Boolean, default: true },\n nextDisabled: Boolean,\n previousDisabled: Boolean,\n nextLabel: { type: String, default: 'Next' },\n previousLabel: { type: String, default: 'Previous' },\n levelControlAriaLabel: String,\n fullWidth: Boolean,\n withNativeLevelSelect: Boolean,\n yearsSelectRange: Array as unknown as PropType<[number, number]>,\n calendarLevel: String as PropType<CalendarLevel>,\n date: [String, Date] as PropType<string | Date>,\n locale: String,\n onDateChange: Function as PropType<(date: DateStringValue) => void>,\n minDate: [String, Date] as PropType<string | Date>,\n maxDate: [String, Date] as PropType<string | Date>,\n disableNativeLevelSelect: Boolean,\n onNext: Function as PropType<() => void>,\n onPrevious: Function as PropType<() => void>,\n onLevelClick: Function as PropType<() => void>,\n },\n setup(props) {\n return () => {\n const previousControl = props.withPrevious\n ? h(\n UnstyledButton,\n {\n class: classes.calendarHeaderControl,\n 'data-direction': 'previous',\n 'aria-label': props.previousLabel,\n onClick: props.onPrevious,\n disabled: props.previousDisabled,\n 'data-disabled': props.previousDisabled || undefined,\n },\n () =>\n h(AccordionChevron, {\n class: classes.calendarHeaderControlIcon,\n 'data-direction': 'previous',\n size: '45%',\n }),\n )\n : null\n\n const displayed = props.date ? dayjs(props.date) : dayjs()\n const currentYear = new Date().getFullYear()\n const rawMinYear =\n props.yearsSelectRange?.[0] ??\n (props.minDate ? dayjs(props.minDate).year() : currentYear - 100)\n const rawMaxYear =\n props.yearsSelectRange?.[1] ??\n (props.maxDate ? dayjs(props.maxDate).year() : currentYear + 50)\n const minYear = Math.min(rawMinYear, rawMaxYear, displayed.year())\n const maxYear = Math.max(rawMinYear, rawMaxYear, displayed.year())\n const updateNativeDate = (next: dayjs.Dayjs) => {\n let result = next\n if (props.minDate && result.isBefore(dayjs(props.minDate), 'day'))\n result = dayjs(props.minDate)\n if (props.maxDate && result.isAfter(dayjs(props.maxDate), 'day'))\n result = dayjs(props.maxDate)\n props.onDateChange?.(result.format('YYYY-MM-DD'))\n }\n const nativeLevelControl =\n props.withNativeLevelSelect &&\n props.date &&\n props.onDateChange &&\n props.calendarLevel !== 'decade'\n ? h(\n 'div',\n {\n class: classes.calendarHeaderLevel,\n 'data-static': true,\n 'data-native-level-select': true,\n },\n [\n props.calendarLevel === 'month'\n ? h(\n 'select',\n {\n class: classes.calendarHeaderSelect,\n 'data-select': 'month',\n disabled: props.disableNativeLevelSelect,\n value: displayed.month(),\n 'aria-label': props.levelControlAriaLabel,\n onChange: (event: Event) =>\n updateNativeDate(\n displayed.month(Number((event.target as HTMLSelectElement).value)),\n ),\n },\n Array.from({ length: 12 }, (_, month) =>\n h(\n 'option',\n { value: month },\n dayjs()\n .locale(props.locale || 'en')\n .month(month)\n .format('MMMM'),\n ),\n ),\n )\n : null,\n h(\n 'select',\n {\n class: classes.calendarHeaderSelect,\n 'data-select': 'year',\n disabled: props.disableNativeLevelSelect,\n value: displayed.year(),\n 'aria-label': props.levelControlAriaLabel,\n onChange: (event: Event) =>\n updateNativeDate(\n displayed.year(Number((event.target as HTMLSelectElement).value)),\n ),\n },\n Array.from({ length: maxYear - minYear + 1 }, (_, index) => {\n const year = minYear + index\n return h('option', { value: year }, year)\n }),\n ),\n ],\n )\n : null\n const levelControl =\n nativeLevelControl ??\n h(\n UnstyledButton,\n {\n component: props.hasNextLevel ? 'button' : 'div',\n class: classes.calendarHeaderLevel,\n onClick: props.hasNextLevel ? props.onLevelClick : undefined,\n disabled: !props.hasNextLevel,\n 'data-static': !props.hasNextLevel || undefined,\n 'aria-label': props.levelControlAriaLabel,\n },\n () => props.label,\n )\n\n const nextControl = props.withNext\n ? h(\n UnstyledButton,\n {\n class: classes.calendarHeaderControl,\n 'data-direction': 'next',\n 'aria-label': props.nextLabel,\n onClick: props.onNext,\n disabled: props.nextDisabled,\n 'data-disabled': props.nextDisabled || undefined,\n },\n () =>\n h(AccordionChevron, {\n class: classes.calendarHeaderControlIcon,\n 'data-direction': 'next',\n size: '45%',\n }),\n )\n : null\n\n return h(\n 'div',\n { class: classes.calendarHeader, 'data-full-width': props.fullWidth || undefined },\n [previousControl, levelControl, nextControl],\n )\n }\n },\n})\n\nexport const WeekdaysRow = defineComponent({\n name: 'WeekdaysRow',\n props: {\n firstDayOfWeek: Number,\n weekendDays: Array as PropType<number[]>,\n locale: String,\n weekdayFormat: {\n type: [String, Function] as PropType<string | ((date: DateStringValue) => string)>,\n default: 'dd',\n },\n withWeekNumbers: Boolean,\n },\n setup(props) {\n const ctx = useDatesContext()\n return () => {\n const first = props.firstDayOfWeek ?? ctx.firstDayOfWeek\n const days = Array.from({ length: 7 }, (_, index) =>\n dayjs('2024-01-07').add((first + index) % 7, 'day'),\n )\n return h('tr', { class: classes.weekdaysRow }, [\n props.withWeekNumbers ? h('th', { class: classes.weekday }) : null,\n ...days.map((date) =>\n h(\n 'th',\n {\n class: classes.weekday,\n 'data-weekend':\n (props.weekendDays ?? ctx.weekendDays).includes(date.day()) || undefined,\n },\n typeof props.weekdayFormat === 'function'\n ? props.weekdayFormat(date.format('YYYY-MM-DD'))\n : date.locale(props.locale || ctx.locale).format(props.weekdayFormat),\n ),\n ),\n ])\n }\n },\n})\n\nexport const Month = defineComponent({\n name: 'Month',\n slots: Object as SlotsType<RenderDaySlots>,\n props: {\n month: { type: String, default: () => dayjs().format('YYYY-MM-DD') },\n value: { type: [String, Array, null] as PropType<DatePickerValueType>, default: null },\n type: { type: String as PropType<DatePickerType>, default: 'default' },\n firstDayOfWeek: Number,\n weekendDays: Array as PropType<number[]>,\n minDate: [String, Date] as PropType<string | Date>,\n maxDate: [String, Date] as PropType<string | Date>,\n excludeDate: Function as PropType<(date: DateStringValue) => boolean>,\n renderDay: Function as PropType<(date: DateStringValue) => VNodeChild>,\n hideOutsideDates: Boolean,\n hideWeekdays: Boolean,\n getDayProps: Function as PropType<(date: DateStringValue) => Record<string, any>>,\n getDayAriaLabel: Function as PropType<(date: DateStringValue) => string>,\n onDayClick: Function as PropType<(date: DateStringValue) => void>,\n onDayMouseEnter: Function as PropType<(date: DateStringValue) => void>,\n withCellSpacing: { type: Boolean, default: true },\n highlightToday: Boolean,\n withWeekNumbers: Boolean,\n static: Boolean,\n fullWidth: Boolean,\n },\n setup(props, { slots }) {\n const ctx = useDatesContext()\n const hovered = ref<string | null>(null)\n\n const dayRefs: (HTMLElement | null | undefined)[][] = []\n\n const isSelected = (date: DateStringValue) => {\n if (props.type === 'multiple') return Array.isArray(props.value) && props.value.includes(date)\n if (props.type === 'range') {\n const [start, end] = Array.isArray(props.value)\n ? (props.value as DatesRangeValue)\n : [null, null]\n return isSameDate(date, start) || isSameDate(date, end)\n }\n return isSameDate(date, props.value as DateValue)\n }\n\n const isInRange = (date: DateStringValue) => {\n if (props.type !== 'range' || !Array.isArray(props.value)) return false\n const [start, end] = props.value as DatesRangeValue\n const rangeEnd = end || hovered.value\n if (!start || !rangeEnd) return false\n return dayjs(date).isAfter(start, 'day') && dayjs(date).isBefore(rangeEnd, 'day')\n }\n\n return () => {\n const first = props.firstDayOfWeek ?? ctx.firstDayOfWeek\n const rows = getMonthDays(props.month, first, ctx.consistentWeeks)\n\n // Only one day in the whole grid is in the tab order (roving tabindex) -\n // prefer the selected date, then today, then the first enabled date.\n const flatDates = rows.flat()\n const isEnabled = (date: DateStringValue) => {\n const outside = !dayjs(date).isSame(props.month, 'month')\n const disabled =\n isBeforeMin(date, props.minDate) ||\n isAfterMax(date, props.maxDate) ||\n props.excludeDate?.(date) ||\n props.getDayProps?.(date)?.disabled\n return !disabled && (!props.hideOutsideDates || !outside)\n }\n const enabledDates = flatDates.filter(isEnabled)\n const dateInTabOrder =\n enabledDates.find((date) => isSelected(date)) ??\n enabledDates.find((date) => dayjs().isSame(date, 'date')) ??\n enabledDates[0]\n\n return h('table', { class: classes.month, 'data-full-width': props.fullWidth || undefined }, [\n props.hideWeekdays\n ? null\n : h('thead', [\n h(WeekdaysRow, {\n firstDayOfWeek: first,\n weekendDays: props.weekendDays,\n withWeekNumbers: props.withWeekNumbers,\n }),\n ]),\n h(\n 'tbody',\n rows.map((week, rowIndex) =>\n h('tr', { class: classes.monthRow }, [\n props.withWeekNumbers\n ? h('td', { class: classes.weekNumber }, getWeekNumber(week[0]))\n : null,\n ...week.map((date, cellIndex) => {\n const outside = !dayjs(date).isSame(props.month, 'month')\n const disabled =\n isBeforeMin(date, props.minDate) ||\n isAfterMax(date, props.maxDate) ||\n props.excludeDate?.(date)\n const dayProps = props.getDayProps?.(date) || {}\n const selected = isSelected(date)\n const [start, end] =\n props.type === 'range' && Array.isArray(props.value)\n ? (props.value as DatesRangeValue)\n : [null, null]\n\n return h(\n 'td',\n {\n class: classes.monthCell,\n 'data-with-spacing': props.withCellSpacing || undefined,\n },\n [\n h(Day, {\n ...dayProps,\n date,\n static: props.static,\n disabled: disabled || dayProps.disabled,\n weekend: (props.weekendDays ?? ctx.weekendDays).includes(dayjs(date).day()),\n outside,\n hidden: props.hideOutsideDates && outside,\n selected,\n inRange: isInRange(date),\n firstInRange: isSameDate(date, start),\n lastInRange: isSameDate(date, end),\n highlightToday: props.highlightToday,\n fullWidth: props.fullWidth,\n renderDay:\n props.renderDay ??\n ((slots.renderDay ?? slots.day)\n ? (date: DateStringValue) => (slots.renderDay ?? slots.day)?.({ date })\n : undefined),\n 'aria-label': props.getDayAriaLabel?.(date),\n tabindex: props.static ? undefined : date === dateInTabOrder ? 0 : -1,\n // Lets a focus-trapped Popover (e.g. DatePickerInput's\n // dropdown) land directly on the selected date instead\n // of the first tabbable element.\n 'data-autofocus': selected || undefined,\n ref: (node: any) => setGridRef(dayRefs, rowIndex, cellIndex, node),\n onClick: (event: MouseEvent) => {\n dayProps.onClick?.(event)\n if (!disabled && !props.static) props.onDayClick?.(date)\n },\n onMouseenter: (event: MouseEvent) => {\n hovered.value = date\n dayProps.onMouseenter?.(event)\n props.onDayMouseEnter?.(date)\n },\n onKeydown: (event: KeyboardEvent) => {\n dayProps.onKeydown?.(event)\n const direction = keyToDirection(event.key)\n if (direction) {\n event.preventDefault()\n focusAdjacentControl(dayRefs, rowIndex, cellIndex, direction)\n }\n },\n }),\n ],\n )\n }),\n ]),\n ),\n ),\n ])\n }\n },\n})\n\nexport const MonthsList = defineComponent({\n name: 'MonthsList',\n props: {\n year: { type: String, default: () => dayjs().format('YYYY-MM-DD') },\n value: [String, Array, null] as PropType<DatePickerValueType>,\n minDate: [String, Date] as PropType<string | Date>,\n maxDate: [String, Date] as PropType<string | Date>,\n locale: String,\n monthsListFormat: {\n type: [String, Function] as PropType<string | ((date: DateStringValue) => string)>,\n default: 'MMM',\n },\n getMonthControlProps: Function as PropType<(date: DateStringValue) => Record<string, any>>,\n onMonthSelect: Function as PropType<(date: DateStringValue) => void>,\n onMonthMouseEnter: Function as PropType<(date: DateStringValue) => void>,\n fullWidth: Boolean,\n },\n setup(props) {\n const controlRefs: (HTMLElement | null | undefined)[][] = []\n return () => {\n const months = Array.from({ length: 12 }, (_, index) =>\n dayjs(props.year).month(index).startOf('month').format('YYYY-MM-DD'),\n )\n const isEnabled = (date: DateStringValue) =>\n !(\n (props.minDate && dayjs(date).endOf('month').isBefore(props.minDate, 'day')) ||\n (props.maxDate && dayjs(date).startOf('month').isAfter(props.maxDate, 'day')) ||\n props.getMonthControlProps?.(date)?.disabled\n )\n const isSelected = (date: DateStringValue) =>\n Array.isArray(props.value)\n ? (props.value as DateStringValue[]).some((item) => dayjs(item).isSame(date, 'month'))\n : !!props.value && dayjs(props.value as any).isSame(date, 'month')\n const enabledMonths = months.filter(isEnabled)\n const monthInTabOrder =\n enabledMonths.find(isSelected) ??\n enabledMonths.find((date) => dayjs().isSame(date, 'month')) ??\n enabledMonths[0]\n\n return h(\n SimpleGrid,\n {\n cols: 3,\n spacing: 4,\n class: classes.controlsGrid,\n 'data-full-width': props.fullWidth || undefined,\n },\n () =>\n months.map((date, index) => {\n const rowIndex = Math.floor(index / 3)\n const cellIndex = index % 3\n const disabled = !isEnabled(date)\n const controlProps = props.getMonthControlProps?.(date) || {}\n return h(\n PickerControl,\n {\n fullWidth: props.fullWidth,\n ...controlProps,\n disabled: disabled || controlProps.disabled,\n selected: isSelected(date),\n tabindex: date === monthInTabOrder ? 0 : -1,\n 'data-autofocus': isSelected(date) || undefined,\n ref: (node: any) => setGridRef(controlRefs, rowIndex, cellIndex, node),\n onClick: (event: MouseEvent) => {\n controlProps.onClick?.(event)\n if (!disabled) props.onMonthSelect?.(date)\n },\n onMouseenter: (event: MouseEvent) => {\n controlProps.onMouseenter?.(event)\n props.onMonthMouseEnter?.(date)\n },\n onKeydown: (event: KeyboardEvent) => {\n controlProps.onKeydown?.(event)\n const direction = keyToDirection(event.key)\n if (direction) {\n event.preventDefault()\n focusAdjacentControl(controlRefs, rowIndex, cellIndex, direction)\n }\n },\n },\n () =>\n typeof props.monthsListFormat === 'function'\n ? props.monthsListFormat(date)\n : dayjs(date)\n .locale(props.locale || 'en')\n .format(props.monthsListFormat),\n )\n }),\n )\n }\n },\n})\n\nexport const YearsList = defineComponent({\n name: 'YearsList',\n props: {\n decade: { type: String, default: () => dayjs().format('YYYY-MM-DD') },\n value: [String, Array, null] as PropType<DatePickerValueType>,\n minDate: [String, Date] as PropType<string | Date>,\n maxDate: [String, Date] as PropType<string | Date>,\n yearsListFormat: {\n type: [String, Function] as PropType<string | ((date: DateStringValue) => string)>,\n default: 'YYYY',\n },\n getYearControlProps: Function as PropType<(date: DateStringValue) => Record<string, any>>,\n onYearSelect: Function as PropType<(date: DateStringValue) => void>,\n onYearMouseEnter: Function as PropType<(date: DateStringValue) => void>,\n fullWidth: Boolean,\n },\n setup(props) {\n const controlRefs: (HTMLElement | null | undefined)[][] = []\n return () => {\n const years = getYearRange(props.decade)\n const isEnabled = (date: DateStringValue) =>\n !(\n (props.minDate && dayjs(date).endOf('year').isBefore(props.minDate, 'day')) ||\n (props.maxDate && dayjs(date).startOf('year').isAfter(props.maxDate, 'day')) ||\n props.getYearControlProps?.(date)?.disabled\n )\n const isSelected = (date: DateStringValue) =>\n Array.isArray(props.value)\n ? (props.value as DateStringValue[]).some((item) => dayjs(item).isSame(date, 'year'))\n : !!props.value && dayjs(props.value as any).isSame(date, 'year')\n const enabledYears = years.filter(isEnabled)\n const yearInTabOrder =\n enabledYears.find(isSelected) ??\n enabledYears.find((date) => dayjs().isSame(date, 'year')) ??\n enabledYears[0]\n\n return h(\n SimpleGrid,\n {\n cols: 3,\n spacing: 4,\n class: classes.controlsGrid,\n 'data-full-width': props.fullWidth || undefined,\n },\n () =>\n years.map((date, index) => {\n const rowIndex = Math.floor(index / 3)\n const cellIndex = index % 3\n const disabled = !isEnabled(date)\n const controlProps = props.getYearControlProps?.(date) || {}\n return h(\n PickerControl,\n {\n fullWidth: props.fullWidth,\n ...controlProps,\n disabled: disabled || controlProps.disabled,\n selected: isSelected(date),\n tabindex: date === yearInTabOrder ? 0 : -1,\n 'data-autofocus': isSelected(date) || undefined,\n ref: (node: any) => setGridRef(controlRefs, rowIndex, cellIndex, node),\n onClick: (event: MouseEvent) => {\n controlProps.onClick?.(event)\n if (!disabled) props.onYearSelect?.(date)\n },\n onMouseenter: (event: MouseEvent) => {\n controlProps.onMouseenter?.(event)\n props.onYearMouseEnter?.(date)\n },\n onKeydown: (event: KeyboardEvent) => {\n controlProps.onKeydown?.(event)\n const direction = keyToDirection(event.key)\n if (direction) {\n event.preventDefault()\n focusAdjacentControl(controlRefs, rowIndex, cellIndex, direction)\n }\n },\n },\n () =>\n typeof props.yearsListFormat === 'function'\n ? props.yearsListFormat(date)\n : dayjs(date).format(props.yearsListFormat),\n )\n }),\n )\n }\n },\n})\n\nfunction getNextLevel(level: CalendarLevel, direction: 'up' | 'down'): CalendarLevel {\n const order: CalendarLevel[] = ['month', 'year', 'decade']\n return order[\n Math.max(0, Math.min(order.length - 1, order.indexOf(level) + (direction === 'up' ? 1 : -1)))\n ]\n}\n\nfunction clampLevel(\n level: CalendarLevel | undefined,\n minLevel: CalendarLevel | undefined,\n maxLevel: CalendarLevel | undefined,\n): CalendarLevel {\n const order: CalendarLevel[] = ['month', 'year', 'decade']\n const toNumber = (value: CalendarLevel | undefined, fallback: number) =>\n value ? order.indexOf(value) : fallback\n const clamped = Math.max(\n toNumber(minLevel, 0),\n Math.min(toNumber(maxLevel, 2), toNumber(level, 0)),\n )\n return order[clamped]\n}\n\nexport const Calendar = defineComponent({\n name: 'Calendar',\n slots: Object as SlotsType<RenderDaySlots>,\n props: {\n defaultLevel: String as PropType<CalendarLevel>,\n level: String as PropType<CalendarLevel>,\n onLevelChange: Function as PropType<(level: CalendarLevel) => void>,\n maxLevel: { type: String as PropType<CalendarLevel>, default: 'decade' },\n minLevel: { type: String as PropType<CalendarLevel>, default: 'month' },\n defaultDate: [String, Date] as PropType<string | Date>,\n date: [String, Date] as PropType<string | Date>,\n onDateChange: Function as PropType<(date: DateStringValue) => void>,\n numberOfColumns: { type: Number, default: 1 },\n columnsToScroll: Number,\n type: { type: String as PropType<DatePickerType>, default: 'default' },\n value: [String, Array, null] as PropType<DatePickerValueType>,\n minDate: [String, Date] as PropType<string | Date>,\n maxDate: [String, Date] as PropType<string | Date>,\n locale: String,\n firstDayOfWeek: Number,\n weekendDays: Array as PropType<number[]>,\n renderDay: Function as PropType<(date: DateStringValue) => VNodeChild>,\n getDayProps: Function as PropType<(date: DateStringValue) => Record<string, any>>,\n getDayAriaLabel: Function as PropType<(date: DateStringValue) => string>,\n getMonthControlProps: Function as PropType<(date: DateStringValue) => Record<string, any>>,\n getYearControlProps: Function as PropType<(date: DateStringValue) => Record<string, any>>,\n excludeDate: Function as PropType<(date: DateStringValue) => boolean>,\n hideOutsideDates: Boolean,\n hideWeekdays: Boolean,\n monthLabelFormat: {\n type: [String, Function] as PropType<string | ((date: DateStringValue) => string)>,\n default: 'MMMM YYYY',\n },\n yearLabelFormat: {\n type: [String, Function] as PropType<string | ((date: DateStringValue) => string)>,\n default: 'YYYY',\n },\n decadeLabelFormat: Function as PropType<\n (start: DateStringValue, end: DateStringValue) => string\n >,\n monthsListFormat: {\n type: [String, Function] as PropType<string | ((date: DateStringValue) => string)>,\n default: 'MMM',\n },\n yearsListFormat: {\n type: [String, Function] as PropType<string | ((date: DateStringValue) => string)>,\n default: 'YYYY',\n },\n onYearSelect: Function as PropType<(date: DateStringValue) => void>,\n onMonthSelect: Function as PropType<(date: DateStringValue) => void>,\n onMonthMouseEnter: Function as PropType<(date: DateStringValue) => void>,\n onYearMouseEnter: Function as PropType<(date: DateStringValue) => void>,\n onDayClick: Function as PropType<(date: DateStringValue) => void>,\n withCellSpacing: { type: Boolean, default: true },\n highlightToday: Boolean,\n withWeekNumbers: Boolean,\n static: Boolean,\n fullWidth: Boolean,\n withNativeLevelSelect: Boolean,\n yearsSelectRange: Array as unknown as PropType<[number, number]>,\n },\n setup(props, { attrs, slots }) {\n const [_level, setLevel] = useUncontrolled<CalendarLevel>({\n value: computed(() =>\n props.level === undefined\n ? undefined\n : clampLevel(props.level, props.minLevel, props.maxLevel),\n ),\n defaultValue:\n props.defaultLevel === undefined\n ? undefined\n : clampLevel(props.defaultLevel, props.minLevel, props.maxLevel),\n finalValue: clampLevel(undefined, props.minLevel, props.maxLevel),\n onChange: (value) => props.onLevelChange?.(value),\n })\n const [_date, setDate] = useUncontrolled<DateStringValue>({\n value: computed(() => normalizeDate(props.date) || undefined),\n defaultValue: normalizeDate(props.defaultDate) || undefined,\n finalValue: getDefaultClampedDate({ minDate: props.minDate, maxDate: props.maxDate }),\n onChange: (value) => props.onDateChange?.(value),\n })\n\n const scroll = props.columnsToScroll || props.numberOfColumns || 1\n const updateDate = (amount: number, unit: 'month' | 'year') => {\n setDate(dayjs(_date.value).add(amount, unit).format('YYYY-MM-DD'))\n }\n\n return () =>\n h(\n Box,\n {\n ...attrs,\n class: [classes.calendar, (attrs as any).class],\n 'data-calendar': true,\n 'data-full-width': props.fullWidth || undefined,\n },\n () =>\n Array.from({ length: props.numberOfColumns || 1 }, (_, column) => {\n const currentDate = dayjs(_date.value)\n .add(\n column * scroll,\n _level.value === 'month' ? 'month' : _level.value === 'year' ? 'year' : 'year',\n )\n .format('YYYY-MM-DD')\n if (_level.value === 'month') {\n return h('div', { class: classes.calendarLevel }, [\n h(CalendarHeader, {\n label:\n typeof props.monthLabelFormat === 'function'\n ? props.monthLabelFormat(currentDate)\n : getMonthLabel(currentDate, props.monthLabelFormat, props.locale),\n hasNextLevel: props.maxLevel !== 'month',\n withPrevious: column === 0,\n withNext: column === (props.numberOfColumns || 1) - 1,\n fullWidth: props.fullWidth,\n withNativeLevelSelect: props.withNativeLevelSelect,\n yearsSelectRange: props.yearsSelectRange,\n calendarLevel: 'month',\n date: currentDate,\n locale: props.locale,\n onDateChange: setDate,\n minDate: props.minDate,\n maxDate: props.maxDate,\n disableNativeLevelSelect: props.date !== undefined && !props.onDateChange,\n onPrevious: () => updateDate(-scroll, 'month'),\n onNext: () => updateDate(scroll, 'month'),\n onLevelClick: () => setLevel(getNextLevel(_level.value, 'up')),\n }),\n h(Month, {\n month: currentDate,\n value: props.value,\n type: props.type,\n minDate: props.minDate,\n maxDate: props.maxDate,\n firstDayOfWeek: props.firstDayOfWeek,\n weekendDays: props.weekendDays,\n renderDay:\n props.renderDay ??\n ((slots.renderDay ?? slots.day)\n ? (date: DateStringValue) => (slots.renderDay ?? slots.day)?.({ date })\n : undefined),\n getDayProps: props.getDayProps,\n getDayAriaLabel: props.getDayAriaLabel,\n excludeDate: props.excludeDate,\n hideOutsideDates: props.hideOutsideDates,\n hideWeekdays: props.hideWeekdays,\n withCellSpacing: props.withCellSpacing,\n highlightToday: props.highlightToday,\n withWeekNumbers: props.withWeekNumbers,\n static: props.static,\n fullWidth: props.fullWidth,\n onDayClick: props.onDayClick,\n }),\n ])\n }\n\n if (_level.value === 'year') {\n return h('div', { class: classes.calendarLevel }, [\n h(CalendarHeader, {\n label:\n typeof props.yearLabelFormat === 'function'\n ? props.yearLabelFormat(currentDate)\n : dayjs(currentDate).format(props.yearLabelFormat),\n hasNextLevel: props.maxLevel === 'decade',\n withPrevious: column === 0,\n withNext: column === (props.numberOfColumns || 1) - 1,\n fullWidth: props.fullWidth,\n withNativeLevelSelect: props.withNativeLevelSelect,\n yearsSelectRange: props.yearsSelectRange,\n calendarLevel: 'year',\n date: currentDate,\n locale: props.locale,\n onDateChange: setDate,\n minDate: props.minDate,\n maxDate: props.maxDate,\n disableNativeLevelSelect: props.date !== undefined && !props.onDateChange,\n onPrevious: () => updateDate(-scroll, 'year'),\n onNext: () => updateDate(scroll, 'year'),\n onLevelClick: () => setLevel(getNextLevel(_level.value, 'up')),\n }),\n h(MonthsList, {\n year: currentDate,\n value: props.value,\n minDate: props.minDate,\n maxDate: props.maxDate,\n monthsListFormat: props.monthsListFormat,\n getMonthControlProps: props.getMonthControlProps,\n fullWidth: props.fullWidth,\n onMonthMouseEnter: props.onMonthMouseEnter,\n onMonthSelect: (date: DateStringValue) => {\n setDate(date)\n props.onMonthSelect?.(date)\n // Clamp instead of forcing 'month': for MonthPicker\n // (minLevel: 'year') this keeps the view at 'year'\n // instead of incorrectly drilling into a day grid.\n setLevel(clampLevel('month', props.minLevel, props.maxLevel))\n },\n }),\n ])\n }\n\n const years = getYearRange(currentDate)\n return h('div', { class: classes.calendarLevel }, [\n h(CalendarHeader, {\n label: props.decadeLabelFormat\n ? props.decadeLabelFormat(years[0], years[years.length - 1])\n : getDecadeLabel(currentDate),\n withPrevious: column === 0,\n withNext: column === (props.numberOfColumns || 1) - 1,\n hasNextLevel: false,\n fullWidth: props.fullWidth,\n onPrevious: () => updateDate(-10 * scroll, 'year'),\n onNext: () => updateDate(10 * scroll, 'year'),\n }),\n h(YearsList, {\n decade: currentDate,\n value: props.value,\n minDate: props.minDate,\n maxDate: props.maxDate,\n yearsListFormat: props.yearsListFormat,\n getYearControlProps: props.getYearControlProps,\n fullWidth: props.fullWidth,\n onYearMouseEnter: props.onYearMouseEnter,\n onYearSelect: (date: DateStringValue) => {\n setDate(date)\n props.onYearSelect?.(date)\n // Clamp instead of forcing 'year': for YearPicker\n // (minLevel: 'decade') this keeps the view at 'decade'\n // instead of incorrectly drilling into the months grid.\n setLevel(clampLevel('year', props.minLevel, props.maxLevel))\n },\n }),\n ])\n }),\n )\n },\n})\n\nexport const MonthLevel = Calendar\nexport const YearLevel = Calendar\nexport const DecadeLevel = Calendar\nexport const MonthLevelGroup = Calendar\nexport const YearLevelGroup = Calendar\nexport const DecadeLevelGroup = Calendar\nexport const LevelsGroup = Calendar\n\n// Granularity-aware range check for month/year range hover-previews, where\n// day-level ms precision doesn't apply - sorts the range endpoints then checks\n// date falls within [min, max] inclusive at the given unit.\nfunction isInRangeGranular(\n date: DateStringValue,\n range: [DateStringValue, DateStringValue],\n unit: 'month' | 'year',\n) {\n const sorted = [...range].sort((a, b) => (dayjs(a).isAfter(dayjs(b)) ? 1 : -1))\n return !dayjs(date).isBefore(sorted[0], unit) && !dayjs(date).isAfter(sorted[1], unit)\n}\n\nfunction getNextPickerValue(\n value: DatePickerValueType,\n date: DateStringValue,\n type: DatePickerType,\n sortDates = true,\n) {\n if (type === 'multiple') {\n const next = Array.isArray(value) ? [...(value as DateStringValue[])] : []\n const index = next.findIndex((item) => isSameDate(item, date))\n if (index >= 0) next.splice(index, 1)\n else next.push(date)\n return sortDates ? next.sort((a, b) => dayjs(a).valueOf() - dayjs(b).valueOf()) : next\n }\n\n if (type === 'range') {\n const [start, end] = Array.isArray(value) ? (value as DatesRangeValue) : [null, null]\n if (!start || (start && end) || dayjs(date).isBefore(start, 'day')) {\n return [date, null] as DatesRangeValue\n }\n return [start, date] as DatesRangeValue\n }\n\n return date\n}\n\nexport const DatePicker = defineComponent({\n name: 'DatePicker',\n slots: Object as SlotsType<RenderDaySlots>,\n props: {\n type: { type: String as PropType<DatePickerType>, default: 'default' },\n modelValue: [String, Array, null] as PropType<DatePickerValueType>,\n value: [String, Array, null] as PropType<DatePickerValueType>,\n defaultValue: [String, Array, null] as PropType<DatePickerValueType>,\n onChange: Function as PropType<(value: DatePickerValueType) => void>,\n allowDeselect: { type: Boolean, default: true },\n sortDates: { type: Boolean, default: true },\n presets: Array as PropType<Array<{ value: DatePickerValueType; label: string }>>,\n withNativeLevelSelect: Boolean,\n yearsSelectRange: Array as unknown as PropType<[number, number]>,\n },\n emits: ['update:modelValue', 'change'],\n setup(props, { attrs, slots, emit }) {\n const finalValue = computed<DatePickerValueType>(() =>\n props.type === 'multiple' ? [] : props.type === 'range' ? [null, null] : null,\n )\n const [_value, setValue] = useUncontrolled<DatePickerValueType>({\n value: computed(() => (props.modelValue !== undefined ? props.modelValue : props.value)),\n defaultValue: props.defaultValue,\n finalValue: finalValue.value,\n onChange: (value) => {\n emit('update:modelValue', value)\n emit('change', value)\n },\n })\n const selectDate = (date: DateStringValue) => {\n if (\n props.type === 'default' &&\n props.allowDeselect &&\n isSameDate(_value.value as DateValue, date)\n ) {\n setValue(null)\n } else {\n setValue(getNextPickerValue(_value.value, date, props.type, props.sortDates))\n }\n }\n\n // When presets are used, selecting one must also jump the Calendar's\n // displayed date/level to the preset's month. Calendar's onDateChange/\n // onLevelChange mirror its internal navigation back into these refs even\n // while `date`/`level` stay undefined (uncontrolled) - useUncontrolled\n // always invokes onChange regardless of controlled state - so passing\n // them through is a no-op until a preset click gives them a real value.\n const calendarDate = ref<DateStringValue | undefined>(undefined)\n const calendarLevel = ref<CalendarLevel | undefined>(undefined)\n const selectPreset = (value: DatePickerValueType) => {\n const date = Array.isArray(value) ? value[0] : value\n if (date != null) {\n calendarDate.value = date\n calendarLevel.value = 'month'\n }\n setValue(value)\n }\n\n return () => {\n const calendar = h(\n Calendar,\n {\n ...attrs,\n type: props.type,\n value: _value.value,\n date: calendarDate.value,\n onDateChange: (date: DateStringValue) => (calendarDate.value = date),\n level: calendarLevel.value,\n onLevelChange: (level: CalendarLevel) => (calendarLevel.value = level),\n withNativeLevelSelect: props.withNativeLevelSelect,\n yearsSelectRange: props.yearsSelectRange,\n onDayClick: selectDate,\n },\n {\n renderDay: slots.renderDay,\n day: slots.day,\n },\n )\n\n if (!props.presets?.length) return calendar\n\n return h('div', { class: classes.datePickerRoot }, [\n h(\n 'div',\n { class: classes.presetsList },\n props.presets.map((preset, index) =>\n h(\n UnstyledButton,\n {\n key: index,\n class: classes.presetButton,\n onClick: () => selectPreset(preset.value),\n onMousedown: (event: MouseEvent) => event.preventDefault(),\n },\n () => preset.label,\n ),\n ),\n ),\n calendar,\n ])\n }\n },\n})\n\n// YearPicker/MonthPicker used to be thin wrappers around DatePicker with\n// just a different minLevel/defaultLevel. That doesn't work: DatePicker only\n// ever wires Calendar's `onDayClick` to update its value, but with\n// minLevel=\"year\"/\"decade\" the day grid is never reached at all - selection\n// happens via Calendar's onMonthSelect/onYearSelect instead, which DatePicker\n// never listens to. The value was therefore never updated, so nothing ever\n// appeared selected. These are real, separate implementations now, each\n// wiring the selection callback that actually fires at their level.\nexport const YearPicker = defineComponent({\n name: 'YearPicker',\n props: {\n type: { type: String as PropType<DatePickerType>, default: 'default' },\n modelValue: [String, Array, null] as PropType<DatePickerValueType>,\n value: [String, Array, null] as PropType<DatePickerValueType>,\n defaultValue: [String, Array, null] as PropType<DatePickerValueType>,\n onChange: Function as PropType<(value: DatePickerValueType) => void>,\n allowDeselect: { type: Boolean, default: true },\n sortDates: { type: Boolean, default: true },\n presets: Array as PropType<Array<{ value: DatePickerValueType; label: string }>>,\n onYearSelect: Function as PropType<(date: DateStringValue) => void>,\n withNativeLevelSelect: Boolean,\n yearsSelectRange: Array as unknown as PropType<[number, number]>,\n },\n emits: ['update:modelValue', 'change'],\n setup(props, { attrs, emit }) {\n const finalValue = computed<DatePickerValueType>(() =>\n props.type === 'multiple' ? [] : props.type === 'range' ? [null, null] : null,\n )\n const [_value, setValue] = useUncontrolled<DatePickerValueType>({\n value: computed(() => (props.modelValue !== undefined ? props.modelValue : props.value)),\n defaultValue: props.defaultValue,\n finalValue: finalValue.value,\n onChange: (value) => {\n emit('update:modelValue', value)\n emit('change', value)\n },\n })\n const hoveredDate = ref<DateStringValue | null>(null)\n const selectYear = (date: DateStringValue) => {\n if (\n props.type === 'default' &&\n props.allowDeselect &&\n isSameDate(_value.value as DateValue, date)\n ) {\n setValue(null)\n } else {\n setValue(getNextPickerValue(_value.value, date, props.type, props.sortDates))\n }\n hoveredDate.value = null\n props.onYearSelect?.(date)\n }\n // For type=\"range\", PickerControl needs inRange/firstInRange/lastInRange\n // (not just `selected`) to draw the connecting highlight between the\n // start and end year. While only the start of the range is picked,\n // hovering over other years previews the highlight up to the hovered year.\n const yearControlProps = (date: DateStringValue) => {\n const external = (attrs as any).getYearControlProps?.(date) || {}\n if (props.type !== 'range' || !Array.isArray(_value.value)) return external\n const [start, end] = _value.value as DatesRangeValue\n const hovered = start && !end ? hoveredDate.value : null\n const inRange =\n start && hovered\n ? isInRangeGranular(date, [hovered, start], 'year')\n : start && end\n ? isInRangeGranular(date, [start, end], 'year')\n : false\n const firstInRange = start\n ? dayjs(date).isSame(start, 'year') && !(hovered && dayjs(hovered).isBefore(start, 'year'))\n : false\n const lastInRange = end\n ? dayjs(date).isSame(end, 'year')\n : !!(\n start &&\n hovered &&\n dayjs(hovered).isBefore(start, 'year') &&\n dayjs(date).isSame(start, 'year')\n )\n return {\n inRange,\n firstInRange,\n lastInRange,\n ...external,\n }\n }\n const calendarDate = ref<DateStringValue | undefined>(undefined)\n const selectPreset = (value: DatePickerValueType) => {\n const date = Array.isArray(value) ? value[0] : value\n if (date != null) calendarDate.value = date\n setValue(value)\n }\n\n return () => {\n const calendar = h(Calendar, {\n ...attrs,\n type: props.type,\n value: _value.value,\n date: calendarDate.value,\n onDateChange: (date: DateStringValue) => (calendarDate.value = date),\n defaultLevel: 'decade',\n minLevel: 'decade',\n withNativeLevelSelect: props.withNativeLevelSelect,\n yearsSelectRange: props.yearsSelectRange,\n onYearSelect: selectYear,\n getYearControlProps: yearControlProps,\n onYearMouseEnter: (date: DateStringValue) => {\n const [start, end] = Array.isArray(_value.value)\n ? (_value.value as DatesRangeValue)\n : [null, null]\n if (props.type === 'range' && start && !end) hoveredDate.value = date\n },\n onMouseleave: () => {\n hoveredDate.value = null\n },\n })\n\n if (!props.presets?.length) return calendar\n\n return h('div', { class: classes.datePickerRoot }, [\n h(\n 'div',\n { class: classes.presetsList },\n props.presets.map((preset, index) =>\n h(\n UnstyledButton,\n {\n key: index,\n class: classes.presetButton,\n onClick: () => selectPreset(preset.value),\n onMousedown: (event: MouseEvent) => event.preventDefault(),\n },\n () => preset.label,\n ),\n ),\n ),\n calendar,\n ])\n }\n },\n})\n\nexport const MonthPicker = defineComponent({\n name: 'MonthPicker',\n props: {\n type: { type: String as PropType<DatePickerType>, default: 'default' },\n modelValue: [String, Array, null] as PropType<DatePickerValueType>,\n value: [String, Array, null] as PropType<DatePickerValueType>,\n defaultValue: [String, Array, null] as PropType<DatePickerValueType>,\n onChange: Function as PropType<(value: DatePickerValueType) => void>,\n allowDeselect: { type: Boolean, default: true },\n sortDates: { type: Boolean, default: true },\n presets: Array as PropType<Array<{ value: DatePickerValueType; label: string }>>,\n onMonthSelect: Function as PropType<(date: DateStringValue) => void>,\n withNativeLevelSelect: Boolean,\n yearsSelectRange: Array as unknown as PropType<[number, number]>,\n },\n emits: ['update:modelValue', 'change'],\n setup(props, { attrs, emit }) {\n const finalValue = computed<DatePickerValueType>(() =>\n props.type === 'multiple' ? [] : props.type === 'range' ? [null, null] : null,\n )\n const [_value, setValue] = useUncontrolled<DatePickerValueType>({\n value: computed(() => (props.modelValue !== undefined ? props.modelValue : props.value)),\n defaultValue: props.defaultValue,\n finalValue: finalValue.value,\n onChange: (value) => {\n emit('update:modelValue', value)\n emit('change', value)\n },\n })\n const hoveredDate = ref<DateStringValue | null>(null)\n const selectMonth = (date: DateStringValue) => {\n if (\n props.type === 'default' &&\n props.allowDeselect &&\n isSameDate(_value.value as DateValue, date)\n ) {\n setValue(null)\n } else {\n setValue(getNextPickerValue(_value.value, date, props.type, props.sortDates))\n }\n hoveredDate.value = null\n props.onMonthSelect?.(date)\n }\n // For type=\"range\", PickerControl needs inRange/firstInRange/lastInRange\n // (not just `selected`) to draw the connecting highlight between the\n // start and end month. While only the start of the range is picked,\n // hovering over other months previews the highlight up to the hovered month.\n const monthControlProps = (date: DateStringValue) => {\n const external = (attrs as any).getMonthControlProps?.(date) || {}\n if (props.type !== 'range' || !Array.isArray(_value.value)) return external\n const [start, end] = _value.value as DatesRangeValue\n const hovered = start && !end ? hoveredDate.value : null\n const inRange =\n start && hovered\n ? isInRangeGranular(date, [hovered, start], 'month')\n : start && end\n ? isInRangeGranular(date, [start, end], 'month')\n : false\n const firstInRange = start\n ? dayjs(date).isSame(start, 'month') &&\n !(hovered && dayjs(hovered).isBefore(start, 'month'))\n : false\n const lastInRange = end\n ? dayjs(date).isSame(end, 'month')\n : !!(\n start &&\n hovered &&\n dayjs(hovered).isBefore(start, 'month') &&\n dayjs(date).isSame(start, 'month')\n )\n return {\n inRange,\n firstInRange,\n lastInRange,\n ...external,\n }\n }\n const calendarDate = ref<DateStringValue | undefined>(undefined)\n const selectPreset = (value: DatePickerValueType) => {\n const date = Array.isArray(value) ? value[0] : value\n if (date != null) calendarDate.value = date\n setValue(value)\n }\n\n return () => {\n const calendar = h(Calendar, {\n ...attrs,\n type: props.type,\n value: _value.value,\n date: calendarDate.value,\n onDateChange: (date: DateStringValue) => (calendarDate.value = date),\n defaultLevel: 'year',\n minLevel: 'year',\n withNativeLevelSelect: props.withNativeLevelSelect,\n yearsSelectRange: props.yearsSelectRange,\n onMonthSelect: selectMonth,\n getMonthControlProps: monthControlProps,\n onMonthMouseEnter: (date: DateStringValue) => {\n const [start, end] = Array.isArray(_value.value)\n ? (_value.value as DatesRangeValue)\n : [null, null]\n if (props.type === 'range' && start && !end) hoveredDate.value = date\n },\n onMouseleave: () => {\n hoveredDate.value = null\n },\n })\n\n if (!props.presets?.length) return calendar\n\n return h('div', { class: classes.datePickerRoot }, [\n h(\n 'div',\n { class: classes.presetsList },\n props.presets.map((preset, index) =>\n h(\n UnstyledButton,\n {\n key: index,\n class: classes.presetButton,\n onClick: () => selectPreset(preset.value),\n onMousedown: (event: MouseEvent) => event.preventDefault(),\n },\n () => preset.label,\n ),\n ),\n ),\n calendar,\n ])\n }\n },\n})\n\nexport const PickerInputBase = defineComponent({\n name: 'PickerInputBase',\n props: {\n formattedValue: { type: String, default: '' },\n dropdownOpened: Boolean,\n dropdownType: { type: String as PropType<'popover' | 'modal'>, default: 'popover' },\n label: [String, Number, Object, Function] as PropType<any>,\n placeholder: String,\n clearable: Boolean,\n disabled: Boolean,\n required: Boolean,\n error: [String, Boolean] as PropType<any>,\n size: { type: [String, Number], default: 'sm' },\n variant: String as PropType<'default' | 'filled' | 'unstyled'>,\n onClear: Function as PropType<() => void>,\n onDropdownClose: Function as PropType<() => void>,\n onDropdownOpen: Function as PropType<() => void>,\n },\n emits: ['click'],\n inheritAttrs: false,\n setup(props, { slots, emit, attrs }) {\n const opened = ref(props.dropdownOpened)\n watch(\n () => props.dropdownOpened,\n (value) => {\n opened.value = value\n },\n )\n const close = () => {\n opened.value = false\n props.onDropdownClose?.()\n }\n const open = () => {\n if (!props.disabled) {\n opened.value = true\n props.onDropdownOpen?.()\n }\n }\n\n const target = () =>\n h(\n InputBase,\n {\n ...attrs,\n component: 'button',\n type: 'button',\n label: props.label,\n placeholder: props.placeholder,\n disabled: props.disabled,\n required: props.required,\n error: props.error,\n pointer: true,\n size: props.size,\n variant: props.variant,\n rightSection:\n props.clearable && props.formattedValue\n ? h(CloseButton, {\n size: props.size,\n onMousedown: (event: MouseEvent) => event.stopPropagation(),\n onClick: (event: MouseEvent) => {\n event.stopPropagation()\n props.onClear?.()\n },\n })\n : undefined,\n // A manually-supplied rightSection defaults to pointer-events:none\n // (it's normally just a decorative icon), so the clear button would\n // render but never receive clicks unless we explicitly re-enable\n // pointer events for it here.\n rightSectionPointerEvents: props.clearable && props.formattedValue ? 'all' : undefined,\n onClick: (event: MouseEvent) => {\n emit('click', event)\n open()\n },\n },\n () =>\n props.formattedValue\n ? h('span', props.formattedValue)\n : h('span', { class: classes.placeholder }, props.placeholder),\n )\n\n return () =>\n props.dropdownType === 'modal'\n ? h(Box, null, () => [\n target(),\n h(\n Modal,\n { opened: opened.value, onClose: close, title: props.label, size: 'auto' },\n () => slots.default?.({ close }),\n ),\n ])\n : h(\n Popover,\n {\n opened: opened.value,\n onChange: (value: boolean) => (value ? open() : close()),\n position: 'bottom-start',\n trapFocus: true,\n returnFocus: false,\n },\n () => [\n h(Popover.Target, null, target),\n h(Popover.Dropdown, { class: classes.dropdown }, () => slots.default?.({ close })),\n ],\n )\n },\n})\n\nfunction createPickerInput(\n name: string,\n Picker: any,\n defaultLevel?: CalendarLevel,\n defaultValueFormat: string = 'MMMM D, YYYY',\n) {\n return defineComponent({\n name,\n props: {\n type: { type: String as PropType<DatePickerType>, default: 'default' },\n modelValue: [String, Array, null] as PropType<DatePickerValueType>,\n value: [String, Array, null] as PropType<DatePickerValueType>,\n defaultValue: [String, Array, null] as PropType<DatePickerValueType>,\n onChange: Function as PropType<(value: DatePickerValueType) => void>,\n valueFormat: { type: String, default: defaultValueFormat },\n labelSeparator: { type: String, default: '–' },\n locale: String,\n placeholder: String,\n label: [String, Number, Object, Function] as PropType<any>,\n clearable: Boolean,\n closeOnChange: { type: Boolean, default: true },\n sortDates: { type: Boolean, default: true },\n valueFormatter: Function as PropType<DateFormatter>,\n withNativeLevelSelect: Boolean,\n yearsSelectRange: Array as unknown as PropType<[number, number]>,\n },\n emits: ['update:modelValue', 'change'],\n setup(props, { attrs, emit }) {\n const finalValue = computed<DatePickerValueType>(() =>\n props.type === 'multiple' ? [] : props.type === 'range' ? [null, null] : null,\n )\n const [_value, setValue] = useUncontrolled<DatePickerValueType>({\n value: computed(() => (props.modelValue !== undefined ? props.modelValue : props.value)),\n defaultValue: props.defaultValue,\n finalValue: finalValue.value,\n onChange: (value) => {\n emit('update:modelValue', value)\n emit('change', value)\n },\n })\n const opened = ref(false)\n const formattedValue = computed(() =>\n formatValue(\n _value.value,\n props.type,\n props.valueFormat,\n props.locale,\n props.labelSeparator,\n props.valueFormatter,\n ),\n )\n return () =>\n h(\n PickerInputBase,\n {\n ...attrs,\n formattedValue: formattedValue.value,\n dropdownOpened: opened.value,\n label: props.label,\n placeholder: props.placeholder,\n clearable: props.clearable,\n onDropdownOpen: () => (opened.value = true),\n onDropdownClose: () => (opened.value = false),\n onClear: () => setValue(finalValue.value),\n },\n {\n default: ({ close }: any) =>\n h(Picker, {\n ...attrs,\n type: props.type,\n value: _value.value,\n sortDates: props.sortDates,\n defaultLevel,\n locale: props.locale,\n withNativeLevelSelect: props.withNativeLevelSelect,\n yearsSelectRange: props.yearsSelectRange,\n onChange: (value: DatePickerValueType) => {\n setValue(value)\n if (props.closeOnChange && props.type === 'default') close()\n },\n }),\n },\n )\n },\n })\n}\n\nexport const DatePickerInput = createPickerInput('DatePickerInput', DatePicker)\nexport const MonthPickerInput = createPickerInput(\n 'MonthPickerInput',\n MonthPicker,\n 'year',\n 'MMMM YYYY',\n)\nexport const YearPickerInput = createPickerInput('YearPickerInput', YearPicker, 'decade', 'YYYY')\n\nexport const HiddenDatesInput = defineComponent({\n name: 'HiddenDatesInput',\n props: {\n name: String,\n value: [String, Array, null] as PropType<DatePickerValueType>,\n },\n setup(props) {\n return () => {\n const value = Array.isArray(props.value)\n ? props.value.filter(Boolean).join(',')\n : props.value || ''\n return h('input', { type: 'hidden', name: props.name, value })\n }\n },\n})\n\nexport function dateStringParser(value: string, format = 'MMMM D, YYYY', locale?: string) {\n return dayjs(value, format, locale || 'en', true).format('YYYY-MM-DD')\n}\n\nexport function isDateValid({\n date,\n minDate,\n maxDate,\n}: {\n date: string\n minDate?: string | Date\n maxDate?: string | Date\n}) {\n const parsed = dayjs(date)\n return (\n parsed.isValid() &&\n !isBeforeMin(parsed.format('YYYY-MM-DD'), minDate) &&\n !isAfterMax(parsed.format('YYYY-MM-DD'), maxDate)\n )\n}\n\nexport const DateInput = defineComponent({\n name: 'DateInput',\n inheritAttrs: false,\n props: {\n modelValue: [String, Date, null] as PropType<string | Date | null>,\n value: [String, Date, null] as PropType<string | Date | null>,\n defaultValue: [String, Date, null] as PropType<string | Date | null>,\n onChange: Function as PropType<(value: DateValue) => void>,\n valueFormat: { type: String, default: 'MMMM D, YYYY' },\n dateParser: Function as PropType<(value: string) => DateStringValue | null>,\n locale: String,\n clearable: Boolean,\n minDate: [String, Date] as PropType<string | Date>,\n maxDate: [String, Date] as PropType<string | Date>,\n presets: Array as PropType<Array<{ value: DateValue; label: string }>>,\n },\n // A free-text input that also opens a Calendar dropdown (in a Popover,\n // same as DatePickerInput) on focus/click, so users can either type a\n // date or pick it from the calendar.\n emits: ['update:modelValue', 'change'],\n setup(props, { attrs, emit }) {\n const [_value, setValue] = useUncontrolled<DateValue>({\n // normalizeDate() coerces a missing prop to `null`, but useUncontrolled\n // relies on strict `undefined` to detect \"no value prop passed\" (i.e.\n // uncontrolled usage). Coercing to null here made the component always\n // look controlled-with-null, so setValue() never actually updated\n // anything without an external value/onChange binding.\n value: computed(() => {\n const controlledValue = props.modelValue !== undefined ? props.modelValue : props.value\n return controlledValue === undefined ? undefined : normalizeDate(controlledValue)\n }),\n defaultValue: normalizeDate(props.defaultValue),\n finalValue: null,\n onChange: (value) => {\n emit('update:modelValue', value)\n emit('change', value)\n },\n })\n const formatValue = (value: DateValue) =>\n value\n ? dayjs(value)\n .locale(props.locale || 'en')\n .format(props.valueFormat)\n : ''\n const inputValue = ref(formatValue(_value.value))\n const opened = ref(false)\n watch(_value, (value) => {\n if (!opened.value) inputValue.value = formatValue(value)\n })\n const parseInput = (raw: string): DateStringValue | null => {\n const parsed =\n props.dateParser?.(raw) || dateStringParser(raw, props.valueFormat, props.locale)\n return dayjs(parsed).isValid() &&\n isDateValid({ date: parsed, minDate: props.minDate, maxDate: props.maxDate })\n ? parsed\n : null\n }\n const commit = () => {\n opened.value = false\n if (!inputValue.value.trim()) {\n if (props.clearable) setValue(null)\n else inputValue.value = formatValue(_value.value)\n return\n }\n const parsed = parseInput(inputValue.value)\n if (parsed) {\n setValue(parsed)\n } else {\n // Invalid input reverts to the last known valid value on blur.\n inputValue.value = formatValue(_value.value)\n }\n }\n const selectDay = (date: DateStringValue) => {\n setValue(date)\n inputValue.value = formatValue(date)\n opened.value = false\n }\n return () =>\n h(Box, null, () =>\n h(\n Popover,\n {\n opened: opened.value,\n onChange: (v: boolean) => (opened.value = v),\n position: 'bottom-start',\n },\n () => [\n h(Popover.Target, null, () =>\n h(InputBase, {\n ...attrs,\n value: inputValue.value,\n onInput: (event: Event) =>\n (inputValue.value = (event.target as HTMLInputElement).value),\n onFocus: () => (opened.value = true),\n onClick: () => (opened.value = true),\n onBlur: commit,\n onKeydown: (event: KeyboardEvent) => {\n if (event.key === 'Escape') opened.value = false\n },\n rightSection:\n props.clearable && _value.value\n ? h(CloseButton, {\n onMousedown: (event: MouseEvent) => event.stopPropagation(),\n onClick: (event: MouseEvent) => {\n event.stopPropagation()\n inputValue.value = ''\n setValue(null)\n },\n })\n : undefined,\n // Without this, the rightSection div defaults to\n // pointer-events:none (it's normally a decorative icon),\n // so the clear button would render but never be clickable.\n rightSectionPointerEvents: props.clearable && _value.value ? 'all' : undefined,\n }),\n ),\n h(\n Popover.Dropdown,\n { onMousedown: (event: MouseEvent) => event.preventDefault() },\n () => [\n props.presets?.length\n ? h(Group, { gap: 4, mb: 4 }, () =>\n props.presets?.map((preset, index) =>\n h(\n Button,\n {\n key: index,\n size: 'xs',\n variant: 'light',\n onClick: () => selectDay(preset.value as DateStringValue),\n },\n () => preset.label,\n ),\n ),\n )\n : null,\n h(Calendar, {\n defaultDate: _value.value || undefined,\n minDate: props.minDate,\n maxDate: props.maxDate,\n locale: props.locale,\n getDayProps: (date: DateStringValue) => ({\n selected: isSameDate(date, _value.value),\n onClick: () => selectDay(date),\n }),\n }),\n ],\n ),\n ],\n ),\n )\n },\n})\n\nfunction splitTimeString(value = '') {\n const [time = '', period] = value.split(' ')\n const [hours = '00', minutes = '00', seconds = '00'] = time.split(':')\n return { hours, minutes, seconds, period }\n}\n\nexport function padTime(value: number | string) {\n return String(value).padStart(2, '0')\n}\n\nexport interface TimePickerAmPmLabels {\n am: string\n pm: string\n}\n\nconst defaultAmPmLabels: TimePickerAmPmLabels = { am: 'AM', pm: 'PM' }\n\nexport function getParsedTime({\n time,\n format,\n amPmLabels = defaultAmPmLabels,\n}: {\n time: string\n format: '12h' | '24h'\n amPmLabels?: TimePickerAmPmLabels\n}): { hours: number | null; minutes: number | null; seconds: number | null; amPm: string | null } {\n if (!time) return { hours: null, minutes: null, seconds: null, amPm: null }\n const { hours, minutes, seconds } = splitTimeString(time)\n const h24 = Number(hours)\n const m = Number(minutes)\n const s = Number(seconds)\n if (format === '12h') {\n const amPm = h24 >= 12 ? amPmLabels.pm : amPmLabels.am\n const hour12 = h24 % 12 === 0 ? 12 : h24 % 12\n return { hours: hour12, minutes: m, seconds: s, amPm }\n }\n return { hours: h24, minutes: m, seconds: s, amPm: null }\n}\n\nexport function getTimeString({\n hours,\n minutes,\n seconds,\n format = '24h',\n withSeconds = false,\n amPm = null,\n amPmLabels = defaultAmPmLabels,\n}: {\n hours: number | null\n minutes: number | null\n seconds?: number | null\n format?: '12h' | '24h'\n withSeconds?: boolean\n amPm?: string | null\n amPmLabels?: TimePickerAmPmLabels\n}): { valid: boolean; value: string } {\n if (hours === null || minutes === null) return { valid: false, value: '' }\n if (withSeconds && (seconds === null || seconds === undefined)) return { valid: false, value: '' }\n\n if (format === '24h') {\n return {\n valid: true,\n value: `${padTime(hours)}:${padTime(minutes)}${withSeconds ? `:${padTime(seconds || 0)}` : ''}`,\n }\n }\n\n if (amPm === null) return { valid: false, value: '' }\n let h24 = hours\n if (amPm === amPmLabels.pm && hours !== 12) h24 += 12\n else if (amPm === amPmLabels.am && hours === 12) h24 = 0\n return {\n valid: true,\n value: `${padTime(h24)}:${padTime(minutes)}${withSeconds ? `:${padTime(seconds || 0)}` : ''}`,\n }\n}\n\nexport function timeToSeconds(value: string) {\n const { hours, minutes, seconds } = splitTimeString(value)\n return Number(hours) * 3600 + Number(minutes) * 60 + Number(seconds || 0)\n}\n\nexport function isSameTime(a?: string, b?: string) {\n return !!a && !!b && timeToSeconds(a) === timeToSeconds(b)\n}\n\nexport function compareTime(a: string, b: string) {\n return timeToSeconds(a) - timeToSeconds(b)\n}\n\nexport function clampTime(value: string, min?: string, max?: string) {\n if (min && compareTime(value, min) < 0) return min\n if (max && compareTime(value, max) > 0) return max\n return value\n}\n\nexport function getTimeRange(start: string, end: string, step = 60) {\n const result: string[] = []\n for (let current = timeToSeconds(start); current <= timeToSeconds(end); current += step) {\n const hours = Math.floor(current / 3600)\n const minutes = Math.floor((current % 3600) / 60)\n result.push(`${padTime(hours)}:${padTime(minutes)}`)\n }\n return result\n}\n\nexport const TimeInput = defineComponent({\n name: 'TimeInput',\n props: {\n withSeconds: Boolean,\n modelValue: String,\n value: String,\n defaultValue: String,\n onChange: Function as PropType<(value: string) => void>,\n },\n emits: ['update:modelValue', 'change'],\n setup(props, { attrs, emit }) {\n return () =>\n h(InputBase, {\n ...attrs,\n type: 'time',\n step: props.withSeconds ? 1 : 60,\n modelValue: props.modelValue,\n value: props.value,\n defaultValue: props.defaultValue,\n 'onUpdate:modelValue': (value: string) => emit('update:modelValue', value),\n onChange: (value: string) => emit('change', value),\n })\n },\n})\n\n// TimeGrid renders its own TimeGridControl (a bordered/pill-shaped\n// default-variant button) rather than reusing PickerControl (which is styled\n// for square date-picker day/month/year cells).\nexport const TimeGrid = defineComponent({\n name: 'TimeGrid',\n props: {\n data: { type: Array as PropType<string[]>, default: () => [] },\n modelValue: String,\n value: String,\n defaultValue: String,\n minTime: String,\n maxTime: String,\n allowDeselect: Boolean,\n disabled: Boolean,\n onChange: Function as PropType<(value: string | null) => void>,\n getControlProps: Function as PropType<(value: string) => Record<string, any>>,\n },\n emits: ['update:modelValue', 'change'],\n setup(props, { attrs, emit }) {\n const [_value, setValue] = useUncontrolled<string | null>({\n value: computed(() => (props.modelValue !== undefined ? props.modelValue : props.value)),\n defaultValue: props.defaultValue,\n finalValue: null,\n onChange: (value) => {\n emit('update:modelValue', value)\n emit('change', value)\n },\n })\n return () =>\n h(Box, { ...attrs, class: [classes.timeGridRoot, (attrs as any).class] }, () =>\n h(SimpleGrid, { cols: 3, spacing: 'xs', class: classes.timeGrid }, () =>\n props.data.map((item) => {\n const isDisabled =\n props.disabled ||\n (props.minTime && compareTime(item, props.minTime) < 0) ||\n (props.maxTime && compareTime(item, props.maxTime) > 0)\n const controlProps = props.getControlProps?.(item) || {}\n const active = isSameTime(_value.value ?? undefined, item)\n return h(\n UnstyledButton,\n {\n ...controlProps,\n class: [classes.timeGridControl, controlProps.class],\n disabled: isDisabled || controlProps.disabled,\n 'data-active': active || undefined,\n 'data-disabled': isDisabled || controlProps.disabled || undefined,\n onClick: (event: MouseEvent) => {\n controlProps.onClick?.(event)\n if (isDisabled) return\n const nextValue = props.allowDeselect && active ? null : item\n if (nextValue !== _value.value) setValue(nextValue)\n },\n },\n () => item,\n )\n }),\n ),\n )\n },\n})\n\n// Real Mantine's SpinInput is a distinct component from TimeInput: a bare\n// numeric text field with digit-typing, arrow-key increment/decrement, and\n// auto-advance to the next field once enough digits are typed. It powers\n// each hour/minute/second segment inside TimePicker.\nexport const SpinInput = defineComponent({\n name: 'SpinInput',\n inheritAttrs: false,\n props: {\n modelValue: { type: Number as PropType<number | null | undefined>, default: undefined },\n value: { type: Number as PropType<number | null | undefined>, default: undefined },\n defaultValue: { type: Number as PropType<number | null | undefined>, default: undefined },\n min: { type: Number, required: true },\n max: { type: Number, required: true },\n onChange: Function as PropType<(value: number | null) => void>,\n step: { type: Number, default: 1 },\n onNextInput: Function as PropType<() => void>,\n onPreviousInput: Function as PropType<() => void>,\n allowTemporaryZero: Boolean,\n placeholder: { type: String, default: '--' },\n disableAutoAdvance: Boolean,\n disabled: Boolean,\n readOnly: Boolean,\n },\n emits: ['update:modelValue', 'change'],\n setup(props, { attrs, emit }) {\n const [value, setValue] = useUncontrolled<number | null>({\n value: computed(() => (props.modelValue !== undefined ? props.modelValue : props.value)),\n defaultValue: props.defaultValue,\n finalValue: null,\n onChange: (nextValue) => {\n emit('update:modelValue', nextValue)\n emit('change', nextValue)\n },\n })\n const finiteMax = () => Number.isFinite(props.max)\n const maxDigit = () => (finiteMax() ? Number(props.max.toFixed(0)[0]) : Infinity)\n const arrowsMax = () => props.max + 1 - props.step\n\n const handleChange = (raw: string) => {\n if (props.readOnly) return\n const clearValue = raw.replace(/\\D/g, '')\n if (clearValue === '') return\n let parsedValue = 0\n for (let i = 0; i < clearValue.length; i += 1) {\n const digit = clearValue.charCodeAt(i) - 48\n const next = parsedValue * 10 + digit\n parsedValue = finiteMax() && next > props.max ? digit : next\n }\n const clampedValue =\n props.allowTemporaryZero && parsedValue === 0 && props.min > 0\n ? 0\n : finiteMax()\n ? Math.min(Math.max(parsedValue, props.min), props.max)\n : Math.max(parsedValue, props.min)\n setValue(clampedValue)\n if (!props.disableAutoAdvance && (clampedValue > maxDigit() || raw.startsWith('00'))) {\n props.onNextInput?.()\n }\n }\n\n const handleKeydown = (event: KeyboardEvent) => {\n if (props.readOnly) return\n if (event.key === '0' || event.key === 'Num0') {\n const target = event.currentTarget as HTMLInputElement\n const { selectionStart, selectionEnd, value: inputValue } = target\n const isEntireValueSelected =\n inputValue.length > 0 && selectionStart === 0 && selectionEnd === inputValue.length\n if (value.value === 0 && !isEntireValueSelected) {\n event.preventDefault()\n props.onNextInput?.()\n }\n }\n if (event.key === 'Home') {\n event.preventDefault()\n setValue(props.min)\n }\n if (event.key === 'End') {\n event.preventDefault()\n if (finiteMax()) setValue(props.max)\n }\n if (event.key === 'Backspace' || event.key === 'Delete') {\n event.preventDefault()\n if (value.value !== null) setValue(null)\n else props.onPreviousInput?.()\n }\n if (event.key === 'ArrowRight') {\n event.preventDefault()\n props.onNextInput?.()\n }\n if (event.key === 'ArrowLeft') {\n event.preventDefault()\n props.onPreviousInput?.()\n }\n if (event.key === 'ArrowUp') {\n event.preventDefault()\n const newValue =\n value.value === null\n ? props.min\n : finiteMax()\n ? Math.min(Math.max(value.value + props.step, props.min), arrowsMax())\n : Math.max(value.value + props.step, props.min)\n setValue(newValue)\n }\n if (event.key === 'ArrowDown') {\n event.preventDefault()\n const newValue =\n value.value === null\n ? finiteMax()\n ? arrowsMax()\n : props.min\n : Math.min(Math.max(value.value - props.step, props.min), arrowsMax())\n setValue(newValue)\n }\n }\n\n return () =>\n h('input', {\n ...attrs,\n type: 'text',\n role: 'spinbutton',\n 'aria-valuemin': props.min,\n 'aria-valuemax': finiteMax() ? props.max : undefined,\n 'aria-valuenow': value.value === null ? 0 : value.value,\n 'data-empty': value.value === null || undefined,\n inputmode: 'numeric',\n placeholder: props.placeholder,\n disabled: props.disabled,\n readonly: props.readOnly,\n value: value.value === null ? '' : padTime(value.value),\n onInput: (event: Event) => handleChange((event.target as HTMLInputElement).value),\n onKeydown: handleKeydown,\n onFocus: (event: FocusEvent) => (event.target as HTMLInputElement).select(),\n onClick: (event: MouseEvent) => {\n event.stopPropagation()\n ;(event.target as HTMLInputElement).select()\n },\n onMousedown: (event: MouseEvent) => event.stopPropagation(),\n })\n },\n})\n\nexport const AmPmInput = defineComponent({\n name: 'AmPmInput',\n props: {\n modelValue: { type: String as PropType<string | null | undefined>, default: undefined },\n value: { type: String as PropType<string | null | undefined>, default: undefined },\n defaultValue: { type: String as PropType<string | null | undefined>, default: undefined },\n labels: { type: Object as PropType<TimePickerAmPmLabels>, default: () => defaultAmPmLabels },\n onChange: Function as PropType<(value: string) => void>,\n disabled: Boolean,\n readOnly: Boolean,\n },\n emits: ['update:modelValue', 'change'],\n setup(props, { attrs, emit }) {\n const [value, setValue] = useUncontrolled<string | null>({\n value: computed(() => (props.modelValue !== undefined ? props.modelValue : props.value)),\n defaultValue: props.defaultValue,\n finalValue: null,\n onChange: (nextValue) => {\n emit('update:modelValue', nextValue)\n emit('change', nextValue)\n },\n })\n return () =>\n h(\n 'select',\n {\n ...attrs,\n class: classes.timePickerField,\n 'data-am-pm': true,\n disabled: props.disabled,\n value: value.value ?? props.labels.am,\n onChange: (event: Event) => setValue((event.target as HTMLSelectElement).value),\n },\n [\n h('option', { value: props.labels.am }, props.labels.am),\n h('option', { value: props.labels.pm }, props.labels.pm),\n ],\n )\n },\n})\n\nexport const TimeControlsList = defineComponent({\n name: 'TimeControlsList',\n props: {\n min: { type: Number, required: true },\n max: { type: Number, required: true },\n step: { type: Number, default: 1 },\n value: { type: Number as PropType<number | null>, default: null },\n onSelect: Function as PropType<(value: number) => void>,\n formatValue: Function as PropType<(value: number) => string>,\n },\n setup(props) {\n return () =>\n h(ScrollArea, { h: 200 }, () =>\n h(\n 'div',\n { class: classes.timePickerControlsList },\n Array.from(\n { length: Math.floor((props.max - props.min) / props.step) + 1 },\n (_, index) => props.min + index * props.step,\n ).map((item) =>\n h(\n UnstyledButton,\n {\n key: item,\n class: classes.timePickerControl,\n 'data-active': item === props.value || undefined,\n onClick: () => props.onSelect?.(item),\n },\n () => (props.formatValue ? props.formatValue(item) : padTime(item)),\n ),\n ),\n ),\n )\n },\n})\n\nexport const TimePicker = defineComponent({\n name: 'TimePicker',\n props: {\n modelValue: String,\n value: String,\n defaultValue: String,\n onChange: Function as PropType<(value: string) => void>,\n type: { type: String as PropType<'time' | 'duration'>, default: 'time' },\n withSeconds: Boolean,\n min: String,\n max: String,\n format: { type: String as PropType<'12h' | '24h'>, default: '24h' },\n amPmLabels: {\n type: Object as PropType<TimePickerAmPmLabels>,\n default: () => defaultAmPmLabels,\n },\n hoursStep: { type: Number, default: 1 },\n minutesStep: { type: Number, default: 1 },\n secondsStep: { type: Number, default: 1 },\n clearable: Boolean,\n withDropdown: Boolean,\n disabled: Boolean,\n readOnly: Boolean,\n size: { type: [String, Number], default: 'sm' },\n presets: Array as PropType<Array<{ value: string; label: string }>>,\n closeDropdownOnPresetSelect: Boolean,\n // A ref object supplied by the parent (e.g. DateTimePicker) that gets\n // populated with the actual hours <input> DOM node, so the parent can\n // call .focus() on it directly to auto-focus the time input after a\n // date is picked.\n hoursRef: Object as PropType<{ value: any }>,\n },\n emits: ['update:modelValue', 'change'],\n setup(props, { attrs, emit }) {\n const effectiveFormat = computed<'12h' | '24h'>(() =>\n props.type === 'duration' ? '24h' : props.format,\n )\n const [_value, setValue] = useUncontrolled<string>({\n value: computed(() => (props.modelValue !== undefined ? props.modelValue : props.value)),\n defaultValue: props.defaultValue,\n finalValue: '',\n onChange: (value) => {\n emit('update:modelValue', value)\n emit('change', value)\n },\n })\n\n const parsed = computed(() =>\n getParsedTime({\n time: _value.value,\n format: effectiveFormat.value,\n amPmLabels: props.amPmLabels,\n }),\n )\n const hours = ref(parsed.value.hours)\n const minutes = ref(parsed.value.minutes)\n const seconds = ref(parsed.value.seconds)\n const amPm = ref(parsed.value.amPm)\n watch(_value, (value) => {\n const next = getParsedTime({\n time: value,\n format: effectiveFormat.value,\n amPmLabels: props.amPmLabels,\n })\n hours.value = next.hours\n minutes.value = next.minutes\n seconds.value = next.seconds\n amPm.value = next.amPm\n })\n\n // Refs to the SpinInput/AmPmInput component instances (not raw DOM\n // nodes) - see focusRef() below for how these are used to call .focus().\n const hoursRef = ref<any>()\n const minutesRef = ref<any>()\n const secondsRef = ref<any>()\n const amPmRef = ref<any>()\n // SpinInput/AmPmInput are components, so their `ref` resolves to the\n // component instance rather than the underlying DOM node - fall back to\n // `.$el` (or use the value directly if it's already an element, e.g. a\n // plain DOM ref) to actually call .focus() on the input.\n const focusRef = (target: any) => {\n const el = target?.$el ?? target\n el?.focus?.()\n }\n const focus = (field: 'hours' | 'minutes' | 'seconds' | 'amPm') => {\n focusRef(\n (field === 'hours'\n ? hoursRef\n : field === 'minutes'\n ? minutesRef\n : field === 'seconds'\n ? secondsRef\n : amPmRef\n ).value,\n )\n }\n watch(\n hoursRef,\n (val) => {\n // hoursRef is a ref-forwarding prop: the parent passes a ref object\n // whose `.value` we populate with the resolved element, mirroring\n // how minutesRef/secondsRef/amPmRef forward focus targets elsewhere.\n // eslint-disable-next-line vue/no-mutating-props\n if (props.hoursRef) props.hoursRef.value = val?.$el ?? val\n },\n { immediate: true },\n )\n\n const commit = () => {\n const result = getTimeString({\n hours: hours.value,\n minutes: minutes.value,\n seconds: seconds.value,\n format: effectiveFormat.value,\n withSeconds: props.withSeconds,\n amPm: amPm.value,\n amPmLabels: props.amPmLabels,\n })\n setValue(result.valid ? result.value : '')\n }\n\n const setHours = (value: number | null) => {\n let adjusted = value\n if (effectiveFormat.value === '12h' && typeof value === 'number' && value > 12) {\n adjusted = ((value - 1) % 12) + 1\n }\n hours.value = adjusted\n commit()\n focus('hours')\n }\n const setMinutes = (value: number | null) => {\n minutes.value = value\n commit()\n focus('minutes')\n }\n const setSeconds = (value: number | null) => {\n seconds.value = value\n commit()\n focus('seconds')\n }\n const setAmPm = (value: string | null) => {\n amPm.value = value\n commit()\n focus('amPm')\n }\n const clear = () => {\n hours.value = null\n minutes.value = null\n seconds.value = null\n amPm.value = null\n setValue('')\n focus('hours')\n }\n\n const isClearable = computed(\n () =>\n props.clearable &&\n !props.readOnly &&\n !props.disabled &&\n (hours.value !== null ||\n minutes.value !== null ||\n seconds.value !== null ||\n amPm.value !== null),\n )\n\n const opened = ref(false)\n\n const handlePresetSelect = (timeString: string) => {\n setValue(timeString)\n if (props.closeDropdownOnPresetSelect) {\n opened.value = false\n }\n }\n\n const handlePaste = (event: ClipboardEvent) => {\n if (props.readOnly || props.disabled) return\n const value = event.clipboardData?.getData('text').trim()\n if (!value || !/^\\d+:\\d{2}(?::\\d{2})?(?:\\s+[aApP][mM])?$/.test(value)) return\n const next = getParsedTime({\n time: value,\n format: effectiveFormat.value,\n amPmLabels: props.amPmLabels,\n })\n if (\n next.hours === null ||\n next.minutes === null ||\n next.minutes > 59 ||\n (props.withSeconds && (next.seconds === null || next.seconds > 59)) ||\n (props.type === 'time' && effectiveFormat.value === '24h' && next.hours > 23)\n )\n return\n event.preventDefault()\n hours.value = next.hours\n minutes.value = next.minutes\n seconds.value = props.withSeconds ? next.seconds : null\n amPm.value = next.amPm\n const result = getTimeString({\n ...next,\n seconds: props.withSeconds ? next.seconds : null,\n format: effectiveFormat.value,\n withSeconds: props.withSeconds,\n amPmLabels: props.amPmLabels,\n })\n if (result.valid) setValue(clampTime(result.value, props.min, props.max))\n }\n\n return () =>\n h(\n Popover,\n {\n opened: props.type !== 'duration' && props.withDropdown && opened.value,\n position: 'bottom-start',\n transitionProps: { duration: 0 },\n },\n () => [\n h(Popover.Target, null, () =>\n h(\n InputBase,\n {\n ...attrs,\n component: 'div',\n size: props.size,\n disabled: props.disabled,\n onClick: () => {\n focus('hours')\n if (props.type !== 'duration' && props.withDropdown) opened.value = true\n },\n onMousedown: (event: MouseEvent) => event.preventDefault(),\n onFocusin: () => {\n if (props.type !== 'duration' && props.withDropdown) opened.value = true\n },\n onFocusout: () => {\n if (props.withDropdown) opened.value = false\n },\n rightSection: isClearable.value\n ? h(CloseButton, {\n size: props.size,\n onMousedown: (event: MouseEvent) => event.preventDefault(),\n onClick: clear,\n })\n : undefined,\n rightSectionPointerEvents: isClearable.value ? 'all' : undefined,\n },\n () => [\n h('div', { class: classes.timePickerFieldsRoot, dir: 'ltr' }, [\n h('div', { class: classes.timePickerFieldsGroup }, [\n h(SpinInput, {\n ref: hoursRef,\n class: classes.timePickerField,\n value: hours.value,\n min: effectiveFormat.value === '12h' ? 1 : 0,\n max:\n props.type === 'duration'\n ? Infinity\n : effectiveFormat.value === '12h'\n ? 12\n : 23,\n step: props.hoursStep,\n onChange: setHours,\n onNextInput: () => focus('minutes'),\n allowTemporaryZero: effectiveFormat.value === '12h',\n disableAutoAdvance: props.type === 'duration',\n onPaste: handlePaste,\n readOnly: props.readOnly,\n disabled: props.disabled,\n placeholder: '--',\n }),\n h('span', ':'),\n h(SpinInput, {\n ref: minutesRef,\n class: classes.timePickerField,\n value: minutes.value,\n min: 0,\n max: 59,\n step: props.minutesStep,\n onChange: setMinutes,\n onPreviousInput: () => focus('hours'),\n onNextInput: () => focus(props.withSeconds ? 'seconds' : 'amPm'),\n readOnly: props.readOnly,\n disabled: props.disabled,\n placeholder: '--',\n }),\n props.withSeconds ? h('span', ':') : null,\n props.withSeconds\n ? h(SpinInput, {\n ref: secondsRef,\n class: classes.timePickerField,\n value: seconds.value,\n min: 0,\n max: 59,\n step: props.secondsStep,\n onChange: setSeconds,\n onPreviousInput: () => focus('minutes'),\n onNextInput: () => focus('amPm'),\n readOnly: props.readOnly,\n disabled: props.disabled,\n placeholder: '--',\n })\n : null,\n effectiveFormat.value === '12h'\n ? h(AmPmInput, {\n ref: amPmRef,\n value: amPm.value,\n labels: props.amPmLabels,\n onChange: setAmPm,\n readOnly: props.readOnly,\n disabled: props.disabled,\n })\n : null,\n ]),\n ]),\n ],\n ),\n ),\n h(\n Popover.Dropdown,\n {\n class: classes.timePickerDropdown,\n onMousedown: (event: MouseEvent) => event.preventDefault(),\n },\n () => [\n props.presets?.length\n ? h(Group, { gap: 4, class: classes.timePickerPresetsGroup }, () =>\n props.presets?.map((preset) =>\n h(\n Button,\n {\n size: 'xs',\n variant: 'light',\n onClick: () => handlePresetSelect(preset.value),\n },\n () => preset.label,\n ),\n ),\n )\n : h('div', { class: classes.timePickerControlsListGroup }, [\n h(TimeControlsList, {\n min: effectiveFormat.value === '12h' ? 1 : 0,\n max: effectiveFormat.value === '12h' ? 12 : 23,\n step: props.hoursStep,\n value: hours.value,\n onSelect: setHours,\n }),\n h(TimeControlsList, {\n min: 0,\n max: 59,\n step: props.minutesStep,\n value: minutes.value,\n onSelect: setMinutes,\n }),\n props.withSeconds\n ? h(TimeControlsList, {\n min: 0,\n max: 59,\n step: props.secondsStep,\n value: seconds.value,\n onSelect: setSeconds,\n })\n : null,\n ]),\n ],\n ),\n ],\n )\n },\n})\n\nexport const TimeValue = defineComponent({\n name: 'TimeValue',\n props: {\n value: { type: [String, Date] as PropType<string | Date>, required: true },\n format: { type: String, default: 'HH:mm' },\n locale: String,\n },\n setup(props, { attrs }) {\n return () =>\n h(Text, attrs, () =>\n (props.value instanceof Date ? dayjs(props.value) : dayjs(`2024-01-01 ${props.value}`))\n .locale(props.locale || 'en')\n .format(props.format),\n )\n },\n})\n\nexport const DateTimePicker = defineComponent({\n name: 'DateTimePicker',\n props: {\n modelValue: [String, Date, null] as PropType<string | Date | null>,\n value: [String, Date, null] as PropType<string | Date | null>,\n defaultValue: [String, Date, null] as PropType<string | Date | null>,\n onChange: Function as PropType<(value: Date | null) => void>,\n valueFormat: { type: String, default: 'MMMM D, YYYY h:mm A' },\n clearable: Boolean,\n withSeconds: Boolean,\n size: { type: [String, Number], default: 'sm' },\n submitButtonProps: Object as PropType<Record<string, any>>,\n },\n emits: ['update:modelValue', 'change'],\n setup(props, { attrs, emit }) {\n // Populated with the actual hours <input> DOM node once TimePicker\n // mounts (see TimePicker's hoursRef prop) so we can auto-focus it right\n // after a date is picked from the calendar.\n const hoursRef = ref<any>()\n const [_value, setValue] = useUncontrolled<Date | null>({\n // Must stay `undefined` (not coerced to null) when props.value isn't\n // passed at all - useUncontrolled uses strict undefined-checking to\n // decide whether the component is controlled. Coercing a missing prop\n // to null made this component permanently \"controlled with null\",\n // so picking a date/time in the dropdown never updated anything\n // without an external value/onChange binding - the picker looked\n // completely broken/inert.\n value: computed(() => {\n const controlledValue = props.modelValue !== undefined ? props.modelValue : props.value\n return controlledValue === undefined\n ? undefined\n : controlledValue === null\n ? null\n : new Date(controlledValue)\n }),\n defaultValue: props.defaultValue ? new Date(props.defaultValue) : null,\n finalValue: null,\n onChange: (value) => {\n emit('update:modelValue', value)\n emit('change', value)\n },\n })\n const date = computed(() => (_value.value ? dayjs(_value.value).format('YYYY-MM-DD') : null))\n const time = computed(() =>\n _value.value ? dayjs(_value.value).format(props.withSeconds ? 'HH:mm:ss' : 'HH:mm') : '',\n )\n const updateDate = (nextDate: DatePickerValueType) => {\n if (!nextDate || Array.isArray(nextDate)) return\n setValue(assignTime(nextDate, `2024-01-01 ${time.value || '00:00'}`))\n // As soon as a date is picked, move focus straight to the time input's\n // hours field.\n hoursRef.value?.focus?.()\n }\n const updateTime = (nextTime: string) => {\n if (date.value) setValue(assignTime(date.value, `2024-01-01 ${nextTime}`))\n }\n return () =>\n h(\n PickerInputBase,\n {\n ...attrs,\n formattedValue: _value.value ? dayjs(_value.value).format(props.valueFormat) : '',\n clearable: props.clearable,\n onClear: () => setValue(null),\n },\n {\n default: ({ close }: { close: () => void }) =>\n h('div', { class: classes.dateTimePicker }, [\n // fullWidth is explicitly overridden to false here -\n // fullWidth:true is only meant for a standalone\n // InlineDateTimePicker embedded directly in a page. Inside a\n // Popover dropdown (this component), the dropdown itself sizes\n // to content (width:max-content), so a fullWidth calendar has\n // nothing definite to size against and blows out to fill the\n // viewport instead, with its contents getting squashed.\n h(DatePicker, { fullWidth: false, value: date.value, onChange: updateDate }),\n h('div', { class: classes.timeWrapper }, [\n // `class` can't be passed directly to TimePicker here: its\n // render root is a Popover call, and Popover has\n // inheritAttrs:false and never even reads `attrs` in its own\n // setup(), so a class handed to TimePicker silently gets\n // dropped along that path and never reaches any real DOM\n // node. Wrapping it in a plain div instead guarantees\n // `.timeInput`'s `flex: 1` actually lands on an element\n // inside the `.timeWrapper` flex row.\n // For a plain DOM element (not a component), h()'s third\n // argument must be actual children - a bare function is only\n // auto-invoked as the default slot for component vnodes, so\n // passing one here silently rendered an empty div.\n h('div', { class: classes.timeInput }, [\n h(TimePicker, {\n value: time.value,\n withSeconds: props.withSeconds,\n size: props.size,\n hoursRef,\n onChange: updateTime,\n }),\n ]),\n h(\n ActionIcon,\n {\n variant: 'default',\n size: `input-${props.size || 'sm'}`,\n 'data-mantine-stop-propagation': true,\n ...props.submitButtonProps,\n onClick: (event: MouseEvent) => {\n props.submitButtonProps?.onClick?.(event)\n close()\n },\n },\n () => h(CheckIcon, { size: '30%' }),\n ),\n ]),\n ]),\n },\n )\n },\n})\n\nexport const InlineDateTimePicker = DateTimePicker\n\nexport const MiniCalendar = defineComponent({\n name: 'MiniCalendar',\n props: {\n date: [String, Date] as PropType<string | Date>,\n defaultDate: [String, Date] as PropType<string | Date>,\n onDateChange: Function as PropType<(date: DateStringValue) => void>,\n modelValue: [String, Date, null] as PropType<string | Date | null>,\n value: [String, Date, null] as PropType<string | Date | null>,\n defaultValue: [String, Date, null] as PropType<string | Date | null>,\n onChange: Function as PropType<(date: DateStringValue) => void>,\n maxDate: [String, Date] as PropType<string | Date>,\n minDate: [String, Date] as PropType<string | Date>,\n numberOfDays: { type: Number, default: 7 },\n monthLabelFormat: { type: String, default: 'MMM' },\n onNext: Function as PropType<() => void>,\n onPrevious: Function as PropType<() => void>,\n getDayProps: Function as PropType<(date: DateStringValue) => Record<string, any>>,\n size: { type: String as PropType<MantineSize>, default: 'sm' },\n previousControlProps: Object as PropType<Record<string, any>>,\n nextControlProps: Object as PropType<Record<string, any>>,\n locale: String,\n },\n emits: ['update:modelValue', 'change'],\n setup(props, { attrs, emit }) {\n const ctx = useDatesContext()\n const [value, setValue] = useUncontrolled<DateValue>({\n value: computed(() => {\n const controlledValue = props.modelValue !== undefined ? props.modelValue : props.value\n return controlledValue === undefined ? undefined : toDateString(controlledValue)\n }),\n defaultValue: toDateString(props.defaultValue ?? null),\n finalValue: null,\n onChange: (nextValue) => {\n emit('update:modelValue', nextValue)\n emit('change', nextValue)\n },\n })\n const [_date, setDate] = useUncontrolled<DateStringValue>({\n value: computed(() => toDateString(props.date ?? null) ?? undefined),\n defaultValue: toDateString(props.defaultDate ?? null) ?? undefined,\n finalValue: value.value || dayjs().format('YYYY-MM-DD'),\n onChange: (value) => props.onDateChange?.(value),\n })\n\n const handleNext = () => {\n props.onNext?.()\n setDate(dayjs(_date.value).add(props.numberOfDays, 'days').format('YYYY-MM-DD'))\n }\n const handlePrevious = () => {\n props.onPrevious?.()\n setDate(dayjs(_date.value).subtract(props.numberOfDays, 'days').format('YYYY-MM-DD'))\n }\n\n return () => {\n const previousDisabled = props.minDate\n ? dayjs(_date.value).subtract(1, 'days').isBefore(dayjs(props.minDate))\n : false\n const nextDisabled = props.maxDate\n ? dayjs(_date.value).add(props.numberOfDays, 'days').isAfter(dayjs(props.maxDate))\n : false\n\n const range = Array.from({ length: props.numberOfDays }, (_, index) =>\n dayjs(_date.value).add(index, 'days'),\n ).map((date) => {\n const disabled =\n (props.minDate && date.isBefore(dayjs(props.minDate), 'day')) ||\n (props.maxDate && date.isAfter(dayjs(props.maxDate), 'day')) ||\n false\n const dayProps = props.getDayProps?.(toDateString(date.format('YYYY-MM-DD'))!) || {}\n\n return h(\n UnstyledButton,\n {\n key: date.toString(),\n disabled,\n 'aria-label': date.format('YYYY-MM-DD'),\n 'data-disabled': disabled || undefined,\n 'data-selected': (value.value && dayjs(date).isSame(value.value, 'day')) || undefined,\n ...dayProps,\n class: [classes.miniCalendarDay, dayProps.class],\n onClick: (event: MouseEvent) => {\n dayProps.onClick?.(event)\n setValue(toDateString(date.format('YYYY-MM-DD'))!)\n },\n },\n () => [\n h(\n 'span',\n { class: classes.miniCalendarDayMonth },\n date.locale(props.locale || ctx.locale).format(props.monthLabelFormat),\n ),\n h('span', { class: classes.miniCalendarDayNumber }, String(date.date())),\n ],\n )\n })\n\n return h(Box, { ...attrs, class: [classes.miniCalendarRoot, (attrs as any).class] }, () => [\n h(\n UnstyledButton,\n {\n onClick: handlePrevious,\n disabled: previousDisabled,\n 'data-disabled': previousDisabled || undefined,\n 'data-direction': 'previous',\n ...props.previousControlProps,\n class: [classes.miniCalendarControl, props.previousControlProps?.class],\n },\n () =>\n props.previousControlProps?.children ||\n h(AccordionChevron, { 'data-chevron': true, size: props.size }),\n ),\n h('div', { class: classes.miniCalendarDays }, range),\n h(\n UnstyledButton,\n {\n onClick: handleNext,\n disabled: nextDisabled,\n 'data-disabled': nextDisabled || undefined,\n 'data-direction': 'next',\n ...props.nextControlProps,\n class: [classes.miniCalendarControl, props.nextControlProps?.class],\n },\n () =>\n props.nextControlProps?.children ||\n h(AccordionChevron, { 'data-chevron': true, size: props.size }),\n ),\n ])\n }\n },\n})\n\nexport const getFormattedTime = ({\n value,\n format = 'HH:mm',\n}: {\n value: string | Date\n format?: string\n}) => (value instanceof Date ? dayjs(value) : dayjs(`2024-01-01 ${value}`)).format(format)\n\nexport type DayProps = InstanceType<typeof Day>['$props']\nexport type CalendarProps = InstanceType<typeof Calendar>['$props']\nexport type DatePickerProps = InstanceType<typeof DatePicker>['$props']\nexport type DatePickerInputProps = InstanceType<typeof DatePickerInput>['$props']\nexport type DateInputProps = InstanceType<typeof DateInput>['$props']\nexport type TimeInputProps = InstanceType<typeof TimeInput>['$props']\nexport type TimePickerProps = InstanceType<typeof TimePicker>['$props']\nexport type TimeGridProps = InstanceType<typeof TimeGrid>['$props']\nexport type TimeValueProps = InstanceType<typeof TimeValue>['$props']\nexport type DateTimePickerProps = InstanceType<typeof DateTimePicker>['$props']\nexport type MiniCalendarProps = InstanceType<typeof MiniCalendar>['$props']\nexport type DatesStylesNames = keyof typeof classes\nexport type PickerBaseProps = Record<string, any>\nexport type ControlsGroupSettings = Record<string, any>\nexport type DateInputSharedProps = Record<string, any>\nexport type CalendarSettings = Record<string, any>\nexport type CalendarBaseProps = Record<string, any>\nexport type CalendarAriaLabels = Record<string, string>\nexport type MonthLevelSettings = Record<string, any>\nexport type YearLevelSettings = Record<string, any>\nexport type DecadeLevelSettings = Record<string, any>\nexport type TimePickerPresets = Array<{ value: string; label: string }>\nexport type TimeGridData = string[]\nexport type TimeGridStylesNames = DatesStylesNames\nexport type TimePickerStylesNames = DatesStylesNames\nexport type DatePickerStylesNames = DatesStylesNames\nexport type DatePickerInputStylesNames = DatesStylesNames\nexport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