You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
5.3 KiB
1 lines
5.3 KiB
{"ast":null,"code":"import { isNil } from 'lodash-unified';\nimport { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';\nimport { useSizeProp } from '../../../hooks/use-size/index.mjs';\nimport { useTooltipContentProps } from '../../tooltip/src/content.mjs';\nimport { useAriaProps } from '../../../hooks/use-aria/index.mjs';\nimport { UPDATE_MODEL_EVENT, CHANGE_EVENT } from '../../../constants/event.mjs';\nimport { isString } from '@vue/shared';\nconst colorPickerProps = buildProps({\n modelValue: String,\n id: String,\n showAlpha: Boolean,\n colorFormat: String,\n disabled: Boolean,\n size: useSizeProp,\n popperClass: {\n type: String,\n default: \"\"\n },\n tabindex: {\n type: [String, Number],\n default: 0\n },\n teleported: useTooltipContentProps.teleported,\n predefine: {\n type: definePropType(Array)\n },\n validateEvent: {\n type: Boolean,\n default: true\n },\n ...useAriaProps([\"ariaLabel\"])\n});\nconst colorPickerEmits = {\n [UPDATE_MODEL_EVENT]: val => isString(val) || isNil(val),\n [CHANGE_EVENT]: val => isString(val) || isNil(val),\n activeChange: val => isString(val) || isNil(val),\n focus: evt => evt instanceof FocusEvent,\n blur: evt => evt instanceof FocusEvent\n};\nconst colorPickerContextKey = Symbol(\"colorPickerContextKey\");\nexport { colorPickerContextKey, colorPickerEmits, colorPickerProps };","map":{"version":3,"names":["colorPickerProps","buildProps","modelValue","String","id","showAlpha","Boolean","colorFormat","disabled","size","useSizeProp","popperClass","type","default","tabindex","Number","teleported","useTooltipContentProps","predefine","definePropType","Array","validateEvent","useAriaProps","colorPickerEmits","UPDATE_MODEL_EVENT","val","isString","isNil","CHANGE_EVENT","activeChange","focus","evt","FocusEvent","blur","colorPickerContextKey","Symbol"],"sources":["../../../../../../packages/components/color-picker/src/color-picker.ts"],"sourcesContent":["import { isNil } from 'lodash-unified'\nimport { buildProps, definePropType, isString } from '@element-plus/utils'\nimport { useAriaProps, useSizeProp } from '@element-plus/hooks'\nimport { useTooltipContentProps } from '@element-plus/components/tooltip'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\n\nimport type { ComputedRef, ExtractPropTypes, InjectionKey } from 'vue'\nimport type ColorPicker from './color-picker.vue'\n\nexport const colorPickerProps = buildProps({\n /**\n * @description binding value\n */\n modelValue: String,\n /**\n * @description ColorPicker id\n */\n id: String,\n /**\n * @description whether to display the alpha slider\n */\n showAlpha: Boolean,\n /**\n * @description color format of v-model\n */\n colorFormat: String,\n /**\n * @description whether to disable the ColorPicker\n */\n disabled: Boolean,\n /**\n * @description size of ColorPicker\n */\n size: useSizeProp,\n /**\n * @description custom class name for ColorPicker's dropdown\n */\n popperClass: {\n type: String,\n default: '',\n },\n /**\n * @description ColorPicker tabindex\n */\n tabindex: {\n type: [String, Number],\n default: 0,\n },\n /**\n * @description whether color-picker popper is teleported to the body\n */\n teleported: useTooltipContentProps.teleported,\n /**\n * @description predefined color options\n */\n predefine: {\n type: definePropType<string[]>(Array),\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n ...useAriaProps(['ariaLabel']),\n} as const)\nexport const colorPickerEmits = {\n [UPDATE_MODEL_EVENT]: (val: string | null) => isString(val) || isNil(val),\n [CHANGE_EVENT]: (val: string | null) => isString(val) || isNil(val),\n activeChange: (val: string | null) => isString(val) || isNil(val),\n focus: (evt: FocusEvent) => evt instanceof FocusEvent,\n blur: (evt: FocusEvent) => evt instanceof FocusEvent,\n}\n\nexport type ColorPickerProps = ExtractPropTypes<typeof colorPickerProps>\nexport type ColorPickerEmits = typeof colorPickerEmits\nexport type ColorPickerInstance = InstanceType<typeof ColorPicker>\n\nexport interface ColorPickerContext {\n currentColor: ComputedRef<string>\n}\n\nexport const colorPickerContextKey: InjectionKey<ColorPickerContext> = Symbol(\n 'colorPickerContextKey'\n)\n"],"mappings":";;;;;;;AAKY,MAACA,gBAAgB,GAAGC,UAAU,CAAC;EACzCC,UAAU,EAAEC,MAAM;EAClBC,EAAE,EAAED,MAAM;EACVE,SAAS,EAAEC,OAAO;EAClBC,WAAW,EAAEJ,MAAM;EACnBK,QAAQ,EAAEF,OAAO;EACjBG,IAAI,EAAEC,WAAW;EACjBC,WAAW,EAAE;IACXC,IAAI,EAAET,MAAM;IACZU,OAAO,EAAE;EACb,CAAG;EACDC,QAAQ,EAAE;IACRF,IAAI,EAAE,CAACT,MAAM,EAAEY,MAAM,CAAC;IACtBF,OAAO,EAAE;EACb,CAAG;EACDG,UAAU,EAAEC,sBAAsB,CAACD,UAAU;EAC7CE,SAAS,EAAE;IACTN,IAAI,EAAEO,cAAc,CAACC,KAAK;EAC9B,CAAG;EACDC,aAAa,EAAE;IACbT,IAAI,EAAEN,OAAO;IACbO,OAAO,EAAE;EACb,CAAG;EACD,GAAGS,YAAY,CAAC,CAAC,WAAW,CAAC;AAC/B,CAAC;AACW,MAACC,gBAAgB,GAAG;EAC9B,CAACC,kBAAkB,GAAIC,GAAG,IAAKC,QAAQ,CAACD,GAAG,CAAC,IAAIE,KAAK,CAACF,GAAG,CAAC;EAC1D,CAACG,YAAY,GAAIH,GAAG,IAAKC,QAAQ,CAACD,GAAG,CAAC,IAAIE,KAAK,CAACF,GAAG,CAAC;EACpDI,YAAY,EAAGJ,GAAG,IAAKC,QAAQ,CAACD,GAAG,CAAC,IAAIE,KAAK,CAACF,GAAG,CAAC;EAClDK,KAAK,EAAGC,GAAG,IAAKA,GAAG,YAAYC,UAAU;EACzCC,IAAI,EAAGF,GAAG,IAAKA,GAAG,YAAYC;AAChC;AACY,MAACE,qBAAqB,GAAGC,MAAM,CAAC,uBAAuB","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|