first commit
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
import { SFCWithInstall } from "../../utils/vue/typescript.js";
|
||||
import "../../utils/index.js";
|
||||
import { Timeline, TimelineInstance, TimelineProps, TimelinePropsPublic, timelineProps } from "./src/timeline.js";
|
||||
import { TimelineItemInstance, TimelineItemProps, TimelineItemPropsPublic, timelineItemProps } from "./src/timeline-item.js";
|
||||
import { _default } from "./src/timeline-item.vue.js";
|
||||
import { TIMELINE_INJECTION_KEY, TimelineProvider } from "./src/tokens.js";
|
||||
|
||||
//#region ../../packages/components/timeline/index.d.ts
|
||||
declare const ElTimeline: SFCWithInstall<typeof Timeline> & {
|
||||
TimelineItem: typeof _default;
|
||||
};
|
||||
declare const ElTimelineItem: SFCWithInstall<typeof _default>;
|
||||
//#endregion
|
||||
export { ElTimeline, ElTimeline as default, ElTimelineItem, TIMELINE_INJECTION_KEY, TimelineInstance, TimelineItemInstance, TimelineItemProps, TimelineItemPropsPublic, TimelineProps, TimelinePropsPublic, TimelineProvider, timelineItemProps, timelineProps };
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
||||
const require_install = require('../../utils/vue/install.js');
|
||||
const require_tokens = require('./src/tokens.js');
|
||||
const require_timeline = require('./src/timeline.js');
|
||||
const require_timeline_item = require('./src/timeline-item.js');
|
||||
const require_timeline_item$1 = require('./src/timeline-item2.js');
|
||||
|
||||
//#region ../../packages/components/timeline/index.ts
|
||||
const ElTimeline = require_install.withInstall(require_timeline.default, { TimelineItem: require_timeline_item$1.default });
|
||||
const ElTimelineItem = require_install.withNoopInstall(require_timeline_item$1.default);
|
||||
|
||||
//#endregion
|
||||
exports.ElTimeline = ElTimeline;
|
||||
exports.default = ElTimeline;
|
||||
exports.ElTimelineItem = ElTimelineItem;
|
||||
exports.TIMELINE_INJECTION_KEY = require_tokens.TIMELINE_INJECTION_KEY;
|
||||
exports.timelineItemProps = require_timeline_item.timelineItemProps;
|
||||
exports.timelineProps = require_timeline.timelineProps;
|
||||
//# sourceMappingURL=index.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","names":["withInstall","Timeline","withNoopInstall","TimelineItem"],"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"],"mappings":";;;;;;;;AAMA,MAAa,aAETA,4BAAYC,0BAAU,EACxB,+CACD,CAAC;AAEF,MAAa,iBACXC,gCAAgBC,gCAAa"}
|
||||
Generated
Vendored
+72
@@ -0,0 +1,72 @@
|
||||
import { IconPropType } from "../../../utils/vue/icon.js";
|
||||
import { EpPropFinalized, EpPropMergeType } from "../../../utils/vue/props/types.js";
|
||||
import "../../../utils/index.js";
|
||||
import { _default } from "./timeline-item.vue.js";
|
||||
import * as vue from "vue";
|
||||
import { ExtractPublicPropTypes } from "vue";
|
||||
|
||||
//#region ../../packages/components/timeline/src/timeline-item.d.ts
|
||||
interface TimelineItemProps {
|
||||
/**
|
||||
* @description timestamp content
|
||||
*/
|
||||
timestamp?: string;
|
||||
/**
|
||||
* @description whether to show timestamp
|
||||
*/
|
||||
hideTimestamp?: boolean;
|
||||
/**
|
||||
* @description whether vertically centered
|
||||
*/
|
||||
center?: boolean;
|
||||
/**
|
||||
* @description position of timestamp
|
||||
*/
|
||||
placement?: 'top' | 'bottom';
|
||||
/**
|
||||
* @description node type
|
||||
*/
|
||||
type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | '';
|
||||
/**
|
||||
* @description background color of node
|
||||
*/
|
||||
color?: string;
|
||||
/**
|
||||
* @description node size
|
||||
*/
|
||||
size?: 'normal' | 'large';
|
||||
/**
|
||||
* @description icon component
|
||||
*/
|
||||
icon?: IconPropType;
|
||||
/**
|
||||
* @description icon is hollow
|
||||
*/
|
||||
hollow?: boolean;
|
||||
}
|
||||
/**
|
||||
* @deprecated Removed after 3.0.0, Use `TimelineItemProps` instead.
|
||||
*/
|
||||
declare const timelineItemProps: {
|
||||
readonly timestamp: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
||||
readonly hideTimestamp: BooleanConstructor;
|
||||
readonly center: BooleanConstructor;
|
||||
readonly placement: EpPropFinalized<StringConstructor, "bottom" | "top", unknown, "bottom", boolean>;
|
||||
readonly type: EpPropFinalized<StringConstructor, "info" | "primary" | "success" | "warning" | "danger", unknown, "", boolean>;
|
||||
readonly color: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
||||
readonly size: EpPropFinalized<StringConstructor, "normal" | "large", unknown, "normal", boolean>;
|
||||
readonly icon: {
|
||||
readonly type: vue.PropType<EpPropMergeType<(new (...args: any[]) => (string | vue.Component) & {}) | (() => string | vue.Component) | (((new (...args: any[]) => (string | vue.Component) & {}) | (() => string | vue.Component)) | null)[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
readonly hollow: BooleanConstructor;
|
||||
};
|
||||
/**
|
||||
* @deprecated Removed after 3.0.0, Use `TimelineItemProps` instead.
|
||||
*/
|
||||
type TimelineItemPropsPublic = ExtractPublicPropTypes<typeof timelineItemProps>;
|
||||
type TimelineItemInstance = InstanceType<typeof _default> & unknown;
|
||||
//#endregion
|
||||
export { TimelineItemInstance, TimelineItemProps, TimelineItemPropsPublic, timelineItemProps };
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
const require_runtime = require('../../../utils/vue/props/runtime.js');
|
||||
const require_icon = require('../../../utils/vue/icon.js');
|
||||
|
||||
//#region ../../packages/components/timeline/src/timeline-item.ts
|
||||
/**
|
||||
* @deprecated Removed after 3.0.0, Use `TimelineItemProps` instead.
|
||||
*/
|
||||
const timelineItemProps = require_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: require_icon.iconPropType },
|
||||
hollow: Boolean
|
||||
});
|
||||
|
||||
//#endregion
|
||||
exports.timelineItemProps = timelineItemProps;
|
||||
//# sourceMappingURL=timeline-item.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"timeline-item.js","names":["buildProps","iconPropType"],"sources":["../../../../../../packages/components/timeline/src/timeline-item.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-plus/utils'\n\nimport type { ExtractPublicPropTypes } from 'vue'\nimport type { IconPropType } from '@element-plus/utils'\nimport type TimelineItem from './timeline-item.vue'\n\nexport interface TimelineItemProps {\n /**\n * @description timestamp content\n */\n timestamp?: string\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?: 'top' | 'bottom'\n /**\n * @description node type\n */\n type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | ''\n /**\n * @description background color of node\n */\n color?: string\n /**\n * @description node size\n */\n size?: 'normal' | 'large'\n /**\n * @description icon component\n */\n icon?: IconPropType\n /**\n * @description icon is hollow\n */\n hollow?: boolean\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `TimelineItemProps` instead.\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)\n\n/**\n * @deprecated Removed after 3.0.0, Use `TimelineItemProps` instead.\n */\nexport type TimelineItemPropsPublic = ExtractPublicPropTypes<\n typeof timelineItemProps\n>\n\nexport type TimelineItemInstance = InstanceType<typeof TimelineItem> & unknown\n"],"mappings":";;;;;;;;AAgDA,MAAa,oBAAoBA,2BAAW;CAI1C,WAAW;EACT,MAAM;EACN,SAAS;EACV;CAID,eAAe;CAIf,QAAQ;CAIR,WAAW;EACT,MAAM;EACN,QAAQ,CAAC,OAAO,SAAS;EACzB,SAAS;EACV;CAID,MAAM;EACJ,MAAM;EACN,QAAQ;GAAC;GAAW;GAAW;GAAW;GAAU;GAAO;EAC3D,SAAS;EACV;CAID,OAAO;EACL,MAAM;EACN,SAAS;EACV;CAID,MAAM;EACJ,MAAM;EACN,QAAQ,CAAC,UAAU,QAAQ;EAC3B,SAAS;EACV;CAID,MAAM,EACJ,MAAMC,2BACP;CAID,QAAQ;CACT,CAAU"}
|
||||
Generated
Vendored
+26
@@ -0,0 +1,26 @@
|
||||
import { TimelineItemProps } from "./timeline-item.js";
|
||||
import * as vue from "vue";
|
||||
|
||||
//#region ../../packages/components/timeline/src/timeline-item.vue.d.ts
|
||||
declare var __VLS_12: {}, __VLS_14: {};
|
||||
type __VLS_Slots = {} & {
|
||||
dot?: (props: typeof __VLS_12) => any;
|
||||
} & {
|
||||
default?: (props: typeof __VLS_14) => any;
|
||||
};
|
||||
declare const __VLS_base: vue.DefineComponent<TimelineItemProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<TimelineItemProps> & Readonly<{}>, {
|
||||
type: "primary" | "success" | "warning" | "danger" | "info" | "";
|
||||
size: "normal" | "large";
|
||||
placement: "top" | "bottom";
|
||||
color: string;
|
||||
timestamp: string;
|
||||
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
||||
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
||||
declare const _default: typeof __VLS_export;
|
||||
type __VLS_WithSlots<T, S> = T & {
|
||||
new (): {
|
||||
$slots: S;
|
||||
};
|
||||
};
|
||||
//#endregion
|
||||
export { _default };
|
||||
Generated
Vendored
+64
@@ -0,0 +1,64 @@
|
||||
const require_runtime = require('../../../_virtual/_rolldown/runtime.js');
|
||||
const require_index = require('../../../hooks/use-namespace/index.js');
|
||||
const require_index$1 = require('../../icon/index.js');
|
||||
const require_tokens = require('./tokens.js');
|
||||
const require_timeline_item = require('./timeline-item.js');
|
||||
let vue = require("vue");
|
||||
|
||||
//#region ../../packages/components/timeline/src/timeline-item.vue?vue&type=script&setup=true&lang.ts
|
||||
var timeline_item_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
||||
name: "ElTimelineItem",
|
||||
__name: "timeline-item",
|
||||
props: require_timeline_item.timelineItemProps,
|
||||
setup(__props) {
|
||||
const props = __props;
|
||||
const { props: timelineProps } = (0, vue.inject)(require_tokens.TIMELINE_INJECTION_KEY);
|
||||
const ns = require_index.useNamespace("timeline-item");
|
||||
const defaultNodeKls = (0, vue.computed)(() => [
|
||||
ns.e("node"),
|
||||
ns.em("node", props.size || ""),
|
||||
ns.em("node", props.type || ""),
|
||||
ns.is("hollow", props.hollow)
|
||||
]);
|
||||
const timelineItemKls = (0, vue.computed)(() => [
|
||||
ns.b(),
|
||||
{ [ns.e("center")]: props.center },
|
||||
ns.is(timelineProps.mode)
|
||||
]);
|
||||
return (_ctx, _cache) => {
|
||||
return (0, vue.openBlock)(), (0, vue.createElementBlock)("li", { class: (0, vue.normalizeClass)(timelineItemKls.value) }, [
|
||||
(0, vue.createElementVNode)("div", { class: (0, vue.normalizeClass)((0, vue.unref)(ns).e("tail")) }, null, 2),
|
||||
!_ctx.$slots.dot ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
||||
key: 0,
|
||||
class: (0, vue.normalizeClass)(defaultNodeKls.value),
|
||||
style: (0, vue.normalizeStyle)({ backgroundColor: __props.color })
|
||||
}, [__props.icon ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_index$1.ElIcon), {
|
||||
key: 0,
|
||||
class: (0, vue.normalizeClass)((0, vue.unref)(ns).e("icon"))
|
||||
}, {
|
||||
default: (0, vue.withCtx)(() => [((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(__props.icon)))]),
|
||||
_: 1
|
||||
}, 8, ["class"])) : (0, vue.createCommentVNode)("v-if", true)], 6)) : (0, vue.createCommentVNode)("v-if", true),
|
||||
_ctx.$slots.dot ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
||||
key: 1,
|
||||
class: (0, vue.normalizeClass)((0, vue.unref)(ns).e("dot"))
|
||||
}, [(0, vue.renderSlot)(_ctx.$slots, "dot")], 2)) : (0, vue.createCommentVNode)("v-if", true),
|
||||
(0, vue.createElementVNode)("div", { class: (0, vue.normalizeClass)((0, vue.unref)(ns).e("wrapper")) }, [
|
||||
!__props.hideTimestamp && __props.placement === "top" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
||||
key: 0,
|
||||
class: (0, vue.normalizeClass)([(0, vue.unref)(ns).e("timestamp"), (0, vue.unref)(ns).is("top")])
|
||||
}, (0, vue.toDisplayString)(__props.timestamp), 3)) : (0, vue.createCommentVNode)("v-if", true),
|
||||
(0, vue.createElementVNode)("div", { class: (0, vue.normalizeClass)((0, vue.unref)(ns).e("content")) }, [(0, vue.renderSlot)(_ctx.$slots, "default")], 2),
|
||||
!__props.hideTimestamp && __props.placement === "bottom" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
||||
key: 1,
|
||||
class: (0, vue.normalizeClass)([(0, vue.unref)(ns).e("timestamp"), (0, vue.unref)(ns).is("bottom")])
|
||||
}, (0, vue.toDisplayString)(__props.timestamp), 3)) : (0, vue.createCommentVNode)("v-if", true)
|
||||
], 2)
|
||||
], 2);
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
//#endregion
|
||||
exports.default = timeline_item_vue_vue_type_script_setup_true_lang_default;
|
||||
//# sourceMappingURL=timeline-item.vue_vue_type_script_setup_true_lang.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"timeline-item.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../../../../packages/components/timeline/src/timeline-item.vue"],"sourcesContent":["<template>\n <li :class=\"timelineItemKls\">\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, inject } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { useNamespace } from '@element-plus/hooks'\nimport { TIMELINE_INJECTION_KEY } from './tokens'\n\nimport type { TimelineProvider } from './tokens'\nimport type { TimelineItemProps } from './timeline-item'\n\ndefineOptions({\n name: 'ElTimelineItem',\n})\n\nconst props = withDefaults(defineProps<TimelineItemProps>(), {\n timestamp: '',\n placement: 'bottom',\n type: '',\n color: '',\n size: 'normal',\n})\nconst { props: timelineProps } = inject<TimelineProvider>(\n TIMELINE_INJECTION_KEY\n)!\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\nconst timelineItemKls = computed(() => [\n ns.b(),\n { [ns.e('center')]: props.center },\n ns.is(timelineProps.mode),\n])\n</script>\n"],"mappings":";;;;;;;;;;;;;EAqDA,MAAM,QAAQ;EAOd,MAAM,EAAE,OAAO,kCACb,sCACD;EAED,MAAM,KAAK,2BAAa,gBAAe;EACvC,MAAM,yCAAgC;GACpC,GAAG,EAAE,OAAO;GACZ,GAAG,GAAG,QAAQ,MAAM,QAAQ,GAAG;GAC/B,GAAG,GAAG,QAAQ,MAAM,QAAQ,GAAG;GAC/B,GAAG,GAAG,UAAU,MAAM,OAAO;GAC9B,CAAA;EAED,MAAM,0CAAiC;GACrC,GAAG,GAAG;GACN,GAAG,GAAG,EAAE,SAAS,GAAG,MAAM,QAAQ;GAClC,GAAG,GAAG,cAAc,KAAK;GAC1B,CAAA;;4DAvCM,MAAA,EApCA,+BAAO,gBAAA,MAAe;gCACI,OAAA,EAAvB,8CAAO,GAAE,CAAC,EAAC,OAAA,CAAA;KAERA,KAAAA,OAAO,yDASV,OAAA;;KARH,+BAAO,eAAA,MAAc;KACrB,+BAAK,mBAA6B,QAAA;QAIpB,QAAA,kEAEL,uBAAA,EAAA;;KAFY,8CAAO,GAAE,CAAC,EAAC,OAAA,CAAA;;qCACP,8EAAR,QAAA,KAAI,CAAA;;;IAGbA,KAAAA,OAAO,yDAEZ,OAAA;;KAFkB,8CAAO,GAAE,CAAC,EAAC,MAAA,CAAA;4BACd,KAAA,QAAA,MAAA;gCAqBf,OAAA,EAlBA,8CAAO,GAAE,CAAC,EAAC,UAAA,CAAA;MAEN,QAAA,iBAAiB,QAAA,cAAS,2DAI7B,OAAA;;MAHH,+BAAK,gBAAG,GAAE,CAAC,EAAC,YAAA,iBAAe,GAAE,CAAC,GAAE,MAAA,CAAA,CAAA;iCAE9B,QAAA,UAAS,EAAA,EAAA;iCAKR,OAAA,EAFA,8CAAO,GAAE,CAAC,EAAC,UAAA,CAAA,yBACP,KAAA,QAAA,UAAA;MAID,QAAA,iBAAiB,QAAA,cAAS,8DAI7B,OAAA;;MAHH,+BAAK,gBAAG,GAAE,CAAC,EAAC,YAAA,iBAAe,GAAE,CAAC,GAAE,SAAA,CAAA,CAAA;iCAE9B,QAAA,UAAS,EAAA,EAAA"}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
||||
const require_timeline_item_vue_vue_type_script_setup_true_lang = require('./timeline-item.vue_vue_type_script_setup_true_lang.js');
|
||||
|
||||
//#region ../../packages/components/timeline/src/timeline-item.vue
|
||||
var timeline_item_default = require_timeline_item_vue_vue_type_script_setup_true_lang.default;
|
||||
|
||||
//#endregion
|
||||
exports.default = timeline_item_default;
|
||||
//# sourceMappingURL=timeline-item2.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"timeline-item2.js","names":[],"sources":["../../../../../../packages/components/timeline/src/timeline-item.vue"],"sourcesContent":["<template>\n <li :class=\"timelineItemKls\">\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, inject } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { useNamespace } from '@element-plus/hooks'\nimport { TIMELINE_INJECTION_KEY } from './tokens'\n\nimport type { TimelineProvider } from './tokens'\nimport type { TimelineItemProps } from './timeline-item'\n\ndefineOptions({\n name: 'ElTimelineItem',\n})\n\nconst props = withDefaults(defineProps<TimelineItemProps>(), {\n timestamp: '',\n placement: 'bottom',\n type: '',\n color: '',\n size: 'normal',\n})\nconst { props: timelineProps } = inject<TimelineProvider>(\n TIMELINE_INJECTION_KEY\n)!\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\nconst timelineItemKls = computed(() => [\n ns.b(),\n { [ns.e('center')]: props.center },\n ns.is(timelineProps.mode),\n])\n</script>\n"],"mappings":""}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
import { EpPropFinalized, EpPropMergeType } from "../../../utils/vue/props/types.js";
|
||||
import "../../../utils/index.js";
|
||||
import * as vue from "vue";
|
||||
import { ExtractPropTypes, ExtractPublicPropTypes } from "vue";
|
||||
|
||||
//#region ../../packages/components/timeline/src/timeline.d.ts
|
||||
declare const timelineProps: {
|
||||
readonly mode: EpPropFinalized<StringConstructor, "end" | "start" | "alternate" | "alternate-reverse", unknown, "start", boolean>;
|
||||
readonly reverse: BooleanConstructor;
|
||||
};
|
||||
type TimelineProps = ExtractPropTypes<typeof timelineProps>;
|
||||
type TimelinePropsPublic = ExtractPublicPropTypes<typeof timelineProps>;
|
||||
declare const Timeline: vue.DefineComponent<ExtractPropTypes<{
|
||||
readonly mode: EpPropFinalized<StringConstructor, "end" | "start" | "alternate" | "alternate-reverse", unknown, "start", boolean>;
|
||||
readonly reverse: BooleanConstructor;
|
||||
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
||||
[key: string]: any;
|
||||
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<ExtractPropTypes<{
|
||||
readonly mode: EpPropFinalized<StringConstructor, "end" | "start" | "alternate" | "alternate-reverse", unknown, "start", boolean>;
|
||||
readonly reverse: BooleanConstructor;
|
||||
}>> & Readonly<{}>, {
|
||||
readonly reverse: boolean;
|
||||
readonly mode: EpPropMergeType<StringConstructor, "end" | "start" | "alternate" | "alternate-reverse", unknown>;
|
||||
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
||||
type TimelineInstance = InstanceType<typeof Timeline> & unknown;
|
||||
//#endregion
|
||||
export { Timeline, TimelineInstance, TimelineProps, TimelinePropsPublic, timelineProps };
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
||||
const require_runtime = require('../../../_virtual/_rolldown/runtime.js');
|
||||
const require_runtime$1 = require('../../../utils/vue/props/runtime.js');
|
||||
const require_vnode = require('../../../utils/vue/vnode.js');
|
||||
const require_index = require('../../../hooks/use-namespace/index.js');
|
||||
const require_tokens = require('./tokens.js');
|
||||
let vue = require("vue");
|
||||
|
||||
//#region ../../packages/components/timeline/src/timeline.ts
|
||||
const timelineProps = require_runtime$1.buildProps({
|
||||
mode: {
|
||||
type: String,
|
||||
values: [
|
||||
"start",
|
||||
"alternate",
|
||||
"alternate-reverse",
|
||||
"end"
|
||||
],
|
||||
default: "start"
|
||||
},
|
||||
reverse: Boolean
|
||||
});
|
||||
const Timeline = (0, vue.defineComponent)({
|
||||
name: "ElTimeline",
|
||||
props: timelineProps,
|
||||
setup(props, { slots }) {
|
||||
const ns = require_index.useNamespace("timeline");
|
||||
(0, vue.provide)(require_tokens.TIMELINE_INJECTION_KEY, {
|
||||
props,
|
||||
slots
|
||||
});
|
||||
const timelineKls = (0, vue.computed)(() => [ns.b(), ns.is(props.mode)]);
|
||||
return () => {
|
||||
const children = require_vnode.flattedChildren(slots.default?.() ?? []);
|
||||
return (0, vue.h)("ul", { class: timelineKls.value }, props.reverse ? children.reverse() : children);
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
//#endregion
|
||||
exports.default = Timeline;
|
||||
exports.timelineProps = timelineProps;
|
||||
//# sourceMappingURL=timeline.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"timeline.js","names":["buildProps","useNamespace","TIMELINE_INJECTION_KEY","flattedChildren"],"sources":["../../../../../../packages/components/timeline/src/timeline.ts"],"sourcesContent":["import { computed, defineComponent, h, provide } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { TIMELINE_INJECTION_KEY } from './tokens'\nimport { buildProps, flattedChildren } from '@element-plus/utils'\n\nimport type { VNodeChildAtom } from '@element-plus/utils'\nimport type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue'\nimport type { TimelineProvider } from './tokens'\n\nexport const timelineProps = buildProps({\n /**\n * @description relative position of timeline and content\n */\n mode: {\n type: String,\n values: ['start', 'alternate', 'alternate-reverse', 'end'],\n default: 'start',\n },\n /**\n * @description whether reverse order\n */\n reverse: Boolean,\n} as const)\nexport type TimelineProps = ExtractPropTypes<typeof timelineProps>\nexport type TimelinePropsPublic = ExtractPublicPropTypes<typeof timelineProps>\n\nconst Timeline = defineComponent({\n name: 'ElTimeline',\n props: timelineProps,\n\n setup(props, { slots }) {\n const ns = useNamespace('timeline')\n\n provide<TimelineProvider>(TIMELINE_INJECTION_KEY, { props, slots })\n\n const timelineKls = computed(() => [ns.b(), ns.is(props.mode)])\n\n return () => {\n const children = flattedChildren(\n slots.default?.() ?? []\n ) as VNodeChildAtom[]\n\n return h(\n 'ul',\n { class: timelineKls.value },\n props.reverse ? children.reverse() : children\n )\n }\n },\n})\n\nexport default Timeline\nexport type TimelineInstance = InstanceType<typeof Timeline> & unknown\n"],"mappings":";;;;;;;;;AASA,MAAa,gBAAgBA,6BAAW;CAItC,MAAM;EACJ,MAAM;EACN,QAAQ;GAAC;GAAS;GAAa;GAAqB;GAAM;EAC1D,SAAS;EACV;CAID,SAAS;CACV,CAAU;AAIX,MAAM,oCAA2B;CAC/B,MAAM;CACN,OAAO;CAEP,MAAM,OAAO,EAAE,SAAS;EACtB,MAAM,KAAKC,2BAAa,WAAW;AAEnC,mBAA0BC,uCAAwB;GAAE;GAAO;GAAO,CAAC;EAEnE,MAAM,sCAA6B,CAAC,GAAG,GAAG,EAAE,GAAG,GAAG,MAAM,KAAK,CAAC,CAAC;AAE/D,eAAa;GACX,MAAM,WAAWC,8BACf,MAAM,WAAW,IAAI,EAAE,CACxB;AAED,qBACE,MACA,EAAE,OAAO,YAAY,OAAO,EAC5B,MAAM,UAAU,SAAS,SAAS,GAAG,SACtC;;;CAGN,CAAC"}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
import { TimelineProps } from "./timeline.js";
|
||||
import { Slots } from "vue";
|
||||
|
||||
//#region ../../packages/components/timeline/src/tokens.d.ts
|
||||
interface TimelineProvider {
|
||||
props: TimelineProps;
|
||||
slots: Slots;
|
||||
}
|
||||
declare const TIMELINE_INJECTION_KEY = "timeline";
|
||||
//#endregion
|
||||
export { TIMELINE_INJECTION_KEY, TimelineProvider };
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
|
||||
//#region ../../packages/components/timeline/src/tokens.ts
|
||||
const TIMELINE_INJECTION_KEY = "timeline";
|
||||
|
||||
//#endregion
|
||||
exports.TIMELINE_INJECTION_KEY = TIMELINE_INJECTION_KEY;
|
||||
//# sourceMappingURL=tokens.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"tokens.js","names":[],"sources":["../../../../../../packages/components/timeline/src/tokens.ts"],"sourcesContent":["import type { Slots } from 'vue'\nimport type { TimelineProps } from './timeline'\n\nexport interface TimelineProvider {\n props: TimelineProps\n slots: Slots\n}\n\nexport const TIMELINE_INJECTION_KEY = 'timeline'\n"],"mappings":";;;AAQA,MAAa,yBAAyB"}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
require('../../base/style/css.js');
|
||||
require("element-plus/theme-chalk/el-timeline.css");
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
require('../../base/style/index.js');
|
||||
require("element-plus/theme-chalk/src/timeline.scss");
|
||||
Reference in New Issue
Block a user