@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
package/dist/index.js
ADDED
|
@@ -0,0 +1,587 @@
|
|
|
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/index.ts
|
|
22
|
+
var src_exports = {};
|
|
23
|
+
__export(src_exports, {
|
|
24
|
+
MpTimelinLogItem: () => MpTimelinLogItem,
|
|
25
|
+
MpTimeline: () => MpTimeline,
|
|
26
|
+
MpTimelineAccordion: () => MpTimelineAccordion,
|
|
27
|
+
MpTimelineCaption: () => MpTimelineCaption,
|
|
28
|
+
MpTimelineContent: () => MpTimelineContent,
|
|
29
|
+
MpTimelineDocument: () => MpTimelineDocument,
|
|
30
|
+
MpTimelineItem: () => MpTimelineItem,
|
|
31
|
+
MpTimelineLog: () => MpTimelineLog,
|
|
32
|
+
MpTimelineTitle: () => MpTimelineTitle
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(src_exports);
|
|
35
|
+
|
|
36
|
+
// src/accordion.tsx
|
|
37
|
+
var import_vue3 = require("vue");
|
|
38
|
+
var import_pixel3_icon = require("@mekari/pixel3-icon");
|
|
39
|
+
var import_css2 = require("@mekari/pixel3-styled-system/css");
|
|
40
|
+
var import_patterns = require("@mekari/pixel3-styled-system/patterns");
|
|
41
|
+
var import_pixel3_transition = require("@mekari/pixel3-transition");
|
|
42
|
+
var import_vue4 = require("vue");
|
|
43
|
+
|
|
44
|
+
// src/body.tsx
|
|
45
|
+
var import_vue = require("vue");
|
|
46
|
+
var import_vue2 = require("vue");
|
|
47
|
+
var import_css = require("@mekari/pixel3-styled-system/css");
|
|
48
|
+
var MpTimelineBody = (0, import_vue2.defineComponent)({
|
|
49
|
+
name: "MpTimelineBody",
|
|
50
|
+
setup(_props, {
|
|
51
|
+
slots
|
|
52
|
+
}) {
|
|
53
|
+
return () => {
|
|
54
|
+
return (0, import_vue.createVNode)("div", {
|
|
55
|
+
"data-pixel-component": "MpTimelineBody",
|
|
56
|
+
"class": (0, import_css.css)({
|
|
57
|
+
marginLeft: "3",
|
|
58
|
+
paddingTop: "6px",
|
|
59
|
+
paddingBottom: "3",
|
|
60
|
+
width: "full"
|
|
61
|
+
})
|
|
62
|
+
}, [slots.default && slots.default()]);
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
// src/modules/timeline.props.ts
|
|
68
|
+
var timelineItemProps = {
|
|
69
|
+
position: {
|
|
70
|
+
type: String
|
|
71
|
+
},
|
|
72
|
+
status: {
|
|
73
|
+
type: String,
|
|
74
|
+
default: "created"
|
|
75
|
+
},
|
|
76
|
+
icon: {
|
|
77
|
+
type: String
|
|
78
|
+
},
|
|
79
|
+
iconVariant: {
|
|
80
|
+
type: String
|
|
81
|
+
},
|
|
82
|
+
iconColor: {
|
|
83
|
+
type: String
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
var timelineDocumentProps = {
|
|
87
|
+
title: {
|
|
88
|
+
type: String
|
|
89
|
+
},
|
|
90
|
+
fileSize: {
|
|
91
|
+
type: String
|
|
92
|
+
},
|
|
93
|
+
icon: {
|
|
94
|
+
type: String
|
|
95
|
+
},
|
|
96
|
+
iconVariant: {
|
|
97
|
+
type: String,
|
|
98
|
+
default: "outline"
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
var timelineAccordionProps = {
|
|
102
|
+
isOpen: {
|
|
103
|
+
type: Boolean
|
|
104
|
+
},
|
|
105
|
+
label: {
|
|
106
|
+
type: String,
|
|
107
|
+
required: true
|
|
108
|
+
},
|
|
109
|
+
position: {
|
|
110
|
+
type: String
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
var timelineSeparatorProps = {
|
|
114
|
+
position: {
|
|
115
|
+
type: String
|
|
116
|
+
},
|
|
117
|
+
status: {
|
|
118
|
+
type: String,
|
|
119
|
+
default: "created"
|
|
120
|
+
},
|
|
121
|
+
icon: {
|
|
122
|
+
type: String
|
|
123
|
+
},
|
|
124
|
+
iconVariant: {
|
|
125
|
+
type: String
|
|
126
|
+
},
|
|
127
|
+
iconColor: {
|
|
128
|
+
type: String
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
// src/accordion.tsx
|
|
133
|
+
function _isSlot(s) {
|
|
134
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !(0, import_vue3.isVNode)(s);
|
|
135
|
+
}
|
|
136
|
+
__name(_isSlot, "_isSlot");
|
|
137
|
+
var MpTimelineAccordion = (0, import_vue4.defineComponent)({
|
|
138
|
+
name: "MpTimelineAccordion",
|
|
139
|
+
props: timelineAccordionProps,
|
|
140
|
+
setup(props, {
|
|
141
|
+
slots
|
|
142
|
+
}) {
|
|
143
|
+
const isOpen = (0, import_vue4.ref)(props.isOpen || false);
|
|
144
|
+
return () => {
|
|
145
|
+
const children = slots.default && slots.default();
|
|
146
|
+
const timelineItemVNode = children ? children.filter((n) => n.type.name === "MpTimelineItem") : [];
|
|
147
|
+
const length = timelineItemVNode.length - 1;
|
|
148
|
+
const cloneTimelineItem = timelineItemVNode.map((vnode, index) => {
|
|
149
|
+
const getPosition = /* @__PURE__ */ __name((index2) => {
|
|
150
|
+
if (props.position === "last") {
|
|
151
|
+
if (index2 === length)
|
|
152
|
+
return "last";
|
|
153
|
+
}
|
|
154
|
+
return "";
|
|
155
|
+
}, "getPosition");
|
|
156
|
+
const node = (0, import_vue4.cloneVNode)(vnode, {
|
|
157
|
+
position: getPosition(index)
|
|
158
|
+
});
|
|
159
|
+
return node;
|
|
160
|
+
});
|
|
161
|
+
return (0, import_vue3.createVNode)("li", {
|
|
162
|
+
"data-pixel-component": "MpTimelineAccordion"
|
|
163
|
+
}, [(0, import_vue3.createVNode)("div", {
|
|
164
|
+
"data-pixel-component": "MpTimelineAccordionBody",
|
|
165
|
+
"class": (0, import_patterns.flex)()
|
|
166
|
+
}, [(0, import_vue3.createVNode)("div", {
|
|
167
|
+
"data-pixel-component": "MpTimelineAccordionSeparator",
|
|
168
|
+
"class": (0, import_patterns.flex)({
|
|
169
|
+
flexDirection: "column",
|
|
170
|
+
alignItems: "center"
|
|
171
|
+
})
|
|
172
|
+
}, [(0, import_vue3.createVNode)("div", {
|
|
173
|
+
"data-pixel-component": "MpTimelineAccordionConnector",
|
|
174
|
+
"class": (0, import_css2.css)({
|
|
175
|
+
height: "4px",
|
|
176
|
+
width: "2px",
|
|
177
|
+
backgroundColor: props.position === "first" ? "transparent" : "gray.100",
|
|
178
|
+
roundedBottom: "full"
|
|
179
|
+
})
|
|
180
|
+
}, null), (0, import_vue3.createVNode)("button", {
|
|
181
|
+
"role": "button",
|
|
182
|
+
"aria-expanded": isOpen.value || void 0,
|
|
183
|
+
"onClick": () => isOpen.value = !isOpen.value
|
|
184
|
+
}, [(0, import_vue3.createVNode)(import_pixel3_icon.MpIcon, {
|
|
185
|
+
"name": isOpen.value ? "accordion-expand" : "accordion-collapse",
|
|
186
|
+
"size": "sm",
|
|
187
|
+
"color": "gray.600",
|
|
188
|
+
"class": (0, import_css2.css)({
|
|
189
|
+
my: 1,
|
|
190
|
+
cursor: "pointer"
|
|
191
|
+
})
|
|
192
|
+
}, null)]), (0, import_vue3.createVNode)("div", {
|
|
193
|
+
"data-pixel-component": "MpTimelineAccordionConnector",
|
|
194
|
+
"class": (0, import_css2.css)({
|
|
195
|
+
flexGrow: 1,
|
|
196
|
+
width: "2px",
|
|
197
|
+
backgroundColor: !isOpen.value && props.position === "last" ? "transparent" : "gray.100",
|
|
198
|
+
roundedTop: "full"
|
|
199
|
+
})
|
|
200
|
+
}, null)]), (0, import_vue3.createVNode)(MpTimelineBody, null, {
|
|
201
|
+
default: () => [(0, import_vue3.createVNode)("div", {
|
|
202
|
+
"class": (0, import_css2.css)({
|
|
203
|
+
paddingTop: 1
|
|
204
|
+
}),
|
|
205
|
+
"data-pixel-component": "MpTimelineAccordionTitle"
|
|
206
|
+
}, [(0, import_vue3.createVNode)("p", {
|
|
207
|
+
"class": (0, import_css2.css)({
|
|
208
|
+
fontSize: "md",
|
|
209
|
+
lineHeight: "md",
|
|
210
|
+
color: "dark",
|
|
211
|
+
fontWeight: "semibold",
|
|
212
|
+
letterSpacing: "normal"
|
|
213
|
+
})
|
|
214
|
+
}, [(0, import_vue3.createTextVNode)("Label")])])]
|
|
215
|
+
})]), (0, import_vue3.createVNode)(import_pixel3_transition.MpAnimateHeight, {
|
|
216
|
+
"isOpen": isOpen.value
|
|
217
|
+
}, _isSlot(cloneTimelineItem) ? cloneTimelineItem : {
|
|
218
|
+
default: () => [cloneTimelineItem]
|
|
219
|
+
})]);
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
|
|
224
|
+
// src/caption.tsx
|
|
225
|
+
var import_vue5 = require("vue");
|
|
226
|
+
var import_vue6 = require("vue");
|
|
227
|
+
var import_css3 = require("@mekari/pixel3-styled-system/css");
|
|
228
|
+
var MpTimelineCaption = (0, import_vue6.defineComponent)({
|
|
229
|
+
name: "MpTimelineItem",
|
|
230
|
+
setup(_props, {
|
|
231
|
+
slots
|
|
232
|
+
}) {
|
|
233
|
+
return () => {
|
|
234
|
+
return (0, import_vue5.createVNode)("span", {
|
|
235
|
+
"data-pixel-component": "MpTimelineCaption",
|
|
236
|
+
"class": (0, import_css3.css)({
|
|
237
|
+
fontSize: "sm",
|
|
238
|
+
color: "gray.400",
|
|
239
|
+
lineHeight: "sm",
|
|
240
|
+
marginTop: "0.5"
|
|
241
|
+
})
|
|
242
|
+
}, [slots.default && slots.default()]);
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
// src/content.tsx
|
|
248
|
+
var import_vue7 = require("vue");
|
|
249
|
+
var import_vue8 = require("vue");
|
|
250
|
+
var import_css4 = require("@mekari/pixel3-styled-system/css");
|
|
251
|
+
var MpTimelineContent = (0, import_vue8.defineComponent)({
|
|
252
|
+
name: "MpTimelineContent",
|
|
253
|
+
setup(_props, {
|
|
254
|
+
slots
|
|
255
|
+
}) {
|
|
256
|
+
return () => {
|
|
257
|
+
return (0, import_vue7.createVNode)("div", {
|
|
258
|
+
"data-pixel-component": "MpTimelineContent",
|
|
259
|
+
"class": (0, import_css4.css)({
|
|
260
|
+
paddingTop: 3
|
|
261
|
+
})
|
|
262
|
+
}, [slots.default && slots.default()]);
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
|
|
267
|
+
// src/document.tsx
|
|
268
|
+
var import_vue9 = require("vue");
|
|
269
|
+
var import_pixel3_icon2 = require("@mekari/pixel3-icon");
|
|
270
|
+
var import_css5 = require("@mekari/pixel3-styled-system/css");
|
|
271
|
+
var import_patterns2 = require("@mekari/pixel3-styled-system/patterns");
|
|
272
|
+
var import_vue10 = require("vue");
|
|
273
|
+
var MpTimelineDocument = (0, import_vue10.defineComponent)({
|
|
274
|
+
name: "MpTimelineDocument",
|
|
275
|
+
props: timelineDocumentProps,
|
|
276
|
+
setup(props, {
|
|
277
|
+
slots
|
|
278
|
+
}) {
|
|
279
|
+
return () => {
|
|
280
|
+
return (0, import_vue9.createVNode)("span", {
|
|
281
|
+
"data-pixel-component": "MpTimelineDocument",
|
|
282
|
+
"class": (0, import_css5.css)({
|
|
283
|
+
display: "flex",
|
|
284
|
+
alignItems: "center",
|
|
285
|
+
paddingX: "3",
|
|
286
|
+
paddingY: "2",
|
|
287
|
+
borderRadius: "lg",
|
|
288
|
+
borderWidth: "1px",
|
|
289
|
+
borderColor: "gray.100",
|
|
290
|
+
width: "full"
|
|
291
|
+
})
|
|
292
|
+
}, [(0, import_vue9.createVNode)(import_pixel3_icon2.MpIcon, {
|
|
293
|
+
"name": props.icon,
|
|
294
|
+
"variant": props.iconVariant
|
|
295
|
+
}, null), (0, import_vue9.createVNode)("div", {
|
|
296
|
+
"class": (0, import_patterns2.flex)({
|
|
297
|
+
flexDirection: "column",
|
|
298
|
+
marginLeft: props.icon ? "3" : "0"
|
|
299
|
+
})
|
|
300
|
+
}, [(0, import_vue9.createVNode)("p", {
|
|
301
|
+
"style": {
|
|
302
|
+
overflow: "hidden",
|
|
303
|
+
display: "-webkit-box",
|
|
304
|
+
"-webkit-box-orient": "vertical",
|
|
305
|
+
"-webkit-line-clamp": 1
|
|
306
|
+
},
|
|
307
|
+
"class": (0, import_css5.css)({
|
|
308
|
+
fontSize: "sm",
|
|
309
|
+
lineHeight: "md",
|
|
310
|
+
fontWeight: "regular",
|
|
311
|
+
letterSpacing: "normal",
|
|
312
|
+
color: "dark"
|
|
313
|
+
})
|
|
314
|
+
}, [props.title]), (0, import_vue9.createVNode)("div", {
|
|
315
|
+
"class": (0, import_patterns2.flex)({
|
|
316
|
+
alignItems: "center"
|
|
317
|
+
})
|
|
318
|
+
}, [(0, import_vue9.createVNode)("p", {
|
|
319
|
+
"class": (0, import_css5.css)({
|
|
320
|
+
fontSize: "sm",
|
|
321
|
+
lineHeight: "md",
|
|
322
|
+
fontWeight: "regular",
|
|
323
|
+
letterSpacing: "normal",
|
|
324
|
+
color: "gray.400"
|
|
325
|
+
})
|
|
326
|
+
}, [props.fileSize, (0, import_vue9.createTextVNode)(" "), slots.default && " - "]), slots.default && slots.default()])])]);
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
});
|
|
330
|
+
|
|
331
|
+
// src/item.tsx
|
|
332
|
+
var import_vue13 = require("vue");
|
|
333
|
+
var import_css7 = require("@mekari/pixel3-styled-system/css");
|
|
334
|
+
var import_vue14 = require("vue");
|
|
335
|
+
|
|
336
|
+
// src/separator.tsx
|
|
337
|
+
var import_vue11 = require("vue");
|
|
338
|
+
var import_pixel3_icon3 = require("@mekari/pixel3-icon");
|
|
339
|
+
var import_css6 = require("@mekari/pixel3-styled-system/css");
|
|
340
|
+
var import_patterns3 = require("@mekari/pixel3-styled-system/patterns");
|
|
341
|
+
var import_vue12 = require("vue");
|
|
342
|
+
var MpTimelineSeparator = (0, import_vue12.defineComponent)({
|
|
343
|
+
name: "MpTimelineSeparator",
|
|
344
|
+
props: timelineSeparatorProps,
|
|
345
|
+
setup(props) {
|
|
346
|
+
const classes = {
|
|
347
|
+
wrapper: (0, import_patterns3.flex)({
|
|
348
|
+
flexDirection: "column",
|
|
349
|
+
alignItems: "center"
|
|
350
|
+
}),
|
|
351
|
+
topConnector: (0, import_css6.css)({
|
|
352
|
+
height: "6px",
|
|
353
|
+
width: "2px",
|
|
354
|
+
backgroundColor: props.position === "first" ? "transparent" : "gray.100",
|
|
355
|
+
roundedBottom: "2px"
|
|
356
|
+
}),
|
|
357
|
+
bottomConnector: (0, import_css6.css)({
|
|
358
|
+
height: "100%",
|
|
359
|
+
flexGrow: 1,
|
|
360
|
+
width: "2px",
|
|
361
|
+
backgroundColor: props.position === "last" ? "transparent" : "gray.100",
|
|
362
|
+
roundedTop: "2px"
|
|
363
|
+
})
|
|
364
|
+
};
|
|
365
|
+
const iconAttrs = {
|
|
366
|
+
approved: {
|
|
367
|
+
name: "done",
|
|
368
|
+
color: "green.700",
|
|
369
|
+
variant: "fill"
|
|
370
|
+
},
|
|
371
|
+
canceled: {
|
|
372
|
+
name: "error",
|
|
373
|
+
color: "gray.400",
|
|
374
|
+
variant: "fill"
|
|
375
|
+
},
|
|
376
|
+
"need-approval": {
|
|
377
|
+
name: "time",
|
|
378
|
+
color: "orange.700",
|
|
379
|
+
variant: "fill"
|
|
380
|
+
},
|
|
381
|
+
rejected: {
|
|
382
|
+
name: "error",
|
|
383
|
+
color: "red.700",
|
|
384
|
+
variant: "fill"
|
|
385
|
+
},
|
|
386
|
+
created: {
|
|
387
|
+
name: "indicator-circle",
|
|
388
|
+
color: "blue.400",
|
|
389
|
+
variant: "fill"
|
|
390
|
+
}
|
|
391
|
+
};
|
|
392
|
+
return () => {
|
|
393
|
+
return (0, import_vue11.createVNode)("div", {
|
|
394
|
+
"data-pixel-component": "MpTimelineSeparator",
|
|
395
|
+
"class": classes.wrapper
|
|
396
|
+
}, [(0, import_vue11.createVNode)("div", {
|
|
397
|
+
"data-pixel-component": "MpTimelineConnector",
|
|
398
|
+
"data-connector": "top",
|
|
399
|
+
"class": classes.topConnector
|
|
400
|
+
}, null), (0, import_vue11.createVNode)(import_pixel3_icon3.MpIcon, {
|
|
401
|
+
"name": props.icon || iconAttrs[props.status].name,
|
|
402
|
+
"color": props.iconColor || iconAttrs[props.status].color,
|
|
403
|
+
"variant": props.iconVariant || iconAttrs[props.status].variant,
|
|
404
|
+
"size": "sm"
|
|
405
|
+
}, null), (0, import_vue11.createVNode)("div", {
|
|
406
|
+
"data-connector": "bottom",
|
|
407
|
+
"data-pixel-component": "MpTimelineConnector",
|
|
408
|
+
"class": classes.bottomConnector
|
|
409
|
+
}, null)]);
|
|
410
|
+
};
|
|
411
|
+
}
|
|
412
|
+
});
|
|
413
|
+
|
|
414
|
+
// src/item.tsx
|
|
415
|
+
var MpTimelineItem = (0, import_vue14.defineComponent)({
|
|
416
|
+
name: "MpTimelineItem",
|
|
417
|
+
props: timelineItemProps,
|
|
418
|
+
setup(props, {
|
|
419
|
+
slots
|
|
420
|
+
}) {
|
|
421
|
+
return () => {
|
|
422
|
+
return (0, import_vue13.createVNode)("li", {
|
|
423
|
+
"data-pixel-component": "MpTimelineItem",
|
|
424
|
+
"data-position": props.position,
|
|
425
|
+
"class": (0, import_css7.css)({
|
|
426
|
+
display: "flex"
|
|
427
|
+
})
|
|
428
|
+
}, [(0, import_vue13.createVNode)(MpTimelineSeparator, {
|
|
429
|
+
"position": props.position,
|
|
430
|
+
"status": props.status,
|
|
431
|
+
"icon": props.icon,
|
|
432
|
+
"iconVariant": props.iconVariant,
|
|
433
|
+
"iconColor": props.iconColor
|
|
434
|
+
}, null), (0, import_vue13.createVNode)(MpTimelineBody, null, {
|
|
435
|
+
default: () => [slots.default && slots.default()]
|
|
436
|
+
})]);
|
|
437
|
+
};
|
|
438
|
+
}
|
|
439
|
+
});
|
|
440
|
+
|
|
441
|
+
// src/log.tsx
|
|
442
|
+
var import_vue15 = require("vue");
|
|
443
|
+
var import_pixel3_icon4 = require("@mekari/pixel3-icon");
|
|
444
|
+
var import_css8 = require("@mekari/pixel3-styled-system/css");
|
|
445
|
+
var import_patterns4 = require("@mekari/pixel3-styled-system/patterns");
|
|
446
|
+
var import_pixel3_transition2 = require("@mekari/pixel3-transition");
|
|
447
|
+
var import_vue16 = require("vue");
|
|
448
|
+
var MpTimelineLog = (0, import_vue16.defineComponent)({
|
|
449
|
+
name: "MpTimelineLog",
|
|
450
|
+
setup(_props, {
|
|
451
|
+
slots
|
|
452
|
+
}) {
|
|
453
|
+
const isOpen = (0, import_vue16.ref)(false);
|
|
454
|
+
return () => {
|
|
455
|
+
return (0, import_vue15.createVNode)("div", {
|
|
456
|
+
"class": (0, import_css8.css)({
|
|
457
|
+
display: "flex",
|
|
458
|
+
flexDirection: "column"
|
|
459
|
+
})
|
|
460
|
+
}, [(0, import_vue15.createVNode)("button", {
|
|
461
|
+
"data-pixel-component": "MpTimelineLog",
|
|
462
|
+
"aria-expanded": isOpen.value || void 0,
|
|
463
|
+
"class": ["group", (0, import_patterns4.flex)({
|
|
464
|
+
cursor: "pointer"
|
|
465
|
+
})],
|
|
466
|
+
"onClick": () => isOpen.value = !isOpen.value
|
|
467
|
+
}, [(0, import_vue15.createVNode)("p", {
|
|
468
|
+
"class": (0, import_css8.css)({
|
|
469
|
+
color: "gray.400",
|
|
470
|
+
_groupHover: {
|
|
471
|
+
color: "blue.500"
|
|
472
|
+
}
|
|
473
|
+
})
|
|
474
|
+
}, [(0, import_vue15.createTextVNode)("Change log")]), (0, import_vue15.createVNode)(import_pixel3_icon4.MpIcon, {
|
|
475
|
+
"name": "caret-down",
|
|
476
|
+
"class": (0, import_css8.css)({
|
|
477
|
+
color: "gray.400",
|
|
478
|
+
_groupHover: {
|
|
479
|
+
color: "blue.500"
|
|
480
|
+
}
|
|
481
|
+
}),
|
|
482
|
+
"style": {
|
|
483
|
+
transition: "transform 0.2s",
|
|
484
|
+
transformOrigin: "center",
|
|
485
|
+
transform: isOpen.value ? "rotate(-180deg)" : ""
|
|
486
|
+
}
|
|
487
|
+
}, null)]), (0, import_vue15.createVNode)(import_pixel3_transition2.MpAnimateHeight, {
|
|
488
|
+
"isOpen": isOpen.value,
|
|
489
|
+
"as": "ul",
|
|
490
|
+
"class": (0, import_css8.css)({
|
|
491
|
+
listStyleType: "disc",
|
|
492
|
+
paddingLeft: 5
|
|
493
|
+
})
|
|
494
|
+
}, {
|
|
495
|
+
default: () => [slots.default && slots.default()]
|
|
496
|
+
})]);
|
|
497
|
+
};
|
|
498
|
+
}
|
|
499
|
+
});
|
|
500
|
+
|
|
501
|
+
// src/log-item.tsx
|
|
502
|
+
var import_vue17 = require("vue");
|
|
503
|
+
var import_css9 = require("@mekari/pixel3-styled-system/css");
|
|
504
|
+
var import_vue18 = require("vue");
|
|
505
|
+
var MpTimelinLogItem = (0, import_vue18.defineComponent)({
|
|
506
|
+
name: "MpTimelinLogItem",
|
|
507
|
+
setup(_props, {
|
|
508
|
+
slots
|
|
509
|
+
}) {
|
|
510
|
+
return () => {
|
|
511
|
+
return (0, import_vue17.createVNode)("li", {
|
|
512
|
+
"data-pixel-component": "MpTimelinLogItem",
|
|
513
|
+
"class": (0, import_css9.css)({
|
|
514
|
+
color: "gray.600"
|
|
515
|
+
})
|
|
516
|
+
}, [slots.default && slots.default()]);
|
|
517
|
+
};
|
|
518
|
+
}
|
|
519
|
+
});
|
|
520
|
+
|
|
521
|
+
// src/timeline.tsx
|
|
522
|
+
var import_vue19 = require("vue");
|
|
523
|
+
var import_css10 = require("@mekari/pixel3-styled-system/css");
|
|
524
|
+
var import_vue20 = require("vue");
|
|
525
|
+
var MpTimeline = (0, import_vue20.defineComponent)({
|
|
526
|
+
name: "MpTimeline",
|
|
527
|
+
setup(_props, {
|
|
528
|
+
slots
|
|
529
|
+
}) {
|
|
530
|
+
return () => {
|
|
531
|
+
const children = slots.default && slots.default();
|
|
532
|
+
const timelineItemVNode = children ? children.filter((n) => {
|
|
533
|
+
const name = n.type.name;
|
|
534
|
+
const acceptedNode = ["MpTimelineItem", "MpTimelineAccordion"];
|
|
535
|
+
return acceptedNode.includes(name);
|
|
536
|
+
}) : [];
|
|
537
|
+
const length = timelineItemVNode.length - 1;
|
|
538
|
+
const cloneTimelineItem = timelineItemVNode.map((vnode, index) => {
|
|
539
|
+
const getPosition = /* @__PURE__ */ __name((index2) => {
|
|
540
|
+
if (index2 === length)
|
|
541
|
+
return "last";
|
|
542
|
+
if (index2 === 0)
|
|
543
|
+
return "first";
|
|
544
|
+
return "middle";
|
|
545
|
+
}, "getPosition");
|
|
546
|
+
const node = (0, import_vue20.cloneVNode)(vnode, {
|
|
547
|
+
position: getPosition(index)
|
|
548
|
+
});
|
|
549
|
+
return node;
|
|
550
|
+
});
|
|
551
|
+
return (0, import_vue19.createVNode)("ul", {
|
|
552
|
+
"data-pixel-component": "MpTimeline",
|
|
553
|
+
"class": (0, import_css10.css)({
|
|
554
|
+
maxWidth: "sm"
|
|
555
|
+
})
|
|
556
|
+
}, [cloneTimelineItem]);
|
|
557
|
+
};
|
|
558
|
+
}
|
|
559
|
+
});
|
|
560
|
+
|
|
561
|
+
// src/title.tsx
|
|
562
|
+
var import_vue21 = require("vue");
|
|
563
|
+
var import_vue22 = require("vue");
|
|
564
|
+
var MpTimelineTitle = (0, import_vue22.defineComponent)({
|
|
565
|
+
name: "MpTimelineTitle",
|
|
566
|
+
setup(_props, {
|
|
567
|
+
slots
|
|
568
|
+
}) {
|
|
569
|
+
return () => {
|
|
570
|
+
return (0, import_vue21.createVNode)("div", {
|
|
571
|
+
"data-pixel-component": "MpTimelineTitle"
|
|
572
|
+
}, [slots.default && slots.default()]);
|
|
573
|
+
};
|
|
574
|
+
}
|
|
575
|
+
});
|
|
576
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
577
|
+
0 && (module.exports = {
|
|
578
|
+
MpTimelinLogItem,
|
|
579
|
+
MpTimeline,
|
|
580
|
+
MpTimelineAccordion,
|
|
581
|
+
MpTimelineCaption,
|
|
582
|
+
MpTimelineContent,
|
|
583
|
+
MpTimelineDocument,
|
|
584
|
+
MpTimelineItem,
|
|
585
|
+
MpTimelineLog,
|
|
586
|
+
MpTimelineTitle
|
|
587
|
+
});
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MpTimelineLog
|
|
3
|
+
} from "./chunk-34WPFRDZ.mjs";
|
|
4
|
+
import {
|
|
5
|
+
MpTimeline
|
|
6
|
+
} from "./chunk-7DG62NMG.mjs";
|
|
7
|
+
import {
|
|
8
|
+
MpTimelineTitle
|
|
9
|
+
} from "./chunk-WXCDLWFJ.mjs";
|
|
10
|
+
import {
|
|
11
|
+
MpTimelineAccordion
|
|
12
|
+
} from "./chunk-U2PMOVHB.mjs";
|
|
13
|
+
import {
|
|
14
|
+
MpTimelineCaption
|
|
15
|
+
} from "./chunk-ZG4NN7A5.mjs";
|
|
16
|
+
import {
|
|
17
|
+
MpTimelineContent
|
|
18
|
+
} from "./chunk-HSNDCO4E.mjs";
|
|
19
|
+
import {
|
|
20
|
+
MpTimelineDocument
|
|
21
|
+
} from "./chunk-IM7DTIFU.mjs";
|
|
22
|
+
import {
|
|
23
|
+
MpTimelineItem
|
|
24
|
+
} from "./chunk-TT37T2C6.mjs";
|
|
25
|
+
import "./chunk-BR4DIYFA.mjs";
|
|
26
|
+
import "./chunk-F5W3GZXM.mjs";
|
|
27
|
+
import "./chunk-6JLFY5TN.mjs";
|
|
28
|
+
import {
|
|
29
|
+
MpTimelinLogItem
|
|
30
|
+
} from "./chunk-GIZF7OP5.mjs";
|
|
31
|
+
import "./chunk-QZ7VFGWC.mjs";
|
|
32
|
+
export {
|
|
33
|
+
MpTimelinLogItem,
|
|
34
|
+
MpTimeline,
|
|
35
|
+
MpTimelineAccordion,
|
|
36
|
+
MpTimelineCaption,
|
|
37
|
+
MpTimelineContent,
|
|
38
|
+
MpTimelineDocument,
|
|
39
|
+
MpTimelineItem,
|
|
40
|
+
MpTimelineLog,
|
|
41
|
+
MpTimelineTitle
|
|
42
|
+
};
|
package/dist/item.d.mts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as vue_jsx_runtime from 'vue/jsx-runtime';
|
|
2
|
+
import * as vue from 'vue';
|
|
3
|
+
|
|
4
|
+
declare const MpTimelineItem: vue.DefineComponent<{
|
|
5
|
+
position: {
|
|
6
|
+
type: vue.PropType<"first" | "last" | "middle">;
|
|
7
|
+
};
|
|
8
|
+
status: {
|
|
9
|
+
type: vue.PropType<"approved" | "canceled" | "need-approval" | "rejected" | "created">;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
icon: {
|
|
13
|
+
type: vue.PropType<string>;
|
|
14
|
+
};
|
|
15
|
+
iconVariant: {
|
|
16
|
+
type: vue.PropType<"fill" | "outline" | "duotone">;
|
|
17
|
+
};
|
|
18
|
+
iconColor: {
|
|
19
|
+
type: vue.PropType<string>;
|
|
20
|
+
};
|
|
21
|
+
}, () => vue_jsx_runtime.JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
|
|
22
|
+
position: {
|
|
23
|
+
type: vue.PropType<"first" | "last" | "middle">;
|
|
24
|
+
};
|
|
25
|
+
status: {
|
|
26
|
+
type: vue.PropType<"approved" | "canceled" | "need-approval" | "rejected" | "created">;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
icon: {
|
|
30
|
+
type: vue.PropType<string>;
|
|
31
|
+
};
|
|
32
|
+
iconVariant: {
|
|
33
|
+
type: vue.PropType<"fill" | "outline" | "duotone">;
|
|
34
|
+
};
|
|
35
|
+
iconColor: {
|
|
36
|
+
type: vue.PropType<string>;
|
|
37
|
+
};
|
|
38
|
+
}>>, {
|
|
39
|
+
status: "approved" | "canceled" | "need-approval" | "rejected" | "created";
|
|
40
|
+
}>;
|
|
41
|
+
|
|
42
|
+
export { MpTimelineItem };
|