@open-dcp/vue-basic-components 0.0.1 → 0.0.7
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/LICENSE +190 -0
- package/README.md +39 -39
- package/dist/components/Button.vue.d.ts +30 -0
- package/dist/components/Button.vue.d.ts.map +1 -0
- package/dist/components/Card.vue.d.ts +20 -0
- package/dist/components/Card.vue.d.ts.map +1 -0
- package/dist/components/Chip.vue.d.ts +37 -0
- package/dist/components/Chip.vue.d.ts.map +1 -0
- package/dist/components/GxpStatus.vue.d.ts +27 -0
- package/dist/components/GxpStatus.vue.d.ts.map +1 -0
- package/dist/components/Loader.vue.d.ts +26 -0
- package/dist/components/Loader.vue.d.ts.map +1 -0
- package/dist/components/Modal.vue.d.ts +37 -0
- package/dist/components/Modal.vue.d.ts.map +1 -0
- package/dist/components/__tests__/button.test.d.ts +2 -0
- package/dist/components/__tests__/button.test.d.ts.map +1 -0
- package/dist/components/__tests__/cart.test.d.ts +2 -0
- package/dist/components/__tests__/cart.test.d.ts.map +1 -0
- package/dist/components/buttons/DcpDefaultButton.vue.d.ts +46 -0
- package/dist/components/buttons/DcpDefaultButton.vue.d.ts.map +1 -0
- package/dist/components/buttons/DcpFlatButton.vue.d.ts +46 -0
- package/dist/components/buttons/DcpFlatButton.vue.d.ts.map +1 -0
- package/dist/components/buttons/DcpIconButton.vue.d.ts +61 -0
- package/dist/components/buttons/DcpIconButton.vue.d.ts.map +1 -0
- package/dist/components/buttons/DcpTextButton.vue.d.ts +46 -0
- package/dist/components/buttons/DcpTextButton.vue.d.ts.map +1 -0
- package/dist/components/pages/BasicPage.vue.d.ts +67 -0
- package/dist/components/pages/BasicPage.vue.d.ts.map +1 -0
- package/dist/components/pages/DcpPageCreateMenu.vue.d.ts +28 -0
- package/dist/components/pages/DcpPageCreateMenu.vue.d.ts.map +1 -0
- package/dist/components/pages/DcpPageSwitcher.vue.d.ts +21 -0
- package/dist/components/pages/DcpPageSwitcher.vue.d.ts.map +1 -0
- package/dist/components/pages/EditorPage.vue.d.ts +20 -0
- package/dist/components/pages/EditorPage.vue.d.ts.map +1 -0
- package/dist/components/pages/PageTitle.vue.d.ts +16 -0
- package/dist/components/pages/PageTitle.vue.d.ts.map +1 -0
- package/dist/components/pages/components/sidebar/SideBar.vue.d.ts +84 -0
- package/dist/components/pages/components/sidebar/SideBar.vue.d.ts.map +1 -0
- package/dist/components/pages/components/sidebar/SideBarHeader.vue.d.ts +32 -0
- package/dist/components/pages/components/sidebar/SideBarHeader.vue.d.ts.map +1 -0
- package/dist/dcp-vue-basic-components.es.js +658 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/stories/Default.stories.d.ts +345 -0
- package/dist/stories/Default.stories.d.ts.map +1 -0
- package/dist/stories/Icon.stories.d.ts +295 -0
- package/dist/stories/Icon.stories.d.ts.map +1 -0
- package/dist/stories/Modal.stories.d.ts +10 -0
- package/dist/stories/Modal.stories.d.ts.map +1 -0
- package/package.json +57 -9
|
@@ -0,0 +1,658 @@
|
|
|
1
|
+
import { defineComponent as u, computed as B, withDirectives as E, openBlock as s, createElementBlock as i, normalizeClass as D, createElementVNode as v, withModifiers as M, normalizeStyle as S, renderSlot as l, createCommentVNode as b, vShow as G, ref as C, onMounted as P, watch as N, toDisplayString as k, resolveComponent as m, createBlock as _, withCtx as f, createTextVNode as z, createVNode as y, mergeProps as V, Fragment as x, renderList as F, watchEffect as O, onBeforeUnmount as A, resolveDynamicComponent as R, normalizeProps as j } from "vue";
|
|
2
|
+
const L = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "dcp-modal__header"
|
|
5
|
+
}, q = { class: "dcp-modal__content" }, H = {
|
|
6
|
+
key: 1,
|
|
7
|
+
class: "dcp-modal__footer"
|
|
8
|
+
}, U = /* @__PURE__ */ u({
|
|
9
|
+
__name: "Modal",
|
|
10
|
+
props: {
|
|
11
|
+
isActive: { type: Boolean, default: !1 },
|
|
12
|
+
showClose: { type: Boolean, default: !1 },
|
|
13
|
+
backgroundClose: { type: Boolean, default: !0 },
|
|
14
|
+
size: { default: "medium" }
|
|
15
|
+
},
|
|
16
|
+
emits: ["update:isActive"],
|
|
17
|
+
setup(e, { emit: t }) {
|
|
18
|
+
const o = e, n = t, a = B(() => ({
|
|
19
|
+
"dcp-modal--active": o.isActive,
|
|
20
|
+
[`dcp-modal--${o.size}`]: typeof o.size == "string"
|
|
21
|
+
})), c = B(() => typeof o.size == "number" ? {
|
|
22
|
+
width: `${o.size}px`,
|
|
23
|
+
maxWidth: `${o.size}px`
|
|
24
|
+
} : {}), r = () => {
|
|
25
|
+
n("update:isActive", !1);
|
|
26
|
+
}, h = () => {
|
|
27
|
+
o.backgroundClose && r();
|
|
28
|
+
};
|
|
29
|
+
return (p, $) => E((s(), i("div", {
|
|
30
|
+
class: D(["dcp-modal", a.value]),
|
|
31
|
+
onClick: h
|
|
32
|
+
}, [
|
|
33
|
+
v("div", {
|
|
34
|
+
class: "dcp-modal__dialog",
|
|
35
|
+
style: S(c.value),
|
|
36
|
+
onClick: $[0] || ($[0] = M(() => {
|
|
37
|
+
}, ["stop"]))
|
|
38
|
+
}, [
|
|
39
|
+
p.$slots.header ? (s(), i("div", L, [
|
|
40
|
+
l(p.$slots, "header")
|
|
41
|
+
])) : b("", !0),
|
|
42
|
+
v("div", q, [
|
|
43
|
+
l(p.$slots, "default", {}, () => [
|
|
44
|
+
l(p.$slots, "content")
|
|
45
|
+
])
|
|
46
|
+
]),
|
|
47
|
+
p.$slots.footer ? (s(), i("div", H, [
|
|
48
|
+
l(p.$slots, "footer")
|
|
49
|
+
])) : b("", !0),
|
|
50
|
+
e.showClose ? (s(), i("button", {
|
|
51
|
+
key: 2,
|
|
52
|
+
class: "dcp-modal__close",
|
|
53
|
+
onClick: r
|
|
54
|
+
}, "×")) : b("", !0)
|
|
55
|
+
], 4)
|
|
56
|
+
], 2)), [
|
|
57
|
+
[G, e.isActive]
|
|
58
|
+
]);
|
|
59
|
+
}
|
|
60
|
+
}), W = u({
|
|
61
|
+
name: "DcpChip",
|
|
62
|
+
props: {
|
|
63
|
+
isEditable: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: !1
|
|
66
|
+
},
|
|
67
|
+
isRemovable: {
|
|
68
|
+
type: Boolean,
|
|
69
|
+
default: !1
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
emits: ["update:content", "remove", "click"],
|
|
73
|
+
setup(e, { emit: t, slots: o }) {
|
|
74
|
+
const n = C(null), a = C("");
|
|
75
|
+
return P(() => {
|
|
76
|
+
const d = o.default ? o.default() : [];
|
|
77
|
+
d.length > 0 && d[0].type === "text" && (a.value = String(d[0].children));
|
|
78
|
+
}), N(
|
|
79
|
+
() => o.default ? o.default() : [],
|
|
80
|
+
// Safely access the default slot
|
|
81
|
+
(d) => {
|
|
82
|
+
d && d.length > 0 && d[0].type === "text" && (a.value = String(d[0].children));
|
|
83
|
+
}
|
|
84
|
+
), {
|
|
85
|
+
chipInput: n,
|
|
86
|
+
chipContent: a,
|
|
87
|
+
focusInput: () => {
|
|
88
|
+
e.isEditable && n.value && n.value.focus();
|
|
89
|
+
},
|
|
90
|
+
onInput: (d) => {
|
|
91
|
+
const w = d.target;
|
|
92
|
+
t("update:content", w.value);
|
|
93
|
+
},
|
|
94
|
+
onBlur: () => {
|
|
95
|
+
},
|
|
96
|
+
removeChip: (d) => {
|
|
97
|
+
d.stopPropagation(), t("remove");
|
|
98
|
+
},
|
|
99
|
+
handleClick: (d) => {
|
|
100
|
+
t("click", d);
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
}), g = (e, t) => {
|
|
105
|
+
const o = e.__vccOpts || e;
|
|
106
|
+
for (const [n, a] of t)
|
|
107
|
+
o[n] = a;
|
|
108
|
+
return o;
|
|
109
|
+
}, X = {
|
|
110
|
+
key: 0,
|
|
111
|
+
class: "chip-content"
|
|
112
|
+
}, J = ["value"];
|
|
113
|
+
function K(e, t, o, n, a, c) {
|
|
114
|
+
return s(), i("div", {
|
|
115
|
+
class: D(["dcp-chip", { editable: e.isEditable, removable: e.isRemovable }]),
|
|
116
|
+
onClick: t[3] || (t[3] = (...r) => e.handleClick && e.handleClick(...r))
|
|
117
|
+
}, [
|
|
118
|
+
e.isEditable ? (s(), i("input", {
|
|
119
|
+
key: 1,
|
|
120
|
+
class: "chip-edit",
|
|
121
|
+
type: "text",
|
|
122
|
+
value: e.chipContent,
|
|
123
|
+
onInput: t[0] || (t[0] = (...r) => e.onInput && e.onInput(...r)),
|
|
124
|
+
onBlur: t[1] || (t[1] = (...r) => e.onBlur && e.onBlur(...r)),
|
|
125
|
+
ref: "chipInput"
|
|
126
|
+
}, null, 40, J)) : (s(), i("div", X, [
|
|
127
|
+
l(e.$slots, "default")
|
|
128
|
+
])),
|
|
129
|
+
e.isRemovable ? (s(), i("button", {
|
|
130
|
+
key: 2,
|
|
131
|
+
class: "chip-close",
|
|
132
|
+
"aria-label": "Remove chip",
|
|
133
|
+
onClick: t[2] || (t[2] = (...r) => e.removeChip && e.removeChip(...r))
|
|
134
|
+
}, " × ")) : b("", !0)
|
|
135
|
+
], 2);
|
|
136
|
+
}
|
|
137
|
+
const Q = /* @__PURE__ */ g(W, [["render", K]]), Y = {}, Z = { class: "dcp-card" }, ee = {
|
|
138
|
+
key: 0,
|
|
139
|
+
class: "dcp-card-header"
|
|
140
|
+
}, te = { class: "dcp-card-body" }, oe = {
|
|
141
|
+
key: 1,
|
|
142
|
+
class: "dcp-card-footer"
|
|
143
|
+
};
|
|
144
|
+
function ne(e, t) {
|
|
145
|
+
return s(), i("div", Z, [
|
|
146
|
+
e.$slots.header ? (s(), i("div", ee, [
|
|
147
|
+
l(e.$slots, "header")
|
|
148
|
+
])) : b("", !0),
|
|
149
|
+
v("div", te, [
|
|
150
|
+
l(e.$slots, "default")
|
|
151
|
+
]),
|
|
152
|
+
e.$slots.footer ? (s(), i("div", oe, [
|
|
153
|
+
l(e.$slots, "footer")
|
|
154
|
+
])) : b("", !0)
|
|
155
|
+
]);
|
|
156
|
+
}
|
|
157
|
+
const se = /* @__PURE__ */ g(Y, [["render", ne]]), ae = u({
|
|
158
|
+
name: "DcpGxpStatus",
|
|
159
|
+
props: {
|
|
160
|
+
isGxp: {
|
|
161
|
+
type: Boolean,
|
|
162
|
+
default: !1
|
|
163
|
+
},
|
|
164
|
+
size: {
|
|
165
|
+
type: String,
|
|
166
|
+
default: null
|
|
167
|
+
// Default is null to indicate no specific size
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
setup(e) {
|
|
171
|
+
return { sizeClass: B(
|
|
172
|
+
() => e.size ? `dcp-gxp-status--${e.size}` : null
|
|
173
|
+
) };
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
function le(e, t, o, n, a, c) {
|
|
177
|
+
return s(), i("span", {
|
|
178
|
+
class: D([
|
|
179
|
+
"dcp-gxp-status",
|
|
180
|
+
e.isGxp ? "gxp" : "non-gxp",
|
|
181
|
+
e.sizeClass
|
|
182
|
+
])
|
|
183
|
+
}, k(e.isGxp ? "" : "Non") + "GXP ", 3);
|
|
184
|
+
}
|
|
185
|
+
const ie = /* @__PURE__ */ g(ae, [["render", le]]), de = /* @__PURE__ */ u({
|
|
186
|
+
__name: "Loader",
|
|
187
|
+
props: {
|
|
188
|
+
indeterminate: {},
|
|
189
|
+
size: {},
|
|
190
|
+
width: {},
|
|
191
|
+
value: {},
|
|
192
|
+
visibleValue: {}
|
|
193
|
+
},
|
|
194
|
+
setup(e) {
|
|
195
|
+
return (t, o) => {
|
|
196
|
+
const n = m("v-progress-circular");
|
|
197
|
+
return s(), _(n, {
|
|
198
|
+
indeterminate: e.indeterminate,
|
|
199
|
+
size: e.size,
|
|
200
|
+
class: "text-primary",
|
|
201
|
+
"model-value": e.value,
|
|
202
|
+
width: e.width
|
|
203
|
+
}, {
|
|
204
|
+
default: f(() => [
|
|
205
|
+
z(k(e.visibleValue), 1)
|
|
206
|
+
]),
|
|
207
|
+
_: 1
|
|
208
|
+
}, 8, ["indeterminate", "size", "model-value", "width"]);
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
}), ce = {}, re = { class: "dc-content_title" };
|
|
212
|
+
function ue(e, t) {
|
|
213
|
+
return s(), i("h1", re, [
|
|
214
|
+
l(e.$slots, "default")
|
|
215
|
+
]);
|
|
216
|
+
}
|
|
217
|
+
const pe = /* @__PURE__ */ g(ce, [["render", ue]]), fe = { class: "dc-content flex flex-col" }, me = { class: "dc-content_header" }, ve = /* @__PURE__ */ u({
|
|
218
|
+
__name: "BasicPage",
|
|
219
|
+
props: {
|
|
220
|
+
p: {
|
|
221
|
+
type: Number,
|
|
222
|
+
default: 4
|
|
223
|
+
},
|
|
224
|
+
rounded: {
|
|
225
|
+
type: Number,
|
|
226
|
+
default: 5
|
|
227
|
+
},
|
|
228
|
+
hasFooter: {
|
|
229
|
+
type: Boolean,
|
|
230
|
+
default: !1
|
|
231
|
+
},
|
|
232
|
+
background: {
|
|
233
|
+
type: String,
|
|
234
|
+
required: !1
|
|
235
|
+
},
|
|
236
|
+
noGrow: {
|
|
237
|
+
type: Boolean,
|
|
238
|
+
default: !1
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
setup(e) {
|
|
242
|
+
const t = e, o = B(() => [
|
|
243
|
+
"paper-content",
|
|
244
|
+
`p-${t.p}`,
|
|
245
|
+
`rounded-${t.rounded}`,
|
|
246
|
+
t.noGrow ? "" : "flex-grow",
|
|
247
|
+
t.hasFooter ? "mb-6" : ""
|
|
248
|
+
].filter(Boolean));
|
|
249
|
+
return (n, a) => (s(), i("div", fe, [
|
|
250
|
+
v("header", me, [
|
|
251
|
+
l(n.$slots, "pageHeader")
|
|
252
|
+
]),
|
|
253
|
+
l(n.$slots, "nonPaperContent"),
|
|
254
|
+
v("div", {
|
|
255
|
+
class: D(o.value),
|
|
256
|
+
style: S({ background: e.background })
|
|
257
|
+
}, [
|
|
258
|
+
l(n.$slots, "default")
|
|
259
|
+
], 6)
|
|
260
|
+
]));
|
|
261
|
+
}
|
|
262
|
+
}), _e = {}, be = { class: "dc-content page-editor page-editor--with-bottom-bar" }, he = { class: "dc-content_header" }, $e = { class: "page-editor_content" }, ye = { class: "ml-auto" };
|
|
263
|
+
function ge(e, t) {
|
|
264
|
+
const o = m("v-toolbar");
|
|
265
|
+
return s(), i("div", be, [
|
|
266
|
+
v("header", he, [
|
|
267
|
+
l(e.$slots, "pageHeader")
|
|
268
|
+
]),
|
|
269
|
+
v("div", $e, [
|
|
270
|
+
l(e.$slots, "default")
|
|
271
|
+
]),
|
|
272
|
+
y(o, { class: "dc-content_footer page-editor_bottom-bar shadow-xs" }, {
|
|
273
|
+
default: f(() => [
|
|
274
|
+
v("div", ye, [
|
|
275
|
+
l(e.$slots, "pageFooter")
|
|
276
|
+
])
|
|
277
|
+
]),
|
|
278
|
+
_: 3
|
|
279
|
+
})
|
|
280
|
+
]);
|
|
281
|
+
}
|
|
282
|
+
const Be = /* @__PURE__ */ g(_e, [["render", ge]]), Ce = { class: "page-create-menu" }, De = {
|
|
283
|
+
key: 0,
|
|
284
|
+
class: "page-create-menu_buttons"
|
|
285
|
+
}, ke = /* @__PURE__ */ u({
|
|
286
|
+
__name: "DcpPageCreateMenu",
|
|
287
|
+
props: {
|
|
288
|
+
buttonTooltip: {
|
|
289
|
+
type: String,
|
|
290
|
+
default: ""
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
setup(e) {
|
|
294
|
+
const t = C(!1);
|
|
295
|
+
function o() {
|
|
296
|
+
t.value = !t.value;
|
|
297
|
+
}
|
|
298
|
+
return (n, a) => {
|
|
299
|
+
const c = m("v-btn"), r = m("v-tooltip");
|
|
300
|
+
return s(), i("div", Ce, [
|
|
301
|
+
t.value ? (s(), i("div", De, [
|
|
302
|
+
l(n.$slots, "default")
|
|
303
|
+
])) : b("", !0),
|
|
304
|
+
y(r, {
|
|
305
|
+
disabled: e.buttonTooltip === "",
|
|
306
|
+
text: e.buttonTooltip,
|
|
307
|
+
location: "top"
|
|
308
|
+
}, {
|
|
309
|
+
activator: f(({ props: h }) => [
|
|
310
|
+
y(c, V(h, {
|
|
311
|
+
variant: "flat",
|
|
312
|
+
class: "page-create-menu_button-show-extra",
|
|
313
|
+
color: t.value ? "primary" : "",
|
|
314
|
+
onClick: a[0] || (a[0] = (p) => o())
|
|
315
|
+
}), {
|
|
316
|
+
default: f(() => [...a[1] || (a[1] = [
|
|
317
|
+
z(" + ", -1)
|
|
318
|
+
])]),
|
|
319
|
+
_: 1
|
|
320
|
+
}, 16, ["color"])
|
|
321
|
+
]),
|
|
322
|
+
_: 1
|
|
323
|
+
}, 8, ["disabled", "text"])
|
|
324
|
+
]);
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
}), I = /* @__PURE__ */ u({
|
|
328
|
+
__name: "DcpDefaultButton",
|
|
329
|
+
props: {
|
|
330
|
+
size: {
|
|
331
|
+
type: String,
|
|
332
|
+
default: "default"
|
|
333
|
+
},
|
|
334
|
+
color: {
|
|
335
|
+
type: String,
|
|
336
|
+
default: ""
|
|
337
|
+
},
|
|
338
|
+
disabled: {
|
|
339
|
+
type: Boolean,
|
|
340
|
+
default: !1
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
setup(e) {
|
|
344
|
+
return (t, o) => {
|
|
345
|
+
const n = m("v-btn");
|
|
346
|
+
return s(), _(n, {
|
|
347
|
+
variant: "elevated",
|
|
348
|
+
type: "button",
|
|
349
|
+
disabled: e.disabled,
|
|
350
|
+
size: e.size,
|
|
351
|
+
color: e.color
|
|
352
|
+
}, {
|
|
353
|
+
default: f(() => [
|
|
354
|
+
l(t.$slots, "default")
|
|
355
|
+
]),
|
|
356
|
+
_: 3
|
|
357
|
+
}, 8, ["disabled", "size", "color"]);
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
}), ze = { class: "flex row dcp-page-switcher" }, we = /* @__PURE__ */ u({
|
|
361
|
+
__name: "DcpPageSwitcher",
|
|
362
|
+
props: {
|
|
363
|
+
buttons: {
|
|
364
|
+
type: Array,
|
|
365
|
+
required: !0
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
setup(e) {
|
|
369
|
+
return C(!1), (t, o) => (s(), i("div", ze, [
|
|
370
|
+
(s(!0), i(x, null, F(e.buttons, (n) => (s(), _(I, {
|
|
371
|
+
onClick: (a) => n.click(),
|
|
372
|
+
disabled: n.disabled && n.disabled() || !1,
|
|
373
|
+
color: n.active() ? "primary" : "default",
|
|
374
|
+
key: n.label
|
|
375
|
+
}, {
|
|
376
|
+
default: f(() => [
|
|
377
|
+
z(k(n.label), 1)
|
|
378
|
+
]),
|
|
379
|
+
_: 2
|
|
380
|
+
}, 1032, ["onClick", "disabled", "color"]))), 128))
|
|
381
|
+
]));
|
|
382
|
+
}
|
|
383
|
+
}), Se = { class: "sidebar-drawer_header p-3 d-flex align-content-center justify-content-between" }, Pe = /* @__PURE__ */ u({
|
|
384
|
+
__name: "SideBarHeader",
|
|
385
|
+
props: {
|
|
386
|
+
closeButton: {
|
|
387
|
+
type: Boolean,
|
|
388
|
+
default: !0
|
|
389
|
+
}
|
|
390
|
+
},
|
|
391
|
+
emits: ["close"],
|
|
392
|
+
setup(e) {
|
|
393
|
+
return (t, o) => {
|
|
394
|
+
const n = m("v-icon");
|
|
395
|
+
return s(), i("div", Se, [
|
|
396
|
+
l(t.$slots, "default"),
|
|
397
|
+
y(n, {
|
|
398
|
+
class: "pointer close-help-button",
|
|
399
|
+
icon: "mdi-close",
|
|
400
|
+
onClick: o[0] || (o[0] = (a) => t.$emit("close"))
|
|
401
|
+
})
|
|
402
|
+
]);
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
}), Ve = /* @__PURE__ */ u({
|
|
406
|
+
__name: "SideBar",
|
|
407
|
+
props: {
|
|
408
|
+
modelValue: Boolean,
|
|
409
|
+
// Allows v-model binding
|
|
410
|
+
title: String,
|
|
411
|
+
openOnMounted: {
|
|
412
|
+
type: Boolean,
|
|
413
|
+
default: !1
|
|
414
|
+
},
|
|
415
|
+
location: {
|
|
416
|
+
type: String,
|
|
417
|
+
default: "right"
|
|
418
|
+
},
|
|
419
|
+
width: {
|
|
420
|
+
type: Number,
|
|
421
|
+
default: 300
|
|
422
|
+
},
|
|
423
|
+
sidebarComponent: {
|
|
424
|
+
type: Object,
|
|
425
|
+
required: !1
|
|
426
|
+
},
|
|
427
|
+
sidebarProps: {
|
|
428
|
+
type: Object,
|
|
429
|
+
default: () => ({})
|
|
430
|
+
},
|
|
431
|
+
isResizing: {
|
|
432
|
+
type: Boolean,
|
|
433
|
+
default: !1
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
emits: ["update:modelValue", "close"],
|
|
437
|
+
setup(e, { emit: t }) {
|
|
438
|
+
const o = t, n = B(() => {
|
|
439
|
+
const p = {};
|
|
440
|
+
return a.isResizing && (p.transition = "none !important"), p;
|
|
441
|
+
}), a = e, c = C(!1);
|
|
442
|
+
O(() => {
|
|
443
|
+
c.value = a.modelValue;
|
|
444
|
+
}), A(() => {
|
|
445
|
+
c.value = !1, o("close");
|
|
446
|
+
}), P(() => {
|
|
447
|
+
a.openOnMounted && setTimeout(() => {
|
|
448
|
+
c.value = !0;
|
|
449
|
+
}, 100);
|
|
450
|
+
});
|
|
451
|
+
const r = () => {
|
|
452
|
+
c.value = !1, o("update:modelValue", !1), o("close");
|
|
453
|
+
}, h = () => {
|
|
454
|
+
c.value || o("close");
|
|
455
|
+
};
|
|
456
|
+
return (p, $) => {
|
|
457
|
+
const d = m("v-navigation-drawer"), w = m("v-layout");
|
|
458
|
+
return s(), _(w, null, {
|
|
459
|
+
default: f(() => [
|
|
460
|
+
y(d, {
|
|
461
|
+
modelValue: c.value,
|
|
462
|
+
"onUpdate:modelValue": $[0] || ($[0] = (T) => c.value = T),
|
|
463
|
+
location: e.location,
|
|
464
|
+
temporary: "",
|
|
465
|
+
width: e.width,
|
|
466
|
+
style: S(n.value),
|
|
467
|
+
onTransitionend: h
|
|
468
|
+
}, {
|
|
469
|
+
default: f(() => [
|
|
470
|
+
y(Pe, { onClose: r }, {
|
|
471
|
+
default: f(() => [
|
|
472
|
+
z(k(e.title), 1)
|
|
473
|
+
]),
|
|
474
|
+
_: 1
|
|
475
|
+
}),
|
|
476
|
+
e.sidebarComponent ? (s(), _(R(e.sidebarComponent), j(V({ key: 0 }, e.sidebarProps)), null, 16)) : l(p.$slots, "default", {}, void 0, void 0, 1)
|
|
477
|
+
]),
|
|
478
|
+
_: 3
|
|
479
|
+
}, 8, ["modelValue", "location", "width", "style"])
|
|
480
|
+
]),
|
|
481
|
+
_: 3
|
|
482
|
+
});
|
|
483
|
+
};
|
|
484
|
+
}
|
|
485
|
+
}), Ie = u({
|
|
486
|
+
name: "DcpButton",
|
|
487
|
+
props: {
|
|
488
|
+
variant: {
|
|
489
|
+
type: String,
|
|
490
|
+
default: "primary"
|
|
491
|
+
},
|
|
492
|
+
disabled: {
|
|
493
|
+
type: Boolean,
|
|
494
|
+
default: !1
|
|
495
|
+
}
|
|
496
|
+
},
|
|
497
|
+
computed: {
|
|
498
|
+
buttonClass() {
|
|
499
|
+
return ["dcp-button", this.variant, { disabled: this.disabled }];
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
}), Te = ["disabled"];
|
|
503
|
+
function Ee(e, t, o, n, a, c) {
|
|
504
|
+
return s(), i("button", {
|
|
505
|
+
class: D(e.buttonClass),
|
|
506
|
+
disabled: e.disabled
|
|
507
|
+
}, [
|
|
508
|
+
l(e.$slots, "default")
|
|
509
|
+
], 10, Te);
|
|
510
|
+
}
|
|
511
|
+
const Me = /* @__PURE__ */ g(Ie, [["render", Ee]]), Ge = /* @__PURE__ */ u({
|
|
512
|
+
__name: "DcpFlatButton",
|
|
513
|
+
props: {
|
|
514
|
+
size: {
|
|
515
|
+
type: String,
|
|
516
|
+
default: "default"
|
|
517
|
+
},
|
|
518
|
+
color: {
|
|
519
|
+
type: String,
|
|
520
|
+
default: ""
|
|
521
|
+
},
|
|
522
|
+
disabled: {
|
|
523
|
+
type: Boolean,
|
|
524
|
+
default: !1
|
|
525
|
+
}
|
|
526
|
+
},
|
|
527
|
+
setup(e) {
|
|
528
|
+
return (t, o) => {
|
|
529
|
+
const n = m("v-btn");
|
|
530
|
+
return s(), _(n, {
|
|
531
|
+
variant: "flat",
|
|
532
|
+
type: "button",
|
|
533
|
+
disabled: e.disabled,
|
|
534
|
+
size: e.size,
|
|
535
|
+
color: e.color
|
|
536
|
+
}, {
|
|
537
|
+
default: f(() => [
|
|
538
|
+
l(t.$slots, "default")
|
|
539
|
+
]),
|
|
540
|
+
_: 3
|
|
541
|
+
}, 8, ["disabled", "size", "color"]);
|
|
542
|
+
};
|
|
543
|
+
}
|
|
544
|
+
}), Ne = /* @__PURE__ */ u({
|
|
545
|
+
__name: "DcpIconButton",
|
|
546
|
+
props: {
|
|
547
|
+
icon: {
|
|
548
|
+
type: String,
|
|
549
|
+
default: ""
|
|
550
|
+
},
|
|
551
|
+
size: {
|
|
552
|
+
type: String,
|
|
553
|
+
default: ""
|
|
554
|
+
},
|
|
555
|
+
color: {
|
|
556
|
+
type: String,
|
|
557
|
+
default: ""
|
|
558
|
+
},
|
|
559
|
+
disabled: {
|
|
560
|
+
type: Boolean,
|
|
561
|
+
default: !1
|
|
562
|
+
},
|
|
563
|
+
rounded: {
|
|
564
|
+
type: String,
|
|
565
|
+
default: ""
|
|
566
|
+
},
|
|
567
|
+
variant: {
|
|
568
|
+
type: String,
|
|
569
|
+
default: ""
|
|
570
|
+
}
|
|
571
|
+
},
|
|
572
|
+
setup(e) {
|
|
573
|
+
return (t, o) => {
|
|
574
|
+
const n = m("v-btn");
|
|
575
|
+
return s(), _(n, {
|
|
576
|
+
icon: e.icon,
|
|
577
|
+
color: e.color,
|
|
578
|
+
rounded: e.rounded,
|
|
579
|
+
variant: e.variant,
|
|
580
|
+
size: e.size,
|
|
581
|
+
disabled: e.disabled
|
|
582
|
+
}, null, 8, ["icon", "color", "rounded", "variant", "size", "disabled"]);
|
|
583
|
+
};
|
|
584
|
+
}
|
|
585
|
+
}), xe = /* @__PURE__ */ u({
|
|
586
|
+
__name: "DcpTextButton",
|
|
587
|
+
props: {
|
|
588
|
+
size: {
|
|
589
|
+
type: String,
|
|
590
|
+
default: "default"
|
|
591
|
+
},
|
|
592
|
+
color: {
|
|
593
|
+
type: String,
|
|
594
|
+
default: ""
|
|
595
|
+
},
|
|
596
|
+
disabled: {
|
|
597
|
+
type: Boolean,
|
|
598
|
+
default: !1
|
|
599
|
+
}
|
|
600
|
+
},
|
|
601
|
+
setup(e) {
|
|
602
|
+
return (t, o) => {
|
|
603
|
+
const n = m("v-btn");
|
|
604
|
+
return s(), _(n, {
|
|
605
|
+
color: e.color,
|
|
606
|
+
size: e.size,
|
|
607
|
+
disabled: e.disabled,
|
|
608
|
+
variant: "text"
|
|
609
|
+
}, {
|
|
610
|
+
default: f(() => [
|
|
611
|
+
l(t.$slots, "default")
|
|
612
|
+
]),
|
|
613
|
+
_: 3
|
|
614
|
+
}, 8, ["color", "size", "disabled"]);
|
|
615
|
+
};
|
|
616
|
+
}
|
|
617
|
+
}), Fe = {
|
|
618
|
+
DcpButton: Me,
|
|
619
|
+
DcpModal: U,
|
|
620
|
+
DcpLoader: de,
|
|
621
|
+
DcpChip: Q,
|
|
622
|
+
DcpCard: se,
|
|
623
|
+
DcpGxpStatus: ie,
|
|
624
|
+
DcpBasicPage: ve,
|
|
625
|
+
DcpEditorPage: Be,
|
|
626
|
+
DcpPageTitle: pe,
|
|
627
|
+
DcpPageCreateMenu: ke,
|
|
628
|
+
DcpDefaultButton: I,
|
|
629
|
+
DcpFlatButton: Ge,
|
|
630
|
+
DcpIconButton: Ne,
|
|
631
|
+
DcpTextButton: xe,
|
|
632
|
+
DcpPageSwitcher: we,
|
|
633
|
+
DcpSideBar: Ve
|
|
634
|
+
}, Ae = {
|
|
635
|
+
install(e) {
|
|
636
|
+
for (const [t, o] of Object.entries(Fe))
|
|
637
|
+
e.component(t, o);
|
|
638
|
+
}
|
|
639
|
+
};
|
|
640
|
+
export {
|
|
641
|
+
ve as DcpBasicPage,
|
|
642
|
+
Me as DcpButton,
|
|
643
|
+
se as DcpCard,
|
|
644
|
+
Q as DcpChip,
|
|
645
|
+
I as DcpDefaultButton,
|
|
646
|
+
Be as DcpEditorPage,
|
|
647
|
+
Ge as DcpFlatButton,
|
|
648
|
+
ie as DcpGxpStatus,
|
|
649
|
+
Ne as DcpIconButton,
|
|
650
|
+
de as DcpLoader,
|
|
651
|
+
U as DcpModal,
|
|
652
|
+
ke as DcpPageCreateMenu,
|
|
653
|
+
we as DcpPageSwitcher,
|
|
654
|
+
pe as DcpPageTitle,
|
|
655
|
+
Ve as DcpSideBar,
|
|
656
|
+
xe as DcpTextButton,
|
|
657
|
+
Ae as default
|
|
658
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { default as DcpModal } from './components/Modal.vue';
|
|
2
|
+
import { default as DcpChip } from './components/Chip.vue';
|
|
3
|
+
import { default as DcpCard } from './components/Card.vue';
|
|
4
|
+
import { default as DcpGxpStatus } from './components/GxpStatus.vue';
|
|
5
|
+
import { default as DcpLoader } from './components/Loader.vue';
|
|
6
|
+
import { default as DcpPageTitle } from './components/pages/PageTitle.vue';
|
|
7
|
+
import { default as DcpBasicPage } from './components/pages/BasicPage.vue';
|
|
8
|
+
import { default as DcpEditorPage } from './components/pages/EditorPage.vue';
|
|
9
|
+
import { default as DcpPageCreateMenu } from './components/pages/DcpPageCreateMenu.vue';
|
|
10
|
+
import { default as DcpPageSwitcher } from './components/pages/DcpPageSwitcher.vue';
|
|
11
|
+
import { default as DcpSideBar } from './components/pages/components/sidebar/SideBar.vue';
|
|
12
|
+
import { default as DcpButton } from './components/Button.vue';
|
|
13
|
+
import { default as DcpDefaultButton } from './components/buttons/DcpDefaultButton.vue';
|
|
14
|
+
import { default as DcpFlatButton } from './components/buttons/DcpFlatButton.vue';
|
|
15
|
+
import { default as DcpIconButton } from './components/buttons/DcpIconButton.vue';
|
|
16
|
+
import { default as DcpTextButton } from './components/buttons/DcpTextButton.vue';
|
|
17
|
+
declare const _default: {
|
|
18
|
+
install(app: any): void;
|
|
19
|
+
};
|
|
20
|
+
export default _default;
|
|
21
|
+
export { DcpButton, DcpModal, DcpLoader, DcpChip, DcpCard, DcpGxpStatus, DcpBasicPage, DcpPageTitle, DcpPageCreateMenu, DcpDefaultButton, DcpFlatButton, DcpIconButton, DcpTextButton, DcpPageSwitcher, DcpEditorPage, DcpSideBar, };
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAGhD,OAAO,YAAY,MAAM,kCAAkC,CAAC;AAC5D,OAAO,YAAY,MAAM,kCAAkC,CAAC;AAC5D,OAAO,aAAa,MAAM,mCAAmC,CAAC;AAC9D,OAAO,iBAAiB,MAAM,0CAA0C,CAAC;AACzE,OAAO,eAAe,MAAM,wCAAwC,CAAC;AAErE,OAAO,UAAU,MAAM,mDAAmD,CAAC;AAG3E,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,gBAAgB,MAAM,2CAA2C,CAAC;AACzE,OAAO,aAAa,MAAM,wCAAwC,CAAC;AACnE,OAAO,aAAa,MAAM,wCAAwC,CAAC;AACnE,OAAO,aAAa,MAAM,wCAAwC,CAAC;;iBA0BpD,GAAG;;AADlB,wBAME;AAGF,OAAO,EACL,SAAS,EACT,QAAQ,EACR,SAAS,EAET,OAAO,EACP,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,YAAY,EAEZ,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,aAAa,EACb,eAAe,EACf,aAAa,EAEb,UAAU,GACX,CAAC"}
|