ablok-components 0.0.35 → 0.0.38

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