@mantine-vue/dates 3.2.0 → 3.3.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.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../src/components/DatesProvider/DatesProvider.context.ts","../src/components/DatesProvider/DatesProvider.vue","../src/components/DatesProvider/DatesProvider.vue","../src/Dates.module.css","../src/components/Day/Day.vue","../src/components/Day/Day.vue","../src/components/PickerControl/PickerControl.vue","../src/components/PickerControl/PickerControl.vue","../src/components/CalendarHeader/CalendarHeader.vue","../src/components/CalendarHeader/CalendarHeader.vue","../src/components/WeekdaysRow/WeekdaysRow.vue","../src/components/WeekdaysRow/WeekdaysRow.vue","../src/utils/index.ts","../src/components/Month/Month.vue","../src/components/Month/Month.vue","../src/components/MonthsList/MonthsList.vue","../src/components/MonthsList/MonthsList.vue","../src/components/YearsList/YearsList.vue","../src/components/YearsList/YearsList.vue","../src/components/Calendar/Calendar.vue","../src/components/Calendar/Calendar.vue","../src/utils/use-forwarded-props.ts","../src/components/MonthLevel/MonthLevel.vue","../src/components/MonthLevel/MonthLevel.vue","../src/components/YearLevel/YearLevel.vue","../src/components/YearLevel/YearLevel.vue","../src/components/DecadeLevel/DecadeLevel.vue","../src/components/DecadeLevel/DecadeLevel.vue","../src/components/MonthLevelGroup/MonthLevelGroup.vue","../src/components/MonthLevelGroup/MonthLevelGroup.vue","../src/components/YearLevelGroup/YearLevelGroup.vue","../src/components/YearLevelGroup/YearLevelGroup.vue","../src/components/DecadeLevelGroup/DecadeLevelGroup.vue","../src/components/DecadeLevelGroup/DecadeLevelGroup.vue","../src/components/LevelsGroup/LevelsGroup.vue","../src/components/LevelsGroup/LevelsGroup.vue","../src/components/DatePicker/DatePicker.vue","../src/components/DatePicker/DatePicker.vue","../src/components/YearPicker/YearPicker.vue","../src/components/YearPicker/YearPicker.vue","../src/components/MonthPicker/MonthPicker.vue","../src/components/MonthPicker/MonthPicker.vue","../src/components/PickerInputBase/PickerInputBase.vue","../src/components/PickerInputBase/PickerInputBase.vue","../src/components/DatePickerInput/DatePickerInput.vue","../src/components/DatePickerInput/DatePickerInput.vue","../src/components/MonthPickerInput/MonthPickerInput.vue","../src/components/MonthPickerInput/MonthPickerInput.vue","../src/components/YearPickerInput/YearPickerInput.vue","../src/components/YearPickerInput/YearPickerInput.vue","../src/components/HiddenDatesInput/HiddenDatesInput.vue","../src/components/HiddenDatesInput/HiddenDatesInput.vue","../src/components/DateInput/DateInput.vue","../src/components/DateInput/DateInput.vue","../src/components/TimeInput/TimeInput.vue","../src/components/TimeInput/TimeInput.vue","../src/components/TimeGrid/TimeGrid.vue","../src/components/TimeGrid/TimeGrid.vue","../src/components/SpinInput/SpinInput.vue","../src/components/SpinInput/SpinInput.vue","../src/components/AmPmInput/AmPmInput.vue","../src/components/AmPmInput/AmPmInput.vue","../src/components/TimeControlsList/TimeControlsList.vue","../src/components/TimeControlsList/TimeControlsList.vue","../src/components/TimePicker/TimePicker.vue","../src/components/TimePicker/TimePicker.vue","../src/components/TimeValue/TimeValue.vue","../src/components/TimeValue/TimeValue.vue","../src/components/InlineDateTimePicker/InlineDateTimePicker.vue","../src/components/InlineDateTimePicker/InlineDateTimePicker.vue","../src/components/DateTimePicker/DateTimePicker.vue","../src/components/DateTimePicker/DateTimePicker.vue","../src/components/MiniCalendar/MiniCalendar.vue","../src/components/MiniCalendar/MiniCalendar.vue"],"sourcesContent":["import { inject, type InjectionKey } from 'vue'\nimport type { DatesProviderSettings } from '../../types'\n\nexport const DATES_PROVIDER_DEFAULT_SETTINGS: Required<DatesProviderSettings> = {\n locale: 'en',\n firstDayOfWeek: 1,\n weekendDays: [0, 6],\n timezone: 'UTC',\n consistentWeeks: false,\n}\n\nexport const DatesContextKey: InjectionKey<Required<DatesProviderSettings>> = Symbol('DatesContext')\n\n/** Returns the nearest reactive dates provider settings. */\nexport function useDatesContext() {\n return inject(DatesContextKey, DATES_PROVIDER_DEFAULT_SETTINGS)\n}\n","<script setup lang=\"ts\">\nimport { provide, reactive, watchEffect } from 'vue'\nimport type { DatesProviderProps } from '../../types'\nimport { DATES_PROVIDER_DEFAULT_SETTINGS, DatesContextKey } from './DatesProvider.context'\n\ndefineOptions({ name: 'DatesProvider' })\n\nconst props = withDefaults(defineProps<DatesProviderProps>(), {\n settings: () => ({}),\n})\n\nconst settings = reactive({ ...DATES_PROVIDER_DEFAULT_SETTINGS })\n\nwatchEffect(() => {\n Object.assign(settings, DATES_PROVIDER_DEFAULT_SETTINGS, props.settings)\n})\n\nprovide(DatesContextKey, settings)\n</script>\n\n<template>\n <slot />\n</template>\n","<script setup lang=\"ts\">\nimport { provide, reactive, watchEffect } from 'vue'\nimport type { DatesProviderProps } from '../../types'\nimport { DATES_PROVIDER_DEFAULT_SETTINGS, DatesContextKey } from './DatesProvider.context'\n\ndefineOptions({ name: 'DatesProvider' })\n\nconst props = withDefaults(defineProps<DatesProviderProps>(), {\n settings: () => ({}),\n})\n\nconst settings = reactive({ ...DATES_PROVIDER_DEFAULT_SETTINGS })\n\nwatchEffect(() => {\n Object.assign(settings, DATES_PROVIDER_DEFAULT_SETTINGS, props.settings)\n})\n\nprovide(DatesContextKey, settings)\n</script>\n\n<template>\n <slot />\n</template>\n",".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","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, useAttrs, type VNodeChild } from 'vue'\nimport { UnstyledButton } from '@mantine-vue/core'\nimport type { DayProps, RenderDaySlots } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'Day', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<DayProps>(), {\n size: 'sm',\n static: false,\n weekend: false,\n outside: false,\n selected: false,\n hidden: false,\n inRange: false,\n firstInRange: false,\n lastInRange: false,\n highlightToday: false,\n fullWidth: false,\n disabled: false,\n unstyled: false,\n})\nconst slots = defineSlots<RenderDaySlots>()\nconst attrs = useAttrs()\n\nconst content = computed(() => {\n if (props.renderDay) return props.renderDay(props.date)\n return (slots.renderDay ?? slots.day)?.({ date: props.date }) ?? dayjs(props.date).date()\n})\nconst renderContent = () => content.value as VNodeChild\n</script>\n\n<template>\n <UnstyledButton\n v-bind=\"attrs\"\n :component=\"props.static ? 'div' : 'button'\"\n :class=\"[classes.day, attrs.class]\"\n :disabled=\"props.disabled\"\n :style=\"[{ display: props.hidden ? 'none' : undefined }, attrs.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 <component :is=\"renderContent\" />\n </UnstyledButton>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, useAttrs, type VNodeChild } from 'vue'\nimport { UnstyledButton } from '@mantine-vue/core'\nimport type { DayProps, RenderDaySlots } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'Day', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<DayProps>(), {\n size: 'sm',\n static: false,\n weekend: false,\n outside: false,\n selected: false,\n hidden: false,\n inRange: false,\n firstInRange: false,\n lastInRange: false,\n highlightToday: false,\n fullWidth: false,\n disabled: false,\n unstyled: false,\n})\nconst slots = defineSlots<RenderDaySlots>()\nconst attrs = useAttrs()\n\nconst content = computed(() => {\n if (props.renderDay) return props.renderDay(props.date)\n return (slots.renderDay ?? slots.day)?.({ date: props.date }) ?? dayjs(props.date).date()\n})\nconst renderContent = () => content.value as VNodeChild\n</script>\n\n<template>\n <UnstyledButton\n v-bind=\"attrs\"\n :component=\"props.static ? 'div' : 'button'\"\n :class=\"[classes.day, attrs.class]\"\n :disabled=\"props.disabled\"\n :style=\"[{ display: props.hidden ? 'none' : undefined }, attrs.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 <component :is=\"renderContent\" />\n </UnstyledButton>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs } from 'vue'\nimport { UnstyledButton } from '@mantine-vue/core'\nimport type { PickerControlProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'PickerControl', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<PickerControlProps>(), {\n selected: false,\n disabled: false,\n inRange: false,\n firstInRange: false,\n lastInRange: false,\n withCellSpacing: true,\n fullWidth: false,\n})\nconst attrs = useAttrs()\n</script>\n\n<template>\n <UnstyledButton\n v-bind=\"attrs\"\n :class=\"[classes.pickerControl, attrs.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 <slot />\n </UnstyledButton>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs } from 'vue'\nimport { UnstyledButton } from '@mantine-vue/core'\nimport type { PickerControlProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'PickerControl', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<PickerControlProps>(), {\n selected: false,\n disabled: false,\n inRange: false,\n firstInRange: false,\n lastInRange: false,\n withCellSpacing: true,\n fullWidth: false,\n})\nconst attrs = useAttrs()\n</script>\n\n<template>\n <UnstyledButton\n v-bind=\"attrs\"\n :class=\"[classes.pickerControl, attrs.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 <slot />\n </UnstyledButton>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, getCurrentInstance } from 'vue'\nimport { AccordionChevron, UnstyledButton } from '@mantine-vue/core'\nimport type { CalendarHeaderEmits, CalendarHeaderProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'CalendarHeader' })\n\nconst props = withDefaults(defineProps<CalendarHeaderProps>(), {\n hasNextLevel: true,\n withNext: true,\n withPrevious: true,\n nextDisabled: false,\n previousDisabled: false,\n nextLabel: 'Next',\n previousLabel: 'Previous',\n fullWidth: false,\n withNativeLevelSelect: false,\n disableNativeLevelSelect: false,\n})\nconst emit = defineEmits<CalendarHeaderEmits>()\nconst instance = getCurrentInstance()\nconst hasDateChangeListener = computed(() => {\n const vnodeProps = instance?.vnode.props\n return !!(vnodeProps?.onDateChange || vnodeProps?.['onDate-change'])\n})\n\nconst displayed = computed(() => (props.date ? dayjs(props.date) : dayjs()))\nconst yearRange = computed(() => {\n const currentYear = new Date().getFullYear()\n const rawMin =\n props.yearsSelectRange?.[0] ?? (props.minDate ? dayjs(props.minDate).year() : currentYear - 100)\n const rawMax =\n props.yearsSelectRange?.[1] ?? (props.maxDate ? dayjs(props.maxDate).year() : currentYear + 50)\n const min = Math.min(rawMin, rawMax, displayed.value.year())\n const max = Math.max(rawMin, rawMax, displayed.value.year())\n return Array.from({ length: max - min + 1 }, (_, index) => min + index)\n})\nconst monthNames = computed(() =>\n Array.from({ length: 12 }, (_, month) =>\n dayjs()\n .locale(props.locale || 'en')\n .month(month)\n .format('MMMM'),\n ),\n)\nconst showsNativeSelect = computed(\n () =>\n props.withNativeLevelSelect &&\n props.date &&\n hasDateChangeListener.value &&\n props.calendarLevel !== 'decade',\n)\n\nfunction updateNativeDate(next: dayjs.Dayjs) {\n let result = next\n if (props.minDate && result.isBefore(dayjs(props.minDate), 'day')) result = dayjs(props.minDate)\n if (props.maxDate && result.isAfter(dayjs(props.maxDate), 'day')) result = dayjs(props.maxDate)\n emit('date-change', result.format('YYYY-MM-DD'))\n}\n\nfunction onMonthChange(event: Event) {\n updateNativeDate(displayed.value.month(Number((event.target as HTMLSelectElement).value)))\n}\n\nfunction onYearChange(event: Event) {\n updateNativeDate(displayed.value.year(Number((event.target as HTMLSelectElement).value)))\n}\n</script>\n\n<template>\n <div :class=\"classes.calendarHeader\" :data-full-width=\"props.fullWidth || undefined\">\n <UnstyledButton\n v-if=\"props.withPrevious\"\n :class=\"classes.calendarHeaderControl\"\n data-direction=\"previous\"\n :aria-label=\"props.previousLabel\"\n :disabled=\"props.previousDisabled\"\n :data-disabled=\"props.previousDisabled || undefined\"\n @click=\"emit('previous')\"\n >\n <AccordionChevron\n :class=\"classes.calendarHeaderControlIcon\"\n data-direction=\"previous\"\n size=\"45%\"\n />\n </UnstyledButton>\n\n <div\n v-if=\"showsNativeSelect\"\n :class=\"classes.calendarHeaderLevel\"\n data-static\n data-native-level-select\n >\n <select\n v-if=\"props.calendarLevel === 'month'\"\n :class=\"classes.calendarHeaderSelect\"\n data-select=\"month\"\n :disabled=\"props.disableNativeLevelSelect\"\n :value=\"displayed.month()\"\n :aria-label=\"props.levelControlAriaLabel\"\n @change=\"onMonthChange\"\n >\n <option v-for=\"(month, index) in monthNames\" :key=\"month\" :value=\"index\">\n {{ month }}\n </option>\n </select>\n <select\n :class=\"classes.calendarHeaderSelect\"\n data-select=\"year\"\n :disabled=\"props.disableNativeLevelSelect\"\n :value=\"displayed.year()\"\n :aria-label=\"props.levelControlAriaLabel\"\n @change=\"onYearChange\"\n >\n <option v-for=\"year in yearRange\" :key=\"year\" :value=\"year\">{{ year }}</option>\n </select>\n </div>\n <UnstyledButton\n v-else\n :component=\"props.hasNextLevel ? 'button' : 'div'\"\n :class=\"classes.calendarHeaderLevel\"\n :disabled=\"!props.hasNextLevel\"\n :data-static=\"!props.hasNextLevel || undefined\"\n :aria-label=\"props.levelControlAriaLabel\"\n @click=\"props.hasNextLevel ? emit('level-click') : undefined\"\n >\n {{ props.label }}\n </UnstyledButton>\n\n <UnstyledButton\n v-if=\"props.withNext\"\n :class=\"classes.calendarHeaderControl\"\n data-direction=\"next\"\n :aria-label=\"props.nextLabel\"\n :disabled=\"props.nextDisabled\"\n :data-disabled=\"props.nextDisabled || undefined\"\n @click=\"emit('next')\"\n >\n <AccordionChevron\n :class=\"classes.calendarHeaderControlIcon\"\n data-direction=\"next\"\n size=\"45%\"\n />\n </UnstyledButton>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, getCurrentInstance } from 'vue'\nimport { AccordionChevron, UnstyledButton } from '@mantine-vue/core'\nimport type { CalendarHeaderEmits, CalendarHeaderProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'CalendarHeader' })\n\nconst props = withDefaults(defineProps<CalendarHeaderProps>(), {\n hasNextLevel: true,\n withNext: true,\n withPrevious: true,\n nextDisabled: false,\n previousDisabled: false,\n nextLabel: 'Next',\n previousLabel: 'Previous',\n fullWidth: false,\n withNativeLevelSelect: false,\n disableNativeLevelSelect: false,\n})\nconst emit = defineEmits<CalendarHeaderEmits>()\nconst instance = getCurrentInstance()\nconst hasDateChangeListener = computed(() => {\n const vnodeProps = instance?.vnode.props\n return !!(vnodeProps?.onDateChange || vnodeProps?.['onDate-change'])\n})\n\nconst displayed = computed(() => (props.date ? dayjs(props.date) : dayjs()))\nconst yearRange = computed(() => {\n const currentYear = new Date().getFullYear()\n const rawMin =\n props.yearsSelectRange?.[0] ?? (props.minDate ? dayjs(props.minDate).year() : currentYear - 100)\n const rawMax =\n props.yearsSelectRange?.[1] ?? (props.maxDate ? dayjs(props.maxDate).year() : currentYear + 50)\n const min = Math.min(rawMin, rawMax, displayed.value.year())\n const max = Math.max(rawMin, rawMax, displayed.value.year())\n return Array.from({ length: max - min + 1 }, (_, index) => min + index)\n})\nconst monthNames = computed(() =>\n Array.from({ length: 12 }, (_, month) =>\n dayjs()\n .locale(props.locale || 'en')\n .month(month)\n .format('MMMM'),\n ),\n)\nconst showsNativeSelect = computed(\n () =>\n props.withNativeLevelSelect &&\n props.date &&\n hasDateChangeListener.value &&\n props.calendarLevel !== 'decade',\n)\n\nfunction updateNativeDate(next: dayjs.Dayjs) {\n let result = next\n if (props.minDate && result.isBefore(dayjs(props.minDate), 'day')) result = dayjs(props.minDate)\n if (props.maxDate && result.isAfter(dayjs(props.maxDate), 'day')) result = dayjs(props.maxDate)\n emit('date-change', result.format('YYYY-MM-DD'))\n}\n\nfunction onMonthChange(event: Event) {\n updateNativeDate(displayed.value.month(Number((event.target as HTMLSelectElement).value)))\n}\n\nfunction onYearChange(event: Event) {\n updateNativeDate(displayed.value.year(Number((event.target as HTMLSelectElement).value)))\n}\n</script>\n\n<template>\n <div :class=\"classes.calendarHeader\" :data-full-width=\"props.fullWidth || undefined\">\n <UnstyledButton\n v-if=\"props.withPrevious\"\n :class=\"classes.calendarHeaderControl\"\n data-direction=\"previous\"\n :aria-label=\"props.previousLabel\"\n :disabled=\"props.previousDisabled\"\n :data-disabled=\"props.previousDisabled || undefined\"\n @click=\"emit('previous')\"\n >\n <AccordionChevron\n :class=\"classes.calendarHeaderControlIcon\"\n data-direction=\"previous\"\n size=\"45%\"\n />\n </UnstyledButton>\n\n <div\n v-if=\"showsNativeSelect\"\n :class=\"classes.calendarHeaderLevel\"\n data-static\n data-native-level-select\n >\n <select\n v-if=\"props.calendarLevel === 'month'\"\n :class=\"classes.calendarHeaderSelect\"\n data-select=\"month\"\n :disabled=\"props.disableNativeLevelSelect\"\n :value=\"displayed.month()\"\n :aria-label=\"props.levelControlAriaLabel\"\n @change=\"onMonthChange\"\n >\n <option v-for=\"(month, index) in monthNames\" :key=\"month\" :value=\"index\">\n {{ month }}\n </option>\n </select>\n <select\n :class=\"classes.calendarHeaderSelect\"\n data-select=\"year\"\n :disabled=\"props.disableNativeLevelSelect\"\n :value=\"displayed.year()\"\n :aria-label=\"props.levelControlAriaLabel\"\n @change=\"onYearChange\"\n >\n <option v-for=\"year in yearRange\" :key=\"year\" :value=\"year\">{{ year }}</option>\n </select>\n </div>\n <UnstyledButton\n v-else\n :component=\"props.hasNextLevel ? 'button' : 'div'\"\n :class=\"classes.calendarHeaderLevel\"\n :disabled=\"!props.hasNextLevel\"\n :data-static=\"!props.hasNextLevel || undefined\"\n :aria-label=\"props.levelControlAriaLabel\"\n @click=\"props.hasNextLevel ? emit('level-click') : undefined\"\n >\n {{ props.label }}\n </UnstyledButton>\n\n <UnstyledButton\n v-if=\"props.withNext\"\n :class=\"classes.calendarHeaderControl\"\n data-direction=\"next\"\n :aria-label=\"props.nextLabel\"\n :disabled=\"props.nextDisabled\"\n :data-disabled=\"props.nextDisabled || undefined\"\n @click=\"emit('next')\"\n >\n <AccordionChevron\n :class=\"classes.calendarHeaderControlIcon\"\n data-direction=\"next\"\n size=\"45%\"\n />\n </UnstyledButton>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed } from 'vue'\nimport { useDatesContext } from '../DatesProvider'\nimport type { WeekdaysRowProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'WeekdaysRow' })\n\nconst props = withDefaults(defineProps<WeekdaysRowProps>(), {\n weekdayFormat: 'dd',\n withWeekNumbers: false,\n})\nconst context = useDatesContext()\nconst days = computed(() => {\n const firstDay = props.firstDayOfWeek ?? context.firstDayOfWeek\n return Array.from({ length: 7 }, (_, index) =>\n dayjs('2024-01-07').add((firstDay + index) % 7, 'day'),\n )\n})\n\nfunction label(date: dayjs.Dayjs) {\n return typeof props.weekdayFormat === 'function'\n ? props.weekdayFormat(date.format('YYYY-MM-DD'))\n : date.locale(props.locale || context.locale).format(props.weekdayFormat)\n}\n</script>\n\n<template>\n <tr :class=\"classes.weekdaysRow\">\n <th v-if=\"props.withWeekNumbers\" :class=\"classes.weekday\" />\n <th\n v-for=\"date in days\"\n :key=\"date.day()\"\n :class=\"classes.weekday\"\n :data-weekend=\"(props.weekendDays ?? context.weekendDays).includes(date.day()) || undefined\"\n >\n {{ label(date) }}\n </th>\n </tr>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed } from 'vue'\nimport { useDatesContext } from '../DatesProvider'\nimport type { WeekdaysRowProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'WeekdaysRow' })\n\nconst props = withDefaults(defineProps<WeekdaysRowProps>(), {\n weekdayFormat: 'dd',\n withWeekNumbers: false,\n})\nconst context = useDatesContext()\nconst days = computed(() => {\n const firstDay = props.firstDayOfWeek ?? context.firstDayOfWeek\n return Array.from({ length: 7 }, (_, index) =>\n dayjs('2024-01-07').add((firstDay + index) % 7, 'day'),\n )\n})\n\nfunction label(date: dayjs.Dayjs) {\n return typeof props.weekdayFormat === 'function'\n ? props.weekdayFormat(date.format('YYYY-MM-DD'))\n : date.locale(props.locale || context.locale).format(props.weekdayFormat)\n}\n</script>\n\n<template>\n <tr :class=\"classes.weekdaysRow\">\n <th v-if=\"props.withWeekNumbers\" :class=\"classes.weekday\" />\n <th\n v-for=\"date in days\"\n :key=\"date.day()\"\n :class=\"classes.weekday\"\n :data-weekend=\"(props.weekendDays ?? context.weekendDays).includes(date.day()) || undefined\"\n >\n {{ label(date) }}\n </th>\n </tr>\n</template>\n","import dayjs from 'dayjs'\nimport customParseFormat from 'dayjs/plugin/customParseFormat'\nimport type {\n ControlKeydownPayload,\n DateFormatter,\n DatePickerType,\n DatePickerValueType,\n DatesRangeValue,\n DateStringValue,\n} from '../types'\n\ndayjs.extend(customParseFormat)\n\nexport function toDateString(value: Date | string | null | undefined): DateStringValue | null {\n if (value == null || value === '') return null\n const parsed = dayjs(value)\n return parsed.isValid() ? parsed.format('YYYY-MM-DD') : null\n}\n\n/** Compatibility helper. Date values are already timezone-independent ISO strings in v3. */\nexport function shiftTimezone<T>(direction: 'add' | 'remove', date: T, timezone?: string): T {\n void direction\n void timezone\n return date\n}\n\n/** Returns the browser offset for a date; `timezone` is retained for API compatibility. */\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 min = toDateString(minDate),\n max = toDateString(maxDate)\n if (min && value.isBefore(min, 'day')) return min\n if (max && value.isAfter(max, 'day')) return max\n return value.format('YYYY-MM-DD')\n}\n\nexport function getDefaultClampedDate({\n minDate,\n maxDate,\n defaultDate,\n}: { minDate?: Date | string; maxDate?: Date | string; defaultDate?: Date | string } = {}) {\n return clampDate(toDateString(defaultDate) || dayjs().format('YYYY-MM-DD'), minDate, maxDate)\n}\n\nexport function assignTime(date: Date | string, time: Date | string) {\n const value = dayjs(time)\n return dayjs(date)\n .hour(value.hour())\n .minute(value.minute())\n .second(value.second())\n .millisecond(value.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 return !!a && !!b && dayjs(a).isSame(b, 'day')\n}\nexport function isSameMonth(a: Date | string, b: Date | string) {\n return dayjs(a).isSame(b, 'month')\n}\nexport function isSameYear(a: Date | string, b: Date | string) {\n return dayjs(a).isSame(b, 'year')\n}\nexport function getStartOfWeek(date: Date | string, firstDayOfWeek = 1) {\n const value = dayjs(date)\n return value.subtract((value.day() - firstDayOfWeek + 7) % 7, 'day').format('YYYY-MM-DD')\n}\nexport function getEndOfWeek(date: Date | string, firstDayOfWeek = 1) {\n return dayjs(getStartOfWeek(date, firstDayOfWeek)).add(6, 'day').format('YYYY-MM-DD')\n}\nexport function getWeekNumber(date: Date | string) {\n const value = dayjs(date),\n start = dayjs(`${value.year()}-01-01`)\n return Math.ceil((value.diff(start, 'day') + start.day() + 1) / 7)\n}\n\nexport function handleControlKeyDown({\n rowIndex,\n cellIndex,\n event,\n controlsRef,\n}: ControlKeydownPayload) {\n const rows = controlsRef.length,\n cols = controlsRef[0]?.length || 0\n let row = rowIndex,\n cell = cellIndex\n if (event.key === 'ArrowRight') cell += 1\n if (event.key === 'ArrowLeft') cell -= 1\n if (event.key === 'ArrowDown') row += 1\n if (event.key === 'ArrowUp') row -= 1\n if (event.key === 'Home') cell = 0\n if (event.key === 'End') cell = cols - 1\n if (cell < 0) {\n cell = cols - 1\n row -= 1\n } else if (cell >= cols) {\n cell = 0\n row += 1\n }\n const next = controlsRef[(row + rows) % rows]?.[(cell + cols) % cols]\n if (next) {\n event.preventDefault()\n next.focus()\n }\n}\n\nexport function focusAdjacentControl(\n refs: (HTMLElement | null | undefined)[][],\n rowIndex: number,\n cellIndex: number,\n direction: 'up' | 'down' | 'left' | 'right',\n) {\n const focusable = (element: HTMLElement | null | undefined) =>\n !!element &&\n !(element as any).disabled &&\n !element.hasAttribute('data-hidden') &&\n !element.hasAttribute('data-outside')\n let row = rowIndex,\n cell = cellIndex\n for (let index = 0; index < 60; index += 1) {\n if (direction === 'up') row -= 1\n if (direction === 'down') row += 1\n if (direction === 'left' && --cell < 0) {\n row -= 1\n cell = (refs[row]?.length || 1) - 1\n }\n if (direction === 'right' && ++cell >= (refs[row]?.length || 0)) {\n row += 1\n cell = 0\n }\n const element = refs[row]?.[cell]\n if (element === undefined) return\n if (focusable(element)) {\n element?.focus()\n return\n }\n }\n}\n\nexport function keyToDirection(key: string): 'up' | 'down' | 'left' | 'right' | null {\n return key === 'ArrowUp'\n ? 'up'\n : key === 'ArrowDown'\n ? 'down'\n : key === 'ArrowLeft'\n ? 'left'\n : key === 'ArrowRight'\n ? 'right'\n : null\n}\nexport function 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\nexport function getMonthDays(\n month: DateStringValue,\n firstDayOfWeek: number,\n consistentWeeks = false,\n) {\n const startOfMonth = dayjs(month).startOf('month'),\n start = dayjs(getStartOfWeek(startOfMonth.format('YYYY-MM-DD'), firstDayOfWeek))\n const offset = (startOfMonth.day() - firstDayOfWeek + 7) % 7\n const weeks = consistentWeeks ? 6 : Math.ceil((startOfMonth.daysInMonth() + offset) / 7)\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\nexport function isBeforeMin(date: DateStringValue, minDate?: Date | string) {\n const min = toDateString(minDate)\n return !!min && dayjs(date).isBefore(min, 'day')\n}\nexport function isAfterMax(date: DateStringValue, maxDate?: Date | string) {\n const max = toDateString(maxDate)\n return !!max && dayjs(date).isAfter(max, 'day')\n}\nexport function getMonthLabel(date: DateStringValue, format = 'MMMM YYYY', locale?: string) {\n return dayjs(date)\n .locale(locale || 'en')\n .format(format)\n}\nexport function getYearRange(date: DateStringValue) {\n const year = dayjs(date).year(),\n start = year - (year % 10)\n return Array.from({ length: 10 }, (_, index) =>\n dayjs(`${start + index}-01-01`).format('YYYY-MM-DD'),\n )\n}\nexport function getDecadeLabel(date: DateStringValue) {\n const years = getYearRange(date)\n return `${dayjs(years[0]).year()} – ${dayjs(years.at(-1)!).year()}`\n}\n\nexport function formatValue(\n value: DatePickerValueType,\n type: DatePickerType,\n format: string,\n locale?: string,\n labelSeparator = '–',\n valueFormatter?: DateFormatter,\n) {\n if (valueFormatter) return valueFormatter({ type, date: value, locale, format, labelSeparator })\n const print = (item: string) =>\n dayjs(item)\n .locale(locale || 'en')\n .format(format)\n if (type === 'multiple')\n return Array.isArray(value)\n ? value\n .map((item) => item && print(item))\n .filter(Boolean)\n .join(', ')\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) return `${print(start)} ${labelSeparator} `\n if (!start && end) return `${labelSeparator} ${print(end)}`\n return `${print(start!)} ${labelSeparator} ${print(end!)}`\n }\n return value ? print(value as string) : ''\n}\n\nexport function isInRangeGranular(\n date: DateStringValue,\n range: [DateStringValue, DateStringValue],\n unit: 'month' | 'year',\n) {\n const sorted = [...range].sort((a, b) => (dayjs(a).isAfter(b) ? 1 : -1))\n return !dayjs(date).isBefore(sorted[0], unit) && !dayjs(date).isAfter(sorted[1], unit)\n}\nexport function 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 if (type === 'range') {\n const [start, end] = Array.isArray(value) ? (value as DatesRangeValue) : [null, null]\n return !start || end || dayjs(date).isBefore(start, 'day')\n ? ([date, null] as DatesRangeValue)\n : ([start, date] as DatesRangeValue)\n }\n return date\n}\n\nexport function dateStringParser(value: string, format = 'MMMM D, YYYY', locale?: string) {\n const parsed = dayjs(value, format, locale || 'en', true)\n return parsed.isValid() ? parsed.format('YYYY-MM-DD') : null\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\nconst splitTimeString = (value = '') => {\n const [time = ''] = value.split(' '),\n [hours = '00', minutes = '00', seconds = '00'] = time.split(':')\n return { hours, minutes, seconds }\n}\nexport function padTime(value: number | string) {\n return String(value).padStart(2, '0')\n}\nconst defaultAmPmLabels = { am: 'AM', pm: 'PM' }\nexport function getParsedTime({\n time,\n format,\n amPmLabels = defaultAmPmLabels,\n}: {\n time: string\n format: '12h' | '24h'\n amPmLabels?: { am: string; pm: string }\n}) {\n if (!time) return { hours: null, minutes: null, seconds: null, amPm: null }\n const parts = splitTimeString(time),\n hours = Number(parts.hours),\n minutes = Number(parts.minutes),\n seconds = Number(parts.seconds)\n if (format === '12h')\n return {\n hours: hours % 12 || 12,\n minutes,\n seconds,\n amPm: hours >= 12 ? amPmLabels.pm : amPmLabels.am,\n }\n return { hours, minutes, seconds, amPm: null }\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?: { am: string; pm: string }\n}) {\n if (hours === null || minutes === null || (withSeconds && seconds == null))\n return { valid: false, value: '' }\n let normalized = hours\n if (format === '12h') {\n if (amPm === null) return { valid: false, value: '' }\n if (amPm === amPmLabels.pm && hours !== 12) normalized += 12\n else if (amPm === amPmLabels.am && hours === 12) normalized = 0\n }\n return {\n valid: true,\n value: `${padTime(normalized)}:${padTime(minutes)}${withSeconds ? `:${padTime(seconds || 0)}` : ''}`,\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}\nexport function isSameTime(a?: string, b?: string) {\n return !!a && !!b && timeToSeconds(a) === timeToSeconds(b)\n}\nexport function compareTime(a: string, b: string) {\n return timeToSeconds(a) - timeToSeconds(b)\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}\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 result.push(\n `${padTime(Math.floor(current / 3600))}:${padTime(Math.floor((current % 3600) / 60))}`,\n )\n return result\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","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, ref } from 'vue'\nimport { useDatesContext } from '../DatesProvider'\nimport Day from '../Day/Day.vue'\nimport WeekdaysRow from '../WeekdaysRow/WeekdaysRow.vue'\nimport {\n focusAdjacentControl,\n getMonthDays,\n getWeekNumber,\n isAfterMax,\n isBeforeMin,\n isSameDate,\n keyToDirection,\n setGridRef,\n} from '../../utils'\nimport type {\n DateStringValue,\n DatesRangeValue,\n DateValue,\n MonthEmits,\n MonthProps,\n RenderDaySlots,\n} from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'Month' })\n\nconst props = withDefaults(defineProps<MonthProps>(), {\n month: () => dayjs().format('YYYY-MM-DD'),\n value: null,\n type: 'default',\n hideOutsideDates: false,\n hideWeekdays: false,\n withCellSpacing: true,\n highlightToday: false,\n withWeekNumbers: false,\n static: false,\n fullWidth: false,\n})\nconst emit = defineEmits<MonthEmits>()\nconst slots = defineSlots<RenderDaySlots>()\nconst context = useDatesContext()\nconst hovered = ref<DateStringValue | null>(null)\nconst dayRefs: (HTMLElement | null | undefined)[][] = []\n\nconst firstDay = computed(() => props.firstDayOfWeek ?? context.firstDayOfWeek)\nconst rows = computed(() => getMonthDays(props.month, firstDay.value, context.consistentWeeks))\n\nfunction selected(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\nfunction inRange(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 const [first, last] = [start, rangeEnd].sort((a, b) => (dayjs(a).isAfter(b) ? 1 : -1))\n return dayjs(date).isAfter(first, 'day') && dayjs(date).isBefore(last, 'day')\n}\n\nfunction outside(date: DateStringValue) {\n return !dayjs(date).isSame(props.month, 'month')\n}\n\nfunction baseDisabled(date: DateStringValue) {\n return (\n isBeforeMin(date, props.minDate) ||\n isAfterMax(date, props.maxDate) ||\n !!props.excludeDate?.(date)\n )\n}\n\nfunction dayProps(date: DateStringValue) {\n return props.getDayProps?.(date) || {}\n}\n\nfunction dayAttributes(date: DateStringValue) {\n const attributes = { ...dayProps(date) }\n delete attributes.onClick\n delete attributes.onMouseenter\n delete attributes.onMouseEnter\n delete attributes.onKeydown\n delete attributes.onKeyDown\n return attributes\n}\n\nfunction dayAriaLabel(date: DateStringValue) {\n return (\n props.getDayAriaLabel?.(date) ||\n dayjs(date)\n .locale(props.locale || context.locale)\n .format('D MMMM YYYY')\n )\n}\n\nconst dateInTabOrder = computed(() => {\n const enabled = rows.value.flat().filter((date) => {\n const controlProps = dayProps(date)\n return (\n !baseDisabled(date) && !controlProps.disabled && (!props.hideOutsideDates || !outside(date))\n )\n })\n return (\n enabled.find(selected) ?? enabled.find((date) => dayjs().isSame(date, 'date')) ?? enabled[0]\n )\n})\n\nconst renderDay =\n props.renderDay ??\n ((slots.renderDay ?? slots.day)\n ? (date: DateStringValue) => (slots.renderDay ?? slots.day)?.({ date })\n : undefined)\n\nfunction rangeStart(date: DateStringValue) {\n if (props.type !== 'range' || !Array.isArray(props.value) || !props.value[0]) return false\n const end = props.value[1] || hovered.value\n const first = end && dayjs(end).isBefore(props.value[0], 'day') ? end : props.value[0]\n return isSameDate(date, first)\n}\n\nfunction rangeEnd(date: DateStringValue) {\n if (props.type !== 'range' || !Array.isArray(props.value) || !props.value[0]) return false\n const end = props.value[1] || hovered.value\n if (!end) return false\n const last = dayjs(end).isAfter(props.value[0], 'day') ? end : props.value[0]\n return isSameDate(date, last)\n}\n\nfunction onClick(date: DateStringValue, event: MouseEvent) {\n dayProps(date).onClick?.(event)\n if (!baseDisabled(date) && !props.static) emit('day-click', date)\n}\n\nfunction onMouseEnter(date: DateStringValue, event: MouseEvent) {\n hovered.value = date\n const controlProps = dayProps(date)\n ;(controlProps.onMouseenter ?? controlProps.onMouseEnter)?.(event)\n emit('day-mouse-enter', date)\n}\n\nfunction onKeydown(\n date: DateStringValue,\n rowIndex: number,\n cellIndex: number,\n event: KeyboardEvent,\n) {\n const controlProps = dayProps(date)\n ;(controlProps.onKeydown ?? controlProps.onKeyDown)?.(event)\n const direction = keyToDirection(event.key)\n if (direction) {\n event.preventDefault()\n focusAdjacentControl(dayRefs, rowIndex, cellIndex, direction)\n }\n}\n</script>\n\n<template>\n <table :class=\"classes.month\" :data-full-width=\"props.fullWidth || undefined\">\n <thead v-if=\"!props.hideWeekdays\">\n <WeekdaysRow\n :first-day-of-week=\"firstDay\"\n :weekend-days=\"props.weekendDays\"\n :locale=\"props.locale\"\n :weekday-format=\"props.weekdayFormat\"\n :with-week-numbers=\"props.withWeekNumbers\"\n />\n </thead>\n <tbody>\n <tr v-for=\"(week, rowIndex) in rows\" :key=\"week[0]\" :class=\"classes.monthRow\">\n <td v-if=\"props.withWeekNumbers\" :class=\"classes.weekNumber\">\n {{ getWeekNumber(week[0]) }}\n </td>\n <td\n v-for=\"(date, cellIndex) in week\"\n :key=\"date\"\n :class=\"classes.monthCell\"\n :data-with-spacing=\"props.withCellSpacing || undefined\"\n >\n <Day\n v-bind=\"dayAttributes(date)\"\n :ref=\"(node: any) => setGridRef(dayRefs, rowIndex, cellIndex, node)\"\n :date=\"date\"\n :static=\"props.static\"\n :disabled=\"baseDisabled(date) || dayProps(date).disabled\"\n :weekend=\"(props.weekendDays ?? context.weekendDays).includes(dayjs(date).day())\"\n :outside=\"outside(date)\"\n :hidden=\"props.hideOutsideDates && outside(date)\"\n :selected=\"selected(date)\"\n :in-range=\"inRange(date)\"\n :first-in-range=\"rangeStart(date)\"\n :last-in-range=\"rangeEnd(date)\"\n :highlight-today=\"props.highlightToday\"\n :full-width=\"props.fullWidth\"\n :render-day=\"renderDay\"\n :aria-label=\"dayAriaLabel(date)\"\n :tabindex=\"props.static ? undefined : date === dateInTabOrder ? 0 : -1\"\n :data-autofocus=\"selected(date) || undefined\"\n @click=\"onClick(date, $event)\"\n @mouseenter=\"onMouseEnter(date, $event)\"\n @keydown=\"onKeydown(date, rowIndex, cellIndex, $event)\"\n />\n </td>\n </tr>\n </tbody>\n </table>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, ref } from 'vue'\nimport { useDatesContext } from '../DatesProvider'\nimport Day from '../Day/Day.vue'\nimport WeekdaysRow from '../WeekdaysRow/WeekdaysRow.vue'\nimport {\n focusAdjacentControl,\n getMonthDays,\n getWeekNumber,\n isAfterMax,\n isBeforeMin,\n isSameDate,\n keyToDirection,\n setGridRef,\n} from '../../utils'\nimport type {\n DateStringValue,\n DatesRangeValue,\n DateValue,\n MonthEmits,\n MonthProps,\n RenderDaySlots,\n} from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'Month' })\n\nconst props = withDefaults(defineProps<MonthProps>(), {\n month: () => dayjs().format('YYYY-MM-DD'),\n value: null,\n type: 'default',\n hideOutsideDates: false,\n hideWeekdays: false,\n withCellSpacing: true,\n highlightToday: false,\n withWeekNumbers: false,\n static: false,\n fullWidth: false,\n})\nconst emit = defineEmits<MonthEmits>()\nconst slots = defineSlots<RenderDaySlots>()\nconst context = useDatesContext()\nconst hovered = ref<DateStringValue | null>(null)\nconst dayRefs: (HTMLElement | null | undefined)[][] = []\n\nconst firstDay = computed(() => props.firstDayOfWeek ?? context.firstDayOfWeek)\nconst rows = computed(() => getMonthDays(props.month, firstDay.value, context.consistentWeeks))\n\nfunction selected(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\nfunction inRange(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 const [first, last] = [start, rangeEnd].sort((a, b) => (dayjs(a).isAfter(b) ? 1 : -1))\n return dayjs(date).isAfter(first, 'day') && dayjs(date).isBefore(last, 'day')\n}\n\nfunction outside(date: DateStringValue) {\n return !dayjs(date).isSame(props.month, 'month')\n}\n\nfunction baseDisabled(date: DateStringValue) {\n return (\n isBeforeMin(date, props.minDate) ||\n isAfterMax(date, props.maxDate) ||\n !!props.excludeDate?.(date)\n )\n}\n\nfunction dayProps(date: DateStringValue) {\n return props.getDayProps?.(date) || {}\n}\n\nfunction dayAttributes(date: DateStringValue) {\n const attributes = { ...dayProps(date) }\n delete attributes.onClick\n delete attributes.onMouseenter\n delete attributes.onMouseEnter\n delete attributes.onKeydown\n delete attributes.onKeyDown\n return attributes\n}\n\nfunction dayAriaLabel(date: DateStringValue) {\n return (\n props.getDayAriaLabel?.(date) ||\n dayjs(date)\n .locale(props.locale || context.locale)\n .format('D MMMM YYYY')\n )\n}\n\nconst dateInTabOrder = computed(() => {\n const enabled = rows.value.flat().filter((date) => {\n const controlProps = dayProps(date)\n return (\n !baseDisabled(date) && !controlProps.disabled && (!props.hideOutsideDates || !outside(date))\n )\n })\n return (\n enabled.find(selected) ?? enabled.find((date) => dayjs().isSame(date, 'date')) ?? enabled[0]\n )\n})\n\nconst renderDay =\n props.renderDay ??\n ((slots.renderDay ?? slots.day)\n ? (date: DateStringValue) => (slots.renderDay ?? slots.day)?.({ date })\n : undefined)\n\nfunction rangeStart(date: DateStringValue) {\n if (props.type !== 'range' || !Array.isArray(props.value) || !props.value[0]) return false\n const end = props.value[1] || hovered.value\n const first = end && dayjs(end).isBefore(props.value[0], 'day') ? end : props.value[0]\n return isSameDate(date, first)\n}\n\nfunction rangeEnd(date: DateStringValue) {\n if (props.type !== 'range' || !Array.isArray(props.value) || !props.value[0]) return false\n const end = props.value[1] || hovered.value\n if (!end) return false\n const last = dayjs(end).isAfter(props.value[0], 'day') ? end : props.value[0]\n return isSameDate(date, last)\n}\n\nfunction onClick(date: DateStringValue, event: MouseEvent) {\n dayProps(date).onClick?.(event)\n if (!baseDisabled(date) && !props.static) emit('day-click', date)\n}\n\nfunction onMouseEnter(date: DateStringValue, event: MouseEvent) {\n hovered.value = date\n const controlProps = dayProps(date)\n ;(controlProps.onMouseenter ?? controlProps.onMouseEnter)?.(event)\n emit('day-mouse-enter', date)\n}\n\nfunction onKeydown(\n date: DateStringValue,\n rowIndex: number,\n cellIndex: number,\n event: KeyboardEvent,\n) {\n const controlProps = dayProps(date)\n ;(controlProps.onKeydown ?? controlProps.onKeyDown)?.(event)\n const direction = keyToDirection(event.key)\n if (direction) {\n event.preventDefault()\n focusAdjacentControl(dayRefs, rowIndex, cellIndex, direction)\n }\n}\n</script>\n\n<template>\n <table :class=\"classes.month\" :data-full-width=\"props.fullWidth || undefined\">\n <thead v-if=\"!props.hideWeekdays\">\n <WeekdaysRow\n :first-day-of-week=\"firstDay\"\n :weekend-days=\"props.weekendDays\"\n :locale=\"props.locale\"\n :weekday-format=\"props.weekdayFormat\"\n :with-week-numbers=\"props.withWeekNumbers\"\n />\n </thead>\n <tbody>\n <tr v-for=\"(week, rowIndex) in rows\" :key=\"week[0]\" :class=\"classes.monthRow\">\n <td v-if=\"props.withWeekNumbers\" :class=\"classes.weekNumber\">\n {{ getWeekNumber(week[0]) }}\n </td>\n <td\n v-for=\"(date, cellIndex) in week\"\n :key=\"date\"\n :class=\"classes.monthCell\"\n :data-with-spacing=\"props.withCellSpacing || undefined\"\n >\n <Day\n v-bind=\"dayAttributes(date)\"\n :ref=\"(node: any) => setGridRef(dayRefs, rowIndex, cellIndex, node)\"\n :date=\"date\"\n :static=\"props.static\"\n :disabled=\"baseDisabled(date) || dayProps(date).disabled\"\n :weekend=\"(props.weekendDays ?? context.weekendDays).includes(dayjs(date).day())\"\n :outside=\"outside(date)\"\n :hidden=\"props.hideOutsideDates && outside(date)\"\n :selected=\"selected(date)\"\n :in-range=\"inRange(date)\"\n :first-in-range=\"rangeStart(date)\"\n :last-in-range=\"rangeEnd(date)\"\n :highlight-today=\"props.highlightToday\"\n :full-width=\"props.fullWidth\"\n :render-day=\"renderDay\"\n :aria-label=\"dayAriaLabel(date)\"\n :tabindex=\"props.static ? undefined : date === dateInTabOrder ? 0 : -1\"\n :data-autofocus=\"selected(date) || undefined\"\n @click=\"onClick(date, $event)\"\n @mouseenter=\"onMouseEnter(date, $event)\"\n @keydown=\"onKeydown(date, rowIndex, cellIndex, $event)\"\n />\n </td>\n </tr>\n </tbody>\n </table>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed } from 'vue'\nimport { SimpleGrid } from '@mantine-vue/core'\nimport PickerControl from '../PickerControl/PickerControl.vue'\nimport { focusAdjacentControl, keyToDirection, setGridRef } from '../../utils'\nimport type { DateStringValue, MonthsListEmits, MonthsListProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'MonthsList' })\nconst props = withDefaults(defineProps<MonthsListProps>(), {\n year: () => dayjs().format('YYYY-MM-DD'),\n monthsListFormat: 'MMM',\n fullWidth: false,\n})\nconst emit = defineEmits<MonthsListEmits>()\nconst controlRefs: (HTMLElement | null | undefined)[][] = []\nconst months = computed(() =>\n Array.from({ length: 12 }, (_, index) =>\n dayjs(props.year).month(index).startOf('month').format('YYYY-MM-DD'),\n ),\n)\nconst controlProps = (date: DateStringValue) => props.getMonthControlProps?.(date) || {}\nconst enabled = (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 controlProps(date).disabled\n )\nconst selected = (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')\nconst tabDate = computed(\n () =>\n months.value.filter(enabled).find(selected) ??\n months.value.filter(enabled).find((date) => dayjs().isSame(date, 'month')) ??\n months.value.filter(enabled)[0],\n)\nconst label = (date: DateStringValue) =>\n typeof props.monthsListFormat === 'function'\n ? props.monthsListFormat(date)\n : dayjs(date)\n .locale(props.locale || 'en')\n .format(props.monthsListFormat)\nfunction onClick(date: DateStringValue, event: MouseEvent) {\n controlProps(date).onClick?.(event)\n if (enabled(date)) emit('month-select', date)\n}\nfunction onMouseEnter(date: DateStringValue, event: MouseEvent) {\n controlProps(date).onMouseenter?.(event)\n emit('month-mouse-enter', date)\n}\nfunction onKeydown(date: DateStringValue, index: number, event: KeyboardEvent) {\n controlProps(date).onKeydown?.(event)\n const direction = keyToDirection(event.key)\n if (direction) {\n event.preventDefault()\n focusAdjacentControl(controlRefs, Math.floor(index / 3), index % 3, direction)\n }\n}\n</script>\n\n<template>\n <SimpleGrid\n :cols=\"3\"\n :spacing=\"4\"\n :class=\"classes.controlsGrid\"\n :data-full-width=\"props.fullWidth || undefined\"\n >\n <PickerControl\n v-for=\"(date, index) in months\"\n :key=\"date\"\n v-bind=\"controlProps(date)\"\n :ref=\"(node: any) => setGridRef(controlRefs, Math.floor(index / 3), index % 3, node)\"\n :full-width=\"props.fullWidth\"\n :disabled=\"!enabled(date) || controlProps(date).disabled\"\n :selected=\"selected(date)\"\n :tabindex=\"date === tabDate ? 0 : -1\"\n :data-autofocus=\"selected(date) || undefined\"\n @click=\"onClick(date, $event)\"\n @mouseenter=\"onMouseEnter(date, $event)\"\n @keydown=\"onKeydown(date, index, $event)\"\n >{{ label(date) }}</PickerControl\n >\n </SimpleGrid>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed } from 'vue'\nimport { SimpleGrid } from '@mantine-vue/core'\nimport PickerControl from '../PickerControl/PickerControl.vue'\nimport { focusAdjacentControl, keyToDirection, setGridRef } from '../../utils'\nimport type { DateStringValue, MonthsListEmits, MonthsListProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'MonthsList' })\nconst props = withDefaults(defineProps<MonthsListProps>(), {\n year: () => dayjs().format('YYYY-MM-DD'),\n monthsListFormat: 'MMM',\n fullWidth: false,\n})\nconst emit = defineEmits<MonthsListEmits>()\nconst controlRefs: (HTMLElement | null | undefined)[][] = []\nconst months = computed(() =>\n Array.from({ length: 12 }, (_, index) =>\n dayjs(props.year).month(index).startOf('month').format('YYYY-MM-DD'),\n ),\n)\nconst controlProps = (date: DateStringValue) => props.getMonthControlProps?.(date) || {}\nconst enabled = (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 controlProps(date).disabled\n )\nconst selected = (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')\nconst tabDate = computed(\n () =>\n months.value.filter(enabled).find(selected) ??\n months.value.filter(enabled).find((date) => dayjs().isSame(date, 'month')) ??\n months.value.filter(enabled)[0],\n)\nconst label = (date: DateStringValue) =>\n typeof props.monthsListFormat === 'function'\n ? props.monthsListFormat(date)\n : dayjs(date)\n .locale(props.locale || 'en')\n .format(props.monthsListFormat)\nfunction onClick(date: DateStringValue, event: MouseEvent) {\n controlProps(date).onClick?.(event)\n if (enabled(date)) emit('month-select', date)\n}\nfunction onMouseEnter(date: DateStringValue, event: MouseEvent) {\n controlProps(date).onMouseenter?.(event)\n emit('month-mouse-enter', date)\n}\nfunction onKeydown(date: DateStringValue, index: number, event: KeyboardEvent) {\n controlProps(date).onKeydown?.(event)\n const direction = keyToDirection(event.key)\n if (direction) {\n event.preventDefault()\n focusAdjacentControl(controlRefs, Math.floor(index / 3), index % 3, direction)\n }\n}\n</script>\n\n<template>\n <SimpleGrid\n :cols=\"3\"\n :spacing=\"4\"\n :class=\"classes.controlsGrid\"\n :data-full-width=\"props.fullWidth || undefined\"\n >\n <PickerControl\n v-for=\"(date, index) in months\"\n :key=\"date\"\n v-bind=\"controlProps(date)\"\n :ref=\"(node: any) => setGridRef(controlRefs, Math.floor(index / 3), index % 3, node)\"\n :full-width=\"props.fullWidth\"\n :disabled=\"!enabled(date) || controlProps(date).disabled\"\n :selected=\"selected(date)\"\n :tabindex=\"date === tabDate ? 0 : -1\"\n :data-autofocus=\"selected(date) || undefined\"\n @click=\"onClick(date, $event)\"\n @mouseenter=\"onMouseEnter(date, $event)\"\n @keydown=\"onKeydown(date, index, $event)\"\n >{{ label(date) }}</PickerControl\n >\n </SimpleGrid>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed } from 'vue'\nimport { SimpleGrid } from '@mantine-vue/core'\nimport PickerControl from '../PickerControl/PickerControl.vue'\nimport { focusAdjacentControl, getYearRange, keyToDirection, setGridRef } from '../../utils'\nimport type { DateStringValue, YearsListEmits, YearsListProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'YearsList' })\nconst props = withDefaults(defineProps<YearsListProps>(), {\n decade: () => dayjs().format('YYYY-MM-DD'),\n yearsListFormat: 'YYYY',\n fullWidth: false,\n})\nconst emit = defineEmits<YearsListEmits>()\nconst controlRefs: (HTMLElement | null | undefined)[][] = []\nconst years = computed(() => getYearRange(props.decade))\nconst controlProps = (date: DateStringValue) => props.getYearControlProps?.(date) || {}\nconst enabled = (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 controlProps(date).disabled\n )\nconst selected = (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')\nconst tabDate = computed(\n () =>\n years.value.filter(enabled).find(selected) ??\n years.value.filter(enabled).find((date) => dayjs().isSame(date, 'year')) ??\n years.value.filter(enabled)[0],\n)\nconst label = (date: DateStringValue) =>\n typeof props.yearsListFormat === 'function'\n ? props.yearsListFormat(date)\n : dayjs(date).format(props.yearsListFormat)\nfunction onClick(date: DateStringValue, event: MouseEvent) {\n controlProps(date).onClick?.(event)\n if (enabled(date)) emit('year-select', date)\n}\nfunction onMouseEnter(date: DateStringValue, event: MouseEvent) {\n controlProps(date).onMouseenter?.(event)\n emit('year-mouse-enter', date)\n}\nfunction onKeydown(date: DateStringValue, index: number, event: KeyboardEvent) {\n controlProps(date).onKeydown?.(event)\n const direction = keyToDirection(event.key)\n if (direction) {\n event.preventDefault()\n focusAdjacentControl(controlRefs, Math.floor(index / 3), index % 3, direction)\n }\n}\n</script>\n\n<template>\n <SimpleGrid\n :cols=\"3\"\n :spacing=\"4\"\n :class=\"classes.controlsGrid\"\n :data-full-width=\"props.fullWidth || undefined\"\n >\n <PickerControl\n v-for=\"(date, index) in years\"\n :key=\"date\"\n v-bind=\"controlProps(date)\"\n :ref=\"(node: any) => setGridRef(controlRefs, Math.floor(index / 3), index % 3, node)\"\n :full-width=\"props.fullWidth\"\n :disabled=\"!enabled(date) || controlProps(date).disabled\"\n :selected=\"selected(date)\"\n :tabindex=\"date === tabDate ? 0 : -1\"\n :data-autofocus=\"selected(date) || undefined\"\n @click=\"onClick(date, $event)\"\n @mouseenter=\"onMouseEnter(date, $event)\"\n @keydown=\"onKeydown(date, index, $event)\"\n >{{ label(date) }}</PickerControl\n >\n </SimpleGrid>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed } from 'vue'\nimport { SimpleGrid } from '@mantine-vue/core'\nimport PickerControl from '../PickerControl/PickerControl.vue'\nimport { focusAdjacentControl, getYearRange, keyToDirection, setGridRef } from '../../utils'\nimport type { DateStringValue, YearsListEmits, YearsListProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'YearsList' })\nconst props = withDefaults(defineProps<YearsListProps>(), {\n decade: () => dayjs().format('YYYY-MM-DD'),\n yearsListFormat: 'YYYY',\n fullWidth: false,\n})\nconst emit = defineEmits<YearsListEmits>()\nconst controlRefs: (HTMLElement | null | undefined)[][] = []\nconst years = computed(() => getYearRange(props.decade))\nconst controlProps = (date: DateStringValue) => props.getYearControlProps?.(date) || {}\nconst enabled = (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 controlProps(date).disabled\n )\nconst selected = (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')\nconst tabDate = computed(\n () =>\n years.value.filter(enabled).find(selected) ??\n years.value.filter(enabled).find((date) => dayjs().isSame(date, 'year')) ??\n years.value.filter(enabled)[0],\n)\nconst label = (date: DateStringValue) =>\n typeof props.yearsListFormat === 'function'\n ? props.yearsListFormat(date)\n : dayjs(date).format(props.yearsListFormat)\nfunction onClick(date: DateStringValue, event: MouseEvent) {\n controlProps(date).onClick?.(event)\n if (enabled(date)) emit('year-select', date)\n}\nfunction onMouseEnter(date: DateStringValue, event: MouseEvent) {\n controlProps(date).onMouseenter?.(event)\n emit('year-mouse-enter', date)\n}\nfunction onKeydown(date: DateStringValue, index: number, event: KeyboardEvent) {\n controlProps(date).onKeydown?.(event)\n const direction = keyToDirection(event.key)\n if (direction) {\n event.preventDefault()\n focusAdjacentControl(controlRefs, Math.floor(index / 3), index % 3, direction)\n }\n}\n</script>\n\n<template>\n <SimpleGrid\n :cols=\"3\"\n :spacing=\"4\"\n :class=\"classes.controlsGrid\"\n :data-full-width=\"props.fullWidth || undefined\"\n >\n <PickerControl\n v-for=\"(date, index) in years\"\n :key=\"date\"\n v-bind=\"controlProps(date)\"\n :ref=\"(node: any) => setGridRef(controlRefs, Math.floor(index / 3), index % 3, node)\"\n :full-width=\"props.fullWidth\"\n :disabled=\"!enabled(date) || controlProps(date).disabled\"\n :selected=\"selected(date)\"\n :tabindex=\"date === tabDate ? 0 : -1\"\n :data-autofocus=\"selected(date) || undefined\"\n @click=\"onClick(date, $event)\"\n @mouseenter=\"onMouseEnter(date, $event)\"\n @keydown=\"onKeydown(date, index, $event)\"\n >{{ label(date) }}</PickerControl\n >\n </SimpleGrid>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, getCurrentInstance, useAttrs } from 'vue'\nimport { Box } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport CalendarHeader from '../CalendarHeader/CalendarHeader.vue'\nimport Month from '../Month/Month.vue'\nimport MonthsList from '../MonthsList/MonthsList.vue'\nimport YearsList from '../YearsList/YearsList.vue'\nimport {\n getDecadeLabel,\n getDefaultClampedDate,\n getMonthLabel,\n getYearRange,\n toDateString,\n} from '../../utils'\nimport type { CalendarLevel, CalendarProps, DateStringValue, RenderDaySlots } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'Calendar', inheritAttrs: false })\nconst props = withDefaults(defineProps<CalendarProps>(), {\n maxLevel: 'decade',\n minLevel: 'month',\n numberOfColumns: 1,\n type: 'default',\n monthLabelFormat: 'MMMM YYYY',\n yearLabelFormat: 'YYYY',\n monthsListFormat: 'MMM',\n yearsListFormat: 'YYYY',\n hideOutsideDates: false,\n hideWeekdays: false,\n withCellSpacing: true,\n highlightToday: false,\n withWeekNumbers: false,\n static: false,\n fullWidth: false,\n withNativeLevelSelect: false,\n})\nconst emit = defineEmits<{\n 'update:level': [value: CalendarLevel]\n 'level-change': [value: CalendarLevel]\n 'update:date': [value: DateStringValue]\n 'date-change': [value: DateStringValue]\n 'day-click': [date: DateStringValue]\n 'day-mouse-enter': [date: DateStringValue]\n 'month-select': [date: DateStringValue]\n 'month-mouse-enter': [date: DateStringValue]\n 'year-select': [date: DateStringValue]\n 'year-mouse-enter': [date: DateStringValue]\n}>()\nconst slots = defineSlots<RenderDaySlots>()\nconst attrs = useAttrs()\nconst instance = getCurrentInstance()\nconst order: CalendarLevel[] = ['month', 'year', 'decade']\nconst clampLevel = (level?: CalendarLevel) =>\n order[\n Math.max(\n order.indexOf(props.minLevel),\n Math.min(order.indexOf(props.maxLevel), level ? order.indexOf(level) : 0),\n )\n ]\nconst nextLevel = (level: CalendarLevel) => order[Math.min(2, order.indexOf(level) + 1)]\nconst [level, setLevel] = useUncontrolled<CalendarLevel>({\n value: computed(() => (props.level === undefined ? undefined : clampLevel(props.level))),\n defaultValue: props.defaultLevel === undefined ? undefined : clampLevel(props.defaultLevel),\n finalValue: clampLevel(),\n onChange: (value) => {\n emit('update:level', value)\n emit('level-change', value)\n },\n})\nconst [date, setDate] = useUncontrolled<DateStringValue>({\n value: computed(() => toDateString(props.date) || undefined),\n defaultValue: toDateString(props.defaultDate) || undefined,\n finalValue: getDefaultClampedDate({ minDate: props.minDate, maxDate: props.maxDate }),\n onChange: (value) => {\n emit('update:date', value)\n emit('date-change', value)\n },\n})\nconst scroll = computed(() => props.columnsToScroll || props.numberOfColumns || 1)\nconst columns = computed(() =>\n Array.from({ length: props.numberOfColumns || 1 }, (_, column) => {\n const multiplier = level.value === 'decade' ? 10 : 1\n const unit = level.value === 'month' ? 'month' : 'year'\n return dayjs(date.value)\n .add(column * multiplier, unit)\n .format('YYYY-MM-DD')\n }),\n)\nconst hasDateListener = () => {\n const vnodeProps = instance?.vnode.props\n return !!(\n vnodeProps?.['onUpdate:date'] ||\n vnodeProps?.onDateChange ||\n vnodeProps?.['onDate-change']\n )\n}\nconst updateDate = (amount: number, unit: 'month' | 'year') =>\n setDate(dayjs(date.value).add(amount, unit).format('YYYY-MM-DD'))\nconst monthLabel = (value: DateStringValue) =>\n typeof props.monthLabelFormat === 'function'\n ? props.monthLabelFormat(value)\n : getMonthLabel(value, props.monthLabelFormat, props.locale)\nconst yearLabel = (value: DateStringValue) =>\n typeof props.yearLabelFormat === 'function'\n ? props.yearLabelFormat(value)\n : dayjs(value).format(props.yearLabelFormat)\nconst decadeLabel = (value: DateStringValue) => {\n const years = getYearRange(value)\n return props.decadeLabelFormat?.(years[0], years.at(-1)!) ?? getDecadeLabel(value)\n}\nconst renderDay =\n props.renderDay ??\n ((slots.renderDay ?? slots.day)\n ? (value: DateStringValue) => (slots.renderDay ?? slots.day)?.({ date: value })\n : undefined)\nfunction selectMonth(value: DateStringValue) {\n setDate(value)\n emit('month-select', value)\n setLevel(clampLevel('month'))\n}\nfunction selectYear(value: DateStringValue) {\n setDate(value)\n emit('year-select', value)\n setLevel(clampLevel('year'))\n}\n</script>\n\n<template>\n <Box\n v-bind=\"attrs\"\n :class=\"[classes.calendar, attrs.class]\"\n data-calendar\n :data-full-width=\"props.fullWidth || undefined\"\n >\n <div v-for=\"(currentDate, column) in columns\" :key=\"currentDate\" :class=\"classes.calendarLevel\">\n <template v-if=\"level === 'month'\">\n <CalendarHeader\n :label=\"monthLabel(currentDate)\"\n :has-next-level=\"props.maxLevel !== 'month'\"\n :with-previous=\"column === 0\"\n :with-next=\"column === columns.length - 1\"\n :full-width=\"props.fullWidth\"\n :with-native-level-select=\"props.withNativeLevelSelect\"\n :years-select-range=\"props.yearsSelectRange\"\n calendar-level=\"month\"\n :date=\"currentDate\"\n :locale=\"props.locale\"\n :min-date=\"props.minDate\"\n :max-date=\"props.maxDate\"\n :disable-native-level-select=\"props.date !== undefined && !hasDateListener()\"\n @date-change=\"setDate\"\n @previous=\"updateDate(-scroll, 'month')\"\n @next=\"updateDate(scroll, 'month')\"\n @level-click=\"setLevel(nextLevel(level))\"\n />\n <Month\n :month=\"currentDate\"\n :value=\"props.value\"\n :type=\"props.type\"\n :min-date=\"props.minDate\"\n :max-date=\"props.maxDate\"\n :first-day-of-week=\"props.firstDayOfWeek\"\n :weekend-days=\"props.weekendDays\"\n :locale=\"props.locale\"\n :weekday-format=\"props.weekdayFormat\"\n :render-day=\"renderDay\"\n :get-day-props=\"props.getDayProps\"\n :get-day-aria-label=\"props.getDayAriaLabel\"\n :exclude-date=\"props.excludeDate\"\n :hide-outside-dates=\"props.hideOutsideDates\"\n :hide-weekdays=\"props.hideWeekdays\"\n :with-cell-spacing=\"props.withCellSpacing\"\n :highlight-today=\"props.highlightToday\"\n :with-week-numbers=\"props.withWeekNumbers\"\n :static=\"props.static\"\n :full-width=\"props.fullWidth\"\n @day-click=\"(date) => emit('day-click', date)\"\n @day-mouse-enter=\"(date) => emit('day-mouse-enter', date)\"\n />\n </template>\n <template v-else-if=\"level === 'year'\">\n <CalendarHeader\n :label=\"yearLabel(currentDate)\"\n :has-next-level=\"props.maxLevel === 'decade'\"\n :with-previous=\"column === 0\"\n :with-next=\"column === columns.length - 1\"\n :full-width=\"props.fullWidth\"\n :with-native-level-select=\"props.withNativeLevelSelect\"\n :years-select-range=\"props.yearsSelectRange\"\n calendar-level=\"year\"\n :date=\"currentDate\"\n :locale=\"props.locale\"\n :min-date=\"props.minDate\"\n :max-date=\"props.maxDate\"\n :disable-native-level-select=\"props.date !== undefined && !hasDateListener()\"\n @date-change=\"setDate\"\n @previous=\"updateDate(-scroll, 'year')\"\n @next=\"updateDate(scroll, 'year')\"\n @level-click=\"setLevel(nextLevel(level))\"\n />\n <MonthsList\n :year=\"currentDate\"\n :value=\"props.value\"\n :min-date=\"props.minDate\"\n :max-date=\"props.maxDate\"\n :months-list-format=\"props.monthsListFormat\"\n :get-month-control-props=\"props.getMonthControlProps\"\n :full-width=\"props.fullWidth\"\n @month-mouse-enter=\"(date) => emit('month-mouse-enter', date)\"\n @month-select=\"selectMonth\"\n />\n </template>\n <template v-else>\n <CalendarHeader\n :label=\"decadeLabel(currentDate)\"\n :with-previous=\"column === 0\"\n :with-next=\"column === columns.length - 1\"\n :has-next-level=\"false\"\n :full-width=\"props.fullWidth\"\n @previous=\"updateDate(-10 * scroll, 'year')\"\n @next=\"updateDate(10 * scroll, 'year')\"\n />\n <YearsList\n :decade=\"currentDate\"\n :value=\"props.value\"\n :min-date=\"props.minDate\"\n :max-date=\"props.maxDate\"\n :years-list-format=\"props.yearsListFormat\"\n :get-year-control-props=\"props.getYearControlProps\"\n :full-width=\"props.fullWidth\"\n @year-mouse-enter=\"(date) => emit('year-mouse-enter', date)\"\n @year-select=\"selectYear\"\n />\n </template>\n </div>\n </Box>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, getCurrentInstance, useAttrs } from 'vue'\nimport { Box } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport CalendarHeader from '../CalendarHeader/CalendarHeader.vue'\nimport Month from '../Month/Month.vue'\nimport MonthsList from '../MonthsList/MonthsList.vue'\nimport YearsList from '../YearsList/YearsList.vue'\nimport {\n getDecadeLabel,\n getDefaultClampedDate,\n getMonthLabel,\n getYearRange,\n toDateString,\n} from '../../utils'\nimport type { CalendarLevel, CalendarProps, DateStringValue, RenderDaySlots } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'Calendar', inheritAttrs: false })\nconst props = withDefaults(defineProps<CalendarProps>(), {\n maxLevel: 'decade',\n minLevel: 'month',\n numberOfColumns: 1,\n type: 'default',\n monthLabelFormat: 'MMMM YYYY',\n yearLabelFormat: 'YYYY',\n monthsListFormat: 'MMM',\n yearsListFormat: 'YYYY',\n hideOutsideDates: false,\n hideWeekdays: false,\n withCellSpacing: true,\n highlightToday: false,\n withWeekNumbers: false,\n static: false,\n fullWidth: false,\n withNativeLevelSelect: false,\n})\nconst emit = defineEmits<{\n 'update:level': [value: CalendarLevel]\n 'level-change': [value: CalendarLevel]\n 'update:date': [value: DateStringValue]\n 'date-change': [value: DateStringValue]\n 'day-click': [date: DateStringValue]\n 'day-mouse-enter': [date: DateStringValue]\n 'month-select': [date: DateStringValue]\n 'month-mouse-enter': [date: DateStringValue]\n 'year-select': [date: DateStringValue]\n 'year-mouse-enter': [date: DateStringValue]\n}>()\nconst slots = defineSlots<RenderDaySlots>()\nconst attrs = useAttrs()\nconst instance = getCurrentInstance()\nconst order: CalendarLevel[] = ['month', 'year', 'decade']\nconst clampLevel = (level?: CalendarLevel) =>\n order[\n Math.max(\n order.indexOf(props.minLevel),\n Math.min(order.indexOf(props.maxLevel), level ? order.indexOf(level) : 0),\n )\n ]\nconst nextLevel = (level: CalendarLevel) => order[Math.min(2, order.indexOf(level) + 1)]\nconst [level, setLevel] = useUncontrolled<CalendarLevel>({\n value: computed(() => (props.level === undefined ? undefined : clampLevel(props.level))),\n defaultValue: props.defaultLevel === undefined ? undefined : clampLevel(props.defaultLevel),\n finalValue: clampLevel(),\n onChange: (value) => {\n emit('update:level', value)\n emit('level-change', value)\n },\n})\nconst [date, setDate] = useUncontrolled<DateStringValue>({\n value: computed(() => toDateString(props.date) || undefined),\n defaultValue: toDateString(props.defaultDate) || undefined,\n finalValue: getDefaultClampedDate({ minDate: props.minDate, maxDate: props.maxDate }),\n onChange: (value) => {\n emit('update:date', value)\n emit('date-change', value)\n },\n})\nconst scroll = computed(() => props.columnsToScroll || props.numberOfColumns || 1)\nconst columns = computed(() =>\n Array.from({ length: props.numberOfColumns || 1 }, (_, column) => {\n const multiplier = level.value === 'decade' ? 10 : 1\n const unit = level.value === 'month' ? 'month' : 'year'\n return dayjs(date.value)\n .add(column * multiplier, unit)\n .format('YYYY-MM-DD')\n }),\n)\nconst hasDateListener = () => {\n const vnodeProps = instance?.vnode.props\n return !!(\n vnodeProps?.['onUpdate:date'] ||\n vnodeProps?.onDateChange ||\n vnodeProps?.['onDate-change']\n )\n}\nconst updateDate = (amount: number, unit: 'month' | 'year') =>\n setDate(dayjs(date.value).add(amount, unit).format('YYYY-MM-DD'))\nconst monthLabel = (value: DateStringValue) =>\n typeof props.monthLabelFormat === 'function'\n ? props.monthLabelFormat(value)\n : getMonthLabel(value, props.monthLabelFormat, props.locale)\nconst yearLabel = (value: DateStringValue) =>\n typeof props.yearLabelFormat === 'function'\n ? props.yearLabelFormat(value)\n : dayjs(value).format(props.yearLabelFormat)\nconst decadeLabel = (value: DateStringValue) => {\n const years = getYearRange(value)\n return props.decadeLabelFormat?.(years[0], years.at(-1)!) ?? getDecadeLabel(value)\n}\nconst renderDay =\n props.renderDay ??\n ((slots.renderDay ?? slots.day)\n ? (value: DateStringValue) => (slots.renderDay ?? slots.day)?.({ date: value })\n : undefined)\nfunction selectMonth(value: DateStringValue) {\n setDate(value)\n emit('month-select', value)\n setLevel(clampLevel('month'))\n}\nfunction selectYear(value: DateStringValue) {\n setDate(value)\n emit('year-select', value)\n setLevel(clampLevel('year'))\n}\n</script>\n\n<template>\n <Box\n v-bind=\"attrs\"\n :class=\"[classes.calendar, attrs.class]\"\n data-calendar\n :data-full-width=\"props.fullWidth || undefined\"\n >\n <div v-for=\"(currentDate, column) in columns\" :key=\"currentDate\" :class=\"classes.calendarLevel\">\n <template v-if=\"level === 'month'\">\n <CalendarHeader\n :label=\"monthLabel(currentDate)\"\n :has-next-level=\"props.maxLevel !== 'month'\"\n :with-previous=\"column === 0\"\n :with-next=\"column === columns.length - 1\"\n :full-width=\"props.fullWidth\"\n :with-native-level-select=\"props.withNativeLevelSelect\"\n :years-select-range=\"props.yearsSelectRange\"\n calendar-level=\"month\"\n :date=\"currentDate\"\n :locale=\"props.locale\"\n :min-date=\"props.minDate\"\n :max-date=\"props.maxDate\"\n :disable-native-level-select=\"props.date !== undefined && !hasDateListener()\"\n @date-change=\"setDate\"\n @previous=\"updateDate(-scroll, 'month')\"\n @next=\"updateDate(scroll, 'month')\"\n @level-click=\"setLevel(nextLevel(level))\"\n />\n <Month\n :month=\"currentDate\"\n :value=\"props.value\"\n :type=\"props.type\"\n :min-date=\"props.minDate\"\n :max-date=\"props.maxDate\"\n :first-day-of-week=\"props.firstDayOfWeek\"\n :weekend-days=\"props.weekendDays\"\n :locale=\"props.locale\"\n :weekday-format=\"props.weekdayFormat\"\n :render-day=\"renderDay\"\n :get-day-props=\"props.getDayProps\"\n :get-day-aria-label=\"props.getDayAriaLabel\"\n :exclude-date=\"props.excludeDate\"\n :hide-outside-dates=\"props.hideOutsideDates\"\n :hide-weekdays=\"props.hideWeekdays\"\n :with-cell-spacing=\"props.withCellSpacing\"\n :highlight-today=\"props.highlightToday\"\n :with-week-numbers=\"props.withWeekNumbers\"\n :static=\"props.static\"\n :full-width=\"props.fullWidth\"\n @day-click=\"(date) => emit('day-click', date)\"\n @day-mouse-enter=\"(date) => emit('day-mouse-enter', date)\"\n />\n </template>\n <template v-else-if=\"level === 'year'\">\n <CalendarHeader\n :label=\"yearLabel(currentDate)\"\n :has-next-level=\"props.maxLevel === 'decade'\"\n :with-previous=\"column === 0\"\n :with-next=\"column === columns.length - 1\"\n :full-width=\"props.fullWidth\"\n :with-native-level-select=\"props.withNativeLevelSelect\"\n :years-select-range=\"props.yearsSelectRange\"\n calendar-level=\"year\"\n :date=\"currentDate\"\n :locale=\"props.locale\"\n :min-date=\"props.minDate\"\n :max-date=\"props.maxDate\"\n :disable-native-level-select=\"props.date !== undefined && !hasDateListener()\"\n @date-change=\"setDate\"\n @previous=\"updateDate(-scroll, 'year')\"\n @next=\"updateDate(scroll, 'year')\"\n @level-click=\"setLevel(nextLevel(level))\"\n />\n <MonthsList\n :year=\"currentDate\"\n :value=\"props.value\"\n :min-date=\"props.minDate\"\n :max-date=\"props.maxDate\"\n :months-list-format=\"props.monthsListFormat\"\n :get-month-control-props=\"props.getMonthControlProps\"\n :full-width=\"props.fullWidth\"\n @month-mouse-enter=\"(date) => emit('month-mouse-enter', date)\"\n @month-select=\"selectMonth\"\n />\n </template>\n <template v-else>\n <CalendarHeader\n :label=\"decadeLabel(currentDate)\"\n :with-previous=\"column === 0\"\n :with-next=\"column === columns.length - 1\"\n :has-next-level=\"false\"\n :full-width=\"props.fullWidth\"\n @previous=\"updateDate(-10 * scroll, 'year')\"\n @next=\"updateDate(10 * scroll, 'year')\"\n />\n <YearsList\n :decade=\"currentDate\"\n :value=\"props.value\"\n :min-date=\"props.minDate\"\n :max-date=\"props.maxDate\"\n :years-list-format=\"props.yearsListFormat\"\n :get-year-control-props=\"props.getYearControlProps\"\n :full-width=\"props.fullWidth\"\n @year-mouse-enter=\"(date) => emit('year-mouse-enter', date)\"\n @year-select=\"selectYear\"\n />\n </template>\n </div>\n </Box>\n</template>\n","import { computed, getCurrentInstance, type ComputedRef } from 'vue'\n\nfunction kebabCase(value: string) {\n return value.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase()\n}\n\n/**\n * Forwards only props that were actually supplied by the consumer. This is important for\n * adapter components because Vue casts absent Boolean props to `false`, which must not shadow\n * defaults owned by the implementation component.\n */\nexport function useForwardedProps<Props extends object>(props: Props): ComputedRef<Props> {\n const instance = getCurrentInstance()\n\n return computed(() => {\n const rawProps = instance?.vnode.props ?? {}\n const result: Partial<Props> = {}\n\n for (const key of Object.keys(props) as Array<keyof Props & string>) {\n if (key in rawProps || kebabCase(key) in rawProps) {\n result[key] = props[key]\n }\n }\n\n return result as Props\n })\n}\n","<script setup lang=\"ts\">\nimport { useAttrs, useSlots } from 'vue'\nimport LegacyComponent from '../Calendar/Calendar.vue'\nimport { useForwardedProps } from '../../utils/use-forwarded-props'\nimport type { CalendarProps } from '../../types'\n\ndefineOptions({\n name: 'MonthLevel',\n inheritAttrs: false,\n})\n\nconst props = defineProps<CalendarProps>()\nconst emit = defineEmits<{\n 'update:level': [value: any]\n 'level-change': [value: any]\n 'update:date': [value: any]\n 'date-change': [value: any]\n}>()\nconst attrs = useAttrs()\nconst slots = useSlots()\nconst forwardedProps = useForwardedProps(props)\n</script>\n\n<template>\n <LegacyComponent\n v-bind=\"{ ...attrs, ...forwardedProps }\"\n @update:level=\"emit('update:level', $event)\"\n @level-change=\"emit('level-change', $event)\"\n @update:date=\"emit('update:date', $event)\"\n @date-change=\"emit('date-change', $event)\"\n >\n <template v-for=\"(_, name) in slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps || {}\" />\n </template>\n </LegacyComponent>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs, useSlots } from 'vue'\nimport LegacyComponent from '../Calendar/Calendar.vue'\nimport { useForwardedProps } from '../../utils/use-forwarded-props'\nimport type { CalendarProps } from '../../types'\n\ndefineOptions({\n name: 'MonthLevel',\n inheritAttrs: false,\n})\n\nconst props = defineProps<CalendarProps>()\nconst emit = defineEmits<{\n 'update:level': [value: any]\n 'level-change': [value: any]\n 'update:date': [value: any]\n 'date-change': [value: any]\n}>()\nconst attrs = useAttrs()\nconst slots = useSlots()\nconst forwardedProps = useForwardedProps(props)\n</script>\n\n<template>\n <LegacyComponent\n v-bind=\"{ ...attrs, ...forwardedProps }\"\n @update:level=\"emit('update:level', $event)\"\n @level-change=\"emit('level-change', $event)\"\n @update:date=\"emit('update:date', $event)\"\n @date-change=\"emit('date-change', $event)\"\n >\n <template v-for=\"(_, name) in slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps || {}\" />\n </template>\n </LegacyComponent>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs, useSlots } from 'vue'\nimport LegacyComponent from '../Calendar/Calendar.vue'\nimport { useForwardedProps } from '../../utils/use-forwarded-props'\nimport type { CalendarProps } from '../../types'\n\ndefineOptions({\n name: 'YearLevel',\n inheritAttrs: false,\n})\n\nconst props = defineProps<CalendarProps>()\nconst emit = defineEmits<{\n 'update:level': [value: any]\n 'level-change': [value: any]\n 'update:date': [value: any]\n 'date-change': [value: any]\n}>()\nconst attrs = useAttrs()\nconst slots = useSlots()\nconst forwardedProps = useForwardedProps(props)\n</script>\n\n<template>\n <LegacyComponent\n v-bind=\"{ ...attrs, ...forwardedProps }\"\n @update:level=\"emit('update:level', $event)\"\n @level-change=\"emit('level-change', $event)\"\n @update:date=\"emit('update:date', $event)\"\n @date-change=\"emit('date-change', $event)\"\n >\n <template v-for=\"(_, name) in slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps || {}\" />\n </template>\n </LegacyComponent>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs, useSlots } from 'vue'\nimport LegacyComponent from '../Calendar/Calendar.vue'\nimport { useForwardedProps } from '../../utils/use-forwarded-props'\nimport type { CalendarProps } from '../../types'\n\ndefineOptions({\n name: 'YearLevel',\n inheritAttrs: false,\n})\n\nconst props = defineProps<CalendarProps>()\nconst emit = defineEmits<{\n 'update:level': [value: any]\n 'level-change': [value: any]\n 'update:date': [value: any]\n 'date-change': [value: any]\n}>()\nconst attrs = useAttrs()\nconst slots = useSlots()\nconst forwardedProps = useForwardedProps(props)\n</script>\n\n<template>\n <LegacyComponent\n v-bind=\"{ ...attrs, ...forwardedProps }\"\n @update:level=\"emit('update:level', $event)\"\n @level-change=\"emit('level-change', $event)\"\n @update:date=\"emit('update:date', $event)\"\n @date-change=\"emit('date-change', $event)\"\n >\n <template v-for=\"(_, name) in slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps || {}\" />\n </template>\n </LegacyComponent>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs, useSlots } from 'vue'\nimport LegacyComponent from '../Calendar/Calendar.vue'\nimport { useForwardedProps } from '../../utils/use-forwarded-props'\nimport type { CalendarProps } from '../../types'\n\ndefineOptions({\n name: 'DecadeLevel',\n inheritAttrs: false,\n})\n\nconst props = defineProps<CalendarProps>()\nconst emit = defineEmits<{\n 'update:level': [value: any]\n 'level-change': [value: any]\n 'update:date': [value: any]\n 'date-change': [value: any]\n}>()\nconst attrs = useAttrs()\nconst slots = useSlots()\nconst forwardedProps = useForwardedProps(props)\n</script>\n\n<template>\n <LegacyComponent\n v-bind=\"{ ...attrs, ...forwardedProps }\"\n @update:level=\"emit('update:level', $event)\"\n @level-change=\"emit('level-change', $event)\"\n @update:date=\"emit('update:date', $event)\"\n @date-change=\"emit('date-change', $event)\"\n >\n <template v-for=\"(_, name) in slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps || {}\" />\n </template>\n </LegacyComponent>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs, useSlots } from 'vue'\nimport LegacyComponent from '../Calendar/Calendar.vue'\nimport { useForwardedProps } from '../../utils/use-forwarded-props'\nimport type { CalendarProps } from '../../types'\n\ndefineOptions({\n name: 'DecadeLevel',\n inheritAttrs: false,\n})\n\nconst props = defineProps<CalendarProps>()\nconst emit = defineEmits<{\n 'update:level': [value: any]\n 'level-change': [value: any]\n 'update:date': [value: any]\n 'date-change': [value: any]\n}>()\nconst attrs = useAttrs()\nconst slots = useSlots()\nconst forwardedProps = useForwardedProps(props)\n</script>\n\n<template>\n <LegacyComponent\n v-bind=\"{ ...attrs, ...forwardedProps }\"\n @update:level=\"emit('update:level', $event)\"\n @level-change=\"emit('level-change', $event)\"\n @update:date=\"emit('update:date', $event)\"\n @date-change=\"emit('date-change', $event)\"\n >\n <template v-for=\"(_, name) in slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps || {}\" />\n </template>\n </LegacyComponent>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs, useSlots } from 'vue'\nimport LegacyComponent from '../Calendar/Calendar.vue'\nimport { useForwardedProps } from '../../utils/use-forwarded-props'\nimport type { CalendarProps } from '../../types'\n\ndefineOptions({\n name: 'MonthLevelGroup',\n inheritAttrs: false,\n})\n\nconst props = defineProps<CalendarProps>()\nconst emit = defineEmits<{\n 'update:level': [value: any]\n 'level-change': [value: any]\n 'update:date': [value: any]\n 'date-change': [value: any]\n}>()\nconst attrs = useAttrs()\nconst slots = useSlots()\nconst forwardedProps = useForwardedProps(props)\n</script>\n\n<template>\n <LegacyComponent\n v-bind=\"{ ...attrs, ...forwardedProps }\"\n @update:level=\"emit('update:level', $event)\"\n @level-change=\"emit('level-change', $event)\"\n @update:date=\"emit('update:date', $event)\"\n @date-change=\"emit('date-change', $event)\"\n >\n <template v-for=\"(_, name) in slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps || {}\" />\n </template>\n </LegacyComponent>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs, useSlots } from 'vue'\nimport LegacyComponent from '../Calendar/Calendar.vue'\nimport { useForwardedProps } from '../../utils/use-forwarded-props'\nimport type { CalendarProps } from '../../types'\n\ndefineOptions({\n name: 'MonthLevelGroup',\n inheritAttrs: false,\n})\n\nconst props = defineProps<CalendarProps>()\nconst emit = defineEmits<{\n 'update:level': [value: any]\n 'level-change': [value: any]\n 'update:date': [value: any]\n 'date-change': [value: any]\n}>()\nconst attrs = useAttrs()\nconst slots = useSlots()\nconst forwardedProps = useForwardedProps(props)\n</script>\n\n<template>\n <LegacyComponent\n v-bind=\"{ ...attrs, ...forwardedProps }\"\n @update:level=\"emit('update:level', $event)\"\n @level-change=\"emit('level-change', $event)\"\n @update:date=\"emit('update:date', $event)\"\n @date-change=\"emit('date-change', $event)\"\n >\n <template v-for=\"(_, name) in slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps || {}\" />\n </template>\n </LegacyComponent>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs, useSlots } from 'vue'\nimport LegacyComponent from '../Calendar/Calendar.vue'\nimport { useForwardedProps } from '../../utils/use-forwarded-props'\nimport type { CalendarProps } from '../../types'\n\ndefineOptions({\n name: 'YearLevelGroup',\n inheritAttrs: false,\n})\n\nconst props = defineProps<CalendarProps>()\nconst emit = defineEmits<{\n 'update:level': [value: any]\n 'level-change': [value: any]\n 'update:date': [value: any]\n 'date-change': [value: any]\n}>()\nconst attrs = useAttrs()\nconst slots = useSlots()\nconst forwardedProps = useForwardedProps(props)\n</script>\n\n<template>\n <LegacyComponent\n v-bind=\"{ ...attrs, ...forwardedProps }\"\n @update:level=\"emit('update:level', $event)\"\n @level-change=\"emit('level-change', $event)\"\n @update:date=\"emit('update:date', $event)\"\n @date-change=\"emit('date-change', $event)\"\n >\n <template v-for=\"(_, name) in slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps || {}\" />\n </template>\n </LegacyComponent>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs, useSlots } from 'vue'\nimport LegacyComponent from '../Calendar/Calendar.vue'\nimport { useForwardedProps } from '../../utils/use-forwarded-props'\nimport type { CalendarProps } from '../../types'\n\ndefineOptions({\n name: 'YearLevelGroup',\n inheritAttrs: false,\n})\n\nconst props = defineProps<CalendarProps>()\nconst emit = defineEmits<{\n 'update:level': [value: any]\n 'level-change': [value: any]\n 'update:date': [value: any]\n 'date-change': [value: any]\n}>()\nconst attrs = useAttrs()\nconst slots = useSlots()\nconst forwardedProps = useForwardedProps(props)\n</script>\n\n<template>\n <LegacyComponent\n v-bind=\"{ ...attrs, ...forwardedProps }\"\n @update:level=\"emit('update:level', $event)\"\n @level-change=\"emit('level-change', $event)\"\n @update:date=\"emit('update:date', $event)\"\n @date-change=\"emit('date-change', $event)\"\n >\n <template v-for=\"(_, name) in slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps || {}\" />\n </template>\n </LegacyComponent>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs, useSlots } from 'vue'\nimport LegacyComponent from '../Calendar/Calendar.vue'\nimport { useForwardedProps } from '../../utils/use-forwarded-props'\nimport type { CalendarProps } from '../../types'\n\ndefineOptions({\n name: 'DecadeLevelGroup',\n inheritAttrs: false,\n})\n\nconst props = defineProps<CalendarProps>()\nconst emit = defineEmits<{\n 'update:level': [value: any]\n 'level-change': [value: any]\n 'update:date': [value: any]\n 'date-change': [value: any]\n}>()\nconst attrs = useAttrs()\nconst slots = useSlots()\nconst forwardedProps = useForwardedProps(props)\n</script>\n\n<template>\n <LegacyComponent\n v-bind=\"{ ...attrs, ...forwardedProps }\"\n @update:level=\"emit('update:level', $event)\"\n @level-change=\"emit('level-change', $event)\"\n @update:date=\"emit('update:date', $event)\"\n @date-change=\"emit('date-change', $event)\"\n >\n <template v-for=\"(_, name) in slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps || {}\" />\n </template>\n </LegacyComponent>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs, useSlots } from 'vue'\nimport LegacyComponent from '../Calendar/Calendar.vue'\nimport { useForwardedProps } from '../../utils/use-forwarded-props'\nimport type { CalendarProps } from '../../types'\n\ndefineOptions({\n name: 'DecadeLevelGroup',\n inheritAttrs: false,\n})\n\nconst props = defineProps<CalendarProps>()\nconst emit = defineEmits<{\n 'update:level': [value: any]\n 'level-change': [value: any]\n 'update:date': [value: any]\n 'date-change': [value: any]\n}>()\nconst attrs = useAttrs()\nconst slots = useSlots()\nconst forwardedProps = useForwardedProps(props)\n</script>\n\n<template>\n <LegacyComponent\n v-bind=\"{ ...attrs, ...forwardedProps }\"\n @update:level=\"emit('update:level', $event)\"\n @level-change=\"emit('level-change', $event)\"\n @update:date=\"emit('update:date', $event)\"\n @date-change=\"emit('date-change', $event)\"\n >\n <template v-for=\"(_, name) in slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps || {}\" />\n </template>\n </LegacyComponent>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs, useSlots } from 'vue'\nimport LegacyComponent from '../Calendar/Calendar.vue'\nimport { useForwardedProps } from '../../utils/use-forwarded-props'\nimport type { CalendarProps } from '../../types'\n\ndefineOptions({\n name: 'LevelsGroup',\n inheritAttrs: false,\n})\n\nconst props = defineProps<CalendarProps>()\nconst emit = defineEmits<{\n 'update:level': [value: any]\n 'level-change': [value: any]\n 'update:date': [value: any]\n 'date-change': [value: any]\n}>()\nconst attrs = useAttrs()\nconst slots = useSlots()\nconst forwardedProps = useForwardedProps(props)\n</script>\n\n<template>\n <LegacyComponent\n v-bind=\"{ ...attrs, ...forwardedProps }\"\n @update:level=\"emit('update:level', $event)\"\n @level-change=\"emit('level-change', $event)\"\n @update:date=\"emit('update:date', $event)\"\n @date-change=\"emit('date-change', $event)\"\n >\n <template v-for=\"(_, name) in slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps || {}\" />\n </template>\n </LegacyComponent>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs, useSlots } from 'vue'\nimport LegacyComponent from '../Calendar/Calendar.vue'\nimport { useForwardedProps } from '../../utils/use-forwarded-props'\nimport type { CalendarProps } from '../../types'\n\ndefineOptions({\n name: 'LevelsGroup',\n inheritAttrs: false,\n})\n\nconst props = defineProps<CalendarProps>()\nconst emit = defineEmits<{\n 'update:level': [value: any]\n 'level-change': [value: any]\n 'update:date': [value: any]\n 'date-change': [value: any]\n}>()\nconst attrs = useAttrs()\nconst slots = useSlots()\nconst forwardedProps = useForwardedProps(props)\n</script>\n\n<template>\n <LegacyComponent\n v-bind=\"{ ...attrs, ...forwardedProps }\"\n @update:level=\"emit('update:level', $event)\"\n @level-change=\"emit('level-change', $event)\"\n @update:date=\"emit('update:date', $event)\"\n @date-change=\"emit('date-change', $event)\"\n >\n <template v-for=\"(_, name) in slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps || {}\" />\n </template>\n </LegacyComponent>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { UnstyledButton } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport Calendar from '../Calendar/Calendar.vue'\nimport { getNextPickerValue, isSameDate } from '../../utils'\nimport type {\n CalendarLevel,\n DatePickerProps,\n DatePickerValueType,\n DateStringValue,\n DateValue,\n RenderDaySlots,\n} from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'DatePicker', inheritAttrs: false })\nconst props = withDefaults(defineProps<DatePickerProps>(), {\n type: 'default',\n allowDeselect: true,\n sortDates: true,\n withCellSpacing: true,\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: DatePickerValueType]\n change: [value: DatePickerValueType]\n}>()\nconst slots = defineSlots<RenderDaySlots>()\nconst attrs = useAttrs()\nconst finalValue = computed<DatePickerValueType>(() =>\n props.type === 'multiple' ? [] : props.type === 'range' ? [null, null] : null,\n)\nconst [value, setValue] = useUncontrolled<DatePickerValueType>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: finalValue.value,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst calendarDate = ref<DateStringValue>()\nconst calendarLevel = ref<CalendarLevel>()\nconst calendarProps = computed(() => {\n const { modelValue, defaultValue, allowDeselect, sortDates, presets, ...rest } = props\n void modelValue\n void defaultValue\n void allowDeselect\n void sortDates\n void presets\n return rest\n})\nfunction selectDate(date: DateStringValue) {\n if (props.type === 'default' && props.allowDeselect && isSameDate(value.value as DateValue, date))\n setValue(null)\n else setValue(getNextPickerValue(value.value, date, props.type, props.sortDates))\n}\nfunction setCalendarDate(next: DateStringValue) {\n calendarDate.value = next\n}\nfunction setCalendarLevel(next: CalendarLevel) {\n calendarLevel.value = next\n}\nfunction selectPreset(next: DatePickerValueType) {\n const selected = Array.isArray(next) ? next[0] : next\n if (selected) {\n calendarDate.value = selected\n calendarLevel.value = 'month'\n }\n setValue(next)\n}\n</script>\n\n<template>\n <div v-if=\"props.presets?.length\" :class=\"classes.datePickerRoot\">\n <div :class=\"classes.presetsList\">\n <UnstyledButton\n v-for=\"(preset, index) in props.presets\"\n :key=\"index\"\n :class=\"classes.presetButton\"\n @click=\"selectPreset(preset.value)\"\n @mousedown.prevent\n >{{ preset.label }}</UnstyledButton\n >\n </div>\n <Calendar\n v-bind=\"{ ...attrs, ...calendarProps }\"\n :type=\"props.type\"\n :value=\"value\"\n :date=\"calendarDate\"\n :level=\"calendarLevel\"\n @date-change=\"setCalendarDate\"\n @level-change=\"setCalendarLevel\"\n @day-click=\"selectDate\"\n >\n <template v-if=\"slots.renderDay\" #renderDay=\"scope\"\n ><slot name=\"renderDay\" v-bind=\"scope\"\n /></template>\n <template v-if=\"slots.day\" #day=\"scope\"><slot name=\"day\" v-bind=\"scope\" /></template>\n </Calendar>\n </div>\n <Calendar\n v-else\n v-bind=\"{ ...attrs, ...calendarProps }\"\n :type=\"props.type\"\n :value=\"value\"\n :date=\"calendarDate\"\n :level=\"calendarLevel\"\n @date-change=\"setCalendarDate\"\n @level-change=\"setCalendarLevel\"\n @day-click=\"selectDate\"\n >\n <template v-if=\"slots.renderDay\" #renderDay=\"scope\"\n ><slot name=\"renderDay\" v-bind=\"scope\"\n /></template>\n <template v-if=\"slots.day\" #day=\"scope\"><slot name=\"day\" v-bind=\"scope\" /></template>\n </Calendar>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { UnstyledButton } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport Calendar from '../Calendar/Calendar.vue'\nimport { getNextPickerValue, isSameDate } from '../../utils'\nimport type {\n CalendarLevel,\n DatePickerProps,\n DatePickerValueType,\n DateStringValue,\n DateValue,\n RenderDaySlots,\n} from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'DatePicker', inheritAttrs: false })\nconst props = withDefaults(defineProps<DatePickerProps>(), {\n type: 'default',\n allowDeselect: true,\n sortDates: true,\n withCellSpacing: true,\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: DatePickerValueType]\n change: [value: DatePickerValueType]\n}>()\nconst slots = defineSlots<RenderDaySlots>()\nconst attrs = useAttrs()\nconst finalValue = computed<DatePickerValueType>(() =>\n props.type === 'multiple' ? [] : props.type === 'range' ? [null, null] : null,\n)\nconst [value, setValue] = useUncontrolled<DatePickerValueType>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: finalValue.value,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst calendarDate = ref<DateStringValue>()\nconst calendarLevel = ref<CalendarLevel>()\nconst calendarProps = computed(() => {\n const { modelValue, defaultValue, allowDeselect, sortDates, presets, ...rest } = props\n void modelValue\n void defaultValue\n void allowDeselect\n void sortDates\n void presets\n return rest\n})\nfunction selectDate(date: DateStringValue) {\n if (props.type === 'default' && props.allowDeselect && isSameDate(value.value as DateValue, date))\n setValue(null)\n else setValue(getNextPickerValue(value.value, date, props.type, props.sortDates))\n}\nfunction setCalendarDate(next: DateStringValue) {\n calendarDate.value = next\n}\nfunction setCalendarLevel(next: CalendarLevel) {\n calendarLevel.value = next\n}\nfunction selectPreset(next: DatePickerValueType) {\n const selected = Array.isArray(next) ? next[0] : next\n if (selected) {\n calendarDate.value = selected\n calendarLevel.value = 'month'\n }\n setValue(next)\n}\n</script>\n\n<template>\n <div v-if=\"props.presets?.length\" :class=\"classes.datePickerRoot\">\n <div :class=\"classes.presetsList\">\n <UnstyledButton\n v-for=\"(preset, index) in props.presets\"\n :key=\"index\"\n :class=\"classes.presetButton\"\n @click=\"selectPreset(preset.value)\"\n @mousedown.prevent\n >{{ preset.label }}</UnstyledButton\n >\n </div>\n <Calendar\n v-bind=\"{ ...attrs, ...calendarProps }\"\n :type=\"props.type\"\n :value=\"value\"\n :date=\"calendarDate\"\n :level=\"calendarLevel\"\n @date-change=\"setCalendarDate\"\n @level-change=\"setCalendarLevel\"\n @day-click=\"selectDate\"\n >\n <template v-if=\"slots.renderDay\" #renderDay=\"scope\"\n ><slot name=\"renderDay\" v-bind=\"scope\"\n /></template>\n <template v-if=\"slots.day\" #day=\"scope\"><slot name=\"day\" v-bind=\"scope\" /></template>\n </Calendar>\n </div>\n <Calendar\n v-else\n v-bind=\"{ ...attrs, ...calendarProps }\"\n :type=\"props.type\"\n :value=\"value\"\n :date=\"calendarDate\"\n :level=\"calendarLevel\"\n @date-change=\"setCalendarDate\"\n @level-change=\"setCalendarLevel\"\n @day-click=\"selectDate\"\n >\n <template v-if=\"slots.renderDay\" #renderDay=\"scope\"\n ><slot name=\"renderDay\" v-bind=\"scope\"\n /></template>\n <template v-if=\"slots.day\" #day=\"scope\"><slot name=\"day\" v-bind=\"scope\" /></template>\n </Calendar>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, ref, useAttrs } from 'vue'\nimport { UnstyledButton } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport Calendar from '../Calendar/Calendar.vue'\nimport { getNextPickerValue, isInRangeGranular, isSameDate } from '../../utils'\nimport type {\n DatePickerValueType,\n DatesRangeValue,\n DateStringValue,\n DateValue,\n YearPickerProps,\n} from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'YearPicker', inheritAttrs: false })\nconst props = withDefaults(defineProps<YearPickerProps>(), {\n type: 'default',\n allowDeselect: true,\n sortDates: true,\n withCellSpacing: true,\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: DatePickerValueType]\n change: [value: DatePickerValueType]\n}>()\nconst attrs = useAttrs()\nconst finalValue = computed<DatePickerValueType>(() =>\n props.type === 'multiple' ? [] : props.type === 'range' ? [null, null] : null,\n)\nconst [value, setValue] = useUncontrolled<DatePickerValueType>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: finalValue.value,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst hovered = ref<DateStringValue | null>(null)\nconst calendarDate = ref<DateStringValue>()\nconst calendarProps = computed(() => {\n const {\n modelValue,\n defaultValue,\n allowDeselect,\n sortDates,\n presets,\n getYearControlProps,\n ...rest\n } = props\n void modelValue\n void defaultValue\n void allowDeselect\n void sortDates\n void presets\n void getYearControlProps\n return rest\n})\nfunction select(date: DateStringValue) {\n if (props.type === 'default' && props.allowDeselect && isSameDate(value.value as DateValue, date))\n setValue(null)\n else setValue(getNextPickerValue(value.value, date, props.type, props.sortDates))\n hovered.value = null\n}\nfunction setCalendarDate(next: DateStringValue) {\n calendarDate.value = next\n}\nfunction controlProps(date: DateStringValue) {\n const external = props.getYearControlProps?.(date) || {}\n if (props.type !== 'range' || !Array.isArray(value.value)) return external\n const [start, end] = value.value as DatesRangeValue\n const previewEnd = start && !end ? hovered.value : end\n if (!start || !previewEnd) return external\n const boundaries = [start, previewEnd].sort((a, b) => (dayjs(a).isAfter(b, 'year') ? 1 : -1))\n return {\n inRange: isInRangeGranular(date, [start, previewEnd], 'year'),\n firstInRange: dayjs(date).isSame(boundaries[0], 'year'),\n lastInRange: dayjs(date).isSame(boundaries[1], 'year'),\n ...external,\n }\n}\nfunction hover(date: DateStringValue) {\n const [start, end] = Array.isArray(value.value) ? (value.value as DatesRangeValue) : [null, null]\n if (props.type === 'range' && start && !end) hovered.value = date\n}\nfunction selectPreset(next: DatePickerValueType) {\n const selected = Array.isArray(next) ? next[0] : next\n if (selected) calendarDate.value = selected\n setValue(next)\n}\n</script>\n\n<template>\n <div v-if=\"props.presets?.length\" :class=\"classes.datePickerRoot\">\n <div :class=\"classes.presetsList\">\n <UnstyledButton\n v-for=\"(preset, index) in props.presets\"\n :key=\"index\"\n :class=\"classes.presetButton\"\n @click=\"selectPreset(preset.value)\"\n @mousedown.prevent\n >{{ preset.label }}</UnstyledButton\n >\n </div>\n <Calendar\n v-bind=\"{ ...attrs, ...calendarProps }\"\n :type=\"props.type\"\n :value=\"value\"\n :date=\"calendarDate\"\n default-level=\"decade\"\n min-level=\"decade\"\n :get-year-control-props=\"controlProps\"\n @date-change=\"setCalendarDate\"\n @year-select=\"select\"\n @year-mouse-enter=\"hover\"\n @mouseleave=\"hovered = null\"\n />\n </div>\n <Calendar\n v-else\n v-bind=\"{ ...attrs, ...calendarProps }\"\n :type=\"props.type\"\n :value=\"value\"\n :date=\"calendarDate\"\n default-level=\"decade\"\n min-level=\"decade\"\n :get-year-control-props=\"controlProps\"\n @date-change=\"setCalendarDate\"\n @year-select=\"select\"\n @year-mouse-enter=\"hover\"\n @mouseleave=\"hovered = null\"\n />\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, ref, useAttrs } from 'vue'\nimport { UnstyledButton } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport Calendar from '../Calendar/Calendar.vue'\nimport { getNextPickerValue, isInRangeGranular, isSameDate } from '../../utils'\nimport type {\n DatePickerValueType,\n DatesRangeValue,\n DateStringValue,\n DateValue,\n YearPickerProps,\n} from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'YearPicker', inheritAttrs: false })\nconst props = withDefaults(defineProps<YearPickerProps>(), {\n type: 'default',\n allowDeselect: true,\n sortDates: true,\n withCellSpacing: true,\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: DatePickerValueType]\n change: [value: DatePickerValueType]\n}>()\nconst attrs = useAttrs()\nconst finalValue = computed<DatePickerValueType>(() =>\n props.type === 'multiple' ? [] : props.type === 'range' ? [null, null] : null,\n)\nconst [value, setValue] = useUncontrolled<DatePickerValueType>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: finalValue.value,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst hovered = ref<DateStringValue | null>(null)\nconst calendarDate = ref<DateStringValue>()\nconst calendarProps = computed(() => {\n const {\n modelValue,\n defaultValue,\n allowDeselect,\n sortDates,\n presets,\n getYearControlProps,\n ...rest\n } = props\n void modelValue\n void defaultValue\n void allowDeselect\n void sortDates\n void presets\n void getYearControlProps\n return rest\n})\nfunction select(date: DateStringValue) {\n if (props.type === 'default' && props.allowDeselect && isSameDate(value.value as DateValue, date))\n setValue(null)\n else setValue(getNextPickerValue(value.value, date, props.type, props.sortDates))\n hovered.value = null\n}\nfunction setCalendarDate(next: DateStringValue) {\n calendarDate.value = next\n}\nfunction controlProps(date: DateStringValue) {\n const external = props.getYearControlProps?.(date) || {}\n if (props.type !== 'range' || !Array.isArray(value.value)) return external\n const [start, end] = value.value as DatesRangeValue\n const previewEnd = start && !end ? hovered.value : end\n if (!start || !previewEnd) return external\n const boundaries = [start, previewEnd].sort((a, b) => (dayjs(a).isAfter(b, 'year') ? 1 : -1))\n return {\n inRange: isInRangeGranular(date, [start, previewEnd], 'year'),\n firstInRange: dayjs(date).isSame(boundaries[0], 'year'),\n lastInRange: dayjs(date).isSame(boundaries[1], 'year'),\n ...external,\n }\n}\nfunction hover(date: DateStringValue) {\n const [start, end] = Array.isArray(value.value) ? (value.value as DatesRangeValue) : [null, null]\n if (props.type === 'range' && start && !end) hovered.value = date\n}\nfunction selectPreset(next: DatePickerValueType) {\n const selected = Array.isArray(next) ? next[0] : next\n if (selected) calendarDate.value = selected\n setValue(next)\n}\n</script>\n\n<template>\n <div v-if=\"props.presets?.length\" :class=\"classes.datePickerRoot\">\n <div :class=\"classes.presetsList\">\n <UnstyledButton\n v-for=\"(preset, index) in props.presets\"\n :key=\"index\"\n :class=\"classes.presetButton\"\n @click=\"selectPreset(preset.value)\"\n @mousedown.prevent\n >{{ preset.label }}</UnstyledButton\n >\n </div>\n <Calendar\n v-bind=\"{ ...attrs, ...calendarProps }\"\n :type=\"props.type\"\n :value=\"value\"\n :date=\"calendarDate\"\n default-level=\"decade\"\n min-level=\"decade\"\n :get-year-control-props=\"controlProps\"\n @date-change=\"setCalendarDate\"\n @year-select=\"select\"\n @year-mouse-enter=\"hover\"\n @mouseleave=\"hovered = null\"\n />\n </div>\n <Calendar\n v-else\n v-bind=\"{ ...attrs, ...calendarProps }\"\n :type=\"props.type\"\n :value=\"value\"\n :date=\"calendarDate\"\n default-level=\"decade\"\n min-level=\"decade\"\n :get-year-control-props=\"controlProps\"\n @date-change=\"setCalendarDate\"\n @year-select=\"select\"\n @year-mouse-enter=\"hover\"\n @mouseleave=\"hovered = null\"\n />\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, ref, useAttrs } from 'vue'\nimport { UnstyledButton } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport Calendar from '../Calendar/Calendar.vue'\nimport { getNextPickerValue, isInRangeGranular, isSameDate } from '../../utils'\nimport type {\n DatePickerValueType,\n DatesRangeValue,\n DateStringValue,\n DateValue,\n MonthPickerProps,\n} from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'MonthPicker', inheritAttrs: false })\nconst props = withDefaults(defineProps<MonthPickerProps>(), {\n type: 'default',\n allowDeselect: true,\n sortDates: true,\n withCellSpacing: true,\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: DatePickerValueType]\n change: [value: DatePickerValueType]\n}>()\nconst attrs = useAttrs()\nconst finalValue = computed<DatePickerValueType>(() =>\n props.type === 'multiple' ? [] : props.type === 'range' ? [null, null] : null,\n)\nconst [value, setValue] = useUncontrolled<DatePickerValueType>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: finalValue.value,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst hovered = ref<DateStringValue | null>(null)\nconst calendarDate = ref<DateStringValue>()\nconst calendarProps = computed(() => {\n const {\n modelValue,\n defaultValue,\n allowDeselect,\n sortDates,\n presets,\n getMonthControlProps,\n ...rest\n } = props\n void modelValue\n void defaultValue\n void allowDeselect\n void sortDates\n void presets\n void getMonthControlProps\n return rest\n})\nfunction select(date: DateStringValue) {\n if (props.type === 'default' && props.allowDeselect && isSameDate(value.value as DateValue, date))\n setValue(null)\n else setValue(getNextPickerValue(value.value, date, props.type, props.sortDates))\n hovered.value = null\n}\nfunction setCalendarDate(next: DateStringValue) {\n calendarDate.value = next\n}\nfunction controlProps(date: DateStringValue) {\n const external = props.getMonthControlProps?.(date) || {}\n if (props.type !== 'range' || !Array.isArray(value.value)) return external\n const [start, end] = value.value as DatesRangeValue\n const previewEnd = start && !end ? hovered.value : end\n if (!start || !previewEnd) return external\n const boundaries = [start, previewEnd].sort((a, b) => (dayjs(a).isAfter(b, 'month') ? 1 : -1))\n return {\n inRange: isInRangeGranular(date, [start, previewEnd], 'month'),\n firstInRange: dayjs(date).isSame(boundaries[0], 'month'),\n lastInRange: dayjs(date).isSame(boundaries[1], 'month'),\n ...external,\n }\n}\nfunction hover(date: DateStringValue) {\n const [start, end] = Array.isArray(value.value) ? (value.value as DatesRangeValue) : [null, null]\n if (props.type === 'range' && start && !end) hovered.value = date\n}\nfunction selectPreset(next: DatePickerValueType) {\n const selected = Array.isArray(next) ? next[0] : next\n if (selected) calendarDate.value = selected\n setValue(next)\n}\n</script>\n\n<template>\n <div v-if=\"props.presets?.length\" :class=\"classes.datePickerRoot\">\n <div :class=\"classes.presetsList\">\n <UnstyledButton\n v-for=\"(preset, index) in props.presets\"\n :key=\"index\"\n :class=\"classes.presetButton\"\n @click=\"selectPreset(preset.value)\"\n @mousedown.prevent\n >{{ preset.label }}</UnstyledButton\n >\n </div>\n <Calendar\n v-bind=\"{ ...attrs, ...calendarProps }\"\n :type=\"props.type\"\n :value=\"value\"\n :date=\"calendarDate\"\n default-level=\"year\"\n min-level=\"year\"\n :get-month-control-props=\"controlProps\"\n @date-change=\"setCalendarDate\"\n @month-select=\"select\"\n @month-mouse-enter=\"hover\"\n @mouseleave=\"hovered = null\"\n />\n </div>\n <Calendar\n v-else\n v-bind=\"{ ...attrs, ...calendarProps }\"\n :type=\"props.type\"\n :value=\"value\"\n :date=\"calendarDate\"\n default-level=\"year\"\n min-level=\"year\"\n :get-month-control-props=\"controlProps\"\n @date-change=\"setCalendarDate\"\n @month-select=\"select\"\n @month-mouse-enter=\"hover\"\n @mouseleave=\"hovered = null\"\n />\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, ref, useAttrs } from 'vue'\nimport { UnstyledButton } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport Calendar from '../Calendar/Calendar.vue'\nimport { getNextPickerValue, isInRangeGranular, isSameDate } from '../../utils'\nimport type {\n DatePickerValueType,\n DatesRangeValue,\n DateStringValue,\n DateValue,\n MonthPickerProps,\n} from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'MonthPicker', inheritAttrs: false })\nconst props = withDefaults(defineProps<MonthPickerProps>(), {\n type: 'default',\n allowDeselect: true,\n sortDates: true,\n withCellSpacing: true,\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: DatePickerValueType]\n change: [value: DatePickerValueType]\n}>()\nconst attrs = useAttrs()\nconst finalValue = computed<DatePickerValueType>(() =>\n props.type === 'multiple' ? [] : props.type === 'range' ? [null, null] : null,\n)\nconst [value, setValue] = useUncontrolled<DatePickerValueType>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: finalValue.value,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst hovered = ref<DateStringValue | null>(null)\nconst calendarDate = ref<DateStringValue>()\nconst calendarProps = computed(() => {\n const {\n modelValue,\n defaultValue,\n allowDeselect,\n sortDates,\n presets,\n getMonthControlProps,\n ...rest\n } = props\n void modelValue\n void defaultValue\n void allowDeselect\n void sortDates\n void presets\n void getMonthControlProps\n return rest\n})\nfunction select(date: DateStringValue) {\n if (props.type === 'default' && props.allowDeselect && isSameDate(value.value as DateValue, date))\n setValue(null)\n else setValue(getNextPickerValue(value.value, date, props.type, props.sortDates))\n hovered.value = null\n}\nfunction setCalendarDate(next: DateStringValue) {\n calendarDate.value = next\n}\nfunction controlProps(date: DateStringValue) {\n const external = props.getMonthControlProps?.(date) || {}\n if (props.type !== 'range' || !Array.isArray(value.value)) return external\n const [start, end] = value.value as DatesRangeValue\n const previewEnd = start && !end ? hovered.value : end\n if (!start || !previewEnd) return external\n const boundaries = [start, previewEnd].sort((a, b) => (dayjs(a).isAfter(b, 'month') ? 1 : -1))\n return {\n inRange: isInRangeGranular(date, [start, previewEnd], 'month'),\n firstInRange: dayjs(date).isSame(boundaries[0], 'month'),\n lastInRange: dayjs(date).isSame(boundaries[1], 'month'),\n ...external,\n }\n}\nfunction hover(date: DateStringValue) {\n const [start, end] = Array.isArray(value.value) ? (value.value as DatesRangeValue) : [null, null]\n if (props.type === 'range' && start && !end) hovered.value = date\n}\nfunction selectPreset(next: DatePickerValueType) {\n const selected = Array.isArray(next) ? next[0] : next\n if (selected) calendarDate.value = selected\n setValue(next)\n}\n</script>\n\n<template>\n <div v-if=\"props.presets?.length\" :class=\"classes.datePickerRoot\">\n <div :class=\"classes.presetsList\">\n <UnstyledButton\n v-for=\"(preset, index) in props.presets\"\n :key=\"index\"\n :class=\"classes.presetButton\"\n @click=\"selectPreset(preset.value)\"\n @mousedown.prevent\n >{{ preset.label }}</UnstyledButton\n >\n </div>\n <Calendar\n v-bind=\"{ ...attrs, ...calendarProps }\"\n :type=\"props.type\"\n :value=\"value\"\n :date=\"calendarDate\"\n default-level=\"year\"\n min-level=\"year\"\n :get-month-control-props=\"controlProps\"\n @date-change=\"setCalendarDate\"\n @month-select=\"select\"\n @month-mouse-enter=\"hover\"\n @mouseleave=\"hovered = null\"\n />\n </div>\n <Calendar\n v-else\n v-bind=\"{ ...attrs, ...calendarProps }\"\n :type=\"props.type\"\n :value=\"value\"\n :date=\"calendarDate\"\n default-level=\"year\"\n min-level=\"year\"\n :get-month-control-props=\"controlProps\"\n @date-change=\"setCalendarDate\"\n @month-select=\"select\"\n @month-mouse-enter=\"hover\"\n @mouseleave=\"hovered = null\"\n />\n</template>\n","<script setup lang=\"ts\">\nimport { ref, watch, useAttrs } from 'vue'\nimport { Box, CloseButton, InputBase, Modal, Popover } from '@mantine-vue/core'\nimport type { PickerInputBaseEmits, PickerInputBaseProps, PickerInputBaseSlots } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'PickerInputBase', inheritAttrs: false })\nconst props = withDefaults(defineProps<PickerInputBaseProps>(), {\n formattedValue: '',\n dropdownType: 'popover',\n clearable: false,\n disabled: false,\n required: false,\n size: 'sm',\n})\nconst emit = defineEmits<PickerInputBaseEmits>()\ndefineSlots<PickerInputBaseSlots>()\nconst attrs = useAttrs()\nconst opened = ref(props.dropdownOpened ?? false)\nwatch(\n () => props.dropdownOpened,\n (value) => {\n if (value !== undefined) opened.value = value\n },\n)\nfunction close() {\n opened.value = false\n emit('dropdown-close')\n}\nfunction open() {\n if (!props.disabled) {\n opened.value = true\n emit('dropdown-open')\n }\n}\nfunction updateOpened(value: boolean) {\n if (value) open()\n else close()\n}\nfunction clickTarget(event: MouseEvent) {\n emit('click', event)\n open()\n}\nfunction clear(event: MouseEvent) {\n event.stopPropagation()\n emit('clear')\n}\n</script>\n\n<template>\n <Box v-if=\"props.dropdownType === 'modal'\">\n <InputBase\n v-bind=\"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\n :size=\"props.size\"\n :variant=\"props.variant\"\n :right-section-pointer-events=\"props.clearable && props.formattedValue ? 'all' : undefined\"\n @click=\"clickTarget\"\n >\n <span v-if=\"props.formattedValue\">{{ props.formattedValue }}</span\n ><span v-else :class=\"classes.placeholder\">{{ props.placeholder }}</span>\n <template v-if=\"props.clearable && props.formattedValue\" #rightSection\n ><CloseButton :size=\"props.size\" @mousedown.stop @click=\"clear\"\n /></template>\n </InputBase>\n <Modal :opened=\"opened\" :title=\"props.label\" size=\"auto\" @close=\"close\"\n ><slot :close=\"close\" :open=\"open\" :opened=\"opened\"\n /></Modal>\n </Box>\n <Popover\n v-else\n :opened=\"opened\"\n position=\"bottom-start\"\n trap-focus\n :return-focus=\"false\"\n @update:opened=\"updateOpened\"\n >\n <Popover.Target>\n <InputBase\n v-bind=\"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\n :size=\"props.size\"\n :variant=\"props.variant\"\n :right-section-pointer-events=\"props.clearable && props.formattedValue ? 'all' : undefined\"\n @click=\"clickTarget\"\n >\n <span v-if=\"props.formattedValue\">{{ props.formattedValue }}</span\n ><span v-else :class=\"classes.placeholder\">{{ props.placeholder }}</span>\n <template v-if=\"props.clearable && props.formattedValue\" #rightSection\n ><CloseButton :size=\"props.size\" @mousedown.stop @click=\"clear\"\n /></template>\n </InputBase>\n </Popover.Target>\n <Popover.Dropdown :class=\"classes.dropdown\"\n ><slot :close=\"close\" :open=\"open\" :opened=\"opened\"\n /></Popover.Dropdown>\n </Popover>\n</template>\n","<script setup lang=\"ts\">\nimport { ref, watch, useAttrs } from 'vue'\nimport { Box, CloseButton, InputBase, Modal, Popover } from '@mantine-vue/core'\nimport type { PickerInputBaseEmits, PickerInputBaseProps, PickerInputBaseSlots } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'PickerInputBase', inheritAttrs: false })\nconst props = withDefaults(defineProps<PickerInputBaseProps>(), {\n formattedValue: '',\n dropdownType: 'popover',\n clearable: false,\n disabled: false,\n required: false,\n size: 'sm',\n})\nconst emit = defineEmits<PickerInputBaseEmits>()\ndefineSlots<PickerInputBaseSlots>()\nconst attrs = useAttrs()\nconst opened = ref(props.dropdownOpened ?? false)\nwatch(\n () => props.dropdownOpened,\n (value) => {\n if (value !== undefined) opened.value = value\n },\n)\nfunction close() {\n opened.value = false\n emit('dropdown-close')\n}\nfunction open() {\n if (!props.disabled) {\n opened.value = true\n emit('dropdown-open')\n }\n}\nfunction updateOpened(value: boolean) {\n if (value) open()\n else close()\n}\nfunction clickTarget(event: MouseEvent) {\n emit('click', event)\n open()\n}\nfunction clear(event: MouseEvent) {\n event.stopPropagation()\n emit('clear')\n}\n</script>\n\n<template>\n <Box v-if=\"props.dropdownType === 'modal'\">\n <InputBase\n v-bind=\"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\n :size=\"props.size\"\n :variant=\"props.variant\"\n :right-section-pointer-events=\"props.clearable && props.formattedValue ? 'all' : undefined\"\n @click=\"clickTarget\"\n >\n <span v-if=\"props.formattedValue\">{{ props.formattedValue }}</span\n ><span v-else :class=\"classes.placeholder\">{{ props.placeholder }}</span>\n <template v-if=\"props.clearable && props.formattedValue\" #rightSection\n ><CloseButton :size=\"props.size\" @mousedown.stop @click=\"clear\"\n /></template>\n </InputBase>\n <Modal :opened=\"opened\" :title=\"props.label\" size=\"auto\" @close=\"close\"\n ><slot :close=\"close\" :open=\"open\" :opened=\"opened\"\n /></Modal>\n </Box>\n <Popover\n v-else\n :opened=\"opened\"\n position=\"bottom-start\"\n trap-focus\n :return-focus=\"false\"\n @update:opened=\"updateOpened\"\n >\n <Popover.Target>\n <InputBase\n v-bind=\"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\n :size=\"props.size\"\n :variant=\"props.variant\"\n :right-section-pointer-events=\"props.clearable && props.formattedValue ? 'all' : undefined\"\n @click=\"clickTarget\"\n >\n <span v-if=\"props.formattedValue\">{{ props.formattedValue }}</span\n ><span v-else :class=\"classes.placeholder\">{{ props.placeholder }}</span>\n <template v-if=\"props.clearable && props.formattedValue\" #rightSection\n ><CloseButton :size=\"props.size\" @mousedown.stop @click=\"clear\"\n /></template>\n </InputBase>\n </Popover.Target>\n <Popover.Dropdown :class=\"classes.dropdown\"\n ><slot :close=\"close\" :open=\"open\" :opened=\"opened\"\n /></Popover.Dropdown>\n </Popover>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport PickerInputBase from '../PickerInputBase/PickerInputBase.vue'\nimport Picker from '../DatePicker/DatePicker.vue'\nimport { formatValue } from '../../utils'\nimport type { DatePickerInputProps, DatePickerValueType } from '../../types'\n\ndefineOptions({ name: 'DatePickerInput', inheritAttrs: false })\nconst props = withDefaults(defineProps<DatePickerInputProps>(), {\n type: 'default',\n valueFormat: 'MMMM D, YYYY',\n labelSeparator: '–',\n clearable: false,\n closeOnChange: true,\n sortDates: true,\n allowDeselect: true,\n withCellSpacing: true,\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: DatePickerValueType]\n change: [value: DatePickerValueType]\n 'dropdown-open': []\n 'dropdown-close': []\n}>()\nconst attrs = useAttrs()\nconst opened = ref(false)\nconst finalValue = computed<DatePickerValueType>(() =>\n props.type === 'multiple' ? [] : props.type === 'range' ? [null, null] : null,\n)\nconst [value, setValue] = useUncontrolled<DatePickerValueType>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: finalValue.value,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst formatted = computed(() =>\n formatValue(\n value.value,\n props.type,\n props.valueFormat,\n props.locale,\n props.labelSeparator,\n props.valueFormatter,\n ),\n)\nconst pickerProps = computed(() => {\n const {\n modelValue,\n defaultValue,\n valueFormat,\n labelSeparator,\n valueFormatter,\n closeOnChange,\n formattedValue,\n dropdownOpened,\n dropdownType,\n label,\n placeholder,\n clearable,\n disabled,\n required,\n error,\n size,\n variant,\n ...rest\n } = props\n void modelValue\n void defaultValue\n void valueFormat\n void labelSeparator\n void valueFormatter\n void closeOnChange\n void formattedValue\n void dropdownOpened\n void dropdownType\n void label\n void placeholder\n void clearable\n void disabled\n void required\n void error\n void size\n void variant\n return rest\n})\nfunction change(next: DatePickerValueType, close: () => void) {\n setValue(next)\n if (props.closeOnChange && props.type === 'default') close()\n}\nfunction openDropdown() {\n opened.value = true\n emit('dropdown-open')\n}\nfunction closeDropdown() {\n opened.value = false\n emit('dropdown-close')\n}\n</script>\n\n<template>\n <PickerInputBase\n v-bind=\"attrs\"\n :formatted-value=\"formatted\"\n :label=\"props.label\"\n :placeholder=\"props.placeholder\"\n :clearable=\"props.clearable\"\n :disabled=\"props.disabled\"\n :required=\"props.required\"\n :error=\"props.error\"\n :size=\"props.size\"\n :variant=\"props.variant\"\n :dropdown-type=\"props.dropdownType\"\n :dropdown-opened=\"opened\"\n @dropdown-open=\"openDropdown\"\n @dropdown-close=\"closeDropdown\"\n @clear=\"setValue(finalValue)\"\n >\n <template #default=\"{ close }\"\n ><Picker\n v-bind=\"pickerProps\"\n :type=\"props.type\"\n :model-value=\"value\"\n :sort-dates=\"props.sortDates\"\n @change=\"change($event, close)\"\n /></template>\n </PickerInputBase>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport PickerInputBase from '../PickerInputBase/PickerInputBase.vue'\nimport Picker from '../DatePicker/DatePicker.vue'\nimport { formatValue } from '../../utils'\nimport type { DatePickerInputProps, DatePickerValueType } from '../../types'\n\ndefineOptions({ name: 'DatePickerInput', inheritAttrs: false })\nconst props = withDefaults(defineProps<DatePickerInputProps>(), {\n type: 'default',\n valueFormat: 'MMMM D, YYYY',\n labelSeparator: '–',\n clearable: false,\n closeOnChange: true,\n sortDates: true,\n allowDeselect: true,\n withCellSpacing: true,\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: DatePickerValueType]\n change: [value: DatePickerValueType]\n 'dropdown-open': []\n 'dropdown-close': []\n}>()\nconst attrs = useAttrs()\nconst opened = ref(false)\nconst finalValue = computed<DatePickerValueType>(() =>\n props.type === 'multiple' ? [] : props.type === 'range' ? [null, null] : null,\n)\nconst [value, setValue] = useUncontrolled<DatePickerValueType>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: finalValue.value,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst formatted = computed(() =>\n formatValue(\n value.value,\n props.type,\n props.valueFormat,\n props.locale,\n props.labelSeparator,\n props.valueFormatter,\n ),\n)\nconst pickerProps = computed(() => {\n const {\n modelValue,\n defaultValue,\n valueFormat,\n labelSeparator,\n valueFormatter,\n closeOnChange,\n formattedValue,\n dropdownOpened,\n dropdownType,\n label,\n placeholder,\n clearable,\n disabled,\n required,\n error,\n size,\n variant,\n ...rest\n } = props\n void modelValue\n void defaultValue\n void valueFormat\n void labelSeparator\n void valueFormatter\n void closeOnChange\n void formattedValue\n void dropdownOpened\n void dropdownType\n void label\n void placeholder\n void clearable\n void disabled\n void required\n void error\n void size\n void variant\n return rest\n})\nfunction change(next: DatePickerValueType, close: () => void) {\n setValue(next)\n if (props.closeOnChange && props.type === 'default') close()\n}\nfunction openDropdown() {\n opened.value = true\n emit('dropdown-open')\n}\nfunction closeDropdown() {\n opened.value = false\n emit('dropdown-close')\n}\n</script>\n\n<template>\n <PickerInputBase\n v-bind=\"attrs\"\n :formatted-value=\"formatted\"\n :label=\"props.label\"\n :placeholder=\"props.placeholder\"\n :clearable=\"props.clearable\"\n :disabled=\"props.disabled\"\n :required=\"props.required\"\n :error=\"props.error\"\n :size=\"props.size\"\n :variant=\"props.variant\"\n :dropdown-type=\"props.dropdownType\"\n :dropdown-opened=\"opened\"\n @dropdown-open=\"openDropdown\"\n @dropdown-close=\"closeDropdown\"\n @clear=\"setValue(finalValue)\"\n >\n <template #default=\"{ close }\"\n ><Picker\n v-bind=\"pickerProps\"\n :type=\"props.type\"\n :model-value=\"value\"\n :sort-dates=\"props.sortDates\"\n @change=\"change($event, close)\"\n /></template>\n </PickerInputBase>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport PickerInputBase from '../PickerInputBase/PickerInputBase.vue'\nimport Picker from '../MonthPicker/MonthPicker.vue'\nimport { formatValue } from '../../utils'\nimport type { DatePickerInputProps, DatePickerValueType } from '../../types'\n\ndefineOptions({ name: 'MonthPickerInput', inheritAttrs: false })\nconst props = withDefaults(defineProps<DatePickerInputProps>(), {\n type: 'default',\n valueFormat: 'MMMM YYYY',\n labelSeparator: '–',\n clearable: false,\n closeOnChange: true,\n sortDates: true,\n allowDeselect: true,\n withCellSpacing: true,\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: DatePickerValueType]\n change: [value: DatePickerValueType]\n 'dropdown-open': []\n 'dropdown-close': []\n}>()\nconst attrs = useAttrs()\nconst opened = ref(false)\nconst finalValue = computed<DatePickerValueType>(() =>\n props.type === 'multiple' ? [] : props.type === 'range' ? [null, null] : null,\n)\nconst [value, setValue] = useUncontrolled<DatePickerValueType>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: finalValue.value,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst formatted = computed(() =>\n formatValue(\n value.value,\n props.type,\n props.valueFormat,\n props.locale,\n props.labelSeparator,\n props.valueFormatter,\n ),\n)\nconst pickerProps = computed(() => {\n const {\n modelValue,\n defaultValue,\n valueFormat,\n labelSeparator,\n valueFormatter,\n closeOnChange,\n formattedValue,\n dropdownOpened,\n dropdownType,\n label,\n placeholder,\n clearable,\n disabled,\n required,\n error,\n size,\n variant,\n ...rest\n } = props\n void modelValue\n void defaultValue\n void valueFormat\n void labelSeparator\n void valueFormatter\n void closeOnChange\n void formattedValue\n void dropdownOpened\n void dropdownType\n void label\n void placeholder\n void clearable\n void disabled\n void required\n void error\n void size\n void variant\n return rest\n})\nfunction change(next: DatePickerValueType, close: () => void) {\n setValue(next)\n if (props.closeOnChange && props.type === 'default') close()\n}\nfunction openDropdown() {\n opened.value = true\n emit('dropdown-open')\n}\nfunction closeDropdown() {\n opened.value = false\n emit('dropdown-close')\n}\n</script>\n\n<template>\n <PickerInputBase\n v-bind=\"attrs\"\n :formatted-value=\"formatted\"\n :label=\"props.label\"\n :placeholder=\"props.placeholder\"\n :clearable=\"props.clearable\"\n :disabled=\"props.disabled\"\n :required=\"props.required\"\n :error=\"props.error\"\n :size=\"props.size\"\n :variant=\"props.variant\"\n :dropdown-type=\"props.dropdownType\"\n :dropdown-opened=\"opened\"\n @dropdown-open=\"openDropdown\"\n @dropdown-close=\"closeDropdown\"\n @clear=\"setValue(finalValue)\"\n >\n <template #default=\"{ close }\"\n ><Picker\n v-bind=\"pickerProps\"\n :type=\"props.type\"\n :model-value=\"value\"\n :sort-dates=\"props.sortDates\"\n @change=\"change($event, close)\"\n /></template>\n </PickerInputBase>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport PickerInputBase from '../PickerInputBase/PickerInputBase.vue'\nimport Picker from '../MonthPicker/MonthPicker.vue'\nimport { formatValue } from '../../utils'\nimport type { DatePickerInputProps, DatePickerValueType } from '../../types'\n\ndefineOptions({ name: 'MonthPickerInput', inheritAttrs: false })\nconst props = withDefaults(defineProps<DatePickerInputProps>(), {\n type: 'default',\n valueFormat: 'MMMM YYYY',\n labelSeparator: '–',\n clearable: false,\n closeOnChange: true,\n sortDates: true,\n allowDeselect: true,\n withCellSpacing: true,\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: DatePickerValueType]\n change: [value: DatePickerValueType]\n 'dropdown-open': []\n 'dropdown-close': []\n}>()\nconst attrs = useAttrs()\nconst opened = ref(false)\nconst finalValue = computed<DatePickerValueType>(() =>\n props.type === 'multiple' ? [] : props.type === 'range' ? [null, null] : null,\n)\nconst [value, setValue] = useUncontrolled<DatePickerValueType>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: finalValue.value,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst formatted = computed(() =>\n formatValue(\n value.value,\n props.type,\n props.valueFormat,\n props.locale,\n props.labelSeparator,\n props.valueFormatter,\n ),\n)\nconst pickerProps = computed(() => {\n const {\n modelValue,\n defaultValue,\n valueFormat,\n labelSeparator,\n valueFormatter,\n closeOnChange,\n formattedValue,\n dropdownOpened,\n dropdownType,\n label,\n placeholder,\n clearable,\n disabled,\n required,\n error,\n size,\n variant,\n ...rest\n } = props\n void modelValue\n void defaultValue\n void valueFormat\n void labelSeparator\n void valueFormatter\n void closeOnChange\n void formattedValue\n void dropdownOpened\n void dropdownType\n void label\n void placeholder\n void clearable\n void disabled\n void required\n void error\n void size\n void variant\n return rest\n})\nfunction change(next: DatePickerValueType, close: () => void) {\n setValue(next)\n if (props.closeOnChange && props.type === 'default') close()\n}\nfunction openDropdown() {\n opened.value = true\n emit('dropdown-open')\n}\nfunction closeDropdown() {\n opened.value = false\n emit('dropdown-close')\n}\n</script>\n\n<template>\n <PickerInputBase\n v-bind=\"attrs\"\n :formatted-value=\"formatted\"\n :label=\"props.label\"\n :placeholder=\"props.placeholder\"\n :clearable=\"props.clearable\"\n :disabled=\"props.disabled\"\n :required=\"props.required\"\n :error=\"props.error\"\n :size=\"props.size\"\n :variant=\"props.variant\"\n :dropdown-type=\"props.dropdownType\"\n :dropdown-opened=\"opened\"\n @dropdown-open=\"openDropdown\"\n @dropdown-close=\"closeDropdown\"\n @clear=\"setValue(finalValue)\"\n >\n <template #default=\"{ close }\"\n ><Picker\n v-bind=\"pickerProps\"\n :type=\"props.type\"\n :model-value=\"value\"\n :sort-dates=\"props.sortDates\"\n @change=\"change($event, close)\"\n /></template>\n </PickerInputBase>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport PickerInputBase from '../PickerInputBase/PickerInputBase.vue'\nimport Picker from '../YearPicker/YearPicker.vue'\nimport { formatValue } from '../../utils'\nimport type { DatePickerInputProps, DatePickerValueType } from '../../types'\n\ndefineOptions({ name: 'YearPickerInput', inheritAttrs: false })\nconst props = withDefaults(defineProps<DatePickerInputProps>(), {\n type: 'default',\n valueFormat: 'YYYY',\n labelSeparator: '–',\n clearable: false,\n closeOnChange: true,\n sortDates: true,\n allowDeselect: true,\n withCellSpacing: true,\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: DatePickerValueType]\n change: [value: DatePickerValueType]\n 'dropdown-open': []\n 'dropdown-close': []\n}>()\nconst attrs = useAttrs()\nconst opened = ref(false)\nconst finalValue = computed<DatePickerValueType>(() =>\n props.type === 'multiple' ? [] : props.type === 'range' ? [null, null] : null,\n)\nconst [value, setValue] = useUncontrolled<DatePickerValueType>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: finalValue.value,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst formatted = computed(() =>\n formatValue(\n value.value,\n props.type,\n props.valueFormat,\n props.locale,\n props.labelSeparator,\n props.valueFormatter,\n ),\n)\nconst pickerProps = computed(() => {\n const {\n modelValue,\n defaultValue,\n valueFormat,\n labelSeparator,\n valueFormatter,\n closeOnChange,\n formattedValue,\n dropdownOpened,\n dropdownType,\n label,\n placeholder,\n clearable,\n disabled,\n required,\n error,\n size,\n variant,\n ...rest\n } = props\n void modelValue\n void defaultValue\n void valueFormat\n void labelSeparator\n void valueFormatter\n void closeOnChange\n void formattedValue\n void dropdownOpened\n void dropdownType\n void label\n void placeholder\n void clearable\n void disabled\n void required\n void error\n void size\n void variant\n return rest\n})\nfunction change(next: DatePickerValueType, close: () => void) {\n setValue(next)\n if (props.closeOnChange && props.type === 'default') close()\n}\nfunction openDropdown() {\n opened.value = true\n emit('dropdown-open')\n}\nfunction closeDropdown() {\n opened.value = false\n emit('dropdown-close')\n}\n</script>\n\n<template>\n <PickerInputBase\n v-bind=\"attrs\"\n :formatted-value=\"formatted\"\n :label=\"props.label\"\n :placeholder=\"props.placeholder\"\n :clearable=\"props.clearable\"\n :disabled=\"props.disabled\"\n :required=\"props.required\"\n :error=\"props.error\"\n :size=\"props.size\"\n :variant=\"props.variant\"\n :dropdown-type=\"props.dropdownType\"\n :dropdown-opened=\"opened\"\n @dropdown-open=\"openDropdown\"\n @dropdown-close=\"closeDropdown\"\n @clear=\"setValue(finalValue)\"\n >\n <template #default=\"{ close }\"\n ><Picker\n v-bind=\"pickerProps\"\n :type=\"props.type\"\n :model-value=\"value\"\n :sort-dates=\"props.sortDates\"\n @change=\"change($event, close)\"\n /></template>\n </PickerInputBase>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport PickerInputBase from '../PickerInputBase/PickerInputBase.vue'\nimport Picker from '../YearPicker/YearPicker.vue'\nimport { formatValue } from '../../utils'\nimport type { DatePickerInputProps, DatePickerValueType } from '../../types'\n\ndefineOptions({ name: 'YearPickerInput', inheritAttrs: false })\nconst props = withDefaults(defineProps<DatePickerInputProps>(), {\n type: 'default',\n valueFormat: 'YYYY',\n labelSeparator: '–',\n clearable: false,\n closeOnChange: true,\n sortDates: true,\n allowDeselect: true,\n withCellSpacing: true,\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: DatePickerValueType]\n change: [value: DatePickerValueType]\n 'dropdown-open': []\n 'dropdown-close': []\n}>()\nconst attrs = useAttrs()\nconst opened = ref(false)\nconst finalValue = computed<DatePickerValueType>(() =>\n props.type === 'multiple' ? [] : props.type === 'range' ? [null, null] : null,\n)\nconst [value, setValue] = useUncontrolled<DatePickerValueType>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: finalValue.value,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst formatted = computed(() =>\n formatValue(\n value.value,\n props.type,\n props.valueFormat,\n props.locale,\n props.labelSeparator,\n props.valueFormatter,\n ),\n)\nconst pickerProps = computed(() => {\n const {\n modelValue,\n defaultValue,\n valueFormat,\n labelSeparator,\n valueFormatter,\n closeOnChange,\n formattedValue,\n dropdownOpened,\n dropdownType,\n label,\n placeholder,\n clearable,\n disabled,\n required,\n error,\n size,\n variant,\n ...rest\n } = props\n void modelValue\n void defaultValue\n void valueFormat\n void labelSeparator\n void valueFormatter\n void closeOnChange\n void formattedValue\n void dropdownOpened\n void dropdownType\n void label\n void placeholder\n void clearable\n void disabled\n void required\n void error\n void size\n void variant\n return rest\n})\nfunction change(next: DatePickerValueType, close: () => void) {\n setValue(next)\n if (props.closeOnChange && props.type === 'default') close()\n}\nfunction openDropdown() {\n opened.value = true\n emit('dropdown-open')\n}\nfunction closeDropdown() {\n opened.value = false\n emit('dropdown-close')\n}\n</script>\n\n<template>\n <PickerInputBase\n v-bind=\"attrs\"\n :formatted-value=\"formatted\"\n :label=\"props.label\"\n :placeholder=\"props.placeholder\"\n :clearable=\"props.clearable\"\n :disabled=\"props.disabled\"\n :required=\"props.required\"\n :error=\"props.error\"\n :size=\"props.size\"\n :variant=\"props.variant\"\n :dropdown-type=\"props.dropdownType\"\n :dropdown-opened=\"opened\"\n @dropdown-open=\"openDropdown\"\n @dropdown-close=\"closeDropdown\"\n @clear=\"setValue(finalValue)\"\n >\n <template #default=\"{ close }\"\n ><Picker\n v-bind=\"pickerProps\"\n :type=\"props.type\"\n :model-value=\"value\"\n :sort-dates=\"props.sortDates\"\n @change=\"change($event, close)\"\n /></template>\n </PickerInputBase>\n</template>\n","<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport type { HiddenDatesInputProps } from '../../types'\n\ndefineOptions({ name: 'HiddenDatesInput' })\nconst props = defineProps<HiddenDatesInputProps>()\nconst serializedValue = computed(() =>\n Array.isArray(props.value) ? props.value.filter(Boolean).join(',') : props.value || '',\n)\n</script>\n\n<template>\n <input type=\"hidden\" :name=\"props.name\" :value=\"serializedValue\" />\n</template>\n","<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport type { HiddenDatesInputProps } from '../../types'\n\ndefineOptions({ name: 'HiddenDatesInput' })\nconst props = defineProps<HiddenDatesInputProps>()\nconst serializedValue = computed(() =>\n Array.isArray(props.value) ? props.value.filter(Boolean).join(',') : props.value || '',\n)\n</script>\n\n<template>\n <input type=\"hidden\" :name=\"props.name\" :value=\"serializedValue\" />\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, ref, useAttrs, watch } from 'vue'\nimport { Box, Button, CloseButton, Group, InputBase, Popover } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport Calendar from '../Calendar/Calendar.vue'\nimport { dateStringParser, isDateValid, isSameDate, toDateString } from '../../utils'\nimport type { DateInputProps, DateStringValue, DateValue } from '../../types'\n\ndefineOptions({ name: 'DateInput', inheritAttrs: false })\nconst props = withDefaults(defineProps<DateInputProps>(), {\n valueFormat: 'MMMM D, YYYY',\n clearable: false,\n})\nconst emit = defineEmits<{ 'update:modelValue': [value: DateValue]; change: [value: DateValue] }>()\nconst attrs = useAttrs()\nconst [value, setValue] = useUncontrolled<DateValue>({\n value: computed(() =>\n props.modelValue === undefined ? undefined : toDateString(props.modelValue),\n ),\n defaultValue: toDateString(props.defaultValue),\n finalValue: null,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst format = (next: DateValue) =>\n next\n ? dayjs(next)\n .locale(props.locale || 'en')\n .format(props.valueFormat)\n : ''\nconst inputValue = ref(format(value.value))\nconst opened = ref(false)\nwatch(value, (next) => {\n if (!opened.value) inputValue.value = format(next)\n})\nfunction parse(raw: string) {\n const parsed = props.dateParser\n ? props.dateParser(raw)\n : dateStringParser(raw, props.valueFormat, props.locale)\n return parsed && isDateValid({ date: parsed, minDate: props.minDate, maxDate: props.maxDate })\n ? parsed\n : null\n}\nfunction commit() {\n opened.value = false\n if (!inputValue.value.trim()) {\n if (props.clearable) setValue(null)\n else inputValue.value = format(value.value)\n return\n }\n const parsed = parse(inputValue.value)\n if (parsed) setValue(parsed)\n else inputValue.value = format(value.value)\n}\nfunction select(date: DateStringValue) {\n setValue(date)\n inputValue.value = format(date)\n opened.value = false\n}\nfunction clear(event: MouseEvent) {\n event.stopPropagation()\n inputValue.value = ''\n setValue(null)\n}\nfunction onKeydown(event: KeyboardEvent) {\n if (event.key === 'Escape') opened.value = false\n}\n</script>\n\n<template>\n <Box>\n <Popover v-model:opened=\"opened\" position=\"bottom-start\">\n <Popover.Target>\n <InputBase\n v-bind=\"attrs\"\n :model-value=\"inputValue\"\n :right-section-pointer-events=\"props.clearable && value ? 'all' : undefined\"\n @input=\"inputValue = ($event.target as HTMLInputElement).value\"\n @focus=\"opened = true\"\n @click=\"opened = true\"\n @blur=\"commit\"\n @keydown=\"onKeydown\"\n >\n <template v-if=\"props.clearable && value\" #rightSection\n ><CloseButton @mousedown.stop @click=\"clear\"\n /></template>\n </InputBase>\n </Popover.Target>\n <Popover.Dropdown @mousedown.prevent>\n <Group v-if=\"props.presets?.length\" :gap=\"4\" :mb=\"4\"\n ><Button\n v-for=\"(preset, index) in props.presets\"\n :key=\"index\"\n size=\"xs\"\n variant=\"light\"\n @click=\"preset.value && select(preset.value)\"\n >{{ preset.label }}</Button\n ></Group\n >\n <Calendar\n :default-date=\"value || undefined\"\n :min-date=\"props.minDate\"\n :max-date=\"props.maxDate\"\n :locale=\"props.locale\"\n :get-day-props=\"\n (date) => ({ selected: isSameDate(date, value), onClick: () => select(date) })\n \"\n />\n </Popover.Dropdown>\n </Popover>\n </Box>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, ref, useAttrs, watch } from 'vue'\nimport { Box, Button, CloseButton, Group, InputBase, Popover } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport Calendar from '../Calendar/Calendar.vue'\nimport { dateStringParser, isDateValid, isSameDate, toDateString } from '../../utils'\nimport type { DateInputProps, DateStringValue, DateValue } from '../../types'\n\ndefineOptions({ name: 'DateInput', inheritAttrs: false })\nconst props = withDefaults(defineProps<DateInputProps>(), {\n valueFormat: 'MMMM D, YYYY',\n clearable: false,\n})\nconst emit = defineEmits<{ 'update:modelValue': [value: DateValue]; change: [value: DateValue] }>()\nconst attrs = useAttrs()\nconst [value, setValue] = useUncontrolled<DateValue>({\n value: computed(() =>\n props.modelValue === undefined ? undefined : toDateString(props.modelValue),\n ),\n defaultValue: toDateString(props.defaultValue),\n finalValue: null,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst format = (next: DateValue) =>\n next\n ? dayjs(next)\n .locale(props.locale || 'en')\n .format(props.valueFormat)\n : ''\nconst inputValue = ref(format(value.value))\nconst opened = ref(false)\nwatch(value, (next) => {\n if (!opened.value) inputValue.value = format(next)\n})\nfunction parse(raw: string) {\n const parsed = props.dateParser\n ? props.dateParser(raw)\n : dateStringParser(raw, props.valueFormat, props.locale)\n return parsed && isDateValid({ date: parsed, minDate: props.minDate, maxDate: props.maxDate })\n ? parsed\n : null\n}\nfunction commit() {\n opened.value = false\n if (!inputValue.value.trim()) {\n if (props.clearable) setValue(null)\n else inputValue.value = format(value.value)\n return\n }\n const parsed = parse(inputValue.value)\n if (parsed) setValue(parsed)\n else inputValue.value = format(value.value)\n}\nfunction select(date: DateStringValue) {\n setValue(date)\n inputValue.value = format(date)\n opened.value = false\n}\nfunction clear(event: MouseEvent) {\n event.stopPropagation()\n inputValue.value = ''\n setValue(null)\n}\nfunction onKeydown(event: KeyboardEvent) {\n if (event.key === 'Escape') opened.value = false\n}\n</script>\n\n<template>\n <Box>\n <Popover v-model:opened=\"opened\" position=\"bottom-start\">\n <Popover.Target>\n <InputBase\n v-bind=\"attrs\"\n :model-value=\"inputValue\"\n :right-section-pointer-events=\"props.clearable && value ? 'all' : undefined\"\n @input=\"inputValue = ($event.target as HTMLInputElement).value\"\n @focus=\"opened = true\"\n @click=\"opened = true\"\n @blur=\"commit\"\n @keydown=\"onKeydown\"\n >\n <template v-if=\"props.clearable && value\" #rightSection\n ><CloseButton @mousedown.stop @click=\"clear\"\n /></template>\n </InputBase>\n </Popover.Target>\n <Popover.Dropdown @mousedown.prevent>\n <Group v-if=\"props.presets?.length\" :gap=\"4\" :mb=\"4\"\n ><Button\n v-for=\"(preset, index) in props.presets\"\n :key=\"index\"\n size=\"xs\"\n variant=\"light\"\n @click=\"preset.value && select(preset.value)\"\n >{{ preset.label }}</Button\n ></Group\n >\n <Calendar\n :default-date=\"value || undefined\"\n :min-date=\"props.minDate\"\n :max-date=\"props.maxDate\"\n :locale=\"props.locale\"\n :get-day-props=\"\n (date) => ({ selected: isSameDate(date, value), onClick: () => select(date) })\n \"\n />\n </Popover.Dropdown>\n </Popover>\n </Box>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs } from 'vue'\nimport { InputBase } from '@mantine-vue/core'\nimport type { TimeInputProps } from '../../types'\n\ndefineOptions({ name: 'TimeInput', inheritAttrs: false })\nconst props = withDefaults(defineProps<TimeInputProps>(), { withSeconds: false })\nconst emit = defineEmits<{ 'update:modelValue': [value: string]; change: [value: string] }>()\nconst attrs = useAttrs()\n</script>\n\n<template>\n <InputBase\n v-bind=\"attrs\"\n type=\"time\"\n :step=\"props.withSeconds ? 1 : 60\"\n :model-value=\"props.modelValue\"\n :default-value=\"props.defaultValue\"\n @update:model-value=\"emit('update:modelValue', $event)\"\n @change=\"emit('change', $event)\"\n />\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs } from 'vue'\nimport { InputBase } from '@mantine-vue/core'\nimport type { TimeInputProps } from '../../types'\n\ndefineOptions({ name: 'TimeInput', inheritAttrs: false })\nconst props = withDefaults(defineProps<TimeInputProps>(), { withSeconds: false })\nconst emit = defineEmits<{ 'update:modelValue': [value: string]; change: [value: string] }>()\nconst attrs = useAttrs()\n</script>\n\n<template>\n <InputBase\n v-bind=\"attrs\"\n type=\"time\"\n :step=\"props.withSeconds ? 1 : 60\"\n :model-value=\"props.modelValue\"\n :default-value=\"props.defaultValue\"\n @update:model-value=\"emit('update:modelValue', $event)\"\n @change=\"emit('change', $event)\"\n />\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { Box, SimpleGrid, UnstyledButton } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport { compareTime, isSameTime } from '../../utils'\nimport type { TimeGridProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'TimeGrid', inheritAttrs: false })\nconst props = withDefaults(defineProps<TimeGridProps>(), {\n data: () => [],\n allowDeselect: false,\n disabled: false,\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: string | null]\n change: [value: string | null]\n}>()\nconst attrs = useAttrs()\nconst [value, setValue] = useUncontrolled<string | null>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: null,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst controlProps = (item: string) => props.getControlProps?.(item) || {}\nconst disabled = (item: string) =>\n !!(\n props.disabled ||\n (props.minTime && compareTime(item, props.minTime) < 0) ||\n (props.maxTime && compareTime(item, props.maxTime) > 0)\n )\nconst active = (item: string) => isSameTime(value.value ?? undefined, item)\nfunction select(item: string, event: MouseEvent) {\n controlProps(item).onClick?.(event)\n if (disabled(item)) return\n const next = props.allowDeselect && active(item) ? null : item\n if (next !== value.value) setValue(next)\n}\n</script>\n\n<template>\n <Box v-bind=\"attrs\" :class=\"[classes.timeGridRoot, attrs.class]\">\n <SimpleGrid :cols=\"3\" spacing=\"xs\" :class=\"classes.timeGrid\">\n <UnstyledButton\n v-for=\"item in props.data\"\n :key=\"item\"\n v-bind=\"controlProps(item)\"\n :class=\"[classes.timeGridControl, controlProps(item).class]\"\n :disabled=\"disabled(item) || controlProps(item).disabled\"\n :data-active=\"active(item) || undefined\"\n :data-disabled=\"disabled(item) || controlProps(item).disabled || undefined\"\n @click=\"select(item, $event)\"\n >{{ item }}</UnstyledButton\n >\n </SimpleGrid>\n </Box>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { Box, SimpleGrid, UnstyledButton } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport { compareTime, isSameTime } from '../../utils'\nimport type { TimeGridProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'TimeGrid', inheritAttrs: false })\nconst props = withDefaults(defineProps<TimeGridProps>(), {\n data: () => [],\n allowDeselect: false,\n disabled: false,\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: string | null]\n change: [value: string | null]\n}>()\nconst attrs = useAttrs()\nconst [value, setValue] = useUncontrolled<string | null>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: null,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst controlProps = (item: string) => props.getControlProps?.(item) || {}\nconst disabled = (item: string) =>\n !!(\n props.disabled ||\n (props.minTime && compareTime(item, props.minTime) < 0) ||\n (props.maxTime && compareTime(item, props.maxTime) > 0)\n )\nconst active = (item: string) => isSameTime(value.value ?? undefined, item)\nfunction select(item: string, event: MouseEvent) {\n controlProps(item).onClick?.(event)\n if (disabled(item)) return\n const next = props.allowDeselect && active(item) ? null : item\n if (next !== value.value) setValue(next)\n}\n</script>\n\n<template>\n <Box v-bind=\"attrs\" :class=\"[classes.timeGridRoot, attrs.class]\">\n <SimpleGrid :cols=\"3\" spacing=\"xs\" :class=\"classes.timeGrid\">\n <UnstyledButton\n v-for=\"item in props.data\"\n :key=\"item\"\n v-bind=\"controlProps(item)\"\n :class=\"[classes.timeGridControl, controlProps(item).class]\"\n :disabled=\"disabled(item) || controlProps(item).disabled\"\n :data-active=\"active(item) || undefined\"\n :data-disabled=\"disabled(item) || controlProps(item).disabled || undefined\"\n @click=\"select(item, $event)\"\n >{{ item }}</UnstyledButton\n >\n </SimpleGrid>\n </Box>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport { padTime } from '../../utils'\nimport type { SpinInputEmits, SpinInputProps } from '../../types'\n\ndefineOptions({ name: 'SpinInput', inheritAttrs: false })\nconst props = withDefaults(defineProps<SpinInputProps>(), {\n modelValue: undefined,\n defaultValue: undefined,\n step: 1,\n allowTemporaryZero: false,\n placeholder: '--',\n disableAutoAdvance: false,\n disabled: false,\n readOnly: false,\n})\nconst emit = defineEmits<\n SpinInputEmits & {\n 'update:modelValue': [value: number | null]\n change: [value: number | null]\n }\n>()\nconst attrs = useAttrs()\nconst [value, setValue] = useUncontrolled<number | null>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: null,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst finiteMax = () => Number.isFinite(props.max)\nconst maxDigit = () => (finiteMax() ? Number(props.max.toFixed(0)[0]) : Infinity)\nconst arrowsMax = () => props.max + 1 - props.step\nfunction change(event: Event) {\n if (props.readOnly) return\n const input = event.currentTarget as HTMLInputElement\n const raw = input.value\n const digits = raw.replace(/\\D/g, '')\n if (!digits) {\n input.value = value.value === null ? '' : padTime(value.value)\n return\n }\n let parsed = 0\n for (const character of digits) {\n const digit = Number(character)\n const next = parsed * 10 + digit\n parsed = finiteMax() && next > props.max ? digit : next\n }\n const clamped =\n props.allowTemporaryZero && parsed === 0 && props.min > 0\n ? 0\n : finiteMax()\n ? Math.min(Math.max(parsed, props.min), props.max)\n : Math.max(parsed, props.min)\n setValue(clamped)\n input.value = padTime(clamped)\n if (!props.disableAutoAdvance && (clamped > maxDigit() || raw.startsWith('00')))\n emit('next-input')\n}\nfunction keydown(event: KeyboardEvent) {\n if (props.readOnly) return\n if (\n !event.isComposing &&\n event.key.length === 1 &&\n !/^\\d$/.test(event.key) &&\n !event.ctrlKey &&\n !event.metaKey &&\n !event.altKey\n ) {\n event.preventDefault()\n return\n }\n const target = event.currentTarget as HTMLInputElement\n if (\n (event.key === '0' || event.key === 'Num0') &&\n value.value === 0 &&\n !(\n target.value.length &&\n target.selectionStart === 0 &&\n target.selectionEnd === target.value.length\n )\n ) {\n event.preventDefault()\n emit('next-input')\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 emit('previous-input')\n }\n if (event.key === 'ArrowRight') {\n event.preventDefault()\n emit('next-input')\n }\n if (event.key === 'ArrowLeft') {\n event.preventDefault()\n emit('previous-input')\n }\n if (event.key === 'ArrowUp') {\n event.preventDefault()\n setValue(\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 )\n }\n if (event.key === 'ArrowDown') {\n event.preventDefault()\n setValue(\n value.value === null\n ? finiteMax()\n ? arrowsMax()\n : props.min\n : Math.min(Math.max(value.value - props.step, props.min), arrowsMax()),\n )\n }\n}\nfunction select(event: FocusEvent | MouseEvent) {\n ;(event.target as HTMLInputElement).select()\n}\n</script>\n\n<template>\n <input\n v-bind=\"attrs\"\n type=\"text\"\n role=\"spinbutton\"\n :aria-valuemin=\"props.min\"\n :aria-valuemax=\"finiteMax() ? props.max : undefined\"\n :aria-valuenow=\"value === null ? 0 : value\"\n :data-empty=\"value === null || undefined\"\n inputmode=\"numeric\"\n :placeholder=\"props.placeholder\"\n :disabled=\"props.disabled\"\n :readonly=\"props.readOnly\"\n :value=\"value === null ? '' : padTime(value)\"\n @input=\"change\"\n @keydown=\"keydown\"\n @focus=\"select\"\n @click.stop=\"select\"\n @mousedown.stop\n @paste=\"(event) => emit('paste', event)\"\n />\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport { padTime } from '../../utils'\nimport type { SpinInputEmits, SpinInputProps } from '../../types'\n\ndefineOptions({ name: 'SpinInput', inheritAttrs: false })\nconst props = withDefaults(defineProps<SpinInputProps>(), {\n modelValue: undefined,\n defaultValue: undefined,\n step: 1,\n allowTemporaryZero: false,\n placeholder: '--',\n disableAutoAdvance: false,\n disabled: false,\n readOnly: false,\n})\nconst emit = defineEmits<\n SpinInputEmits & {\n 'update:modelValue': [value: number | null]\n change: [value: number | null]\n }\n>()\nconst attrs = useAttrs()\nconst [value, setValue] = useUncontrolled<number | null>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: null,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst finiteMax = () => Number.isFinite(props.max)\nconst maxDigit = () => (finiteMax() ? Number(props.max.toFixed(0)[0]) : Infinity)\nconst arrowsMax = () => props.max + 1 - props.step\nfunction change(event: Event) {\n if (props.readOnly) return\n const input = event.currentTarget as HTMLInputElement\n const raw = input.value\n const digits = raw.replace(/\\D/g, '')\n if (!digits) {\n input.value = value.value === null ? '' : padTime(value.value)\n return\n }\n let parsed = 0\n for (const character of digits) {\n const digit = Number(character)\n const next = parsed * 10 + digit\n parsed = finiteMax() && next > props.max ? digit : next\n }\n const clamped =\n props.allowTemporaryZero && parsed === 0 && props.min > 0\n ? 0\n : finiteMax()\n ? Math.min(Math.max(parsed, props.min), props.max)\n : Math.max(parsed, props.min)\n setValue(clamped)\n input.value = padTime(clamped)\n if (!props.disableAutoAdvance && (clamped > maxDigit() || raw.startsWith('00')))\n emit('next-input')\n}\nfunction keydown(event: KeyboardEvent) {\n if (props.readOnly) return\n if (\n !event.isComposing &&\n event.key.length === 1 &&\n !/^\\d$/.test(event.key) &&\n !event.ctrlKey &&\n !event.metaKey &&\n !event.altKey\n ) {\n event.preventDefault()\n return\n }\n const target = event.currentTarget as HTMLInputElement\n if (\n (event.key === '0' || event.key === 'Num0') &&\n value.value === 0 &&\n !(\n target.value.length &&\n target.selectionStart === 0 &&\n target.selectionEnd === target.value.length\n )\n ) {\n event.preventDefault()\n emit('next-input')\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 emit('previous-input')\n }\n if (event.key === 'ArrowRight') {\n event.preventDefault()\n emit('next-input')\n }\n if (event.key === 'ArrowLeft') {\n event.preventDefault()\n emit('previous-input')\n }\n if (event.key === 'ArrowUp') {\n event.preventDefault()\n setValue(\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 )\n }\n if (event.key === 'ArrowDown') {\n event.preventDefault()\n setValue(\n value.value === null\n ? finiteMax()\n ? arrowsMax()\n : props.min\n : Math.min(Math.max(value.value - props.step, props.min), arrowsMax()),\n )\n }\n}\nfunction select(event: FocusEvent | MouseEvent) {\n ;(event.target as HTMLInputElement).select()\n}\n</script>\n\n<template>\n <input\n v-bind=\"attrs\"\n type=\"text\"\n role=\"spinbutton\"\n :aria-valuemin=\"props.min\"\n :aria-valuemax=\"finiteMax() ? props.max : undefined\"\n :aria-valuenow=\"value === null ? 0 : value\"\n :data-empty=\"value === null || undefined\"\n inputmode=\"numeric\"\n :placeholder=\"props.placeholder\"\n :disabled=\"props.disabled\"\n :readonly=\"props.readOnly\"\n :value=\"value === null ? '' : padTime(value)\"\n @input=\"change\"\n @keydown=\"keydown\"\n @focus=\"select\"\n @click.stop=\"select\"\n @mousedown.stop\n @paste=\"(event) => emit('paste', event)\"\n />\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport type { AmPmInputEmits, AmPmInputProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'AmPmInput', inheritAttrs: false })\nconst props = withDefaults(defineProps<AmPmInputProps>(), {\n modelValue: undefined,\n defaultValue: undefined,\n labels: () => ({ am: 'AM', pm: 'PM' }),\n disabled: false,\n readOnly: false,\n})\nconst emit = defineEmits<\n AmPmInputEmits & {\n 'update:modelValue': [value: string | null]\n change: [value: string | null]\n }\n>()\nconst attrs = useAttrs()\nconst [value, setValue] = useUncontrolled<string | null>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: null,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nfunction change(event: Event) {\n if (!props.readOnly) setValue((event.target as HTMLSelectElement).value || null)\n}\nfunction keydown(event: KeyboardEvent) {\n if (props.readOnly) return\n if (event.key === 'Backspace' || event.key === 'Delete') {\n event.preventDefault()\n if (value.value === null) emit('previous-input')\n else setValue(null)\n }\n if (event.key === 'ArrowLeft') {\n event.preventDefault()\n emit('previous-input')\n }\n}\n</script>\n\n<template>\n <select\n v-bind=\"attrs\"\n :class=\"[classes.timePickerField, attrs.class]\"\n data-am-pm\n :disabled=\"props.disabled\"\n :aria-readonly=\"props.readOnly || undefined\"\n :value=\"value ?? ''\"\n @change=\"change\"\n @keydown=\"keydown\"\n >\n <option value=\"\">--</option>\n <option :value=\"props.labels.am\">{{ props.labels.am }}</option>\n <option :value=\"props.labels.pm\">{{ props.labels.pm }}</option>\n </select>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport type { AmPmInputEmits, AmPmInputProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'AmPmInput', inheritAttrs: false })\nconst props = withDefaults(defineProps<AmPmInputProps>(), {\n modelValue: undefined,\n defaultValue: undefined,\n labels: () => ({ am: 'AM', pm: 'PM' }),\n disabled: false,\n readOnly: false,\n})\nconst emit = defineEmits<\n AmPmInputEmits & {\n 'update:modelValue': [value: string | null]\n change: [value: string | null]\n }\n>()\nconst attrs = useAttrs()\nconst [value, setValue] = useUncontrolled<string | null>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: null,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nfunction change(event: Event) {\n if (!props.readOnly) setValue((event.target as HTMLSelectElement).value || null)\n}\nfunction keydown(event: KeyboardEvent) {\n if (props.readOnly) return\n if (event.key === 'Backspace' || event.key === 'Delete') {\n event.preventDefault()\n if (value.value === null) emit('previous-input')\n else setValue(null)\n }\n if (event.key === 'ArrowLeft') {\n event.preventDefault()\n emit('previous-input')\n }\n}\n</script>\n\n<template>\n <select\n v-bind=\"attrs\"\n :class=\"[classes.timePickerField, attrs.class]\"\n data-am-pm\n :disabled=\"props.disabled\"\n :aria-readonly=\"props.readOnly || undefined\"\n :value=\"value ?? ''\"\n @change=\"change\"\n @keydown=\"keydown\"\n >\n <option value=\"\">--</option>\n <option :value=\"props.labels.am\">{{ props.labels.am }}</option>\n <option :value=\"props.labels.pm\">{{ props.labels.pm }}</option>\n </select>\n</template>\n","<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { ScrollArea, UnstyledButton } from '@mantine-vue/core'\nimport { padTime } from '../../utils'\nimport type { TimeControlsListEmits, TimeControlsListProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'TimeControlsList' })\nconst props = withDefaults(defineProps<TimeControlsListProps>(), { step: 1, value: null })\nconst emit = defineEmits<TimeControlsListEmits>()\nconst items = computed(() =>\n Array.from(\n { length: Math.floor((props.max - props.min) / props.step) + 1 },\n (_, index) => props.min + index * props.step,\n ),\n)\n</script>\n\n<template>\n <ScrollArea :h=\"200\"\n ><div :class=\"classes.timePickerControlsList\">\n <UnstyledButton\n v-for=\"item in items\"\n :key=\"item\"\n :class=\"classes.timePickerControl\"\n :data-active=\"item === props.value || undefined\"\n @click=\"emit('select', item)\"\n >{{ props.formatValue ? props.formatValue(item) : padTime(item) }}</UnstyledButton\n >\n </div></ScrollArea\n >\n</template>\n","<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { ScrollArea, UnstyledButton } from '@mantine-vue/core'\nimport { padTime } from '../../utils'\nimport type { TimeControlsListEmits, TimeControlsListProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'TimeControlsList' })\nconst props = withDefaults(defineProps<TimeControlsListProps>(), { step: 1, value: null })\nconst emit = defineEmits<TimeControlsListEmits>()\nconst items = computed(() =>\n Array.from(\n { length: Math.floor((props.max - props.min) / props.step) + 1 },\n (_, index) => props.min + index * props.step,\n ),\n)\n</script>\n\n<template>\n <ScrollArea :h=\"200\"\n ><div :class=\"classes.timePickerControlsList\">\n <UnstyledButton\n v-for=\"item in items\"\n :key=\"item\"\n :class=\"classes.timePickerControl\"\n :data-active=\"item === props.value || undefined\"\n @click=\"emit('select', item)\"\n >{{ props.formatValue ? props.formatValue(item) : padTime(item) }}</UnstyledButton\n >\n </div></ScrollArea\n >\n</template>\n","<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, watch } from 'vue'\nimport { Button, CloseButton, Group, InputBase, Popover } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport AmPmInput from '../AmPmInput/AmPmInput.vue'\nimport SpinInput from '../SpinInput/SpinInput.vue'\nimport TimeControlsList from '../TimeControlsList/TimeControlsList.vue'\nimport { clampTime, getParsedTime, getTimeString } from '../../utils'\nimport type { TimePickerProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'TimePicker', inheritAttrs: false })\nconst props = withDefaults(defineProps<TimePickerProps>(), {\n type: 'time',\n withSeconds: false,\n format: '24h',\n amPmLabels: () => ({ am: 'AM', pm: 'PM' }),\n hoursStep: 1,\n minutesStep: 1,\n secondsStep: 1,\n clearable: false,\n withDropdown: false,\n disabled: false,\n readOnly: false,\n size: 'sm',\n closeDropdownOnPresetSelect: false,\n})\nconst emit = defineEmits<{ 'update:modelValue': [value: string]; change: [value: string] }>()\nconst attrs = useAttrs()\nconst effectiveFormat = computed<'12h' | '24h'>(() =>\n props.type === 'duration' ? '24h' : props.format,\n)\nconst [value, setValue] = useUncontrolled<string>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: '',\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst parsed = computed(() =>\n getParsedTime({ time: value.value, format: effectiveFormat.value, amPmLabels: props.amPmLabels }),\n)\nconst acceptValueSync = ref(true)\nconst initialTimeString = getTimeString({\n ...parsed.value,\n format: effectiveFormat.value,\n withSeconds: props.withSeconds,\n amPmLabels: props.amPmLabels,\n})\nconst wasInvalidBefore = ref(!initialTimeString.valid)\nconst hours = ref(parsed.value.hours),\n minutes = ref(parsed.value.minutes),\n seconds = ref(parsed.value.seconds),\n amPm = ref(parsed.value.amPm)\nwatch(value, (nextValue) => {\n if (!acceptValueSync.value) {\n acceptValueSync.value = true\n return\n }\n const next = getParsedTime({\n time: nextValue,\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 wasInvalidBefore.value = !getTimeString({\n ...next,\n format: effectiveFormat.value,\n withSeconds: props.withSeconds,\n amPmLabels: props.amPmLabels,\n }).valid\n})\nconst hoursInput = ref<any>(),\n minutesInput = ref<any>(),\n secondsInput = ref<any>(),\n amPmInput = ref<any>()\nconst element = (target: any) => target?.$el ?? target\nfunction focus(field: 'hours' | 'minutes' | 'seconds' | 'amPm') {\n element(\n field === 'hours'\n ? hoursInput.value\n : field === 'minutes'\n ? minutesInput.value\n : field === 'seconds'\n ? secondsInput.value\n : amPmInput.value,\n )?.focus?.()\n}\nwatch(\n hoursInput,\n (next) => {\n if (props.hoursRef) Reflect.set(props.hoursRef, 'value', element(next))\n },\n { immediate: true },\n)\nfunction 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 if (result.valid) {\n acceptValueSync.value = false\n wasInvalidBefore.value = false\n setValue(clampTime(result.value, props.min, props.max))\n } else if (!wasInvalidBefore.value) {\n acceptValueSync.value = false\n wasInvalidBefore.value = true\n setValue('')\n }\n}\nfunction setHours(next: number | null) {\n hours.value =\n effectiveFormat.value === '12h' && typeof next === 'number' && next > 12\n ? ((next - 1) % 12) + 1\n : next\n commit()\n}\nfunction setMinutes(next: number | null) {\n minutes.value = next\n commit()\n}\nfunction setSeconds(next: number | null) {\n seconds.value = next\n commit()\n}\nfunction setAmPm(next: string | null) {\n amPm.value = next\n commit()\n}\nfunction clear() {\n hours.value = null\n minutes.value = null\n seconds.value = null\n amPm.value = null\n acceptValueSync.value = false\n wasInvalidBefore.value = true\n setValue('')\n focus('hours')\n}\nconst isClearable = computed(\n () =>\n props.clearable &&\n !props.readOnly &&\n !props.disabled &&\n [hours.value, minutes.value, seconds.value, amPm.value].some((item) => item !== null),\n)\nconst opened = ref(false)\nfunction selectPreset(next: string) {\n setValue(next)\n if (props.closeDropdownOnPresetSelect) opened.value = false\n}\nfunction paste(event: ClipboardEvent) {\n if (props.readOnly || props.disabled) return\n const raw = event.clipboardData?.getData('text').trim()\n if (!raw || !/^\\d+:\\d{2}(?::\\d{2})?(?:\\s+[aApP][mM])?$/.test(raw)) return\n const next = getParsedTime({\n time: raw,\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}\nfunction openDropdown() {\n if (props.type !== 'duration' && props.withDropdown) opened.value = true\n}\nfunction handleTargetClick() {\n focus('hours')\n openDropdown()\n}\nfunction focusout(event: FocusEvent) {\n if (\n props.withDropdown &&\n !(event.currentTarget as HTMLElement).contains(event.relatedTarget as Node | null)\n )\n opened.value = false\n}\n</script>\n\n<template>\n <Popover\n :opened=\"props.type !== 'duration' && props.withDropdown && opened\"\n position=\"bottom-start\"\n :transition-props=\"{ duration: 0 }\"\n @update:opened=\"\n (next) => {\n if (!next) opened = false\n }\n \"\n >\n <Popover.Target>\n <InputBase\n v-bind=\"attrs\"\n component=\"div\"\n :size=\"props.size\"\n :disabled=\"props.disabled\"\n :right-section-pointer-events=\"isClearable ? 'all' : undefined\"\n @click=\"handleTargetClick\"\n @mousedown.prevent\n @focusin=\"openDropdown\"\n @focusout=\"focusout\"\n >\n <div :class=\"classes.timePickerFieldsRoot\" dir=\"ltr\">\n <div :class=\"classes.timePickerFieldsGroup\">\n <SpinInput\n ref=\"hoursInput\"\n :class=\"classes.timePickerField\"\n :model-value=\"hours\"\n :min=\"effectiveFormat === '12h' ? 1 : 0\"\n :max=\"props.type === 'duration' ? Infinity : effectiveFormat === '12h' ? 12 : 23\"\n :step=\"props.hoursStep\"\n :allow-temporary-zero=\"effectiveFormat === '12h'\"\n :disable-auto-advance=\"props.type === 'duration'\"\n :read-only=\"props.readOnly\"\n :disabled=\"props.disabled\"\n @next-input=\"focus('minutes')\"\n @paste=\"paste\"\n @change=\"setHours\"\n />\n <span>:</span>\n <SpinInput\n ref=\"minutesInput\"\n :class=\"classes.timePickerField\"\n :model-value=\"minutes\"\n :min=\"0\"\n :max=\"59\"\n :step=\"props.minutesStep\"\n :read-only=\"props.readOnly\"\n :disabled=\"props.disabled\"\n @previous-input=\"focus('hours')\"\n @next-input=\"focus(props.withSeconds ? 'seconds' : 'amPm')\"\n @change=\"setMinutes\"\n />\n <template v-if=\"props.withSeconds\"\n ><span>:</span\n ><SpinInput\n ref=\"secondsInput\"\n :class=\"classes.timePickerField\"\n :model-value=\"seconds\"\n :min=\"0\"\n :max=\"59\"\n :step=\"props.secondsStep\"\n :read-only=\"props.readOnly\"\n :disabled=\"props.disabled\"\n @previous-input=\"focus('minutes')\"\n @next-input=\"focus('amPm')\"\n @change=\"setSeconds\"\n /></template>\n <AmPmInput\n v-if=\"effectiveFormat === '12h'\"\n ref=\"amPmInput\"\n :model-value=\"amPm\"\n :labels=\"props.amPmLabels\"\n :read-only=\"props.readOnly\"\n :disabled=\"props.disabled\"\n @previous-input=\"focus(props.withSeconds ? 'seconds' : 'minutes')\"\n @change=\"setAmPm\"\n />\n </div>\n </div>\n <template v-if=\"isClearable\" #rightSection\n ><CloseButton :size=\"props.size\" @mousedown.prevent @click=\"clear\"\n /></template>\n </InputBase>\n </Popover.Target>\n <Popover.Dropdown :class=\"classes.timePickerDropdown\" @mousedown.prevent>\n <Group v-if=\"props.presets?.length\" :gap=\"4\" :class=\"classes.timePickerPresetsGroup\"\n ><Button\n v-for=\"preset in props.presets\"\n :key=\"preset.value\"\n size=\"xs\"\n variant=\"light\"\n @click=\"selectPreset(preset.value)\"\n >{{ preset.label }}</Button\n ></Group\n >\n <div v-else :class=\"classes.timePickerControlsListGroup\">\n <TimeControlsList\n :min=\"effectiveFormat === '12h' ? 1 : 0\"\n :max=\"effectiveFormat === '12h' ? 12 : 23\"\n :step=\"props.hoursStep\"\n :value=\"hours\"\n @select=\"setHours\"\n /><TimeControlsList\n :min=\"0\"\n :max=\"59\"\n :step=\"props.minutesStep\"\n :value=\"minutes\"\n @select=\"setMinutes\"\n /><TimeControlsList\n v-if=\"props.withSeconds\"\n :min=\"0\"\n :max=\"59\"\n :step=\"props.secondsStep\"\n :value=\"seconds\"\n @select=\"setSeconds\"\n />\n </div>\n </Popover.Dropdown>\n </Popover>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, watch } from 'vue'\nimport { Button, CloseButton, Group, InputBase, Popover } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport AmPmInput from '../AmPmInput/AmPmInput.vue'\nimport SpinInput from '../SpinInput/SpinInput.vue'\nimport TimeControlsList from '../TimeControlsList/TimeControlsList.vue'\nimport { clampTime, getParsedTime, getTimeString } from '../../utils'\nimport type { TimePickerProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'TimePicker', inheritAttrs: false })\nconst props = withDefaults(defineProps<TimePickerProps>(), {\n type: 'time',\n withSeconds: false,\n format: '24h',\n amPmLabels: () => ({ am: 'AM', pm: 'PM' }),\n hoursStep: 1,\n minutesStep: 1,\n secondsStep: 1,\n clearable: false,\n withDropdown: false,\n disabled: false,\n readOnly: false,\n size: 'sm',\n closeDropdownOnPresetSelect: false,\n})\nconst emit = defineEmits<{ 'update:modelValue': [value: string]; change: [value: string] }>()\nconst attrs = useAttrs()\nconst effectiveFormat = computed<'12h' | '24h'>(() =>\n props.type === 'duration' ? '24h' : props.format,\n)\nconst [value, setValue] = useUncontrolled<string>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: '',\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst parsed = computed(() =>\n getParsedTime({ time: value.value, format: effectiveFormat.value, amPmLabels: props.amPmLabels }),\n)\nconst acceptValueSync = ref(true)\nconst initialTimeString = getTimeString({\n ...parsed.value,\n format: effectiveFormat.value,\n withSeconds: props.withSeconds,\n amPmLabels: props.amPmLabels,\n})\nconst wasInvalidBefore = ref(!initialTimeString.valid)\nconst hours = ref(parsed.value.hours),\n minutes = ref(parsed.value.minutes),\n seconds = ref(parsed.value.seconds),\n amPm = ref(parsed.value.amPm)\nwatch(value, (nextValue) => {\n if (!acceptValueSync.value) {\n acceptValueSync.value = true\n return\n }\n const next = getParsedTime({\n time: nextValue,\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 wasInvalidBefore.value = !getTimeString({\n ...next,\n format: effectiveFormat.value,\n withSeconds: props.withSeconds,\n amPmLabels: props.amPmLabels,\n }).valid\n})\nconst hoursInput = ref<any>(),\n minutesInput = ref<any>(),\n secondsInput = ref<any>(),\n amPmInput = ref<any>()\nconst element = (target: any) => target?.$el ?? target\nfunction focus(field: 'hours' | 'minutes' | 'seconds' | 'amPm') {\n element(\n field === 'hours'\n ? hoursInput.value\n : field === 'minutes'\n ? minutesInput.value\n : field === 'seconds'\n ? secondsInput.value\n : amPmInput.value,\n )?.focus?.()\n}\nwatch(\n hoursInput,\n (next) => {\n if (props.hoursRef) Reflect.set(props.hoursRef, 'value', element(next))\n },\n { immediate: true },\n)\nfunction 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 if (result.valid) {\n acceptValueSync.value = false\n wasInvalidBefore.value = false\n setValue(clampTime(result.value, props.min, props.max))\n } else if (!wasInvalidBefore.value) {\n acceptValueSync.value = false\n wasInvalidBefore.value = true\n setValue('')\n }\n}\nfunction setHours(next: number | null) {\n hours.value =\n effectiveFormat.value === '12h' && typeof next === 'number' && next > 12\n ? ((next - 1) % 12) + 1\n : next\n commit()\n}\nfunction setMinutes(next: number | null) {\n minutes.value = next\n commit()\n}\nfunction setSeconds(next: number | null) {\n seconds.value = next\n commit()\n}\nfunction setAmPm(next: string | null) {\n amPm.value = next\n commit()\n}\nfunction clear() {\n hours.value = null\n minutes.value = null\n seconds.value = null\n amPm.value = null\n acceptValueSync.value = false\n wasInvalidBefore.value = true\n setValue('')\n focus('hours')\n}\nconst isClearable = computed(\n () =>\n props.clearable &&\n !props.readOnly &&\n !props.disabled &&\n [hours.value, minutes.value, seconds.value, amPm.value].some((item) => item !== null),\n)\nconst opened = ref(false)\nfunction selectPreset(next: string) {\n setValue(next)\n if (props.closeDropdownOnPresetSelect) opened.value = false\n}\nfunction paste(event: ClipboardEvent) {\n if (props.readOnly || props.disabled) return\n const raw = event.clipboardData?.getData('text').trim()\n if (!raw || !/^\\d+:\\d{2}(?::\\d{2})?(?:\\s+[aApP][mM])?$/.test(raw)) return\n const next = getParsedTime({\n time: raw,\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}\nfunction openDropdown() {\n if (props.type !== 'duration' && props.withDropdown) opened.value = true\n}\nfunction handleTargetClick() {\n focus('hours')\n openDropdown()\n}\nfunction focusout(event: FocusEvent) {\n if (\n props.withDropdown &&\n !(event.currentTarget as HTMLElement).contains(event.relatedTarget as Node | null)\n )\n opened.value = false\n}\n</script>\n\n<template>\n <Popover\n :opened=\"props.type !== 'duration' && props.withDropdown && opened\"\n position=\"bottom-start\"\n :transition-props=\"{ duration: 0 }\"\n @update:opened=\"\n (next) => {\n if (!next) opened = false\n }\n \"\n >\n <Popover.Target>\n <InputBase\n v-bind=\"attrs\"\n component=\"div\"\n :size=\"props.size\"\n :disabled=\"props.disabled\"\n :right-section-pointer-events=\"isClearable ? 'all' : undefined\"\n @click=\"handleTargetClick\"\n @mousedown.prevent\n @focusin=\"openDropdown\"\n @focusout=\"focusout\"\n >\n <div :class=\"classes.timePickerFieldsRoot\" dir=\"ltr\">\n <div :class=\"classes.timePickerFieldsGroup\">\n <SpinInput\n ref=\"hoursInput\"\n :class=\"classes.timePickerField\"\n :model-value=\"hours\"\n :min=\"effectiveFormat === '12h' ? 1 : 0\"\n :max=\"props.type === 'duration' ? Infinity : effectiveFormat === '12h' ? 12 : 23\"\n :step=\"props.hoursStep\"\n :allow-temporary-zero=\"effectiveFormat === '12h'\"\n :disable-auto-advance=\"props.type === 'duration'\"\n :read-only=\"props.readOnly\"\n :disabled=\"props.disabled\"\n @next-input=\"focus('minutes')\"\n @paste=\"paste\"\n @change=\"setHours\"\n />\n <span>:</span>\n <SpinInput\n ref=\"minutesInput\"\n :class=\"classes.timePickerField\"\n :model-value=\"minutes\"\n :min=\"0\"\n :max=\"59\"\n :step=\"props.minutesStep\"\n :read-only=\"props.readOnly\"\n :disabled=\"props.disabled\"\n @previous-input=\"focus('hours')\"\n @next-input=\"focus(props.withSeconds ? 'seconds' : 'amPm')\"\n @change=\"setMinutes\"\n />\n <template v-if=\"props.withSeconds\"\n ><span>:</span\n ><SpinInput\n ref=\"secondsInput\"\n :class=\"classes.timePickerField\"\n :model-value=\"seconds\"\n :min=\"0\"\n :max=\"59\"\n :step=\"props.secondsStep\"\n :read-only=\"props.readOnly\"\n :disabled=\"props.disabled\"\n @previous-input=\"focus('minutes')\"\n @next-input=\"focus('amPm')\"\n @change=\"setSeconds\"\n /></template>\n <AmPmInput\n v-if=\"effectiveFormat === '12h'\"\n ref=\"amPmInput\"\n :model-value=\"amPm\"\n :labels=\"props.amPmLabels\"\n :read-only=\"props.readOnly\"\n :disabled=\"props.disabled\"\n @previous-input=\"focus(props.withSeconds ? 'seconds' : 'minutes')\"\n @change=\"setAmPm\"\n />\n </div>\n </div>\n <template v-if=\"isClearable\" #rightSection\n ><CloseButton :size=\"props.size\" @mousedown.prevent @click=\"clear\"\n /></template>\n </InputBase>\n </Popover.Target>\n <Popover.Dropdown :class=\"classes.timePickerDropdown\" @mousedown.prevent>\n <Group v-if=\"props.presets?.length\" :gap=\"4\" :class=\"classes.timePickerPresetsGroup\"\n ><Button\n v-for=\"preset in props.presets\"\n :key=\"preset.value\"\n size=\"xs\"\n variant=\"light\"\n @click=\"selectPreset(preset.value)\"\n >{{ preset.label }}</Button\n ></Group\n >\n <div v-else :class=\"classes.timePickerControlsListGroup\">\n <TimeControlsList\n :min=\"effectiveFormat === '12h' ? 1 : 0\"\n :max=\"effectiveFormat === '12h' ? 12 : 23\"\n :step=\"props.hoursStep\"\n :value=\"hours\"\n @select=\"setHours\"\n /><TimeControlsList\n :min=\"0\"\n :max=\"59\"\n :step=\"props.minutesStep\"\n :value=\"minutes\"\n @select=\"setMinutes\"\n /><TimeControlsList\n v-if=\"props.withSeconds\"\n :min=\"0\"\n :max=\"59\"\n :step=\"props.secondsStep\"\n :value=\"seconds\"\n @select=\"setSeconds\"\n />\n </div>\n </Popover.Dropdown>\n </Popover>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, useAttrs } from 'vue'\nimport { Text } from '@mantine-vue/core'\nimport type { TimeValueProps } from '../../types'\n\ndefineOptions({ name: 'TimeValue', inheritAttrs: false })\nconst props = withDefaults(defineProps<TimeValueProps>(), { format: 'HH:mm' })\nconst attrs = useAttrs()\nconst formatted = computed(() =>\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</script>\n\n<template>\n <Text v-bind=\"attrs\">{{ formatted }}</Text>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, useAttrs } from 'vue'\nimport { Text } from '@mantine-vue/core'\nimport type { TimeValueProps } from '../../types'\n\ndefineOptions({ name: 'TimeValue', inheritAttrs: false })\nconst props = withDefaults(defineProps<TimeValueProps>(), { format: 'HH:mm' })\nconst attrs = useAttrs()\nconst formatted = computed(() =>\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</script>\n\n<template>\n <Text v-bind=\"attrs\">{{ formatted }}</Text>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, useAttrs } from 'vue'\nimport { ActionIcon, CheckIcon } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport DatePicker from '../DatePicker/DatePicker.vue'\nimport TimePicker from '../TimePicker/TimePicker.vue'\nimport { assignTime } from '../../utils'\nimport type { DatePickerValueType, DateTimePickerProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'InlineDateTimePicker', inheritAttrs: false })\nconst props = withDefaults(defineProps<DateTimePickerProps>(), {\n valueFormat: 'MMMM D, YYYY h:mm A',\n clearable: false,\n withSeconds: false,\n size: 'sm',\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: Date | null]\n change: [value: Date | null]\n submit: []\n}>()\nconst attrs = useAttrs()\nconst [value, setValue] = useUncontrolled<Date | null>({\n value: computed(() =>\n props.modelValue === undefined\n ? undefined\n : props.modelValue === null\n ? null\n : new Date(props.modelValue),\n ),\n defaultValue: props.defaultValue ? new Date(props.defaultValue) : null,\n finalValue: null,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst date = computed(() => (value.value ? dayjs(value.value).format('YYYY-MM-DD') : null))\nconst time = computed(() =>\n value.value ? dayjs(value.value).format(props.withSeconds ? 'HH:mm:ss' : 'HH:mm') : '',\n)\nconst forwardedHoursRef = { value: null as any }\nfunction updateDate(next: DatePickerValueType) {\n if (!next || Array.isArray(next)) return\n setValue(assignTime(next, `2024-01-01 ${time.value || '00:00'}`))\n forwardedHoursRef.value?.focus?.()\n}\nfunction updateTime(next: string) {\n if (date.value) setValue(assignTime(date.value, `2024-01-01 ${next}`))\n}\nfunction submit(event: MouseEvent) {\n props.submitButtonProps?.onClick?.(event)\n emit('submit')\n}\n</script>\n\n<template>\n <div v-bind=\"attrs\" :class=\"[classes.dateTimePicker, attrs.class]\">\n <DatePicker :full-width=\"props.fullWidth\" :model-value=\"date\" @change=\"updateDate\" />\n <div :class=\"classes.timeWrapper\">\n <div :class=\"classes.timeInput\">\n <TimePicker\n :model-value=\"time\"\n :with-seconds=\"props.withSeconds\"\n :size=\"props.size\"\n :hours-ref=\"forwardedHoursRef\"\n @change=\"updateTime\"\n />\n </div>\n <ActionIcon\n variant=\"default\"\n :size=\"`input-${props.size || 'sm'}`\"\n data-mantine-stop-propagation\n v-bind=\"props.submitButtonProps\"\n @click=\"submit\"\n ><CheckIcon size=\"30%\"\n /></ActionIcon>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, useAttrs } from 'vue'\nimport { ActionIcon, CheckIcon } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport DatePicker from '../DatePicker/DatePicker.vue'\nimport TimePicker from '../TimePicker/TimePicker.vue'\nimport { assignTime } from '../../utils'\nimport type { DatePickerValueType, DateTimePickerProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'InlineDateTimePicker', inheritAttrs: false })\nconst props = withDefaults(defineProps<DateTimePickerProps>(), {\n valueFormat: 'MMMM D, YYYY h:mm A',\n clearable: false,\n withSeconds: false,\n size: 'sm',\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: Date | null]\n change: [value: Date | null]\n submit: []\n}>()\nconst attrs = useAttrs()\nconst [value, setValue] = useUncontrolled<Date | null>({\n value: computed(() =>\n props.modelValue === undefined\n ? undefined\n : props.modelValue === null\n ? null\n : new Date(props.modelValue),\n ),\n defaultValue: props.defaultValue ? new Date(props.defaultValue) : null,\n finalValue: null,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst date = computed(() => (value.value ? dayjs(value.value).format('YYYY-MM-DD') : null))\nconst time = computed(() =>\n value.value ? dayjs(value.value).format(props.withSeconds ? 'HH:mm:ss' : 'HH:mm') : '',\n)\nconst forwardedHoursRef = { value: null as any }\nfunction updateDate(next: DatePickerValueType) {\n if (!next || Array.isArray(next)) return\n setValue(assignTime(next, `2024-01-01 ${time.value || '00:00'}`))\n forwardedHoursRef.value?.focus?.()\n}\nfunction updateTime(next: string) {\n if (date.value) setValue(assignTime(date.value, `2024-01-01 ${next}`))\n}\nfunction submit(event: MouseEvent) {\n props.submitButtonProps?.onClick?.(event)\n emit('submit')\n}\n</script>\n\n<template>\n <div v-bind=\"attrs\" :class=\"[classes.dateTimePicker, attrs.class]\">\n <DatePicker :full-width=\"props.fullWidth\" :model-value=\"date\" @change=\"updateDate\" />\n <div :class=\"classes.timeWrapper\">\n <div :class=\"classes.timeInput\">\n <TimePicker\n :model-value=\"time\"\n :with-seconds=\"props.withSeconds\"\n :size=\"props.size\"\n :hours-ref=\"forwardedHoursRef\"\n @change=\"updateTime\"\n />\n </div>\n <ActionIcon\n variant=\"default\"\n :size=\"`input-${props.size || 'sm'}`\"\n data-mantine-stop-propagation\n v-bind=\"props.submitButtonProps\"\n @click=\"submit\"\n ><CheckIcon size=\"30%\"\n /></ActionIcon>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, useAttrs } from 'vue'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport InlineDateTimePicker from '../InlineDateTimePicker/InlineDateTimePicker.vue'\nimport PickerInputBase from '../PickerInputBase/PickerInputBase.vue'\nimport type { DateTimePickerProps } from '../../types'\n\ndefineOptions({ name: 'DateTimePicker', inheritAttrs: false })\nconst props = withDefaults(defineProps<DateTimePickerProps>(), {\n valueFormat: 'MMMM D, YYYY h:mm A',\n clearable: false,\n withSeconds: false,\n size: 'sm',\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: Date | null]\n change: [value: Date | null]\n}>()\nconst attrs = useAttrs()\nconst [value, setValue] = useUncontrolled<Date | null>({\n value: computed(() =>\n props.modelValue === undefined\n ? undefined\n : props.modelValue === null\n ? null\n : new Date(props.modelValue),\n ),\n defaultValue: props.defaultValue ? new Date(props.defaultValue) : null,\n finalValue: null,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst formatted = computed(() => (value.value ? dayjs(value.value).format(props.valueFormat) : ''))\n</script>\n\n<template>\n <PickerInputBase\n v-bind=\"attrs\"\n :formatted-value=\"formatted\"\n :clearable=\"props.clearable\"\n :disabled=\"props.disabled\"\n :required=\"props.required\"\n :error=\"props.error\"\n :label=\"props.label\"\n :placeholder=\"props.placeholder\"\n :size=\"props.size\"\n :variant=\"props.variant\"\n :dropdown-type=\"props.dropdownType\"\n @clear=\"setValue(null)\"\n >\n <template #default=\"{ close }\"\n ><InlineDateTimePicker\n :model-value=\"value\"\n :with-seconds=\"props.withSeconds\"\n :size=\"props.size\"\n :submit-button-props=\"props.submitButtonProps\"\n :full-width=\"false\"\n @change=\"setValue\"\n @submit=\"close\"\n /></template>\n </PickerInputBase>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, useAttrs } from 'vue'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport InlineDateTimePicker from '../InlineDateTimePicker/InlineDateTimePicker.vue'\nimport PickerInputBase from '../PickerInputBase/PickerInputBase.vue'\nimport type { DateTimePickerProps } from '../../types'\n\ndefineOptions({ name: 'DateTimePicker', inheritAttrs: false })\nconst props = withDefaults(defineProps<DateTimePickerProps>(), {\n valueFormat: 'MMMM D, YYYY h:mm A',\n clearable: false,\n withSeconds: false,\n size: 'sm',\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: Date | null]\n change: [value: Date | null]\n}>()\nconst attrs = useAttrs()\nconst [value, setValue] = useUncontrolled<Date | null>({\n value: computed(() =>\n props.modelValue === undefined\n ? undefined\n : props.modelValue === null\n ? null\n : new Date(props.modelValue),\n ),\n defaultValue: props.defaultValue ? new Date(props.defaultValue) : null,\n finalValue: null,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst formatted = computed(() => (value.value ? dayjs(value.value).format(props.valueFormat) : ''))\n</script>\n\n<template>\n <PickerInputBase\n v-bind=\"attrs\"\n :formatted-value=\"formatted\"\n :clearable=\"props.clearable\"\n :disabled=\"props.disabled\"\n :required=\"props.required\"\n :error=\"props.error\"\n :label=\"props.label\"\n :placeholder=\"props.placeholder\"\n :size=\"props.size\"\n :variant=\"props.variant\"\n :dropdown-type=\"props.dropdownType\"\n @clear=\"setValue(null)\"\n >\n <template #default=\"{ close }\"\n ><InlineDateTimePicker\n :model-value=\"value\"\n :with-seconds=\"props.withSeconds\"\n :size=\"props.size\"\n :submit-button-props=\"props.submitButtonProps\"\n :full-width=\"false\"\n @change=\"setValue\"\n @submit=\"close\"\n /></template>\n </PickerInputBase>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, useAttrs } from 'vue'\nimport { AccordionChevron, Box, UnstyledButton } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport { useDatesContext } from '../DatesProvider'\nimport { toDateString } from '../../utils'\nimport type { DateStringValue, DateValue, MiniCalendarEmits, MiniCalendarProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'MiniCalendar', inheritAttrs: false })\nconst props = withDefaults(defineProps<MiniCalendarProps>(), {\n numberOfDays: 7,\n monthLabelFormat: 'MMM',\n size: 'sm',\n})\nconst emit = defineEmits<\n MiniCalendarEmits & {\n 'update:modelValue': [value: DateValue]\n change: [value: DateValue]\n 'update:date': [value: DateStringValue]\n 'date-change': [value: DateStringValue]\n }\n>()\nconst attrs = useAttrs(),\n context = useDatesContext()\nconst [value, setValue] = useUncontrolled<DateValue>({\n value: computed(() =>\n props.modelValue === undefined ? undefined : toDateString(props.modelValue),\n ),\n defaultValue: toDateString(props.defaultValue),\n finalValue: null,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst [date, setDate] = useUncontrolled<DateStringValue>({\n value: computed(() => toDateString(props.date) || undefined),\n defaultValue: toDateString(props.defaultDate) || undefined,\n finalValue: value.value || dayjs().format('YYYY-MM-DD'),\n onChange: (next) => {\n emit('update:date', next)\n emit('date-change', next)\n },\n})\nconst range = computed(() =>\n Array.from({ length: props.numberOfDays }, (_, index) => dayjs(date.value).add(index, 'days')),\n)\nconst previousDisabled = computed(() =>\n props.minDate ? dayjs(date.value).subtract(1, 'day').isBefore(dayjs(props.minDate)) : false,\n)\nconst nextDisabled = computed(() =>\n props.maxDate\n ? dayjs(date.value).add(props.numberOfDays, 'day').isAfter(dayjs(props.maxDate))\n : false,\n)\nconst dayProps = (item: dayjs.Dayjs) => props.getDayProps?.(item.format('YYYY-MM-DD')) || {}\nconst disabled = (item: dayjs.Dayjs) =>\n !!(\n (props.minDate && item.isBefore(dayjs(props.minDate), 'day')) ||\n (props.maxDate && item.isAfter(dayjs(props.maxDate), 'day'))\n )\nfunction previous() {\n emit('previous')\n setDate(dayjs(date.value).subtract(props.numberOfDays, 'day').format('YYYY-MM-DD'))\n}\nfunction next() {\n emit('next')\n setDate(dayjs(date.value).add(props.numberOfDays, 'day').format('YYYY-MM-DD'))\n}\nfunction select(item: dayjs.Dayjs, event: MouseEvent) {\n dayProps(item).onClick?.(event)\n setValue(item.format('YYYY-MM-DD'))\n}\nconst previousContent = () => props.previousControlProps?.children\nconst nextContent = () => props.nextControlProps?.children\n</script>\n\n<template>\n <Box v-bind=\"attrs\" :class=\"[classes.miniCalendarRoot, attrs.class]\">\n <UnstyledButton\n v-bind=\"props.previousControlProps\"\n :class=\"[classes.miniCalendarControl, props.previousControlProps?.class]\"\n :disabled=\"previousDisabled\"\n :data-disabled=\"previousDisabled || undefined\"\n data-direction=\"previous\"\n @click=\"previous\"\n ><component\n :is=\"previousContent\"\n v-if=\"props.previousControlProps?.children\" /><AccordionChevron\n v-else\n data-chevron\n :size=\"props.size\"\n /></UnstyledButton>\n <div :class=\"classes.miniCalendarDays\">\n <UnstyledButton\n v-for=\"item in range\"\n :key=\"item.toString()\"\n v-bind=\"dayProps(item)\"\n :class=\"[classes.miniCalendarDay, dayProps(item).class]\"\n :disabled=\"disabled(item)\"\n :aria-label=\"item.format('YYYY-MM-DD')\"\n :data-disabled=\"disabled(item) || undefined\"\n :data-selected=\"(value && item.isSame(value, 'day')) || undefined\"\n @click=\"select(item, $event)\"\n ><span :class=\"classes.miniCalendarDayMonth\">{{\n item.locale(props.locale || context.locale).format(props.monthLabelFormat)\n }}</span\n ><span :class=\"classes.miniCalendarDayNumber\">{{ item.date() }}</span></UnstyledButton\n >\n </div>\n <UnstyledButton\n v-bind=\"props.nextControlProps\"\n :class=\"[classes.miniCalendarControl, props.nextControlProps?.class]\"\n :disabled=\"nextDisabled\"\n :data-disabled=\"nextDisabled || undefined\"\n data-direction=\"next\"\n @click=\"next\"\n ><component :is=\"nextContent\" v-if=\"props.nextControlProps?.children\" /><AccordionChevron\n v-else\n data-chevron\n :size=\"props.size\"\n /></UnstyledButton>\n </Box>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, useAttrs } from 'vue'\nimport { AccordionChevron, Box, UnstyledButton } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport { useDatesContext } from '../DatesProvider'\nimport { toDateString } from '../../utils'\nimport type { DateStringValue, DateValue, MiniCalendarEmits, MiniCalendarProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'MiniCalendar', inheritAttrs: false })\nconst props = withDefaults(defineProps<MiniCalendarProps>(), {\n numberOfDays: 7,\n monthLabelFormat: 'MMM',\n size: 'sm',\n})\nconst emit = defineEmits<\n MiniCalendarEmits & {\n 'update:modelValue': [value: DateValue]\n change: [value: DateValue]\n 'update:date': [value: DateStringValue]\n 'date-change': [value: DateStringValue]\n }\n>()\nconst attrs = useAttrs(),\n context = useDatesContext()\nconst [value, setValue] = useUncontrolled<DateValue>({\n value: computed(() =>\n props.modelValue === undefined ? undefined : toDateString(props.modelValue),\n ),\n defaultValue: toDateString(props.defaultValue),\n finalValue: null,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst [date, setDate] = useUncontrolled<DateStringValue>({\n value: computed(() => toDateString(props.date) || undefined),\n defaultValue: toDateString(props.defaultDate) || undefined,\n finalValue: value.value || dayjs().format('YYYY-MM-DD'),\n onChange: (next) => {\n emit('update:date', next)\n emit('date-change', next)\n },\n})\nconst range = computed(() =>\n Array.from({ length: props.numberOfDays }, (_, index) => dayjs(date.value).add(index, 'days')),\n)\nconst previousDisabled = computed(() =>\n props.minDate ? dayjs(date.value).subtract(1, 'day').isBefore(dayjs(props.minDate)) : false,\n)\nconst nextDisabled = computed(() =>\n props.maxDate\n ? dayjs(date.value).add(props.numberOfDays, 'day').isAfter(dayjs(props.maxDate))\n : false,\n)\nconst dayProps = (item: dayjs.Dayjs) => props.getDayProps?.(item.format('YYYY-MM-DD')) || {}\nconst disabled = (item: dayjs.Dayjs) =>\n !!(\n (props.minDate && item.isBefore(dayjs(props.minDate), 'day')) ||\n (props.maxDate && item.isAfter(dayjs(props.maxDate), 'day'))\n )\nfunction previous() {\n emit('previous')\n setDate(dayjs(date.value).subtract(props.numberOfDays, 'day').format('YYYY-MM-DD'))\n}\nfunction next() {\n emit('next')\n setDate(dayjs(date.value).add(props.numberOfDays, 'day').format('YYYY-MM-DD'))\n}\nfunction select(item: dayjs.Dayjs, event: MouseEvent) {\n dayProps(item).onClick?.(event)\n setValue(item.format('YYYY-MM-DD'))\n}\nconst previousContent = () => props.previousControlProps?.children\nconst nextContent = () => props.nextControlProps?.children\n</script>\n\n<template>\n <Box v-bind=\"attrs\" :class=\"[classes.miniCalendarRoot, attrs.class]\">\n <UnstyledButton\n v-bind=\"props.previousControlProps\"\n :class=\"[classes.miniCalendarControl, props.previousControlProps?.class]\"\n :disabled=\"previousDisabled\"\n :data-disabled=\"previousDisabled || undefined\"\n data-direction=\"previous\"\n @click=\"previous\"\n ><component\n :is=\"previousContent\"\n v-if=\"props.previousControlProps?.children\" /><AccordionChevron\n v-else\n data-chevron\n :size=\"props.size\"\n /></UnstyledButton>\n <div :class=\"classes.miniCalendarDays\">\n <UnstyledButton\n v-for=\"item in range\"\n :key=\"item.toString()\"\n v-bind=\"dayProps(item)\"\n :class=\"[classes.miniCalendarDay, dayProps(item).class]\"\n :disabled=\"disabled(item)\"\n :aria-label=\"item.format('YYYY-MM-DD')\"\n :data-disabled=\"disabled(item) || undefined\"\n :data-selected=\"(value && item.isSame(value, 'day')) || undefined\"\n @click=\"select(item, $event)\"\n ><span :class=\"classes.miniCalendarDayMonth\">{{\n item.locale(props.locale || context.locale).format(props.monthLabelFormat)\n }}</span\n ><span :class=\"classes.miniCalendarDayNumber\">{{ item.date() }}</span></UnstyledButton\n >\n </div>\n <UnstyledButton\n v-bind=\"props.nextControlProps\"\n :class=\"[classes.miniCalendarControl, props.nextControlProps?.class]\"\n :disabled=\"nextDisabled\"\n :data-disabled=\"nextDisabled || undefined\"\n data-direction=\"next\"\n @click=\"next\"\n ><component :is=\"nextContent\" v-if=\"props.nextControlProps?.children\" /><AccordionChevron\n v-else\n data-chevron\n :size=\"props.size\"\n /></UnstyledButton>\n </Box>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAa,kCAAmE;CAC9E,QAAQ;CACR,gBAAgB;CAChB,aAAa,CAAC,GAAG,CAAC;CAClB,UAAU;CACV,iBAAiB;AACnB;AAEA,IAAa,kBAAiE,OAAO,cAAc;;AAGnG,SAAgB,kBAAkB;CAChC,QAAA,GAAA,IAAA,QAAc,iBAAiB,+BAA+B;AAChE;;;;;;;;ECTA,MAAM,QAAQ;EAId,MAAM,YAAA,GAAA,IAAA,UAAoB,EAAE,GAAG,gCAAgC,CAAC;EAEhE,CAAA,GAAA,IAAA,mBAAkB;GAChB,OAAO,OAAO,UAAU,iCAAiC,MAAM,QAAQ;EACzE,CAAC;EAED,CAAA,GAAA,IAAA,SAAQ,iBAAiB,QAAQ;;8BAIvB,KAAA,QAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EGZV,MAAM,QAAQ;EAed,MAAM,SAAA,GAAA,IAAA,UAAQ;EACd,MAAM,SAAA,GAAA,IAAA,UAAiB;EAEvB,MAAM,WAAA,GAAA,IAAA,gBAAyB;GAC7B,IAAI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AA,GAAA,IAAA,OAAgB,KAAA,KAAS,KAAK,QAAA,GAAA,IAAA,OAAO,KAAA,GAAK,KAAA,KAAa,KAAA;OACvD,UAAK,WAAE,OAAO,MAAM,MAAM;;uCAI1B,EAAA,GAAA,IAAA,oBAAA,QAAA,EAHO,QAAA,GAAA,IAAA,iBAAA,GAAA,IAAA,OAAO,oBAAA,EAAQ,oBAAoB,EAAA,IAAA,GAAA,IAAA,iBACzC,KAAK,OAAO,MAAM,WAAA,GAAA,IAAA,OAAU,OAAA,EAAQ,MAAM,EAAE,OAAO,MAAM,gBAAgB,CAAA,GAAA,CAAA,IAAA,GAAA,IAAA,oBAEL,QAAA,EAA9D,QAAA,GAAA,IAAA,iBAAA,GAAA,IAAA,OAAO,oBAAA,EAAQ,qBAAqB,EAAA,IAAA,GAAA,IAAA,iBAAK,KAAK,KAAI,CAAA,GAAA,CAAA,CAAA,CAAA;;;;;;;;;;;yCAc3C,kBAAA,cAAA,IAAA,GAAA,IAAA,YAVT,MAAM,kBAAgB;MAC7B,OAAK,EAAA,GAAA,IAAA,OAAG,oBAAA,EAAQ,qBAAqB,MAAM,kBAAkB,KAAK;MAClE,UAAU,aAAA;MACV,iBAAe,aAAA,SAAgB,KAAA;MAChC,kBAAe;MACd,SAAO;;sCACgE,CAApC,MAAM,kBAAkB,aAAA,GAAA,IAAA,WAAA,IAAA,GAAA,IAAA,cAAA,GAAA,IAAA,yBAA3C,WAAW,GAAA,EAAA,KAAA,EAAA,CAAA,OAAA,GAAA,IAAA,WAAA,IAAA,GAAA,IAAA,cAAA,GAAA,IAAA,OAI5B,kBAAA,gBAAA,GAAA;;OAFE,gBAAA;OACC,MAAM,MAAM"}
1
+ {"version":3,"file":"index.cjs","names":[],"sources":["../src/components/DatesProvider/DatesProvider.context.ts","../src/components/DatesProvider/DatesProvider.vue","../src/components/DatesProvider/DatesProvider.vue","../src/Dates.module.css","../src/components/Day/Day.vue","../src/components/Day/Day.vue","../src/components/PickerControl/PickerControl.vue","../src/components/PickerControl/PickerControl.vue","../src/components/CalendarHeader/CalendarHeader.vue","../src/components/CalendarHeader/CalendarHeader.vue","../src/components/WeekdaysRow/WeekdaysRow.vue","../src/components/WeekdaysRow/WeekdaysRow.vue","../src/utils/index.ts","../src/components/Month/Month.vue","../src/components/Month/Month.vue","../src/components/MonthsList/MonthsList.vue","../src/components/MonthsList/MonthsList.vue","../src/components/YearsList/YearsList.vue","../src/components/YearsList/YearsList.vue","../src/components/Calendar/Calendar.vue","../src/components/Calendar/Calendar.vue","../src/utils/use-forwarded-props.ts","../src/components/MonthLevel/MonthLevel.vue","../src/components/MonthLevel/MonthLevel.vue","../src/components/YearLevel/YearLevel.vue","../src/components/YearLevel/YearLevel.vue","../src/components/DecadeLevel/DecadeLevel.vue","../src/components/DecadeLevel/DecadeLevel.vue","../src/components/MonthLevelGroup/MonthLevelGroup.vue","../src/components/MonthLevelGroup/MonthLevelGroup.vue","../src/components/YearLevelGroup/YearLevelGroup.vue","../src/components/YearLevelGroup/YearLevelGroup.vue","../src/components/DecadeLevelGroup/DecadeLevelGroup.vue","../src/components/DecadeLevelGroup/DecadeLevelGroup.vue","../src/components/LevelsGroup/LevelsGroup.vue","../src/components/LevelsGroup/LevelsGroup.vue","../src/components/DatePicker/DatePicker.vue","../src/components/DatePicker/DatePicker.vue","../src/components/YearPicker/YearPicker.vue","../src/components/YearPicker/YearPicker.vue","../src/components/MonthPicker/MonthPicker.vue","../src/components/MonthPicker/MonthPicker.vue","../src/components/PickerInputBase/PickerInputBase.vue","../src/components/PickerInputBase/PickerInputBase.vue","../src/components/DatePickerInput/DatePickerInput.vue","../src/components/DatePickerInput/DatePickerInput.vue","../src/components/MonthPickerInput/MonthPickerInput.vue","../src/components/MonthPickerInput/MonthPickerInput.vue","../src/components/YearPickerInput/YearPickerInput.vue","../src/components/YearPickerInput/YearPickerInput.vue","../src/components/HiddenDatesInput/HiddenDatesInput.vue","../src/components/HiddenDatesInput/HiddenDatesInput.vue","../src/components/DateInput/DateInput.vue","../src/components/DateInput/DateInput.vue","../src/components/TimeInput/TimeInput.vue","../src/components/TimeInput/TimeInput.vue","../src/components/TimeGrid/TimeGrid.vue","../src/components/TimeGrid/TimeGrid.vue","../src/components/SpinInput/SpinInput.vue","../src/components/SpinInput/SpinInput.vue","../src/components/AmPmInput/AmPmInput.vue","../src/components/AmPmInput/AmPmInput.vue","../src/components/TimeControlsList/TimeControlsList.vue","../src/components/TimeControlsList/TimeControlsList.vue","../src/components/TimePicker/TimePicker.vue","../src/components/TimePicker/TimePicker.vue","../src/components/TimeValue/TimeValue.vue","../src/components/TimeValue/TimeValue.vue","../src/components/InlineDateTimePicker/InlineDateTimePicker.vue","../src/components/InlineDateTimePicker/InlineDateTimePicker.vue","../src/components/DateTimePicker/DateTimePicker.vue","../src/components/DateTimePicker/DateTimePicker.vue","../src/components/MiniCalendar/MiniCalendar.vue","../src/components/MiniCalendar/MiniCalendar.vue"],"sourcesContent":["import { inject, type InjectionKey } from 'vue'\nimport type { DatesProviderSettings } from '../../types'\n\nexport const DATES_PROVIDER_DEFAULT_SETTINGS: Required<DatesProviderSettings> = {\n locale: 'en',\n firstDayOfWeek: 1,\n weekendDays: [0, 6],\n timezone: 'UTC',\n consistentWeeks: false,\n}\n\nexport const DatesContextKey: InjectionKey<Required<DatesProviderSettings>> = Symbol('DatesContext')\n\n/** Returns the nearest reactive dates provider settings. */\nexport function useDatesContext() {\n return inject(DatesContextKey, DATES_PROVIDER_DEFAULT_SETTINGS)\n}\n","<script setup lang=\"ts\">\nimport { provide, reactive, watchEffect } from 'vue'\nimport type { DatesProviderProps } from '../../types'\nimport { DATES_PROVIDER_DEFAULT_SETTINGS, DatesContextKey } from './DatesProvider.context'\n\ndefineOptions({ name: 'DatesProvider' })\n\nconst props = withDefaults(defineProps<DatesProviderProps>(), {\n settings: () => ({}),\n})\n\nconst settings = reactive({ ...DATES_PROVIDER_DEFAULT_SETTINGS })\n\nwatchEffect(() => {\n Object.assign(settings, DATES_PROVIDER_DEFAULT_SETTINGS, props.settings)\n})\n\nprovide(DatesContextKey, settings)\n</script>\n\n<template>\n <slot />\n</template>\n","<script setup lang=\"ts\">\nimport { provide, reactive, watchEffect } from 'vue'\nimport type { DatesProviderProps } from '../../types'\nimport { DATES_PROVIDER_DEFAULT_SETTINGS, DatesContextKey } from './DatesProvider.context'\n\ndefineOptions({ name: 'DatesProvider' })\n\nconst props = withDefaults(defineProps<DatesProviderProps>(), {\n settings: () => ({}),\n})\n\nconst settings = reactive({ ...DATES_PROVIDER_DEFAULT_SETTINGS })\n\nwatchEffect(() => {\n Object.assign(settings, DATES_PROVIDER_DEFAULT_SETTINGS, props.settings)\n})\n\nprovide(DatesContextKey, settings)\n</script>\n\n<template>\n <slot />\n</template>\n",".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","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, useAttrs, type VNodeChild } from 'vue'\nimport { UnstyledButton } from '@mantine-vue/core'\nimport type { DayProps, RenderDaySlots } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'Day', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<DayProps>(), {\n size: 'sm',\n static: false,\n weekend: false,\n outside: false,\n selected: false,\n hidden: false,\n inRange: false,\n firstInRange: false,\n lastInRange: false,\n highlightToday: false,\n fullWidth: false,\n disabled: false,\n unstyled: false,\n})\nconst slots = defineSlots<RenderDaySlots>()\nconst attrs = useAttrs()\n\nconst content = computed(() => {\n if (props.renderDay) return props.renderDay(props.date)\n return (slots.renderDay ?? slots.day)?.({ date: props.date }) ?? dayjs(props.date).date()\n})\nconst renderContent = () => content.value as VNodeChild\n</script>\n\n<template>\n <UnstyledButton\n v-bind=\"attrs\"\n :component=\"props.static ? 'div' : 'button'\"\n :class=\"[classes.day, attrs.class]\"\n :disabled=\"props.disabled\"\n :style=\"[{ display: props.hidden ? 'none' : undefined }, attrs.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 <component :is=\"renderContent\" />\n </UnstyledButton>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, useAttrs, type VNodeChild } from 'vue'\nimport { UnstyledButton } from '@mantine-vue/core'\nimport type { DayProps, RenderDaySlots } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'Day', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<DayProps>(), {\n size: 'sm',\n static: false,\n weekend: false,\n outside: false,\n selected: false,\n hidden: false,\n inRange: false,\n firstInRange: false,\n lastInRange: false,\n highlightToday: false,\n fullWidth: false,\n disabled: false,\n unstyled: false,\n})\nconst slots = defineSlots<RenderDaySlots>()\nconst attrs = useAttrs()\n\nconst content = computed(() => {\n if (props.renderDay) return props.renderDay(props.date)\n return (slots.renderDay ?? slots.day)?.({ date: props.date }) ?? dayjs(props.date).date()\n})\nconst renderContent = () => content.value as VNodeChild\n</script>\n\n<template>\n <UnstyledButton\n v-bind=\"attrs\"\n :component=\"props.static ? 'div' : 'button'\"\n :class=\"[classes.day, attrs.class]\"\n :disabled=\"props.disabled\"\n :style=\"[{ display: props.hidden ? 'none' : undefined }, attrs.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 <component :is=\"renderContent\" />\n </UnstyledButton>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs } from 'vue'\nimport { UnstyledButton } from '@mantine-vue/core'\nimport type { PickerControlProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'PickerControl', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<PickerControlProps>(), {\n selected: false,\n disabled: false,\n inRange: false,\n firstInRange: false,\n lastInRange: false,\n withCellSpacing: true,\n fullWidth: false,\n})\nconst attrs = useAttrs()\n</script>\n\n<template>\n <UnstyledButton\n v-bind=\"attrs\"\n :class=\"[classes.pickerControl, attrs.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 <slot />\n </UnstyledButton>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs } from 'vue'\nimport { UnstyledButton } from '@mantine-vue/core'\nimport type { PickerControlProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'PickerControl', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<PickerControlProps>(), {\n selected: false,\n disabled: false,\n inRange: false,\n firstInRange: false,\n lastInRange: false,\n withCellSpacing: true,\n fullWidth: false,\n})\nconst attrs = useAttrs()\n</script>\n\n<template>\n <UnstyledButton\n v-bind=\"attrs\"\n :class=\"[classes.pickerControl, attrs.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 <slot />\n </UnstyledButton>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, getCurrentInstance } from 'vue'\nimport { AccordionChevron, UnstyledButton } from '@mantine-vue/core'\nimport type { CalendarHeaderEmits, CalendarHeaderProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'CalendarHeader' })\n\nconst props = withDefaults(defineProps<CalendarHeaderProps>(), {\n hasNextLevel: true,\n withNext: true,\n withPrevious: true,\n nextDisabled: false,\n previousDisabled: false,\n nextLabel: 'Next',\n previousLabel: 'Previous',\n fullWidth: false,\n withNativeLevelSelect: false,\n disableNativeLevelSelect: false,\n})\nconst emit = defineEmits<CalendarHeaderEmits>()\nconst instance = getCurrentInstance()\nconst hasDateChangeListener = computed(() => {\n const vnodeProps = instance?.vnode.props\n return !!(vnodeProps?.onDateChange || vnodeProps?.['onDate-change'])\n})\n\nconst displayed = computed(() => (props.date ? dayjs(props.date) : dayjs()))\nconst yearRange = computed(() => {\n const currentYear = new Date().getFullYear()\n const rawMin =\n props.yearsSelectRange?.[0] ?? (props.minDate ? dayjs(props.minDate).year() : currentYear - 100)\n const rawMax =\n props.yearsSelectRange?.[1] ?? (props.maxDate ? dayjs(props.maxDate).year() : currentYear + 50)\n const min = Math.min(rawMin, rawMax, displayed.value.year())\n const max = Math.max(rawMin, rawMax, displayed.value.year())\n return Array.from({ length: max - min + 1 }, (_, index) => min + index)\n})\nconst monthNames = computed(() =>\n Array.from({ length: 12 }, (_, month) =>\n dayjs()\n .locale(props.locale || 'en')\n .month(month)\n .format('MMMM'),\n ),\n)\nconst showsNativeSelect = computed(\n () =>\n props.withNativeLevelSelect &&\n props.date &&\n hasDateChangeListener.value &&\n props.calendarLevel !== 'decade',\n)\n\nfunction updateNativeDate(next: dayjs.Dayjs) {\n let result = next\n if (props.minDate && result.isBefore(dayjs(props.minDate), 'day')) result = dayjs(props.minDate)\n if (props.maxDate && result.isAfter(dayjs(props.maxDate), 'day')) result = dayjs(props.maxDate)\n emit('date-change', result.format('YYYY-MM-DD'))\n}\n\nfunction onMonthChange(event: Event) {\n updateNativeDate(displayed.value.month(Number((event.target as HTMLSelectElement).value)))\n}\n\nfunction onYearChange(event: Event) {\n updateNativeDate(displayed.value.year(Number((event.target as HTMLSelectElement).value)))\n}\n</script>\n\n<template>\n <div :class=\"classes.calendarHeader\" :data-full-width=\"props.fullWidth || undefined\">\n <UnstyledButton\n v-if=\"props.withPrevious\"\n :class=\"classes.calendarHeaderControl\"\n data-direction=\"previous\"\n :aria-label=\"props.previousLabel\"\n :disabled=\"props.previousDisabled\"\n :data-disabled=\"props.previousDisabled || undefined\"\n @click=\"emit('previous')\"\n >\n <AccordionChevron\n :class=\"classes.calendarHeaderControlIcon\"\n data-direction=\"previous\"\n size=\"45%\"\n />\n </UnstyledButton>\n\n <div\n v-if=\"showsNativeSelect\"\n :class=\"classes.calendarHeaderLevel\"\n data-static\n data-native-level-select\n >\n <select\n v-if=\"props.calendarLevel === 'month'\"\n :class=\"classes.calendarHeaderSelect\"\n data-select=\"month\"\n :disabled=\"props.disableNativeLevelSelect\"\n :value=\"displayed.month()\"\n :aria-label=\"props.levelControlAriaLabel\"\n @change=\"onMonthChange\"\n >\n <option v-for=\"(month, index) in monthNames\" :key=\"month\" :value=\"index\">\n {{ month }}\n </option>\n </select>\n <select\n :class=\"classes.calendarHeaderSelect\"\n data-select=\"year\"\n :disabled=\"props.disableNativeLevelSelect\"\n :value=\"displayed.year()\"\n :aria-label=\"props.levelControlAriaLabel\"\n @change=\"onYearChange\"\n >\n <option v-for=\"year in yearRange\" :key=\"year\" :value=\"year\">{{ year }}</option>\n </select>\n </div>\n <UnstyledButton\n v-else\n :component=\"props.hasNextLevel ? 'button' : 'div'\"\n :class=\"classes.calendarHeaderLevel\"\n :disabled=\"!props.hasNextLevel\"\n :data-static=\"!props.hasNextLevel || undefined\"\n :aria-label=\"props.levelControlAriaLabel\"\n @click=\"props.hasNextLevel ? emit('level-click') : undefined\"\n >\n {{ props.label }}\n </UnstyledButton>\n\n <UnstyledButton\n v-if=\"props.withNext\"\n :class=\"classes.calendarHeaderControl\"\n data-direction=\"next\"\n :aria-label=\"props.nextLabel\"\n :disabled=\"props.nextDisabled\"\n :data-disabled=\"props.nextDisabled || undefined\"\n @click=\"emit('next')\"\n >\n <AccordionChevron\n :class=\"classes.calendarHeaderControlIcon\"\n data-direction=\"next\"\n size=\"45%\"\n />\n </UnstyledButton>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, getCurrentInstance } from 'vue'\nimport { AccordionChevron, UnstyledButton } from '@mantine-vue/core'\nimport type { CalendarHeaderEmits, CalendarHeaderProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'CalendarHeader' })\n\nconst props = withDefaults(defineProps<CalendarHeaderProps>(), {\n hasNextLevel: true,\n withNext: true,\n withPrevious: true,\n nextDisabled: false,\n previousDisabled: false,\n nextLabel: 'Next',\n previousLabel: 'Previous',\n fullWidth: false,\n withNativeLevelSelect: false,\n disableNativeLevelSelect: false,\n})\nconst emit = defineEmits<CalendarHeaderEmits>()\nconst instance = getCurrentInstance()\nconst hasDateChangeListener = computed(() => {\n const vnodeProps = instance?.vnode.props\n return !!(vnodeProps?.onDateChange || vnodeProps?.['onDate-change'])\n})\n\nconst displayed = computed(() => (props.date ? dayjs(props.date) : dayjs()))\nconst yearRange = computed(() => {\n const currentYear = new Date().getFullYear()\n const rawMin =\n props.yearsSelectRange?.[0] ?? (props.minDate ? dayjs(props.minDate).year() : currentYear - 100)\n const rawMax =\n props.yearsSelectRange?.[1] ?? (props.maxDate ? dayjs(props.maxDate).year() : currentYear + 50)\n const min = Math.min(rawMin, rawMax, displayed.value.year())\n const max = Math.max(rawMin, rawMax, displayed.value.year())\n return Array.from({ length: max - min + 1 }, (_, index) => min + index)\n})\nconst monthNames = computed(() =>\n Array.from({ length: 12 }, (_, month) =>\n dayjs()\n .locale(props.locale || 'en')\n .month(month)\n .format('MMMM'),\n ),\n)\nconst showsNativeSelect = computed(\n () =>\n props.withNativeLevelSelect &&\n props.date &&\n hasDateChangeListener.value &&\n props.calendarLevel !== 'decade',\n)\n\nfunction updateNativeDate(next: dayjs.Dayjs) {\n let result = next\n if (props.minDate && result.isBefore(dayjs(props.minDate), 'day')) result = dayjs(props.minDate)\n if (props.maxDate && result.isAfter(dayjs(props.maxDate), 'day')) result = dayjs(props.maxDate)\n emit('date-change', result.format('YYYY-MM-DD'))\n}\n\nfunction onMonthChange(event: Event) {\n updateNativeDate(displayed.value.month(Number((event.target as HTMLSelectElement).value)))\n}\n\nfunction onYearChange(event: Event) {\n updateNativeDate(displayed.value.year(Number((event.target as HTMLSelectElement).value)))\n}\n</script>\n\n<template>\n <div :class=\"classes.calendarHeader\" :data-full-width=\"props.fullWidth || undefined\">\n <UnstyledButton\n v-if=\"props.withPrevious\"\n :class=\"classes.calendarHeaderControl\"\n data-direction=\"previous\"\n :aria-label=\"props.previousLabel\"\n :disabled=\"props.previousDisabled\"\n :data-disabled=\"props.previousDisabled || undefined\"\n @click=\"emit('previous')\"\n >\n <AccordionChevron\n :class=\"classes.calendarHeaderControlIcon\"\n data-direction=\"previous\"\n size=\"45%\"\n />\n </UnstyledButton>\n\n <div\n v-if=\"showsNativeSelect\"\n :class=\"classes.calendarHeaderLevel\"\n data-static\n data-native-level-select\n >\n <select\n v-if=\"props.calendarLevel === 'month'\"\n :class=\"classes.calendarHeaderSelect\"\n data-select=\"month\"\n :disabled=\"props.disableNativeLevelSelect\"\n :value=\"displayed.month()\"\n :aria-label=\"props.levelControlAriaLabel\"\n @change=\"onMonthChange\"\n >\n <option v-for=\"(month, index) in monthNames\" :key=\"month\" :value=\"index\">\n {{ month }}\n </option>\n </select>\n <select\n :class=\"classes.calendarHeaderSelect\"\n data-select=\"year\"\n :disabled=\"props.disableNativeLevelSelect\"\n :value=\"displayed.year()\"\n :aria-label=\"props.levelControlAriaLabel\"\n @change=\"onYearChange\"\n >\n <option v-for=\"year in yearRange\" :key=\"year\" :value=\"year\">{{ year }}</option>\n </select>\n </div>\n <UnstyledButton\n v-else\n :component=\"props.hasNextLevel ? 'button' : 'div'\"\n :class=\"classes.calendarHeaderLevel\"\n :disabled=\"!props.hasNextLevel\"\n :data-static=\"!props.hasNextLevel || undefined\"\n :aria-label=\"props.levelControlAriaLabel\"\n @click=\"props.hasNextLevel ? emit('level-click') : undefined\"\n >\n {{ props.label }}\n </UnstyledButton>\n\n <UnstyledButton\n v-if=\"props.withNext\"\n :class=\"classes.calendarHeaderControl\"\n data-direction=\"next\"\n :aria-label=\"props.nextLabel\"\n :disabled=\"props.nextDisabled\"\n :data-disabled=\"props.nextDisabled || undefined\"\n @click=\"emit('next')\"\n >\n <AccordionChevron\n :class=\"classes.calendarHeaderControlIcon\"\n data-direction=\"next\"\n size=\"45%\"\n />\n </UnstyledButton>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed } from 'vue'\nimport { useDatesContext } from '../DatesProvider'\nimport type { WeekdaysRowProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'WeekdaysRow' })\n\nconst props = withDefaults(defineProps<WeekdaysRowProps>(), {\n weekdayFormat: 'dd',\n withWeekNumbers: false,\n})\nconst context = useDatesContext()\nconst days = computed(() => {\n const firstDay = props.firstDayOfWeek ?? context.firstDayOfWeek\n return Array.from({ length: 7 }, (_, index) =>\n dayjs('2024-01-07').add((firstDay + index) % 7, 'day'),\n )\n})\n\nfunction label(date: dayjs.Dayjs) {\n return typeof props.weekdayFormat === 'function'\n ? props.weekdayFormat(date.format('YYYY-MM-DD'))\n : date.locale(props.locale || context.locale).format(props.weekdayFormat)\n}\n</script>\n\n<template>\n <tr :class=\"classes.weekdaysRow\">\n <th v-if=\"props.withWeekNumbers\" :class=\"classes.weekday\" />\n <th\n v-for=\"date in days\"\n :key=\"date.day()\"\n :class=\"classes.weekday\"\n :data-weekend=\"(props.weekendDays ?? context.weekendDays).includes(date.day()) || undefined\"\n >\n {{ label(date) }}\n </th>\n </tr>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed } from 'vue'\nimport { useDatesContext } from '../DatesProvider'\nimport type { WeekdaysRowProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'WeekdaysRow' })\n\nconst props = withDefaults(defineProps<WeekdaysRowProps>(), {\n weekdayFormat: 'dd',\n withWeekNumbers: false,\n})\nconst context = useDatesContext()\nconst days = computed(() => {\n const firstDay = props.firstDayOfWeek ?? context.firstDayOfWeek\n return Array.from({ length: 7 }, (_, index) =>\n dayjs('2024-01-07').add((firstDay + index) % 7, 'day'),\n )\n})\n\nfunction label(date: dayjs.Dayjs) {\n return typeof props.weekdayFormat === 'function'\n ? props.weekdayFormat(date.format('YYYY-MM-DD'))\n : date.locale(props.locale || context.locale).format(props.weekdayFormat)\n}\n</script>\n\n<template>\n <tr :class=\"classes.weekdaysRow\">\n <th v-if=\"props.withWeekNumbers\" :class=\"classes.weekday\" />\n <th\n v-for=\"date in days\"\n :key=\"date.day()\"\n :class=\"classes.weekday\"\n :data-weekend=\"(props.weekendDays ?? context.weekendDays).includes(date.day()) || undefined\"\n >\n {{ label(date) }}\n </th>\n </tr>\n</template>\n","import dayjs from 'dayjs'\nimport customParseFormat from 'dayjs/plugin/customParseFormat'\nimport type {\n ControlKeydownPayload,\n DateFormatter,\n DatePickerType,\n DatePickerValueType,\n DatesRangeValue,\n DateStringValue,\n} from '../types'\n\ndayjs.extend(customParseFormat)\n\nexport function toDateString(value: Date | string | null | undefined): DateStringValue | null {\n if (value == null || value === '') return null\n const parsed = dayjs(value)\n return parsed.isValid() ? parsed.format('YYYY-MM-DD') : null\n}\n\n/** Compatibility helper. Date values are already timezone-independent ISO strings in v3. */\nexport function shiftTimezone<T>(direction: 'add' | 'remove', date: T, timezone?: string): T {\n void direction\n void timezone\n return date\n}\n\n/** Returns the browser offset for a date; `timezone` is retained for API compatibility. */\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 min = toDateString(minDate),\n max = toDateString(maxDate)\n if (min && value.isBefore(min, 'day')) return min\n if (max && value.isAfter(max, 'day')) return max\n return value.format('YYYY-MM-DD')\n}\n\nexport function getDefaultClampedDate({\n minDate,\n maxDate,\n defaultDate,\n}: { minDate?: Date | string; maxDate?: Date | string; defaultDate?: Date | string } = {}) {\n return clampDate(toDateString(defaultDate) || dayjs().format('YYYY-MM-DD'), minDate, maxDate)\n}\n\nexport function assignTime(date: Date | string, time: Date | string) {\n const value = dayjs(time)\n return dayjs(date)\n .hour(value.hour())\n .minute(value.minute())\n .second(value.second())\n .millisecond(value.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 return !!a && !!b && dayjs(a).isSame(b, 'day')\n}\nexport function isSameMonth(a: Date | string, b: Date | string) {\n return dayjs(a).isSame(b, 'month')\n}\nexport function isSameYear(a: Date | string, b: Date | string) {\n return dayjs(a).isSame(b, 'year')\n}\nexport function getStartOfWeek(date: Date | string, firstDayOfWeek = 1) {\n const value = dayjs(date)\n return value.subtract((value.day() - firstDayOfWeek + 7) % 7, 'day').format('YYYY-MM-DD')\n}\nexport function getEndOfWeek(date: Date | string, firstDayOfWeek = 1) {\n return dayjs(getStartOfWeek(date, firstDayOfWeek)).add(6, 'day').format('YYYY-MM-DD')\n}\nexport function getWeekNumber(date: Date | string) {\n const value = dayjs(date),\n start = dayjs(`${value.year()}-01-01`)\n return Math.ceil((value.diff(start, 'day') + start.day() + 1) / 7)\n}\n\nexport function handleControlKeyDown({\n rowIndex,\n cellIndex,\n event,\n controlsRef,\n}: ControlKeydownPayload) {\n const rows = controlsRef.length,\n cols = controlsRef[0]?.length || 0\n let row = rowIndex,\n cell = cellIndex\n if (event.key === 'ArrowRight') cell += 1\n if (event.key === 'ArrowLeft') cell -= 1\n if (event.key === 'ArrowDown') row += 1\n if (event.key === 'ArrowUp') row -= 1\n if (event.key === 'Home') cell = 0\n if (event.key === 'End') cell = cols - 1\n if (cell < 0) {\n cell = cols - 1\n row -= 1\n } else if (cell >= cols) {\n cell = 0\n row += 1\n }\n const next = controlsRef[(row + rows) % rows]?.[(cell + cols) % cols]\n if (next) {\n event.preventDefault()\n next.focus()\n }\n}\n\nexport function focusAdjacentControl(\n refs: (HTMLElement | null | undefined)[][],\n rowIndex: number,\n cellIndex: number,\n direction: 'up' | 'down' | 'left' | 'right',\n) {\n const focusable = (element: HTMLElement | null | undefined) =>\n !!element &&\n !(element as any).disabled &&\n !element.hasAttribute('data-hidden') &&\n !element.hasAttribute('data-outside')\n let row = rowIndex,\n cell = cellIndex\n for (let index = 0; index < 60; index += 1) {\n if (direction === 'up') row -= 1\n if (direction === 'down') row += 1\n if (direction === 'left' && --cell < 0) {\n row -= 1\n cell = (refs[row]?.length || 1) - 1\n }\n if (direction === 'right' && ++cell >= (refs[row]?.length || 0)) {\n row += 1\n cell = 0\n }\n const element = refs[row]?.[cell]\n if (element === undefined) return\n if (focusable(element)) {\n element?.focus()\n return\n }\n }\n}\n\nexport function keyToDirection(key: string): 'up' | 'down' | 'left' | 'right' | null {\n return key === 'ArrowUp'\n ? 'up'\n : key === 'ArrowDown'\n ? 'down'\n : key === 'ArrowLeft'\n ? 'left'\n : key === 'ArrowRight'\n ? 'right'\n : null\n}\nexport function 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\nexport function getMonthDays(\n month: DateStringValue,\n firstDayOfWeek: number,\n consistentWeeks = false,\n) {\n const startOfMonth = dayjs(month).startOf('month'),\n start = dayjs(getStartOfWeek(startOfMonth.format('YYYY-MM-DD'), firstDayOfWeek))\n const offset = (startOfMonth.day() - firstDayOfWeek + 7) % 7\n const weeks = consistentWeeks ? 6 : Math.ceil((startOfMonth.daysInMonth() + offset) / 7)\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\nexport function isBeforeMin(date: DateStringValue, minDate?: Date | string) {\n const min = toDateString(minDate)\n return !!min && dayjs(date).isBefore(min, 'day')\n}\nexport function isAfterMax(date: DateStringValue, maxDate?: Date | string) {\n const max = toDateString(maxDate)\n return !!max && dayjs(date).isAfter(max, 'day')\n}\nexport function getMonthLabel(date: DateStringValue, format = 'MMMM YYYY', locale?: string) {\n return dayjs(date)\n .locale(locale || 'en')\n .format(format)\n}\nexport function getYearRange(date: DateStringValue) {\n const year = dayjs(date).year(),\n start = year - (year % 10)\n return Array.from({ length: 10 }, (_, index) =>\n dayjs(`${start + index}-01-01`).format('YYYY-MM-DD'),\n )\n}\nexport function getDecadeLabel(date: DateStringValue) {\n const years = getYearRange(date)\n return `${dayjs(years[0]).year()} – ${dayjs(years.at(-1)!).year()}`\n}\n\nexport function formatValue(\n value: DatePickerValueType,\n type: DatePickerType,\n format: string,\n locale?: string,\n labelSeparator = '–',\n valueFormatter?: DateFormatter,\n) {\n if (valueFormatter) return valueFormatter({ type, date: value, locale, format, labelSeparator })\n const print = (item: string) =>\n dayjs(item)\n .locale(locale || 'en')\n .format(format)\n if (type === 'multiple')\n return Array.isArray(value)\n ? value\n .map((item) => item && print(item))\n .filter(Boolean)\n .join(', ')\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) return `${print(start)} ${labelSeparator} `\n if (!start && end) return `${labelSeparator} ${print(end)}`\n return `${print(start!)} ${labelSeparator} ${print(end!)}`\n }\n return value ? print(value as string) : ''\n}\n\nexport function isInRangeGranular(\n date: DateStringValue,\n range: [DateStringValue, DateStringValue],\n unit: 'month' | 'year',\n) {\n const sorted = [...range].sort((a, b) => (dayjs(a).isAfter(b) ? 1 : -1))\n return !dayjs(date).isBefore(sorted[0], unit) && !dayjs(date).isAfter(sorted[1], unit)\n}\nexport function 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 if (type === 'range') {\n const [start, end] = Array.isArray(value) ? (value as DatesRangeValue) : [null, null]\n return !start || end || dayjs(date).isBefore(start, 'day')\n ? ([date, null] as DatesRangeValue)\n : ([start, date] as DatesRangeValue)\n }\n return date\n}\n\nexport function dateStringParser(value: string, format = 'MMMM D, YYYY', locale?: string) {\n const parsed = dayjs(value, format, locale || 'en', true)\n return parsed.isValid() ? parsed.format('YYYY-MM-DD') : null\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\nconst splitTimeString = (value = '') => {\n const [time = ''] = value.split(' '),\n [hours = '00', minutes = '00', seconds = '00'] = time.split(':')\n return { hours, minutes, seconds }\n}\nexport function padTime(value: number | string) {\n return String(value).padStart(2, '0')\n}\nconst defaultAmPmLabels = { am: 'AM', pm: 'PM' }\nexport function getParsedTime({\n time,\n format,\n amPmLabels = defaultAmPmLabels,\n}: {\n time: string\n format: '12h' | '24h'\n amPmLabels?: { am: string; pm: string }\n}) {\n if (!time) return { hours: null, minutes: null, seconds: null, amPm: null }\n const parts = splitTimeString(time),\n hours = Number(parts.hours),\n minutes = Number(parts.minutes),\n seconds = Number(parts.seconds)\n if (format === '12h')\n return {\n hours: hours % 12 || 12,\n minutes,\n seconds,\n amPm: hours >= 12 ? amPmLabels.pm : amPmLabels.am,\n }\n return { hours, minutes, seconds, amPm: null }\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?: { am: string; pm: string }\n}) {\n if (hours === null || minutes === null || (withSeconds && seconds == null))\n return { valid: false, value: '' }\n let normalized = hours\n if (format === '12h') {\n if (amPm === null) return { valid: false, value: '' }\n if (amPm === amPmLabels.pm && hours !== 12) normalized += 12\n else if (amPm === amPmLabels.am && hours === 12) normalized = 0\n }\n return {\n valid: true,\n value: `${padTime(normalized)}:${padTime(minutes)}${withSeconds ? `:${padTime(seconds || 0)}` : ''}`,\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}\nexport function isSameTime(a?: string, b?: string) {\n return !!a && !!b && timeToSeconds(a) === timeToSeconds(b)\n}\nexport function compareTime(a: string, b: string) {\n return timeToSeconds(a) - timeToSeconds(b)\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}\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 result.push(\n `${padTime(Math.floor(current / 3600))}:${padTime(Math.floor((current % 3600) / 60))}`,\n )\n return result\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","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, ref } from 'vue'\nimport { useDatesContext } from '../DatesProvider'\nimport Day from '../Day/Day.vue'\nimport WeekdaysRow from '../WeekdaysRow/WeekdaysRow.vue'\nimport {\n focusAdjacentControl,\n getMonthDays,\n getWeekNumber,\n isAfterMax,\n isBeforeMin,\n isSameDate,\n keyToDirection,\n setGridRef,\n} from '../../utils'\nimport type {\n DateStringValue,\n DatesRangeValue,\n DateValue,\n MonthEmits,\n MonthProps,\n RenderDaySlots,\n} from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'Month' })\n\nconst props = withDefaults(defineProps<MonthProps>(), {\n month: () => dayjs().format('YYYY-MM-DD'),\n value: null,\n type: 'default',\n hideOutsideDates: false,\n hideWeekdays: false,\n withCellSpacing: true,\n highlightToday: false,\n withWeekNumbers: false,\n static: false,\n fullWidth: false,\n})\nconst emit = defineEmits<MonthEmits>()\nconst slots = defineSlots<RenderDaySlots>()\nconst context = useDatesContext()\nconst hovered = ref<DateStringValue | null>(null)\nconst dayRefs: (HTMLElement | null | undefined)[][] = []\n\nconst firstDay = computed(() => props.firstDayOfWeek ?? context.firstDayOfWeek)\nconst rows = computed(() => getMonthDays(props.month, firstDay.value, context.consistentWeeks))\n\nfunction selected(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\nfunction inRange(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 const [first, last] = [start, rangeEnd].sort((a, b) => (dayjs(a).isAfter(b) ? 1 : -1))\n return dayjs(date).isAfter(first, 'day') && dayjs(date).isBefore(last, 'day')\n}\n\nfunction outside(date: DateStringValue) {\n return !dayjs(date).isSame(props.month, 'month')\n}\n\nfunction baseDisabled(date: DateStringValue) {\n return (\n isBeforeMin(date, props.minDate) ||\n isAfterMax(date, props.maxDate) ||\n !!props.excludeDate?.(date)\n )\n}\n\nfunction dayProps(date: DateStringValue) {\n return props.getDayProps?.(date) || {}\n}\n\nfunction dayAttributes(date: DateStringValue) {\n const attributes = { ...dayProps(date) }\n delete attributes.onClick\n delete attributes.onMouseenter\n delete attributes.onMouseEnter\n delete attributes.onKeydown\n delete attributes.onKeyDown\n return attributes\n}\n\nfunction dayAriaLabel(date: DateStringValue) {\n return (\n props.getDayAriaLabel?.(date) ||\n dayjs(date)\n .locale(props.locale || context.locale)\n .format('D MMMM YYYY')\n )\n}\n\nconst dateInTabOrder = computed(() => {\n const enabled = rows.value.flat().filter((date) => {\n const controlProps = dayProps(date)\n return (\n !baseDisabled(date) && !controlProps.disabled && (!props.hideOutsideDates || !outside(date))\n )\n })\n return (\n enabled.find(selected) ?? enabled.find((date) => dayjs().isSame(date, 'date')) ?? enabled[0]\n )\n})\n\nconst renderDay =\n props.renderDay ??\n ((slots.renderDay ?? slots.day)\n ? (date: DateStringValue) => (slots.renderDay ?? slots.day)?.({ date })\n : undefined)\n\nfunction rangeStart(date: DateStringValue) {\n if (props.type !== 'range' || !Array.isArray(props.value) || !props.value[0]) return false\n const end = props.value[1] || hovered.value\n const first = end && dayjs(end).isBefore(props.value[0], 'day') ? end : props.value[0]\n return isSameDate(date, first)\n}\n\nfunction rangeEnd(date: DateStringValue) {\n if (props.type !== 'range' || !Array.isArray(props.value) || !props.value[0]) return false\n const end = props.value[1] || hovered.value\n if (!end) return false\n const last = dayjs(end).isAfter(props.value[0], 'day') ? end : props.value[0]\n return isSameDate(date, last)\n}\n\nfunction onClick(date: DateStringValue, event: MouseEvent) {\n dayProps(date).onClick?.(event)\n if (!baseDisabled(date) && !props.static) emit('day-click', date)\n}\n\nfunction onMouseEnter(date: DateStringValue, event: MouseEvent) {\n hovered.value = date\n const controlProps = dayProps(date)\n ;(controlProps.onMouseenter ?? controlProps.onMouseEnter)?.(event)\n emit('day-mouse-enter', date)\n}\n\nfunction onKeydown(\n date: DateStringValue,\n rowIndex: number,\n cellIndex: number,\n event: KeyboardEvent,\n) {\n const controlProps = dayProps(date)\n ;(controlProps.onKeydown ?? controlProps.onKeyDown)?.(event)\n const direction = keyToDirection(event.key)\n if (direction) {\n event.preventDefault()\n focusAdjacentControl(dayRefs, rowIndex, cellIndex, direction)\n }\n}\n</script>\n\n<template>\n <table :class=\"classes.month\" :data-full-width=\"props.fullWidth || undefined\">\n <thead v-if=\"!props.hideWeekdays\">\n <WeekdaysRow\n :first-day-of-week=\"firstDay\"\n :weekend-days=\"props.weekendDays\"\n :locale=\"props.locale\"\n :weekday-format=\"props.weekdayFormat\"\n :with-week-numbers=\"props.withWeekNumbers\"\n />\n </thead>\n <tbody>\n <tr v-for=\"(week, rowIndex) in rows\" :key=\"week[0]\" :class=\"classes.monthRow\">\n <td v-if=\"props.withWeekNumbers\" :class=\"classes.weekNumber\">\n {{ getWeekNumber(week[0]) }}\n </td>\n <td\n v-for=\"(date, cellIndex) in week\"\n :key=\"date\"\n :class=\"classes.monthCell\"\n :data-with-spacing=\"props.withCellSpacing || undefined\"\n >\n <Day\n v-bind=\"dayAttributes(date)\"\n :ref=\"(node: any) => setGridRef(dayRefs, rowIndex, cellIndex, node)\"\n :date=\"date\"\n :static=\"props.static\"\n :disabled=\"baseDisabled(date) || dayProps(date).disabled\"\n :weekend=\"(props.weekendDays ?? context.weekendDays).includes(dayjs(date).day())\"\n :outside=\"outside(date)\"\n :hidden=\"props.hideOutsideDates && outside(date)\"\n :selected=\"selected(date)\"\n :in-range=\"inRange(date)\"\n :first-in-range=\"rangeStart(date)\"\n :last-in-range=\"rangeEnd(date)\"\n :highlight-today=\"props.highlightToday\"\n :full-width=\"props.fullWidth\"\n :render-day=\"renderDay\"\n :aria-label=\"dayAriaLabel(date)\"\n :tabindex=\"props.static ? undefined : date === dateInTabOrder ? 0 : -1\"\n :data-autofocus=\"selected(date) || undefined\"\n @click=\"onClick(date, $event)\"\n @mouseenter=\"onMouseEnter(date, $event)\"\n @keydown=\"onKeydown(date, rowIndex, cellIndex, $event)\"\n />\n </td>\n </tr>\n </tbody>\n </table>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, ref } from 'vue'\nimport { useDatesContext } from '../DatesProvider'\nimport Day from '../Day/Day.vue'\nimport WeekdaysRow from '../WeekdaysRow/WeekdaysRow.vue'\nimport {\n focusAdjacentControl,\n getMonthDays,\n getWeekNumber,\n isAfterMax,\n isBeforeMin,\n isSameDate,\n keyToDirection,\n setGridRef,\n} from '../../utils'\nimport type {\n DateStringValue,\n DatesRangeValue,\n DateValue,\n MonthEmits,\n MonthProps,\n RenderDaySlots,\n} from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'Month' })\n\nconst props = withDefaults(defineProps<MonthProps>(), {\n month: () => dayjs().format('YYYY-MM-DD'),\n value: null,\n type: 'default',\n hideOutsideDates: false,\n hideWeekdays: false,\n withCellSpacing: true,\n highlightToday: false,\n withWeekNumbers: false,\n static: false,\n fullWidth: false,\n})\nconst emit = defineEmits<MonthEmits>()\nconst slots = defineSlots<RenderDaySlots>()\nconst context = useDatesContext()\nconst hovered = ref<DateStringValue | null>(null)\nconst dayRefs: (HTMLElement | null | undefined)[][] = []\n\nconst firstDay = computed(() => props.firstDayOfWeek ?? context.firstDayOfWeek)\nconst rows = computed(() => getMonthDays(props.month, firstDay.value, context.consistentWeeks))\n\nfunction selected(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\nfunction inRange(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 const [first, last] = [start, rangeEnd].sort((a, b) => (dayjs(a).isAfter(b) ? 1 : -1))\n return dayjs(date).isAfter(first, 'day') && dayjs(date).isBefore(last, 'day')\n}\n\nfunction outside(date: DateStringValue) {\n return !dayjs(date).isSame(props.month, 'month')\n}\n\nfunction baseDisabled(date: DateStringValue) {\n return (\n isBeforeMin(date, props.minDate) ||\n isAfterMax(date, props.maxDate) ||\n !!props.excludeDate?.(date)\n )\n}\n\nfunction dayProps(date: DateStringValue) {\n return props.getDayProps?.(date) || {}\n}\n\nfunction dayAttributes(date: DateStringValue) {\n const attributes = { ...dayProps(date) }\n delete attributes.onClick\n delete attributes.onMouseenter\n delete attributes.onMouseEnter\n delete attributes.onKeydown\n delete attributes.onKeyDown\n return attributes\n}\n\nfunction dayAriaLabel(date: DateStringValue) {\n return (\n props.getDayAriaLabel?.(date) ||\n dayjs(date)\n .locale(props.locale || context.locale)\n .format('D MMMM YYYY')\n )\n}\n\nconst dateInTabOrder = computed(() => {\n const enabled = rows.value.flat().filter((date) => {\n const controlProps = dayProps(date)\n return (\n !baseDisabled(date) && !controlProps.disabled && (!props.hideOutsideDates || !outside(date))\n )\n })\n return (\n enabled.find(selected) ?? enabled.find((date) => dayjs().isSame(date, 'date')) ?? enabled[0]\n )\n})\n\nconst renderDay =\n props.renderDay ??\n ((slots.renderDay ?? slots.day)\n ? (date: DateStringValue) => (slots.renderDay ?? slots.day)?.({ date })\n : undefined)\n\nfunction rangeStart(date: DateStringValue) {\n if (props.type !== 'range' || !Array.isArray(props.value) || !props.value[0]) return false\n const end = props.value[1] || hovered.value\n const first = end && dayjs(end).isBefore(props.value[0], 'day') ? end : props.value[0]\n return isSameDate(date, first)\n}\n\nfunction rangeEnd(date: DateStringValue) {\n if (props.type !== 'range' || !Array.isArray(props.value) || !props.value[0]) return false\n const end = props.value[1] || hovered.value\n if (!end) return false\n const last = dayjs(end).isAfter(props.value[0], 'day') ? end : props.value[0]\n return isSameDate(date, last)\n}\n\nfunction onClick(date: DateStringValue, event: MouseEvent) {\n dayProps(date).onClick?.(event)\n if (!baseDisabled(date) && !props.static) emit('day-click', date)\n}\n\nfunction onMouseEnter(date: DateStringValue, event: MouseEvent) {\n hovered.value = date\n const controlProps = dayProps(date)\n ;(controlProps.onMouseenter ?? controlProps.onMouseEnter)?.(event)\n emit('day-mouse-enter', date)\n}\n\nfunction onKeydown(\n date: DateStringValue,\n rowIndex: number,\n cellIndex: number,\n event: KeyboardEvent,\n) {\n const controlProps = dayProps(date)\n ;(controlProps.onKeydown ?? controlProps.onKeyDown)?.(event)\n const direction = keyToDirection(event.key)\n if (direction) {\n event.preventDefault()\n focusAdjacentControl(dayRefs, rowIndex, cellIndex, direction)\n }\n}\n</script>\n\n<template>\n <table :class=\"classes.month\" :data-full-width=\"props.fullWidth || undefined\">\n <thead v-if=\"!props.hideWeekdays\">\n <WeekdaysRow\n :first-day-of-week=\"firstDay\"\n :weekend-days=\"props.weekendDays\"\n :locale=\"props.locale\"\n :weekday-format=\"props.weekdayFormat\"\n :with-week-numbers=\"props.withWeekNumbers\"\n />\n </thead>\n <tbody>\n <tr v-for=\"(week, rowIndex) in rows\" :key=\"week[0]\" :class=\"classes.monthRow\">\n <td v-if=\"props.withWeekNumbers\" :class=\"classes.weekNumber\">\n {{ getWeekNumber(week[0]) }}\n </td>\n <td\n v-for=\"(date, cellIndex) in week\"\n :key=\"date\"\n :class=\"classes.monthCell\"\n :data-with-spacing=\"props.withCellSpacing || undefined\"\n >\n <Day\n v-bind=\"dayAttributes(date)\"\n :ref=\"(node: any) => setGridRef(dayRefs, rowIndex, cellIndex, node)\"\n :date=\"date\"\n :static=\"props.static\"\n :disabled=\"baseDisabled(date) || dayProps(date).disabled\"\n :weekend=\"(props.weekendDays ?? context.weekendDays).includes(dayjs(date).day())\"\n :outside=\"outside(date)\"\n :hidden=\"props.hideOutsideDates && outside(date)\"\n :selected=\"selected(date)\"\n :in-range=\"inRange(date)\"\n :first-in-range=\"rangeStart(date)\"\n :last-in-range=\"rangeEnd(date)\"\n :highlight-today=\"props.highlightToday\"\n :full-width=\"props.fullWidth\"\n :render-day=\"renderDay\"\n :aria-label=\"dayAriaLabel(date)\"\n :tabindex=\"props.static ? undefined : date === dateInTabOrder ? 0 : -1\"\n :data-autofocus=\"selected(date) || undefined\"\n @click=\"onClick(date, $event)\"\n @mouseenter=\"onMouseEnter(date, $event)\"\n @keydown=\"onKeydown(date, rowIndex, cellIndex, $event)\"\n />\n </td>\n </tr>\n </tbody>\n </table>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed } from 'vue'\nimport { SimpleGrid } from '@mantine-vue/core'\nimport PickerControl from '../PickerControl/PickerControl.vue'\nimport { focusAdjacentControl, keyToDirection, setGridRef } from '../../utils'\nimport type { DateStringValue, MonthsListEmits, MonthsListProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'MonthsList' })\nconst props = withDefaults(defineProps<MonthsListProps>(), {\n year: () => dayjs().format('YYYY-MM-DD'),\n monthsListFormat: 'MMM',\n fullWidth: false,\n})\nconst emit = defineEmits<MonthsListEmits>()\nconst controlRefs: (HTMLElement | null | undefined)[][] = []\nconst months = computed(() =>\n Array.from({ length: 12 }, (_, index) =>\n dayjs(props.year).month(index).startOf('month').format('YYYY-MM-DD'),\n ),\n)\nconst controlProps = (date: DateStringValue) => props.getMonthControlProps?.(date) || {}\nconst enabled = (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 controlProps(date).disabled\n )\nconst selected = (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')\nconst tabDate = computed(\n () =>\n months.value.filter(enabled).find(selected) ??\n months.value.filter(enabled).find((date) => dayjs().isSame(date, 'month')) ??\n months.value.filter(enabled)[0],\n)\nconst label = (date: DateStringValue) =>\n typeof props.monthsListFormat === 'function'\n ? props.monthsListFormat(date)\n : dayjs(date)\n .locale(props.locale || 'en')\n .format(props.monthsListFormat)\nfunction onClick(date: DateStringValue, event: MouseEvent) {\n controlProps(date).onClick?.(event)\n if (enabled(date)) emit('month-select', date)\n}\nfunction onMouseEnter(date: DateStringValue, event: MouseEvent) {\n controlProps(date).onMouseenter?.(event)\n emit('month-mouse-enter', date)\n}\nfunction onKeydown(date: DateStringValue, index: number, event: KeyboardEvent) {\n controlProps(date).onKeydown?.(event)\n const direction = keyToDirection(event.key)\n if (direction) {\n event.preventDefault()\n focusAdjacentControl(controlRefs, Math.floor(index / 3), index % 3, direction)\n }\n}\n</script>\n\n<template>\n <SimpleGrid\n :cols=\"3\"\n :spacing=\"4\"\n :class=\"classes.controlsGrid\"\n :data-full-width=\"props.fullWidth || undefined\"\n >\n <PickerControl\n v-for=\"(date, index) in months\"\n :key=\"date\"\n v-bind=\"controlProps(date)\"\n :ref=\"(node: any) => setGridRef(controlRefs, Math.floor(index / 3), index % 3, node)\"\n :full-width=\"props.fullWidth\"\n :disabled=\"!enabled(date) || controlProps(date).disabled\"\n :selected=\"selected(date)\"\n :tabindex=\"date === tabDate ? 0 : -1\"\n :data-autofocus=\"selected(date) || undefined\"\n @click=\"onClick(date, $event)\"\n @mouseenter=\"onMouseEnter(date, $event)\"\n @keydown=\"onKeydown(date, index, $event)\"\n >{{ label(date) }}</PickerControl\n >\n </SimpleGrid>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed } from 'vue'\nimport { SimpleGrid } from '@mantine-vue/core'\nimport PickerControl from '../PickerControl/PickerControl.vue'\nimport { focusAdjacentControl, keyToDirection, setGridRef } from '../../utils'\nimport type { DateStringValue, MonthsListEmits, MonthsListProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'MonthsList' })\nconst props = withDefaults(defineProps<MonthsListProps>(), {\n year: () => dayjs().format('YYYY-MM-DD'),\n monthsListFormat: 'MMM',\n fullWidth: false,\n})\nconst emit = defineEmits<MonthsListEmits>()\nconst controlRefs: (HTMLElement | null | undefined)[][] = []\nconst months = computed(() =>\n Array.from({ length: 12 }, (_, index) =>\n dayjs(props.year).month(index).startOf('month').format('YYYY-MM-DD'),\n ),\n)\nconst controlProps = (date: DateStringValue) => props.getMonthControlProps?.(date) || {}\nconst enabled = (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 controlProps(date).disabled\n )\nconst selected = (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')\nconst tabDate = computed(\n () =>\n months.value.filter(enabled).find(selected) ??\n months.value.filter(enabled).find((date) => dayjs().isSame(date, 'month')) ??\n months.value.filter(enabled)[0],\n)\nconst label = (date: DateStringValue) =>\n typeof props.monthsListFormat === 'function'\n ? props.monthsListFormat(date)\n : dayjs(date)\n .locale(props.locale || 'en')\n .format(props.monthsListFormat)\nfunction onClick(date: DateStringValue, event: MouseEvent) {\n controlProps(date).onClick?.(event)\n if (enabled(date)) emit('month-select', date)\n}\nfunction onMouseEnter(date: DateStringValue, event: MouseEvent) {\n controlProps(date).onMouseenter?.(event)\n emit('month-mouse-enter', date)\n}\nfunction onKeydown(date: DateStringValue, index: number, event: KeyboardEvent) {\n controlProps(date).onKeydown?.(event)\n const direction = keyToDirection(event.key)\n if (direction) {\n event.preventDefault()\n focusAdjacentControl(controlRefs, Math.floor(index / 3), index % 3, direction)\n }\n}\n</script>\n\n<template>\n <SimpleGrid\n :cols=\"3\"\n :spacing=\"4\"\n :class=\"classes.controlsGrid\"\n :data-full-width=\"props.fullWidth || undefined\"\n >\n <PickerControl\n v-for=\"(date, index) in months\"\n :key=\"date\"\n v-bind=\"controlProps(date)\"\n :ref=\"(node: any) => setGridRef(controlRefs, Math.floor(index / 3), index % 3, node)\"\n :full-width=\"props.fullWidth\"\n :disabled=\"!enabled(date) || controlProps(date).disabled\"\n :selected=\"selected(date)\"\n :tabindex=\"date === tabDate ? 0 : -1\"\n :data-autofocus=\"selected(date) || undefined\"\n @click=\"onClick(date, $event)\"\n @mouseenter=\"onMouseEnter(date, $event)\"\n @keydown=\"onKeydown(date, index, $event)\"\n >{{ label(date) }}</PickerControl\n >\n </SimpleGrid>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed } from 'vue'\nimport { SimpleGrid } from '@mantine-vue/core'\nimport PickerControl from '../PickerControl/PickerControl.vue'\nimport { focusAdjacentControl, getYearRange, keyToDirection, setGridRef } from '../../utils'\nimport type { DateStringValue, YearsListEmits, YearsListProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'YearsList' })\nconst props = withDefaults(defineProps<YearsListProps>(), {\n decade: () => dayjs().format('YYYY-MM-DD'),\n yearsListFormat: 'YYYY',\n fullWidth: false,\n})\nconst emit = defineEmits<YearsListEmits>()\nconst controlRefs: (HTMLElement | null | undefined)[][] = []\nconst years = computed(() => getYearRange(props.decade))\nconst controlProps = (date: DateStringValue) => props.getYearControlProps?.(date) || {}\nconst enabled = (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 controlProps(date).disabled\n )\nconst selected = (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')\nconst tabDate = computed(\n () =>\n years.value.filter(enabled).find(selected) ??\n years.value.filter(enabled).find((date) => dayjs().isSame(date, 'year')) ??\n years.value.filter(enabled)[0],\n)\nconst label = (date: DateStringValue) =>\n typeof props.yearsListFormat === 'function'\n ? props.yearsListFormat(date)\n : dayjs(date).format(props.yearsListFormat)\nfunction onClick(date: DateStringValue, event: MouseEvent) {\n controlProps(date).onClick?.(event)\n if (enabled(date)) emit('year-select', date)\n}\nfunction onMouseEnter(date: DateStringValue, event: MouseEvent) {\n controlProps(date).onMouseenter?.(event)\n emit('year-mouse-enter', date)\n}\nfunction onKeydown(date: DateStringValue, index: number, event: KeyboardEvent) {\n controlProps(date).onKeydown?.(event)\n const direction = keyToDirection(event.key)\n if (direction) {\n event.preventDefault()\n focusAdjacentControl(controlRefs, Math.floor(index / 3), index % 3, direction)\n }\n}\n</script>\n\n<template>\n <SimpleGrid\n :cols=\"3\"\n :spacing=\"4\"\n :class=\"classes.controlsGrid\"\n :data-full-width=\"props.fullWidth || undefined\"\n >\n <PickerControl\n v-for=\"(date, index) in years\"\n :key=\"date\"\n v-bind=\"controlProps(date)\"\n :ref=\"(node: any) => setGridRef(controlRefs, Math.floor(index / 3), index % 3, node)\"\n :full-width=\"props.fullWidth\"\n :disabled=\"!enabled(date) || controlProps(date).disabled\"\n :selected=\"selected(date)\"\n :tabindex=\"date === tabDate ? 0 : -1\"\n :data-autofocus=\"selected(date) || undefined\"\n @click=\"onClick(date, $event)\"\n @mouseenter=\"onMouseEnter(date, $event)\"\n @keydown=\"onKeydown(date, index, $event)\"\n >{{ label(date) }}</PickerControl\n >\n </SimpleGrid>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed } from 'vue'\nimport { SimpleGrid } from '@mantine-vue/core'\nimport PickerControl from '../PickerControl/PickerControl.vue'\nimport { focusAdjacentControl, getYearRange, keyToDirection, setGridRef } from '../../utils'\nimport type { DateStringValue, YearsListEmits, YearsListProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'YearsList' })\nconst props = withDefaults(defineProps<YearsListProps>(), {\n decade: () => dayjs().format('YYYY-MM-DD'),\n yearsListFormat: 'YYYY',\n fullWidth: false,\n})\nconst emit = defineEmits<YearsListEmits>()\nconst controlRefs: (HTMLElement | null | undefined)[][] = []\nconst years = computed(() => getYearRange(props.decade))\nconst controlProps = (date: DateStringValue) => props.getYearControlProps?.(date) || {}\nconst enabled = (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 controlProps(date).disabled\n )\nconst selected = (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')\nconst tabDate = computed(\n () =>\n years.value.filter(enabled).find(selected) ??\n years.value.filter(enabled).find((date) => dayjs().isSame(date, 'year')) ??\n years.value.filter(enabled)[0],\n)\nconst label = (date: DateStringValue) =>\n typeof props.yearsListFormat === 'function'\n ? props.yearsListFormat(date)\n : dayjs(date).format(props.yearsListFormat)\nfunction onClick(date: DateStringValue, event: MouseEvent) {\n controlProps(date).onClick?.(event)\n if (enabled(date)) emit('year-select', date)\n}\nfunction onMouseEnter(date: DateStringValue, event: MouseEvent) {\n controlProps(date).onMouseenter?.(event)\n emit('year-mouse-enter', date)\n}\nfunction onKeydown(date: DateStringValue, index: number, event: KeyboardEvent) {\n controlProps(date).onKeydown?.(event)\n const direction = keyToDirection(event.key)\n if (direction) {\n event.preventDefault()\n focusAdjacentControl(controlRefs, Math.floor(index / 3), index % 3, direction)\n }\n}\n</script>\n\n<template>\n <SimpleGrid\n :cols=\"3\"\n :spacing=\"4\"\n :class=\"classes.controlsGrid\"\n :data-full-width=\"props.fullWidth || undefined\"\n >\n <PickerControl\n v-for=\"(date, index) in years\"\n :key=\"date\"\n v-bind=\"controlProps(date)\"\n :ref=\"(node: any) => setGridRef(controlRefs, Math.floor(index / 3), index % 3, node)\"\n :full-width=\"props.fullWidth\"\n :disabled=\"!enabled(date) || controlProps(date).disabled\"\n :selected=\"selected(date)\"\n :tabindex=\"date === tabDate ? 0 : -1\"\n :data-autofocus=\"selected(date) || undefined\"\n @click=\"onClick(date, $event)\"\n @mouseenter=\"onMouseEnter(date, $event)\"\n @keydown=\"onKeydown(date, index, $event)\"\n >{{ label(date) }}</PickerControl\n >\n </SimpleGrid>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, getCurrentInstance, useAttrs } from 'vue'\nimport { Box } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport CalendarHeader from '../CalendarHeader/CalendarHeader.vue'\nimport Month from '../Month/Month.vue'\nimport MonthsList from '../MonthsList/MonthsList.vue'\nimport YearsList from '../YearsList/YearsList.vue'\nimport {\n getDecadeLabel,\n getDefaultClampedDate,\n getMonthLabel,\n getYearRange,\n toDateString,\n} from '../../utils'\nimport type { CalendarLevel, CalendarProps, DateStringValue, RenderDaySlots } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'Calendar', inheritAttrs: false })\nconst props = withDefaults(defineProps<CalendarProps>(), {\n maxLevel: 'decade',\n minLevel: 'month',\n numberOfColumns: 1,\n type: 'default',\n monthLabelFormat: 'MMMM YYYY',\n yearLabelFormat: 'YYYY',\n monthsListFormat: 'MMM',\n yearsListFormat: 'YYYY',\n hideOutsideDates: false,\n hideWeekdays: false,\n withCellSpacing: true,\n highlightToday: false,\n withWeekNumbers: false,\n static: false,\n fullWidth: false,\n withNativeLevelSelect: false,\n})\nconst emit = defineEmits<{\n 'update:level': [value: CalendarLevel]\n 'level-change': [value: CalendarLevel]\n 'update:date': [value: DateStringValue]\n 'date-change': [value: DateStringValue]\n 'day-click': [date: DateStringValue]\n 'day-mouse-enter': [date: DateStringValue]\n 'month-select': [date: DateStringValue]\n 'month-mouse-enter': [date: DateStringValue]\n 'year-select': [date: DateStringValue]\n 'year-mouse-enter': [date: DateStringValue]\n}>()\nconst slots = defineSlots<RenderDaySlots>()\nconst attrs = useAttrs()\nconst instance = getCurrentInstance()\nconst order: CalendarLevel[] = ['month', 'year', 'decade']\nconst clampLevel = (level?: CalendarLevel) =>\n order[\n Math.max(\n order.indexOf(props.minLevel),\n Math.min(order.indexOf(props.maxLevel), level ? order.indexOf(level) : 0),\n )\n ]\nconst nextLevel = (level: CalendarLevel) => order[Math.min(2, order.indexOf(level) + 1)]\nconst [level, setLevel] = useUncontrolled<CalendarLevel>({\n value: computed(() => (props.level === undefined ? undefined : clampLevel(props.level))),\n defaultValue: props.defaultLevel === undefined ? undefined : clampLevel(props.defaultLevel),\n finalValue: clampLevel(),\n onChange: (value) => {\n emit('update:level', value)\n emit('level-change', value)\n },\n})\nconst [date, setDate] = useUncontrolled<DateStringValue>({\n value: computed(() => toDateString(props.date) || undefined),\n defaultValue: toDateString(props.defaultDate) || undefined,\n finalValue: getDefaultClampedDate({ minDate: props.minDate, maxDate: props.maxDate }),\n onChange: (value) => {\n emit('update:date', value)\n emit('date-change', value)\n },\n})\nconst scroll = computed(() => props.columnsToScroll || props.numberOfColumns || 1)\nconst columns = computed(() =>\n Array.from({ length: props.numberOfColumns || 1 }, (_, column) => {\n const multiplier = level.value === 'decade' ? 10 : 1\n const unit = level.value === 'month' ? 'month' : 'year'\n return dayjs(date.value)\n .add(column * multiplier, unit)\n .format('YYYY-MM-DD')\n }),\n)\nconst hasDateListener = () => {\n const vnodeProps = instance?.vnode.props\n return !!(\n vnodeProps?.['onUpdate:date'] ||\n vnodeProps?.onDateChange ||\n vnodeProps?.['onDate-change']\n )\n}\nconst updateDate = (amount: number, unit: 'month' | 'year') =>\n setDate(dayjs(date.value).add(amount, unit).format('YYYY-MM-DD'))\nconst monthLabel = (value: DateStringValue) =>\n typeof props.monthLabelFormat === 'function'\n ? props.monthLabelFormat(value)\n : getMonthLabel(value, props.monthLabelFormat, props.locale)\nconst yearLabel = (value: DateStringValue) =>\n typeof props.yearLabelFormat === 'function'\n ? props.yearLabelFormat(value)\n : dayjs(value).format(props.yearLabelFormat)\nconst decadeLabel = (value: DateStringValue) => {\n const years = getYearRange(value)\n return props.decadeLabelFormat?.(years[0], years.at(-1)!) ?? getDecadeLabel(value)\n}\nconst renderDay =\n props.renderDay ??\n ((slots.renderDay ?? slots.day)\n ? (value: DateStringValue) => (slots.renderDay ?? slots.day)?.({ date: value })\n : undefined)\nfunction selectMonth(value: DateStringValue) {\n setDate(value)\n emit('month-select', value)\n setLevel(clampLevel('month'))\n}\nfunction selectYear(value: DateStringValue) {\n setDate(value)\n emit('year-select', value)\n setLevel(clampLevel('year'))\n}\n</script>\n\n<template>\n <Box\n v-bind=\"attrs\"\n :class=\"[classes.calendar, attrs.class]\"\n data-calendar\n :data-full-width=\"props.fullWidth || undefined\"\n >\n <div v-for=\"(currentDate, column) in columns\" :key=\"currentDate\" :class=\"classes.calendarLevel\">\n <template v-if=\"level === 'month'\">\n <CalendarHeader\n :label=\"monthLabel(currentDate)\"\n :has-next-level=\"props.maxLevel !== 'month'\"\n :with-previous=\"column === 0\"\n :with-next=\"column === columns.length - 1\"\n :full-width=\"props.fullWidth\"\n :with-native-level-select=\"props.withNativeLevelSelect\"\n :years-select-range=\"props.yearsSelectRange\"\n calendar-level=\"month\"\n :date=\"currentDate\"\n :locale=\"props.locale\"\n :min-date=\"props.minDate\"\n :max-date=\"props.maxDate\"\n :disable-native-level-select=\"props.date !== undefined && !hasDateListener()\"\n @date-change=\"setDate\"\n @previous=\"updateDate(-scroll, 'month')\"\n @next=\"updateDate(scroll, 'month')\"\n @level-click=\"setLevel(nextLevel(level))\"\n />\n <Month\n :month=\"currentDate\"\n :value=\"props.value\"\n :type=\"props.type\"\n :min-date=\"props.minDate\"\n :max-date=\"props.maxDate\"\n :first-day-of-week=\"props.firstDayOfWeek\"\n :weekend-days=\"props.weekendDays\"\n :locale=\"props.locale\"\n :weekday-format=\"props.weekdayFormat\"\n :render-day=\"renderDay\"\n :get-day-props=\"props.getDayProps\"\n :get-day-aria-label=\"props.getDayAriaLabel\"\n :exclude-date=\"props.excludeDate\"\n :hide-outside-dates=\"props.hideOutsideDates\"\n :hide-weekdays=\"props.hideWeekdays\"\n :with-cell-spacing=\"props.withCellSpacing\"\n :highlight-today=\"props.highlightToday\"\n :with-week-numbers=\"props.withWeekNumbers\"\n :static=\"props.static\"\n :full-width=\"props.fullWidth\"\n @day-click=\"(date) => emit('day-click', date)\"\n @day-mouse-enter=\"(date) => emit('day-mouse-enter', date)\"\n />\n </template>\n <template v-else-if=\"level === 'year'\">\n <CalendarHeader\n :label=\"yearLabel(currentDate)\"\n :has-next-level=\"props.maxLevel === 'decade'\"\n :with-previous=\"column === 0\"\n :with-next=\"column === columns.length - 1\"\n :full-width=\"props.fullWidth\"\n :with-native-level-select=\"props.withNativeLevelSelect\"\n :years-select-range=\"props.yearsSelectRange\"\n calendar-level=\"year\"\n :date=\"currentDate\"\n :locale=\"props.locale\"\n :min-date=\"props.minDate\"\n :max-date=\"props.maxDate\"\n :disable-native-level-select=\"props.date !== undefined && !hasDateListener()\"\n @date-change=\"setDate\"\n @previous=\"updateDate(-scroll, 'year')\"\n @next=\"updateDate(scroll, 'year')\"\n @level-click=\"setLevel(nextLevel(level))\"\n />\n <MonthsList\n :year=\"currentDate\"\n :value=\"props.value\"\n :min-date=\"props.minDate\"\n :max-date=\"props.maxDate\"\n :months-list-format=\"props.monthsListFormat\"\n :get-month-control-props=\"props.getMonthControlProps\"\n :full-width=\"props.fullWidth\"\n @month-mouse-enter=\"(date) => emit('month-mouse-enter', date)\"\n @month-select=\"selectMonth\"\n />\n </template>\n <template v-else>\n <CalendarHeader\n :label=\"decadeLabel(currentDate)\"\n :with-previous=\"column === 0\"\n :with-next=\"column === columns.length - 1\"\n :has-next-level=\"false\"\n :full-width=\"props.fullWidth\"\n @previous=\"updateDate(-10 * scroll, 'year')\"\n @next=\"updateDate(10 * scroll, 'year')\"\n />\n <YearsList\n :decade=\"currentDate\"\n :value=\"props.value\"\n :min-date=\"props.minDate\"\n :max-date=\"props.maxDate\"\n :years-list-format=\"props.yearsListFormat\"\n :get-year-control-props=\"props.getYearControlProps\"\n :full-width=\"props.fullWidth\"\n @year-mouse-enter=\"(date) => emit('year-mouse-enter', date)\"\n @year-select=\"selectYear\"\n />\n </template>\n </div>\n </Box>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, getCurrentInstance, useAttrs } from 'vue'\nimport { Box } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport CalendarHeader from '../CalendarHeader/CalendarHeader.vue'\nimport Month from '../Month/Month.vue'\nimport MonthsList from '../MonthsList/MonthsList.vue'\nimport YearsList from '../YearsList/YearsList.vue'\nimport {\n getDecadeLabel,\n getDefaultClampedDate,\n getMonthLabel,\n getYearRange,\n toDateString,\n} from '../../utils'\nimport type { CalendarLevel, CalendarProps, DateStringValue, RenderDaySlots } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'Calendar', inheritAttrs: false })\nconst props = withDefaults(defineProps<CalendarProps>(), {\n maxLevel: 'decade',\n minLevel: 'month',\n numberOfColumns: 1,\n type: 'default',\n monthLabelFormat: 'MMMM YYYY',\n yearLabelFormat: 'YYYY',\n monthsListFormat: 'MMM',\n yearsListFormat: 'YYYY',\n hideOutsideDates: false,\n hideWeekdays: false,\n withCellSpacing: true,\n highlightToday: false,\n withWeekNumbers: false,\n static: false,\n fullWidth: false,\n withNativeLevelSelect: false,\n})\nconst emit = defineEmits<{\n 'update:level': [value: CalendarLevel]\n 'level-change': [value: CalendarLevel]\n 'update:date': [value: DateStringValue]\n 'date-change': [value: DateStringValue]\n 'day-click': [date: DateStringValue]\n 'day-mouse-enter': [date: DateStringValue]\n 'month-select': [date: DateStringValue]\n 'month-mouse-enter': [date: DateStringValue]\n 'year-select': [date: DateStringValue]\n 'year-mouse-enter': [date: DateStringValue]\n}>()\nconst slots = defineSlots<RenderDaySlots>()\nconst attrs = useAttrs()\nconst instance = getCurrentInstance()\nconst order: CalendarLevel[] = ['month', 'year', 'decade']\nconst clampLevel = (level?: CalendarLevel) =>\n order[\n Math.max(\n order.indexOf(props.minLevel),\n Math.min(order.indexOf(props.maxLevel), level ? order.indexOf(level) : 0),\n )\n ]\nconst nextLevel = (level: CalendarLevel) => order[Math.min(2, order.indexOf(level) + 1)]\nconst [level, setLevel] = useUncontrolled<CalendarLevel>({\n value: computed(() => (props.level === undefined ? undefined : clampLevel(props.level))),\n defaultValue: props.defaultLevel === undefined ? undefined : clampLevel(props.defaultLevel),\n finalValue: clampLevel(),\n onChange: (value) => {\n emit('update:level', value)\n emit('level-change', value)\n },\n})\nconst [date, setDate] = useUncontrolled<DateStringValue>({\n value: computed(() => toDateString(props.date) || undefined),\n defaultValue: toDateString(props.defaultDate) || undefined,\n finalValue: getDefaultClampedDate({ minDate: props.minDate, maxDate: props.maxDate }),\n onChange: (value) => {\n emit('update:date', value)\n emit('date-change', value)\n },\n})\nconst scroll = computed(() => props.columnsToScroll || props.numberOfColumns || 1)\nconst columns = computed(() =>\n Array.from({ length: props.numberOfColumns || 1 }, (_, column) => {\n const multiplier = level.value === 'decade' ? 10 : 1\n const unit = level.value === 'month' ? 'month' : 'year'\n return dayjs(date.value)\n .add(column * multiplier, unit)\n .format('YYYY-MM-DD')\n }),\n)\nconst hasDateListener = () => {\n const vnodeProps = instance?.vnode.props\n return !!(\n vnodeProps?.['onUpdate:date'] ||\n vnodeProps?.onDateChange ||\n vnodeProps?.['onDate-change']\n )\n}\nconst updateDate = (amount: number, unit: 'month' | 'year') =>\n setDate(dayjs(date.value).add(amount, unit).format('YYYY-MM-DD'))\nconst monthLabel = (value: DateStringValue) =>\n typeof props.monthLabelFormat === 'function'\n ? props.monthLabelFormat(value)\n : getMonthLabel(value, props.monthLabelFormat, props.locale)\nconst yearLabel = (value: DateStringValue) =>\n typeof props.yearLabelFormat === 'function'\n ? props.yearLabelFormat(value)\n : dayjs(value).format(props.yearLabelFormat)\nconst decadeLabel = (value: DateStringValue) => {\n const years = getYearRange(value)\n return props.decadeLabelFormat?.(years[0], years.at(-1)!) ?? getDecadeLabel(value)\n}\nconst renderDay =\n props.renderDay ??\n ((slots.renderDay ?? slots.day)\n ? (value: DateStringValue) => (slots.renderDay ?? slots.day)?.({ date: value })\n : undefined)\nfunction selectMonth(value: DateStringValue) {\n setDate(value)\n emit('month-select', value)\n setLevel(clampLevel('month'))\n}\nfunction selectYear(value: DateStringValue) {\n setDate(value)\n emit('year-select', value)\n setLevel(clampLevel('year'))\n}\n</script>\n\n<template>\n <Box\n v-bind=\"attrs\"\n :class=\"[classes.calendar, attrs.class]\"\n data-calendar\n :data-full-width=\"props.fullWidth || undefined\"\n >\n <div v-for=\"(currentDate, column) in columns\" :key=\"currentDate\" :class=\"classes.calendarLevel\">\n <template v-if=\"level === 'month'\">\n <CalendarHeader\n :label=\"monthLabel(currentDate)\"\n :has-next-level=\"props.maxLevel !== 'month'\"\n :with-previous=\"column === 0\"\n :with-next=\"column === columns.length - 1\"\n :full-width=\"props.fullWidth\"\n :with-native-level-select=\"props.withNativeLevelSelect\"\n :years-select-range=\"props.yearsSelectRange\"\n calendar-level=\"month\"\n :date=\"currentDate\"\n :locale=\"props.locale\"\n :min-date=\"props.minDate\"\n :max-date=\"props.maxDate\"\n :disable-native-level-select=\"props.date !== undefined && !hasDateListener()\"\n @date-change=\"setDate\"\n @previous=\"updateDate(-scroll, 'month')\"\n @next=\"updateDate(scroll, 'month')\"\n @level-click=\"setLevel(nextLevel(level))\"\n />\n <Month\n :month=\"currentDate\"\n :value=\"props.value\"\n :type=\"props.type\"\n :min-date=\"props.minDate\"\n :max-date=\"props.maxDate\"\n :first-day-of-week=\"props.firstDayOfWeek\"\n :weekend-days=\"props.weekendDays\"\n :locale=\"props.locale\"\n :weekday-format=\"props.weekdayFormat\"\n :render-day=\"renderDay\"\n :get-day-props=\"props.getDayProps\"\n :get-day-aria-label=\"props.getDayAriaLabel\"\n :exclude-date=\"props.excludeDate\"\n :hide-outside-dates=\"props.hideOutsideDates\"\n :hide-weekdays=\"props.hideWeekdays\"\n :with-cell-spacing=\"props.withCellSpacing\"\n :highlight-today=\"props.highlightToday\"\n :with-week-numbers=\"props.withWeekNumbers\"\n :static=\"props.static\"\n :full-width=\"props.fullWidth\"\n @day-click=\"(date) => emit('day-click', date)\"\n @day-mouse-enter=\"(date) => emit('day-mouse-enter', date)\"\n />\n </template>\n <template v-else-if=\"level === 'year'\">\n <CalendarHeader\n :label=\"yearLabel(currentDate)\"\n :has-next-level=\"props.maxLevel === 'decade'\"\n :with-previous=\"column === 0\"\n :with-next=\"column === columns.length - 1\"\n :full-width=\"props.fullWidth\"\n :with-native-level-select=\"props.withNativeLevelSelect\"\n :years-select-range=\"props.yearsSelectRange\"\n calendar-level=\"year\"\n :date=\"currentDate\"\n :locale=\"props.locale\"\n :min-date=\"props.minDate\"\n :max-date=\"props.maxDate\"\n :disable-native-level-select=\"props.date !== undefined && !hasDateListener()\"\n @date-change=\"setDate\"\n @previous=\"updateDate(-scroll, 'year')\"\n @next=\"updateDate(scroll, 'year')\"\n @level-click=\"setLevel(nextLevel(level))\"\n />\n <MonthsList\n :year=\"currentDate\"\n :value=\"props.value\"\n :min-date=\"props.minDate\"\n :max-date=\"props.maxDate\"\n :months-list-format=\"props.monthsListFormat\"\n :get-month-control-props=\"props.getMonthControlProps\"\n :full-width=\"props.fullWidth\"\n @month-mouse-enter=\"(date) => emit('month-mouse-enter', date)\"\n @month-select=\"selectMonth\"\n />\n </template>\n <template v-else>\n <CalendarHeader\n :label=\"decadeLabel(currentDate)\"\n :with-previous=\"column === 0\"\n :with-next=\"column === columns.length - 1\"\n :has-next-level=\"false\"\n :full-width=\"props.fullWidth\"\n @previous=\"updateDate(-10 * scroll, 'year')\"\n @next=\"updateDate(10 * scroll, 'year')\"\n />\n <YearsList\n :decade=\"currentDate\"\n :value=\"props.value\"\n :min-date=\"props.minDate\"\n :max-date=\"props.maxDate\"\n :years-list-format=\"props.yearsListFormat\"\n :get-year-control-props=\"props.getYearControlProps\"\n :full-width=\"props.fullWidth\"\n @year-mouse-enter=\"(date) => emit('year-mouse-enter', date)\"\n @year-select=\"selectYear\"\n />\n </template>\n </div>\n </Box>\n</template>\n","import { computed, getCurrentInstance, type ComputedRef } from 'vue'\n\nfunction kebabCase(value: string) {\n return value.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase()\n}\n\n/**\n * Forwards only props that were actually supplied by the consumer. This is important for\n * adapter components because Vue casts absent Boolean props to `false`, which must not shadow\n * defaults owned by the implementation component.\n */\nexport function useForwardedProps<Props extends object>(props: Props): ComputedRef<Props> {\n const instance = getCurrentInstance()\n\n return computed(() => {\n const rawProps = instance?.vnode.props ?? {}\n const result: Partial<Props> = {}\n\n for (const key of Object.keys(props) as Array<keyof Props & string>) {\n if (key in rawProps || kebabCase(key) in rawProps) {\n result[key] = props[key]\n }\n }\n\n return result as Props\n })\n}\n","<script setup lang=\"ts\">\nimport { useAttrs, useSlots } from 'vue'\nimport LegacyComponent from '../Calendar/Calendar.vue'\nimport { useForwardedProps } from '../../utils/use-forwarded-props'\nimport type { CalendarProps } from '../../types'\n\ndefineOptions({\n name: 'MonthLevel',\n inheritAttrs: false,\n})\n\nconst props = defineProps<CalendarProps>()\nconst emit = defineEmits<{\n 'update:level': [value: any]\n 'level-change': [value: any]\n 'update:date': [value: any]\n 'date-change': [value: any]\n}>()\nconst attrs = useAttrs()\nconst slots = useSlots()\nconst forwardedProps = useForwardedProps(props)\n</script>\n\n<template>\n <LegacyComponent\n v-bind=\"{ ...attrs, ...forwardedProps }\"\n @update:level=\"emit('update:level', $event)\"\n @level-change=\"emit('level-change', $event)\"\n @update:date=\"emit('update:date', $event)\"\n @date-change=\"emit('date-change', $event)\"\n >\n <template v-for=\"(_, name) in slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps || {}\" />\n </template>\n </LegacyComponent>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs, useSlots } from 'vue'\nimport LegacyComponent from '../Calendar/Calendar.vue'\nimport { useForwardedProps } from '../../utils/use-forwarded-props'\nimport type { CalendarProps } from '../../types'\n\ndefineOptions({\n name: 'MonthLevel',\n inheritAttrs: false,\n})\n\nconst props = defineProps<CalendarProps>()\nconst emit = defineEmits<{\n 'update:level': [value: any]\n 'level-change': [value: any]\n 'update:date': [value: any]\n 'date-change': [value: any]\n}>()\nconst attrs = useAttrs()\nconst slots = useSlots()\nconst forwardedProps = useForwardedProps(props)\n</script>\n\n<template>\n <LegacyComponent\n v-bind=\"{ ...attrs, ...forwardedProps }\"\n @update:level=\"emit('update:level', $event)\"\n @level-change=\"emit('level-change', $event)\"\n @update:date=\"emit('update:date', $event)\"\n @date-change=\"emit('date-change', $event)\"\n >\n <template v-for=\"(_, name) in slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps || {}\" />\n </template>\n </LegacyComponent>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs, useSlots } from 'vue'\nimport LegacyComponent from '../Calendar/Calendar.vue'\nimport { useForwardedProps } from '../../utils/use-forwarded-props'\nimport type { CalendarProps } from '../../types'\n\ndefineOptions({\n name: 'YearLevel',\n inheritAttrs: false,\n})\n\nconst props = defineProps<CalendarProps>()\nconst emit = defineEmits<{\n 'update:level': [value: any]\n 'level-change': [value: any]\n 'update:date': [value: any]\n 'date-change': [value: any]\n}>()\nconst attrs = useAttrs()\nconst slots = useSlots()\nconst forwardedProps = useForwardedProps(props)\n</script>\n\n<template>\n <LegacyComponent\n v-bind=\"{ ...attrs, ...forwardedProps }\"\n @update:level=\"emit('update:level', $event)\"\n @level-change=\"emit('level-change', $event)\"\n @update:date=\"emit('update:date', $event)\"\n @date-change=\"emit('date-change', $event)\"\n >\n <template v-for=\"(_, name) in slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps || {}\" />\n </template>\n </LegacyComponent>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs, useSlots } from 'vue'\nimport LegacyComponent from '../Calendar/Calendar.vue'\nimport { useForwardedProps } from '../../utils/use-forwarded-props'\nimport type { CalendarProps } from '../../types'\n\ndefineOptions({\n name: 'YearLevel',\n inheritAttrs: false,\n})\n\nconst props = defineProps<CalendarProps>()\nconst emit = defineEmits<{\n 'update:level': [value: any]\n 'level-change': [value: any]\n 'update:date': [value: any]\n 'date-change': [value: any]\n}>()\nconst attrs = useAttrs()\nconst slots = useSlots()\nconst forwardedProps = useForwardedProps(props)\n</script>\n\n<template>\n <LegacyComponent\n v-bind=\"{ ...attrs, ...forwardedProps }\"\n @update:level=\"emit('update:level', $event)\"\n @level-change=\"emit('level-change', $event)\"\n @update:date=\"emit('update:date', $event)\"\n @date-change=\"emit('date-change', $event)\"\n >\n <template v-for=\"(_, name) in slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps || {}\" />\n </template>\n </LegacyComponent>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs, useSlots } from 'vue'\nimport LegacyComponent from '../Calendar/Calendar.vue'\nimport { useForwardedProps } from '../../utils/use-forwarded-props'\nimport type { CalendarProps } from '../../types'\n\ndefineOptions({\n name: 'DecadeLevel',\n inheritAttrs: false,\n})\n\nconst props = defineProps<CalendarProps>()\nconst emit = defineEmits<{\n 'update:level': [value: any]\n 'level-change': [value: any]\n 'update:date': [value: any]\n 'date-change': [value: any]\n}>()\nconst attrs = useAttrs()\nconst slots = useSlots()\nconst forwardedProps = useForwardedProps(props)\n</script>\n\n<template>\n <LegacyComponent\n v-bind=\"{ ...attrs, ...forwardedProps }\"\n @update:level=\"emit('update:level', $event)\"\n @level-change=\"emit('level-change', $event)\"\n @update:date=\"emit('update:date', $event)\"\n @date-change=\"emit('date-change', $event)\"\n >\n <template v-for=\"(_, name) in slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps || {}\" />\n </template>\n </LegacyComponent>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs, useSlots } from 'vue'\nimport LegacyComponent from '../Calendar/Calendar.vue'\nimport { useForwardedProps } from '../../utils/use-forwarded-props'\nimport type { CalendarProps } from '../../types'\n\ndefineOptions({\n name: 'DecadeLevel',\n inheritAttrs: false,\n})\n\nconst props = defineProps<CalendarProps>()\nconst emit = defineEmits<{\n 'update:level': [value: any]\n 'level-change': [value: any]\n 'update:date': [value: any]\n 'date-change': [value: any]\n}>()\nconst attrs = useAttrs()\nconst slots = useSlots()\nconst forwardedProps = useForwardedProps(props)\n</script>\n\n<template>\n <LegacyComponent\n v-bind=\"{ ...attrs, ...forwardedProps }\"\n @update:level=\"emit('update:level', $event)\"\n @level-change=\"emit('level-change', $event)\"\n @update:date=\"emit('update:date', $event)\"\n @date-change=\"emit('date-change', $event)\"\n >\n <template v-for=\"(_, name) in slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps || {}\" />\n </template>\n </LegacyComponent>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs, useSlots } from 'vue'\nimport LegacyComponent from '../Calendar/Calendar.vue'\nimport { useForwardedProps } from '../../utils/use-forwarded-props'\nimport type { CalendarProps } from '../../types'\n\ndefineOptions({\n name: 'MonthLevelGroup',\n inheritAttrs: false,\n})\n\nconst props = defineProps<CalendarProps>()\nconst emit = defineEmits<{\n 'update:level': [value: any]\n 'level-change': [value: any]\n 'update:date': [value: any]\n 'date-change': [value: any]\n}>()\nconst attrs = useAttrs()\nconst slots = useSlots()\nconst forwardedProps = useForwardedProps(props)\n</script>\n\n<template>\n <LegacyComponent\n v-bind=\"{ ...attrs, ...forwardedProps }\"\n @update:level=\"emit('update:level', $event)\"\n @level-change=\"emit('level-change', $event)\"\n @update:date=\"emit('update:date', $event)\"\n @date-change=\"emit('date-change', $event)\"\n >\n <template v-for=\"(_, name) in slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps || {}\" />\n </template>\n </LegacyComponent>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs, useSlots } from 'vue'\nimport LegacyComponent from '../Calendar/Calendar.vue'\nimport { useForwardedProps } from '../../utils/use-forwarded-props'\nimport type { CalendarProps } from '../../types'\n\ndefineOptions({\n name: 'MonthLevelGroup',\n inheritAttrs: false,\n})\n\nconst props = defineProps<CalendarProps>()\nconst emit = defineEmits<{\n 'update:level': [value: any]\n 'level-change': [value: any]\n 'update:date': [value: any]\n 'date-change': [value: any]\n}>()\nconst attrs = useAttrs()\nconst slots = useSlots()\nconst forwardedProps = useForwardedProps(props)\n</script>\n\n<template>\n <LegacyComponent\n v-bind=\"{ ...attrs, ...forwardedProps }\"\n @update:level=\"emit('update:level', $event)\"\n @level-change=\"emit('level-change', $event)\"\n @update:date=\"emit('update:date', $event)\"\n @date-change=\"emit('date-change', $event)\"\n >\n <template v-for=\"(_, name) in slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps || {}\" />\n </template>\n </LegacyComponent>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs, useSlots } from 'vue'\nimport LegacyComponent from '../Calendar/Calendar.vue'\nimport { useForwardedProps } from '../../utils/use-forwarded-props'\nimport type { CalendarProps } from '../../types'\n\ndefineOptions({\n name: 'YearLevelGroup',\n inheritAttrs: false,\n})\n\nconst props = defineProps<CalendarProps>()\nconst emit = defineEmits<{\n 'update:level': [value: any]\n 'level-change': [value: any]\n 'update:date': [value: any]\n 'date-change': [value: any]\n}>()\nconst attrs = useAttrs()\nconst slots = useSlots()\nconst forwardedProps = useForwardedProps(props)\n</script>\n\n<template>\n <LegacyComponent\n v-bind=\"{ ...attrs, ...forwardedProps }\"\n @update:level=\"emit('update:level', $event)\"\n @level-change=\"emit('level-change', $event)\"\n @update:date=\"emit('update:date', $event)\"\n @date-change=\"emit('date-change', $event)\"\n >\n <template v-for=\"(_, name) in slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps || {}\" />\n </template>\n </LegacyComponent>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs, useSlots } from 'vue'\nimport LegacyComponent from '../Calendar/Calendar.vue'\nimport { useForwardedProps } from '../../utils/use-forwarded-props'\nimport type { CalendarProps } from '../../types'\n\ndefineOptions({\n name: 'YearLevelGroup',\n inheritAttrs: false,\n})\n\nconst props = defineProps<CalendarProps>()\nconst emit = defineEmits<{\n 'update:level': [value: any]\n 'level-change': [value: any]\n 'update:date': [value: any]\n 'date-change': [value: any]\n}>()\nconst attrs = useAttrs()\nconst slots = useSlots()\nconst forwardedProps = useForwardedProps(props)\n</script>\n\n<template>\n <LegacyComponent\n v-bind=\"{ ...attrs, ...forwardedProps }\"\n @update:level=\"emit('update:level', $event)\"\n @level-change=\"emit('level-change', $event)\"\n @update:date=\"emit('update:date', $event)\"\n @date-change=\"emit('date-change', $event)\"\n >\n <template v-for=\"(_, name) in slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps || {}\" />\n </template>\n </LegacyComponent>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs, useSlots } from 'vue'\nimport LegacyComponent from '../Calendar/Calendar.vue'\nimport { useForwardedProps } from '../../utils/use-forwarded-props'\nimport type { CalendarProps } from '../../types'\n\ndefineOptions({\n name: 'DecadeLevelGroup',\n inheritAttrs: false,\n})\n\nconst props = defineProps<CalendarProps>()\nconst emit = defineEmits<{\n 'update:level': [value: any]\n 'level-change': [value: any]\n 'update:date': [value: any]\n 'date-change': [value: any]\n}>()\nconst attrs = useAttrs()\nconst slots = useSlots()\nconst forwardedProps = useForwardedProps(props)\n</script>\n\n<template>\n <LegacyComponent\n v-bind=\"{ ...attrs, ...forwardedProps }\"\n @update:level=\"emit('update:level', $event)\"\n @level-change=\"emit('level-change', $event)\"\n @update:date=\"emit('update:date', $event)\"\n @date-change=\"emit('date-change', $event)\"\n >\n <template v-for=\"(_, name) in slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps || {}\" />\n </template>\n </LegacyComponent>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs, useSlots } from 'vue'\nimport LegacyComponent from '../Calendar/Calendar.vue'\nimport { useForwardedProps } from '../../utils/use-forwarded-props'\nimport type { CalendarProps } from '../../types'\n\ndefineOptions({\n name: 'DecadeLevelGroup',\n inheritAttrs: false,\n})\n\nconst props = defineProps<CalendarProps>()\nconst emit = defineEmits<{\n 'update:level': [value: any]\n 'level-change': [value: any]\n 'update:date': [value: any]\n 'date-change': [value: any]\n}>()\nconst attrs = useAttrs()\nconst slots = useSlots()\nconst forwardedProps = useForwardedProps(props)\n</script>\n\n<template>\n <LegacyComponent\n v-bind=\"{ ...attrs, ...forwardedProps }\"\n @update:level=\"emit('update:level', $event)\"\n @level-change=\"emit('level-change', $event)\"\n @update:date=\"emit('update:date', $event)\"\n @date-change=\"emit('date-change', $event)\"\n >\n <template v-for=\"(_, name) in slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps || {}\" />\n </template>\n </LegacyComponent>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs, useSlots } from 'vue'\nimport LegacyComponent from '../Calendar/Calendar.vue'\nimport { useForwardedProps } from '../../utils/use-forwarded-props'\nimport type { CalendarProps } from '../../types'\n\ndefineOptions({\n name: 'LevelsGroup',\n inheritAttrs: false,\n})\n\nconst props = defineProps<CalendarProps>()\nconst emit = defineEmits<{\n 'update:level': [value: any]\n 'level-change': [value: any]\n 'update:date': [value: any]\n 'date-change': [value: any]\n}>()\nconst attrs = useAttrs()\nconst slots = useSlots()\nconst forwardedProps = useForwardedProps(props)\n</script>\n\n<template>\n <LegacyComponent\n v-bind=\"{ ...attrs, ...forwardedProps }\"\n @update:level=\"emit('update:level', $event)\"\n @level-change=\"emit('level-change', $event)\"\n @update:date=\"emit('update:date', $event)\"\n @date-change=\"emit('date-change', $event)\"\n >\n <template v-for=\"(_, name) in slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps || {}\" />\n </template>\n </LegacyComponent>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs, useSlots } from 'vue'\nimport LegacyComponent from '../Calendar/Calendar.vue'\nimport { useForwardedProps } from '../../utils/use-forwarded-props'\nimport type { CalendarProps } from '../../types'\n\ndefineOptions({\n name: 'LevelsGroup',\n inheritAttrs: false,\n})\n\nconst props = defineProps<CalendarProps>()\nconst emit = defineEmits<{\n 'update:level': [value: any]\n 'level-change': [value: any]\n 'update:date': [value: any]\n 'date-change': [value: any]\n}>()\nconst attrs = useAttrs()\nconst slots = useSlots()\nconst forwardedProps = useForwardedProps(props)\n</script>\n\n<template>\n <LegacyComponent\n v-bind=\"{ ...attrs, ...forwardedProps }\"\n @update:level=\"emit('update:level', $event)\"\n @level-change=\"emit('level-change', $event)\"\n @update:date=\"emit('update:date', $event)\"\n @date-change=\"emit('date-change', $event)\"\n >\n <template v-for=\"(_, name) in slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps || {}\" />\n </template>\n </LegacyComponent>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { UnstyledButton } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport Calendar from '../Calendar/Calendar.vue'\nimport { getNextPickerValue, isSameDate } from '../../utils'\nimport type {\n CalendarLevel,\n DatePickerProps,\n DatePickerValueType,\n DateStringValue,\n DateValue,\n RenderDaySlots,\n} from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'DatePicker', inheritAttrs: false })\nconst props = withDefaults(defineProps<DatePickerProps>(), {\n type: 'default',\n allowDeselect: true,\n sortDates: true,\n withCellSpacing: true,\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: DatePickerValueType]\n change: [value: DatePickerValueType]\n}>()\nconst slots = defineSlots<RenderDaySlots>()\nconst attrs = useAttrs()\nconst finalValue = computed<DatePickerValueType>(() =>\n props.type === 'multiple' ? [] : props.type === 'range' ? [null, null] : null,\n)\nconst [value, setValue] = useUncontrolled<DatePickerValueType>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: finalValue.value,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst calendarDate = ref<DateStringValue>()\nconst calendarLevel = ref<CalendarLevel>()\nconst calendarProps = computed(() => {\n const { modelValue, defaultValue, allowDeselect, sortDates, presets, ...rest } = props\n void modelValue\n void defaultValue\n void allowDeselect\n void sortDates\n void presets\n return rest\n})\nfunction selectDate(date: DateStringValue) {\n if (props.type === 'default' && props.allowDeselect && isSameDate(value.value as DateValue, date))\n setValue(null)\n else setValue(getNextPickerValue(value.value, date, props.type, props.sortDates))\n}\nfunction setCalendarDate(next: DateStringValue) {\n calendarDate.value = next\n}\nfunction setCalendarLevel(next: CalendarLevel) {\n calendarLevel.value = next\n}\nfunction selectPreset(next: DatePickerValueType) {\n const selected = Array.isArray(next) ? next[0] : next\n if (selected) {\n calendarDate.value = selected\n calendarLevel.value = 'month'\n }\n setValue(next)\n}\n</script>\n\n<template>\n <div v-if=\"props.presets?.length\" :class=\"classes.datePickerRoot\">\n <div :class=\"classes.presetsList\">\n <UnstyledButton\n v-for=\"(preset, index) in props.presets\"\n :key=\"index\"\n :class=\"classes.presetButton\"\n @click=\"selectPreset(preset.value)\"\n @mousedown.prevent\n >{{ preset.label }}</UnstyledButton\n >\n </div>\n <Calendar\n v-bind=\"{ ...attrs, ...calendarProps }\"\n :type=\"props.type\"\n :value=\"value\"\n :date=\"calendarDate\"\n :level=\"calendarLevel\"\n @date-change=\"setCalendarDate\"\n @level-change=\"setCalendarLevel\"\n @day-click=\"selectDate\"\n >\n <template v-if=\"slots.renderDay\" #renderDay=\"scope\"\n ><slot name=\"renderDay\" v-bind=\"scope\"\n /></template>\n <template v-if=\"slots.day\" #day=\"scope\"><slot name=\"day\" v-bind=\"scope\" /></template>\n </Calendar>\n </div>\n <Calendar\n v-else\n v-bind=\"{ ...attrs, ...calendarProps }\"\n :type=\"props.type\"\n :value=\"value\"\n :date=\"calendarDate\"\n :level=\"calendarLevel\"\n @date-change=\"setCalendarDate\"\n @level-change=\"setCalendarLevel\"\n @day-click=\"selectDate\"\n >\n <template v-if=\"slots.renderDay\" #renderDay=\"scope\"\n ><slot name=\"renderDay\" v-bind=\"scope\"\n /></template>\n <template v-if=\"slots.day\" #day=\"scope\"><slot name=\"day\" v-bind=\"scope\" /></template>\n </Calendar>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { UnstyledButton } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport Calendar from '../Calendar/Calendar.vue'\nimport { getNextPickerValue, isSameDate } from '../../utils'\nimport type {\n CalendarLevel,\n DatePickerProps,\n DatePickerValueType,\n DateStringValue,\n DateValue,\n RenderDaySlots,\n} from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'DatePicker', inheritAttrs: false })\nconst props = withDefaults(defineProps<DatePickerProps>(), {\n type: 'default',\n allowDeselect: true,\n sortDates: true,\n withCellSpacing: true,\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: DatePickerValueType]\n change: [value: DatePickerValueType]\n}>()\nconst slots = defineSlots<RenderDaySlots>()\nconst attrs = useAttrs()\nconst finalValue = computed<DatePickerValueType>(() =>\n props.type === 'multiple' ? [] : props.type === 'range' ? [null, null] : null,\n)\nconst [value, setValue] = useUncontrolled<DatePickerValueType>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: finalValue.value,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst calendarDate = ref<DateStringValue>()\nconst calendarLevel = ref<CalendarLevel>()\nconst calendarProps = computed(() => {\n const { modelValue, defaultValue, allowDeselect, sortDates, presets, ...rest } = props\n void modelValue\n void defaultValue\n void allowDeselect\n void sortDates\n void presets\n return rest\n})\nfunction selectDate(date: DateStringValue) {\n if (props.type === 'default' && props.allowDeselect && isSameDate(value.value as DateValue, date))\n setValue(null)\n else setValue(getNextPickerValue(value.value, date, props.type, props.sortDates))\n}\nfunction setCalendarDate(next: DateStringValue) {\n calendarDate.value = next\n}\nfunction setCalendarLevel(next: CalendarLevel) {\n calendarLevel.value = next\n}\nfunction selectPreset(next: DatePickerValueType) {\n const selected = Array.isArray(next) ? next[0] : next\n if (selected) {\n calendarDate.value = selected\n calendarLevel.value = 'month'\n }\n setValue(next)\n}\n</script>\n\n<template>\n <div v-if=\"props.presets?.length\" :class=\"classes.datePickerRoot\">\n <div :class=\"classes.presetsList\">\n <UnstyledButton\n v-for=\"(preset, index) in props.presets\"\n :key=\"index\"\n :class=\"classes.presetButton\"\n @click=\"selectPreset(preset.value)\"\n @mousedown.prevent\n >{{ preset.label }}</UnstyledButton\n >\n </div>\n <Calendar\n v-bind=\"{ ...attrs, ...calendarProps }\"\n :type=\"props.type\"\n :value=\"value\"\n :date=\"calendarDate\"\n :level=\"calendarLevel\"\n @date-change=\"setCalendarDate\"\n @level-change=\"setCalendarLevel\"\n @day-click=\"selectDate\"\n >\n <template v-if=\"slots.renderDay\" #renderDay=\"scope\"\n ><slot name=\"renderDay\" v-bind=\"scope\"\n /></template>\n <template v-if=\"slots.day\" #day=\"scope\"><slot name=\"day\" v-bind=\"scope\" /></template>\n </Calendar>\n </div>\n <Calendar\n v-else\n v-bind=\"{ ...attrs, ...calendarProps }\"\n :type=\"props.type\"\n :value=\"value\"\n :date=\"calendarDate\"\n :level=\"calendarLevel\"\n @date-change=\"setCalendarDate\"\n @level-change=\"setCalendarLevel\"\n @day-click=\"selectDate\"\n >\n <template v-if=\"slots.renderDay\" #renderDay=\"scope\"\n ><slot name=\"renderDay\" v-bind=\"scope\"\n /></template>\n <template v-if=\"slots.day\" #day=\"scope\"><slot name=\"day\" v-bind=\"scope\" /></template>\n </Calendar>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, ref, useAttrs } from 'vue'\nimport { UnstyledButton } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport Calendar from '../Calendar/Calendar.vue'\nimport { getNextPickerValue, isInRangeGranular, isSameDate } from '../../utils'\nimport type {\n DatePickerValueType,\n DatesRangeValue,\n DateStringValue,\n DateValue,\n YearPickerProps,\n} from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'YearPicker', inheritAttrs: false })\nconst props = withDefaults(defineProps<YearPickerProps>(), {\n type: 'default',\n allowDeselect: true,\n sortDates: true,\n withCellSpacing: true,\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: DatePickerValueType]\n change: [value: DatePickerValueType]\n}>()\nconst attrs = useAttrs()\nconst finalValue = computed<DatePickerValueType>(() =>\n props.type === 'multiple' ? [] : props.type === 'range' ? [null, null] : null,\n)\nconst [value, setValue] = useUncontrolled<DatePickerValueType>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: finalValue.value,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst hovered = ref<DateStringValue | null>(null)\nconst calendarDate = ref<DateStringValue>()\nconst calendarProps = computed(() => {\n const {\n modelValue,\n defaultValue,\n allowDeselect,\n sortDates,\n presets,\n getYearControlProps,\n ...rest\n } = props\n void modelValue\n void defaultValue\n void allowDeselect\n void sortDates\n void presets\n void getYearControlProps\n return rest\n})\nfunction select(date: DateStringValue) {\n if (props.type === 'default' && props.allowDeselect && isSameDate(value.value as DateValue, date))\n setValue(null)\n else setValue(getNextPickerValue(value.value, date, props.type, props.sortDates))\n hovered.value = null\n}\nfunction setCalendarDate(next: DateStringValue) {\n calendarDate.value = next\n}\nfunction controlProps(date: DateStringValue) {\n const external = props.getYearControlProps?.(date) || {}\n if (props.type !== 'range' || !Array.isArray(value.value)) return external\n const [start, end] = value.value as DatesRangeValue\n const previewEnd = start && !end ? hovered.value : end\n if (!start || !previewEnd) return external\n const boundaries = [start, previewEnd].sort((a, b) => (dayjs(a).isAfter(b, 'year') ? 1 : -1))\n return {\n inRange: isInRangeGranular(date, [start, previewEnd], 'year'),\n firstInRange: dayjs(date).isSame(boundaries[0], 'year'),\n lastInRange: dayjs(date).isSame(boundaries[1], 'year'),\n ...external,\n }\n}\nfunction hover(date: DateStringValue) {\n const [start, end] = Array.isArray(value.value) ? (value.value as DatesRangeValue) : [null, null]\n if (props.type === 'range' && start && !end) hovered.value = date\n}\nfunction selectPreset(next: DatePickerValueType) {\n const selected = Array.isArray(next) ? next[0] : next\n if (selected) calendarDate.value = selected\n setValue(next)\n}\n</script>\n\n<template>\n <div v-if=\"props.presets?.length\" :class=\"classes.datePickerRoot\">\n <div :class=\"classes.presetsList\">\n <UnstyledButton\n v-for=\"(preset, index) in props.presets\"\n :key=\"index\"\n :class=\"classes.presetButton\"\n @click=\"selectPreset(preset.value)\"\n @mousedown.prevent\n >{{ preset.label }}</UnstyledButton\n >\n </div>\n <Calendar\n v-bind=\"{ ...attrs, ...calendarProps }\"\n :type=\"props.type\"\n :value=\"value\"\n :date=\"calendarDate\"\n default-level=\"decade\"\n min-level=\"decade\"\n :get-year-control-props=\"controlProps\"\n @date-change=\"setCalendarDate\"\n @year-select=\"select\"\n @year-mouse-enter=\"hover\"\n @mouseleave=\"hovered = null\"\n />\n </div>\n <Calendar\n v-else\n v-bind=\"{ ...attrs, ...calendarProps }\"\n :type=\"props.type\"\n :value=\"value\"\n :date=\"calendarDate\"\n default-level=\"decade\"\n min-level=\"decade\"\n :get-year-control-props=\"controlProps\"\n @date-change=\"setCalendarDate\"\n @year-select=\"select\"\n @year-mouse-enter=\"hover\"\n @mouseleave=\"hovered = null\"\n />\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, ref, useAttrs } from 'vue'\nimport { UnstyledButton } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport Calendar from '../Calendar/Calendar.vue'\nimport { getNextPickerValue, isInRangeGranular, isSameDate } from '../../utils'\nimport type {\n DatePickerValueType,\n DatesRangeValue,\n DateStringValue,\n DateValue,\n YearPickerProps,\n} from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'YearPicker', inheritAttrs: false })\nconst props = withDefaults(defineProps<YearPickerProps>(), {\n type: 'default',\n allowDeselect: true,\n sortDates: true,\n withCellSpacing: true,\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: DatePickerValueType]\n change: [value: DatePickerValueType]\n}>()\nconst attrs = useAttrs()\nconst finalValue = computed<DatePickerValueType>(() =>\n props.type === 'multiple' ? [] : props.type === 'range' ? [null, null] : null,\n)\nconst [value, setValue] = useUncontrolled<DatePickerValueType>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: finalValue.value,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst hovered = ref<DateStringValue | null>(null)\nconst calendarDate = ref<DateStringValue>()\nconst calendarProps = computed(() => {\n const {\n modelValue,\n defaultValue,\n allowDeselect,\n sortDates,\n presets,\n getYearControlProps,\n ...rest\n } = props\n void modelValue\n void defaultValue\n void allowDeselect\n void sortDates\n void presets\n void getYearControlProps\n return rest\n})\nfunction select(date: DateStringValue) {\n if (props.type === 'default' && props.allowDeselect && isSameDate(value.value as DateValue, date))\n setValue(null)\n else setValue(getNextPickerValue(value.value, date, props.type, props.sortDates))\n hovered.value = null\n}\nfunction setCalendarDate(next: DateStringValue) {\n calendarDate.value = next\n}\nfunction controlProps(date: DateStringValue) {\n const external = props.getYearControlProps?.(date) || {}\n if (props.type !== 'range' || !Array.isArray(value.value)) return external\n const [start, end] = value.value as DatesRangeValue\n const previewEnd = start && !end ? hovered.value : end\n if (!start || !previewEnd) return external\n const boundaries = [start, previewEnd].sort((a, b) => (dayjs(a).isAfter(b, 'year') ? 1 : -1))\n return {\n inRange: isInRangeGranular(date, [start, previewEnd], 'year'),\n firstInRange: dayjs(date).isSame(boundaries[0], 'year'),\n lastInRange: dayjs(date).isSame(boundaries[1], 'year'),\n ...external,\n }\n}\nfunction hover(date: DateStringValue) {\n const [start, end] = Array.isArray(value.value) ? (value.value as DatesRangeValue) : [null, null]\n if (props.type === 'range' && start && !end) hovered.value = date\n}\nfunction selectPreset(next: DatePickerValueType) {\n const selected = Array.isArray(next) ? next[0] : next\n if (selected) calendarDate.value = selected\n setValue(next)\n}\n</script>\n\n<template>\n <div v-if=\"props.presets?.length\" :class=\"classes.datePickerRoot\">\n <div :class=\"classes.presetsList\">\n <UnstyledButton\n v-for=\"(preset, index) in props.presets\"\n :key=\"index\"\n :class=\"classes.presetButton\"\n @click=\"selectPreset(preset.value)\"\n @mousedown.prevent\n >{{ preset.label }}</UnstyledButton\n >\n </div>\n <Calendar\n v-bind=\"{ ...attrs, ...calendarProps }\"\n :type=\"props.type\"\n :value=\"value\"\n :date=\"calendarDate\"\n default-level=\"decade\"\n min-level=\"decade\"\n :get-year-control-props=\"controlProps\"\n @date-change=\"setCalendarDate\"\n @year-select=\"select\"\n @year-mouse-enter=\"hover\"\n @mouseleave=\"hovered = null\"\n />\n </div>\n <Calendar\n v-else\n v-bind=\"{ ...attrs, ...calendarProps }\"\n :type=\"props.type\"\n :value=\"value\"\n :date=\"calendarDate\"\n default-level=\"decade\"\n min-level=\"decade\"\n :get-year-control-props=\"controlProps\"\n @date-change=\"setCalendarDate\"\n @year-select=\"select\"\n @year-mouse-enter=\"hover\"\n @mouseleave=\"hovered = null\"\n />\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, ref, useAttrs } from 'vue'\nimport { UnstyledButton } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport Calendar from '../Calendar/Calendar.vue'\nimport { getNextPickerValue, isInRangeGranular, isSameDate } from '../../utils'\nimport type {\n DatePickerValueType,\n DatesRangeValue,\n DateStringValue,\n DateValue,\n MonthPickerProps,\n} from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'MonthPicker', inheritAttrs: false })\nconst props = withDefaults(defineProps<MonthPickerProps>(), {\n type: 'default',\n allowDeselect: true,\n sortDates: true,\n withCellSpacing: true,\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: DatePickerValueType]\n change: [value: DatePickerValueType]\n}>()\nconst attrs = useAttrs()\nconst finalValue = computed<DatePickerValueType>(() =>\n props.type === 'multiple' ? [] : props.type === 'range' ? [null, null] : null,\n)\nconst [value, setValue] = useUncontrolled<DatePickerValueType>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: finalValue.value,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst hovered = ref<DateStringValue | null>(null)\nconst calendarDate = ref<DateStringValue>()\nconst calendarProps = computed(() => {\n const {\n modelValue,\n defaultValue,\n allowDeselect,\n sortDates,\n presets,\n getMonthControlProps,\n ...rest\n } = props\n void modelValue\n void defaultValue\n void allowDeselect\n void sortDates\n void presets\n void getMonthControlProps\n return rest\n})\nfunction select(date: DateStringValue) {\n if (props.type === 'default' && props.allowDeselect && isSameDate(value.value as DateValue, date))\n setValue(null)\n else setValue(getNextPickerValue(value.value, date, props.type, props.sortDates))\n hovered.value = null\n}\nfunction setCalendarDate(next: DateStringValue) {\n calendarDate.value = next\n}\nfunction controlProps(date: DateStringValue) {\n const external = props.getMonthControlProps?.(date) || {}\n if (props.type !== 'range' || !Array.isArray(value.value)) return external\n const [start, end] = value.value as DatesRangeValue\n const previewEnd = start && !end ? hovered.value : end\n if (!start || !previewEnd) return external\n const boundaries = [start, previewEnd].sort((a, b) => (dayjs(a).isAfter(b, 'month') ? 1 : -1))\n return {\n inRange: isInRangeGranular(date, [start, previewEnd], 'month'),\n firstInRange: dayjs(date).isSame(boundaries[0], 'month'),\n lastInRange: dayjs(date).isSame(boundaries[1], 'month'),\n ...external,\n }\n}\nfunction hover(date: DateStringValue) {\n const [start, end] = Array.isArray(value.value) ? (value.value as DatesRangeValue) : [null, null]\n if (props.type === 'range' && start && !end) hovered.value = date\n}\nfunction selectPreset(next: DatePickerValueType) {\n const selected = Array.isArray(next) ? next[0] : next\n if (selected) calendarDate.value = selected\n setValue(next)\n}\n</script>\n\n<template>\n <div v-if=\"props.presets?.length\" :class=\"classes.datePickerRoot\">\n <div :class=\"classes.presetsList\">\n <UnstyledButton\n v-for=\"(preset, index) in props.presets\"\n :key=\"index\"\n :class=\"classes.presetButton\"\n @click=\"selectPreset(preset.value)\"\n @mousedown.prevent\n >{{ preset.label }}</UnstyledButton\n >\n </div>\n <Calendar\n v-bind=\"{ ...attrs, ...calendarProps }\"\n :type=\"props.type\"\n :value=\"value\"\n :date=\"calendarDate\"\n default-level=\"year\"\n min-level=\"year\"\n :get-month-control-props=\"controlProps\"\n @date-change=\"setCalendarDate\"\n @month-select=\"select\"\n @month-mouse-enter=\"hover\"\n @mouseleave=\"hovered = null\"\n />\n </div>\n <Calendar\n v-else\n v-bind=\"{ ...attrs, ...calendarProps }\"\n :type=\"props.type\"\n :value=\"value\"\n :date=\"calendarDate\"\n default-level=\"year\"\n min-level=\"year\"\n :get-month-control-props=\"controlProps\"\n @date-change=\"setCalendarDate\"\n @month-select=\"select\"\n @month-mouse-enter=\"hover\"\n @mouseleave=\"hovered = null\"\n />\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, ref, useAttrs } from 'vue'\nimport { UnstyledButton } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport Calendar from '../Calendar/Calendar.vue'\nimport { getNextPickerValue, isInRangeGranular, isSameDate } from '../../utils'\nimport type {\n DatePickerValueType,\n DatesRangeValue,\n DateStringValue,\n DateValue,\n MonthPickerProps,\n} from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'MonthPicker', inheritAttrs: false })\nconst props = withDefaults(defineProps<MonthPickerProps>(), {\n type: 'default',\n allowDeselect: true,\n sortDates: true,\n withCellSpacing: true,\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: DatePickerValueType]\n change: [value: DatePickerValueType]\n}>()\nconst attrs = useAttrs()\nconst finalValue = computed<DatePickerValueType>(() =>\n props.type === 'multiple' ? [] : props.type === 'range' ? [null, null] : null,\n)\nconst [value, setValue] = useUncontrolled<DatePickerValueType>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: finalValue.value,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst hovered = ref<DateStringValue | null>(null)\nconst calendarDate = ref<DateStringValue>()\nconst calendarProps = computed(() => {\n const {\n modelValue,\n defaultValue,\n allowDeselect,\n sortDates,\n presets,\n getMonthControlProps,\n ...rest\n } = props\n void modelValue\n void defaultValue\n void allowDeselect\n void sortDates\n void presets\n void getMonthControlProps\n return rest\n})\nfunction select(date: DateStringValue) {\n if (props.type === 'default' && props.allowDeselect && isSameDate(value.value as DateValue, date))\n setValue(null)\n else setValue(getNextPickerValue(value.value, date, props.type, props.sortDates))\n hovered.value = null\n}\nfunction setCalendarDate(next: DateStringValue) {\n calendarDate.value = next\n}\nfunction controlProps(date: DateStringValue) {\n const external = props.getMonthControlProps?.(date) || {}\n if (props.type !== 'range' || !Array.isArray(value.value)) return external\n const [start, end] = value.value as DatesRangeValue\n const previewEnd = start && !end ? hovered.value : end\n if (!start || !previewEnd) return external\n const boundaries = [start, previewEnd].sort((a, b) => (dayjs(a).isAfter(b, 'month') ? 1 : -1))\n return {\n inRange: isInRangeGranular(date, [start, previewEnd], 'month'),\n firstInRange: dayjs(date).isSame(boundaries[0], 'month'),\n lastInRange: dayjs(date).isSame(boundaries[1], 'month'),\n ...external,\n }\n}\nfunction hover(date: DateStringValue) {\n const [start, end] = Array.isArray(value.value) ? (value.value as DatesRangeValue) : [null, null]\n if (props.type === 'range' && start && !end) hovered.value = date\n}\nfunction selectPreset(next: DatePickerValueType) {\n const selected = Array.isArray(next) ? next[0] : next\n if (selected) calendarDate.value = selected\n setValue(next)\n}\n</script>\n\n<template>\n <div v-if=\"props.presets?.length\" :class=\"classes.datePickerRoot\">\n <div :class=\"classes.presetsList\">\n <UnstyledButton\n v-for=\"(preset, index) in props.presets\"\n :key=\"index\"\n :class=\"classes.presetButton\"\n @click=\"selectPreset(preset.value)\"\n @mousedown.prevent\n >{{ preset.label }}</UnstyledButton\n >\n </div>\n <Calendar\n v-bind=\"{ ...attrs, ...calendarProps }\"\n :type=\"props.type\"\n :value=\"value\"\n :date=\"calendarDate\"\n default-level=\"year\"\n min-level=\"year\"\n :get-month-control-props=\"controlProps\"\n @date-change=\"setCalendarDate\"\n @month-select=\"select\"\n @month-mouse-enter=\"hover\"\n @mouseleave=\"hovered = null\"\n />\n </div>\n <Calendar\n v-else\n v-bind=\"{ ...attrs, ...calendarProps }\"\n :type=\"props.type\"\n :value=\"value\"\n :date=\"calendarDate\"\n default-level=\"year\"\n min-level=\"year\"\n :get-month-control-props=\"controlProps\"\n @date-change=\"setCalendarDate\"\n @month-select=\"select\"\n @month-mouse-enter=\"hover\"\n @mouseleave=\"hovered = null\"\n />\n</template>\n","<script setup lang=\"ts\">\nimport { ref, watch, useAttrs } from 'vue'\nimport { Box, CloseButton, InputBase, Modal, Popover } from '@mantine-vue/core'\nimport type { PickerInputBaseEmits, PickerInputBaseProps, PickerInputBaseSlots } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'PickerInputBase', inheritAttrs: false })\nconst props = withDefaults(defineProps<PickerInputBaseProps>(), {\n formattedValue: '',\n dropdownType: 'popover',\n clearable: false,\n disabled: false,\n required: false,\n size: 'sm',\n})\nconst emit = defineEmits<PickerInputBaseEmits>()\ndefineSlots<PickerInputBaseSlots>()\nconst attrs = useAttrs()\nconst opened = ref(props.dropdownOpened ?? false)\nwatch(\n () => props.dropdownOpened,\n (value) => {\n if (value !== undefined) opened.value = value\n },\n)\nfunction close() {\n opened.value = false\n emit('dropdown-close')\n}\nfunction open() {\n if (!props.disabled) {\n opened.value = true\n emit('dropdown-open')\n }\n}\nfunction updateOpened(value: boolean) {\n if (value) open()\n else close()\n}\nfunction clickTarget(event: MouseEvent) {\n emit('click', event)\n open()\n}\nfunction clear(event: MouseEvent) {\n event.stopPropagation()\n emit('clear')\n}\n</script>\n\n<template>\n <Box v-if=\"props.dropdownType === 'modal'\">\n <InputBase\n v-bind=\"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\n :size=\"props.size\"\n :variant=\"props.variant\"\n :right-section-pointer-events=\"props.clearable && props.formattedValue ? 'all' : undefined\"\n @click=\"clickTarget\"\n >\n <span v-if=\"props.formattedValue\">{{ props.formattedValue }}</span\n ><span v-else :class=\"classes.placeholder\">{{ props.placeholder }}</span>\n <template v-if=\"props.clearable && props.formattedValue\" #rightSection\n ><CloseButton :size=\"props.size\" @mousedown.stop @click=\"clear\"\n /></template>\n </InputBase>\n <Modal :opened=\"opened\" :title=\"props.label\" size=\"auto\" @close=\"close\"\n ><slot :close=\"close\" :open=\"open\" :opened=\"opened\"\n /></Modal>\n </Box>\n <Popover\n v-else\n :opened=\"opened\"\n position=\"bottom-start\"\n trap-focus\n :return-focus=\"false\"\n @update:opened=\"updateOpened\"\n >\n <Popover.Target>\n <InputBase\n v-bind=\"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\n :size=\"props.size\"\n :variant=\"props.variant\"\n :right-section-pointer-events=\"props.clearable && props.formattedValue ? 'all' : undefined\"\n @click=\"clickTarget\"\n >\n <span v-if=\"props.formattedValue\">{{ props.formattedValue }}</span\n ><span v-else :class=\"classes.placeholder\">{{ props.placeholder }}</span>\n <template v-if=\"props.clearable && props.formattedValue\" #rightSection\n ><CloseButton :size=\"props.size\" @mousedown.stop @click=\"clear\"\n /></template>\n </InputBase>\n </Popover.Target>\n <Popover.Dropdown :class=\"classes.dropdown\"\n ><slot :close=\"close\" :open=\"open\" :opened=\"opened\"\n /></Popover.Dropdown>\n </Popover>\n</template>\n","<script setup lang=\"ts\">\nimport { ref, watch, useAttrs } from 'vue'\nimport { Box, CloseButton, InputBase, Modal, Popover } from '@mantine-vue/core'\nimport type { PickerInputBaseEmits, PickerInputBaseProps, PickerInputBaseSlots } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'PickerInputBase', inheritAttrs: false })\nconst props = withDefaults(defineProps<PickerInputBaseProps>(), {\n formattedValue: '',\n dropdownType: 'popover',\n clearable: false,\n disabled: false,\n required: false,\n size: 'sm',\n})\nconst emit = defineEmits<PickerInputBaseEmits>()\ndefineSlots<PickerInputBaseSlots>()\nconst attrs = useAttrs()\nconst opened = ref(props.dropdownOpened ?? false)\nwatch(\n () => props.dropdownOpened,\n (value) => {\n if (value !== undefined) opened.value = value\n },\n)\nfunction close() {\n opened.value = false\n emit('dropdown-close')\n}\nfunction open() {\n if (!props.disabled) {\n opened.value = true\n emit('dropdown-open')\n }\n}\nfunction updateOpened(value: boolean) {\n if (value) open()\n else close()\n}\nfunction clickTarget(event: MouseEvent) {\n emit('click', event)\n open()\n}\nfunction clear(event: MouseEvent) {\n event.stopPropagation()\n emit('clear')\n}\n</script>\n\n<template>\n <Box v-if=\"props.dropdownType === 'modal'\">\n <InputBase\n v-bind=\"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\n :size=\"props.size\"\n :variant=\"props.variant\"\n :right-section-pointer-events=\"props.clearable && props.formattedValue ? 'all' : undefined\"\n @click=\"clickTarget\"\n >\n <span v-if=\"props.formattedValue\">{{ props.formattedValue }}</span\n ><span v-else :class=\"classes.placeholder\">{{ props.placeholder }}</span>\n <template v-if=\"props.clearable && props.formattedValue\" #rightSection\n ><CloseButton :size=\"props.size\" @mousedown.stop @click=\"clear\"\n /></template>\n </InputBase>\n <Modal :opened=\"opened\" :title=\"props.label\" size=\"auto\" @close=\"close\"\n ><slot :close=\"close\" :open=\"open\" :opened=\"opened\"\n /></Modal>\n </Box>\n <Popover\n v-else\n :opened=\"opened\"\n position=\"bottom-start\"\n trap-focus\n :return-focus=\"false\"\n @update:opened=\"updateOpened\"\n >\n <Popover.Target>\n <InputBase\n v-bind=\"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\n :size=\"props.size\"\n :variant=\"props.variant\"\n :right-section-pointer-events=\"props.clearable && props.formattedValue ? 'all' : undefined\"\n @click=\"clickTarget\"\n >\n <span v-if=\"props.formattedValue\">{{ props.formattedValue }}</span\n ><span v-else :class=\"classes.placeholder\">{{ props.placeholder }}</span>\n <template v-if=\"props.clearable && props.formattedValue\" #rightSection\n ><CloseButton :size=\"props.size\" @mousedown.stop @click=\"clear\"\n /></template>\n </InputBase>\n </Popover.Target>\n <Popover.Dropdown :class=\"classes.dropdown\"\n ><slot :close=\"close\" :open=\"open\" :opened=\"opened\"\n /></Popover.Dropdown>\n </Popover>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport PickerInputBase from '../PickerInputBase/PickerInputBase.vue'\nimport Picker from '../DatePicker/DatePicker.vue'\nimport { formatValue } from '../../utils'\nimport type { DatePickerInputProps, DatePickerValueType } from '../../types'\n\ndefineOptions({ name: 'DatePickerInput', inheritAttrs: false })\nconst props = withDefaults(defineProps<DatePickerInputProps>(), {\n type: 'default',\n valueFormat: 'MMMM D, YYYY',\n labelSeparator: '–',\n clearable: false,\n closeOnChange: true,\n sortDates: true,\n allowDeselect: true,\n withCellSpacing: true,\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: DatePickerValueType]\n change: [value: DatePickerValueType]\n 'dropdown-open': []\n 'dropdown-close': []\n}>()\nconst attrs = useAttrs()\nconst opened = ref(false)\nconst finalValue = computed<DatePickerValueType>(() =>\n props.type === 'multiple' ? [] : props.type === 'range' ? [null, null] : null,\n)\nconst [value, setValue] = useUncontrolled<DatePickerValueType>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: finalValue.value,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst formatted = computed(() =>\n formatValue(\n value.value,\n props.type,\n props.valueFormat,\n props.locale,\n props.labelSeparator,\n props.valueFormatter,\n ),\n)\nconst pickerProps = computed(() => {\n const {\n modelValue,\n defaultValue,\n valueFormat,\n labelSeparator,\n valueFormatter,\n closeOnChange,\n formattedValue,\n dropdownOpened,\n dropdownType,\n label,\n placeholder,\n clearable,\n disabled,\n required,\n error,\n size,\n variant,\n ...rest\n } = props\n void modelValue\n void defaultValue\n void valueFormat\n void labelSeparator\n void valueFormatter\n void closeOnChange\n void formattedValue\n void dropdownOpened\n void dropdownType\n void label\n void placeholder\n void clearable\n void disabled\n void required\n void error\n void size\n void variant\n return rest\n})\nfunction change(next: DatePickerValueType, close: () => void) {\n setValue(next)\n if (props.closeOnChange && props.type === 'default') close()\n}\nfunction openDropdown() {\n opened.value = true\n emit('dropdown-open')\n}\nfunction closeDropdown() {\n opened.value = false\n emit('dropdown-close')\n}\n</script>\n\n<template>\n <PickerInputBase\n v-bind=\"attrs\"\n :formatted-value=\"formatted\"\n :label=\"props.label\"\n :placeholder=\"props.placeholder\"\n :clearable=\"props.clearable\"\n :disabled=\"props.disabled\"\n :required=\"props.required\"\n :error=\"props.error\"\n :size=\"props.size\"\n :variant=\"props.variant\"\n :dropdown-type=\"props.dropdownType\"\n :dropdown-opened=\"opened\"\n @dropdown-open=\"openDropdown\"\n @dropdown-close=\"closeDropdown\"\n @clear=\"setValue(finalValue)\"\n >\n <template #default=\"{ close }\"\n ><Picker\n v-bind=\"pickerProps\"\n :type=\"props.type\"\n :model-value=\"value\"\n :sort-dates=\"props.sortDates\"\n @change=\"change($event, close)\"\n /></template>\n </PickerInputBase>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport PickerInputBase from '../PickerInputBase/PickerInputBase.vue'\nimport Picker from '../DatePicker/DatePicker.vue'\nimport { formatValue } from '../../utils'\nimport type { DatePickerInputProps, DatePickerValueType } from '../../types'\n\ndefineOptions({ name: 'DatePickerInput', inheritAttrs: false })\nconst props = withDefaults(defineProps<DatePickerInputProps>(), {\n type: 'default',\n valueFormat: 'MMMM D, YYYY',\n labelSeparator: '–',\n clearable: false,\n closeOnChange: true,\n sortDates: true,\n allowDeselect: true,\n withCellSpacing: true,\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: DatePickerValueType]\n change: [value: DatePickerValueType]\n 'dropdown-open': []\n 'dropdown-close': []\n}>()\nconst attrs = useAttrs()\nconst opened = ref(false)\nconst finalValue = computed<DatePickerValueType>(() =>\n props.type === 'multiple' ? [] : props.type === 'range' ? [null, null] : null,\n)\nconst [value, setValue] = useUncontrolled<DatePickerValueType>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: finalValue.value,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst formatted = computed(() =>\n formatValue(\n value.value,\n props.type,\n props.valueFormat,\n props.locale,\n props.labelSeparator,\n props.valueFormatter,\n ),\n)\nconst pickerProps = computed(() => {\n const {\n modelValue,\n defaultValue,\n valueFormat,\n labelSeparator,\n valueFormatter,\n closeOnChange,\n formattedValue,\n dropdownOpened,\n dropdownType,\n label,\n placeholder,\n clearable,\n disabled,\n required,\n error,\n size,\n variant,\n ...rest\n } = props\n void modelValue\n void defaultValue\n void valueFormat\n void labelSeparator\n void valueFormatter\n void closeOnChange\n void formattedValue\n void dropdownOpened\n void dropdownType\n void label\n void placeholder\n void clearable\n void disabled\n void required\n void error\n void size\n void variant\n return rest\n})\nfunction change(next: DatePickerValueType, close: () => void) {\n setValue(next)\n if (props.closeOnChange && props.type === 'default') close()\n}\nfunction openDropdown() {\n opened.value = true\n emit('dropdown-open')\n}\nfunction closeDropdown() {\n opened.value = false\n emit('dropdown-close')\n}\n</script>\n\n<template>\n <PickerInputBase\n v-bind=\"attrs\"\n :formatted-value=\"formatted\"\n :label=\"props.label\"\n :placeholder=\"props.placeholder\"\n :clearable=\"props.clearable\"\n :disabled=\"props.disabled\"\n :required=\"props.required\"\n :error=\"props.error\"\n :size=\"props.size\"\n :variant=\"props.variant\"\n :dropdown-type=\"props.dropdownType\"\n :dropdown-opened=\"opened\"\n @dropdown-open=\"openDropdown\"\n @dropdown-close=\"closeDropdown\"\n @clear=\"setValue(finalValue)\"\n >\n <template #default=\"{ close }\"\n ><Picker\n v-bind=\"pickerProps\"\n :type=\"props.type\"\n :model-value=\"value\"\n :sort-dates=\"props.sortDates\"\n @change=\"change($event, close)\"\n /></template>\n </PickerInputBase>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport PickerInputBase from '../PickerInputBase/PickerInputBase.vue'\nimport Picker from '../MonthPicker/MonthPicker.vue'\nimport { formatValue } from '../../utils'\nimport type { DatePickerInputProps, DatePickerValueType } from '../../types'\n\ndefineOptions({ name: 'MonthPickerInput', inheritAttrs: false })\nconst props = withDefaults(defineProps<DatePickerInputProps>(), {\n type: 'default',\n valueFormat: 'MMMM YYYY',\n labelSeparator: '–',\n clearable: false,\n closeOnChange: true,\n sortDates: true,\n allowDeselect: true,\n withCellSpacing: true,\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: DatePickerValueType]\n change: [value: DatePickerValueType]\n 'dropdown-open': []\n 'dropdown-close': []\n}>()\nconst attrs = useAttrs()\nconst opened = ref(false)\nconst finalValue = computed<DatePickerValueType>(() =>\n props.type === 'multiple' ? [] : props.type === 'range' ? [null, null] : null,\n)\nconst [value, setValue] = useUncontrolled<DatePickerValueType>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: finalValue.value,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst formatted = computed(() =>\n formatValue(\n value.value,\n props.type,\n props.valueFormat,\n props.locale,\n props.labelSeparator,\n props.valueFormatter,\n ),\n)\nconst pickerProps = computed(() => {\n const {\n modelValue,\n defaultValue,\n valueFormat,\n labelSeparator,\n valueFormatter,\n closeOnChange,\n formattedValue,\n dropdownOpened,\n dropdownType,\n label,\n placeholder,\n clearable,\n disabled,\n required,\n error,\n size,\n variant,\n ...rest\n } = props\n void modelValue\n void defaultValue\n void valueFormat\n void labelSeparator\n void valueFormatter\n void closeOnChange\n void formattedValue\n void dropdownOpened\n void dropdownType\n void label\n void placeholder\n void clearable\n void disabled\n void required\n void error\n void size\n void variant\n return rest\n})\nfunction change(next: DatePickerValueType, close: () => void) {\n setValue(next)\n if (props.closeOnChange && props.type === 'default') close()\n}\nfunction openDropdown() {\n opened.value = true\n emit('dropdown-open')\n}\nfunction closeDropdown() {\n opened.value = false\n emit('dropdown-close')\n}\n</script>\n\n<template>\n <PickerInputBase\n v-bind=\"attrs\"\n :formatted-value=\"formatted\"\n :label=\"props.label\"\n :placeholder=\"props.placeholder\"\n :clearable=\"props.clearable\"\n :disabled=\"props.disabled\"\n :required=\"props.required\"\n :error=\"props.error\"\n :size=\"props.size\"\n :variant=\"props.variant\"\n :dropdown-type=\"props.dropdownType\"\n :dropdown-opened=\"opened\"\n @dropdown-open=\"openDropdown\"\n @dropdown-close=\"closeDropdown\"\n @clear=\"setValue(finalValue)\"\n >\n <template #default=\"{ close }\"\n ><Picker\n v-bind=\"pickerProps\"\n :type=\"props.type\"\n :model-value=\"value\"\n :sort-dates=\"props.sortDates\"\n @change=\"change($event, close)\"\n /></template>\n </PickerInputBase>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport PickerInputBase from '../PickerInputBase/PickerInputBase.vue'\nimport Picker from '../MonthPicker/MonthPicker.vue'\nimport { formatValue } from '../../utils'\nimport type { DatePickerInputProps, DatePickerValueType } from '../../types'\n\ndefineOptions({ name: 'MonthPickerInput', inheritAttrs: false })\nconst props = withDefaults(defineProps<DatePickerInputProps>(), {\n type: 'default',\n valueFormat: 'MMMM YYYY',\n labelSeparator: '–',\n clearable: false,\n closeOnChange: true,\n sortDates: true,\n allowDeselect: true,\n withCellSpacing: true,\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: DatePickerValueType]\n change: [value: DatePickerValueType]\n 'dropdown-open': []\n 'dropdown-close': []\n}>()\nconst attrs = useAttrs()\nconst opened = ref(false)\nconst finalValue = computed<DatePickerValueType>(() =>\n props.type === 'multiple' ? [] : props.type === 'range' ? [null, null] : null,\n)\nconst [value, setValue] = useUncontrolled<DatePickerValueType>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: finalValue.value,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst formatted = computed(() =>\n formatValue(\n value.value,\n props.type,\n props.valueFormat,\n props.locale,\n props.labelSeparator,\n props.valueFormatter,\n ),\n)\nconst pickerProps = computed(() => {\n const {\n modelValue,\n defaultValue,\n valueFormat,\n labelSeparator,\n valueFormatter,\n closeOnChange,\n formattedValue,\n dropdownOpened,\n dropdownType,\n label,\n placeholder,\n clearable,\n disabled,\n required,\n error,\n size,\n variant,\n ...rest\n } = props\n void modelValue\n void defaultValue\n void valueFormat\n void labelSeparator\n void valueFormatter\n void closeOnChange\n void formattedValue\n void dropdownOpened\n void dropdownType\n void label\n void placeholder\n void clearable\n void disabled\n void required\n void error\n void size\n void variant\n return rest\n})\nfunction change(next: DatePickerValueType, close: () => void) {\n setValue(next)\n if (props.closeOnChange && props.type === 'default') close()\n}\nfunction openDropdown() {\n opened.value = true\n emit('dropdown-open')\n}\nfunction closeDropdown() {\n opened.value = false\n emit('dropdown-close')\n}\n</script>\n\n<template>\n <PickerInputBase\n v-bind=\"attrs\"\n :formatted-value=\"formatted\"\n :label=\"props.label\"\n :placeholder=\"props.placeholder\"\n :clearable=\"props.clearable\"\n :disabled=\"props.disabled\"\n :required=\"props.required\"\n :error=\"props.error\"\n :size=\"props.size\"\n :variant=\"props.variant\"\n :dropdown-type=\"props.dropdownType\"\n :dropdown-opened=\"opened\"\n @dropdown-open=\"openDropdown\"\n @dropdown-close=\"closeDropdown\"\n @clear=\"setValue(finalValue)\"\n >\n <template #default=\"{ close }\"\n ><Picker\n v-bind=\"pickerProps\"\n :type=\"props.type\"\n :model-value=\"value\"\n :sort-dates=\"props.sortDates\"\n @change=\"change($event, close)\"\n /></template>\n </PickerInputBase>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport PickerInputBase from '../PickerInputBase/PickerInputBase.vue'\nimport Picker from '../YearPicker/YearPicker.vue'\nimport { formatValue } from '../../utils'\nimport type { DatePickerInputProps, DatePickerValueType } from '../../types'\n\ndefineOptions({ name: 'YearPickerInput', inheritAttrs: false })\nconst props = withDefaults(defineProps<DatePickerInputProps>(), {\n type: 'default',\n valueFormat: 'YYYY',\n labelSeparator: '–',\n clearable: false,\n closeOnChange: true,\n sortDates: true,\n allowDeselect: true,\n withCellSpacing: true,\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: DatePickerValueType]\n change: [value: DatePickerValueType]\n 'dropdown-open': []\n 'dropdown-close': []\n}>()\nconst attrs = useAttrs()\nconst opened = ref(false)\nconst finalValue = computed<DatePickerValueType>(() =>\n props.type === 'multiple' ? [] : props.type === 'range' ? [null, null] : null,\n)\nconst [value, setValue] = useUncontrolled<DatePickerValueType>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: finalValue.value,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst formatted = computed(() =>\n formatValue(\n value.value,\n props.type,\n props.valueFormat,\n props.locale,\n props.labelSeparator,\n props.valueFormatter,\n ),\n)\nconst pickerProps = computed(() => {\n const {\n modelValue,\n defaultValue,\n valueFormat,\n labelSeparator,\n valueFormatter,\n closeOnChange,\n formattedValue,\n dropdownOpened,\n dropdownType,\n label,\n placeholder,\n clearable,\n disabled,\n required,\n error,\n size,\n variant,\n ...rest\n } = props\n void modelValue\n void defaultValue\n void valueFormat\n void labelSeparator\n void valueFormatter\n void closeOnChange\n void formattedValue\n void dropdownOpened\n void dropdownType\n void label\n void placeholder\n void clearable\n void disabled\n void required\n void error\n void size\n void variant\n return rest\n})\nfunction change(next: DatePickerValueType, close: () => void) {\n setValue(next)\n if (props.closeOnChange && props.type === 'default') close()\n}\nfunction openDropdown() {\n opened.value = true\n emit('dropdown-open')\n}\nfunction closeDropdown() {\n opened.value = false\n emit('dropdown-close')\n}\n</script>\n\n<template>\n <PickerInputBase\n v-bind=\"attrs\"\n :formatted-value=\"formatted\"\n :label=\"props.label\"\n :placeholder=\"props.placeholder\"\n :clearable=\"props.clearable\"\n :disabled=\"props.disabled\"\n :required=\"props.required\"\n :error=\"props.error\"\n :size=\"props.size\"\n :variant=\"props.variant\"\n :dropdown-type=\"props.dropdownType\"\n :dropdown-opened=\"opened\"\n @dropdown-open=\"openDropdown\"\n @dropdown-close=\"closeDropdown\"\n @clear=\"setValue(finalValue)\"\n >\n <template #default=\"{ close }\"\n ><Picker\n v-bind=\"pickerProps\"\n :type=\"props.type\"\n :model-value=\"value\"\n :sort-dates=\"props.sortDates\"\n @change=\"change($event, close)\"\n /></template>\n </PickerInputBase>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport PickerInputBase from '../PickerInputBase/PickerInputBase.vue'\nimport Picker from '../YearPicker/YearPicker.vue'\nimport { formatValue } from '../../utils'\nimport type { DatePickerInputProps, DatePickerValueType } from '../../types'\n\ndefineOptions({ name: 'YearPickerInput', inheritAttrs: false })\nconst props = withDefaults(defineProps<DatePickerInputProps>(), {\n type: 'default',\n valueFormat: 'YYYY',\n labelSeparator: '–',\n clearable: false,\n closeOnChange: true,\n sortDates: true,\n allowDeselect: true,\n withCellSpacing: true,\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: DatePickerValueType]\n change: [value: DatePickerValueType]\n 'dropdown-open': []\n 'dropdown-close': []\n}>()\nconst attrs = useAttrs()\nconst opened = ref(false)\nconst finalValue = computed<DatePickerValueType>(() =>\n props.type === 'multiple' ? [] : props.type === 'range' ? [null, null] : null,\n)\nconst [value, setValue] = useUncontrolled<DatePickerValueType>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: finalValue.value,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst formatted = computed(() =>\n formatValue(\n value.value,\n props.type,\n props.valueFormat,\n props.locale,\n props.labelSeparator,\n props.valueFormatter,\n ),\n)\nconst pickerProps = computed(() => {\n const {\n modelValue,\n defaultValue,\n valueFormat,\n labelSeparator,\n valueFormatter,\n closeOnChange,\n formattedValue,\n dropdownOpened,\n dropdownType,\n label,\n placeholder,\n clearable,\n disabled,\n required,\n error,\n size,\n variant,\n ...rest\n } = props\n void modelValue\n void defaultValue\n void valueFormat\n void labelSeparator\n void valueFormatter\n void closeOnChange\n void formattedValue\n void dropdownOpened\n void dropdownType\n void label\n void placeholder\n void clearable\n void disabled\n void required\n void error\n void size\n void variant\n return rest\n})\nfunction change(next: DatePickerValueType, close: () => void) {\n setValue(next)\n if (props.closeOnChange && props.type === 'default') close()\n}\nfunction openDropdown() {\n opened.value = true\n emit('dropdown-open')\n}\nfunction closeDropdown() {\n opened.value = false\n emit('dropdown-close')\n}\n</script>\n\n<template>\n <PickerInputBase\n v-bind=\"attrs\"\n :formatted-value=\"formatted\"\n :label=\"props.label\"\n :placeholder=\"props.placeholder\"\n :clearable=\"props.clearable\"\n :disabled=\"props.disabled\"\n :required=\"props.required\"\n :error=\"props.error\"\n :size=\"props.size\"\n :variant=\"props.variant\"\n :dropdown-type=\"props.dropdownType\"\n :dropdown-opened=\"opened\"\n @dropdown-open=\"openDropdown\"\n @dropdown-close=\"closeDropdown\"\n @clear=\"setValue(finalValue)\"\n >\n <template #default=\"{ close }\"\n ><Picker\n v-bind=\"pickerProps\"\n :type=\"props.type\"\n :model-value=\"value\"\n :sort-dates=\"props.sortDates\"\n @change=\"change($event, close)\"\n /></template>\n </PickerInputBase>\n</template>\n","<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport type { HiddenDatesInputProps } from '../../types'\n\ndefineOptions({ name: 'HiddenDatesInput' })\nconst props = defineProps<HiddenDatesInputProps>()\nconst serializedValue = computed(() =>\n Array.isArray(props.value) ? props.value.filter(Boolean).join(',') : props.value || '',\n)\n</script>\n\n<template>\n <input type=\"hidden\" :name=\"props.name\" :value=\"serializedValue\" />\n</template>\n","<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport type { HiddenDatesInputProps } from '../../types'\n\ndefineOptions({ name: 'HiddenDatesInput' })\nconst props = defineProps<HiddenDatesInputProps>()\nconst serializedValue = computed(() =>\n Array.isArray(props.value) ? props.value.filter(Boolean).join(',') : props.value || '',\n)\n</script>\n\n<template>\n <input type=\"hidden\" :name=\"props.name\" :value=\"serializedValue\" />\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, ref, useAttrs, watch } from 'vue'\nimport { Box, Button, CloseButton, Group, InputBase, Popover } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport Calendar from '../Calendar/Calendar.vue'\nimport { dateStringParser, isDateValid, isSameDate, toDateString } from '../../utils'\nimport type { DateInputProps, DateStringValue, DateValue } from '../../types'\n\ndefineOptions({ name: 'DateInput', inheritAttrs: false })\nconst props = withDefaults(defineProps<DateInputProps>(), {\n valueFormat: 'MMMM D, YYYY',\n clearable: false,\n withTime: false,\n})\nconst emit = defineEmits<{ 'update:modelValue': [value: DateValue]; change: [value: DateValue] }>()\nconst attrs = useAttrs()\nconst [value, setValue] = useUncontrolled<DateValue>({\n value: computed(() =>\n props.modelValue === undefined ? undefined : toDateString(props.modelValue),\n ),\n defaultValue: toDateString(props.defaultValue),\n finalValue: null,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst format = (next: DateValue) =>\n next\n ? typeof props.valueFormat === 'function'\n ? props.valueFormat(toDateString(next)!)\n : dayjs(next)\n .locale(props.locale || 'en')\n .format(props.valueFormat)\n : ''\nconst inputValue = ref(format(value.value))\nconst opened = ref(false)\nwatch(value, (next) => {\n if (!opened.value) inputValue.value = format(next)\n})\nfunction parse(raw: string) {\n let parsed: string | null\n if (props.dateParser) {\n parsed = props.dateParser(raw)\n } else if (typeof props.valueFormat === 'function') {\n const value = dayjs(raw)\n parsed = value.isValid()\n ? value.format(props.withTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD')\n : null\n } else {\n const value = dayjs(raw, props.valueFormat, props.locale || 'en', true)\n parsed = value.isValid()\n ? value.format(props.withTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD')\n : dateStringParser(raw, props.valueFormat, props.locale)\n }\n return parsed && isDateValid({ date: parsed, minDate: props.minDate, maxDate: props.maxDate })\n ? parsed\n : null\n}\nfunction commit() {\n opened.value = false\n if (!inputValue.value.trim()) {\n if (props.clearable) setValue(null)\n else inputValue.value = format(value.value)\n return\n }\n const parsed = parse(inputValue.value)\n if (parsed) setValue(parsed)\n else inputValue.value = format(value.value)\n}\nfunction select(date: DateStringValue) {\n setValue(date)\n inputValue.value = format(date)\n opened.value = false\n}\nfunction clear(event: MouseEvent) {\n event.stopPropagation()\n inputValue.value = ''\n setValue(null)\n}\nfunction onKeydown(event: KeyboardEvent) {\n if (event.key === 'Escape') opened.value = false\n}\n</script>\n\n<template>\n <Box>\n <Popover v-model:opened=\"opened\" position=\"bottom-start\">\n <Popover.Target>\n <InputBase\n v-bind=\"attrs\"\n :model-value=\"inputValue\"\n :right-section-pointer-events=\"props.clearable && value ? 'all' : undefined\"\n @input=\"inputValue = ($event.target as HTMLInputElement).value\"\n @focus=\"opened = true\"\n @click=\"opened = true\"\n @blur=\"commit\"\n @keydown=\"onKeydown\"\n >\n <template v-if=\"props.clearable && value\" #rightSection\n ><CloseButton @mousedown.stop @click=\"clear\"\n /></template>\n </InputBase>\n </Popover.Target>\n <Popover.Dropdown @mousedown.prevent>\n <Group v-if=\"props.presets?.length\" :gap=\"4\" :mb=\"4\"\n ><Button\n v-for=\"(preset, index) in props.presets\"\n :key=\"index\"\n size=\"xs\"\n variant=\"light\"\n @click=\"preset.value && select(preset.value)\"\n >{{ preset.label }}</Button\n ></Group\n >\n <Calendar\n :default-date=\"value || undefined\"\n :min-date=\"props.minDate\"\n :max-date=\"props.maxDate\"\n :locale=\"props.locale\"\n :get-day-props=\"\n (date) => ({ selected: isSameDate(date, value), onClick: () => select(date) })\n \"\n />\n </Popover.Dropdown>\n </Popover>\n </Box>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, ref, useAttrs, watch } from 'vue'\nimport { Box, Button, CloseButton, Group, InputBase, Popover } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport Calendar from '../Calendar/Calendar.vue'\nimport { dateStringParser, isDateValid, isSameDate, toDateString } from '../../utils'\nimport type { DateInputProps, DateStringValue, DateValue } from '../../types'\n\ndefineOptions({ name: 'DateInput', inheritAttrs: false })\nconst props = withDefaults(defineProps<DateInputProps>(), {\n valueFormat: 'MMMM D, YYYY',\n clearable: false,\n withTime: false,\n})\nconst emit = defineEmits<{ 'update:modelValue': [value: DateValue]; change: [value: DateValue] }>()\nconst attrs = useAttrs()\nconst [value, setValue] = useUncontrolled<DateValue>({\n value: computed(() =>\n props.modelValue === undefined ? undefined : toDateString(props.modelValue),\n ),\n defaultValue: toDateString(props.defaultValue),\n finalValue: null,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst format = (next: DateValue) =>\n next\n ? typeof props.valueFormat === 'function'\n ? props.valueFormat(toDateString(next)!)\n : dayjs(next)\n .locale(props.locale || 'en')\n .format(props.valueFormat)\n : ''\nconst inputValue = ref(format(value.value))\nconst opened = ref(false)\nwatch(value, (next) => {\n if (!opened.value) inputValue.value = format(next)\n})\nfunction parse(raw: string) {\n let parsed: string | null\n if (props.dateParser) {\n parsed = props.dateParser(raw)\n } else if (typeof props.valueFormat === 'function') {\n const value = dayjs(raw)\n parsed = value.isValid()\n ? value.format(props.withTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD')\n : null\n } else {\n const value = dayjs(raw, props.valueFormat, props.locale || 'en', true)\n parsed = value.isValid()\n ? value.format(props.withTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD')\n : dateStringParser(raw, props.valueFormat, props.locale)\n }\n return parsed && isDateValid({ date: parsed, minDate: props.minDate, maxDate: props.maxDate })\n ? parsed\n : null\n}\nfunction commit() {\n opened.value = false\n if (!inputValue.value.trim()) {\n if (props.clearable) setValue(null)\n else inputValue.value = format(value.value)\n return\n }\n const parsed = parse(inputValue.value)\n if (parsed) setValue(parsed)\n else inputValue.value = format(value.value)\n}\nfunction select(date: DateStringValue) {\n setValue(date)\n inputValue.value = format(date)\n opened.value = false\n}\nfunction clear(event: MouseEvent) {\n event.stopPropagation()\n inputValue.value = ''\n setValue(null)\n}\nfunction onKeydown(event: KeyboardEvent) {\n if (event.key === 'Escape') opened.value = false\n}\n</script>\n\n<template>\n <Box>\n <Popover v-model:opened=\"opened\" position=\"bottom-start\">\n <Popover.Target>\n <InputBase\n v-bind=\"attrs\"\n :model-value=\"inputValue\"\n :right-section-pointer-events=\"props.clearable && value ? 'all' : undefined\"\n @input=\"inputValue = ($event.target as HTMLInputElement).value\"\n @focus=\"opened = true\"\n @click=\"opened = true\"\n @blur=\"commit\"\n @keydown=\"onKeydown\"\n >\n <template v-if=\"props.clearable && value\" #rightSection\n ><CloseButton @mousedown.stop @click=\"clear\"\n /></template>\n </InputBase>\n </Popover.Target>\n <Popover.Dropdown @mousedown.prevent>\n <Group v-if=\"props.presets?.length\" :gap=\"4\" :mb=\"4\"\n ><Button\n v-for=\"(preset, index) in props.presets\"\n :key=\"index\"\n size=\"xs\"\n variant=\"light\"\n @click=\"preset.value && select(preset.value)\"\n >{{ preset.label }}</Button\n ></Group\n >\n <Calendar\n :default-date=\"value || undefined\"\n :min-date=\"props.minDate\"\n :max-date=\"props.maxDate\"\n :locale=\"props.locale\"\n :get-day-props=\"\n (date) => ({ selected: isSameDate(date, value), onClick: () => select(date) })\n \"\n />\n </Popover.Dropdown>\n </Popover>\n </Box>\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs } from 'vue'\nimport { InputBase } from '@mantine-vue/core'\nimport type { TimeInputProps } from '../../types'\n\ndefineOptions({ name: 'TimeInput', inheritAttrs: false })\nconst props = withDefaults(defineProps<TimeInputProps>(), { withSeconds: false })\nconst emit = defineEmits<{ 'update:modelValue': [value: string]; change: [value: string] }>()\nconst attrs = useAttrs()\n</script>\n\n<template>\n <InputBase\n v-bind=\"attrs\"\n type=\"time\"\n :step=\"props.withSeconds ? 1 : 60\"\n :model-value=\"props.modelValue\"\n :default-value=\"props.defaultValue\"\n @update:model-value=\"emit('update:modelValue', $event)\"\n @change=\"emit('change', $event)\"\n />\n</template>\n","<script setup lang=\"ts\">\nimport { useAttrs } from 'vue'\nimport { InputBase } from '@mantine-vue/core'\nimport type { TimeInputProps } from '../../types'\n\ndefineOptions({ name: 'TimeInput', inheritAttrs: false })\nconst props = withDefaults(defineProps<TimeInputProps>(), { withSeconds: false })\nconst emit = defineEmits<{ 'update:modelValue': [value: string]; change: [value: string] }>()\nconst attrs = useAttrs()\n</script>\n\n<template>\n <InputBase\n v-bind=\"attrs\"\n type=\"time\"\n :step=\"props.withSeconds ? 1 : 60\"\n :model-value=\"props.modelValue\"\n :default-value=\"props.defaultValue\"\n @update:model-value=\"emit('update:modelValue', $event)\"\n @change=\"emit('change', $event)\"\n />\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { Box, SimpleGrid, UnstyledButton } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport { compareTime, isSameTime } from '../../utils'\nimport type { TimeGridProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'TimeGrid', inheritAttrs: false })\nconst props = withDefaults(defineProps<TimeGridProps>(), {\n data: () => [],\n allowDeselect: false,\n disabled: false,\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: string | null]\n change: [value: string | null]\n}>()\nconst attrs = useAttrs()\nconst [value, setValue] = useUncontrolled<string | null>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: null,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst controlProps = (item: string) => props.getControlProps?.(item) || {}\nconst disabled = (item: string) =>\n !!(\n props.disabled ||\n (props.minTime && compareTime(item, props.minTime) < 0) ||\n (props.maxTime && compareTime(item, props.maxTime) > 0)\n )\nconst active = (item: string) => isSameTime(value.value ?? undefined, item)\nfunction select(item: string, event: MouseEvent) {\n controlProps(item).onClick?.(event)\n if (disabled(item)) return\n const next = props.allowDeselect && active(item) ? null : item\n if (next !== value.value) setValue(next)\n}\n</script>\n\n<template>\n <Box v-bind=\"attrs\" :class=\"[classes.timeGridRoot, attrs.class]\">\n <SimpleGrid :cols=\"3\" spacing=\"xs\" :class=\"classes.timeGrid\">\n <UnstyledButton\n v-for=\"item in props.data\"\n :key=\"item\"\n v-bind=\"controlProps(item)\"\n :class=\"[classes.timeGridControl, controlProps(item).class]\"\n :disabled=\"disabled(item) || controlProps(item).disabled\"\n :data-active=\"active(item) || undefined\"\n :data-disabled=\"disabled(item) || controlProps(item).disabled || undefined\"\n @click=\"select(item, $event)\"\n >{{ item }}</UnstyledButton\n >\n </SimpleGrid>\n </Box>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { Box, SimpleGrid, UnstyledButton } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport { compareTime, isSameTime } from '../../utils'\nimport type { TimeGridProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'TimeGrid', inheritAttrs: false })\nconst props = withDefaults(defineProps<TimeGridProps>(), {\n data: () => [],\n allowDeselect: false,\n disabled: false,\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: string | null]\n change: [value: string | null]\n}>()\nconst attrs = useAttrs()\nconst [value, setValue] = useUncontrolled<string | null>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: null,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst controlProps = (item: string) => props.getControlProps?.(item) || {}\nconst disabled = (item: string) =>\n !!(\n props.disabled ||\n (props.minTime && compareTime(item, props.minTime) < 0) ||\n (props.maxTime && compareTime(item, props.maxTime) > 0)\n )\nconst active = (item: string) => isSameTime(value.value ?? undefined, item)\nfunction select(item: string, event: MouseEvent) {\n controlProps(item).onClick?.(event)\n if (disabled(item)) return\n const next = props.allowDeselect && active(item) ? null : item\n if (next !== value.value) setValue(next)\n}\n</script>\n\n<template>\n <Box v-bind=\"attrs\" :class=\"[classes.timeGridRoot, attrs.class]\">\n <SimpleGrid :cols=\"3\" spacing=\"xs\" :class=\"classes.timeGrid\">\n <UnstyledButton\n v-for=\"item in props.data\"\n :key=\"item\"\n v-bind=\"controlProps(item)\"\n :class=\"[classes.timeGridControl, controlProps(item).class]\"\n :disabled=\"disabled(item) || controlProps(item).disabled\"\n :data-active=\"active(item) || undefined\"\n :data-disabled=\"disabled(item) || controlProps(item).disabled || undefined\"\n @click=\"select(item, $event)\"\n >{{ item }}</UnstyledButton\n >\n </SimpleGrid>\n </Box>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, watch } from 'vue'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport { padTime } from '../../utils'\nimport type { SpinInputEmits, SpinInputProps } from '../../types'\n\ndefineOptions({ name: 'SpinInput', inheritAttrs: false })\nconst props = withDefaults(defineProps<SpinInputProps>(), {\n modelValue: undefined,\n defaultValue: undefined,\n step: 1,\n allowTemporaryZero: false,\n placeholder: '--',\n disableAutoAdvance: false,\n disabled: false,\n readOnly: false,\n})\nconst emit = defineEmits<\n SpinInputEmits & {\n 'update:modelValue': [value: number | null]\n change: [value: number | null]\n }\n>()\nconst attrs = useAttrs()\nconst inputRef = ref<HTMLInputElement | null>(null)\nlet emittedValue: number | null | undefined\nconst [value, setValue] = useUncontrolled<number | null>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: null,\n onChange: (next) => {\n emittedValue = next\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\n\nwatch(\n () => props.modelValue,\n (next) => {\n const externalChange = next !== emittedValue\n emittedValue = undefined\n if (externalChange && document.activeElement === inputRef.value) inputRef.value?.select()\n },\n { flush: 'post' },\n)\nconst finiteMax = () => Number.isFinite(props.max)\nconst maxDigit = () => (finiteMax() ? Number(props.max.toFixed(0)[0]) : Infinity)\nconst arrowsMax = () => props.max + 1 - props.step\nfunction change(event: Event) {\n if (props.readOnly) return\n const input = event.currentTarget as HTMLInputElement\n const raw = input.value\n const digits = raw.replace(/\\D/g, '')\n if (!digits) {\n input.value = value.value === null ? '' : padTime(value.value)\n return\n }\n let parsed = 0\n for (const character of digits) {\n const digit = Number(character)\n const next = parsed * 10 + digit\n parsed = finiteMax() && next > props.max ? digit : next\n }\n const clamped =\n props.allowTemporaryZero && parsed === 0 && props.min > 0\n ? 0\n : finiteMax()\n ? Math.min(Math.max(parsed, props.min), props.max)\n : Math.max(parsed, props.min)\n setValue(clamped)\n input.value = padTime(clamped)\n if (!props.disableAutoAdvance && (clamped > maxDigit() || raw.startsWith('00')))\n emit('next-input')\n}\nfunction keydown(event: KeyboardEvent) {\n if (props.readOnly) return\n if (\n !event.isComposing &&\n event.key.length === 1 &&\n !/^\\d$/.test(event.key) &&\n !event.ctrlKey &&\n !event.metaKey &&\n !event.altKey\n ) {\n event.preventDefault()\n return\n }\n const target = event.currentTarget as HTMLInputElement\n if (\n (event.key === '0' || event.key === 'Num0') &&\n value.value === 0 &&\n !(\n target.value.length &&\n target.selectionStart === 0 &&\n target.selectionEnd === target.value.length\n )\n ) {\n event.preventDefault()\n emit('next-input')\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 emit('previous-input')\n }\n if (event.key === 'ArrowRight') {\n event.preventDefault()\n emit('next-input')\n }\n if (event.key === 'ArrowLeft') {\n event.preventDefault()\n emit('previous-input')\n }\n if (event.key === 'ArrowUp') {\n event.preventDefault()\n setValue(\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 )\n }\n if (event.key === 'ArrowDown') {\n event.preventDefault()\n setValue(\n value.value === null\n ? finiteMax()\n ? arrowsMax()\n : props.min\n : Math.min(Math.max(value.value - props.step, props.min), arrowsMax()),\n )\n }\n}\nfunction select(event: FocusEvent | MouseEvent) {\n ;(event.target as HTMLInputElement).select()\n}\n</script>\n\n<template>\n <input\n ref=\"inputRef\"\n v-bind=\"attrs\"\n type=\"text\"\n role=\"spinbutton\"\n :aria-valuemin=\"props.min\"\n :aria-valuemax=\"finiteMax() ? props.max : undefined\"\n :aria-valuenow=\"value === null ? 0 : value\"\n :data-empty=\"value === null || undefined\"\n inputmode=\"numeric\"\n :placeholder=\"props.placeholder\"\n :disabled=\"props.disabled\"\n :readonly=\"props.readOnly\"\n :value=\"value === null ? '' : padTime(value)\"\n @input=\"change\"\n @keydown=\"keydown\"\n @focus=\"select\"\n @click.stop=\"select\"\n @mousedown.stop\n @paste=\"(event) => emit('paste', event)\"\n />\n</template>\n","<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, watch } from 'vue'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport { padTime } from '../../utils'\nimport type { SpinInputEmits, SpinInputProps } from '../../types'\n\ndefineOptions({ name: 'SpinInput', inheritAttrs: false })\nconst props = withDefaults(defineProps<SpinInputProps>(), {\n modelValue: undefined,\n defaultValue: undefined,\n step: 1,\n allowTemporaryZero: false,\n placeholder: '--',\n disableAutoAdvance: false,\n disabled: false,\n readOnly: false,\n})\nconst emit = defineEmits<\n SpinInputEmits & {\n 'update:modelValue': [value: number | null]\n change: [value: number | null]\n }\n>()\nconst attrs = useAttrs()\nconst inputRef = ref<HTMLInputElement | null>(null)\nlet emittedValue: number | null | undefined\nconst [value, setValue] = useUncontrolled<number | null>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: null,\n onChange: (next) => {\n emittedValue = next\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\n\nwatch(\n () => props.modelValue,\n (next) => {\n const externalChange = next !== emittedValue\n emittedValue = undefined\n if (externalChange && document.activeElement === inputRef.value) inputRef.value?.select()\n },\n { flush: 'post' },\n)\nconst finiteMax = () => Number.isFinite(props.max)\nconst maxDigit = () => (finiteMax() ? Number(props.max.toFixed(0)[0]) : Infinity)\nconst arrowsMax = () => props.max + 1 - props.step\nfunction change(event: Event) {\n if (props.readOnly) return\n const input = event.currentTarget as HTMLInputElement\n const raw = input.value\n const digits = raw.replace(/\\D/g, '')\n if (!digits) {\n input.value = value.value === null ? '' : padTime(value.value)\n return\n }\n let parsed = 0\n for (const character of digits) {\n const digit = Number(character)\n const next = parsed * 10 + digit\n parsed = finiteMax() && next > props.max ? digit : next\n }\n const clamped =\n props.allowTemporaryZero && parsed === 0 && props.min > 0\n ? 0\n : finiteMax()\n ? Math.min(Math.max(parsed, props.min), props.max)\n : Math.max(parsed, props.min)\n setValue(clamped)\n input.value = padTime(clamped)\n if (!props.disableAutoAdvance && (clamped > maxDigit() || raw.startsWith('00')))\n emit('next-input')\n}\nfunction keydown(event: KeyboardEvent) {\n if (props.readOnly) return\n if (\n !event.isComposing &&\n event.key.length === 1 &&\n !/^\\d$/.test(event.key) &&\n !event.ctrlKey &&\n !event.metaKey &&\n !event.altKey\n ) {\n event.preventDefault()\n return\n }\n const target = event.currentTarget as HTMLInputElement\n if (\n (event.key === '0' || event.key === 'Num0') &&\n value.value === 0 &&\n !(\n target.value.length &&\n target.selectionStart === 0 &&\n target.selectionEnd === target.value.length\n )\n ) {\n event.preventDefault()\n emit('next-input')\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 emit('previous-input')\n }\n if (event.key === 'ArrowRight') {\n event.preventDefault()\n emit('next-input')\n }\n if (event.key === 'ArrowLeft') {\n event.preventDefault()\n emit('previous-input')\n }\n if (event.key === 'ArrowUp') {\n event.preventDefault()\n setValue(\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 )\n }\n if (event.key === 'ArrowDown') {\n event.preventDefault()\n setValue(\n value.value === null\n ? finiteMax()\n ? arrowsMax()\n : props.min\n : Math.min(Math.max(value.value - props.step, props.min), arrowsMax()),\n )\n }\n}\nfunction select(event: FocusEvent | MouseEvent) {\n ;(event.target as HTMLInputElement).select()\n}\n</script>\n\n<template>\n <input\n ref=\"inputRef\"\n v-bind=\"attrs\"\n type=\"text\"\n role=\"spinbutton\"\n :aria-valuemin=\"props.min\"\n :aria-valuemax=\"finiteMax() ? props.max : undefined\"\n :aria-valuenow=\"value === null ? 0 : value\"\n :data-empty=\"value === null || undefined\"\n inputmode=\"numeric\"\n :placeholder=\"props.placeholder\"\n :disabled=\"props.disabled\"\n :readonly=\"props.readOnly\"\n :value=\"value === null ? '' : padTime(value)\"\n @input=\"change\"\n @keydown=\"keydown\"\n @focus=\"select\"\n @click.stop=\"select\"\n @mousedown.stop\n @paste=\"(event) => emit('paste', event)\"\n />\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport type { AmPmInputEmits, AmPmInputProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'AmPmInput', inheritAttrs: false })\nconst props = withDefaults(defineProps<AmPmInputProps>(), {\n modelValue: undefined,\n defaultValue: undefined,\n labels: () => ({ am: 'AM', pm: 'PM' }),\n disabled: false,\n readOnly: false,\n})\nconst emit = defineEmits<\n AmPmInputEmits & {\n 'update:modelValue': [value: string | null]\n change: [value: string | null]\n }\n>()\nconst attrs = useAttrs()\nconst [value, setValue] = useUncontrolled<string | null>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: null,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nfunction change(event: Event) {\n if (!props.readOnly) setValue((event.target as HTMLSelectElement).value || null)\n}\nfunction keydown(event: KeyboardEvent) {\n if (props.readOnly) return\n if (event.key === 'Backspace' || event.key === 'Delete') {\n event.preventDefault()\n if (value.value === null) emit('previous-input')\n else setValue(null)\n }\n if (event.key === 'ArrowLeft') {\n event.preventDefault()\n emit('previous-input')\n }\n}\n</script>\n\n<template>\n <select\n v-bind=\"attrs\"\n :class=\"[classes.timePickerField, attrs.class]\"\n data-am-pm\n :disabled=\"props.disabled\"\n :aria-readonly=\"props.readOnly || undefined\"\n :value=\"value ?? ''\"\n @change=\"change\"\n @keydown=\"keydown\"\n >\n <option value=\"\">--</option>\n <option :value=\"props.labels.am\">{{ props.labels.am }}</option>\n <option :value=\"props.labels.pm\">{{ props.labels.pm }}</option>\n </select>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport type { AmPmInputEmits, AmPmInputProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'AmPmInput', inheritAttrs: false })\nconst props = withDefaults(defineProps<AmPmInputProps>(), {\n modelValue: undefined,\n defaultValue: undefined,\n labels: () => ({ am: 'AM', pm: 'PM' }),\n disabled: false,\n readOnly: false,\n})\nconst emit = defineEmits<\n AmPmInputEmits & {\n 'update:modelValue': [value: string | null]\n change: [value: string | null]\n }\n>()\nconst attrs = useAttrs()\nconst [value, setValue] = useUncontrolled<string | null>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: null,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nfunction change(event: Event) {\n if (!props.readOnly) setValue((event.target as HTMLSelectElement).value || null)\n}\nfunction keydown(event: KeyboardEvent) {\n if (props.readOnly) return\n if (event.key === 'Backspace' || event.key === 'Delete') {\n event.preventDefault()\n if (value.value === null) emit('previous-input')\n else setValue(null)\n }\n if (event.key === 'ArrowLeft') {\n event.preventDefault()\n emit('previous-input')\n }\n}\n</script>\n\n<template>\n <select\n v-bind=\"attrs\"\n :class=\"[classes.timePickerField, attrs.class]\"\n data-am-pm\n :disabled=\"props.disabled\"\n :aria-readonly=\"props.readOnly || undefined\"\n :value=\"value ?? ''\"\n @change=\"change\"\n @keydown=\"keydown\"\n >\n <option value=\"\">--</option>\n <option :value=\"props.labels.am\">{{ props.labels.am }}</option>\n <option :value=\"props.labels.pm\">{{ props.labels.pm }}</option>\n </select>\n</template>\n","<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { ScrollArea, UnstyledButton } from '@mantine-vue/core'\nimport { padTime } from '../../utils'\nimport type { TimeControlsListEmits, TimeControlsListProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'TimeControlsList' })\nconst props = withDefaults(defineProps<TimeControlsListProps>(), { step: 1, value: null })\nconst emit = defineEmits<TimeControlsListEmits>()\nconst items = computed(() =>\n Array.from(\n { length: Math.floor((props.max - props.min) / props.step) + 1 },\n (_, index) => props.min + index * props.step,\n ),\n)\n</script>\n\n<template>\n <ScrollArea :h=\"200\"\n ><div :class=\"classes.timePickerControlsList\">\n <UnstyledButton\n v-for=\"item in items\"\n :key=\"item\"\n :class=\"classes.timePickerControl\"\n :data-active=\"item === props.value || undefined\"\n @click=\"emit('select', item)\"\n >{{ props.formatValue ? props.formatValue(item) : padTime(item) }}</UnstyledButton\n >\n </div></ScrollArea\n >\n</template>\n","<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { ScrollArea, UnstyledButton } from '@mantine-vue/core'\nimport { padTime } from '../../utils'\nimport type { TimeControlsListEmits, TimeControlsListProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'TimeControlsList' })\nconst props = withDefaults(defineProps<TimeControlsListProps>(), { step: 1, value: null })\nconst emit = defineEmits<TimeControlsListEmits>()\nconst items = computed(() =>\n Array.from(\n { length: Math.floor((props.max - props.min) / props.step) + 1 },\n (_, index) => props.min + index * props.step,\n ),\n)\n</script>\n\n<template>\n <ScrollArea :h=\"200\"\n ><div :class=\"classes.timePickerControlsList\">\n <UnstyledButton\n v-for=\"item in items\"\n :key=\"item\"\n :class=\"classes.timePickerControl\"\n :data-active=\"item === props.value || undefined\"\n @click=\"emit('select', item)\"\n >{{ props.formatValue ? props.formatValue(item) : padTime(item) }}</UnstyledButton\n >\n </div></ScrollArea\n >\n</template>\n","<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, watch } from 'vue'\nimport { Button, CloseButton, Group, InputBase, Popover } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport AmPmInput from '../AmPmInput/AmPmInput.vue'\nimport SpinInput from '../SpinInput/SpinInput.vue'\nimport TimeControlsList from '../TimeControlsList/TimeControlsList.vue'\nimport { clampTime, getParsedTime, getTimeString } from '../../utils'\nimport type { TimePickerProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'TimePicker', inheritAttrs: false })\nconst props = withDefaults(defineProps<TimePickerProps>(), {\n type: 'time',\n withSeconds: false,\n format: '24h',\n amPmLabels: () => ({ am: 'AM', pm: 'PM' }),\n hoursStep: 1,\n minutesStep: 1,\n secondsStep: 1,\n clearable: false,\n withDropdown: false,\n disabled: false,\n readOnly: false,\n size: 'sm',\n closeDropdownOnPresetSelect: false,\n})\nconst emit = defineEmits<{ 'update:modelValue': [value: string]; change: [value: string] }>()\nconst attrs = useAttrs()\nconst effectiveFormat = computed<'12h' | '24h'>(() =>\n props.type === 'duration' ? '24h' : props.format,\n)\nconst [value, setValue] = useUncontrolled<string>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: '',\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst parsed = computed(() =>\n getParsedTime({ time: value.value, format: effectiveFormat.value, amPmLabels: props.amPmLabels }),\n)\nconst acceptValueSync = ref(true)\nconst initialTimeString = getTimeString({\n ...parsed.value,\n format: effectiveFormat.value,\n withSeconds: props.withSeconds,\n amPmLabels: props.amPmLabels,\n})\nconst wasInvalidBefore = ref(!initialTimeString.valid)\nconst hours = ref(parsed.value.hours),\n minutes = ref(parsed.value.minutes),\n seconds = ref(parsed.value.seconds),\n amPm = ref(parsed.value.amPm)\nwatch(value, (nextValue) => {\n if (!acceptValueSync.value) {\n acceptValueSync.value = true\n return\n }\n const next = getParsedTime({\n time: nextValue,\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 wasInvalidBefore.value = !getTimeString({\n ...next,\n format: effectiveFormat.value,\n withSeconds: props.withSeconds,\n amPmLabels: props.amPmLabels,\n }).valid\n})\nconst hoursInput = ref<any>(),\n minutesInput = ref<any>(),\n secondsInput = ref<any>(),\n amPmInput = ref<any>()\nconst element = (target: any) => target?.$el ?? target\nfunction focus(field: 'hours' | 'minutes' | 'seconds' | 'amPm') {\n element(\n field === 'hours'\n ? hoursInput.value\n : field === 'minutes'\n ? minutesInput.value\n : field === 'seconds'\n ? secondsInput.value\n : amPmInput.value,\n )?.focus?.()\n}\nwatch(\n hoursInput,\n (next) => {\n if (props.hoursRef) Reflect.set(props.hoursRef, 'value', element(next))\n },\n { immediate: true },\n)\nfunction 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 if (result.valid) {\n acceptValueSync.value = false\n wasInvalidBefore.value = false\n setValue(clampTime(result.value, props.min, props.max))\n } else if (!wasInvalidBefore.value) {\n acceptValueSync.value = false\n wasInvalidBefore.value = true\n setValue('')\n }\n}\nfunction setHours(next: number | null) {\n hours.value =\n effectiveFormat.value === '12h' && typeof next === 'number' && next > 12\n ? ((next - 1) % 12) + 1\n : next\n commit()\n}\nfunction setMinutes(next: number | null) {\n minutes.value = next\n commit()\n}\nfunction setSeconds(next: number | null) {\n seconds.value = next\n commit()\n}\nfunction setAmPm(next: string | null) {\n amPm.value = next\n commit()\n}\nfunction clear() {\n hours.value = null\n minutes.value = null\n seconds.value = null\n amPm.value = null\n acceptValueSync.value = false\n wasInvalidBefore.value = true\n setValue('')\n focus('hours')\n}\nconst isClearable = computed(\n () =>\n props.clearable &&\n !props.readOnly &&\n !props.disabled &&\n [hours.value, minutes.value, seconds.value, amPm.value].some((item) => item !== null),\n)\nconst opened = ref(false)\nfunction selectPreset(next: string) {\n setValue(next)\n if (props.closeDropdownOnPresetSelect) opened.value = false\n}\nfunction paste(event: ClipboardEvent) {\n if (props.readOnly || props.disabled) return\n const raw = event.clipboardData?.getData('text').trim()\n if (!raw || !/^\\d+:\\d{2}(?::\\d{2})?(?:\\s+[aApP][mM])?$/.test(raw)) return\n const next = getParsedTime({\n time: raw,\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}\nfunction openDropdown() {\n if (props.type !== 'duration' && props.withDropdown) opened.value = true\n}\nfunction handleTargetClick() {\n focus('hours')\n openDropdown()\n}\nfunction focusout(event: FocusEvent) {\n if (\n props.withDropdown &&\n !(event.currentTarget as HTMLElement).contains(event.relatedTarget as Node | null)\n )\n opened.value = false\n}\n</script>\n\n<template>\n <Popover\n :opened=\"props.type !== 'duration' && props.withDropdown && opened\"\n position=\"bottom-start\"\n :transition-props=\"{ duration: 0 }\"\n @update:opened=\"\n (next) => {\n if (!next) opened = false\n }\n \"\n >\n <Popover.Target>\n <InputBase\n v-bind=\"attrs\"\n component=\"div\"\n :size=\"props.size\"\n :disabled=\"props.disabled\"\n :right-section-pointer-events=\"isClearable ? 'all' : undefined\"\n @click=\"handleTargetClick\"\n @mousedown.prevent\n @focusin=\"openDropdown\"\n @focusout=\"focusout\"\n >\n <div :class=\"classes.timePickerFieldsRoot\" dir=\"ltr\">\n <div :class=\"classes.timePickerFieldsGroup\">\n <SpinInput\n ref=\"hoursInput\"\n :class=\"classes.timePickerField\"\n :model-value=\"hours\"\n :min=\"effectiveFormat === '12h' ? 1 : 0\"\n :max=\"props.type === 'duration' ? Infinity : effectiveFormat === '12h' ? 12 : 23\"\n :step=\"props.hoursStep\"\n :allow-temporary-zero=\"effectiveFormat === '12h'\"\n :disable-auto-advance=\"props.type === 'duration'\"\n :read-only=\"props.readOnly\"\n :disabled=\"props.disabled\"\n @next-input=\"focus('minutes')\"\n @paste=\"paste\"\n @change=\"setHours\"\n />\n <span>:</span>\n <SpinInput\n ref=\"minutesInput\"\n :class=\"classes.timePickerField\"\n :model-value=\"minutes\"\n :min=\"0\"\n :max=\"59\"\n :step=\"props.minutesStep\"\n :read-only=\"props.readOnly\"\n :disabled=\"props.disabled\"\n @previous-input=\"focus('hours')\"\n @next-input=\"focus(props.withSeconds ? 'seconds' : 'amPm')\"\n @change=\"setMinutes\"\n />\n <template v-if=\"props.withSeconds\"\n ><span>:</span\n ><SpinInput\n ref=\"secondsInput\"\n :class=\"classes.timePickerField\"\n :model-value=\"seconds\"\n :min=\"0\"\n :max=\"59\"\n :step=\"props.secondsStep\"\n :read-only=\"props.readOnly\"\n :disabled=\"props.disabled\"\n @previous-input=\"focus('minutes')\"\n @next-input=\"focus('amPm')\"\n @change=\"setSeconds\"\n /></template>\n <AmPmInput\n v-if=\"effectiveFormat === '12h'\"\n ref=\"amPmInput\"\n :model-value=\"amPm\"\n :labels=\"props.amPmLabels\"\n :read-only=\"props.readOnly\"\n :disabled=\"props.disabled\"\n @previous-input=\"focus(props.withSeconds ? 'seconds' : 'minutes')\"\n @change=\"setAmPm\"\n />\n </div>\n </div>\n <template v-if=\"isClearable\" #rightSection\n ><CloseButton :size=\"props.size\" @mousedown.prevent @click=\"clear\"\n /></template>\n </InputBase>\n </Popover.Target>\n <Popover.Dropdown :class=\"classes.timePickerDropdown\" @mousedown.prevent>\n <Group v-if=\"props.presets?.length\" :gap=\"4\" :class=\"classes.timePickerPresetsGroup\"\n ><Button\n v-for=\"preset in props.presets\"\n :key=\"preset.value\"\n size=\"xs\"\n variant=\"light\"\n @click=\"selectPreset(preset.value)\"\n >{{ preset.label }}</Button\n ></Group\n >\n <div v-else :class=\"classes.timePickerControlsListGroup\">\n <TimeControlsList\n :min=\"effectiveFormat === '12h' ? 1 : 0\"\n :max=\"effectiveFormat === '12h' ? 12 : 23\"\n :step=\"props.hoursStep\"\n :value=\"hours\"\n @select=\"setHours\"\n /><TimeControlsList\n :min=\"0\"\n :max=\"59\"\n :step=\"props.minutesStep\"\n :value=\"minutes\"\n @select=\"setMinutes\"\n /><TimeControlsList\n v-if=\"props.withSeconds\"\n :min=\"0\"\n :max=\"59\"\n :step=\"props.secondsStep\"\n :value=\"seconds\"\n @select=\"setSeconds\"\n />\n </div>\n </Popover.Dropdown>\n </Popover>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, watch } from 'vue'\nimport { Button, CloseButton, Group, InputBase, Popover } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport AmPmInput from '../AmPmInput/AmPmInput.vue'\nimport SpinInput from '../SpinInput/SpinInput.vue'\nimport TimeControlsList from '../TimeControlsList/TimeControlsList.vue'\nimport { clampTime, getParsedTime, getTimeString } from '../../utils'\nimport type { TimePickerProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'TimePicker', inheritAttrs: false })\nconst props = withDefaults(defineProps<TimePickerProps>(), {\n type: 'time',\n withSeconds: false,\n format: '24h',\n amPmLabels: () => ({ am: 'AM', pm: 'PM' }),\n hoursStep: 1,\n minutesStep: 1,\n secondsStep: 1,\n clearable: false,\n withDropdown: false,\n disabled: false,\n readOnly: false,\n size: 'sm',\n closeDropdownOnPresetSelect: false,\n})\nconst emit = defineEmits<{ 'update:modelValue': [value: string]; change: [value: string] }>()\nconst attrs = useAttrs()\nconst effectiveFormat = computed<'12h' | '24h'>(() =>\n props.type === 'duration' ? '24h' : props.format,\n)\nconst [value, setValue] = useUncontrolled<string>({\n value: computed(() => props.modelValue),\n defaultValue: props.defaultValue,\n finalValue: '',\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst parsed = computed(() =>\n getParsedTime({ time: value.value, format: effectiveFormat.value, amPmLabels: props.amPmLabels }),\n)\nconst acceptValueSync = ref(true)\nconst initialTimeString = getTimeString({\n ...parsed.value,\n format: effectiveFormat.value,\n withSeconds: props.withSeconds,\n amPmLabels: props.amPmLabels,\n})\nconst wasInvalidBefore = ref(!initialTimeString.valid)\nconst hours = ref(parsed.value.hours),\n minutes = ref(parsed.value.minutes),\n seconds = ref(parsed.value.seconds),\n amPm = ref(parsed.value.amPm)\nwatch(value, (nextValue) => {\n if (!acceptValueSync.value) {\n acceptValueSync.value = true\n return\n }\n const next = getParsedTime({\n time: nextValue,\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 wasInvalidBefore.value = !getTimeString({\n ...next,\n format: effectiveFormat.value,\n withSeconds: props.withSeconds,\n amPmLabels: props.amPmLabels,\n }).valid\n})\nconst hoursInput = ref<any>(),\n minutesInput = ref<any>(),\n secondsInput = ref<any>(),\n amPmInput = ref<any>()\nconst element = (target: any) => target?.$el ?? target\nfunction focus(field: 'hours' | 'minutes' | 'seconds' | 'amPm') {\n element(\n field === 'hours'\n ? hoursInput.value\n : field === 'minutes'\n ? minutesInput.value\n : field === 'seconds'\n ? secondsInput.value\n : amPmInput.value,\n )?.focus?.()\n}\nwatch(\n hoursInput,\n (next) => {\n if (props.hoursRef) Reflect.set(props.hoursRef, 'value', element(next))\n },\n { immediate: true },\n)\nfunction 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 if (result.valid) {\n acceptValueSync.value = false\n wasInvalidBefore.value = false\n setValue(clampTime(result.value, props.min, props.max))\n } else if (!wasInvalidBefore.value) {\n acceptValueSync.value = false\n wasInvalidBefore.value = true\n setValue('')\n }\n}\nfunction setHours(next: number | null) {\n hours.value =\n effectiveFormat.value === '12h' && typeof next === 'number' && next > 12\n ? ((next - 1) % 12) + 1\n : next\n commit()\n}\nfunction setMinutes(next: number | null) {\n minutes.value = next\n commit()\n}\nfunction setSeconds(next: number | null) {\n seconds.value = next\n commit()\n}\nfunction setAmPm(next: string | null) {\n amPm.value = next\n commit()\n}\nfunction clear() {\n hours.value = null\n minutes.value = null\n seconds.value = null\n amPm.value = null\n acceptValueSync.value = false\n wasInvalidBefore.value = true\n setValue('')\n focus('hours')\n}\nconst isClearable = computed(\n () =>\n props.clearable &&\n !props.readOnly &&\n !props.disabled &&\n [hours.value, minutes.value, seconds.value, amPm.value].some((item) => item !== null),\n)\nconst opened = ref(false)\nfunction selectPreset(next: string) {\n setValue(next)\n if (props.closeDropdownOnPresetSelect) opened.value = false\n}\nfunction paste(event: ClipboardEvent) {\n if (props.readOnly || props.disabled) return\n const raw = event.clipboardData?.getData('text').trim()\n if (!raw || !/^\\d+:\\d{2}(?::\\d{2})?(?:\\s+[aApP][mM])?$/.test(raw)) return\n const next = getParsedTime({\n time: raw,\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}\nfunction openDropdown() {\n if (props.type !== 'duration' && props.withDropdown) opened.value = true\n}\nfunction handleTargetClick() {\n focus('hours')\n openDropdown()\n}\nfunction focusout(event: FocusEvent) {\n if (\n props.withDropdown &&\n !(event.currentTarget as HTMLElement).contains(event.relatedTarget as Node | null)\n )\n opened.value = false\n}\n</script>\n\n<template>\n <Popover\n :opened=\"props.type !== 'duration' && props.withDropdown && opened\"\n position=\"bottom-start\"\n :transition-props=\"{ duration: 0 }\"\n @update:opened=\"\n (next) => {\n if (!next) opened = false\n }\n \"\n >\n <Popover.Target>\n <InputBase\n v-bind=\"attrs\"\n component=\"div\"\n :size=\"props.size\"\n :disabled=\"props.disabled\"\n :right-section-pointer-events=\"isClearable ? 'all' : undefined\"\n @click=\"handleTargetClick\"\n @mousedown.prevent\n @focusin=\"openDropdown\"\n @focusout=\"focusout\"\n >\n <div :class=\"classes.timePickerFieldsRoot\" dir=\"ltr\">\n <div :class=\"classes.timePickerFieldsGroup\">\n <SpinInput\n ref=\"hoursInput\"\n :class=\"classes.timePickerField\"\n :model-value=\"hours\"\n :min=\"effectiveFormat === '12h' ? 1 : 0\"\n :max=\"props.type === 'duration' ? Infinity : effectiveFormat === '12h' ? 12 : 23\"\n :step=\"props.hoursStep\"\n :allow-temporary-zero=\"effectiveFormat === '12h'\"\n :disable-auto-advance=\"props.type === 'duration'\"\n :read-only=\"props.readOnly\"\n :disabled=\"props.disabled\"\n @next-input=\"focus('minutes')\"\n @paste=\"paste\"\n @change=\"setHours\"\n />\n <span>:</span>\n <SpinInput\n ref=\"minutesInput\"\n :class=\"classes.timePickerField\"\n :model-value=\"minutes\"\n :min=\"0\"\n :max=\"59\"\n :step=\"props.minutesStep\"\n :read-only=\"props.readOnly\"\n :disabled=\"props.disabled\"\n @previous-input=\"focus('hours')\"\n @next-input=\"focus(props.withSeconds ? 'seconds' : 'amPm')\"\n @change=\"setMinutes\"\n />\n <template v-if=\"props.withSeconds\"\n ><span>:</span\n ><SpinInput\n ref=\"secondsInput\"\n :class=\"classes.timePickerField\"\n :model-value=\"seconds\"\n :min=\"0\"\n :max=\"59\"\n :step=\"props.secondsStep\"\n :read-only=\"props.readOnly\"\n :disabled=\"props.disabled\"\n @previous-input=\"focus('minutes')\"\n @next-input=\"focus('amPm')\"\n @change=\"setSeconds\"\n /></template>\n <AmPmInput\n v-if=\"effectiveFormat === '12h'\"\n ref=\"amPmInput\"\n :model-value=\"amPm\"\n :labels=\"props.amPmLabels\"\n :read-only=\"props.readOnly\"\n :disabled=\"props.disabled\"\n @previous-input=\"focus(props.withSeconds ? 'seconds' : 'minutes')\"\n @change=\"setAmPm\"\n />\n </div>\n </div>\n <template v-if=\"isClearable\" #rightSection\n ><CloseButton :size=\"props.size\" @mousedown.prevent @click=\"clear\"\n /></template>\n </InputBase>\n </Popover.Target>\n <Popover.Dropdown :class=\"classes.timePickerDropdown\" @mousedown.prevent>\n <Group v-if=\"props.presets?.length\" :gap=\"4\" :class=\"classes.timePickerPresetsGroup\"\n ><Button\n v-for=\"preset in props.presets\"\n :key=\"preset.value\"\n size=\"xs\"\n variant=\"light\"\n @click=\"selectPreset(preset.value)\"\n >{{ preset.label }}</Button\n ></Group\n >\n <div v-else :class=\"classes.timePickerControlsListGroup\">\n <TimeControlsList\n :min=\"effectiveFormat === '12h' ? 1 : 0\"\n :max=\"effectiveFormat === '12h' ? 12 : 23\"\n :step=\"props.hoursStep\"\n :value=\"hours\"\n @select=\"setHours\"\n /><TimeControlsList\n :min=\"0\"\n :max=\"59\"\n :step=\"props.minutesStep\"\n :value=\"minutes\"\n @select=\"setMinutes\"\n /><TimeControlsList\n v-if=\"props.withSeconds\"\n :min=\"0\"\n :max=\"59\"\n :step=\"props.secondsStep\"\n :value=\"seconds\"\n @select=\"setSeconds\"\n />\n </div>\n </Popover.Dropdown>\n </Popover>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, useAttrs } from 'vue'\nimport { Text } from '@mantine-vue/core'\nimport type { TimeValueProps } from '../../types'\n\ndefineOptions({ name: 'TimeValue', inheritAttrs: false })\nconst props = withDefaults(defineProps<TimeValueProps>(), { format: 'HH:mm' })\nconst attrs = useAttrs()\nconst formatted = computed(() =>\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</script>\n\n<template>\n <Text v-bind=\"attrs\">{{ formatted }}</Text>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, useAttrs } from 'vue'\nimport { Text } from '@mantine-vue/core'\nimport type { TimeValueProps } from '../../types'\n\ndefineOptions({ name: 'TimeValue', inheritAttrs: false })\nconst props = withDefaults(defineProps<TimeValueProps>(), { format: 'HH:mm' })\nconst attrs = useAttrs()\nconst formatted = computed(() =>\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</script>\n\n<template>\n <Text v-bind=\"attrs\">{{ formatted }}</Text>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, useAttrs } from 'vue'\nimport { ActionIcon, CheckIcon } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport DatePicker from '../DatePicker/DatePicker.vue'\nimport TimePicker from '../TimePicker/TimePicker.vue'\nimport { assignTime } from '../../utils'\nimport type { DatePickerValueType, DateTimePickerProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'InlineDateTimePicker', inheritAttrs: false })\nconst props = withDefaults(defineProps<DateTimePickerProps>(), {\n valueFormat: 'MMMM D, YYYY h:mm A',\n clearable: false,\n withSeconds: false,\n size: 'sm',\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: Date | null]\n change: [value: Date | null]\n submit: []\n}>()\nconst attrs = useAttrs()\nconst [value, setValue] = useUncontrolled<Date | null>({\n value: computed(() =>\n props.modelValue === undefined\n ? undefined\n : props.modelValue === null\n ? null\n : new Date(props.modelValue),\n ),\n defaultValue: props.defaultValue ? new Date(props.defaultValue) : null,\n finalValue: null,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst date = computed(() => (value.value ? dayjs(value.value).format('YYYY-MM-DD') : null))\nconst time = computed(() =>\n value.value ? dayjs(value.value).format(props.withSeconds ? 'HH:mm:ss' : 'HH:mm') : '',\n)\nconst forwardedHoursRef = { value: null as any }\nfunction updateDate(next: DatePickerValueType) {\n if (!next || Array.isArray(next)) return\n setValue(assignTime(next, `2024-01-01 ${time.value || '00:00'}`))\n forwardedHoursRef.value?.focus?.()\n}\nfunction updateTime(next: string) {\n if (date.value) setValue(assignTime(date.value, `2024-01-01 ${next}`))\n}\nfunction submit(event: MouseEvent) {\n props.submitButtonProps?.onClick?.(event)\n emit('submit')\n}\n</script>\n\n<template>\n <div v-bind=\"attrs\" :class=\"[classes.dateTimePicker, attrs.class]\">\n <DatePicker :full-width=\"props.fullWidth\" :model-value=\"date\" @change=\"updateDate\" />\n <div :class=\"classes.timeWrapper\">\n <div :class=\"classes.timeInput\">\n <TimePicker\n :model-value=\"time\"\n :with-seconds=\"props.withSeconds\"\n :size=\"props.size\"\n :hours-ref=\"forwardedHoursRef\"\n @change=\"updateTime\"\n />\n </div>\n <ActionIcon\n variant=\"default\"\n :size=\"`input-${props.size || 'sm'}`\"\n data-mantine-stop-propagation\n v-bind=\"props.submitButtonProps\"\n @click=\"submit\"\n ><CheckIcon size=\"30%\"\n /></ActionIcon>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, useAttrs } from 'vue'\nimport { ActionIcon, CheckIcon } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport DatePicker from '../DatePicker/DatePicker.vue'\nimport TimePicker from '../TimePicker/TimePicker.vue'\nimport { assignTime } from '../../utils'\nimport type { DatePickerValueType, DateTimePickerProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'InlineDateTimePicker', inheritAttrs: false })\nconst props = withDefaults(defineProps<DateTimePickerProps>(), {\n valueFormat: 'MMMM D, YYYY h:mm A',\n clearable: false,\n withSeconds: false,\n size: 'sm',\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: Date | null]\n change: [value: Date | null]\n submit: []\n}>()\nconst attrs = useAttrs()\nconst [value, setValue] = useUncontrolled<Date | null>({\n value: computed(() =>\n props.modelValue === undefined\n ? undefined\n : props.modelValue === null\n ? null\n : new Date(props.modelValue),\n ),\n defaultValue: props.defaultValue ? new Date(props.defaultValue) : null,\n finalValue: null,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst date = computed(() => (value.value ? dayjs(value.value).format('YYYY-MM-DD') : null))\nconst time = computed(() =>\n value.value ? dayjs(value.value).format(props.withSeconds ? 'HH:mm:ss' : 'HH:mm') : '',\n)\nconst forwardedHoursRef = { value: null as any }\nfunction updateDate(next: DatePickerValueType) {\n if (!next || Array.isArray(next)) return\n setValue(assignTime(next, `2024-01-01 ${time.value || '00:00'}`))\n forwardedHoursRef.value?.focus?.()\n}\nfunction updateTime(next: string) {\n if (date.value) setValue(assignTime(date.value, `2024-01-01 ${next}`))\n}\nfunction submit(event: MouseEvent) {\n props.submitButtonProps?.onClick?.(event)\n emit('submit')\n}\n</script>\n\n<template>\n <div v-bind=\"attrs\" :class=\"[classes.dateTimePicker, attrs.class]\">\n <DatePicker :full-width=\"props.fullWidth\" :model-value=\"date\" @change=\"updateDate\" />\n <div :class=\"classes.timeWrapper\">\n <div :class=\"classes.timeInput\">\n <TimePicker\n :model-value=\"time\"\n :with-seconds=\"props.withSeconds\"\n :size=\"props.size\"\n :hours-ref=\"forwardedHoursRef\"\n @change=\"updateTime\"\n />\n </div>\n <ActionIcon\n variant=\"default\"\n :size=\"`input-${props.size || 'sm'}`\"\n data-mantine-stop-propagation\n v-bind=\"props.submitButtonProps\"\n @click=\"submit\"\n ><CheckIcon size=\"30%\"\n /></ActionIcon>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, useAttrs } from 'vue'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport InlineDateTimePicker from '../InlineDateTimePicker/InlineDateTimePicker.vue'\nimport PickerInputBase from '../PickerInputBase/PickerInputBase.vue'\nimport type { DateTimePickerProps } from '../../types'\n\ndefineOptions({ name: 'DateTimePicker', inheritAttrs: false })\nconst props = withDefaults(defineProps<DateTimePickerProps>(), {\n valueFormat: 'MMMM D, YYYY h:mm A',\n clearable: false,\n withSeconds: false,\n size: 'sm',\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: Date | null]\n change: [value: Date | null]\n}>()\nconst attrs = useAttrs()\nconst [value, setValue] = useUncontrolled<Date | null>({\n value: computed(() =>\n props.modelValue === undefined\n ? undefined\n : props.modelValue === null\n ? null\n : new Date(props.modelValue),\n ),\n defaultValue: props.defaultValue ? new Date(props.defaultValue) : null,\n finalValue: null,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst formatted = computed(() => (value.value ? dayjs(value.value).format(props.valueFormat) : ''))\n</script>\n\n<template>\n <PickerInputBase\n v-bind=\"attrs\"\n :formatted-value=\"formatted\"\n :clearable=\"props.clearable\"\n :disabled=\"props.disabled\"\n :required=\"props.required\"\n :error=\"props.error\"\n :label=\"props.label\"\n :placeholder=\"props.placeholder\"\n :size=\"props.size\"\n :variant=\"props.variant\"\n :dropdown-type=\"props.dropdownType\"\n @clear=\"setValue(null)\"\n >\n <template #default=\"{ close }\"\n ><InlineDateTimePicker\n :model-value=\"value\"\n :with-seconds=\"props.withSeconds\"\n :size=\"props.size\"\n :submit-button-props=\"props.submitButtonProps\"\n :full-width=\"false\"\n @change=\"setValue\"\n @submit=\"close\"\n /></template>\n </PickerInputBase>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, useAttrs } from 'vue'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport InlineDateTimePicker from '../InlineDateTimePicker/InlineDateTimePicker.vue'\nimport PickerInputBase from '../PickerInputBase/PickerInputBase.vue'\nimport type { DateTimePickerProps } from '../../types'\n\ndefineOptions({ name: 'DateTimePicker', inheritAttrs: false })\nconst props = withDefaults(defineProps<DateTimePickerProps>(), {\n valueFormat: 'MMMM D, YYYY h:mm A',\n clearable: false,\n withSeconds: false,\n size: 'sm',\n})\nconst emit = defineEmits<{\n 'update:modelValue': [value: Date | null]\n change: [value: Date | null]\n}>()\nconst attrs = useAttrs()\nconst [value, setValue] = useUncontrolled<Date | null>({\n value: computed(() =>\n props.modelValue === undefined\n ? undefined\n : props.modelValue === null\n ? null\n : new Date(props.modelValue),\n ),\n defaultValue: props.defaultValue ? new Date(props.defaultValue) : null,\n finalValue: null,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst formatted = computed(() => (value.value ? dayjs(value.value).format(props.valueFormat) : ''))\n</script>\n\n<template>\n <PickerInputBase\n v-bind=\"attrs\"\n :formatted-value=\"formatted\"\n :clearable=\"props.clearable\"\n :disabled=\"props.disabled\"\n :required=\"props.required\"\n :error=\"props.error\"\n :label=\"props.label\"\n :placeholder=\"props.placeholder\"\n :size=\"props.size\"\n :variant=\"props.variant\"\n :dropdown-type=\"props.dropdownType\"\n @clear=\"setValue(null)\"\n >\n <template #default=\"{ close }\"\n ><InlineDateTimePicker\n :model-value=\"value\"\n :with-seconds=\"props.withSeconds\"\n :size=\"props.size\"\n :submit-button-props=\"props.submitButtonProps\"\n :full-width=\"false\"\n @change=\"setValue\"\n @submit=\"close\"\n /></template>\n </PickerInputBase>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, useAttrs } from 'vue'\nimport { AccordionChevron, Box, UnstyledButton } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport { useDatesContext } from '../DatesProvider'\nimport { toDateString } from '../../utils'\nimport type { DateStringValue, DateValue, MiniCalendarEmits, MiniCalendarProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'MiniCalendar', inheritAttrs: false })\nconst props = withDefaults(defineProps<MiniCalendarProps>(), {\n numberOfDays: 7,\n monthLabelFormat: 'MMM',\n size: 'sm',\n})\nconst emit = defineEmits<\n MiniCalendarEmits & {\n 'update:modelValue': [value: DateValue]\n change: [value: DateValue]\n 'update:date': [value: DateStringValue]\n 'date-change': [value: DateStringValue]\n }\n>()\nconst attrs = useAttrs(),\n context = useDatesContext()\nconst [value, setValue] = useUncontrolled<DateValue>({\n value: computed(() =>\n props.modelValue === undefined ? undefined : toDateString(props.modelValue),\n ),\n defaultValue: toDateString(props.defaultValue),\n finalValue: null,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst [date, setDate] = useUncontrolled<DateStringValue>({\n value: computed(() => toDateString(props.date) || undefined),\n defaultValue: toDateString(props.defaultDate) || undefined,\n finalValue: value.value || dayjs().format('YYYY-MM-DD'),\n onChange: (next) => {\n emit('update:date', next)\n emit('date-change', next)\n },\n})\nconst range = computed(() =>\n Array.from({ length: props.numberOfDays }, (_, index) => dayjs(date.value).add(index, 'days')),\n)\nconst previousDisabled = computed(() =>\n props.minDate ? dayjs(date.value).subtract(1, 'day').isBefore(dayjs(props.minDate)) : false,\n)\nconst nextDisabled = computed(() =>\n props.maxDate\n ? dayjs(date.value).add(props.numberOfDays, 'day').isAfter(dayjs(props.maxDate))\n : false,\n)\nconst dayProps = (item: dayjs.Dayjs) => props.getDayProps?.(item.format('YYYY-MM-DD')) || {}\nconst disabled = (item: dayjs.Dayjs) =>\n !!(\n (props.minDate && item.isBefore(dayjs(props.minDate), 'day')) ||\n (props.maxDate && item.isAfter(dayjs(props.maxDate), 'day'))\n )\nfunction previous() {\n emit('previous')\n setDate(dayjs(date.value).subtract(props.numberOfDays, 'day').format('YYYY-MM-DD'))\n}\nfunction next() {\n emit('next')\n setDate(dayjs(date.value).add(props.numberOfDays, 'day').format('YYYY-MM-DD'))\n}\nfunction select(item: dayjs.Dayjs, event: MouseEvent) {\n dayProps(item).onClick?.(event)\n setValue(item.format('YYYY-MM-DD'))\n}\nconst previousContent = () => props.previousControlProps?.children\nconst nextContent = () => props.nextControlProps?.children\n</script>\n\n<template>\n <Box v-bind=\"attrs\" :class=\"[classes.miniCalendarRoot, attrs.class]\">\n <UnstyledButton\n v-bind=\"props.previousControlProps\"\n :class=\"[classes.miniCalendarControl, props.previousControlProps?.class]\"\n :disabled=\"previousDisabled\"\n :data-disabled=\"previousDisabled || undefined\"\n data-direction=\"previous\"\n @click=\"previous\"\n ><component\n :is=\"previousContent\"\n v-if=\"props.previousControlProps?.children\" /><AccordionChevron\n v-else\n data-chevron\n :size=\"props.size\"\n /></UnstyledButton>\n <div :class=\"classes.miniCalendarDays\">\n <UnstyledButton\n v-for=\"item in range\"\n :key=\"item.toString()\"\n v-bind=\"dayProps(item)\"\n :class=\"[classes.miniCalendarDay, dayProps(item).class]\"\n :disabled=\"disabled(item)\"\n :aria-label=\"item.format('YYYY-MM-DD')\"\n :data-disabled=\"disabled(item) || undefined\"\n :data-selected=\"(value && item.isSame(value, 'day')) || undefined\"\n @click=\"select(item, $event)\"\n ><span :class=\"classes.miniCalendarDayMonth\">{{\n typeof props.monthLabelFormat === 'function'\n ? props.monthLabelFormat(item.format('YYYY-MM-DD') as DateStringValue)\n : item.locale(props.locale || context.locale).format(props.monthLabelFormat)\n }}</span\n ><span :class=\"classes.miniCalendarDayNumber\">{{ item.date() }}</span></UnstyledButton\n >\n </div>\n <UnstyledButton\n v-bind=\"props.nextControlProps\"\n :class=\"[classes.miniCalendarControl, props.nextControlProps?.class]\"\n :disabled=\"nextDisabled\"\n :data-disabled=\"nextDisabled || undefined\"\n data-direction=\"next\"\n @click=\"next\"\n ><component :is=\"nextContent\" v-if=\"props.nextControlProps?.children\" /><AccordionChevron\n v-else\n data-chevron\n :size=\"props.size\"\n /></UnstyledButton>\n </Box>\n</template>\n","<script setup lang=\"ts\">\nimport dayjs from 'dayjs'\nimport { computed, useAttrs } from 'vue'\nimport { AccordionChevron, Box, UnstyledButton } from '@mantine-vue/core'\nimport { useUncontrolled } from '@mantine-vue/hooks'\nimport { useDatesContext } from '../DatesProvider'\nimport { toDateString } from '../../utils'\nimport type { DateStringValue, DateValue, MiniCalendarEmits, MiniCalendarProps } from '../../types'\nimport classes from '../../Dates.module.css'\n\ndefineOptions({ name: 'MiniCalendar', inheritAttrs: false })\nconst props = withDefaults(defineProps<MiniCalendarProps>(), {\n numberOfDays: 7,\n monthLabelFormat: 'MMM',\n size: 'sm',\n})\nconst emit = defineEmits<\n MiniCalendarEmits & {\n 'update:modelValue': [value: DateValue]\n change: [value: DateValue]\n 'update:date': [value: DateStringValue]\n 'date-change': [value: DateStringValue]\n }\n>()\nconst attrs = useAttrs(),\n context = useDatesContext()\nconst [value, setValue] = useUncontrolled<DateValue>({\n value: computed(() =>\n props.modelValue === undefined ? undefined : toDateString(props.modelValue),\n ),\n defaultValue: toDateString(props.defaultValue),\n finalValue: null,\n onChange: (next) => {\n emit('update:modelValue', next)\n emit('change', next)\n },\n})\nconst [date, setDate] = useUncontrolled<DateStringValue>({\n value: computed(() => toDateString(props.date) || undefined),\n defaultValue: toDateString(props.defaultDate) || undefined,\n finalValue: value.value || dayjs().format('YYYY-MM-DD'),\n onChange: (next) => {\n emit('update:date', next)\n emit('date-change', next)\n },\n})\nconst range = computed(() =>\n Array.from({ length: props.numberOfDays }, (_, index) => dayjs(date.value).add(index, 'days')),\n)\nconst previousDisabled = computed(() =>\n props.minDate ? dayjs(date.value).subtract(1, 'day').isBefore(dayjs(props.minDate)) : false,\n)\nconst nextDisabled = computed(() =>\n props.maxDate\n ? dayjs(date.value).add(props.numberOfDays, 'day').isAfter(dayjs(props.maxDate))\n : false,\n)\nconst dayProps = (item: dayjs.Dayjs) => props.getDayProps?.(item.format('YYYY-MM-DD')) || {}\nconst disabled = (item: dayjs.Dayjs) =>\n !!(\n (props.minDate && item.isBefore(dayjs(props.minDate), 'day')) ||\n (props.maxDate && item.isAfter(dayjs(props.maxDate), 'day'))\n )\nfunction previous() {\n emit('previous')\n setDate(dayjs(date.value).subtract(props.numberOfDays, 'day').format('YYYY-MM-DD'))\n}\nfunction next() {\n emit('next')\n setDate(dayjs(date.value).add(props.numberOfDays, 'day').format('YYYY-MM-DD'))\n}\nfunction select(item: dayjs.Dayjs, event: MouseEvent) {\n dayProps(item).onClick?.(event)\n setValue(item.format('YYYY-MM-DD'))\n}\nconst previousContent = () => props.previousControlProps?.children\nconst nextContent = () => props.nextControlProps?.children\n</script>\n\n<template>\n <Box v-bind=\"attrs\" :class=\"[classes.miniCalendarRoot, attrs.class]\">\n <UnstyledButton\n v-bind=\"props.previousControlProps\"\n :class=\"[classes.miniCalendarControl, props.previousControlProps?.class]\"\n :disabled=\"previousDisabled\"\n :data-disabled=\"previousDisabled || undefined\"\n data-direction=\"previous\"\n @click=\"previous\"\n ><component\n :is=\"previousContent\"\n v-if=\"props.previousControlProps?.children\" /><AccordionChevron\n v-else\n data-chevron\n :size=\"props.size\"\n /></UnstyledButton>\n <div :class=\"classes.miniCalendarDays\">\n <UnstyledButton\n v-for=\"item in range\"\n :key=\"item.toString()\"\n v-bind=\"dayProps(item)\"\n :class=\"[classes.miniCalendarDay, dayProps(item).class]\"\n :disabled=\"disabled(item)\"\n :aria-label=\"item.format('YYYY-MM-DD')\"\n :data-disabled=\"disabled(item) || undefined\"\n :data-selected=\"(value && item.isSame(value, 'day')) || undefined\"\n @click=\"select(item, $event)\"\n ><span :class=\"classes.miniCalendarDayMonth\">{{\n typeof props.monthLabelFormat === 'function'\n ? props.monthLabelFormat(item.format('YYYY-MM-DD') as DateStringValue)\n : item.locale(props.locale || context.locale).format(props.monthLabelFormat)\n }}</span\n ><span :class=\"classes.miniCalendarDayNumber\">{{ item.date() }}</span></UnstyledButton\n >\n </div>\n <UnstyledButton\n v-bind=\"props.nextControlProps\"\n :class=\"[classes.miniCalendarControl, props.nextControlProps?.class]\"\n :disabled=\"nextDisabled\"\n :data-disabled=\"nextDisabled || undefined\"\n data-direction=\"next\"\n @click=\"next\"\n ><component :is=\"nextContent\" v-if=\"props.nextControlProps?.children\" /><AccordionChevron\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