ablok-components 0.0.37 → 0.0.40
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/ablok-components.es.js +262 -216
- package/dist/ablok-components.umd.js +1 -1
- package/dist/components/{base-button.vue.d.ts → form/base-button/base-button.vue.d.ts} +0 -0
- package/dist/components/{base-form.vue.d.ts → form/base-form/base-form.vue.d.ts} +0 -0
- package/dist/components/{check-group.vue.d.ts → form/check-group/check-group.vue.d.ts} +0 -0
- package/dist/components/{file-input.vue.d.ts → form/file-input/file-input.vue.d.ts} +0 -0
- package/dist/components/{form-input.vue.d.ts → form/form-input/form-input.vue.d.ts} +0 -0
- package/dist/components/{input-dropdown.vue.d.ts → form/input-dropdown/input-dropdown.vue.d.ts} +0 -0
- package/dist/components/{input-textarea.vue.d.ts → form/input-textarea/input-textarea.vue.d.ts} +0 -0
- package/dist/components/{media-upload.vue.d.ts → form/media-upload/media-upload.vue.d.ts} +0 -0
- package/dist/components/{radio-group.vue.d.ts → form/radio-group/radio-group.vue.d.ts} +0 -0
- package/dist/components/{loading-spinner.vue.d.ts → icon/loading-spinner/loading-spinner.vue.d.ts} +0 -0
- package/dist/components/{svg-icon.vue.d.ts → icon/svg-icon/svg-icon.vue.d.ts} +0 -0
- package/dist/components/text/base-headline/base-headline.vue.d.ts +81 -0
- package/dist/components/{base-button.story.vue.d.ts → text/base-paragraph/base-paragraph.vue.d.ts} +37 -8
- package/dist/index.d.ts +12 -10
- package/dist/style.css +1 -1
- package/dist/symbol-defs.svg +769 -224
- package/dist/{components → utilities}/helpers.d.ts +0 -0
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as g, openBlock as
|
|
1
|
+
import { defineComponent as g, openBlock as r, createElementBlock as c, normalizeClass as b, createElementVNode as u, renderSlot as m, computed as h, createBlock as C, resolveDynamicComponent as D, unref as p, withCtx as A, createTextVNode as V, toDisplayString as v, resolveComponent as S, createCommentVNode as w, withDirectives as q, isRef as O, vModelDynamic as H, vModelText as U, ref as x, watch as $, onBeforeMount as L, Fragment as M, renderList as N, withModifiers as T, reactive as P, createVNode as z } from "vue";
|
|
2
2
|
const R = {
|
|
3
3
|
class: "icon",
|
|
4
4
|
preserveAspectRatio: "xMaxYMin"
|
|
5
|
-
}, F = ["xlink:href"],
|
|
5
|
+
}, F = ["xlink:href"], Ce = /* @__PURE__ */ g({
|
|
6
6
|
__name: "svg-icon",
|
|
7
7
|
props: {
|
|
8
8
|
basePath: {
|
|
@@ -23,13 +23,13 @@ const R = {
|
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
setup(e) {
|
|
26
|
-
return (
|
|
26
|
+
return (o, t) => (r(), c("i", {
|
|
27
27
|
class: b(["svg-icon", {
|
|
28
28
|
[`svg-icon--${e.size}`]: e.size
|
|
29
29
|
}])
|
|
30
30
|
}, [
|
|
31
|
-
(
|
|
32
|
-
|
|
31
|
+
(r(), c("svg", R, [
|
|
32
|
+
u("use", {
|
|
33
33
|
"xlink:href": `${e.basePath}#${e.prefix}${e.symbol}`,
|
|
34
34
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
35
35
|
x: "0",
|
|
@@ -39,7 +39,7 @@ const R = {
|
|
|
39
39
|
], 2));
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
|
-
const
|
|
42
|
+
const E = { class: "loading-spinner d-block" }, j = { class: "loading-spinner__animation" }, G = {
|
|
43
43
|
class: "d-block",
|
|
44
44
|
version: "1.1",
|
|
45
45
|
id: "L9",
|
|
@@ -50,7 +50,7 @@ const H = { class: "loading-spinner d-block" }, P = { class: "loading-spinner__a
|
|
|
50
50
|
viewBox: "0 0 100 100",
|
|
51
51
|
"enable-background": "new 0 0 0 0",
|
|
52
52
|
"xml:space": "preserve"
|
|
53
|
-
},
|
|
53
|
+
}, J = ["fill"], X = /* @__PURE__ */ u("animateTransform", {
|
|
54
54
|
attributeName: "transform",
|
|
55
55
|
attributeType: "XML",
|
|
56
56
|
type: "rotate",
|
|
@@ -58,9 +58,9 @@ const H = { class: "loading-spinner d-block" }, P = { class: "loading-spinner__a
|
|
|
58
58
|
from: "0 50 50",
|
|
59
59
|
to: "360 50 50",
|
|
60
60
|
repeatCount: "indefinite"
|
|
61
|
-
}, null, -1),
|
|
62
|
-
|
|
63
|
-
],
|
|
61
|
+
}, null, -1), Y = [
|
|
62
|
+
X
|
|
63
|
+
], Me = /* @__PURE__ */ g({
|
|
64
64
|
__name: "loading-spinner",
|
|
65
65
|
props: {
|
|
66
66
|
color: {
|
|
@@ -69,20 +69,59 @@ const H = { class: "loading-spinner d-block" }, P = { class: "loading-spinner__a
|
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
71
|
setup(e) {
|
|
72
|
-
return (
|
|
73
|
-
|
|
74
|
-
(
|
|
75
|
-
|
|
72
|
+
return (o, t) => (r(), c("span", E, [
|
|
73
|
+
u("span", j, [
|
|
74
|
+
(r(), c("svg", G, [
|
|
75
|
+
u("path", {
|
|
76
76
|
fill: e.color,
|
|
77
77
|
d: "M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50"
|
|
78
|
-
},
|
|
78
|
+
}, Y, 8, J)
|
|
79
79
|
]))
|
|
80
80
|
]),
|
|
81
|
-
m(
|
|
81
|
+
m(o.$slots, "default")
|
|
82
82
|
]));
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
|
-
const
|
|
85
|
+
const Ne = /* @__PURE__ */ g({
|
|
86
|
+
__name: "base-headline",
|
|
87
|
+
props: {
|
|
88
|
+
tag: null,
|
|
89
|
+
size: null,
|
|
90
|
+
variant: null,
|
|
91
|
+
text: null,
|
|
92
|
+
className: null
|
|
93
|
+
},
|
|
94
|
+
setup(e) {
|
|
95
|
+
const o = e, t = h(() => o.tag || "p");
|
|
96
|
+
return (d, a) => (r(), C(D(p(t)), {
|
|
97
|
+
class: b(["headline", `headline--${e.size}${e.className || ""}`])
|
|
98
|
+
}, {
|
|
99
|
+
default: A(() => [
|
|
100
|
+
m(d.$slots, "default", {}, () => [
|
|
101
|
+
V(v(e.text), 1)
|
|
102
|
+
])
|
|
103
|
+
]),
|
|
104
|
+
_: 3
|
|
105
|
+
}, 8, ["class"]));
|
|
106
|
+
}
|
|
107
|
+
}), Ue = /* @__PURE__ */ g({
|
|
108
|
+
__name: "base-paragraph",
|
|
109
|
+
props: {
|
|
110
|
+
size: null,
|
|
111
|
+
variant: null,
|
|
112
|
+
text: null,
|
|
113
|
+
className: null
|
|
114
|
+
},
|
|
115
|
+
setup(e) {
|
|
116
|
+
return (o, t) => (r(), c("p", {
|
|
117
|
+
class: b(["base-paragraph", `base-paragraph--${e.size}${e.className || ""}`])
|
|
118
|
+
}, [
|
|
119
|
+
m(o.$slots, "default", {}, () => [
|
|
120
|
+
V(v(e.text), 1)
|
|
121
|
+
])
|
|
122
|
+
], 2));
|
|
123
|
+
}
|
|
124
|
+
}), K = ["type", "disabled", "href", "to"], ze = /* @__PURE__ */ g({
|
|
86
125
|
__name: "base-button",
|
|
87
126
|
props: {
|
|
88
127
|
type: null,
|
|
@@ -99,10 +138,10 @@ const X = ["type", "disabled", "href", "to"], Me = /* @__PURE__ */ g({
|
|
|
99
138
|
fab: { type: Boolean }
|
|
100
139
|
},
|
|
101
140
|
setup(e) {
|
|
102
|
-
const
|
|
103
|
-
return (
|
|
104
|
-
const
|
|
105
|
-
return
|
|
141
|
+
const o = e, t = h(() => o.caption && !o.fab);
|
|
142
|
+
return (d, a) => {
|
|
143
|
+
const i = S("svg-icon");
|
|
144
|
+
return r(), c("button", {
|
|
106
145
|
type: e.type,
|
|
107
146
|
disabled: e.disabled,
|
|
108
147
|
href: e.href,
|
|
@@ -119,28 +158,28 @@ const X = ["type", "disabled", "href", "to"], Me = /* @__PURE__ */ g({
|
|
|
119
158
|
"x-small": e.size === "x-small"
|
|
120
159
|
}])
|
|
121
160
|
}, [
|
|
122
|
-
m(
|
|
123
|
-
e.icon ? (
|
|
161
|
+
m(d.$slots, "default", {}, () => [
|
|
162
|
+
e.icon ? (r(), C(i, {
|
|
124
163
|
key: 0,
|
|
125
164
|
id: e.icon,
|
|
126
165
|
class: "base-button__caption"
|
|
127
|
-
}, null, 8, ["id"])) :
|
|
128
|
-
p(
|
|
166
|
+
}, null, 8, ["id"])) : w("", !0),
|
|
167
|
+
p(t) ? (r(), c("span", {
|
|
129
168
|
key: 1,
|
|
130
169
|
class: b(["base-button__caption", { "icon-padding": e.icon }])
|
|
131
|
-
}, v(e.caption), 3)) :
|
|
170
|
+
}, v(e.caption), 3)) : w("", !0)
|
|
132
171
|
])
|
|
133
|
-
], 10,
|
|
172
|
+
], 10, K);
|
|
134
173
|
};
|
|
135
174
|
}
|
|
136
175
|
});
|
|
137
176
|
function y() {
|
|
138
177
|
return (new Date().valueOf() + Math.random()).toString(36);
|
|
139
178
|
}
|
|
140
|
-
const
|
|
179
|
+
const Q = { class: "input-group form-input__input-group" }, W = ["type", "id", "name", "placeholder", "pattern", "disabled", "read-only", "required", "maxlength", "checked", "aria-label"], Z = {
|
|
141
180
|
key: 0,
|
|
142
181
|
class: "form-input__color-swatch"
|
|
143
|
-
},
|
|
182
|
+
}, _ = ["name", "id", "disabled", "read-only", "required", "aria-label"], ee = ["for", "innerHTML"], Le = /* @__PURE__ */ g({
|
|
144
183
|
__name: "form-input",
|
|
145
184
|
props: {
|
|
146
185
|
modelValue: {
|
|
@@ -196,22 +235,22 @@ const Y = { class: "input-group form-input__input-group" }, K = ["type", "id", "
|
|
|
196
235
|
}
|
|
197
236
|
},
|
|
198
237
|
emits: ["update:modelValue"],
|
|
199
|
-
setup(e, { emit:
|
|
200
|
-
const
|
|
238
|
+
setup(e, { emit: o }) {
|
|
239
|
+
const t = e, d = h({
|
|
201
240
|
get() {
|
|
202
|
-
return
|
|
241
|
+
return t.modelValue;
|
|
203
242
|
},
|
|
204
|
-
set(
|
|
205
|
-
|
|
243
|
+
set(a) {
|
|
244
|
+
o("update:modelValue", a);
|
|
206
245
|
}
|
|
207
246
|
});
|
|
208
|
-
return (
|
|
247
|
+
return (a, i) => (r(), c("div", {
|
|
209
248
|
class: b(["form-input", `form-input--${e.type}`])
|
|
210
249
|
}, [
|
|
211
|
-
|
|
212
|
-
m(
|
|
213
|
-
|
|
214
|
-
"onUpdate:modelValue":
|
|
250
|
+
u("div", Q, [
|
|
251
|
+
m(a.$slots, "input-prepend"),
|
|
252
|
+
q(u("input", {
|
|
253
|
+
"onUpdate:modelValue": i[0] || (i[0] = (n) => O(d) ? d.value = n : null),
|
|
215
254
|
type: e.type === "color" ? "text" : e.type,
|
|
216
255
|
id: e.id,
|
|
217
256
|
name: e.name,
|
|
@@ -226,13 +265,13 @@ const Y = { class: "input-group form-input__input-group" }, K = ["type", "id", "
|
|
|
226
265
|
"form-check-input": e.type === "checkbox"
|
|
227
266
|
}]),
|
|
228
267
|
"aria-label": e.label
|
|
229
|
-
}, null, 10,
|
|
230
|
-
[
|
|
268
|
+
}, null, 10, W), [
|
|
269
|
+
[H, p(d)]
|
|
231
270
|
]),
|
|
232
|
-
m(
|
|
233
|
-
e.type === "color" ? (
|
|
234
|
-
|
|
235
|
-
"onUpdate:modelValue":
|
|
271
|
+
m(a.$slots, "input-append", {}, () => [
|
|
272
|
+
e.type === "color" ? (r(), c("span", Z, [
|
|
273
|
+
q(u("input", {
|
|
274
|
+
"onUpdate:modelValue": i[1] || (i[1] = (n) => O(d) ? d.value = n : null),
|
|
236
275
|
type: "color",
|
|
237
276
|
name: `${e.name}-color`,
|
|
238
277
|
id: `${e.id}-color`,
|
|
@@ -241,28 +280,28 @@ const Y = { class: "input-group form-input__input-group" }, K = ["type", "id", "
|
|
|
241
280
|
required: e.required,
|
|
242
281
|
class: "form-control",
|
|
243
282
|
"aria-label": e.label
|
|
244
|
-
}, null, 8,
|
|
245
|
-
[
|
|
283
|
+
}, null, 8, _), [
|
|
284
|
+
[U, p(d)]
|
|
246
285
|
])
|
|
247
|
-
])) :
|
|
286
|
+
])) : w("", !0)
|
|
248
287
|
])
|
|
249
288
|
]),
|
|
250
|
-
m(
|
|
251
|
-
|
|
289
|
+
m(a.$slots, "label", {}, () => [
|
|
290
|
+
u("label", {
|
|
252
291
|
for: e.id,
|
|
253
292
|
class: b(["form-input__label", {
|
|
254
293
|
"form-check-label": e.type === "checkbox"
|
|
255
294
|
}]),
|
|
256
295
|
innerHTML: `${e.label}${e.required ? " *" : ""}`
|
|
257
|
-
}, null, 10,
|
|
296
|
+
}, null, 10, ee)
|
|
258
297
|
])
|
|
259
298
|
], 2));
|
|
260
299
|
}
|
|
261
300
|
});
|
|
262
|
-
const
|
|
301
|
+
const te = { class: "form-input form-input--textarea" }, le = ["type", "id", "name", "placeholder", "pattern", "disabled", "read-only", "required", "maxlength", "aria-label"], ae = {
|
|
263
302
|
key: 0,
|
|
264
303
|
class: "form-input__color-swatch"
|
|
265
|
-
},
|
|
304
|
+
}, ne = ["name", "id", "disabled", "read-only", "required", "aria-label"], de = ["for", "innerHTML"], Te = /* @__PURE__ */ g({
|
|
266
305
|
__name: "input-textarea",
|
|
267
306
|
props: {
|
|
268
307
|
modelValue: {
|
|
@@ -318,19 +357,19 @@ const _ = { class: "form-input form-input--textarea" }, ee = ["type", "id", "nam
|
|
|
318
357
|
}
|
|
319
358
|
},
|
|
320
359
|
emits: ["update:modelValue"],
|
|
321
|
-
setup(e, { emit:
|
|
322
|
-
const
|
|
360
|
+
setup(e, { emit: o }) {
|
|
361
|
+
const t = e, d = h({
|
|
323
362
|
get() {
|
|
324
|
-
return
|
|
363
|
+
return t.modelValue;
|
|
325
364
|
},
|
|
326
|
-
set(
|
|
327
|
-
|
|
365
|
+
set(a) {
|
|
366
|
+
o("update:modelValue", a);
|
|
328
367
|
}
|
|
329
368
|
});
|
|
330
|
-
return (
|
|
331
|
-
m(
|
|
332
|
-
|
|
333
|
-
"onUpdate:modelValue":
|
|
369
|
+
return (a, i) => (r(), c("div", te, [
|
|
370
|
+
m(a.$slots, "input-prepend"),
|
|
371
|
+
q(u("textarea", {
|
|
372
|
+
"onUpdate:modelValue": i[0] || (i[0] = (n) => O(d) ? d.value = n : null),
|
|
334
373
|
type: e.type === "color" ? "text" : e.type,
|
|
335
374
|
id: e.id,
|
|
336
375
|
name: e.name,
|
|
@@ -342,13 +381,13 @@ const _ = { class: "form-input form-input--textarea" }, ee = ["type", "id", "nam
|
|
|
342
381
|
maxlength: e.maxlength,
|
|
343
382
|
class: b(["form-control", {}]),
|
|
344
383
|
"aria-label": e.label
|
|
345
|
-
}, null, 8,
|
|
346
|
-
[
|
|
384
|
+
}, null, 8, le), [
|
|
385
|
+
[U, p(d)]
|
|
347
386
|
]),
|
|
348
|
-
m(
|
|
349
|
-
e.type === "color" ? (
|
|
350
|
-
|
|
351
|
-
"onUpdate:modelValue":
|
|
387
|
+
m(a.$slots, "input-append", {}, () => [
|
|
388
|
+
e.type === "color" ? (r(), c("span", ae, [
|
|
389
|
+
q(u("input", {
|
|
390
|
+
"onUpdate:modelValue": i[1] || (i[1] = (n) => O(d) ? d.value = n : null),
|
|
352
391
|
type: "color",
|
|
353
392
|
name: `${e.name}-color`,
|
|
354
393
|
id: `${e.id}-color`,
|
|
@@ -357,23 +396,23 @@ const _ = { class: "form-input form-input--textarea" }, ee = ["type", "id", "nam
|
|
|
357
396
|
required: e.required,
|
|
358
397
|
class: "form-control",
|
|
359
398
|
"aria-label": e.label
|
|
360
|
-
}, null, 8,
|
|
361
|
-
[
|
|
399
|
+
}, null, 8, ne), [
|
|
400
|
+
[U, p(d)]
|
|
362
401
|
])
|
|
363
|
-
])) :
|
|
402
|
+
])) : w("", !0)
|
|
364
403
|
]),
|
|
365
|
-
m(
|
|
366
|
-
|
|
404
|
+
m(a.$slots, "label", {}, () => [
|
|
405
|
+
u("label", {
|
|
367
406
|
for: e.id,
|
|
368
407
|
class: b(["form-input__label", {
|
|
369
408
|
"form-check-label": e.type === "checkbox"
|
|
370
409
|
}]),
|
|
371
410
|
innerHTML: `${e.label}${e.required ? " *" : ""}`
|
|
372
|
-
}, null, 10,
|
|
411
|
+
}, null, 10, de)
|
|
373
412
|
])
|
|
374
413
|
]));
|
|
375
414
|
}
|
|
376
|
-
}),
|
|
415
|
+
}), ie = { class: "radio-group" }, oe = ["for"], Ie = /* @__PURE__ */ g({
|
|
377
416
|
__name: "check-group",
|
|
378
417
|
props: {
|
|
379
418
|
modelValue: {
|
|
@@ -413,43 +452,43 @@ const _ = { class: "form-input form-input--textarea" }, ee = ["type", "id", "nam
|
|
|
413
452
|
}
|
|
414
453
|
},
|
|
415
454
|
emits: ["change", "update:modelValue"],
|
|
416
|
-
setup(e, { emit:
|
|
417
|
-
const
|
|
418
|
-
return
|
|
419
|
-
|
|
420
|
-
(
|
|
455
|
+
setup(e, { emit: o }) {
|
|
456
|
+
const t = e, d = x([]);
|
|
457
|
+
return $(() => t.modelValue, (a, i) => {
|
|
458
|
+
d.value = t.options.map(
|
|
459
|
+
(n) => n.value ? t.modelValue.some((l) => l["value "] === n.value) : t.modelValue.some((l) => l === n)
|
|
421
460
|
);
|
|
422
|
-
}, { immediate: !0 }),
|
|
423
|
-
const
|
|
424
|
-
const
|
|
425
|
-
return [...
|
|
461
|
+
}, { immediate: !0 }), $(d, (a, i) => {
|
|
462
|
+
const n = a.reduce((l, s, f) => {
|
|
463
|
+
const k = s && t.options[f] ? [t.options[f] || t.options[f]] : [];
|
|
464
|
+
return [...l, ...k];
|
|
426
465
|
}, []);
|
|
427
|
-
|
|
428
|
-
}, { deep: !0 }),
|
|
429
|
-
}), (
|
|
430
|
-
const
|
|
431
|
-
return
|
|
432
|
-
(
|
|
433
|
-
key:
|
|
434
|
-
modelValue: p(
|
|
435
|
-
"onUpdate:modelValue": (f) => p(
|
|
466
|
+
o("update:modelValue", n);
|
|
467
|
+
}, { deep: !0 }), L(() => {
|
|
468
|
+
}), (a, i) => {
|
|
469
|
+
const n = S("form-input");
|
|
470
|
+
return r(), c("div", ie, [
|
|
471
|
+
(r(!0), c(M, null, N(e.options, (l, s) => (r(), C(n, {
|
|
472
|
+
key: s,
|
|
473
|
+
modelValue: p(d)[s],
|
|
474
|
+
"onUpdate:modelValue": (f) => p(d)[s] = f,
|
|
436
475
|
type: "checkbox",
|
|
437
476
|
name: e.name,
|
|
438
|
-
id: `${e.id}-${
|
|
439
|
-
label: `${
|
|
477
|
+
id: `${e.id}-${s}`,
|
|
478
|
+
label: `${l.text || l}${e.required ? " *" : ""}`,
|
|
440
479
|
disabled: e.disabled,
|
|
441
480
|
"read-only": e.readOnly,
|
|
442
481
|
required: e.required
|
|
443
482
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "name", "id", "label", "disabled", "read-only", "required"]))), 128)),
|
|
444
|
-
|
|
445
|
-
m(
|
|
446
|
-
|
|
483
|
+
u("label", { for: e.id }, [
|
|
484
|
+
m(a.$slots, "label", {}, () => [
|
|
485
|
+
V(v(e.label), 1)
|
|
447
486
|
])
|
|
448
|
-
], 8,
|
|
487
|
+
], 8, oe)
|
|
449
488
|
]);
|
|
450
489
|
};
|
|
451
490
|
}
|
|
452
|
-
}),
|
|
491
|
+
}), ue = { class: "radio-group" }, re = ["for"], De = /* @__PURE__ */ g({
|
|
453
492
|
__name: "radio-group",
|
|
454
493
|
props: {
|
|
455
494
|
modelValue: {
|
|
@@ -489,41 +528,41 @@ const _ = { class: "form-input form-input--textarea" }, ee = ["type", "id", "nam
|
|
|
489
528
|
}
|
|
490
529
|
},
|
|
491
530
|
emits: ["change", "update:modelValue"],
|
|
492
|
-
setup(e, { emit:
|
|
493
|
-
const
|
|
494
|
-
|
|
495
|
-
function
|
|
496
|
-
|
|
531
|
+
setup(e, { emit: o }) {
|
|
532
|
+
const t = e;
|
|
533
|
+
x(t.options.map((a) => a.value === t.modelValue));
|
|
534
|
+
function d(a) {
|
|
535
|
+
o("update:modelValue", a);
|
|
497
536
|
}
|
|
498
|
-
return
|
|
499
|
-
}), (
|
|
500
|
-
const
|
|
501
|
-
return
|
|
502
|
-
(
|
|
503
|
-
key:
|
|
537
|
+
return L(() => {
|
|
538
|
+
}), (a, i) => {
|
|
539
|
+
const n = S("form-input");
|
|
540
|
+
return r(), c("div", ue, [
|
|
541
|
+
(r(!0), c(M, null, N(e.options, (l, s) => (r(), C(n, {
|
|
542
|
+
key: s,
|
|
504
543
|
type: "radio",
|
|
505
544
|
name: e.name,
|
|
506
|
-
id: `${e.id}-${
|
|
507
|
-
value:
|
|
508
|
-
label: `${
|
|
509
|
-
checked:
|
|
545
|
+
id: `${e.id}-${s}`,
|
|
546
|
+
value: l.value || l,
|
|
547
|
+
label: `${l.text || l}${e.required ? " *" : ""}`,
|
|
548
|
+
checked: l.value ? l.value === e.modelValue : l === e.modelValue,
|
|
510
549
|
disabled: e.disabled,
|
|
511
550
|
"read-only": e.readOnly,
|
|
512
551
|
required: e.required,
|
|
513
|
-
onChange: (f) => l
|
|
552
|
+
onChange: (f) => d(l)
|
|
514
553
|
}, null, 8, ["name", "id", "value", "label", "checked", "disabled", "read-only", "required", "onChange"]))), 128)),
|
|
515
|
-
|
|
516
|
-
m(
|
|
517
|
-
|
|
554
|
+
u("label", { for: e.id }, [
|
|
555
|
+
m(a.$slots, "label", {}, () => [
|
|
556
|
+
V(v(e.label), 1)
|
|
518
557
|
])
|
|
519
|
-
], 8,
|
|
558
|
+
], 8, re)
|
|
520
559
|
]);
|
|
521
560
|
};
|
|
522
561
|
}
|
|
523
|
-
}),
|
|
562
|
+
}), se = { class: "input input-dropdown" }, ce = { class: "dropdown" }, fe = {
|
|
524
563
|
class: "btn-group",
|
|
525
564
|
role: "group"
|
|
526
|
-
},
|
|
565
|
+
}, me = ["id", "disabled"], ye = ["aria-labelledby"], pe = ["onClick"], be = ["for"], Ae = /* @__PURE__ */ g({
|
|
527
566
|
__name: "input-dropdown",
|
|
528
567
|
props: {
|
|
529
568
|
modelValue: {
|
|
@@ -580,31 +619,31 @@ const _ = { class: "form-input form-input--textarea" }, ee = ["type", "id", "nam
|
|
|
580
619
|
}
|
|
581
620
|
},
|
|
582
621
|
emits: ["update:modelValue"],
|
|
583
|
-
setup(e, { emit:
|
|
584
|
-
const
|
|
622
|
+
setup(e, { emit: o }) {
|
|
623
|
+
const t = e;
|
|
585
624
|
h({
|
|
586
625
|
get() {
|
|
587
|
-
return
|
|
626
|
+
return t.modelValue;
|
|
588
627
|
},
|
|
589
|
-
set(
|
|
590
|
-
|
|
628
|
+
set(n) {
|
|
629
|
+
o("update:modelValue", n);
|
|
591
630
|
}
|
|
592
631
|
});
|
|
593
|
-
function
|
|
594
|
-
|
|
632
|
+
function d(n) {
|
|
633
|
+
o("update:modelValue", n);
|
|
595
634
|
}
|
|
596
|
-
const
|
|
635
|
+
const a = h(() => [
|
|
597
636
|
{
|
|
598
637
|
text: "Please select"
|
|
599
638
|
},
|
|
600
|
-
...
|
|
601
|
-
(
|
|
639
|
+
...t.options.map(
|
|
640
|
+
(n) => typeof n == "string" ? { value: n, text: n } : n
|
|
602
641
|
)
|
|
603
|
-
]),
|
|
604
|
-
return (
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
642
|
+
]), i = h(() => [...t.options].find((n) => JSON.stringify(n.value) === JSON.stringify(t.modelValue)));
|
|
643
|
+
return (n, l) => (r(), c("div", se, [
|
|
644
|
+
u("div", ce, [
|
|
645
|
+
u("div", fe, [
|
|
646
|
+
u("button", {
|
|
608
647
|
class: b(["btn dropdown-toggle", {
|
|
609
648
|
[`btn-${e.variant}`]: e.variant,
|
|
610
649
|
[`btn-${e.color}`]: e.color,
|
|
@@ -616,30 +655,30 @@ const _ = { class: "form-input form-input--textarea" }, ee = ["type", "id", "nam
|
|
|
616
655
|
"data-bs-toggle": "dropdown",
|
|
617
656
|
"aria-expanded": "false",
|
|
618
657
|
disabled: e.disabled
|
|
619
|
-
}, v(p(
|
|
620
|
-
|
|
658
|
+
}, v(p(i) ? p(i).text : e.placeholder), 11, me),
|
|
659
|
+
u("ul", {
|
|
621
660
|
class: "dropdown-menu",
|
|
622
661
|
"aria-labelledby": e.id
|
|
623
662
|
}, [
|
|
624
|
-
(
|
|
625
|
-
m(
|
|
626
|
-
|
|
663
|
+
(r(!0), c(M, null, N(p(a), (s, f) => (r(), c("li", { key: f }, [
|
|
664
|
+
m(n.$slots, "option", {}, () => [
|
|
665
|
+
u("a", {
|
|
627
666
|
class: "dropdown-item",
|
|
628
|
-
onClick:
|
|
629
|
-
}, v(
|
|
667
|
+
onClick: T((k) => d(s.value), ["prevent"])
|
|
668
|
+
}, v(s.text), 9, pe)
|
|
630
669
|
])
|
|
631
670
|
]))), 128))
|
|
632
|
-
], 8,
|
|
671
|
+
], 8, ye)
|
|
633
672
|
])
|
|
634
673
|
]),
|
|
635
|
-
|
|
636
|
-
m(
|
|
637
|
-
|
|
674
|
+
u("label", { for: e.id }, [
|
|
675
|
+
m(n.$slots, "label", {}, () => [
|
|
676
|
+
V(v(e.label), 1)
|
|
638
677
|
])
|
|
639
|
-
], 8,
|
|
678
|
+
], 8, be)
|
|
640
679
|
]));
|
|
641
680
|
}
|
|
642
|
-
}),
|
|
681
|
+
}), ge = ["id", "name", "multiple", "accept"], he = { class: "form-input__input-group input-group" }, ve = ["value", "id", "name"], $e = ["for"], Se = ["for", "innerHTML"], He = /* @__PURE__ */ g({
|
|
643
682
|
__name: "file-input",
|
|
644
683
|
props: {
|
|
645
684
|
modelValue: {
|
|
@@ -691,61 +730,66 @@ const _ = { class: "form-input form-input--textarea" }, ee = ["type", "id", "nam
|
|
|
691
730
|
}
|
|
692
731
|
},
|
|
693
732
|
emits: ["update:modelValue"],
|
|
694
|
-
setup(e, { emit:
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
733
|
+
setup(e, { emit: o }) {
|
|
734
|
+
const t = e;
|
|
735
|
+
function d(l) {
|
|
736
|
+
const s = l.target && l.target.files;
|
|
737
|
+
s && (i.splice(0, i.length), Array.from(s).forEach((f) => {
|
|
738
|
+
i.push(f);
|
|
699
739
|
}));
|
|
700
740
|
}
|
|
701
|
-
const
|
|
702
|
-
return h(() =>
|
|
703
|
-
|
|
704
|
-
}, { deep: !0 }), (
|
|
741
|
+
const a = x(), i = P([]), n = h(() => i && i.map((l) => l.name));
|
|
742
|
+
return h(() => i.map((l) => URL.createObjectURL(l))), $(() => t.modelValue, (l, s) => {
|
|
743
|
+
l.length === 0 && (a.value.value = null);
|
|
744
|
+
}, { deep: !0 }), $(() => i, (l, s) => {
|
|
745
|
+
o("update:modelValue", l);
|
|
746
|
+
}, { deep: !0 }), (l, s) => (r(), c("div", {
|
|
705
747
|
class: b(["form-input file-input", "file-input--primary"])
|
|
706
748
|
}, [
|
|
707
|
-
|
|
749
|
+
u("input", {
|
|
750
|
+
ref_key: "input",
|
|
751
|
+
ref: a,
|
|
708
752
|
type: "file",
|
|
709
753
|
id: e.id,
|
|
710
754
|
name: e.name,
|
|
711
755
|
class: "d-none",
|
|
712
|
-
onChange:
|
|
756
|
+
onChange: d,
|
|
713
757
|
multiple: e.multiple,
|
|
714
758
|
accept: e.accept
|
|
715
|
-
}, null, 40,
|
|
716
|
-
|
|
717
|
-
m(
|
|
718
|
-
|
|
759
|
+
}, null, 40, ge),
|
|
760
|
+
u("div", he, [
|
|
761
|
+
m(l.$slots, "input-prepend"),
|
|
762
|
+
u("input", {
|
|
719
763
|
type: "text",
|
|
720
764
|
value: p(n),
|
|
721
765
|
id: e.id,
|
|
722
766
|
name: e.name,
|
|
723
767
|
class: "form-control"
|
|
724
|
-
}, null, 8,
|
|
725
|
-
m(
|
|
726
|
-
|
|
768
|
+
}, null, 8, ve),
|
|
769
|
+
m(l.$slots, "input-append", {}, () => [
|
|
770
|
+
u("label", {
|
|
727
771
|
for: e.id,
|
|
728
772
|
class: "btn btn-outline-dark"
|
|
729
|
-
}, " Select Image ", 8,
|
|
773
|
+
}, " Select Image ", 8, $e)
|
|
730
774
|
])
|
|
731
775
|
]),
|
|
732
|
-
m(
|
|
733
|
-
|
|
776
|
+
m(l.$slots, "label", {}, () => [
|
|
777
|
+
u("label", {
|
|
734
778
|
for: e.id,
|
|
735
779
|
class: "form-input__label",
|
|
736
780
|
innerHTML: `${e.label}${e.required ? " *" : ""}`
|
|
737
|
-
}, null, 8,
|
|
781
|
+
}, null, 8, Se)
|
|
738
782
|
])
|
|
739
783
|
]));
|
|
740
784
|
}
|
|
741
|
-
}),
|
|
742
|
-
async function
|
|
743
|
-
return await new Promise((
|
|
744
|
-
let
|
|
745
|
-
|
|
785
|
+
}), xe = { class: "media-upload" }, Ve = ["src"], ke = ["onClick"], Be = ["for"];
|
|
786
|
+
async function we(e) {
|
|
787
|
+
return await new Promise((o) => {
|
|
788
|
+
let t = new FileReader();
|
|
789
|
+
t.onload = () => o(t.result), t.readAsDataURL(e);
|
|
746
790
|
});
|
|
747
791
|
}
|
|
748
|
-
const
|
|
792
|
+
const Pe = /* @__PURE__ */ g({
|
|
749
793
|
__name: "media-upload",
|
|
750
794
|
props: {
|
|
751
795
|
modelValue: {
|
|
@@ -801,65 +845,67 @@ const ze = /* @__PURE__ */ g({
|
|
|
801
845
|
}
|
|
802
846
|
},
|
|
803
847
|
emits: ["update:modelValue", "update:src"],
|
|
804
|
-
setup(e, { emit:
|
|
805
|
-
const
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
src: await
|
|
848
|
+
setup(e, { emit: o }) {
|
|
849
|
+
const t = e, d = x([]), a = x([]), i = h(() => t.modelValue.length ? t.modelValue : t.src ? [{ type: "", src: t.src }] : a.value);
|
|
850
|
+
$(() => d, async (l, s) => {
|
|
851
|
+
a.value = await Promise.all(
|
|
852
|
+
l.value.map(async (f) => ({
|
|
853
|
+
src: await we(f),
|
|
810
854
|
type: f.type
|
|
811
855
|
}))
|
|
812
856
|
);
|
|
813
|
-
}, { deep: !0 }),
|
|
814
|
-
const f =
|
|
815
|
-
|
|
857
|
+
}, { deep: !0 }), $(() => a, async (l, s) => {
|
|
858
|
+
const f = t.multiple ? a.value : a.value[0];
|
|
859
|
+
o("update:modelValue", f), t.multiple || o("update:src", a.value[0] && a.value[0].src);
|
|
816
860
|
}, { deep: !0 });
|
|
817
|
-
function
|
|
818
|
-
|
|
861
|
+
function n(l) {
|
|
862
|
+
d.value.splice(l, 1);
|
|
819
863
|
}
|
|
820
|
-
return (
|
|
821
|
-
const f =
|
|
822
|
-
return
|
|
823
|
-
(
|
|
824
|
-
key:
|
|
864
|
+
return (l, s) => {
|
|
865
|
+
const f = S("svg-icon"), k = S("file-input");
|
|
866
|
+
return r(), c("div", xe, [
|
|
867
|
+
(r(!0), c(M, null, N(p(i), (B, I) => (r(), c("div", {
|
|
868
|
+
key: B.src,
|
|
825
869
|
class: "media-upload__thumbnail"
|
|
826
870
|
}, [
|
|
827
|
-
|
|
828
|
-
src:
|
|
871
|
+
u("img", {
|
|
872
|
+
src: B.src,
|
|
829
873
|
class: "img-thumbnail rounded"
|
|
830
|
-
}, null, 8,
|
|
831
|
-
|
|
832
|
-
onClick:
|
|
874
|
+
}, null, 8, Ve),
|
|
875
|
+
u("button", {
|
|
876
|
+
onClick: T((qe) => n(I), ["prevent"]),
|
|
833
877
|
class: "btn btn--close"
|
|
834
878
|
}, [
|
|
835
|
-
|
|
836
|
-
], 8,
|
|
879
|
+
z(f, { symbol: "x" })
|
|
880
|
+
], 8, ke)
|
|
837
881
|
]))), 128)),
|
|
838
|
-
|
|
839
|
-
modelValue:
|
|
840
|
-
"onUpdate:modelValue":
|
|
882
|
+
z(k, {
|
|
883
|
+
modelValue: d.value,
|
|
884
|
+
"onUpdate:modelValue": s[0] || (s[0] = (B) => d.value = B),
|
|
841
885
|
id: e.id,
|
|
842
886
|
name: e.name,
|
|
843
887
|
accept: e.accept,
|
|
844
888
|
class: "d-none"
|
|
845
889
|
}, null, 8, ["modelValue", "id", "name", "accept"]),
|
|
846
|
-
|
|
890
|
+
u("label", {
|
|
847
891
|
for: e.id,
|
|
848
892
|
class: "btn btn-outline-dark"
|
|
849
|
-
}, " Select Image ", 8,
|
|
893
|
+
}, " Select Image ", 8, Be)
|
|
850
894
|
]);
|
|
851
895
|
};
|
|
852
896
|
}
|
|
853
897
|
});
|
|
854
898
|
export {
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
899
|
+
ze as BaseButton,
|
|
900
|
+
Ne as BaseHeadline,
|
|
901
|
+
Ue as BaseParagraph,
|
|
902
|
+
Ie as CheckGroup,
|
|
903
|
+
He as FileInput,
|
|
904
|
+
Le as FormInput,
|
|
905
|
+
Ae as InputDropdown,
|
|
906
|
+
Te as InputTextarea,
|
|
907
|
+
Me as LoadingSpinner,
|
|
908
|
+
Pe as MediaUpload,
|
|
909
|
+
De as RadioGroup,
|
|
910
|
+
Ce as SvgIcon
|
|
865
911
|
};
|