This commit is contained in:
2025-09-19 14:25:20 +08:00
parent 269893a435
commit fbf3f77229
24949 changed files with 2839404 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
import Card from './src/card.vue';
import type { SFCWithInstall } from 'element-plus/es/utils';
export declare const ElCard: SFCWithInstall<typeof Card>;
export default ElCard;
export * from './src/card';
export type { CardInstance } from './src/instance';

15
node_modules/element-plus/lib/components/card/index.js generated vendored Normal file
View File

@@ -0,0 +1,15 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var card$1 = require('./src/card2.js');
var card = require('./src/card.js');
var install = require('../../utils/vue/install.js');
const ElCard = install.withInstall(card$1["default"]);
exports.cardContextKey = card.cardContextKey;
exports.cardProps = card.cardProps;
exports.ElCard = ElCard;
exports["default"] = ElCard;
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":["../../../../../packages/components/card/index.ts"],"sourcesContent":["import { withInstall } from '@element-plus/utils'\nimport Card from './src/card.vue'\n\nimport type { SFCWithInstall } from '@element-plus/utils'\n\nexport const ElCard: SFCWithInstall<typeof Card> = withInstall(Card)\nexport default ElCard\n\nexport * from './src/card'\nexport type { CardInstance } from './src/instance'\n"],"names":["withInstall","Card"],"mappings":";;;;;;;;AAEY,MAAC,MAAM,GAAGA,mBAAW,CAACC,iBAAI;;;;;;;"}

View File

@@ -0,0 +1,16 @@
import type { ExtractPropTypes, InjectionKey, StyleValue, __ExtractPublicPropTypes } from 'vue';
export declare const cardProps: {
readonly header: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
readonly footer: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
readonly bodyStyle: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string | import("vue").CSSProperties | StyleValue[]) | (() => StyleValue) | ((new (...args: any[]) => string | import("vue").CSSProperties | StyleValue[]) | (() => StyleValue))[], unknown, unknown, "", boolean>;
readonly headerClass: StringConstructor;
readonly bodyClass: StringConstructor;
readonly footerClass: StringConstructor;
readonly shadow: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "always" | "never" | "hover", unknown, undefined, boolean>;
};
export type CardProps = ExtractPropTypes<typeof cardProps>;
export type CardPropsPublic = __ExtractPublicPropTypes<typeof cardProps>;
export interface CardConfigContext {
shadow?: string;
}
export declare const cardContextKey: InjectionKey<CardConfigContext>;

View File

@@ -0,0 +1,33 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var runtime = require('../../../utils/vue/props/runtime.js');
const cardProps = runtime.buildProps({
header: {
type: String,
default: ""
},
footer: {
type: String,
default: ""
},
bodyStyle: {
type: runtime.definePropType([String, Object, Array]),
default: ""
},
headerClass: String,
bodyClass: String,
footerClass: String,
shadow: {
type: String,
values: ["always", "hover", "never"],
default: void 0
}
});
const cardContextKey = Symbol("cardContextKey");
exports.cardContextKey = cardContextKey;
exports.cardProps = cardProps;
//# sourceMappingURL=card.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"card.js","sources":["../../../../../../packages/components/card/src/card.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type {\n ExtractPropTypes,\n InjectionKey,\n StyleValue,\n __ExtractPublicPropTypes,\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":["buildProps","definePropType"],"mappings":";;;;;;AACY,MAAC,SAAS,GAAGA,kBAAU,CAAC;AACpC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAEC,sBAAc,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AACjD,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,SAAS,EAAE,MAAM;AACnB,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC;AACxC,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,cAAc,GAAG,MAAM,CAAC,gBAAgB;;;;;"}

View File

@@ -0,0 +1,34 @@
declare function __VLS_template(): {
header?(_: {}): any;
default?(_: {}): any;
footer?(_: {}): any;
};
declare const __VLS_component: import("vue").DefineComponent<{
readonly header: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
readonly footer: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
readonly bodyStyle: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string | import("vue").CSSProperties | import("vue").StyleValue[]) | (() => import("vue").StyleValue) | ((new (...args: any[]) => string | import("vue").CSSProperties | import("vue").StyleValue[]) | (() => import("vue").StyleValue))[], unknown, unknown, "", boolean>;
readonly headerClass: StringConstructor;
readonly bodyClass: StringConstructor;
readonly footerClass: StringConstructor;
readonly shadow: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "always" | "never" | "hover", unknown, undefined, boolean>;
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
readonly header: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
readonly footer: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
readonly bodyStyle: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string | import("vue").CSSProperties | import("vue").StyleValue[]) | (() => import("vue").StyleValue) | ((new (...args: any[]) => string | import("vue").CSSProperties | import("vue").StyleValue[]) | (() => import("vue").StyleValue))[], unknown, unknown, "", boolean>;
readonly headerClass: StringConstructor;
readonly bodyClass: StringConstructor;
readonly footerClass: StringConstructor;
readonly shadow: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "always" | "never" | "hover", unknown, undefined, boolean>;
}>>, {
readonly footer: string;
readonly header: string;
readonly bodyStyle: import("vue").StyleValue;
readonly shadow: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "always" | "never" | "hover", unknown>;
}>;
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
export default _default;
type __VLS_WithTemplateSlots<T, S> = T & {
new (): {
$slots: S;
};
};

View File

@@ -0,0 +1,57 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var vue = require('vue');
var card = require('./card.js');
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
var useGlobalConfig = require('../../config-provider/src/hooks/use-global-config.js');
var index = require('../../../hooks/use-namespace/index.js');
const __default__ = vue.defineComponent({
name: "ElCard"
});
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
...__default__,
props: card.cardProps,
setup(__props) {
const globalConfig = useGlobalConfig.useGlobalConfig("card");
const ns = index.useNamespace("card");
return (_ctx, _cache) => {
var _a;
return vue.openBlock(), vue.createElementBlock("div", {
class: vue.normalizeClass([
vue.unref(ns).b(),
vue.unref(ns).is(`${_ctx.shadow || ((_a = vue.unref(globalConfig)) == null ? void 0 : _a.shadow) || "always"}-shadow`)
])
}, [
_ctx.$slots.header || _ctx.header ? (vue.openBlock(), vue.createElementBlock("div", {
key: 0,
class: vue.normalizeClass([vue.unref(ns).e("header"), _ctx.headerClass])
}, [
vue.renderSlot(_ctx.$slots, "header", {}, () => [
vue.createTextVNode(vue.toDisplayString(_ctx.header), 1)
])
], 2)) : vue.createCommentVNode("v-if", true),
vue.createElementVNode("div", {
class: vue.normalizeClass([vue.unref(ns).e("body"), _ctx.bodyClass]),
style: vue.normalizeStyle(_ctx.bodyStyle)
}, [
vue.renderSlot(_ctx.$slots, "default")
], 6),
_ctx.$slots.footer || _ctx.footer ? (vue.openBlock(), vue.createElementBlock("div", {
key: 1,
class: vue.normalizeClass([vue.unref(ns).e("footer"), _ctx.footerClass])
}, [
vue.renderSlot(_ctx.$slots, "footer", {}, () => [
vue.createTextVNode(vue.toDisplayString(_ctx.footer), 1)
])
], 2)) : vue.createCommentVNode("v-if", true)
], 2);
};
}
});
var Card = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "card.vue"]]);
exports["default"] = Card;
//# sourceMappingURL=card2.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"card2.js","sources":["../../../../../../packages/components/card/src/card.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n ns.b(),\n ns.is(`${shadow || globalConfig?.shadow || 'always'}-shadow`),\n ]\"\n >\n <div v-if=\"$slots.header || header\" :class=\"[ns.e('header'), headerClass]\">\n <slot name=\"header\">{{ header }}</slot>\n </div>\n <div :class=\"[ns.e('body'), bodyClass]\" :style=\"bodyStyle\">\n <slot />\n </div>\n <div v-if=\"$slots.footer || footer\" :class=\"[ns.e('footer'), footerClass]\">\n <slot name=\"footer\">{{ footer }}</slot>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { useNamespace } from '@element-plus/hooks'\nimport { useGlobalConfig } from '@element-plus/components/config-provider'\nimport { cardProps } from './card'\n\nconst globalConfig = useGlobalConfig('card')\n\ndefineOptions({\n name: 'ElCard',\n})\n\ndefineProps(cardProps)\n\nconst ns = useNamespace('card')\n</script>\n"],"names":["useGlobalConfig","useNamespace"],"mappings":";;;;;;;;;;uCA0Bc,CAAA;AAAA,EACZ,IAAM,EAAA,QAAA;AACR,CAAA,CAAA,CAAA;;;;;AAJA,IAAM,MAAA,YAAA,GAAeA,gCAAgB,MAAM,CAAA,CAAA;AAQ3C,IAAM,MAAA,EAAA,GAAKC,mBAAa,MAAM,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}

View File

@@ -0,0 +1,2 @@
import type Card from './card.vue';
export type CardInstance = InstanceType<typeof Card> & unknown;

View File

@@ -0,0 +1,3 @@
'use strict';
//# sourceMappingURL=instance.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"instance.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}

View File

@@ -0,0 +1,2 @@
import 'element-plus/es/components/base/style/css';
import 'element-plus/theme-chalk/el-card.css';

View File

@@ -0,0 +1,6 @@
'use strict';
require('../../base/style/css.js');
require('element-plus/theme-chalk/el-card.css');
//# sourceMappingURL=css.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}

View File

@@ -0,0 +1,2 @@
import 'element-plus/es/components/base/style';
import 'element-plus/theme-chalk/src/card.scss';

View File

@@ -0,0 +1,6 @@
'use strict';
require('../../base/style/index.js');
require('element-plus/theme-chalk/src/card.scss');
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}