ablok-components 0.0.32 → 0.0.35

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 p, openBlock as u, createElementBlock as s, normalizeClass as v, createElementVNode as i, renderSlot as f, computed as g, resolveComponent as V, createBlock as w, createCommentVNode as k, unref as y, toDisplayString as h, withDirectives as M, isRef as C, vModelDynamic as N, vModelText as U, ref as S, watch as $, onBeforeMount as L, Fragment as B, renderList as x, createTextVNode as q, withModifiers as z, reactive as I, createVNode as T } from "vue";
2
- const A = {
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";
2
+ const R = {
3
3
  class: "icon",
4
4
  preserveAspectRatio: "xMaxYMin"
5
- }, D = ["xlink:href"], he = /* @__PURE__ */ p({
5
+ }, F = ["xlink:href"], Ve = /* @__PURE__ */ b({
6
6
  __name: "svg-icon",
7
7
  props: {
8
8
  basePath: {
@@ -23,23 +23,23 @@ const A = {
23
23
  }
24
24
  },
25
25
  setup(e) {
26
- return (r, a) => (u(), s("i", {
27
- class: v(["svg-icon", {
26
+ return (r, t) => (u(), s("i", {
27
+ class: g(["svg-icon", {
28
28
  [`svg-icon--${e.size}`]: e.size
29
29
  }])
30
30
  }, [
31
- (u(), s("svg", A, [
31
+ (u(), s("svg", R, [
32
32
  i("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",
36
36
  y: "0"
37
- }, null, 8, D)
37
+ }, null, 8, F)
38
38
  ]))
39
39
  ], 2));
40
40
  }
41
41
  });
42
- const R = { class: "loading-spinner d-block" }, P = { class: "loading-spinner__animation" }, F = {
42
+ const P = { class: "loading-spinner d-block" }, H = { class: "loading-spinner__animation" }, E = {
43
43
  class: "d-block",
44
44
  version: "1.1",
45
45
  id: "L9",
@@ -50,7 +50,7 @@ const R = { 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
- }, H = ["fill"], E = /* @__PURE__ */ i("animateTransform", {
53
+ }, j = ["fill"], G = /* @__PURE__ */ i("animateTransform", {
54
54
  attributeName: "transform",
55
55
  attributeType: "XML",
56
56
  type: "rotate",
@@ -58,9 +58,9 @@ const R = { 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), j = [
62
- E
63
- ], ve = /* @__PURE__ */ p({
61
+ }, null, -1), J = [
62
+ G
63
+ ], xe = /* @__PURE__ */ b({
64
64
  __name: "loading-spinner",
65
65
  props: {
66
66
  color: {
@@ -69,20 +69,20 @@ const R = { class: "loading-spinner d-block" }, P = { class: "loading-spinner__a
69
69
  }
70
70
  },
71
71
  setup(e) {
72
- return (r, a) => (u(), s("span", R, [
73
- i("span", P, [
74
- (u(), s("svg", F, [
72
+ return (r, t) => (u(), s("span", P, [
73
+ i("span", H, [
74
+ (u(), s("svg", E, [
75
75
  i("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, H)
78
+ }, J, 8, j)
79
79
  ]))
80
80
  ]),
81
- f(r.$slots, "default")
81
+ m(r.$slots, "default")
82
82
  ]));
83
83
  }
84
84
  });
85
- const G = ["type", "disabled", "href", "to"], $e = /* @__PURE__ */ p({
85
+ const X = ["type", "disabled", "href", "to"], ke = /* @__PURE__ */ b({
86
86
  __name: "base-button",
87
87
  props: {
88
88
  type: null,
@@ -99,15 +99,15 @@ const G = ["type", "disabled", "href", "to"], $e = /* @__PURE__ */ p({
99
99
  fab: { type: Boolean }
100
100
  },
101
101
  setup(e) {
102
- const r = e, a = g(() => r.caption && !r.fab);
103
- return (n, d) => {
104
- const l = V("svg-icon");
102
+ const r = e, t = h(() => r.caption && !r.fab);
103
+ return (a, n) => {
104
+ const d = $("svg-icon");
105
105
  return u(), s("button", {
106
106
  type: e.type,
107
107
  disabled: e.disabled,
108
108
  href: e.href,
109
109
  to: e.to,
110
- class: v(["base-button btn btn-primary", {
110
+ class: g(["base-button btn btn-primary", {
111
111
  disabled: e.disabled,
112
112
  pending: e.pending,
113
113
  rounded: e.rounded,
@@ -119,28 +119,28 @@ const G = ["type", "disabled", "href", "to"], $e = /* @__PURE__ */ p({
119
119
  "x-small": e.size === "x-small"
120
120
  }])
121
121
  }, [
122
- f(n.$slots, "default", {}, () => [
123
- e.icon ? (u(), w(l, {
122
+ m(a.$slots, "default", {}, () => [
123
+ e.icon ? (u(), O(d, {
124
124
  key: 0,
125
125
  id: e.icon,
126
126
  class: "base-button__caption"
127
- }, null, 8, ["id"])) : k("", !0),
128
- y(a) ? (u(), s("span", {
127
+ }, null, 8, ["id"])) : q("", !0),
128
+ p(t) ? (u(), s("span", {
129
129
  key: 1,
130
- class: v(["base-button__caption", { "icon-padding": e.icon }])
131
- }, h(e.caption), 3)) : k("", !0)
130
+ class: g(["base-button__caption", { "icon-padding": e.icon }])
131
+ }, v(e.caption), 3)) : q("", !0)
132
132
  ])
133
- ], 10, G);
133
+ ], 10, X);
134
134
  };
135
135
  }
136
136
  });
137
- function m() {
137
+ function y() {
138
138
  return (new Date().valueOf() + Math.random()).toString(36);
139
139
  }
140
- const J = { class: "input-group form-input__input-group" }, X = ["type", "id", "name", "placeholder", "pattern", "disabled", "read-only", "required", "maxlength", "checked", "aria-label"], Y = {
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 = {
141
141
  key: 0,
142
142
  class: "form-input__color-swatch"
143
- }, K = ["name", "id", "disabled", "read-only", "required", "aria-label"], Q = ["for", "innerHTML"], Se = /* @__PURE__ */ p({
143
+ }, W = ["name", "id", "disabled", "read-only", "required", "aria-label"], Z = ["for", "innerHTML"], Be = /* @__PURE__ */ b({
144
144
  __name: "form-input",
145
145
  props: {
146
146
  modelValue: {
@@ -153,11 +153,11 @@ const J = { class: "input-group form-input__input-group" }, X = ["type", "id", "
153
153
  },
154
154
  name: {
155
155
  type: String,
156
- default: () => m()
156
+ default: () => y()
157
157
  },
158
158
  id: {
159
159
  type: String,
160
- default: () => m()
160
+ default: () => y()
161
161
  },
162
162
  label: {
163
163
  type: String,
@@ -197,21 +197,21 @@ const J = { class: "input-group form-input__input-group" }, X = ["type", "id", "
197
197
  },
198
198
  emits: ["update:modelValue"],
199
199
  setup(e, { emit: r }) {
200
- const a = e, n = g({
200
+ const t = e, a = h({
201
201
  get() {
202
- return a.modelValue;
202
+ return t.modelValue;
203
203
  },
204
- set(d) {
205
- r("update:modelValue", d);
204
+ set(n) {
205
+ r("update:modelValue", n);
206
206
  }
207
207
  });
208
- return (d, l) => (u(), s("div", {
209
- class: v(["form-input", `form-input--${e.type}`])
208
+ return (n, d) => (u(), s("div", {
209
+ class: g(["form-input", `form-input--${e.type}`])
210
210
  }, [
211
- i("div", J, [
212
- f(d.$slots, "input-prepend"),
211
+ i("div", Y, [
212
+ m(n.$slots, "input-prepend"),
213
213
  M(i("input", {
214
- "onUpdate:modelValue": l[0] || (l[0] = (t) => C(n) ? n.value = t : null),
214
+ "onUpdate:modelValue": d[0] || (d[0] = (l) => U(a) ? a.value = l : null),
215
215
  type: e.type === "color" ? "text" : e.type,
216
216
  id: e.id,
217
217
  name: e.name,
@@ -222,15 +222,17 @@ const J = { class: "input-group form-input__input-group" }, X = ["type", "id", "
222
222
  required: e.required,
223
223
  maxlength: e.maxlength,
224
224
  checked: e.checked,
225
- class: "form-control",
225
+ class: g(["form-control", {
226
+ "form-check-input": e.type === "checkbox"
227
+ }]),
226
228
  "aria-label": e.label
227
- }, null, 8, X), [
228
- [N, y(n)]
229
+ }, null, 10, K), [
230
+ [T, p(a)]
229
231
  ]),
230
- f(d.$slots, "input-append", {}, () => [
231
- e.type === "color" ? (u(), s("span", Y, [
232
+ m(n.$slots, "input-append", {}, () => [
233
+ e.type === "color" ? (u(), s("span", Q, [
232
234
  M(i("input", {
233
- "onUpdate:modelValue": l[1] || (l[1] = (t) => C(n) ? n.value = t : null),
235
+ "onUpdate:modelValue": d[1] || (d[1] = (l) => U(a) ? a.value = l : null),
234
236
  type: "color",
235
237
  name: `${e.name}-color`,
236
238
  id: `${e.id}-color`,
@@ -239,23 +241,25 @@ const J = { class: "input-group form-input__input-group" }, X = ["type", "id", "
239
241
  required: e.required,
240
242
  class: "form-control",
241
243
  "aria-label": e.label
242
- }, null, 8, K), [
243
- [U, y(n)]
244
+ }, null, 8, W), [
245
+ [A, p(a)]
244
246
  ])
245
- ])) : k("", !0)
247
+ ])) : q("", !0)
246
248
  ])
247
249
  ]),
248
- f(d.$slots, "label", {}, () => [
250
+ m(n.$slots, "label", {}, () => [
249
251
  i("label", {
250
252
  for: e.id,
251
- class: "form-input__label",
253
+ class: g(["form-input__label", {
254
+ "form-check-label": e.type === "checkbox"
255
+ }]),
252
256
  innerHTML: `${e.label}${e.required ? " *" : ""}`
253
- }, null, 8, Q)
257
+ }, null, 10, Z)
254
258
  ])
255
259
  ], 2));
256
260
  }
257
261
  });
258
- const W = { class: "radio-group" }, Z = ["for"], Ve = /* @__PURE__ */ p({
262
+ const _ = { class: "radio-group" }, ee = ["for"], we = /* @__PURE__ */ b({
259
263
  __name: "check-group",
260
264
  props: {
261
265
  modelValue: {
@@ -267,11 +271,11 @@ const W = { class: "radio-group" }, Z = ["for"], Ve = /* @__PURE__ */ p({
267
271
  },
268
272
  name: {
269
273
  type: String,
270
- default: () => m()
274
+ default: () => y()
271
275
  },
272
276
  id: {
273
277
  type: String,
274
- default: () => m()
278
+ default: () => y()
275
279
  },
276
280
  label: {
277
281
  type: String,
@@ -296,25 +300,25 @@ const W = { class: "radio-group" }, Z = ["for"], Ve = /* @__PURE__ */ p({
296
300
  },
297
301
  emits: ["change", "update:modelValue"],
298
302
  setup(e, { emit: r }) {
299
- const a = e, n = S([]);
300
- return $(() => a.modelValue, (d, l) => {
301
- n.value = a.options.map(
302
- (t) => t.value ? a.modelValue.some((o) => o["value "] === t.value) : a.modelValue.some((o) => o === t)
303
+ const t = e, a = k([]);
304
+ return S(() => t.modelValue, (n, d) => {
305
+ a.value = t.options.map(
306
+ (l) => l.value ? t.modelValue.some((o) => o["value "] === l.value) : t.modelValue.some((o) => o === l)
303
307
  );
304
- }, { immediate: !0 }), $(n, (d, l) => {
305
- const t = d.reduce((o, c, b) => {
306
- const O = c && a.options[b] ? [a.options[b] || a.options[b]] : [];
307
- return [...o, ...O];
308
+ }, { 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];
308
312
  }, []);
309
- r("update:modelValue", t);
310
- }, { deep: !0 }), L(() => {
311
- }), (d, l) => {
312
- const t = V("form-input");
313
- return u(), s("div", W, [
314
- (u(!0), s(B, null, x(e.options, (o, c) => (u(), w(t, {
313
+ r("update:modelValue", l);
314
+ }, { deep: !0 }), N(() => {
315
+ }), (n, d) => {
316
+ const l = $("form-input");
317
+ return u(), s("div", _, [
318
+ (u(!0), s(B, null, w(e.options, (o, c) => (u(), O(l, {
315
319
  key: c,
316
- modelValue: y(n)[c],
317
- "onUpdate:modelValue": (b) => y(n)[c] = b,
320
+ modelValue: p(a)[c],
321
+ "onUpdate:modelValue": (f) => p(a)[c] = f,
318
322
  type: "checkbox",
319
323
  name: e.name,
320
324
  id: `${e.id}-${c}`,
@@ -324,14 +328,14 @@ const W = { class: "radio-group" }, Z = ["for"], Ve = /* @__PURE__ */ p({
324
328
  required: e.required
325
329
  }, null, 8, ["modelValue", "onUpdate:modelValue", "name", "id", "label", "disabled", "read-only", "required"]))), 128)),
326
330
  i("label", { for: e.id }, [
327
- f(d.$slots, "label", {}, () => [
328
- q(h(e.label), 1)
331
+ m(n.$slots, "label", {}, () => [
332
+ C(v(e.label), 1)
329
333
  ])
330
- ], 8, Z)
334
+ ], 8, ee)
331
335
  ]);
332
336
  };
333
337
  }
334
- }), _ = { class: "radio-group" }, ee = ["for"], Be = /* @__PURE__ */ p({
338
+ }), te = { class: "radio-group" }, le = ["for"], qe = /* @__PURE__ */ b({
335
339
  __name: "radio-group",
336
340
  props: {
337
341
  modelValue: {
@@ -343,11 +347,11 @@ const W = { class: "radio-group" }, Z = ["for"], Ve = /* @__PURE__ */ p({
343
347
  },
344
348
  name: {
345
349
  type: String,
346
- default: () => m()
350
+ default: () => y()
347
351
  },
348
352
  id: {
349
353
  type: String,
350
- default: () => m()
354
+ default: () => y()
351
355
  },
352
356
  label: {
353
357
  type: String,
@@ -372,16 +376,16 @@ const W = { class: "radio-group" }, Z = ["for"], Ve = /* @__PURE__ */ p({
372
376
  },
373
377
  emits: ["change", "update:modelValue"],
374
378
  setup(e, { emit: r }) {
375
- const a = e;
376
- S(a.options.map((d) => d.value === a.modelValue));
377
- function n(d) {
378
- r("update:modelValue", d);
379
+ const t = e;
380
+ k(t.options.map((n) => n.value === t.modelValue));
381
+ function a(n) {
382
+ r("update:modelValue", n);
379
383
  }
380
- return L(() => {
381
- }), (d, l) => {
382
- const t = V("form-input");
383
- return u(), s("div", _, [
384
- (u(!0), s(B, null, x(e.options, (o, c) => (u(), w(t, {
384
+ return N(() => {
385
+ }), (n, d) => {
386
+ const l = $("form-input");
387
+ return u(), s("div", te, [
388
+ (u(!0), s(B, null, w(e.options, (o, c) => (u(), O(l, {
385
389
  key: c,
386
390
  type: "radio",
387
391
  name: e.name,
@@ -392,20 +396,20 @@ const W = { class: "radio-group" }, Z = ["for"], Ve = /* @__PURE__ */ p({
392
396
  disabled: e.disabled,
393
397
  "read-only": e.readOnly,
394
398
  required: e.required,
395
- onChange: (b) => n(o)
399
+ onChange: (f) => a(o)
396
400
  }, null, 8, ["name", "id", "value", "label", "checked", "disabled", "read-only", "required", "onChange"]))), 128)),
397
401
  i("label", { for: e.id }, [
398
- f(d.$slots, "label", {}, () => [
399
- q(h(e.label), 1)
402
+ m(n.$slots, "label", {}, () => [
403
+ C(v(e.label), 1)
400
404
  ])
401
- ], 8, ee)
405
+ ], 8, le)
402
406
  ]);
403
407
  };
404
408
  }
405
- }), te = { class: "input input-dropdown" }, le = { class: "dropdown" }, ae = {
409
+ }), ae = { class: "input input-dropdown" }, ne = { class: "dropdown" }, de = {
406
410
  class: "btn-group",
407
411
  role: "group"
408
- }, ne = ["id", "disabled"], de = ["aria-labelledby"], oe = ["onClick"], ie = ["for"], xe = /* @__PURE__ */ p({
412
+ }, oe = ["id", "disabled"], ie = ["aria-labelledby"], ue = ["onClick"], re = ["for"], Oe = /* @__PURE__ */ b({
409
413
  __name: "input-dropdown",
410
414
  props: {
411
415
  modelValue: {
@@ -414,11 +418,11 @@ const W = { class: "radio-group" }, Z = ["for"], Ve = /* @__PURE__ */ p({
414
418
  },
415
419
  name: {
416
420
  type: String,
417
- default: () => m()
421
+ default: () => y()
418
422
  },
419
423
  id: {
420
424
  type: String,
421
- default: () => m()
425
+ default: () => y()
422
426
  },
423
427
  label: {
424
428
  type: String,
@@ -463,31 +467,31 @@ const W = { class: "radio-group" }, Z = ["for"], Ve = /* @__PURE__ */ p({
463
467
  },
464
468
  emits: ["update:modelValue"],
465
469
  setup(e, { emit: r }) {
466
- const a = e;
467
- g({
470
+ const t = e;
471
+ h({
468
472
  get() {
469
- return a.modelValue;
473
+ return t.modelValue;
470
474
  },
471
- set(t) {
472
- r("update:modelValue", t);
475
+ set(l) {
476
+ r("update:modelValue", l);
473
477
  }
474
478
  });
475
- function n(t) {
476
- r("update:modelValue", t);
479
+ function a(l) {
480
+ r("update:modelValue", l);
477
481
  }
478
- const d = g(() => [
482
+ const n = h(() => [
479
483
  {
480
484
  text: "Please select"
481
485
  },
482
- ...a.options.map(
483
- (t) => typeof t == "string" ? { value: t, text: t } : t
486
+ ...t.options.map(
487
+ (l) => typeof l == "string" ? { value: l, text: l } : l
484
488
  )
485
- ]), l = g(() => [...a.options].find((t) => JSON.stringify(t.value) === JSON.stringify(a.modelValue)));
486
- return (t, o) => (u(), s("div", te, [
487
- i("div", le, [
488
- i("div", ae, [
489
+ ]), 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, [
489
493
  i("button", {
490
- class: v(["btn dropdown-toggle", {
494
+ class: g(["btn dropdown-toggle", {
491
495
  [`btn-${e.variant}`]: e.variant,
492
496
  [`btn-${e.color}`]: e.color,
493
497
  [`btn-${e.disabled}`]: e.disabled,
@@ -498,30 +502,30 @@ const W = { class: "radio-group" }, Z = ["for"], Ve = /* @__PURE__ */ p({
498
502
  "data-bs-toggle": "dropdown",
499
503
  "aria-expanded": "false",
500
504
  disabled: e.disabled
501
- }, h(y(l) ? y(l).text : e.placeholder), 11, ne),
505
+ }, v(p(d) ? p(d).text : e.placeholder), 11, oe),
502
506
  i("ul", {
503
507
  class: "dropdown-menu",
504
508
  "aria-labelledby": e.id
505
509
  }, [
506
- (u(!0), s(B, null, x(y(d), (c, b) => (u(), s("li", { key: b }, [
507
- f(t.$slots, "option", {}, () => [
510
+ (u(!0), s(B, null, w(p(n), (c, f) => (u(), s("li", { key: f }, [
511
+ m(l.$slots, "option", {}, () => [
508
512
  i("a", {
509
513
  class: "dropdown-item",
510
- onClick: z((O) => n(c.value), ["prevent"])
511
- }, h(c.text), 9, oe)
514
+ onClick: z((V) => a(c.value), ["prevent"])
515
+ }, v(c.text), 9, ue)
512
516
  ])
513
517
  ]))), 128))
514
- ], 8, de)
518
+ ], 8, ie)
515
519
  ])
516
520
  ]),
517
521
  i("label", { for: e.id }, [
518
- f(t.$slots, "label", {}, () => [
519
- q(h(e.label), 1)
522
+ m(l.$slots, "label", {}, () => [
523
+ C(v(e.label), 1)
520
524
  ])
521
- ], 8, ie)
525
+ ], 8, re)
522
526
  ]));
523
527
  }
524
- }), ue = ["id", "name", "multiple", "accept"], re = { class: "form-input__input-group input-group" }, se = ["value", "id", "name"], ce = ["for"], fe = ["for", "innerHTML"], ke = /* @__PURE__ */ p({
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({
525
529
  __name: "file-input",
526
530
  props: {
527
531
  modelValue: {
@@ -530,11 +534,11 @@ const W = { class: "radio-group" }, Z = ["for"], Ve = /* @__PURE__ */ p({
530
534
  },
531
535
  name: {
532
536
  type: String,
533
- default: () => m()
537
+ default: () => y()
534
538
  },
535
539
  id: {
536
540
  type: String,
537
- default: () => m()
541
+ default: () => y()
538
542
  },
539
543
  label: {
540
544
  type: String,
@@ -574,73 +578,76 @@ const W = { class: "radio-group" }, Z = ["for"], Ve = /* @__PURE__ */ p({
574
578
  },
575
579
  emits: ["update:modelValue"],
576
580
  setup(e, { emit: r }) {
577
- function a(l) {
578
- const t = l.target && l.target.files;
579
- t && (n.splice(0, n.length), Array.from(t).forEach((o) => {
580
- n.push(o);
581
+ function t(d) {
582
+ const l = d.target && d.target.files;
583
+ l && (a.splice(0, a.length), Array.from(l).forEach((o) => {
584
+ a.push(o);
581
585
  }));
582
586
  }
583
- const n = I([]), d = g(() => n && n.map((l) => l.name));
584
- return g(() => n.map((l) => URL.createObjectURL(l))), $(() => n, (l, t) => {
585
- console.log("file input", l), r("update:modelValue", l);
586
- }, { deep: !0 }), (l, t) => (u(), s("div", {
587
- class: v(["form-input file-input", "file-input--primary"])
587
+ const a = D([]), n = h(() => a && a.map((d) => d.name));
588
+ 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"])
588
592
  }, [
589
593
  i("input", {
590
594
  type: "file",
591
595
  id: e.id,
592
596
  name: e.name,
593
597
  class: "d-none",
594
- onChange: a,
598
+ onChange: t,
595
599
  multiple: e.multiple,
596
600
  accept: e.accept
597
- }, null, 40, ue),
598
- i("div", re, [
599
- f(l.$slots, "input-prepend"),
601
+ }, null, 40, se),
602
+ i("div", ce, [
603
+ m(d.$slots, "input-prepend"),
600
604
  i("input", {
601
605
  type: "text",
602
- value: y(d),
606
+ value: p(n),
603
607
  id: e.id,
604
608
  name: e.name,
605
609
  class: "form-control"
606
- }, null, 8, se),
607
- f(l.$slots, "input-append", {}, () => [
610
+ }, null, 8, fe),
611
+ m(d.$slots, "input-append", {}, () => [
608
612
  i("label", {
609
613
  for: e.id,
610
614
  class: "btn btn-outline-dark"
611
- }, " Select Image ", 8, ce)
615
+ }, " Select Image ", 8, me)
612
616
  ])
613
617
  ]),
614
- f(l.$slots, "label", {}, () => [
618
+ m(d.$slots, "label", {}, () => [
615
619
  i("label", {
616
620
  for: e.id,
617
621
  class: "form-input__label",
618
622
  innerHTML: `${e.label}${e.required ? " *" : ""}`
619
- }, null, 8, fe)
623
+ }, null, 8, ye)
620
624
  ])
621
625
  ]));
622
626
  }
623
- }), me = { class: "media-upload" }, ye = ["src"], pe = ["for"];
624
- async function be(e) {
627
+ }), pe = { class: "media-upload" }, be = ["src"], ge = ["onClick"], he = ["for"];
628
+ async function ve(e) {
625
629
  return await new Promise((r) => {
626
- let a = new FileReader();
627
- a.onload = () => r(a.result), a.readAsDataURL(e);
630
+ let t = new FileReader();
631
+ t.onload = () => r(t.result), t.readAsDataURL(e);
628
632
  });
629
633
  }
630
- const we = /* @__PURE__ */ p({
634
+ const Me = /* @__PURE__ */ b({
631
635
  __name: "media-upload",
632
636
  props: {
633
637
  modelValue: {
634
638
  type: Array,
635
639
  default: []
636
640
  },
641
+ src: {
642
+ type: String
643
+ },
637
644
  name: {
638
645
  type: String,
639
- default: () => m()
646
+ default: () => y()
640
647
  },
641
648
  id: {
642
649
  type: String,
643
- default: () => m()
650
+ default: () => y()
644
651
  },
645
652
  label: {
646
653
  type: String,
@@ -679,32 +686,44 @@ const we = /* @__PURE__ */ p({
679
686
  default: "image/*"
680
687
  }
681
688
  },
682
- emits: ["update:modelValue"],
689
+ emits: ["update:modelValue", "update:src"],
683
690
  setup(e, { emit: r }) {
684
- const a = S([]), n = S([]);
685
- return $(() => a, async (d, l) => {
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) => {
686
693
  n.value = await Promise.all(
687
- d.value.map(async (t) => ({
688
- src: await be(t),
689
- type: t.type
694
+ o.value.map(async (f) => ({
695
+ src: await ve(f),
696
+ type: f.type
690
697
  }))
691
698
  );
692
- }, { deep: !0 }), $(() => n, async (d, l) => {
693
- r("update:modelValue", n.value);
694
- }, { deep: !0 }), (d, l) => {
695
- const t = V("file-input");
696
- return u(), s("div", me, [
697
- (u(!0), s(B, null, x(n.value, (o) => (u(), s("div", {
698
- key: o.src
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);
702
+ }, { deep: !0 });
703
+ function l(o) {
704
+ a.value.splice(o, 1);
705
+ }
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,
711
+ class: "media-upload__thumbnail"
699
712
  }, [
700
713
  i("img", {
701
- src: o.src,
702
- class: "img-fluid rounded"
703
- }, null, 8, ye)
714
+ src: x.src,
715
+ class: "img-thumbnail rounded"
716
+ }, null, 8, be),
717
+ i("button", {
718
+ onClick: z(($e) => l(I), ["prevent"]),
719
+ class: "btn btn--close"
720
+ }, [
721
+ L(f, { symbol: "x" })
722
+ ], 8, ge)
704
723
  ]))), 128)),
705
- T(t, {
724
+ L(V, {
706
725
  modelValue: a.value,
707
- "onUpdate:modelValue": l[0] || (l[0] = (o) => a.value = o),
726
+ "onUpdate:modelValue": c[0] || (c[0] = (x) => a.value = x),
708
727
  id: e.id,
709
728
  name: e.name,
710
729
  accept: e.accept,
@@ -713,19 +732,19 @@ const we = /* @__PURE__ */ p({
713
732
  i("label", {
714
733
  for: e.id,
715
734
  class: "btn btn-outline-dark"
716
- }, " Select Image ", 8, pe)
735
+ }, " Select Image ", 8, he)
717
736
  ]);
718
737
  };
719
738
  }
720
739
  });
721
740
  export {
722
- $e as BaseButton,
723
- Ve as CheckGroup,
724
- ke as FileInput,
725
- Se as FormInput,
726
- xe as InputDropdown,
727
- ve as LoadingSpinner,
728
- we as MediaUpload,
729
- Be as RadioGroup,
730
- he as SvgIcon
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
731
750
  };
@@ -1 +1 @@
1
- (function(c,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(c=typeof globalThis<"u"?globalThis:c||self,e(c.AblokComponents={},c.Vue))})(this,function(c,e){"use strict";const p={class:"icon",preserveAspectRatio:"xMaxYMin"},y=["xlink:href"],g=e.defineComponent({__name:"svg-icon",props:{basePath:{type:String,default:"/symbol-defs.svg"},prefix:{type:String,default:"icon-"},symbol:{type:String,default:""},size:{type:String,default:"default"}},setup(t){return(r,a)=>(e.openBlock(),e.createElementBlock("i",{class:e.normalizeClass(["svg-icon",{[`svg-icon--${t.size}`]:t.size}])},[(e.openBlock(),e.createElementBlock("svg",p,[e.createElementVNode("use",{"xlink:href":`${t.basePath}#${t.prefix}${t.symbol}`,"xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0",y:"0"},null,8,y)]))],2))}}),le="",b={class:"loading-spinner d-block"},h={class:"loading-spinner__animation"},B={class:"d-block",version:"1.1",id:"L9",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 100 100","enable-background":"new 0 0 0 0","xml:space":"preserve"},k=["fill"],S=[e.createElementVNode("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"1s",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"},null,-1)],$=e.defineComponent({__name:"loading-spinner",props:{color:{type:String,default:"#fff"}},setup(t){return(r,a)=>(e.openBlock(),e.createElementBlock("span",b,[e.createElementVNode("span",h,[(e.openBlock(),e.createElementBlock("svg",B,[e.createElementVNode("path",{fill:t.color,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"},S,8,k)]))]),e.renderSlot(r.$slots,"default")]))}}),ae="",V=["type","disabled","href","to"],E=e.defineComponent({__name:"base-button",props:{type:null,caption:null,variant:null,size:null,icon:null,href:null,to:null,disabled:{type:Boolean},pending:{type:Boolean},outlined:{type:Boolean},rounded:{type:Boolean},fab:{type:Boolean}},setup(t){const r=t,a=e.computed(()=>r.caption&&!r.fab);return(o,d)=>{const n=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("button",{type:t.type,disabled:t.disabled,href:t.href,to:t.to,class:e.normalizeClass(["base-button btn btn-primary",{disabled:t.disabled,pending:t.pending,rounded:t.rounded,outlined:t.outlined,fab:t.fab,"x-large":t.size==="x-large",large:t.size==="large",small:t.size==="small","x-small":t.size==="x-small"}])},[e.renderSlot(o.$slots,"default",{},()=>[t.icon?(e.openBlock(),e.createBlock(n,{key:0,id:t.icon,class:"base-button__caption"},null,8,["id"])):e.createCommentVNode("",!0),e.unref(a)?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["base-button__caption",{"icon-padding":t.icon}])},e.toDisplayString(t.caption),3)):e.createCommentVNode("",!0)])],10,V)}}}),oe="";function s(){return(new Date().valueOf()+Math.random()).toString(36)}const w={class:"input-group form-input__input-group"},N=["type","id","name","placeholder","pattern","disabled","read-only","required","maxlength","checked","aria-label"],x={key:0,class:"form-input__color-swatch"},C=["name","id","disabled","read-only","required","aria-label"],q=["for","innerHTML"],M=e.defineComponent({__name:"form-input",props:{modelValue:{type:[String,Number,Boolean],default:""},type:{type:String,default:"text"},name:{type:String,default:()=>s()},id:{type:String,default:()=>s()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},maxlength:{type:Number},pattern:{type:String,default:null},checked:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:r}){const a=t,o=e.computed({get(){return a.modelValue},set(d){r("update:modelValue",d)}});return(d,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["form-input",`form-input--${t.type}`])},[e.createElementVNode("div",w,[e.renderSlot(d.$slots,"input-prepend"),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":n[0]||(n[0]=l=>e.isRef(o)?o.value=l:null),type:t.type==="color"?"text":t.type,id:t.id,name:t.name,placeholder:t.placeholder,pattern:t.pattern,disabled:t.disabled,"read-only":t.readOnly,required:t.required,maxlength:t.maxlength,checked:t.checked,class:"form-control","aria-label":t.label},null,8,N),[[e.vModelDynamic,e.unref(o)]]),e.renderSlot(d.$slots,"input-append",{},()=>[t.type==="color"?(e.openBlock(),e.createElementBlock("span",x,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":n[1]||(n[1]=l=>e.isRef(o)?o.value=l:null),type:"color",name:`${t.name}-color`,id:`${t.id}-color`,disabled:t.disabled,"read-only":t.readOnly,required:t.required,class:"form-control","aria-label":t.label},null,8,C),[[e.vModelText,e.unref(o)]])])):e.createCommentVNode("",!0)])]),e.renderSlot(d.$slots,"label",{},()=>[e.createElementVNode("label",{for:t.id,class:"form-input__label",innerHTML:`${t.label}${t.required?" *":""}`},null,8,q)])],2))}}),de="",O={class:"radio-group"},z=["for"],L=e.defineComponent({__name:"check-group",props:{modelValue:{default:[]},options:{type:Array,default:[]},name:{type:String,default:()=>s()},id:{type:String,default:()=>s()},label:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1}},emits:["change","update:modelValue"],setup(t,{emit:r}){const a=t,o=e.ref([]);return e.watch(()=>a.modelValue,(d,n)=>{o.value=a.options.map(l=>l.value?a.modelValue.some(i=>i["value "]===l.value):a.modelValue.some(i=>i===l))},{immediate:!0}),e.watch(o,(d,n)=>{const l=d.reduce((i,m,u)=>{const f=m&&a.options[u]?[a.options[u]||a.options[u]]:[];return[...i,...f]},[]);r("update:modelValue",l)},{deep:!0}),e.onBeforeMount(()=>{}),(d,n)=>{const l=e.resolveComponent("form-input");return e.openBlock(),e.createElementBlock("div",O,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,(i,m)=>(e.openBlock(),e.createBlock(l,{key:m,modelValue:e.unref(o)[m],"onUpdate:modelValue":u=>e.unref(o)[m]=u,type:"checkbox",name:t.name,id:`${t.id}-${m}`,label:`${i.text||i}${t.required?" *":""}`,disabled:t.disabled,"read-only":t.readOnly,required:t.required},null,8,["modelValue","onUpdate:modelValue","name","id","label","disabled","read-only","required"]))),128)),e.createElementVNode("label",{for:t.id},[e.renderSlot(d.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)])],8,z)])}}}),T={class:"radio-group"},D=["for"],U=e.defineComponent({__name:"radio-group",props:{modelValue:{default:!1},options:{type:Array,default:[]},name:{type:String,default:()=>s()},id:{type:String,default:()=>s()},label:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1}},emits:["change","update:modelValue"],setup(t,{emit:r}){const a=t;e.ref(a.options.map(d=>d.value===a.modelValue));function o(d){r("update:modelValue",d)}return e.onBeforeMount(()=>{}),(d,n)=>{const l=e.resolveComponent("form-input");return e.openBlock(),e.createElementBlock("div",T,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,(i,m)=>(e.openBlock(),e.createBlock(l,{key:m,type:"radio",name:t.name,id:`${t.id}-${m}`,value:i.value||i,label:`${i.text||i}${t.required?" *":""}`,checked:i.value?i.value===t.modelValue:i===t.modelValue,disabled:t.disabled,"read-only":t.readOnly,required:t.required,onChange:u=>o(i)},null,8,["name","id","value","label","checked","disabled","read-only","required","onChange"]))),128)),e.createElementVNode("label",{for:t.id},[e.renderSlot(d.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)])],8,D)])}}}),A={class:"input input-dropdown"},I={class:"dropdown"},F={class:"btn-group",role:"group"},R=["id","disabled"],P=["aria-labelledby"],j=["onClick"],H=["for"],G=e.defineComponent({__name:"input-dropdown",props:{modelValue:{type:[String,Number,Boolean,Object],default:""},name:{type:String,default:()=>s()},id:{type:String,default:()=>s()},label:{type:String,default:""},placeholder:{type:String,default:"Please select"},options:{type:Array,default:[]},variant:{type:String,default:""},color:{type:String,default:""},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},required:{type:Boolean,default:!1},outline:{type:Boolean,default:!0},resetOption:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t,{emit:r}){const a=t;e.computed({get(){return a.modelValue},set(l){r("update:modelValue",l)}});function o(l){r("update:modelValue",l)}const d=e.computed(()=>[{text:"Please select"},...a.options.map(l=>typeof l=="string"?{value:l,text:l}:l)]),n=e.computed(()=>[...a.options].find(l=>JSON.stringify(l.value)===JSON.stringify(a.modelValue)));return(l,i)=>(e.openBlock(),e.createElementBlock("div",A,[e.createElementVNode("div",I,[e.createElementVNode("div",F,[e.createElementVNode("button",{class:e.normalizeClass(["btn dropdown-toggle",{[`btn-${t.variant}`]:t.variant,[`btn-${t.color}`]:t.color,[`btn-${t.disabled}`]:t.disabled,[`btn-outline-${t.color||"dark"}`]:t.outline}]),type:"button",id:t.id,"data-bs-toggle":"dropdown","aria-expanded":"false",disabled:t.disabled},e.toDisplayString(e.unref(n)?e.unref(n).text:t.placeholder),11,R),e.createElementVNode("ul",{class:"dropdown-menu","aria-labelledby":t.id},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),(m,u)=>(e.openBlock(),e.createElementBlock("li",{key:u},[e.renderSlot(l.$slots,"option",{},()=>[e.createElementVNode("a",{class:"dropdown-item",onClick:e.withModifiers(f=>o(m.value),["prevent"])},e.toDisplayString(m.text),9,j)])]))),128))],8,P)])]),e.createElementVNode("label",{for:t.id},[e.renderSlot(l.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)])],8,H)]))}}),J=["id","name","multiple","accept"],X={class:"form-input__input-group input-group"},Y=["value","id","name"],K=["for"],Q=["for","innerHTML"],W=e.defineComponent({__name:"file-input",props:{modelValue:{type:Array,default:[]},name:{type:String,default:()=>s()},id:{type:String,default:()=>s()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},pattern:{type:String,default:null},multiple:{type:Boolean,default:!1},accept:{type:String}},emits:["update:modelValue"],setup(t,{emit:r}){function a(n){const l=n.target&&n.target.files;l&&(o.splice(0,o.length),Array.from(l).forEach(i=>{o.push(i)}))}const o=e.reactive([]),d=e.computed(()=>o&&o.map(n=>n.name));return e.computed(()=>o.map(n=>URL.createObjectURL(n))),e.watch(()=>o,(n,l)=>{console.log("file input",n),r("update:modelValue",n)},{deep:!0}),(n,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["form-input file-input","file-input--primary"])},[e.createElementVNode("input",{type:"file",id:t.id,name:t.name,class:"d-none",onChange:a,multiple:t.multiple,accept:t.accept},null,40,J),e.createElementVNode("div",X,[e.renderSlot(n.$slots,"input-prepend"),e.createElementVNode("input",{type:"text",value:e.unref(d),id:t.id,name:t.name,class:"form-control"},null,8,Y),e.renderSlot(n.$slots,"input-append",{},()=>[e.createElementVNode("label",{for:t.id,class:"btn btn-outline-dark"}," Select Image ",8,K)])]),e.renderSlot(n.$slots,"label",{},()=>[e.createElementVNode("label",{for:t.id,class:"form-input__label",innerHTML:`${t.label}${t.required?" *":""}`},null,8,Q)])]))}}),Z={class:"media-upload"},_=["src"],v=["for"];async function ee(t){return await new Promise(r=>{let a=new FileReader;a.onload=()=>r(a.result),a.readAsDataURL(t)})}const te=e.defineComponent({__name:"media-upload",props:{modelValue:{type:Array,default:[]},name:{type:String,default:()=>s()},id:{type:String,default:()=>s()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},pattern:{type:String,default:null},multiple:{type:Boolean,default:!1},accept:{type:String,default:"image/*"}},emits:["update:modelValue"],setup(t,{emit:r}){const a=e.ref([]),o=e.ref([]);return e.watch(()=>a,async(d,n)=>{o.value=await Promise.all(d.value.map(async l=>({src:await ee(l),type:l.type})))},{deep:!0}),e.watch(()=>o,async(d,n)=>{r("update:modelValue",o.value)},{deep:!0}),(d,n)=>{const l=e.resolveComponent("file-input");return e.openBlock(),e.createElementBlock("div",Z,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,i=>(e.openBlock(),e.createElementBlock("div",{key:i.src},[e.createElementVNode("img",{src:i.src,class:"img-fluid rounded"},null,8,_)]))),128)),e.createVNode(l,{modelValue:a.value,"onUpdate:modelValue":n[0]||(n[0]=i=>a.value=i),id:t.id,name:t.name,accept:t.accept,class:"d-none"},null,8,["modelValue","id","name","accept"]),e.createElementVNode("label",{for:t.id,class:"btn btn-outline-dark"}," Select Image ",8,v)])}}});c.BaseButton=E,c.CheckGroup=L,c.FileInput=W,c.FormInput=M,c.InputDropdown=G,c.LoadingSpinner=$,c.MediaUpload=te,c.RadioGroup=U,c.SvgIcon=g,Object.defineProperties(c,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(s,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(s=typeof globalThis<"u"?globalThis:s||self,e(s.AblokComponents={},s.Vue))})(this,function(s,e){"use strict";const y={class:"icon",preserveAspectRatio:"xMaxYMin"},b=["xlink:href"],g=e.defineComponent({__name:"svg-icon",props:{basePath:{type:String,default:"/symbol-defs.svg"},prefix:{type:String,default:"icon-"},symbol:{type:String,default:""},size:{type:String,default:"default"}},setup(t){return(r,l)=>(e.openBlock(),e.createElementBlock("i",{class:e.normalizeClass(["svg-icon",{[`svg-icon--${t.size}`]:t.size}])},[(e.openBlock(),e.createElementBlock("svg",y,[e.createElementVNode("use",{"xlink:href":`${t.basePath}#${t.prefix}${t.symbol}`,"xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0",y:"0"},null,8,b)]))],2))}}),oe="",h={class:"loading-spinner d-block"},k={class:"loading-spinner__animation"},B={class:"d-block",version:"1.1",id:"L9",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 100 100","enable-background":"new 0 0 0 0","xml:space":"preserve"},$=["fill"],S=[e.createElementVNode("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"1s",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"},null,-1)],V=e.defineComponent({__name:"loading-spinner",props:{color:{type:String,default:"#fff"}},setup(t){return(r,l)=>(e.openBlock(),e.createElementBlock("span",h,[e.createElementVNode("span",k,[(e.openBlock(),e.createElementBlock("svg",B,[e.createElementVNode("path",{fill:t.color,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"},S,8,$)]))]),e.renderSlot(r.$slots,"default")]))}}),ie="",E=["type","disabled","href","to"],w=e.defineComponent({__name:"base-button",props:{type:null,caption:null,variant:null,size:null,icon:null,href:null,to:null,disabled:{type:Boolean},pending:{type:Boolean},outlined:{type:Boolean},rounded:{type:Boolean},fab:{type:Boolean}},setup(t){const r=t,l=e.computed(()=>r.caption&&!r.fab);return(a,o)=>{const d=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("button",{type:t.type,disabled:t.disabled,href:t.href,to:t.to,class:e.normalizeClass(["base-button btn btn-primary",{disabled:t.disabled,pending:t.pending,rounded:t.rounded,outlined:t.outlined,fab:t.fab,"x-large":t.size==="x-large",large:t.size==="large",small:t.size==="small","x-small":t.size==="x-small"}])},[e.renderSlot(a.$slots,"default",{},()=>[t.icon?(e.openBlock(),e.createBlock(d,{key:0,id:t.icon,class:"base-button__caption"},null,8,["id"])):e.createCommentVNode("",!0),e.unref(l)?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["base-button__caption",{"icon-padding":t.icon}])},e.toDisplayString(t.caption),3)):e.createCommentVNode("",!0)])],10,E)}}}),re="";function u(){return(new Date().valueOf()+Math.random()).toString(36)}const N={class:"input-group form-input__input-group"},C=["type","id","name","placeholder","pattern","disabled","read-only","required","maxlength","checked","aria-label"],x={key:0,class:"form-input__color-swatch"},q=["name","id","disabled","read-only","required","aria-label"],M=["for","innerHTML"],O=e.defineComponent({__name:"form-input",props:{modelValue:{type:[String,Number,Boolean],default:""},type:{type:String,default:"text"},name:{type:String,default:()=>u()},id:{type:String,default:()=>u()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},maxlength:{type:Number},pattern:{type:String,default:null},checked:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:r}){const l=t,a=e.computed({get(){return l.modelValue},set(o){r("update:modelValue",o)}});return(o,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["form-input",`form-input--${t.type}`])},[e.createElementVNode("div",N,[e.renderSlot(o.$slots,"input-prepend"),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":d[0]||(d[0]=n=>e.isRef(a)?a.value=n:null),type:t.type==="color"?"text":t.type,id:t.id,name:t.name,placeholder:t.placeholder,pattern:t.pattern,disabled:t.disabled,"read-only":t.readOnly,required:t.required,maxlength:t.maxlength,checked:t.checked,class:e.normalizeClass(["form-control",{"form-check-input":t.type==="checkbox"}]),"aria-label":t.label},null,10,C),[[e.vModelDynamic,e.unref(a)]]),e.renderSlot(o.$slots,"input-append",{},()=>[t.type==="color"?(e.openBlock(),e.createElementBlock("span",x,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":d[1]||(d[1]=n=>e.isRef(a)?a.value=n:null),type:"color",name:`${t.name}-color`,id:`${t.id}-color`,disabled:t.disabled,"read-only":t.readOnly,required:t.required,class:"form-control","aria-label":t.label},null,8,q),[[e.vModelText,e.unref(a)]])])):e.createCommentVNode("",!0)])]),e.renderSlot(o.$slots,"label",{},()=>[e.createElementVNode("label",{for:t.id,class:e.normalizeClass(["form-input__label",{"form-check-label":t.type==="checkbox"}]),innerHTML:`${t.label}${t.required?" *":""}`},null,10,M)])],2))}}),ce="",z={class:"radio-group"},D=["for"],L=e.defineComponent({__name:"check-group",props:{modelValue:{default:[]},options:{type:Array,default:[]},name:{type:String,default:()=>u()},id:{type:String,default:()=>u()},label:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1}},emits:["change","update:modelValue"],setup(t,{emit:r}){const l=t,a=e.ref([]);return e.watch(()=>l.modelValue,(o,d)=>{a.value=l.options.map(n=>n.value?l.modelValue.some(i=>i["value "]===n.value):l.modelValue.some(i=>i===n))},{immediate:!0}),e.watch(a,(o,d)=>{const n=o.reduce((i,c,m)=>{const f=c&&l.options[m]?[l.options[m]||l.options[m]]:[];return[...i,...f]},[]);r("update:modelValue",n)},{deep:!0}),e.onBeforeMount(()=>{}),(o,d)=>{const n=e.resolveComponent("form-input");return e.openBlock(),e.createElementBlock("div",z,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,(i,c)=>(e.openBlock(),e.createBlock(n,{key:c,modelValue:e.unref(a)[c],"onUpdate:modelValue":m=>e.unref(a)[c]=m,type:"checkbox",name:t.name,id:`${t.id}-${c}`,label:`${i.text||i}${t.required?" *":""}`,disabled:t.disabled,"read-only":t.readOnly,required:t.required},null,8,["modelValue","onUpdate:modelValue","name","id","label","disabled","read-only","required"]))),128)),e.createElementVNode("label",{for:t.id},[e.renderSlot(o.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)])],8,D)])}}}),T={class:"radio-group"},U=["for"],A=e.defineComponent({__name:"radio-group",props:{modelValue:{default:!1},options:{type:Array,default:[]},name:{type:String,default:()=>u()},id:{type:String,default:()=>u()},label:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1}},emits:["change","update:modelValue"],setup(t,{emit:r}){const l=t;e.ref(l.options.map(o=>o.value===l.modelValue));function a(o){r("update:modelValue",o)}return e.onBeforeMount(()=>{}),(o,d)=>{const n=e.resolveComponent("form-input");return e.openBlock(),e.createElementBlock("div",T,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,(i,c)=>(e.openBlock(),e.createBlock(n,{key:c,type:"radio",name:t.name,id:`${t.id}-${c}`,value:i.value||i,label:`${i.text||i}${t.required?" *":""}`,checked:i.value?i.value===t.modelValue:i===t.modelValue,disabled:t.disabled,"read-only":t.readOnly,required:t.required,onChange:m=>a(i)},null,8,["name","id","value","label","checked","disabled","read-only","required","onChange"]))),128)),e.createElementVNode("label",{for:t.id},[e.renderSlot(o.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)])],8,U)])}}}),F={class:"input input-dropdown"},I={class:"dropdown"},R={class:"btn-group",role:"group"},P=["id","disabled"],j=["aria-labelledby"],H=["onClick"],G=["for"],J=e.defineComponent({__name:"input-dropdown",props:{modelValue:{type:[String,Number,Boolean,Object],default:""},name:{type:String,default:()=>u()},id:{type:String,default:()=>u()},label:{type:String,default:""},placeholder:{type:String,default:"Please select"},options:{type:Array,default:[]},variant:{type:String,default:""},color:{type:String,default:""},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},required:{type:Boolean,default:!1},outline:{type:Boolean,default:!0},resetOption:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t,{emit:r}){const l=t;e.computed({get(){return l.modelValue},set(n){r("update:modelValue",n)}});function a(n){r("update:modelValue",n)}const o=e.computed(()=>[{text:"Please select"},...l.options.map(n=>typeof n=="string"?{value:n,text:n}:n)]),d=e.computed(()=>[...l.options].find(n=>JSON.stringify(n.value)===JSON.stringify(l.modelValue)));return(n,i)=>(e.openBlock(),e.createElementBlock("div",F,[e.createElementVNode("div",I,[e.createElementVNode("div",R,[e.createElementVNode("button",{class:e.normalizeClass(["btn dropdown-toggle",{[`btn-${t.variant}`]:t.variant,[`btn-${t.color}`]:t.color,[`btn-${t.disabled}`]:t.disabled,[`btn-outline-${t.color||"dark"}`]:t.outline}]),type:"button",id:t.id,"data-bs-toggle":"dropdown","aria-expanded":"false",disabled:t.disabled},e.toDisplayString(e.unref(d)?e.unref(d).text:t.placeholder),11,P),e.createElementVNode("ul",{class:"dropdown-menu","aria-labelledby":t.id},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o),(c,m)=>(e.openBlock(),e.createElementBlock("li",{key:m},[e.renderSlot(n.$slots,"option",{},()=>[e.createElementVNode("a",{class:"dropdown-item",onClick:e.withModifiers(f=>a(c.value),["prevent"])},e.toDisplayString(c.text),9,H)])]))),128))],8,j)])]),e.createElementVNode("label",{for:t.id},[e.renderSlot(n.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)])],8,G)]))}}),X=["id","name","multiple","accept"],Y={class:"form-input__input-group input-group"},K=["value","id","name"],Q=["for"],W=["for","innerHTML"],Z=e.defineComponent({__name:"file-input",props:{modelValue:{type:Array,default:[]},name:{type:String,default:()=>u()},id:{type:String,default:()=>u()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},pattern:{type:String,default:null},multiple:{type:Boolean,default:!1},accept:{type:String}},emits:["update:modelValue"],setup(t,{emit:r}){function l(d){const n=d.target&&d.target.files;n&&(a.splice(0,a.length),Array.from(n).forEach(i=>{a.push(i)}))}const a=e.reactive([]),o=e.computed(()=>a&&a.map(d=>d.name));return e.computed(()=>a.map(d=>URL.createObjectURL(d))),e.watch(()=>a,(d,n)=>{console.log("file input",d),r("update:modelValue",d)},{deep:!0}),(d,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["form-input file-input","file-input--primary"])},[e.createElementVNode("input",{type:"file",id:t.id,name:t.name,class:"d-none",onChange:l,multiple:t.multiple,accept:t.accept},null,40,X),e.createElementVNode("div",Y,[e.renderSlot(d.$slots,"input-prepend"),e.createElementVNode("input",{type:"text",value:e.unref(o),id:t.id,name:t.name,class:"form-control"},null,8,K),e.renderSlot(d.$slots,"input-append",{},()=>[e.createElementVNode("label",{for:t.id,class:"btn btn-outline-dark"}," Select Image ",8,Q)])]),e.renderSlot(d.$slots,"label",{},()=>[e.createElementVNode("label",{for:t.id,class:"form-input__label",innerHTML:`${t.label}${t.required?" *":""}`},null,8,W)])]))}}),_={class:"media-upload"},v=["src"],ee=["onClick"],te=["for"];async function le(t){return await new Promise(r=>{let l=new FileReader;l.onload=()=>r(l.result),l.readAsDataURL(t)})}const ne=e.defineComponent({__name:"media-upload",props:{modelValue:{type:Array,default:[]},src:{type:String},name:{type:String,default:()=>u()},id:{type:String,default:()=>u()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},pattern:{type:String,default:null},multiple:{type:Boolean,default:!1},accept:{type:String,default:"image/*"}},emits:["update:modelValue","update:src"],setup(t,{emit:r}){const l=t,a=e.ref([]),o=e.ref([]),d=e.computed(()=>l.modelValue.length?l.modelValue:l.src?[{type:"",src:l.src}]:o.value);e.watch(()=>a,async(i,c)=>{o.value=await Promise.all(i.value.map(async m=>({src:await le(m),type:m.type})))},{deep:!0}),e.watch(()=>o,async(i,c)=>{const m=l.multiple?o.value:[o.value[0]];r("update:modelValue",m),l.multiple||r("update:src",o.value[0]&&o.value[0].src)},{deep:!0});function n(i){a.value.splice(i,1)}return(i,c)=>{const m=e.resolveComponent("svg-icon"),f=e.resolveComponent("file-input");return e.openBlock(),e.createElementBlock("div",_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),(p,ae)=>(e.openBlock(),e.createElementBlock("div",{key:p.src,class:"media-upload__thumbnail"},[e.createElementVNode("img",{src:p.src,class:"img-thumbnail rounded"},null,8,v),e.createElementVNode("button",{onClick:e.withModifiers(me=>n(ae),["prevent"]),class:"btn btn--close"},[e.createVNode(m,{symbol:"x"})],8,ee)]))),128)),e.createVNode(f,{modelValue:a.value,"onUpdate:modelValue":c[0]||(c[0]=p=>a.value=p),id:t.id,name:t.name,accept:t.accept,class:"d-none"},null,8,["modelValue","id","name","accept"]),e.createElementVNode("label",{for:t.id,class:"btn btn-outline-dark"}," Select Image ",8,te)])}}}),se="";s.BaseButton=w,s.CheckGroup=L,s.FileInput=Z,s.FormInput=O,s.InputDropdown=J,s.LoadingSpinner=V,s.MediaUpload=ne,s.RadioGroup=A,s.SvgIcon=g,Object.defineProperties(s,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -7,7 +7,10 @@ declare const _default: {
7
7
  label: string;
8
8
  pattern: string;
9
9
  required: boolean;
10
- modelValue: File[][];
10
+ modelValue: {
11
+ type?: string | undefined;
12
+ src?: string | undefined;
13
+ }[];
11
14
  variant: string;
12
15
  name: string;
13
16
  id: string;
@@ -19,10 +22,28 @@ declare const _default: {
19
22
  }> & Omit<Readonly<import("vue").ExtractPropTypes<{
20
23
  modelValue: {
21
24
  type: {
22
- (arrayLength: number): File[][];
23
- (...items: File[][]): File[][];
24
- new (arrayLength: number): File[][];
25
- new (...items: File[][]): File[][];
25
+ (arrayLength: number): {
26
+ type?: string | undefined;
27
+ src?: string | undefined;
28
+ }[];
29
+ (...items: {
30
+ type?: string | undefined;
31
+ src?: string | undefined;
32
+ }[]): {
33
+ type?: string | undefined;
34
+ src?: string | undefined;
35
+ }[];
36
+ new (arrayLength: number): {
37
+ type?: string | undefined;
38
+ src?: string | undefined;
39
+ }[];
40
+ new (...items: {
41
+ type?: string | undefined;
42
+ src?: string | undefined;
43
+ }[]): {
44
+ type?: string | undefined;
45
+ src?: string | undefined;
46
+ }[];
26
47
  isArray(arg: any): arg is any[];
27
48
  readonly prototype: any[];
28
49
  from<T>(arrayLike: ArrayLike<T>): T[];
@@ -34,6 +55,9 @@ declare const _default: {
34
55
  };
35
56
  default: never[];
36
57
  };
58
+ src: {
59
+ type: StringConstructor;
60
+ };
37
61
  name: {
38
62
  type: StringConstructor;
39
63
  default: () => string;
@@ -80,6 +104,7 @@ declare const _default: {
80
104
  };
81
105
  }>> & {
82
106
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
107
+ "onUpdate:src"?: ((...args: any[]) => any) | undefined;
83
108
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "label" | "pattern" | "required" | "modelValue" | "variant" | "name" | "id" | "disabled" | "readOnly" | "placeholder" | "multiple" | "accept">;
84
109
  $attrs: {
85
110
  [x: string]: unknown;
@@ -92,15 +117,33 @@ declare const _default: {
92
117
  }>;
93
118
  $root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
94
119
  $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
95
- $emit: (event: "update:modelValue", ...args: any[]) => void;
120
+ $emit: (event: "update:modelValue" | "update:src", ...args: any[]) => void;
96
121
  $el: any;
97
122
  $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
98
123
  modelValue: {
99
124
  type: {
100
- (arrayLength: number): File[][];
101
- (...items: File[][]): File[][];
102
- new (arrayLength: number): File[][];
103
- new (...items: File[][]): File[][];
125
+ (arrayLength: number): {
126
+ type?: string | undefined;
127
+ src?: string | undefined;
128
+ }[];
129
+ (...items: {
130
+ type?: string | undefined;
131
+ src?: string | undefined;
132
+ }[]): {
133
+ type?: string | undefined;
134
+ src?: string | undefined;
135
+ }[];
136
+ new (arrayLength: number): {
137
+ type?: string | undefined;
138
+ src?: string | undefined;
139
+ }[];
140
+ new (...items: {
141
+ type?: string | undefined;
142
+ src?: string | undefined;
143
+ }[]): {
144
+ type?: string | undefined;
145
+ src?: string | undefined;
146
+ }[];
104
147
  isArray(arg: any): arg is any[];
105
148
  readonly prototype: any[];
106
149
  from<T>(arrayLike: ArrayLike<T>): T[];
@@ -112,6 +155,9 @@ declare const _default: {
112
155
  };
113
156
  default: never[];
114
157
  };
158
+ src: {
159
+ type: StringConstructor;
160
+ };
115
161
  name: {
116
162
  type: StringConstructor;
117
163
  default: () => string;
@@ -158,11 +204,15 @@ declare const _default: {
158
204
  };
159
205
  }>> & {
160
206
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
161
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], string, {
207
+ "onUpdate:src"?: ((...args: any[]) => any) | undefined;
208
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:src")[], string, {
162
209
  label: string;
163
210
  pattern: string;
164
211
  required: boolean;
165
- modelValue: File[][];
212
+ modelValue: {
213
+ type?: string | undefined;
214
+ src?: string | undefined;
215
+ }[];
166
216
  variant: string;
167
217
  name: string;
168
218
  id: string;
@@ -194,10 +244,28 @@ declare const _default: {
194
244
  } & Readonly<import("vue").ExtractPropTypes<{
195
245
  modelValue: {
196
246
  type: {
197
- (arrayLength: number): File[][];
198
- (...items: File[][]): File[][];
199
- new (arrayLength: number): File[][];
200
- new (...items: File[][]): File[][];
247
+ (arrayLength: number): {
248
+ type?: string | undefined;
249
+ src?: string | undefined;
250
+ }[];
251
+ (...items: {
252
+ type?: string | undefined;
253
+ src?: string | undefined;
254
+ }[]): {
255
+ type?: string | undefined;
256
+ src?: string | undefined;
257
+ }[];
258
+ new (arrayLength: number): {
259
+ type?: string | undefined;
260
+ src?: string | undefined;
261
+ }[];
262
+ new (...items: {
263
+ type?: string | undefined;
264
+ src?: string | undefined;
265
+ }[]): {
266
+ type?: string | undefined;
267
+ src?: string | undefined;
268
+ }[];
201
269
  isArray(arg: any): arg is any[];
202
270
  readonly prototype: any[];
203
271
  from<T>(arrayLike: ArrayLike<T>): T[];
@@ -209,6 +277,9 @@ declare const _default: {
209
277
  };
210
278
  default: never[];
211
279
  };
280
+ src: {
281
+ type: StringConstructor;
282
+ };
212
283
  name: {
213
284
  type: StringConstructor;
214
285
  default: () => string;
@@ -255,6 +326,7 @@ declare const _default: {
255
326
  };
256
327
  }>> & {
257
328
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
329
+ "onUpdate:src"?: ((...args: any[]) => any) | undefined;
258
330
  } & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties;
259
331
  __isFragment?: undefined;
260
332
  __isTeleport?: undefined;
@@ -262,10 +334,28 @@ declare const _default: {
262
334
  } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
263
335
  modelValue: {
264
336
  type: {
265
- (arrayLength: number): File[][];
266
- (...items: File[][]): File[][];
267
- new (arrayLength: number): File[][];
268
- new (...items: File[][]): File[][];
337
+ (arrayLength: number): {
338
+ type?: string | undefined;
339
+ src?: string | undefined;
340
+ }[];
341
+ (...items: {
342
+ type?: string | undefined;
343
+ src?: string | undefined;
344
+ }[]): {
345
+ type?: string | undefined;
346
+ src?: string | undefined;
347
+ }[];
348
+ new (arrayLength: number): {
349
+ type?: string | undefined;
350
+ src?: string | undefined;
351
+ }[];
352
+ new (...items: {
353
+ type?: string | undefined;
354
+ src?: string | undefined;
355
+ }[]): {
356
+ type?: string | undefined;
357
+ src?: string | undefined;
358
+ }[];
269
359
  isArray(arg: any): arg is any[];
270
360
  readonly prototype: any[];
271
361
  from<T>(arrayLike: ArrayLike<T>): T[];
@@ -277,6 +367,9 @@ declare const _default: {
277
367
  };
278
368
  default: never[];
279
369
  };
370
+ src: {
371
+ type: StringConstructor;
372
+ };
280
373
  name: {
281
374
  type: StringConstructor;
282
375
  default: () => string;
@@ -323,11 +416,15 @@ declare const _default: {
323
416
  };
324
417
  }>> & {
325
418
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
326
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", {
419
+ "onUpdate:src"?: ((...args: any[]) => any) | undefined;
420
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:src")[], "update:modelValue" | "update:src", {
327
421
  label: string;
328
422
  pattern: string;
329
423
  required: boolean;
330
- modelValue: File[][];
424
+ modelValue: {
425
+ type?: string | undefined;
426
+ src?: string | undefined;
427
+ }[];
331
428
  variant: string;
332
429
  name: string;
333
430
  id: string;
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .svg-icon{display:inline-block}.svg-icon svg{display:block;stroke-width:0;stroke:currentColor;fill:currentColor;width:1.5em;height:1.5em}.svg-icon--xxl svg{width:12rem;height:12rem}.svg-icon--xl svg{width:8rem;height:8rem}.svg-icon--large svg{width:4rem;height:4rem}.loading-spinner{min-width:2rem}.base-button{display:flex;justify-content:center;align-items:center;box-sizing:border-box;transition:all .2s ease;text-decoration:none;width:100%;margin:0;padding:1.036em 1.625em;appearance:none;outline:none;border:none;border-radius:.4375em;font-size:.875em;line-height:1.125em;text-transform:uppercase;font-weight:700}@media screen and (min-width: 600px){.base-button{width:auto}}.base-button .icon{width:16px;height:16px;margin-top:-1px}.base-button.s-collapsed>.caption{display:none}.base-button.s-pending{background-repeat:no-repeat;background-position:center center}.base-button.s-pending .caption{margin-left:25px;visibility:hidden}@media screen and (min-width: 600px){.base-button.s-pending{background-position:1.625em center}.base-button.s-pending .caption{visibility:visible}}.base-button[readonly],.base-button[disabled]{cursor:not-allowed}:root,*:before,*:after{--border-color: #ced4da;--border-radius: .25rem}.form-input{display:flex;flex-flow:column}.form-input>*{order:2}.form-input__label{order:0}.form-input__input-group{flex-wrap:nowrap;order:1}.form-input__color-swatch{flex:0 0 3rem;display:block;border-top-right-radius:var(--border-radius);border-bottom-right-radius:var(--border-radius);overflow:hidden;border:thin solid var(--border-color);border-left:none}.form-input input[type=color]{display:block;height:100%;padding:0;border-width:0}.form-input input[type=color]::-webkit-color-swatch-wrapper{padding:0}.form-input input[type=color]::-webkit-color-swatch{border:none}
1
+ .svg-icon{display:inline-block}.svg-icon svg{display:block;stroke-width:0;stroke:currentColor;fill:currentColor;width:1.5em;height:1.5em}.svg-icon--xxl svg{width:12rem;height:12rem}.svg-icon--xl svg{width:8rem;height:8rem}.svg-icon--large svg{width:4rem;height:4rem}.loading-spinner{min-width:2rem}.base-button{display:flex;justify-content:center;align-items:center;box-sizing:border-box;transition:all .2s ease;text-decoration:none;width:100%;margin:0;padding:1.036em 1.625em;appearance:none;outline:none;border:none;border-radius:.4375em;font-size:.875em;line-height:1.125em;text-transform:uppercase;font-weight:700}@media screen and (min-width: 600px){.base-button{width:auto}}.base-button .icon{width:16px;height:16px;margin-top:-1px}.base-button.s-collapsed>.caption{display:none}.base-button.s-pending{background-repeat:no-repeat;background-position:center center}.base-button.s-pending .caption{margin-left:25px;visibility:hidden}@media screen and (min-width: 600px){.base-button.s-pending{background-position:1.625em center}.base-button.s-pending .caption{visibility:visible}}.base-button[readonly],.base-button[disabled]{cursor:not-allowed}.form-input{display:flex;flex-flow:column}.form-input>*{order:2}.form-input__label{order:0}.form-input__input-group{flex-wrap:nowrap;order:1}.form-input__color-swatch{flex:0 0 3rem;display:block;border-top-right-radius:var(--border-radius);border-bottom-right-radius:var(--border-radius);overflow:hidden;border:thin solid var(--border-color);border-left:none}.form-input input[type=checkbox],.form-input input[type=radio]{flex:none}.form-input input[type=color]{display:block;height:100%;padding:0;border-width:0}.form-input input[type=color]::-webkit-color-swatch-wrapper{padding:0}.form-input input[type=color]::-webkit-color-swatch{border:none}.form-switch .form-check-input{width:2.5rem;height:1.3125rem}:root,*:before,*:after{--border-color: #ced4da;--border-radius: .25rem}.media-upload__thumbnail{position:relative}.media-upload__thumbnail .btn{position:absolute;right:0;top:0}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ablok-components",
3
3
  "private": false,
4
- "version": "0.0.32",
4
+ "version": "0.0.35",
5
5
  "scripts": {
6
6
  "dev": "vite",
7
7
  "build": "vue-tsc --noEmit && vite build",