ablok-components 0.0.36 → 0.0.39
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 +326 -170
- package/dist/ablok-components.umd.js +1 -1
- package/dist/components/base-headline.vue.d.ts +81 -0
- package/dist/components/base-paragraph.vue.d.ts +77 -0
- package/dist/components/input-textarea.vue.d.ts +305 -0
- package/dist/index.d.ts +3 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as g, openBlock as r, createElementBlock as s, normalizeClass as b, createElementVNode as o, renderSlot as m, computed as h, createBlock as C, resolveDynamicComponent as D, unref as p, withCtx as A, createTextVNode as x, toDisplayString as v, resolveComponent as $, createCommentVNode as k, withDirectives as w, isRef as q, vModelDynamic as H, vModelText as U, ref as O, watch as S, 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 (
|
|
27
|
-
class:
|
|
26
|
+
return (i, t) => (r(), s("i", {
|
|
27
|
+
class: b(["svg-icon", {
|
|
28
28
|
[`svg-icon--${e.size}`]: e.size
|
|
29
29
|
}])
|
|
30
30
|
}, [
|
|
31
|
-
(
|
|
32
|
-
|
|
31
|
+
(r(), s("svg", R, [
|
|
32
|
+
o("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 P = { class: "loading-spinner d-block" }, H = { 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__ */ o("animateTransform", {
|
|
54
54
|
attributeName: "transform",
|
|
55
55
|
attributeType: "XML",
|
|
56
56
|
type: "rotate",
|
|
@@ -58,9 +58,9 @@ const P = { class: "loading-spinner d-block" }, H = { 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 P = { class: "loading-spinner d-block" }, H = { class: "loading-spinner__a
|
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
71
|
setup(e) {
|
|
72
|
-
return (
|
|
73
|
-
|
|
74
|
-
(
|
|
75
|
-
|
|
72
|
+
return (i, t) => (r(), s("span", E, [
|
|
73
|
+
o("span", j, [
|
|
74
|
+
(r(), s("svg", G, [
|
|
75
|
+
o("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(i.$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 i = e, t = h(() => i.tag || "p");
|
|
96
|
+
return (l, n) => (r(), C(D(p(t)), {
|
|
97
|
+
class: b(["headline", `headline--${e.size}${e.className || ""}`])
|
|
98
|
+
}, {
|
|
99
|
+
default: A(() => [
|
|
100
|
+
m(l.$slots, "default", {}, () => [
|
|
101
|
+
x(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 (i, t) => (r(), s("p", {
|
|
117
|
+
class: b(["base-paragraph", `base-paragraph--${e.size}${e.className || ""}`])
|
|
118
|
+
}, [
|
|
119
|
+
m(i.$slots, "default", {}, () => [
|
|
120
|
+
x(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,15 +138,15 @@ const X = ["type", "disabled", "href", "to"], ke = /* @__PURE__ */ b({
|
|
|
99
138
|
fab: { type: Boolean }
|
|
100
139
|
},
|
|
101
140
|
setup(e) {
|
|
102
|
-
const
|
|
103
|
-
return (
|
|
141
|
+
const i = e, t = h(() => i.caption && !i.fab);
|
|
142
|
+
return (l, n) => {
|
|
104
143
|
const d = $("svg-icon");
|
|
105
|
-
return
|
|
144
|
+
return r(), s("button", {
|
|
106
145
|
type: e.type,
|
|
107
146
|
disabled: e.disabled,
|
|
108
147
|
href: e.href,
|
|
109
148
|
to: e.to,
|
|
110
|
-
class:
|
|
149
|
+
class: b(["base-button btn btn-primary", {
|
|
111
150
|
disabled: e.disabled,
|
|
112
151
|
pending: e.pending,
|
|
113
152
|
rounded: e.rounded,
|
|
@@ -119,28 +158,28 @@ const X = ["type", "disabled", "href", "to"], ke = /* @__PURE__ */ b({
|
|
|
119
158
|
"x-small": e.size === "x-small"
|
|
120
159
|
}])
|
|
121
160
|
}, [
|
|
122
|
-
m(
|
|
123
|
-
e.icon ? (
|
|
161
|
+
m(l.$slots, "default", {}, () => [
|
|
162
|
+
e.icon ? (r(), C(d, {
|
|
124
163
|
key: 0,
|
|
125
164
|
id: e.icon,
|
|
126
165
|
class: "base-button__caption"
|
|
127
|
-
}, null, 8, ["id"])) :
|
|
128
|
-
p(t) ? (
|
|
166
|
+
}, null, 8, ["id"])) : k("", !0),
|
|
167
|
+
p(t) ? (r(), s("span", {
|
|
129
168
|
key: 1,
|
|
130
|
-
class:
|
|
131
|
-
}, v(e.caption), 3)) :
|
|
169
|
+
class: b(["base-button__caption", { "icon-padding": e.icon }])
|
|
170
|
+
}, v(e.caption), 3)) : k("", !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 t = e,
|
|
238
|
+
setup(e, { emit: i }) {
|
|
239
|
+
const t = e, l = h({
|
|
201
240
|
get() {
|
|
202
241
|
return t.modelValue;
|
|
203
242
|
},
|
|
204
243
|
set(n) {
|
|
205
|
-
|
|
244
|
+
i("update:modelValue", n);
|
|
206
245
|
}
|
|
207
246
|
});
|
|
208
|
-
return (n, d) => (
|
|
209
|
-
class:
|
|
247
|
+
return (n, d) => (r(), s("div", {
|
|
248
|
+
class: b(["form-input", `form-input--${e.type}`])
|
|
210
249
|
}, [
|
|
211
|
-
|
|
250
|
+
o("div", Q, [
|
|
212
251
|
m(n.$slots, "input-prepend"),
|
|
213
|
-
|
|
214
|
-
"onUpdate:modelValue": d[0] || (d[0] = (
|
|
252
|
+
w(o("input", {
|
|
253
|
+
"onUpdate:modelValue": d[0] || (d[0] = (a) => q(l) ? l.value = a : null),
|
|
215
254
|
type: e.type === "color" ? "text" : e.type,
|
|
216
255
|
id: e.id,
|
|
217
256
|
name: e.name,
|
|
@@ -222,17 +261,17 @@ const Y = { class: "input-group form-input__input-group" }, K = ["type", "id", "
|
|
|
222
261
|
required: e.required,
|
|
223
262
|
maxlength: e.maxlength,
|
|
224
263
|
checked: e.checked,
|
|
225
|
-
class:
|
|
264
|
+
class: b(["form-control", {
|
|
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(l)]
|
|
231
270
|
]),
|
|
232
271
|
m(n.$slots, "input-append", {}, () => [
|
|
233
|
-
e.type === "color" ? (
|
|
234
|
-
|
|
235
|
-
"onUpdate:modelValue": d[1] || (d[1] = (
|
|
272
|
+
e.type === "color" ? (r(), s("span", Z, [
|
|
273
|
+
w(o("input", {
|
|
274
|
+
"onUpdate:modelValue": d[1] || (d[1] = (a) => q(l) ? l.value = a : null),
|
|
236
275
|
type: "color",
|
|
237
276
|
name: `${e.name}-color`,
|
|
238
277
|
id: `${e.id}-color`,
|
|
@@ -241,25 +280,139 @@ 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(l)]
|
|
246
285
|
])
|
|
247
|
-
])) :
|
|
286
|
+
])) : k("", !0)
|
|
248
287
|
])
|
|
249
288
|
]),
|
|
250
289
|
m(n.$slots, "label", {}, () => [
|
|
251
|
-
|
|
290
|
+
o("label", {
|
|
252
291
|
for: e.id,
|
|
253
|
-
class:
|
|
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 = {
|
|
302
|
+
key: 0,
|
|
303
|
+
class: "form-input__color-swatch"
|
|
304
|
+
}, ne = ["name", "id", "disabled", "read-only", "required", "aria-label"], de = ["for", "innerHTML"], Te = /* @__PURE__ */ g({
|
|
305
|
+
__name: "input-textarea",
|
|
306
|
+
props: {
|
|
307
|
+
modelValue: {
|
|
308
|
+
type: String,
|
|
309
|
+
default: ""
|
|
310
|
+
},
|
|
311
|
+
type: {
|
|
312
|
+
type: String,
|
|
313
|
+
default: "text"
|
|
314
|
+
},
|
|
315
|
+
name: {
|
|
316
|
+
type: String,
|
|
317
|
+
default: () => y()
|
|
318
|
+
},
|
|
319
|
+
id: {
|
|
320
|
+
type: String,
|
|
321
|
+
default: () => y()
|
|
322
|
+
},
|
|
323
|
+
label: {
|
|
324
|
+
type: String,
|
|
325
|
+
default: ""
|
|
326
|
+
},
|
|
327
|
+
placeholder: {
|
|
328
|
+
type: String,
|
|
329
|
+
default: ""
|
|
330
|
+
},
|
|
331
|
+
variant: {
|
|
332
|
+
type: String,
|
|
333
|
+
default: ""
|
|
334
|
+
},
|
|
335
|
+
disabled: {
|
|
336
|
+
type: Boolean,
|
|
337
|
+
default: !1
|
|
338
|
+
},
|
|
339
|
+
readOnly: {
|
|
340
|
+
type: Boolean,
|
|
341
|
+
default: !1
|
|
342
|
+
},
|
|
343
|
+
required: {
|
|
344
|
+
type: Boolean,
|
|
345
|
+
default: !1
|
|
346
|
+
},
|
|
347
|
+
maxlength: {
|
|
348
|
+
type: Number
|
|
349
|
+
},
|
|
350
|
+
pattern: {
|
|
351
|
+
type: String,
|
|
352
|
+
default: null
|
|
353
|
+
},
|
|
354
|
+
checked: {
|
|
355
|
+
type: Boolean,
|
|
356
|
+
default: !1
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
emits: ["update:modelValue"],
|
|
360
|
+
setup(e, { emit: i }) {
|
|
361
|
+
const t = e, l = h({
|
|
362
|
+
get() {
|
|
363
|
+
return t.modelValue;
|
|
364
|
+
},
|
|
365
|
+
set(n) {
|
|
366
|
+
i("update:modelValue", n);
|
|
367
|
+
}
|
|
368
|
+
});
|
|
369
|
+
return (n, d) => (r(), s("div", te, [
|
|
370
|
+
m(n.$slots, "input-prepend"),
|
|
371
|
+
w(o("textarea", {
|
|
372
|
+
"onUpdate:modelValue": d[0] || (d[0] = (a) => q(l) ? l.value = a : null),
|
|
373
|
+
type: e.type === "color" ? "text" : e.type,
|
|
374
|
+
id: e.id,
|
|
375
|
+
name: e.name,
|
|
376
|
+
placeholder: e.placeholder,
|
|
377
|
+
pattern: e.pattern,
|
|
378
|
+
disabled: e.disabled,
|
|
379
|
+
"read-only": e.readOnly,
|
|
380
|
+
required: e.required,
|
|
381
|
+
maxlength: e.maxlength,
|
|
382
|
+
class: b(["form-control", {}]),
|
|
383
|
+
"aria-label": e.label
|
|
384
|
+
}, null, 8, le), [
|
|
385
|
+
[U, p(l)]
|
|
386
|
+
]),
|
|
387
|
+
m(n.$slots, "input-append", {}, () => [
|
|
388
|
+
e.type === "color" ? (r(), s("span", ae, [
|
|
389
|
+
w(o("input", {
|
|
390
|
+
"onUpdate:modelValue": d[1] || (d[1] = (a) => q(l) ? l.value = a : null),
|
|
391
|
+
type: "color",
|
|
392
|
+
name: `${e.name}-color`,
|
|
393
|
+
id: `${e.id}-color`,
|
|
394
|
+
disabled: e.disabled,
|
|
395
|
+
"read-only": e.readOnly,
|
|
396
|
+
required: e.required,
|
|
397
|
+
class: "form-control",
|
|
398
|
+
"aria-label": e.label
|
|
399
|
+
}, null, 8, ne), [
|
|
400
|
+
[U, p(l)]
|
|
401
|
+
])
|
|
402
|
+
])) : k("", !0)
|
|
403
|
+
]),
|
|
404
|
+
m(n.$slots, "label", {}, () => [
|
|
405
|
+
o("label", {
|
|
406
|
+
for: e.id,
|
|
407
|
+
class: b(["form-input__label", {
|
|
408
|
+
"form-check-label": e.type === "checkbox"
|
|
409
|
+
}]),
|
|
410
|
+
innerHTML: `${e.label}${e.required ? " *" : ""}`
|
|
411
|
+
}, null, 10, de)
|
|
412
|
+
])
|
|
413
|
+
]));
|
|
414
|
+
}
|
|
415
|
+
}), ie = { class: "radio-group" }, oe = ["for"], Ie = /* @__PURE__ */ g({
|
|
263
416
|
__name: "check-group",
|
|
264
417
|
props: {
|
|
265
418
|
modelValue: {
|
|
@@ -299,43 +452,43 @@ const _ = { class: "radio-group" }, ee = ["for"], we = /* @__PURE__ */ b({
|
|
|
299
452
|
}
|
|
300
453
|
},
|
|
301
454
|
emits: ["change", "update:modelValue"],
|
|
302
|
-
setup(e, { emit:
|
|
303
|
-
const t = e,
|
|
455
|
+
setup(e, { emit: i }) {
|
|
456
|
+
const t = e, l = O([]);
|
|
304
457
|
return S(() => t.modelValue, (n, d) => {
|
|
305
|
-
|
|
306
|
-
(
|
|
458
|
+
l.value = t.options.map(
|
|
459
|
+
(a) => a.value ? t.modelValue.some((u) => u["value "] === a.value) : t.modelValue.some((u) => u === a)
|
|
307
460
|
);
|
|
308
|
-
}, { immediate: !0 }), S(
|
|
309
|
-
const
|
|
461
|
+
}, { immediate: !0 }), S(l, (n, d) => {
|
|
462
|
+
const a = n.reduce((u, c, f) => {
|
|
310
463
|
const V = c && t.options[f] ? [t.options[f] || t.options[f]] : [];
|
|
311
|
-
return [...
|
|
464
|
+
return [...u, ...V];
|
|
312
465
|
}, []);
|
|
313
|
-
|
|
314
|
-
}, { deep: !0 }),
|
|
466
|
+
i("update:modelValue", a);
|
|
467
|
+
}, { deep: !0 }), L(() => {
|
|
315
468
|
}), (n, d) => {
|
|
316
|
-
const
|
|
317
|
-
return
|
|
318
|
-
(
|
|
469
|
+
const a = $("form-input");
|
|
470
|
+
return r(), s("div", ie, [
|
|
471
|
+
(r(!0), s(M, null, N(e.options, (u, c) => (r(), C(a, {
|
|
319
472
|
key: c,
|
|
320
|
-
modelValue: p(
|
|
321
|
-
"onUpdate:modelValue": (f) => p(
|
|
473
|
+
modelValue: p(l)[c],
|
|
474
|
+
"onUpdate:modelValue": (f) => p(l)[c] = f,
|
|
322
475
|
type: "checkbox",
|
|
323
476
|
name: e.name,
|
|
324
477
|
id: `${e.id}-${c}`,
|
|
325
|
-
label: `${
|
|
478
|
+
label: `${u.text || u}${e.required ? " *" : ""}`,
|
|
326
479
|
disabled: e.disabled,
|
|
327
480
|
"read-only": e.readOnly,
|
|
328
481
|
required: e.required
|
|
329
482
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "name", "id", "label", "disabled", "read-only", "required"]))), 128)),
|
|
330
|
-
|
|
483
|
+
o("label", { for: e.id }, [
|
|
331
484
|
m(n.$slots, "label", {}, () => [
|
|
332
|
-
|
|
485
|
+
x(v(e.label), 1)
|
|
333
486
|
])
|
|
334
|
-
], 8,
|
|
487
|
+
], 8, oe)
|
|
335
488
|
]);
|
|
336
489
|
};
|
|
337
490
|
}
|
|
338
|
-
}),
|
|
491
|
+
}), ue = { class: "radio-group" }, re = ["for"], De = /* @__PURE__ */ g({
|
|
339
492
|
__name: "radio-group",
|
|
340
493
|
props: {
|
|
341
494
|
modelValue: {
|
|
@@ -375,41 +528,41 @@ const _ = { class: "radio-group" }, ee = ["for"], we = /* @__PURE__ */ b({
|
|
|
375
528
|
}
|
|
376
529
|
},
|
|
377
530
|
emits: ["change", "update:modelValue"],
|
|
378
|
-
setup(e, { emit:
|
|
531
|
+
setup(e, { emit: i }) {
|
|
379
532
|
const t = e;
|
|
380
|
-
|
|
381
|
-
function
|
|
382
|
-
|
|
533
|
+
O(t.options.map((n) => n.value === t.modelValue));
|
|
534
|
+
function l(n) {
|
|
535
|
+
i("update:modelValue", n);
|
|
383
536
|
}
|
|
384
|
-
return
|
|
537
|
+
return L(() => {
|
|
385
538
|
}), (n, d) => {
|
|
386
|
-
const
|
|
387
|
-
return
|
|
388
|
-
(
|
|
539
|
+
const a = $("form-input");
|
|
540
|
+
return r(), s("div", ue, [
|
|
541
|
+
(r(!0), s(M, null, N(e.options, (u, c) => (r(), C(a, {
|
|
389
542
|
key: c,
|
|
390
543
|
type: "radio",
|
|
391
544
|
name: e.name,
|
|
392
545
|
id: `${e.id}-${c}`,
|
|
393
|
-
value:
|
|
394
|
-
label: `${
|
|
395
|
-
checked:
|
|
546
|
+
value: u.value || u,
|
|
547
|
+
label: `${u.text || u}${e.required ? " *" : ""}`,
|
|
548
|
+
checked: u.value ? u.value === e.modelValue : u === e.modelValue,
|
|
396
549
|
disabled: e.disabled,
|
|
397
550
|
"read-only": e.readOnly,
|
|
398
551
|
required: e.required,
|
|
399
|
-
onChange: (f) =>
|
|
552
|
+
onChange: (f) => l(u)
|
|
400
553
|
}, null, 8, ["name", "id", "value", "label", "checked", "disabled", "read-only", "required", "onChange"]))), 128)),
|
|
401
|
-
|
|
554
|
+
o("label", { for: e.id }, [
|
|
402
555
|
m(n.$slots, "label", {}, () => [
|
|
403
|
-
|
|
556
|
+
x(v(e.label), 1)
|
|
404
557
|
])
|
|
405
|
-
], 8,
|
|
558
|
+
], 8, re)
|
|
406
559
|
]);
|
|
407
560
|
};
|
|
408
561
|
}
|
|
409
|
-
}),
|
|
562
|
+
}), se = { class: "input input-dropdown" }, ce = { class: "dropdown" }, me = {
|
|
410
563
|
class: "btn-group",
|
|
411
564
|
role: "group"
|
|
412
|
-
},
|
|
565
|
+
}, fe = ["id", "disabled"], ye = ["aria-labelledby"], pe = ["onClick"], be = ["for"], Ae = /* @__PURE__ */ g({
|
|
413
566
|
__name: "input-dropdown",
|
|
414
567
|
props: {
|
|
415
568
|
modelValue: {
|
|
@@ -466,32 +619,32 @@ const _ = { class: "radio-group" }, ee = ["for"], we = /* @__PURE__ */ b({
|
|
|
466
619
|
}
|
|
467
620
|
},
|
|
468
621
|
emits: ["update:modelValue"],
|
|
469
|
-
setup(e, { emit:
|
|
622
|
+
setup(e, { emit: i }) {
|
|
470
623
|
const t = e;
|
|
471
624
|
h({
|
|
472
625
|
get() {
|
|
473
626
|
return t.modelValue;
|
|
474
627
|
},
|
|
475
|
-
set(
|
|
476
|
-
|
|
628
|
+
set(a) {
|
|
629
|
+
i("update:modelValue", a);
|
|
477
630
|
}
|
|
478
631
|
});
|
|
479
|
-
function a
|
|
480
|
-
|
|
632
|
+
function l(a) {
|
|
633
|
+
i("update:modelValue", a);
|
|
481
634
|
}
|
|
482
635
|
const n = h(() => [
|
|
483
636
|
{
|
|
484
637
|
text: "Please select"
|
|
485
638
|
},
|
|
486
639
|
...t.options.map(
|
|
487
|
-
(
|
|
640
|
+
(a) => typeof a == "string" ? { value: a, text: a } : a
|
|
488
641
|
)
|
|
489
|
-
]), d = h(() => [...t.options].find((
|
|
490
|
-
return (
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
class:
|
|
642
|
+
]), d = h(() => [...t.options].find((a) => JSON.stringify(a.value) === JSON.stringify(t.modelValue)));
|
|
643
|
+
return (a, u) => (r(), s("div", se, [
|
|
644
|
+
o("div", ce, [
|
|
645
|
+
o("div", me, [
|
|
646
|
+
o("button", {
|
|
647
|
+
class: b(["btn dropdown-toggle", {
|
|
495
648
|
[`btn-${e.variant}`]: e.variant,
|
|
496
649
|
[`btn-${e.color}`]: e.color,
|
|
497
650
|
[`btn-${e.disabled}`]: e.disabled,
|
|
@@ -502,30 +655,30 @@ const _ = { class: "radio-group" }, ee = ["for"], we = /* @__PURE__ */ b({
|
|
|
502
655
|
"data-bs-toggle": "dropdown",
|
|
503
656
|
"aria-expanded": "false",
|
|
504
657
|
disabled: e.disabled
|
|
505
|
-
}, v(p(d) ? p(d).text : e.placeholder), 11,
|
|
506
|
-
|
|
658
|
+
}, v(p(d) ? p(d).text : e.placeholder), 11, fe),
|
|
659
|
+
o("ul", {
|
|
507
660
|
class: "dropdown-menu",
|
|
508
661
|
"aria-labelledby": e.id
|
|
509
662
|
}, [
|
|
510
|
-
(
|
|
511
|
-
m(
|
|
512
|
-
|
|
663
|
+
(r(!0), s(M, null, N(p(n), (c, f) => (r(), s("li", { key: f }, [
|
|
664
|
+
m(a.$slots, "option", {}, () => [
|
|
665
|
+
o("a", {
|
|
513
666
|
class: "dropdown-item",
|
|
514
|
-
onClick:
|
|
515
|
-
}, v(c.text), 9,
|
|
667
|
+
onClick: T((V) => l(c.value), ["prevent"])
|
|
668
|
+
}, v(c.text), 9, pe)
|
|
516
669
|
])
|
|
517
670
|
]))), 128))
|
|
518
|
-
], 8,
|
|
671
|
+
], 8, ye)
|
|
519
672
|
])
|
|
520
673
|
]),
|
|
521
|
-
|
|
522
|
-
m(
|
|
523
|
-
|
|
674
|
+
o("label", { for: e.id }, [
|
|
675
|
+
m(a.$slots, "label", {}, () => [
|
|
676
|
+
x(v(e.label), 1)
|
|
524
677
|
])
|
|
525
|
-
], 8,
|
|
678
|
+
], 8, be)
|
|
526
679
|
]));
|
|
527
680
|
}
|
|
528
|
-
}),
|
|
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({
|
|
529
682
|
__name: "file-input",
|
|
530
683
|
props: {
|
|
531
684
|
modelValue: {
|
|
@@ -577,20 +730,20 @@ const _ = { class: "radio-group" }, ee = ["for"], we = /* @__PURE__ */ b({
|
|
|
577
730
|
}
|
|
578
731
|
},
|
|
579
732
|
emits: ["update:modelValue"],
|
|
580
|
-
setup(e, { emit:
|
|
733
|
+
setup(e, { emit: i }) {
|
|
581
734
|
function t(d) {
|
|
582
|
-
const
|
|
583
|
-
|
|
584
|
-
|
|
735
|
+
const a = d.target && d.target.files;
|
|
736
|
+
a && (l.splice(0, l.length), Array.from(a).forEach((u) => {
|
|
737
|
+
l.push(u);
|
|
585
738
|
}));
|
|
586
739
|
}
|
|
587
|
-
const
|
|
588
|
-
return h(() =>
|
|
589
|
-
console.log("file input", d),
|
|
590
|
-
}, { deep: !0 }), (d,
|
|
591
|
-
class:
|
|
740
|
+
const l = P([]), n = h(() => l && l.map((d) => d.name));
|
|
741
|
+
return h(() => l.map((d) => URL.createObjectURL(d))), S(() => l, (d, a) => {
|
|
742
|
+
console.log("file input", d), i("update:modelValue", d);
|
|
743
|
+
}, { deep: !0 }), (d, a) => (r(), s("div", {
|
|
744
|
+
class: b(["form-input file-input", "file-input--primary"])
|
|
592
745
|
}, [
|
|
593
|
-
|
|
746
|
+
o("input", {
|
|
594
747
|
type: "file",
|
|
595
748
|
id: e.id,
|
|
596
749
|
name: e.name,
|
|
@@ -598,40 +751,40 @@ const _ = { class: "radio-group" }, ee = ["for"], we = /* @__PURE__ */ b({
|
|
|
598
751
|
onChange: t,
|
|
599
752
|
multiple: e.multiple,
|
|
600
753
|
accept: e.accept
|
|
601
|
-
}, null, 40,
|
|
602
|
-
|
|
754
|
+
}, null, 40, ge),
|
|
755
|
+
o("div", he, [
|
|
603
756
|
m(d.$slots, "input-prepend"),
|
|
604
|
-
|
|
757
|
+
o("input", {
|
|
605
758
|
type: "text",
|
|
606
759
|
value: p(n),
|
|
607
760
|
id: e.id,
|
|
608
761
|
name: e.name,
|
|
609
762
|
class: "form-control"
|
|
610
|
-
}, null, 8,
|
|
763
|
+
}, null, 8, ve),
|
|
611
764
|
m(d.$slots, "input-append", {}, () => [
|
|
612
|
-
|
|
765
|
+
o("label", {
|
|
613
766
|
for: e.id,
|
|
614
767
|
class: "btn btn-outline-dark"
|
|
615
|
-
}, " Select Image ", 8,
|
|
768
|
+
}, " Select Image ", 8, $e)
|
|
616
769
|
])
|
|
617
770
|
]),
|
|
618
771
|
m(d.$slots, "label", {}, () => [
|
|
619
|
-
|
|
772
|
+
o("label", {
|
|
620
773
|
for: e.id,
|
|
621
774
|
class: "form-input__label",
|
|
622
775
|
innerHTML: `${e.label}${e.required ? " *" : ""}`
|
|
623
|
-
}, null, 8,
|
|
776
|
+
}, null, 8, Se)
|
|
624
777
|
])
|
|
625
778
|
]));
|
|
626
779
|
}
|
|
627
|
-
}),
|
|
628
|
-
async function
|
|
629
|
-
return await new Promise((
|
|
780
|
+
}), xe = { class: "media-upload" }, Ve = ["src"], Be = ["onClick"], ke = ["for"];
|
|
781
|
+
async function we(e) {
|
|
782
|
+
return await new Promise((i) => {
|
|
630
783
|
let t = new FileReader();
|
|
631
|
-
t.onload = () =>
|
|
784
|
+
t.onload = () => i(t.result), t.readAsDataURL(e);
|
|
632
785
|
});
|
|
633
786
|
}
|
|
634
|
-
const
|
|
787
|
+
const Pe = /* @__PURE__ */ g({
|
|
635
788
|
__name: "media-upload",
|
|
636
789
|
props: {
|
|
637
790
|
modelValue: {
|
|
@@ -687,64 +840,67 @@ const Me = /* @__PURE__ */ b({
|
|
|
687
840
|
}
|
|
688
841
|
},
|
|
689
842
|
emits: ["update:modelValue", "update:src"],
|
|
690
|
-
setup(e, { emit:
|
|
691
|
-
const t = e,
|
|
692
|
-
S(() =>
|
|
843
|
+
setup(e, { emit: i }) {
|
|
844
|
+
const t = e, l = O([]), n = O([]), d = h(() => t.modelValue.length ? t.modelValue : t.src ? [{ type: "", src: t.src }] : n.value);
|
|
845
|
+
S(() => l, async (u, c) => {
|
|
693
846
|
n.value = await Promise.all(
|
|
694
|
-
|
|
695
|
-
src: await
|
|
847
|
+
u.value.map(async (f) => ({
|
|
848
|
+
src: await we(f),
|
|
696
849
|
type: f.type
|
|
697
850
|
}))
|
|
698
851
|
);
|
|
699
|
-
}, { deep: !0 }), S(() => n, async (
|
|
852
|
+
}, { deep: !0 }), S(() => n, async (u, c) => {
|
|
700
853
|
const f = t.multiple ? n.value : [n.value[0]];
|
|
701
|
-
|
|
854
|
+
i("update:modelValue", f), t.multiple || i("update:src", n.value[0] && n.value[0].src);
|
|
702
855
|
}, { deep: !0 });
|
|
703
|
-
function
|
|
704
|
-
|
|
856
|
+
function a(u) {
|
|
857
|
+
l.value.splice(u, 1);
|
|
705
858
|
}
|
|
706
|
-
return (
|
|
859
|
+
return (u, c) => {
|
|
707
860
|
const f = $("svg-icon"), V = $("file-input");
|
|
708
|
-
return
|
|
709
|
-
(
|
|
710
|
-
key:
|
|
861
|
+
return r(), s("div", xe, [
|
|
862
|
+
(r(!0), s(M, null, N(p(d), (B, I) => (r(), s("div", {
|
|
863
|
+
key: B.src,
|
|
711
864
|
class: "media-upload__thumbnail"
|
|
712
865
|
}, [
|
|
713
|
-
|
|
714
|
-
src:
|
|
866
|
+
o("img", {
|
|
867
|
+
src: B.src,
|
|
715
868
|
class: "img-thumbnail rounded"
|
|
716
|
-
}, null, 8,
|
|
717
|
-
|
|
718
|
-
onClick:
|
|
869
|
+
}, null, 8, Ve),
|
|
870
|
+
o("button", {
|
|
871
|
+
onClick: T((qe) => a(I), ["prevent"]),
|
|
719
872
|
class: "btn btn--close"
|
|
720
873
|
}, [
|
|
721
|
-
|
|
722
|
-
], 8,
|
|
874
|
+
z(f, { symbol: "x" })
|
|
875
|
+
], 8, Be)
|
|
723
876
|
]))), 128)),
|
|
724
|
-
|
|
725
|
-
modelValue:
|
|
726
|
-
"onUpdate:modelValue": c[0] || (c[0] = (
|
|
877
|
+
z(V, {
|
|
878
|
+
modelValue: l.value,
|
|
879
|
+
"onUpdate:modelValue": c[0] || (c[0] = (B) => l.value = B),
|
|
727
880
|
id: e.id,
|
|
728
881
|
name: e.name,
|
|
729
882
|
accept: e.accept,
|
|
730
883
|
class: "d-none"
|
|
731
884
|
}, null, 8, ["modelValue", "id", "name", "accept"]),
|
|
732
|
-
|
|
885
|
+
o("label", {
|
|
733
886
|
for: e.id,
|
|
734
887
|
class: "btn btn-outline-dark"
|
|
735
|
-
}, " Select Image ", 8,
|
|
888
|
+
}, " Select Image ", 8, ke)
|
|
736
889
|
]);
|
|
737
890
|
};
|
|
738
891
|
}
|
|
739
892
|
});
|
|
740
893
|
export {
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
894
|
+
ze as BaseButton,
|
|
895
|
+
Ne as BaseHeadline,
|
|
896
|
+
Ue as BaseParagraph,
|
|
897
|
+
Ie as CheckGroup,
|
|
898
|
+
He as FileInput,
|
|
899
|
+
Le as FormInput,
|
|
900
|
+
Ae as InputDropdown,
|
|
901
|
+
Te as InputTextarea,
|
|
902
|
+
Me as LoadingSpinner,
|
|
903
|
+
Pe as MediaUpload,
|
|
904
|
+
De as RadioGroup,
|
|
905
|
+
Ce as SvgIcon
|
|
750
906
|
};
|