UNPKG

reka-ui

Version:

Vue port for Radix UI Primitives.

1 lines 2.44 kB
{"version":3,"file":"DateRangePickerCalendar.cjs","sources":["../../src/DateRangePicker/DateRangePickerCalendar.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { isEqualDay } from '@internationalized/date'\nimport { RangeCalendarRoot } from '..'\nimport { injectDateRangePickerRootContext } from './DateRangePickerRoot.vue'\n</script>\n\n<script setup lang=\"ts\">\nconst rootContext = injectDateRangePickerRootContext()\n</script>\n\n<template>\n <RangeCalendarRoot\n v-slot=\"{ weekDays, grid, date, weekStartsOn, locale, fixedWeeks }\"\n v-bind=\"{\n allowNonContiguousRanges: rootContext.allowNonContiguousRanges.value,\n isDateDisabled: rootContext.isDateDisabled,\n isDateUnavailable: rootContext.isDateUnavailable,\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 minValue: rootContext.minValue.value,\n maxValue: rootContext.maxValue.value,\n dir: rootContext.dir.value,\n }\"\n initial-focus\n :model-value=\"rootContext.modelValue.value\"\n :placeholder=\"rootContext.placeholder.value\"\n @update:start-value=\"(date) => {\n rootContext.onStartValueChange(date)\n }\"\n @update:model-value=\"(date) => {\n if (date.start && rootContext.modelValue.value?.start && date.end && rootContext.modelValue.value?.end && isEqualDay(date.start, rootContext.modelValue.value?.start) && isEqualDay(date.end, rootContext.modelValue.value?.end)) return\n rootContext.onDateChange(date)\n }\"\n @update:placeholder=\"(date) => {\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 </RangeCalendarRoot>\n</template>\n"],"names":["injectDateRangePickerRootContext"],"mappings":";;;;;;;;;;;AAOA,IAAA,MAAM,cAAcA,oEAAiC,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}