UNPKG

element-plus

Version:

A Component Library for Vue 3

1 lines 2.13 kB
{"version":3,"file":"card.mjs","sources":["../../../../../../packages/components/card/src/card.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type {\n ExtractPropTypes,\n ExtractPublicPropTypes,\n InjectionKey,\n StyleValue,\n} from 'vue'\n\nexport const cardProps = buildProps({\n /**\n * @description title of the card. Also accepts a DOM passed by `slot#header`\n */\n header: {\n type: String,\n default: '',\n },\n /**\n * @description content of footer. Also accepts a DOM passed by `slot#footer`\n */\n footer: {\n type: String,\n default: '',\n },\n /**\n * @description CSS style of card body\n */\n bodyStyle: {\n type: definePropType<StyleValue>([String, Object, Array]),\n default: '',\n },\n /**\n * @description custom class name of card footer\n */\n headerClass: String,\n /**\n * @description custom class name of card body\n */\n bodyClass: String,\n /**\n * @description custom class name of card footer\n */\n footerClass: String,\n /**\n * @description when to show card shadows\n */\n shadow: {\n type: String,\n values: ['always', 'hover', 'never'],\n default: undefined,\n },\n} as const)\nexport type CardProps = ExtractPropTypes<typeof cardProps>\nexport type CardPropsPublic = ExtractPublicPropTypes<typeof cardProps>\nexport interface CardConfigContext {\n shadow?: string\n}\n\nexport const cardContextKey: InjectionKey<CardConfigContext> =\n Symbol('cardContextKey')\n"],"names":[],"mappings":";;AASO,MAAM,YAAY,UAAW,CAAA;AAAA,EAIlC,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EAIA,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EAIA,SAAW,EAAA;AAAA,IACT,MAAM,cAA2B,CAAA,CAAC,MAAQ,EAAA,MAAA,EAAQ,KAAK,CAAC,CAAA;AAAA,IACxD,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EAIA,WAAa,EAAA,MAAA;AAAA,EAIb,SAAW,EAAA,MAAA;AAAA,EAIX,WAAa,EAAA,MAAA;AAAA,EAIb,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,MAAA;AAAA,IACN,MAAQ,EAAA,CAAC,QAAU,EAAA,OAAA,EAAS,OAAO,CAAA;AAAA,IACnC,OAAS,EAAA,KAAA,CAAA;AAAA,GACX;AACF,CAAU,EAAA;AAOG,MAAA,cAAA,GACX,OAAO,gBAAgB;;;;"}