UNPKG

element-plus

Version:

A Component Library for Vue 3

1 lines 2.63 kB
{"version":3,"file":"card.mjs","names":[],"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)\n\n/**\n * @deprecated Removed after 3.0.0, Use `CardProps` instead.\n */\nexport type CardPropsPublic = ExtractPublicPropTypes<typeof cardProps>\nexport interface CardConfigContext {\n shadow?: CardProps['shadow']\n}\n\nexport const cardContextKey: InjectionKey<CardConfigContext> =\n Symbol('cardContextKey')\n"],"mappings":";;;;;;AAsCA,MAAa,YAAY,WAAW;CAIlC,QAAQ;EACN,MAAM;EACN,SAAS;EACV;CAID,QAAQ;EACN,MAAM;EACN,SAAS;EACV;CAID,WAAW;EACT,MAAM,eAA2B;GAAC;GAAQ;GAAQ;GAAM,CAAC;EACzD,SAAS;EACV;CAID,aAAa;CAIb,WAAW;CAIX,aAAa;CAIb,QAAQ;EACN,MAAM;EACN,QAAQ;GAAC;GAAU;GAAS;GAAQ;EACpC,SAAS;EACV;CACF,CAAU;AAUX,MAAa,iBACX,OAAO,iBAAiB"}