@mekari/pixel3-timeline 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion.d.mts +28 -0
- package/dist/accordion.d.ts +28 -0
- package/dist/accordion.js +165 -0
- package/dist/accordion.mjs +9 -0
- package/dist/body.d.mts +6 -0
- package/dist/body.d.ts +6 -0
- package/dist/body.js +50 -0
- package/dist/body.mjs +7 -0
- package/dist/caption.d.mts +6 -0
- package/dist/caption.d.ts +6 -0
- package/dist/caption.js +50 -0
- package/dist/caption.mjs +7 -0
- package/dist/chunk-34WPFRDZ.mjs +63 -0
- package/dist/chunk-6JLFY5TN.mjs +71 -0
- package/dist/chunk-7DG62NMG.mjs +47 -0
- package/dist/chunk-BR4DIYFA.mjs +85 -0
- package/dist/chunk-F5W3GZXM.mjs +26 -0
- package/dist/chunk-GIZF7OP5.mjs +23 -0
- package/dist/chunk-HSNDCO4E.mjs +23 -0
- package/dist/chunk-IM7DTIFU.mjs +71 -0
- package/dist/chunk-QZ7VFGWC.mjs +6 -0
- package/dist/chunk-TT37T2C6.mjs +43 -0
- package/dist/chunk-U2PMOVHB.mjs +111 -0
- package/dist/chunk-WXCDLWFJ.mjs +19 -0
- package/dist/chunk-ZG4NN7A5.mjs +26 -0
- package/dist/content.d.mts +6 -0
- package/dist/content.d.ts +6 -0
- package/dist/content.js +47 -0
- package/dist/content.mjs +7 -0
- package/dist/document.d.mts +36 -0
- package/dist/document.d.ts +36 -0
- package/dist/document.js +110 -0
- package/dist/document.mjs +8 -0
- package/dist/index.d.mts +11 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +587 -0
- package/dist/index.mjs +42 -0
- package/dist/item.d.mts +42 -0
- package/dist/item.d.ts +42 -0
- package/dist/item.js +200 -0
- package/dist/item.mjs +10 -0
- package/dist/log-item.d.mts +6 -0
- package/dist/log-item.d.ts +6 -0
- package/dist/log-item.js +47 -0
- package/dist/log-item.mjs +7 -0
- package/dist/log.d.mts +6 -0
- package/dist/log.d.ts +6 -0
- package/dist/log.js +87 -0
- package/dist/log.mjs +7 -0
- package/dist/metafile-cjs.json +1 -0
- package/dist/metafile-esm.json +1 -0
- package/dist/modules/timeline.props.d.mts +67 -0
- package/dist/modules/timeline.props.d.ts +67 -0
- package/dist/modules/timeline.props.js +98 -0
- package/dist/modules/timeline.props.mjs +13 -0
- package/dist/separator.d.mts +42 -0
- package/dist/separator.d.ts +42 -0
- package/dist/separator.js +127 -0
- package/dist/separator.mjs +8 -0
- package/dist/timeline.d.mts +9 -0
- package/dist/timeline.d.ts +9 -0
- package/dist/timeline.js +68 -0
- package/dist/timeline.mjs +7 -0
- package/dist/title.d.mts +6 -0
- package/dist/title.d.ts +6 -0
- package/dist/title.js +43 -0
- package/dist/title.mjs +7 -0
- package/package.json +43 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as vue_jsx_runtime from 'vue/jsx-runtime';
|
|
2
|
+
import * as vue from 'vue';
|
|
3
|
+
|
|
4
|
+
declare const MpTimelineAccordion: vue.DefineComponent<{
|
|
5
|
+
isOpen: {
|
|
6
|
+
type: vue.PropType<boolean>;
|
|
7
|
+
};
|
|
8
|
+
label: {
|
|
9
|
+
type: vue.PropType<string>;
|
|
10
|
+
required: boolean;
|
|
11
|
+
};
|
|
12
|
+
position: {
|
|
13
|
+
type: vue.PropType<string>;
|
|
14
|
+
};
|
|
15
|
+
}, () => vue_jsx_runtime.JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
|
|
16
|
+
isOpen: {
|
|
17
|
+
type: vue.PropType<boolean>;
|
|
18
|
+
};
|
|
19
|
+
label: {
|
|
20
|
+
type: vue.PropType<string>;
|
|
21
|
+
required: boolean;
|
|
22
|
+
};
|
|
23
|
+
position: {
|
|
24
|
+
type: vue.PropType<string>;
|
|
25
|
+
};
|
|
26
|
+
}>>, {}>;
|
|
27
|
+
|
|
28
|
+
export { MpTimelineAccordion };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as vue_jsx_runtime from 'vue/jsx-runtime';
|
|
2
|
+
import * as vue from 'vue';
|
|
3
|
+
|
|
4
|
+
declare const MpTimelineAccordion: vue.DefineComponent<{
|
|
5
|
+
isOpen: {
|
|
6
|
+
type: vue.PropType<boolean>;
|
|
7
|
+
};
|
|
8
|
+
label: {
|
|
9
|
+
type: vue.PropType<string>;
|
|
10
|
+
required: boolean;
|
|
11
|
+
};
|
|
12
|
+
position: {
|
|
13
|
+
type: vue.PropType<string>;
|
|
14
|
+
};
|
|
15
|
+
}, () => vue_jsx_runtime.JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
|
|
16
|
+
isOpen: {
|
|
17
|
+
type: vue.PropType<boolean>;
|
|
18
|
+
};
|
|
19
|
+
label: {
|
|
20
|
+
type: vue.PropType<string>;
|
|
21
|
+
required: boolean;
|
|
22
|
+
};
|
|
23
|
+
position: {
|
|
24
|
+
type: vue.PropType<string>;
|
|
25
|
+
};
|
|
26
|
+
}>>, {}>;
|
|
27
|
+
|
|
28
|
+
export { MpTimelineAccordion };
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/accordion.tsx
|
|
22
|
+
var accordion_exports = {};
|
|
23
|
+
__export(accordion_exports, {
|
|
24
|
+
MpTimelineAccordion: () => MpTimelineAccordion
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(accordion_exports);
|
|
27
|
+
var import_vue3 = require("vue");
|
|
28
|
+
var import_pixel3_icon = require("@mekari/pixel3-icon");
|
|
29
|
+
var import_css2 = require("@mekari/pixel3-styled-system/css");
|
|
30
|
+
var import_patterns = require("@mekari/pixel3-styled-system/patterns");
|
|
31
|
+
var import_pixel3_transition = require("@mekari/pixel3-transition");
|
|
32
|
+
var import_vue4 = require("vue");
|
|
33
|
+
|
|
34
|
+
// src/body.tsx
|
|
35
|
+
var import_vue = require("vue");
|
|
36
|
+
var import_vue2 = require("vue");
|
|
37
|
+
var import_css = require("@mekari/pixel3-styled-system/css");
|
|
38
|
+
var MpTimelineBody = (0, import_vue2.defineComponent)({
|
|
39
|
+
name: "MpTimelineBody",
|
|
40
|
+
setup(_props, {
|
|
41
|
+
slots
|
|
42
|
+
}) {
|
|
43
|
+
return () => {
|
|
44
|
+
return (0, import_vue.createVNode)("div", {
|
|
45
|
+
"data-pixel-component": "MpTimelineBody",
|
|
46
|
+
"class": (0, import_css.css)({
|
|
47
|
+
marginLeft: "3",
|
|
48
|
+
paddingTop: "6px",
|
|
49
|
+
paddingBottom: "3",
|
|
50
|
+
width: "full"
|
|
51
|
+
})
|
|
52
|
+
}, [slots.default && slots.default()]);
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
// src/modules/timeline.props.ts
|
|
58
|
+
var timelineAccordionProps = {
|
|
59
|
+
isOpen: {
|
|
60
|
+
type: Boolean
|
|
61
|
+
},
|
|
62
|
+
label: {
|
|
63
|
+
type: String,
|
|
64
|
+
required: true
|
|
65
|
+
},
|
|
66
|
+
position: {
|
|
67
|
+
type: String
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
// src/accordion.tsx
|
|
72
|
+
function _isSlot(s) {
|
|
73
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !(0, import_vue3.isVNode)(s);
|
|
74
|
+
}
|
|
75
|
+
__name(_isSlot, "_isSlot");
|
|
76
|
+
var MpTimelineAccordion = (0, import_vue4.defineComponent)({
|
|
77
|
+
name: "MpTimelineAccordion",
|
|
78
|
+
props: timelineAccordionProps,
|
|
79
|
+
setup(props, {
|
|
80
|
+
slots
|
|
81
|
+
}) {
|
|
82
|
+
const isOpen = (0, import_vue4.ref)(props.isOpen || false);
|
|
83
|
+
return () => {
|
|
84
|
+
const children = slots.default && slots.default();
|
|
85
|
+
const timelineItemVNode = children ? children.filter((n) => n.type.name === "MpTimelineItem") : [];
|
|
86
|
+
const length = timelineItemVNode.length - 1;
|
|
87
|
+
const cloneTimelineItem = timelineItemVNode.map((vnode, index) => {
|
|
88
|
+
const getPosition = /* @__PURE__ */ __name((index2) => {
|
|
89
|
+
if (props.position === "last") {
|
|
90
|
+
if (index2 === length)
|
|
91
|
+
return "last";
|
|
92
|
+
}
|
|
93
|
+
return "";
|
|
94
|
+
}, "getPosition");
|
|
95
|
+
const node = (0, import_vue4.cloneVNode)(vnode, {
|
|
96
|
+
position: getPosition(index)
|
|
97
|
+
});
|
|
98
|
+
return node;
|
|
99
|
+
});
|
|
100
|
+
return (0, import_vue3.createVNode)("li", {
|
|
101
|
+
"data-pixel-component": "MpTimelineAccordion"
|
|
102
|
+
}, [(0, import_vue3.createVNode)("div", {
|
|
103
|
+
"data-pixel-component": "MpTimelineAccordionBody",
|
|
104
|
+
"class": (0, import_patterns.flex)()
|
|
105
|
+
}, [(0, import_vue3.createVNode)("div", {
|
|
106
|
+
"data-pixel-component": "MpTimelineAccordionSeparator",
|
|
107
|
+
"class": (0, import_patterns.flex)({
|
|
108
|
+
flexDirection: "column",
|
|
109
|
+
alignItems: "center"
|
|
110
|
+
})
|
|
111
|
+
}, [(0, import_vue3.createVNode)("div", {
|
|
112
|
+
"data-pixel-component": "MpTimelineAccordionConnector",
|
|
113
|
+
"class": (0, import_css2.css)({
|
|
114
|
+
height: "4px",
|
|
115
|
+
width: "2px",
|
|
116
|
+
backgroundColor: props.position === "first" ? "transparent" : "gray.100",
|
|
117
|
+
roundedBottom: "full"
|
|
118
|
+
})
|
|
119
|
+
}, null), (0, import_vue3.createVNode)("button", {
|
|
120
|
+
"role": "button",
|
|
121
|
+
"aria-expanded": isOpen.value || void 0,
|
|
122
|
+
"onClick": () => isOpen.value = !isOpen.value
|
|
123
|
+
}, [(0, import_vue3.createVNode)(import_pixel3_icon.MpIcon, {
|
|
124
|
+
"name": isOpen.value ? "accordion-expand" : "accordion-collapse",
|
|
125
|
+
"size": "sm",
|
|
126
|
+
"color": "gray.600",
|
|
127
|
+
"class": (0, import_css2.css)({
|
|
128
|
+
my: 1,
|
|
129
|
+
cursor: "pointer"
|
|
130
|
+
})
|
|
131
|
+
}, null)]), (0, import_vue3.createVNode)("div", {
|
|
132
|
+
"data-pixel-component": "MpTimelineAccordionConnector",
|
|
133
|
+
"class": (0, import_css2.css)({
|
|
134
|
+
flexGrow: 1,
|
|
135
|
+
width: "2px",
|
|
136
|
+
backgroundColor: !isOpen.value && props.position === "last" ? "transparent" : "gray.100",
|
|
137
|
+
roundedTop: "full"
|
|
138
|
+
})
|
|
139
|
+
}, null)]), (0, import_vue3.createVNode)(MpTimelineBody, null, {
|
|
140
|
+
default: () => [(0, import_vue3.createVNode)("div", {
|
|
141
|
+
"class": (0, import_css2.css)({
|
|
142
|
+
paddingTop: 1
|
|
143
|
+
}),
|
|
144
|
+
"data-pixel-component": "MpTimelineAccordionTitle"
|
|
145
|
+
}, [(0, import_vue3.createVNode)("p", {
|
|
146
|
+
"class": (0, import_css2.css)({
|
|
147
|
+
fontSize: "md",
|
|
148
|
+
lineHeight: "md",
|
|
149
|
+
color: "dark",
|
|
150
|
+
fontWeight: "semibold",
|
|
151
|
+
letterSpacing: "normal"
|
|
152
|
+
})
|
|
153
|
+
}, [(0, import_vue3.createTextVNode)("Label")])])]
|
|
154
|
+
})]), (0, import_vue3.createVNode)(import_pixel3_transition.MpAnimateHeight, {
|
|
155
|
+
"isOpen": isOpen.value
|
|
156
|
+
}, _isSlot(cloneTimelineItem) ? cloneTimelineItem : {
|
|
157
|
+
default: () => [cloneTimelineItem]
|
|
158
|
+
})]);
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
163
|
+
0 && (module.exports = {
|
|
164
|
+
MpTimelineAccordion
|
|
165
|
+
});
|
package/dist/body.d.mts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import * as vue_jsx_runtime from 'vue/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
declare const MpTimelineBody: vue.DefineComponent<{}, () => vue_jsx_runtime.JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{}>>, {}>;
|
|
5
|
+
|
|
6
|
+
export { MpTimelineBody };
|
package/dist/body.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import * as vue_jsx_runtime from 'vue/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
declare const MpTimelineBody: vue.DefineComponent<{}, () => vue_jsx_runtime.JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{}>>, {}>;
|
|
5
|
+
|
|
6
|
+
export { MpTimelineBody };
|
package/dist/body.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/body.tsx
|
|
21
|
+
var body_exports = {};
|
|
22
|
+
__export(body_exports, {
|
|
23
|
+
MpTimelineBody: () => MpTimelineBody
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(body_exports);
|
|
26
|
+
var import_vue = require("vue");
|
|
27
|
+
var import_vue2 = require("vue");
|
|
28
|
+
var import_css = require("@mekari/pixel3-styled-system/css");
|
|
29
|
+
var MpTimelineBody = (0, import_vue2.defineComponent)({
|
|
30
|
+
name: "MpTimelineBody",
|
|
31
|
+
setup(_props, {
|
|
32
|
+
slots
|
|
33
|
+
}) {
|
|
34
|
+
return () => {
|
|
35
|
+
return (0, import_vue.createVNode)("div", {
|
|
36
|
+
"data-pixel-component": "MpTimelineBody",
|
|
37
|
+
"class": (0, import_css.css)({
|
|
38
|
+
marginLeft: "3",
|
|
39
|
+
paddingTop: "6px",
|
|
40
|
+
paddingBottom: "3",
|
|
41
|
+
width: "full"
|
|
42
|
+
})
|
|
43
|
+
}, [slots.default && slots.default()]);
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
+
0 && (module.exports = {
|
|
49
|
+
MpTimelineBody
|
|
50
|
+
});
|
package/dist/body.mjs
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import * as vue_jsx_runtime from 'vue/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
declare const MpTimelineCaption: vue.DefineComponent<{}, () => vue_jsx_runtime.JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{}>>, {}>;
|
|
5
|
+
|
|
6
|
+
export { MpTimelineCaption };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import * as vue_jsx_runtime from 'vue/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
declare const MpTimelineCaption: vue.DefineComponent<{}, () => vue_jsx_runtime.JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{}>>, {}>;
|
|
5
|
+
|
|
6
|
+
export { MpTimelineCaption };
|
package/dist/caption.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/caption.tsx
|
|
21
|
+
var caption_exports = {};
|
|
22
|
+
__export(caption_exports, {
|
|
23
|
+
MpTimelineCaption: () => MpTimelineCaption
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(caption_exports);
|
|
26
|
+
var import_vue = require("vue");
|
|
27
|
+
var import_vue2 = require("vue");
|
|
28
|
+
var import_css = require("@mekari/pixel3-styled-system/css");
|
|
29
|
+
var MpTimelineCaption = (0, import_vue2.defineComponent)({
|
|
30
|
+
name: "MpTimelineItem",
|
|
31
|
+
setup(_props, {
|
|
32
|
+
slots
|
|
33
|
+
}) {
|
|
34
|
+
return () => {
|
|
35
|
+
return (0, import_vue.createVNode)("span", {
|
|
36
|
+
"data-pixel-component": "MpTimelineCaption",
|
|
37
|
+
"class": (0, import_css.css)({
|
|
38
|
+
fontSize: "sm",
|
|
39
|
+
color: "gray.400",
|
|
40
|
+
lineHeight: "sm",
|
|
41
|
+
marginTop: "0.5"
|
|
42
|
+
})
|
|
43
|
+
}, [slots.default && slots.default()]);
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
+
0 && (module.exports = {
|
|
49
|
+
MpTimelineCaption
|
|
50
|
+
});
|
package/dist/caption.mjs
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// src/log.tsx
|
|
2
|
+
import { createVNode as _createVNode, createTextVNode as _createTextVNode } from "vue";
|
|
3
|
+
import { MpIcon } from "@mekari/pixel3-icon";
|
|
4
|
+
import { css } from "@mekari/pixel3-styled-system/css";
|
|
5
|
+
import { flex } from "@mekari/pixel3-styled-system/patterns";
|
|
6
|
+
import { MpAnimateHeight } from "@mekari/pixel3-transition";
|
|
7
|
+
import { defineComponent, ref } from "vue";
|
|
8
|
+
var MpTimelineLog = defineComponent({
|
|
9
|
+
name: "MpTimelineLog",
|
|
10
|
+
setup(_props, {
|
|
11
|
+
slots
|
|
12
|
+
}) {
|
|
13
|
+
const isOpen = ref(false);
|
|
14
|
+
return () => {
|
|
15
|
+
return _createVNode("div", {
|
|
16
|
+
"class": css({
|
|
17
|
+
display: "flex",
|
|
18
|
+
flexDirection: "column"
|
|
19
|
+
})
|
|
20
|
+
}, [_createVNode("button", {
|
|
21
|
+
"data-pixel-component": "MpTimelineLog",
|
|
22
|
+
"aria-expanded": isOpen.value || void 0,
|
|
23
|
+
"class": ["group", flex({
|
|
24
|
+
cursor: "pointer"
|
|
25
|
+
})],
|
|
26
|
+
"onClick": () => isOpen.value = !isOpen.value
|
|
27
|
+
}, [_createVNode("p", {
|
|
28
|
+
"class": css({
|
|
29
|
+
color: "gray.400",
|
|
30
|
+
_groupHover: {
|
|
31
|
+
color: "blue.500"
|
|
32
|
+
}
|
|
33
|
+
})
|
|
34
|
+
}, [_createTextVNode("Change log")]), _createVNode(MpIcon, {
|
|
35
|
+
"name": "caret-down",
|
|
36
|
+
"class": css({
|
|
37
|
+
color: "gray.400",
|
|
38
|
+
_groupHover: {
|
|
39
|
+
color: "blue.500"
|
|
40
|
+
}
|
|
41
|
+
}),
|
|
42
|
+
"style": {
|
|
43
|
+
transition: "transform 0.2s",
|
|
44
|
+
transformOrigin: "center",
|
|
45
|
+
transform: isOpen.value ? "rotate(-180deg)" : ""
|
|
46
|
+
}
|
|
47
|
+
}, null)]), _createVNode(MpAnimateHeight, {
|
|
48
|
+
"isOpen": isOpen.value,
|
|
49
|
+
"as": "ul",
|
|
50
|
+
"class": css({
|
|
51
|
+
listStyleType: "disc",
|
|
52
|
+
paddingLeft: 5
|
|
53
|
+
})
|
|
54
|
+
}, {
|
|
55
|
+
default: () => [slots.default && slots.default()]
|
|
56
|
+
})]);
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
export {
|
|
62
|
+
MpTimelineLog
|
|
63
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// src/modules/timeline.props.ts
|
|
2
|
+
var timelineItemProps = {
|
|
3
|
+
position: {
|
|
4
|
+
type: String
|
|
5
|
+
},
|
|
6
|
+
status: {
|
|
7
|
+
type: String,
|
|
8
|
+
default: "created"
|
|
9
|
+
},
|
|
10
|
+
icon: {
|
|
11
|
+
type: String
|
|
12
|
+
},
|
|
13
|
+
iconVariant: {
|
|
14
|
+
type: String
|
|
15
|
+
},
|
|
16
|
+
iconColor: {
|
|
17
|
+
type: String
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
var timelineDocumentProps = {
|
|
21
|
+
title: {
|
|
22
|
+
type: String
|
|
23
|
+
},
|
|
24
|
+
fileSize: {
|
|
25
|
+
type: String
|
|
26
|
+
},
|
|
27
|
+
icon: {
|
|
28
|
+
type: String
|
|
29
|
+
},
|
|
30
|
+
iconVariant: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: "outline"
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
var timelineAccordionProps = {
|
|
36
|
+
isOpen: {
|
|
37
|
+
type: Boolean
|
|
38
|
+
},
|
|
39
|
+
label: {
|
|
40
|
+
type: String,
|
|
41
|
+
required: true
|
|
42
|
+
},
|
|
43
|
+
position: {
|
|
44
|
+
type: String
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
var timelineSeparatorProps = {
|
|
48
|
+
position: {
|
|
49
|
+
type: String
|
|
50
|
+
},
|
|
51
|
+
status: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: "created"
|
|
54
|
+
},
|
|
55
|
+
icon: {
|
|
56
|
+
type: String
|
|
57
|
+
},
|
|
58
|
+
iconVariant: {
|
|
59
|
+
type: String
|
|
60
|
+
},
|
|
61
|
+
iconColor: {
|
|
62
|
+
type: String
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export {
|
|
67
|
+
timelineItemProps,
|
|
68
|
+
timelineDocumentProps,
|
|
69
|
+
timelineAccordionProps,
|
|
70
|
+
timelineSeparatorProps
|
|
71
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__name
|
|
3
|
+
} from "./chunk-QZ7VFGWC.mjs";
|
|
4
|
+
|
|
5
|
+
// src/timeline.tsx
|
|
6
|
+
import { createVNode as _createVNode } from "vue";
|
|
7
|
+
import { css } from "@mekari/pixel3-styled-system/css";
|
|
8
|
+
import { cloneVNode, defineComponent } from "vue";
|
|
9
|
+
var MpTimeline = defineComponent({
|
|
10
|
+
name: "MpTimeline",
|
|
11
|
+
setup(_props, {
|
|
12
|
+
slots
|
|
13
|
+
}) {
|
|
14
|
+
return () => {
|
|
15
|
+
const children = slots.default && slots.default();
|
|
16
|
+
const timelineItemVNode = children ? children.filter((n) => {
|
|
17
|
+
const name = n.type.name;
|
|
18
|
+
const acceptedNode = ["MpTimelineItem", "MpTimelineAccordion"];
|
|
19
|
+
return acceptedNode.includes(name);
|
|
20
|
+
}) : [];
|
|
21
|
+
const length = timelineItemVNode.length - 1;
|
|
22
|
+
const cloneTimelineItem = timelineItemVNode.map((vnode, index) => {
|
|
23
|
+
const getPosition = /* @__PURE__ */ __name((index2) => {
|
|
24
|
+
if (index2 === length)
|
|
25
|
+
return "last";
|
|
26
|
+
if (index2 === 0)
|
|
27
|
+
return "first";
|
|
28
|
+
return "middle";
|
|
29
|
+
}, "getPosition");
|
|
30
|
+
const node = cloneVNode(vnode, {
|
|
31
|
+
position: getPosition(index)
|
|
32
|
+
});
|
|
33
|
+
return node;
|
|
34
|
+
});
|
|
35
|
+
return _createVNode("ul", {
|
|
36
|
+
"data-pixel-component": "MpTimeline",
|
|
37
|
+
"class": css({
|
|
38
|
+
maxWidth: "sm"
|
|
39
|
+
})
|
|
40
|
+
}, [cloneTimelineItem]);
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
export {
|
|
46
|
+
MpTimeline
|
|
47
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import {
|
|
2
|
+
timelineSeparatorProps
|
|
3
|
+
} from "./chunk-6JLFY5TN.mjs";
|
|
4
|
+
|
|
5
|
+
// src/separator.tsx
|
|
6
|
+
import { createVNode as _createVNode } from "vue";
|
|
7
|
+
import { MpIcon } from "@mekari/pixel3-icon";
|
|
8
|
+
import { css } from "@mekari/pixel3-styled-system/css";
|
|
9
|
+
import { flex } from "@mekari/pixel3-styled-system/patterns";
|
|
10
|
+
import { defineComponent } from "vue";
|
|
11
|
+
var MpTimelineSeparator = defineComponent({
|
|
12
|
+
name: "MpTimelineSeparator",
|
|
13
|
+
props: timelineSeparatorProps,
|
|
14
|
+
setup(props) {
|
|
15
|
+
const classes = {
|
|
16
|
+
wrapper: flex({
|
|
17
|
+
flexDirection: "column",
|
|
18
|
+
alignItems: "center"
|
|
19
|
+
}),
|
|
20
|
+
topConnector: css({
|
|
21
|
+
height: "6px",
|
|
22
|
+
width: "2px",
|
|
23
|
+
backgroundColor: props.position === "first" ? "transparent" : "gray.100",
|
|
24
|
+
roundedBottom: "2px"
|
|
25
|
+
}),
|
|
26
|
+
bottomConnector: css({
|
|
27
|
+
height: "100%",
|
|
28
|
+
flexGrow: 1,
|
|
29
|
+
width: "2px",
|
|
30
|
+
backgroundColor: props.position === "last" ? "transparent" : "gray.100",
|
|
31
|
+
roundedTop: "2px"
|
|
32
|
+
})
|
|
33
|
+
};
|
|
34
|
+
const iconAttrs = {
|
|
35
|
+
approved: {
|
|
36
|
+
name: "done",
|
|
37
|
+
color: "green.700",
|
|
38
|
+
variant: "fill"
|
|
39
|
+
},
|
|
40
|
+
canceled: {
|
|
41
|
+
name: "error",
|
|
42
|
+
color: "gray.400",
|
|
43
|
+
variant: "fill"
|
|
44
|
+
},
|
|
45
|
+
"need-approval": {
|
|
46
|
+
name: "time",
|
|
47
|
+
color: "orange.700",
|
|
48
|
+
variant: "fill"
|
|
49
|
+
},
|
|
50
|
+
rejected: {
|
|
51
|
+
name: "error",
|
|
52
|
+
color: "red.700",
|
|
53
|
+
variant: "fill"
|
|
54
|
+
},
|
|
55
|
+
created: {
|
|
56
|
+
name: "indicator-circle",
|
|
57
|
+
color: "blue.400",
|
|
58
|
+
variant: "fill"
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
return () => {
|
|
62
|
+
return _createVNode("div", {
|
|
63
|
+
"data-pixel-component": "MpTimelineSeparator",
|
|
64
|
+
"class": classes.wrapper
|
|
65
|
+
}, [_createVNode("div", {
|
|
66
|
+
"data-pixel-component": "MpTimelineConnector",
|
|
67
|
+
"data-connector": "top",
|
|
68
|
+
"class": classes.topConnector
|
|
69
|
+
}, null), _createVNode(MpIcon, {
|
|
70
|
+
"name": props.icon || iconAttrs[props.status].name,
|
|
71
|
+
"color": props.iconColor || iconAttrs[props.status].color,
|
|
72
|
+
"variant": props.iconVariant || iconAttrs[props.status].variant,
|
|
73
|
+
"size": "sm"
|
|
74
|
+
}, null), _createVNode("div", {
|
|
75
|
+
"data-connector": "bottom",
|
|
76
|
+
"data-pixel-component": "MpTimelineConnector",
|
|
77
|
+
"class": classes.bottomConnector
|
|
78
|
+
}, null)]);
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
export {
|
|
84
|
+
MpTimelineSeparator
|
|
85
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// src/body.tsx
|
|
2
|
+
import { createVNode as _createVNode } from "vue";
|
|
3
|
+
import { defineComponent } from "vue";
|
|
4
|
+
import { css } from "@mekari/pixel3-styled-system/css";
|
|
5
|
+
var MpTimelineBody = defineComponent({
|
|
6
|
+
name: "MpTimelineBody",
|
|
7
|
+
setup(_props, {
|
|
8
|
+
slots
|
|
9
|
+
}) {
|
|
10
|
+
return () => {
|
|
11
|
+
return _createVNode("div", {
|
|
12
|
+
"data-pixel-component": "MpTimelineBody",
|
|
13
|
+
"class": css({
|
|
14
|
+
marginLeft: "3",
|
|
15
|
+
paddingTop: "6px",
|
|
16
|
+
paddingBottom: "3",
|
|
17
|
+
width: "full"
|
|
18
|
+
})
|
|
19
|
+
}, [slots.default && slots.default()]);
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export {
|
|
25
|
+
MpTimelineBody
|
|
26
|
+
};
|