reka-ui
Version:
Vue port for Radix UI Primitives.
1 lines • 1.14 kB
Source Map (JSON)
{"version":3,"file":"CalendarCell.cjs","sources":["../../src/Calendar/CalendarCell.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { DateValue } from '@internationalized/date'\n\nexport interface CalendarCellProps extends PrimitiveProps {\n /** The date value for the cell */\n date: DateValue\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectCalendarRootContext } from './CalendarRoot.vue'\n\nwithDefaults(defineProps<CalendarCellProps>(), { as: 'td' })\nconst rootContext = injectCalendarRootContext()\n</script>\n\n<template>\n <Primitive\n :as=\"as\"\n :as-child=\"asChild\"\n role=\"gridcell\"\n :aria-selected=\"rootContext.isDateSelected(date) ? true : undefined\"\n :aria-disabled=\"rootContext.isDateDisabled(date) || rootContext.isDateUnavailable?.(date)\"\n :data-disabled=\"rootContext.isDateDisabled(date) ? '' : undefined\"\n >\n <slot />\n </Primitive>\n</template>\n"],"names":["injectCalendarRootContext"],"mappings":";;;;;;;;;;;;;;AAeA,IAAA,MAAM,cAAcA,+CAA0B,EAAA;;;;;;;;;;;;;;;;;;;;;"}