element-plus
Version:
A Component Library for Vue 3
1 lines • 4.76 kB
Source Map (JSON)
{"version":3,"file":"time-select.mjs","sources":["../../../../../../packages/components/time-select/src/time-select.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport { CircleClose, Clock } from '@element-plus/icons-vue'\nimport { useEmptyValuesProps, useSizeProp } from '@element-plus/hooks'\n\nimport type { PopperEffect } from '@element-plus/components/popper'\nimport type TimeSelect from './time-select.vue'\nimport type {\n CSSProperties,\n Component,\n ExtractPropTypes,\n ExtractPublicPropTypes,\n} from 'vue'\n\nexport const timeSelectProps = buildProps({\n /**\n * @description set format of time\n */\n format: {\n type: String,\n default: 'HH:mm',\n },\n /**\n * @description binding value\n */\n modelValue: {\n type: definePropType<string | null>(String),\n },\n /**\n * @description whether TimeSelect is disabled\n */\n disabled: {\n type: Boolean,\n default: undefined,\n },\n /**\n * @description whether the input is editable\n */\n editable: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Tooltip theme, built-in theme: `dark` / `light`\n */\n effect: {\n type: definePropType<PopperEffect>(String),\n default: 'light',\n },\n /**\n * @description whether to show clear button\n */\n clearable: {\n type: Boolean,\n default: true,\n },\n /**\n * @description size of Input\n */\n size: useSizeProp,\n /**\n * @description placeholder in non-range mode\n */\n placeholder: String,\n /**\n * @description start time\n */\n start: {\n type: String,\n default: '09:00',\n },\n /**\n * @description end time\n */\n end: {\n type: String,\n default: '18:00',\n },\n /**\n * @description time step\n */\n step: {\n type: String,\n default: '00:30',\n },\n /**\n * @description minimum time, any time before this time will be disabled\n */\n minTime: {\n type: definePropType<string | null>(String),\n },\n /**\n * @description maximum time, any time after this time will be disabled\n */\n maxTime: {\n type: definePropType<string | null>(String),\n },\n /**\n * @description whether `end` is included in options\n */\n includeEndTime: Boolean,\n /**\n * @description same as `name` in native input\n */\n name: String,\n /**\n * @description custom prefix icon component\n */\n prefixIcon: {\n type: definePropType<string | Component>([String, Object]),\n default: () => Clock,\n },\n /**\n * @description custom clear icon component\n */\n clearIcon: {\n type: definePropType<string | Component>([String, Object]),\n default: () => CircleClose,\n },\n /**\n * @description custom class name for TimeSelect's dropdown\n */\n popperClass: {\n type: String,\n default: '',\n },\n /**\n * @description custom style for TimeSelect's dropdown\n */\n popperStyle: {\n type: definePropType<string | CSSProperties>([String, Object]),\n },\n ...useEmptyValuesProps,\n} as const)\n\nexport type TimeSelectProps = ExtractPropTypes<typeof timeSelectProps>\nexport type TimeSelectPropsPublic = ExtractPublicPropTypes<\n typeof timeSelectProps\n>\n\nexport type TimeSelectInstance = InstanceType<typeof TimeSelect> & unknown\n"],"names":[],"mappings":";;;;;AAaO,MAAM,kBAAkB,UAAW,CAAA;AAAA,EAIxC,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,OAAA;AAAA,GACX;AAAA,EAIA,UAAY,EAAA;AAAA,IACV,IAAA,EAAM,eAA8B,MAAM,CAAA;AAAA,GAC5C;AAAA,EAIA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,KAAA,CAAA;AAAA,GACX;AAAA,EAIA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACX;AAAA,EAIA,MAAQ,EAAA;AAAA,IACN,IAAA,EAAM,eAA6B,MAAM,CAAA;AAAA,IACzC,OAAS,EAAA,OAAA;AAAA,GACX;AAAA,EAIA,SAAW,EAAA;AAAA,IACT,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACX;AAAA,EAIA,IAAM,EAAA,WAAA;AAAA,EAIN,WAAa,EAAA,MAAA;AAAA,EAIb,KAAO,EAAA;AAAA,IACL,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,OAAA;AAAA,GACX;AAAA,EAIA,GAAK,EAAA;AAAA,IACH,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,OAAA;AAAA,GACX;AAA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