{"version":3,"file":"DatePickerCalendar.cjs","sources":["../../src/DatePicker/DatePickerCalendar.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { type DateValue, isEqualDay } from '@internationalized/date'\nimport { CalendarRoot } from '..'\nimport { injectDatePickerRootContext } from './DatePickerRoot.vue'\n</script>\n\n<script setup lang=\"ts\">\nconst rootContext = injectDatePickerRootContext()\n</script>\n\n<template>\n  <CalendarRoot\n    v-slot=\"{ weekDays, grid, date, weekStartsOn, locale, fixedWeeks }\"\n    v-bind=\"{\n      isDateDisabled: rootContext.isDateDisabled,\n      isDateUnavailable: rootContext.isDateUnavailable,\n      minValue: rootContext.minValue.value,\n      maxValue: rootContext.maxValue.value,\n      locale: rootContext.locale.value,\n      disabled: rootContext.disabled.value,\n      pagedNavigation: rootContext.pagedNavigation.value,\n      weekStartsOn: rootContext.weekStartsOn.value,\n      weekdayFormat: rootContext.weekdayFormat.value,\n      fixedWeeks: rootContext.fixedWeeks.value,\n      numberOfMonths: rootContext.numberOfMonths.value,\n      readonly: rootContext.readonly.value,\n      preventDeselect: rootContext.preventDeselect.value,\n      dir: rootContext.dir.value,\n    }\"\n    :model-value=\"rootContext.modelValue.value\"\n    :placeholder=\"rootContext.placeholder.value\"\n    initial-focus\n    :multiple=\"false\"\n    @update:model-value=\"(date: DateValue | undefined) => {\n      if (date && rootContext.modelValue.value && isEqualDay(date, rootContext.modelValue.value)) return\n      rootContext.onDateChange(date)\n    }\"\n    @update:placeholder=\"(date: DateValue) => {\n      if (isEqualDay(date, rootContext.placeholder.value)) return\n      rootContext.onPlaceholderChange(date)\n    }\"\n  >\n    <slot\n      :date=\"date\"\n      :grid=\"grid\"\n      :week-days=\"weekDays\"\n      :week-starts-on=\"weekStartsOn\"\n      :locale=\"locale\"\n      :fixed-weeks=\"fixedWeeks\"\n    />\n  </CalendarRoot>\n</template>\n"],"names":["injectDatePickerRootContext"],"mappings":";;;;;;;;;;;AAOA,IAAA,MAAM,cAAcA,qDAA4B,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}