UNPKG

element-plus

Version:

A Component Library for Vue 3

1 lines 1.63 kB
{"version":3,"file":"calendar.mjs","sources":["../../../../../../packages/components/calendar/src/calendar.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\nimport type Calendar from './calendar.vue'\n\nexport type CalendarDateType =\n | 'prev-month'\n | 'next-month'\n | 'prev-year'\n | 'next-year'\n | 'today'\n\nexport const calendarProps = buildProps({\n modelValue: {\n type: Date,\n },\n range: {\n type: definePropType<[Date, Date]>(Array),\n validator: (range: unknown): range is [Date, Date] =>\n Array.isArray(range) &&\n range.length === 2 &&\n range.every((item) => item instanceof Date),\n },\n} as const)\nexport type CalendarProps = ExtractPropTypes<typeof calendarProps>\n\nexport const calendarEmits = {\n [UPDATE_MODEL_EVENT]: (value: Date) => value instanceof Date,\n input: (value: Date) => value instanceof Date,\n}\nexport type CalendarEmits = typeof calendarEmits\n\nexport type CalendarInstance = InstanceType<typeof Calendar>\n"],"names":[],"mappings":";;;;;AAEY,MAAC,aAAa,GAAG,UAAU,CAAC;AACxC,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,IAAI;AACd,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,SAAS,EAAE,CAAC,KAAK,KAAK,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,KAAK,IAAI,YAAY,IAAI,CAAC;AACnH,GAAG;AACH,CAAC,EAAE;AACS,MAAC,aAAa,GAAG;AAC7B,EAAE,CAAC,kBAAkB,GAAG,CAAC,KAAK,KAAK,KAAK,YAAY,IAAI;AACxD,EAAE,KAAK,EAAE,CAAC,KAAK,KAAK,KAAK,YAAY,IAAI;AACzC;;;;"}