ablok-components 0.0.33 → 0.0.36

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 c, normalizeClass as $, createElementVNode as i, renderSlot as f, computed as h, resolveComponent as S, createBlock as q, createCommentVNode as w, unref as p, toDisplayString as v, withDirectives as C, isRef as M, vModelDynamic as I, vModelText as T, ref as x, watch as V, onBeforeMount as L, Fragment as B, renderList as k, createTextVNode as O, withModifiers as N, reactive as A, createVNode as U } from "vue";
2
- const D = {
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
- }, R = ["xlink:href"], Se = /* @__PURE__ */ b({
5
+ }, F = ["xlink:href"], Ve = /* @__PURE__ */ b({
6
6
  __name: "svg-icon",
7
7
  props: {
8
8
  basePath: {
@@ -23,23 +23,23 @@ const D = {
23
23
  }
24
24
  },
25
25
  setup(e) {
26
- return (s, l) => (u(), c("i", {
27
- class: $(["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(), c("svg", D, [
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, R)
37
+ }, null, 8, F)
38
38
  ]))
39
39
  ], 2));
40
40
  }
41
41
  });
42
- const F = { class: "loading-spinner d-block" }, P = { class: "loading-spinner__animation" }, H = {
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 F = { 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
- }, E = ["fill"], j = /* @__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 F = { 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), G = [
62
- j
63
- ], Ve = /* @__PURE__ */ b({
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 F = { class: "loading-spinner d-block" }, P = { class: "loading-spinner__a
69
69
  }
70
70
  },
71
71
  setup(e) {
72
- return (s, l) => (u(), c("span", F, [
73
- i("span", P, [
74
- (u(), c("svg", H, [
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
- }, G, 8, E)
78
+ }, J, 8, j)
79
79
  ]))
80
80
  ]),
81
- f(s.$slots, "default")
81
+ m(r.$slots, "default")
82
82
  ]));
83
83
  }
84
84
  });
85
- const J = ["type", "disabled", "href", "to"], xe = /* @__PURE__ */ b({
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 J = ["type", "disabled", "href", "to"], xe = /* @__PURE__ */ b({
99
99
  fab: { type: Boolean }
100
100
  },
101
101
  setup(e) {
102
- const s = e, l = h(() => s.caption && !s.fab);
102
+ const r = e, t = h(() => r.caption && !r.fab);
103
103
  return (a, n) => {
104
- const d = S("svg-icon");
105
- return u(), c("button", {
104
+ const d = $("svg-icon");
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: $(["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 J = ["type", "disabled", "href", "to"], xe = /* @__PURE__ */ b({
119
119
  "x-small": e.size === "x-small"
120
120
  }])
121
121
  }, [
122
- f(a.$slots, "default", {}, () => [
123
- e.icon ? (u(), q(d, {
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"])) : w("", !0),
128
- p(l) ? (u(), c("span", {
127
+ }, null, 8, ["id"])) : q("", !0),
128
+ p(t) ? (u(), s("span", {
129
129
  key: 1,
130
- class: $(["base-button__caption", { "icon-padding": e.icon }])
131
- }, v(e.caption), 3)) : w("", !0)
130
+ class: g(["base-button__caption", { "icon-padding": e.icon }])
131
+ }, v(e.caption), 3)) : q("", !0)
132
132
  ])
133
- ], 10, J);
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 X = { class: "input-group form-input__input-group" }, Y = ["type", "id", "name", "placeholder", "pattern", "disabled", "read-only", "required", "maxlength", "checked", "aria-label"], K = {
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
- }, Q = ["name", "id", "disabled", "read-only", "required", "aria-label"], W = ["for", "innerHTML"], Be = /* @__PURE__ */ b({
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 X = { class: "input-group form-input__input-group" }, Y = ["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,
@@ -196,22 +196,22 @@ const X = { class: "input-group form-input__input-group" }, Y = ["type", "id", "
196
196
  }
197
197
  },
198
198
  emits: ["update:modelValue"],
199
- setup(e, { emit: s }) {
200
- const l = e, a = h({
199
+ setup(e, { emit: r }) {
200
+ const t = e, a = h({
201
201
  get() {
202
- return l.modelValue;
202
+ return t.modelValue;
203
203
  },
204
204
  set(n) {
205
- s("update:modelValue", n);
205
+ r("update:modelValue", n);
206
206
  }
207
207
  });
208
- return (n, d) => (u(), c("div", {
209
- class: $(["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", X, [
212
- f(n.$slots, "input-prepend"),
213
- C(i("input", {
214
- "onUpdate:modelValue": d[0] || (d[0] = (t) => M(a) ? a.value = t : null),
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),
215
215
  type: e.type === "color" ? "text" : e.type,
216
216
  id: e.id,
217
217
  name: e.name,
@@ -222,15 +222,17 @@ const X = { class: "input-group form-input__input-group" }, Y = ["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, Y), [
228
- [I, p(a)]
229
+ }, null, 10, K), [
230
+ [T, p(a)]
229
231
  ]),
230
- f(n.$slots, "input-append", {}, () => [
231
- e.type === "color" ? (u(), c("span", K, [
232
- C(i("input", {
233
- "onUpdate:modelValue": d[1] || (d[1] = (t) => M(a) ? a.value = t : null),
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),
234
236
  type: "color",
235
237
  name: `${e.name}-color`,
236
238
  id: `${e.id}-color`,
@@ -239,23 +241,25 @@ const X = { class: "input-group form-input__input-group" }, Y = ["type", "id", "
239
241
  required: e.required,
240
242
  class: "form-control",
241
243
  "aria-label": e.label
242
- }, null, 8, Q), [
243
- [T, p(a)]
244
+ }, null, 8, W), [
245
+ [A, p(a)]
244
246
  ])
245
- ])) : w("", !0)
247
+ ])) : q("", !0)
246
248
  ])
247
249
  ]),
248
- f(n.$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, W)
257
+ }, null, 10, Z)
254
258
  ])
255
259
  ], 2));
256
260
  }
257
261
  });
258
- const Z = { class: "radio-group" }, _ = ["for"], ke = /* @__PURE__ */ b({
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 Z = { class: "radio-group" }, _ = ["for"], ke = /* @__PURE__ */ b({
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,
@@ -295,43 +299,43 @@ const Z = { class: "radio-group" }, _ = ["for"], ke = /* @__PURE__ */ b({
295
299
  }
296
300
  },
297
301
  emits: ["change", "update:modelValue"],
298
- setup(e, { emit: s }) {
299
- const l = e, a = x([]);
300
- return V(() => l.modelValue, (n, d) => {
301
- a.value = l.options.map(
302
- (t) => t.value ? l.modelValue.some((o) => o["value "] === t.value) : l.modelValue.some((o) => o === t)
302
+ setup(e, { emit: r }) {
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 }), V(a, (n, d) => {
305
- const t = n.reduce((o, r, y) => {
306
- const g = r && l.options[y] ? [l.options[y] || l.options[y]] : [];
307
- return [...o, ...g];
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
- s("update:modelValue", t);
310
- }, { deep: !0 }), L(() => {
313
+ r("update:modelValue", l);
314
+ }, { deep: !0 }), N(() => {
311
315
  }), (n, d) => {
312
- const t = S("form-input");
313
- return u(), c("div", Z, [
314
- (u(!0), c(B, null, k(e.options, (o, r) => (u(), q(t, {
315
- key: r,
316
- modelValue: p(a)[r],
317
- "onUpdate:modelValue": (y) => p(a)[r] = y,
316
+ const l = $("form-input");
317
+ return u(), s("div", _, [
318
+ (u(!0), s(B, null, w(e.options, (o, c) => (u(), O(l, {
319
+ key: c,
320
+ modelValue: p(a)[c],
321
+ "onUpdate:modelValue": (f) => p(a)[c] = f,
318
322
  type: "checkbox",
319
323
  name: e.name,
320
- id: `${e.id}-${r}`,
324
+ id: `${e.id}-${c}`,
321
325
  label: `${o.text || o}${e.required ? " *" : ""}`,
322
326
  disabled: e.disabled,
323
327
  "read-only": e.readOnly,
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(n.$slots, "label", {}, () => [
328
- O(v(e.label), 1)
331
+ m(n.$slots, "label", {}, () => [
332
+ C(v(e.label), 1)
329
333
  ])
330
- ], 8, _)
334
+ ], 8, ee)
331
335
  ]);
332
336
  };
333
337
  }
334
- }), ee = { class: "radio-group" }, te = ["for"], we = /* @__PURE__ */ b({
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 Z = { class: "radio-group" }, _ = ["for"], ke = /* @__PURE__ */ b({
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,
@@ -371,41 +375,41 @@ const Z = { class: "radio-group" }, _ = ["for"], ke = /* @__PURE__ */ b({
371
375
  }
372
376
  },
373
377
  emits: ["change", "update:modelValue"],
374
- setup(e, { emit: s }) {
375
- const l = e;
376
- x(l.options.map((n) => n.value === l.modelValue));
378
+ setup(e, { emit: r }) {
379
+ const t = e;
380
+ k(t.options.map((n) => n.value === t.modelValue));
377
381
  function a(n) {
378
- s("update:modelValue", n);
382
+ r("update:modelValue", n);
379
383
  }
380
- return L(() => {
384
+ return N(() => {
381
385
  }), (n, d) => {
382
- const t = S("form-input");
383
- return u(), c("div", ee, [
384
- (u(!0), c(B, null, k(e.options, (o, r) => (u(), q(t, {
385
- key: r,
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, {
389
+ key: c,
386
390
  type: "radio",
387
391
  name: e.name,
388
- id: `${e.id}-${r}`,
392
+ id: `${e.id}-${c}`,
389
393
  value: o.value || o,
390
394
  label: `${o.text || o}${e.required ? " *" : ""}`,
391
395
  checked: o.value ? o.value === e.modelValue : o === e.modelValue,
392
396
  disabled: e.disabled,
393
397
  "read-only": e.readOnly,
394
398
  required: e.required,
395
- onChange: (y) => a(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(n.$slots, "label", {}, () => [
399
- O(v(e.label), 1)
402
+ m(n.$slots, "label", {}, () => [
403
+ C(v(e.label), 1)
400
404
  ])
401
- ], 8, te)
405
+ ], 8, le)
402
406
  ]);
403
407
  };
404
408
  }
405
- }), le = { class: "input input-dropdown" }, ae = { class: "dropdown" }, ne = {
409
+ }), ae = { class: "input input-dropdown" }, ne = { class: "dropdown" }, de = {
406
410
  class: "btn-group",
407
411
  role: "group"
408
- }, de = ["id", "disabled"], oe = ["aria-labelledby"], ie = ["onClick"], ue = ["for"], qe = /* @__PURE__ */ b({
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 Z = { class: "radio-group" }, _ = ["for"], ke = /* @__PURE__ */ b({
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,
@@ -462,32 +466,32 @@ const Z = { class: "radio-group" }, _ = ["for"], ke = /* @__PURE__ */ b({
462
466
  }
463
467
  },
464
468
  emits: ["update:modelValue"],
465
- setup(e, { emit: s }) {
466
- const l = e;
469
+ setup(e, { emit: r }) {
470
+ const t = e;
467
471
  h({
468
472
  get() {
469
- return l.modelValue;
473
+ return t.modelValue;
470
474
  },
471
- set(t) {
472
- s("update:modelValue", t);
475
+ set(l) {
476
+ r("update:modelValue", l);
473
477
  }
474
478
  });
475
- function a(t) {
476
- s("update:modelValue", t);
479
+ function a(l) {
480
+ r("update:modelValue", l);
477
481
  }
478
482
  const n = h(() => [
479
483
  {
480
484
  text: "Please select"
481
485
  },
482
- ...l.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
- ]), d = h(() => [...l.options].find((t) => JSON.stringify(t.value) === JSON.stringify(l.modelValue)));
486
- return (t, o) => (u(), c("div", le, [
487
- i("div", ae, [
488
- i("div", ne, [
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: $(["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 Z = { class: "radio-group" }, _ = ["for"], ke = /* @__PURE__ */ b({
498
502
  "data-bs-toggle": "dropdown",
499
503
  "aria-expanded": "false",
500
504
  disabled: e.disabled
501
- }, v(p(d) ? p(d).text : e.placeholder), 11, de),
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), c(B, null, k(p(n), (r, y) => (u(), c("li", { key: y }, [
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: N((g) => a(r.value), ["prevent"])
511
- }, v(r.text), 9, ie)
514
+ onClick: z((V) => a(c.value), ["prevent"])
515
+ }, v(c.text), 9, ue)
512
516
  ])
513
517
  ]))), 128))
514
- ], 8, oe)
518
+ ], 8, ie)
515
519
  ])
516
520
  ]),
517
521
  i("label", { for: e.id }, [
518
- f(t.$slots, "label", {}, () => [
519
- O(v(e.label), 1)
522
+ m(l.$slots, "label", {}, () => [
523
+ C(v(e.label), 1)
520
524
  ])
521
- ], 8, ue)
525
+ ], 8, re)
522
526
  ]));
523
527
  }
524
- }), se = ["id", "name", "multiple", "accept"], re = { class: "form-input__input-group input-group" }, ce = ["value", "id", "name"], fe = ["for"], me = ["for", "innerHTML"], Oe = /* @__PURE__ */ b({
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 Z = { class: "radio-group" }, _ = ["for"], ke = /* @__PURE__ */ b({
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,
@@ -573,61 +577,61 @@ const Z = { class: "radio-group" }, _ = ["for"], ke = /* @__PURE__ */ b({
573
577
  }
574
578
  },
575
579
  emits: ["update:modelValue"],
576
- setup(e, { emit: s }) {
577
- function l(d) {
578
- const t = d.target && d.target.files;
579
- t && (a.splice(0, a.length), Array.from(t).forEach((o) => {
580
+ setup(e, { emit: r }) {
581
+ function t(d) {
582
+ const l = d.target && d.target.files;
583
+ l && (a.splice(0, a.length), Array.from(l).forEach((o) => {
580
584
  a.push(o);
581
585
  }));
582
586
  }
583
- const a = A([]), n = h(() => a && a.map((d) => d.name));
584
- return h(() => a.map((d) => URL.createObjectURL(d))), V(() => a, (d, t) => {
585
- console.log("file input", d), s("update:modelValue", d);
586
- }, { deep: !0 }), (d, t) => (u(), c("div", {
587
- class: $(["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: l,
598
+ onChange: t,
595
599
  multiple: e.multiple,
596
600
  accept: e.accept
597
601
  }, null, 40, se),
598
- i("div", re, [
599
- f(d.$slots, "input-prepend"),
602
+ i("div", ce, [
603
+ m(d.$slots, "input-prepend"),
600
604
  i("input", {
601
605
  type: "text",
602
606
  value: p(n),
603
607
  id: e.id,
604
608
  name: e.name,
605
609
  class: "form-control"
606
- }, null, 8, ce),
607
- f(d.$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, fe)
615
+ }, " Select Image ", 8, me)
612
616
  ])
613
617
  ]),
614
- f(d.$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, me)
623
+ }, null, 8, ye)
620
624
  ])
621
625
  ]));
622
626
  }
623
- }), ye = { class: "media-upload" }, pe = ["src"], be = ["onClick"], ge = ["for"];
624
- async function he(e) {
625
- return await new Promise((s) => {
626
- let l = new FileReader();
627
- l.onload = () => s(l.result), l.readAsDataURL(e);
627
+ }), pe = { class: "media-upload" }, be = ["src"], ge = ["onClick"], he = ["for"];
628
+ async function ve(e) {
629
+ return await new Promise((r) => {
630
+ let t = new FileReader();
631
+ t.onload = () => r(t.result), t.readAsDataURL(e);
628
632
  });
629
633
  }
630
- const Ce = /* @__PURE__ */ b({
634
+ const Me = /* @__PURE__ */ b({
631
635
  __name: "media-upload",
632
636
  props: {
633
637
  modelValue: {
@@ -639,11 +643,11 @@ const Ce = /* @__PURE__ */ b({
639
643
  },
640
644
  name: {
641
645
  type: String,
642
- default: () => m()
646
+ default: () => y()
643
647
  },
644
648
  id: {
645
649
  type: String,
646
- default: () => m()
650
+ default: () => y()
647
651
  },
648
652
  label: {
649
653
  type: String,
@@ -683,43 +687,43 @@ const Ce = /* @__PURE__ */ b({
683
687
  }
684
688
  },
685
689
  emits: ["update:modelValue", "update:src"],
686
- setup(e, { emit: s }) {
687
- const l = e, a = x([]), n = x([]);
688
- V(() => a, async (t, o) => {
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) => {
689
693
  n.value = await Promise.all(
690
- t.value.map(async (r) => ({
691
- src: await he(r),
692
- type: r.type
694
+ o.value.map(async (f) => ({
695
+ src: await ve(f),
696
+ type: f.type
693
697
  }))
694
698
  );
695
- }, { deep: !0 }), V(() => n, async (t, o) => {
696
- const r = l.multiple ? n.value : [n.value[0]];
697
- s("update:modelValue", r), l.multiple || s("update:src", n.value[0] && n.value[0].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);
698
702
  }, { deep: !0 });
699
- function d(t) {
700
- a.value.splice(t, 1);
703
+ function l(o) {
704
+ a.value.splice(o, 1);
701
705
  }
702
- return (t, o) => {
703
- const r = S("svg-icon"), y = S("file-input");
704
- return u(), c("div", ye, [
705
- (u(!0), c(B, null, k(n.value, (g, z) => (u(), c("div", {
706
- key: g.src,
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,
707
711
  class: "media-upload__thumbnail"
708
712
  }, [
709
713
  i("img", {
710
- src: g.src,
714
+ src: x.src,
711
715
  class: "img-thumbnail rounded"
712
- }, null, 8, pe),
716
+ }, null, 8, be),
713
717
  i("button", {
714
- onClick: N((ve) => d(z), ["prevent"]),
718
+ onClick: z(($e) => l(I), ["prevent"]),
715
719
  class: "btn btn--close"
716
720
  }, [
717
- U(r, { symbol: "close" })
718
- ], 8, be)
721
+ L(f, { symbol: "x" })
722
+ ], 8, ge)
719
723
  ]))), 128)),
720
- U(y, {
724
+ L(V, {
721
725
  modelValue: a.value,
722
- "onUpdate:modelValue": o[0] || (o[0] = (g) => a.value = g),
726
+ "onUpdate:modelValue": c[0] || (c[0] = (x) => a.value = x),
723
727
  id: e.id,
724
728
  name: e.name,
725
729
  accept: e.accept,
@@ -728,19 +732,19 @@ const Ce = /* @__PURE__ */ b({
728
732
  i("label", {
729
733
  for: e.id,
730
734
  class: "btn btn-outline-dark"
731
- }, " Select Image ", 8, ge)
735
+ }, " Select Image ", 8, he)
732
736
  ]);
733
737
  };
734
738
  }
735
739
  });
736
740
  export {
737
- xe as BaseButton,
738
- ke as CheckGroup,
739
- Oe as FileInput,
741
+ ke as BaseButton,
742
+ we as CheckGroup,
743
+ Ce as FileInput,
740
744
  Be as FormInput,
741
- qe as InputDropdown,
742
- Ve as LoadingSpinner,
743
- Ce as MediaUpload,
744
- we as RadioGroup,
745
- Se as SvgIcon
745
+ Oe as InputDropdown,
746
+ xe as LoadingSpinner,
747
+ Me as MediaUpload,
748
+ qe as RadioGroup,
749
+ Ve as SvgIcon
746
750
  };
@@ -1 +1 @@
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 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,n)=>(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))}}),ae="",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"],$=[e.createElementVNode("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"1s",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"},null,-1)],S=e.defineComponent({__name:"loading-spinner",props:{color:{type:String,default:"#fff"}},setup(t){return(r,n)=>(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"},$,8,k)]))]),e.renderSlot(r.$slots,"default")]))}}),de="",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,n=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(n)?(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)}}}),ie="";function m(){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"],C={key:0,class:"form-input__color-swatch"},x=["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:()=>m()},id:{type:String,default:()=>m()},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 n=t,a=e.computed({get(){return n.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",w,[e.renderSlot(o.$slots,"input-prepend"),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":d[0]||(d[0]=l=>e.isRef(a)?a.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(a)]]),e.renderSlot(o.$slots,"input-append",{},()=>[t.type==="color"?(e.openBlock(),e.createElementBlock("span",C,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":d[1]||(d[1]=l=>e.isRef(a)?a.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,x),[[e.vModelText,e.unref(a)]])])):e.createCommentVNode("",!0)])]),e.renderSlot(o.$slots,"label",{},()=>[e.createElementVNode("label",{for:t.id,class:"form-input__label",innerHTML:`${t.label}${t.required?" *":""}`},null,8,q)])],2))}}),re="",O={class:"radio-group"},z=["for"],D=e.defineComponent({__name:"check-group",props:{modelValue:{default:[]},options:{type:Array,default:[]},name:{type:String,default:()=>m()},id:{type:String,default:()=>m()},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 n=t,a=e.ref([]);return e.watch(()=>n.modelValue,(o,d)=>{a.value=n.options.map(l=>l.value?n.modelValue.some(i=>i["value "]===l.value):n.modelValue.some(i=>i===l))},{immediate:!0}),e.watch(a,(o,d)=>{const l=o.reduce((i,c,u)=>{const f=c&&n.options[u]?[n.options[u]||n.options[u]]:[];return[...i,...f]},[]);r("update:modelValue",l)},{deep:!0}),e.onBeforeMount(()=>{}),(o,d)=>{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,c)=>(e.openBlock(),e.createBlock(l,{key:c,modelValue:e.unref(a)[c],"onUpdate:modelValue":u=>e.unref(a)[c]=u,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,z)])}}}),L={class:"radio-group"},T=["for"],U=e.defineComponent({__name:"radio-group",props:{modelValue:{default:!1},options:{type:Array,default:[]},name:{type:String,default:()=>m()},id:{type:String,default:()=>m()},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 n=t;e.ref(n.options.map(o=>o.value===n.modelValue));function a(o){r("update:modelValue",o)}return e.onBeforeMount(()=>{}),(o,d)=>{const l=e.resolveComponent("form-input");return e.openBlock(),e.createElementBlock("div",L,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,(i,c)=>(e.openBlock(),e.createBlock(l,{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:u=>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,T)])}}}),A={class:"input input-dropdown"},F={class:"dropdown"},I={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:()=>m()},id:{type:String,default:()=>m()},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 n=t;e.computed({get(){return n.modelValue},set(l){r("update:modelValue",l)}});function a(l){r("update:modelValue",l)}const o=e.computed(()=>[{text:"Please select"},...n.options.map(l=>typeof l=="string"?{value:l,text:l}:l)]),d=e.computed(()=>[...n.options].find(l=>JSON.stringify(l.value)===JSON.stringify(n.modelValue)));return(l,i)=>(e.openBlock(),e.createElementBlock("div",A,[e.createElementVNode("div",F,[e.createElementVNode("div",I,[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,R),e.createElementVNode("ul",{class:"dropdown-menu","aria-labelledby":t.id},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o),(c,u)=>(e.openBlock(),e.createElementBlock("li",{key:u},[e.renderSlot(l.$slots,"option",{},()=>[e.createElementVNode("a",{class:"dropdown-item",onClick:e.withModifiers(f=>a(c.value),["prevent"])},e.toDisplayString(c.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:()=>m()},id:{type:String,default:()=>m()},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 n(d){const l=d.target&&d.target.files;l&&(a.splice(0,a.length),Array.from(l).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,l)=>{console.log("file input",d),r("update:modelValue",d)},{deep:!0}),(d,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:n,multiple:t.multiple,accept:t.accept},null,40,J),e.createElementVNode("div",X,[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,Y),e.renderSlot(d.$slots,"input-append",{},()=>[e.createElementVNode("label",{for:t.id,class:"btn btn-outline-dark"}," Select Image ",8,K)])]),e.renderSlot(d.$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=["onClick"],ee=["for"];async function te(t){return await new Promise(r=>{let n=new FileReader;n.onload=()=>r(n.result),n.readAsDataURL(t)})}const le=e.defineComponent({__name:"media-upload",props:{modelValue:{type:Array,default:[]},src:{type:String},name:{type:String,default:()=>m()},id:{type:String,default:()=>m()},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 n=t,a=e.ref([]),o=e.ref([]);e.watch(()=>a,async(l,i)=>{o.value=await Promise.all(l.value.map(async c=>({src:await te(c),type:c.type})))},{deep:!0}),e.watch(()=>o,async(l,i)=>{const c=n.multiple?o.value:[o.value[0]];r("update:modelValue",c),n.multiple||r("update:src",o.value[0]&&o.value[0].src)},{deep:!0});function d(l){a.value.splice(l,1)}return(l,i)=>{const c=e.resolveComponent("svg-icon"),u=e.resolveComponent("file-input");return e.openBlock(),e.createElementBlock("div",Z,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(f,ne)=>(e.openBlock(),e.createElementBlock("div",{key:f.src,class:"media-upload__thumbnail"},[e.createElementVNode("img",{src:f.src,class:"img-thumbnail rounded"},null,8,_),e.createElementVNode("button",{onClick:e.withModifiers(se=>d(ne),["prevent"]),class:"btn btn--close"},[e.createVNode(c,{symbol:"close"})],8,v)]))),128)),e.createVNode(u,{modelValue:a.value,"onUpdate:modelValue":i[0]||(i[0]=f=>a.value=f),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,ee)])}}}),ce="";s.BaseButton=E,s.CheckGroup=D,s.FileInput=W,s.FormInput=M,s.InputDropdown=G,s.LoadingSpinner=S,s.MediaUpload=le,s.RadioGroup=U,s.SvgIcon=g,Object.defineProperties(s,{__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,10 +7,10 @@ declare const _default: {
7
7
  label: string;
8
8
  pattern: string;
9
9
  required: boolean;
10
- modelValue: (string | [{
11
- type: string;
12
- src: string;
13
- }])[];
10
+ modelValue: {
11
+ type?: string | undefined;
12
+ src?: string | undefined;
13
+ }[];
14
14
  variant: string;
15
15
  name: string;
16
16
  id: string;
@@ -22,28 +22,28 @@ declare const _default: {
22
22
  }> & Omit<Readonly<import("vue").ExtractPropTypes<{
23
23
  modelValue: {
24
24
  type: {
25
- (arrayLength: number): (string | [{
26
- type: string;
27
- src: string;
28
- }])[];
29
- (...items: (string | [{
30
- type: string;
31
- src: string;
32
- }])[]): (string | [{
33
- type: string;
34
- src: string;
35
- }])[];
36
- new (arrayLength: number): (string | [{
37
- type: string;
38
- src: string;
39
- }])[];
40
- new (...items: (string | [{
41
- type: string;
42
- src: string;
43
- }])[]): (string | [{
44
- type: string;
45
- src: string;
46
- }])[];
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
+ }[];
47
47
  isArray(arg: any): arg is any[];
48
48
  readonly prototype: any[];
49
49
  from<T>(arrayLike: ArrayLike<T>): T[];
@@ -122,28 +122,28 @@ declare const _default: {
122
122
  $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
123
123
  modelValue: {
124
124
  type: {
125
- (arrayLength: number): (string | [{
126
- type: string;
127
- src: string;
128
- }])[];
129
- (...items: (string | [{
130
- type: string;
131
- src: string;
132
- }])[]): (string | [{
133
- type: string;
134
- src: string;
135
- }])[];
136
- new (arrayLength: number): (string | [{
137
- type: string;
138
- src: string;
139
- }])[];
140
- new (...items: (string | [{
141
- type: string;
142
- src: string;
143
- }])[]): (string | [{
144
- type: string;
145
- src: string;
146
- }])[];
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
+ }[];
147
147
  isArray(arg: any): arg is any[];
148
148
  readonly prototype: any[];
149
149
  from<T>(arrayLike: ArrayLike<T>): T[];
@@ -209,10 +209,10 @@ declare const _default: {
209
209
  label: string;
210
210
  pattern: string;
211
211
  required: boolean;
212
- modelValue: (string | [{
213
- type: string;
214
- src: string;
215
- }])[];
212
+ modelValue: {
213
+ type?: string | undefined;
214
+ src?: string | undefined;
215
+ }[];
216
216
  variant: string;
217
217
  name: string;
218
218
  id: string;
@@ -244,28 +244,28 @@ declare const _default: {
244
244
  } & Readonly<import("vue").ExtractPropTypes<{
245
245
  modelValue: {
246
246
  type: {
247
- (arrayLength: number): (string | [{
248
- type: string;
249
- src: string;
250
- }])[];
251
- (...items: (string | [{
252
- type: string;
253
- src: string;
254
- }])[]): (string | [{
255
- type: string;
256
- src: string;
257
- }])[];
258
- new (arrayLength: number): (string | [{
259
- type: string;
260
- src: string;
261
- }])[];
262
- new (...items: (string | [{
263
- type: string;
264
- src: string;
265
- }])[]): (string | [{
266
- type: string;
267
- src: string;
268
- }])[];
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
+ }[];
269
269
  isArray(arg: any): arg is any[];
270
270
  readonly prototype: any[];
271
271
  from<T>(arrayLike: ArrayLike<T>): T[];
@@ -334,28 +334,28 @@ declare const _default: {
334
334
  } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
335
335
  modelValue: {
336
336
  type: {
337
- (arrayLength: number): (string | [{
338
- type: string;
339
- src: string;
340
- }])[];
341
- (...items: (string | [{
342
- type: string;
343
- src: string;
344
- }])[]): (string | [{
345
- type: string;
346
- src: string;
347
- }])[];
348
- new (arrayLength: number): (string | [{
349
- type: string;
350
- src: string;
351
- }])[];
352
- new (...items: (string | [{
353
- type: string;
354
- src: string;
355
- }])[]): (string | [{
356
- type: string;
357
- src: string;
358
- }])[];
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
+ }[];
359
359
  isArray(arg: any): arg is any[];
360
360
  readonly prototype: any[];
361
361
  from<T>(arrayLike: ArrayLike<T>): T[];
@@ -421,10 +421,10 @@ declare const _default: {
421
421
  label: string;
422
422
  pattern: string;
423
423
  required: boolean;
424
- modelValue: (string | [{
425
- type: string;
426
- src: string;
427
- }])[];
424
+ modelValue: {
425
+ type?: string | undefined;
426
+ src?: string | undefined;
427
+ }[];
428
428
  variant: string;
429
429
  name: string;
430
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}.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}:root,*:before,*:after{--border-color: #ced4da;--border-radius: .25rem}.media-upload__thumbnail{position:relative}.media-upload__thumbnail .btn{position:absolute;right:0;top:0}
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-direction: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{flex-direction:row;padding-left:0;gap:1rem}.form-switch .form-check-input{width:2.5rem;height:1.3125rem;margin-left:0}: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.33",
4
+ "version": "0.0.36",
5
5
  "scripts": {
6
6
  "dev": "vite",
7
7
  "build": "vue-tsc --noEmit && vite build",