element-plus
Version:
A Component Library for Vue 3
1 lines • 2.9 kB
Source Map (JSON)
{"version":3,"file":"card.mjs","sources":["../../../../../../packages/components/card/src/card.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPublicPropTypes, InjectionKey, StyleValue } from 'vue'\n\nexport interface CardProps {\n /**\n * @description title of the card. Also accepts a DOM passed by `slot#header`\n */\n header?: string\n /**\n * @description content of footer. Also accepts a DOM passed by `slot#footer`\n */\n footer?: string\n /**\n * @description CSS style of card body\n */\n bodyStyle?: StyleValue\n /**\n * @description custom class name of card header\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?: 'always' | 'hover' | 'never'\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `CardProps` instead.\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 CardPropsPublic = ExtractPublicPropTypes<typeof cardProps>\nexport interface CardConfigContext {\n shadow?: CardProps['shadow']\n}\n\nexport const cardContextKey: InjectionKey<CardConfigContext> =\n Symbol('cardContextKey')\n"],"names":[],"mappings":";;AAsCO,MAAM,YAAY,UAAA,CAAW;AAAA;AAAA;AAAA;AAAA,EAIlC,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,SAAA,EAAW;AAAA,IACT,MAAM,cAAA,CAA2B,CAAC,MAAA,EAAQ,MAAA,EAAQ,KAAK,CAAC,CAAA;AAAA,IACxD,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,WAAA,EAAa,MAAA;AAAA;AAAA;AAAA;AAAA,EAIb,SAAA,EAAW,MAAA;AAAA;AAAA;AAAA;AAAA,EAIX,WAAA,EAAa,MAAA;AAAA;AAAA;AAAA;AAAA,EAIb,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,MAAA;AAAA,IACN,MAAA,EAAQ,CAAC,QAAA,EAAU,OAAA,EAAS,OAAO,CAAA;AAAA,IACnC,OAAA,EAAS;AAAA;AAEb,CAAU;AAMH,MAAM,cAAA,0BACJ,gBAAgB;;;;"}