reka-ui
Version:
Vue port for Radix UI Primitives.
1 lines • 2.07 kB
Source Map (JSON)
{"version":3,"file":"DateRangePickerField.cjs","sources":["../../src/DateRangePicker/DateRangePickerField.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { isEqualDay } from '@internationalized/date'\nimport { DateRangeFieldRoot } from '..'\nimport { injectDateRangePickerRootContext } from './DateRangePickerRoot.vue'\n</script>\n\n<script setup lang=\"ts\">\nconst rootContext = injectDateRangePickerRootContext()\n</script>\n\n<template>\n <DateRangeFieldRoot\n v-slot=\"{ segments, modelValue }\"\n :ref=\"rootContext.dateFieldRef\"\n :model-value=\"rootContext.modelValue.value\"\n :placeholder=\"rootContext.placeholder.value\"\n v-bind=\"{\n id: rootContext.id.value,\n name: rootContext.name.value,\n disabled: rootContext.disabled.value,\n minValue: rootContext.minValue.value,\n maxValue: rootContext.maxValue.value,\n readonly: rootContext.readonly.value,\n hourCycle: rootContext.hourCycle.value,\n granularity: rootContext.granularity.value,\n hideTimeZone: rootContext.hideTimeZone.value,\n locale: rootContext.locale.value,\n isDateUnavailable: rootContext.isDateUnavailable,\n required: rootContext.required.value,\n dir: rootContext.dir.value,\n }\"\n @update:model-value=\"(date) => {\n if (date.start && rootContext.modelValue.value.start && date.end && rootContext.modelValue.value.end && date.start.compare(rootContext.modelValue.value.start) === 0 && date.end.compare(rootContext.modelValue.value.end) === 0) return\n rootContext.onDateChange(date)\n }\"\n @update:placeholder=\"(date) => {\n if (isEqualDay(date, rootContext.placeholder.value) && date.compare(rootContext.placeholder.value) === 0) return\n rootContext.onPlaceholderChange(date)\n }\"\n >\n <slot\n :segments=\"segments\"\n :model-value=\"modelValue\"\n />\n </DateRangeFieldRoot>\n</template>\n"],"names":["injectDateRangePickerRootContext"],"mappings":";;;;;;;;;;;AAOA,IAAA,MAAM,cAAcA,oEAAiC,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}