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,11 @@
import Timeline from './src/timeline';
import TimelineItem from './src/timeline-item.vue';
import type { SFCWithInstall } from 'element-plus/es/utils';
export declare const ElTimeline: SFCWithInstall<typeof Timeline> & {
TimelineItem: typeof TimelineItem;
};
export default ElTimeline;
export declare const ElTimelineItem: SFCWithInstall<typeof TimelineItem>;
export * from './src/timeline';
export * from './src/timeline-item';
export * from './src/tokens';

View File

@@ -0,0 +1,21 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var timeline = require('./src/timeline.js');
var timelineItem$1 = require('./src/timeline-item.js');
var timelineItem = require('./src/timeline-item2.js');
var tokens = require('./src/tokens.js');
var install = require('../../utils/vue/install.js');
const ElTimeline = install.withInstall(timeline["default"], {
TimelineItem: timelineItem$1["default"]
});
const ElTimelineItem = install.withNoopInstall(timelineItem$1["default"]);
exports.timelineItemProps = timelineItem.timelineItemProps;
exports.TIMELINE_INJECTION_KEY = tokens.TIMELINE_INJECTION_KEY;
exports.ElTimeline = ElTimeline;
exports.ElTimelineItem = ElTimelineItem;
exports["default"] = ElTimeline;
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":["../../../../../packages/components/timeline/index.ts"],"sourcesContent":["import { withInstall, withNoopInstall } from '@element-plus/utils'\nimport Timeline from './src/timeline'\nimport TimelineItem from './src/timeline-item.vue'\n\nimport type { SFCWithInstall } from '@element-plus/utils'\n\nexport const ElTimeline: SFCWithInstall<typeof Timeline> & {\n TimelineItem: typeof TimelineItem\n} = withInstall(Timeline, {\n TimelineItem,\n})\nexport default ElTimeline\nexport const ElTimelineItem: SFCWithInstall<typeof TimelineItem> =\n withNoopInstall(TimelineItem)\n\nexport * from './src/timeline'\nexport * from './src/timeline-item'\nexport * from './src/tokens'\n"],"names":["withInstall","Timeline","TimelineItem","withNoopInstall"],"mappings":";;;;;;;;;;AAGY,MAAC,UAAU,GAAGA,mBAAW,CAACC,mBAAQ,EAAE;AAChD,gBAAEC,yBAAY;AACd,CAAC,EAAE;AAES,MAAC,cAAc,GAAGC,uBAAe,CAACD,yBAAY;;;;;;;;"}

View File

@@ -0,0 +1,21 @@
import type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue';
import type TimelineItem from './timeline-item.vue';
export declare const timelineItemProps: {
readonly timestamp: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
readonly hideTimestamp: BooleanConstructor;
readonly center: BooleanConstructor;
readonly placement: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "top" | "bottom", unknown, "bottom", boolean>;
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "primary" | "success" | "warning" | "info" | "danger", unknown, "", boolean>;
readonly color: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
readonly size: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "normal" | "large", unknown, "normal", boolean>;
readonly icon: {
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown>>;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
};
readonly hollow: BooleanConstructor;
};
export type TimelineItemProps = ExtractPropTypes<typeof timelineItemProps>;
export type TimelineItemPropsPublic = __ExtractPublicPropTypes<typeof timelineItemProps>;
export type TimelineItemInstance = InstanceType<typeof TimelineItem> & unknown;

View File

@@ -0,0 +1,80 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var vue = require('vue');
var index$1 = require('../../icon/index.js');
var timelineItem = require('./timeline-item2.js');
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
var index = require('../../../hooks/use-namespace/index.js');
const __default__ = vue.defineComponent({
name: "ElTimelineItem"
});
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
...__default__,
props: timelineItem.timelineItemProps,
setup(__props) {
const props = __props;
const ns = index.useNamespace("timeline-item");
const defaultNodeKls = vue.computed(() => [
ns.e("node"),
ns.em("node", props.size || ""),
ns.em("node", props.type || ""),
ns.is("hollow", props.hollow)
]);
return (_ctx, _cache) => {
return vue.openBlock(), vue.createElementBlock("li", {
class: vue.normalizeClass([vue.unref(ns).b(), { [vue.unref(ns).e("center")]: _ctx.center }])
}, [
vue.createElementVNode("div", {
class: vue.normalizeClass(vue.unref(ns).e("tail"))
}, null, 2),
!_ctx.$slots.dot ? (vue.openBlock(), vue.createElementBlock("div", {
key: 0,
class: vue.normalizeClass(vue.unref(defaultNodeKls)),
style: vue.normalizeStyle({
backgroundColor: _ctx.color
})
}, [
_ctx.icon ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
key: 0,
class: vue.normalizeClass(vue.unref(ns).e("icon"))
}, {
default: vue.withCtx(() => [
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.icon)))
]),
_: 1
}, 8, ["class"])) : vue.createCommentVNode("v-if", true)
], 6)) : vue.createCommentVNode("v-if", true),
_ctx.$slots.dot ? (vue.openBlock(), vue.createElementBlock("div", {
key: 1,
class: vue.normalizeClass(vue.unref(ns).e("dot"))
}, [
vue.renderSlot(_ctx.$slots, "dot")
], 2)) : vue.createCommentVNode("v-if", true),
vue.createElementVNode("div", {
class: vue.normalizeClass(vue.unref(ns).e("wrapper"))
}, [
!_ctx.hideTimestamp && _ctx.placement === "top" ? (vue.openBlock(), vue.createElementBlock("div", {
key: 0,
class: vue.normalizeClass([vue.unref(ns).e("timestamp"), vue.unref(ns).is("top")])
}, vue.toDisplayString(_ctx.timestamp), 3)) : vue.createCommentVNode("v-if", true),
vue.createElementVNode("div", {
class: vue.normalizeClass(vue.unref(ns).e("content"))
}, [
vue.renderSlot(_ctx.$slots, "default")
], 2),
!_ctx.hideTimestamp && _ctx.placement === "bottom" ? (vue.openBlock(), vue.createElementBlock("div", {
key: 1,
class: vue.normalizeClass([vue.unref(ns).e("timestamp"), vue.unref(ns).is("bottom")])
}, vue.toDisplayString(_ctx.timestamp), 3)) : vue.createCommentVNode("v-if", true)
], 2)
], 2);
};
}
});
var TimelineItem = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "timeline-item.vue"]]);
exports["default"] = TimelineItem;
//# sourceMappingURL=timeline-item.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"timeline-item.js","sources":["../../../../../../packages/components/timeline/src/timeline-item.vue"],"sourcesContent":["<template>\n <li :class=\"[ns.b(), { [ns.e('center')]: center }]\">\n <div :class=\"ns.e('tail')\" />\n <div\n v-if=\"!$slots.dot\"\n :class=\"defaultNodeKls\"\n :style=\"{\n backgroundColor: color,\n }\"\n >\n <el-icon v-if=\"icon\" :class=\"ns.e('icon')\">\n <component :is=\"icon\" />\n </el-icon>\n </div>\n <div v-if=\"$slots.dot\" :class=\"ns.e('dot')\">\n <slot name=\"dot\" />\n </div>\n\n <div :class=\"ns.e('wrapper')\">\n <div\n v-if=\"!hideTimestamp && placement === 'top'\"\n :class=\"[ns.e('timestamp'), ns.is('top')]\"\n >\n {{ timestamp }}\n </div>\n\n <div :class=\"ns.e('content')\">\n <slot />\n </div>\n\n <div\n v-if=\"!hideTimestamp && placement === 'bottom'\"\n :class=\"[ns.e('timestamp'), ns.is('bottom')]\"\n >\n {{ timestamp }}\n </div>\n </div>\n </li>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { useNamespace } from '@element-plus/hooks'\nimport { timelineItemProps } from './timeline-item'\n\ndefineOptions({\n name: 'ElTimelineItem',\n})\n\nconst props = defineProps(timelineItemProps)\n\nconst ns = useNamespace('timeline-item')\nconst defaultNodeKls = computed(() => [\n ns.e('node'),\n ns.em('node', props.size || ''),\n ns.em('node', props.type || ''),\n ns.is('hollow', props.hollow),\n])\n</script>\n"],"names":["useNamespace","computed"],"mappings":";;;;;;;;;;uCA8Cc,CAAA;AAAA,EACZ,IAAM,EAAA,gBAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAA,GAAKA,mBAAa,eAAe,CAAA,CAAA;AACvC,IAAM,MAAA,cAAA,GAAiBC,aAAS,MAAM;AAAA,MACpC,EAAA,CAAG,EAAE,MAAM,CAAA;AAAA,MACX,EAAG,CAAA,EAAA,CAAG,MAAQ,EAAA,KAAA,CAAM,QAAQ,EAAE,CAAA;AAAA,MAC9B,EAAG,CAAA,EAAA,CAAG,MAAQ,EAAA,KAAA,CAAM,QAAQ,EAAE,CAAA;AAAA,MAC9B,EAAG,CAAA,EAAA,CAAG,QAAU,EAAA,KAAA,CAAM,MAAM,CAAA;AAAA,KAC7B,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}

View File

@@ -0,0 +1,51 @@
declare function __VLS_template(): {
dot?(_: {}): any;
default?(_: {}): any;
};
declare const __VLS_component: import("vue").DefineComponent<{
readonly timestamp: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
readonly hideTimestamp: BooleanConstructor;
readonly center: BooleanConstructor;
readonly placement: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "top" | "bottom", unknown, "bottom", boolean>;
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "primary" | "success" | "warning" | "info" | "danger", unknown, "", boolean>;
readonly color: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
readonly size: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "normal" | "large", unknown, "normal", boolean>;
readonly icon: {
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown>>;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
};
readonly hollow: BooleanConstructor;
}, {}, 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 timestamp: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
readonly hideTimestamp: BooleanConstructor;
readonly center: BooleanConstructor;
readonly placement: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "top" | "bottom", unknown, "bottom", boolean>;
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "primary" | "success" | "warning" | "info" | "danger", unknown, "", boolean>;
readonly color: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
readonly size: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "normal" | "large", unknown, "normal", boolean>;
readonly icon: {
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown>>;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
};
readonly hollow: BooleanConstructor;
}>>, {
readonly center: boolean;
readonly color: string;
readonly size: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "normal" | "large", unknown>;
readonly type: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "primary" | "success" | "warning" | "info" | "danger", unknown>;
readonly placement: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "top" | "bottom", unknown>;
readonly timestamp: string;
readonly hideTimestamp: boolean;
readonly hollow: boolean;
}>;
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,41 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var runtime = require('../../../utils/vue/props/runtime.js');
var icon = require('../../../utils/vue/icon.js');
const timelineItemProps = runtime.buildProps({
timestamp: {
type: String,
default: ""
},
hideTimestamp: Boolean,
center: Boolean,
placement: {
type: String,
values: ["top", "bottom"],
default: "bottom"
},
type: {
type: String,
values: ["primary", "success", "warning", "danger", "info"],
default: ""
},
color: {
type: String,
default: ""
},
size: {
type: String,
values: ["normal", "large"],
default: "normal"
},
icon: {
type: icon.iconPropType
},
hollow: Boolean
});
exports.timelineItemProps = timelineItemProps;
//# sourceMappingURL=timeline-item2.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"timeline-item2.js","sources":["../../../../../../packages/components/timeline/src/timeline-item.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue'\nimport type TimelineItem from './timeline-item.vue'\n\nexport const timelineItemProps = buildProps({\n /**\n * @description timestamp content\n */\n timestamp: {\n type: String,\n default: '',\n },\n /**\n * @description whether to show timestamp\n */\n hideTimestamp: Boolean,\n /**\n * @description whether vertically centered\n */\n center: Boolean,\n /**\n * @description position of timestamp\n */\n placement: {\n type: String,\n values: ['top', 'bottom'],\n default: 'bottom',\n },\n /**\n * @description node type\n */\n type: {\n type: String,\n values: ['primary', 'success', 'warning', 'danger', 'info'],\n default: '',\n },\n /**\n * @description background color of node\n */\n color: {\n type: String,\n default: '',\n },\n /**\n * @description node size\n */\n size: {\n type: String,\n values: ['normal', 'large'],\n default: 'normal',\n },\n /**\n * @description icon component\n */\n icon: {\n type: iconPropType,\n },\n /**\n * @description icon is hollow\n */\n hollow: Boolean,\n} as const)\nexport type TimelineItemProps = ExtractPropTypes<typeof timelineItemProps>\nexport type TimelineItemPropsPublic = __ExtractPublicPropTypes<\n typeof timelineItemProps\n>\n\nexport type TimelineItemInstance = InstanceType<typeof TimelineItem> & unknown\n"],"names":["buildProps","iconPropType"],"mappings":";;;;;;;AACY,MAAC,iBAAiB,GAAGA,kBAAU,CAAC;AAC5C,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,aAAa,EAAE,OAAO;AACxB,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC;AAC7B,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,CAAC;AAC/D,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;AAC/B,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAEC,iBAAY;AACtB,GAAG;AACH,EAAE,MAAM,EAAE,OAAO;AACjB,CAAC;;;;"}

View File

@@ -0,0 +1,5 @@
declare const Timeline: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
export default Timeline;
export type TimelineInstance = InstanceType<typeof Timeline> & unknown;

View File

@@ -0,0 +1,21 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var vue = require('vue');
var tokens = require('./tokens.js');
var index = require('../../../hooks/use-namespace/index.js');
const Timeline = vue.defineComponent({
name: "ElTimeline",
setup(_, { slots }) {
const ns = index.useNamespace("timeline");
vue.provide(tokens.TIMELINE_INJECTION_KEY, slots);
return () => {
return vue.h("ul", { class: [ns.b()] }, [vue.renderSlot(slots, "default")]);
};
}
});
exports["default"] = Timeline;
//# sourceMappingURL=timeline.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"timeline.js","sources":["../../../../../../packages/components/timeline/src/timeline.ts"],"sourcesContent":["import { defineComponent, h, provide, renderSlot } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { TIMELINE_INJECTION_KEY } from './tokens'\n\nconst Timeline = defineComponent({\n name: 'ElTimeline',\n setup(_, { slots }) {\n const ns = useNamespace('timeline')\n\n provide(TIMELINE_INJECTION_KEY, slots)\n\n /**\n * Maybe ,this component will not support prop 'reverse', why ?\n *\n * Example 1:\n * <component-a>\n * <div>1</div>\n * <div>2</div>\n * </component-a>\n *\n * Example 2:\n * <component-a>\n * <div v-for=\"i in 2\" :key=\"i\">{{ i }}</div>\n * </component-a>\n *\n * 'slots.default()' value in example 1 just like [Vnode, Vnode]\n * 'slots.default()' value in example 2 just like [Vnode]\n *\n * so i can't reverse the slots, when i use 'v-for' directive.\n */\n\n return () => {\n return h('ul', { class: [ns.b()] }, [renderSlot(slots, 'default')])\n }\n },\n})\n\nexport default Timeline\nexport type TimelineInstance = InstanceType<typeof Timeline> & unknown\n"],"names":["defineComponent","useNamespace","provide","TIMELINE_INJECTION_KEY","h","renderSlot"],"mappings":";;;;;;;;AAGK,MAAC,QAAQ,GAAGA,mBAAe,CAAC;AACjC,EAAE,IAAI,EAAE,YAAY;AACpB,EAAE,KAAK,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE;AACtB,IAAI,MAAM,EAAE,GAAGC,kBAAY,CAAC,UAAU,CAAC,CAAC;AACxC,IAAIC,WAAO,CAACC,6BAAsB,EAAE,KAAK,CAAC,CAAC;AAC3C,IAAI,OAAO,MAAM;AACjB,MAAM,OAAOC,KAAC,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAACC,cAAU,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;AAC1E,KAAK,CAAC;AACN,GAAG;AACH,CAAC;;;;"}

View File

@@ -0,0 +1 @@
export declare const TIMELINE_INJECTION_KEY = "timeline";

View File

@@ -0,0 +1,8 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const TIMELINE_INJECTION_KEY = "timeline";
exports.TIMELINE_INJECTION_KEY = TIMELINE_INJECTION_KEY;
//# sourceMappingURL=tokens.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"tokens.js","sources":["../../../../../../packages/components/timeline/src/tokens.ts"],"sourcesContent":["export const TIMELINE_INJECTION_KEY = 'timeline'\n"],"names":[],"mappings":";;;;AAAY,MAAC,sBAAsB,GAAG;;;;"}

View File

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

View File

@@ -0,0 +1,6 @@
'use strict';
require('../../base/style/css.js');
require('element-plus/theme-chalk/el-timeline.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/timeline.scss';

View File

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

View File

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