ablok-components 0.0.32 → 0.0.33

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 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 = {
3
3
  class: "icon",
4
4
  preserveAspectRatio: "xMaxYMin"
5
- }, D = ["xlink:href"], he = /* @__PURE__ */ p({
5
+ }, R = ["xlink:href"], Se = /* @__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 (s, l) => (u(), c("i", {
27
+ class: $(["svg-icon", {
28
28
  [`svg-icon--${e.size}`]: e.size
29
29
  }])
30
30
  }, [
31
- (u(), s("svg", A, [
31
+ (u(), c("svg", D, [
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, R)
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 F = { class: "loading-spinner d-block" }, P = { class: "loading-spinner__animation" }, H = {
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
+ }, E = ["fill"], j = /* @__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), G = [
62
+ j
63
+ ], Ve = /* @__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, [
72
+ return (s, l) => (u(), c("span", F, [
73
73
  i("span", P, [
74
- (u(), s("svg", F, [
74
+ (u(), c("svg", H, [
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
+ }, G, 8, E)
79
79
  ]))
80
80
  ]),
81
- f(r.$slots, "default")
81
+ f(s.$slots, "default")
82
82
  ]));
83
83
  }
84
84
  });
85
- const G = ["type", "disabled", "href", "to"], $e = /* @__PURE__ */ p({
85
+ const J = ["type", "disabled", "href", "to"], xe = /* @__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");
105
- return u(), s("button", {
102
+ const s = e, l = h(() => s.caption && !s.fab);
103
+ return (a, n) => {
104
+ const d = S("svg-icon");
105
+ return u(), c("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: $(["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
+ f(a.$slots, "default", {}, () => [
123
+ e.icon ? (u(), q(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"])) : w("", !0),
128
+ p(l) ? (u(), c("span", {
129
129
  key: 1,
130
- class: v(["base-button__caption", { "icon-padding": e.icon }])
131
- }, h(e.caption), 3)) : k("", !0)
130
+ class: $(["base-button__caption", { "icon-padding": e.icon }])
131
+ }, v(e.caption), 3)) : w("", !0)
132
132
  ])
133
- ], 10, G);
133
+ ], 10, J);
134
134
  };
135
135
  }
136
136
  });
137
137
  function m() {
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 X = { class: "input-group form-input__input-group" }, Y = ["type", "id", "name", "placeholder", "pattern", "disabled", "read-only", "required", "maxlength", "checked", "aria-label"], K = {
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
+ }, Q = ["name", "id", "disabled", "read-only", "required", "aria-label"], W = ["for", "innerHTML"], Be = /* @__PURE__ */ b({
144
144
  __name: "form-input",
145
145
  props: {
146
146
  modelValue: {
@@ -196,22 +196,22 @@ const J = { class: "input-group form-input__input-group" }, X = ["type", "id", "
196
196
  }
197
197
  },
198
198
  emits: ["update:modelValue"],
199
- setup(e, { emit: r }) {
200
- const a = e, n = g({
199
+ setup(e, { emit: s }) {
200
+ const l = e, a = h({
201
201
  get() {
202
- return a.modelValue;
202
+ return l.modelValue;
203
203
  },
204
- set(d) {
205
- r("update:modelValue", d);
204
+ set(n) {
205
+ s("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(), c("div", {
209
+ class: $(["form-input", `form-input--${e.type}`])
210
210
  }, [
211
- i("div", J, [
212
- f(d.$slots, "input-prepend"),
213
- M(i("input", {
214
- "onUpdate:modelValue": l[0] || (l[0] = (t) => C(n) ? n.value = t : null),
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),
215
215
  type: e.type === "color" ? "text" : e.type,
216
216
  id: e.id,
217
217
  name: e.name,
@@ -224,13 +224,13 @@ const J = { class: "input-group form-input__input-group" }, X = ["type", "id", "
224
224
  checked: e.checked,
225
225
  class: "form-control",
226
226
  "aria-label": e.label
227
- }, null, 8, X), [
228
- [N, y(n)]
227
+ }, null, 8, Y), [
228
+ [I, p(a)]
229
229
  ]),
230
- f(d.$slots, "input-append", {}, () => [
231
- e.type === "color" ? (u(), s("span", Y, [
232
- M(i("input", {
233
- "onUpdate:modelValue": l[1] || (l[1] = (t) => C(n) ? n.value = t : null),
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),
234
234
  type: "color",
235
235
  name: `${e.name}-color`,
236
236
  id: `${e.id}-color`,
@@ -239,23 +239,23 @@ const J = { class: "input-group form-input__input-group" }, X = ["type", "id", "
239
239
  required: e.required,
240
240
  class: "form-control",
241
241
  "aria-label": e.label
242
- }, null, 8, K), [
243
- [U, y(n)]
242
+ }, null, 8, Q), [
243
+ [T, p(a)]
244
244
  ])
245
- ])) : k("", !0)
245
+ ])) : w("", !0)
246
246
  ])
247
247
  ]),
248
- f(d.$slots, "label", {}, () => [
248
+ f(n.$slots, "label", {}, () => [
249
249
  i("label", {
250
250
  for: e.id,
251
251
  class: "form-input__label",
252
252
  innerHTML: `${e.label}${e.required ? " *" : ""}`
253
- }, null, 8, Q)
253
+ }, null, 8, W)
254
254
  ])
255
255
  ], 2));
256
256
  }
257
257
  });
258
- const W = { class: "radio-group" }, Z = ["for"], Ve = /* @__PURE__ */ p({
258
+ const Z = { class: "radio-group" }, _ = ["for"], ke = /* @__PURE__ */ b({
259
259
  __name: "check-group",
260
260
  props: {
261
261
  modelValue: {
@@ -295,43 +295,43 @@ const W = { class: "radio-group" }, Z = ["for"], Ve = /* @__PURE__ */ p({
295
295
  }
296
296
  },
297
297
  emits: ["change", "update:modelValue"],
298
- 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)
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)
303
303
  );
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];
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
308
  }, []);
309
- r("update:modelValue", t);
309
+ s("update:modelValue", t);
310
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, {
315
- key: c,
316
- modelValue: y(n)[c],
317
- "onUpdate:modelValue": (b) => y(n)[c] = b,
311
+ }), (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,
318
318
  type: "checkbox",
319
319
  name: e.name,
320
- id: `${e.id}-${c}`,
320
+ id: `${e.id}-${r}`,
321
321
  label: `${o.text || o}${e.required ? " *" : ""}`,
322
322
  disabled: e.disabled,
323
323
  "read-only": e.readOnly,
324
324
  required: e.required
325
325
  }, null, 8, ["modelValue", "onUpdate:modelValue", "name", "id", "label", "disabled", "read-only", "required"]))), 128)),
326
326
  i("label", { for: e.id }, [
327
- f(d.$slots, "label", {}, () => [
328
- q(h(e.label), 1)
327
+ f(n.$slots, "label", {}, () => [
328
+ O(v(e.label), 1)
329
329
  ])
330
- ], 8, Z)
330
+ ], 8, _)
331
331
  ]);
332
332
  };
333
333
  }
334
- }), _ = { class: "radio-group" }, ee = ["for"], Be = /* @__PURE__ */ p({
334
+ }), ee = { class: "radio-group" }, te = ["for"], we = /* @__PURE__ */ b({
335
335
  __name: "radio-group",
336
336
  props: {
337
337
  modelValue: {
@@ -371,41 +371,41 @@ const W = { class: "radio-group" }, Z = ["for"], Ve = /* @__PURE__ */ p({
371
371
  }
372
372
  },
373
373
  emits: ["change", "update:modelValue"],
374
- 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);
374
+ setup(e, { emit: s }) {
375
+ const l = e;
376
+ x(l.options.map((n) => n.value === l.modelValue));
377
+ function a(n) {
378
+ s("update:modelValue", n);
379
379
  }
380
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, {
385
- key: c,
381
+ }), (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
386
  type: "radio",
387
387
  name: e.name,
388
- id: `${e.id}-${c}`,
388
+ id: `${e.id}-${r}`,
389
389
  value: o.value || o,
390
390
  label: `${o.text || o}${e.required ? " *" : ""}`,
391
391
  checked: o.value ? o.value === e.modelValue : o === e.modelValue,
392
392
  disabled: e.disabled,
393
393
  "read-only": e.readOnly,
394
394
  required: e.required,
395
- onChange: (b) => n(o)
395
+ onChange: (y) => a(o)
396
396
  }, null, 8, ["name", "id", "value", "label", "checked", "disabled", "read-only", "required", "onChange"]))), 128)),
397
397
  i("label", { for: e.id }, [
398
- f(d.$slots, "label", {}, () => [
399
- q(h(e.label), 1)
398
+ f(n.$slots, "label", {}, () => [
399
+ O(v(e.label), 1)
400
400
  ])
401
- ], 8, ee)
401
+ ], 8, te)
402
402
  ]);
403
403
  };
404
404
  }
405
- }), te = { class: "input input-dropdown" }, le = { class: "dropdown" }, ae = {
405
+ }), le = { class: "input input-dropdown" }, ae = { class: "dropdown" }, ne = {
406
406
  class: "btn-group",
407
407
  role: "group"
408
- }, ne = ["id", "disabled"], de = ["aria-labelledby"], oe = ["onClick"], ie = ["for"], xe = /* @__PURE__ */ p({
408
+ }, de = ["id", "disabled"], oe = ["aria-labelledby"], ie = ["onClick"], ue = ["for"], qe = /* @__PURE__ */ b({
409
409
  __name: "input-dropdown",
410
410
  props: {
411
411
  modelValue: {
@@ -462,32 +462,32 @@ const W = { class: "radio-group" }, Z = ["for"], Ve = /* @__PURE__ */ p({
462
462
  }
463
463
  },
464
464
  emits: ["update:modelValue"],
465
- setup(e, { emit: r }) {
466
- const a = e;
467
- g({
465
+ setup(e, { emit: s }) {
466
+ const l = e;
467
+ h({
468
468
  get() {
469
- return a.modelValue;
469
+ return l.modelValue;
470
470
  },
471
471
  set(t) {
472
- r("update:modelValue", t);
472
+ s("update:modelValue", t);
473
473
  }
474
474
  });
475
- function n(t) {
476
- r("update:modelValue", t);
475
+ function a(t) {
476
+ s("update:modelValue", t);
477
477
  }
478
- const d = g(() => [
478
+ const n = h(() => [
479
479
  {
480
480
  text: "Please select"
481
481
  },
482
- ...a.options.map(
482
+ ...l.options.map(
483
483
  (t) => typeof t == "string" ? { value: t, text: t } : t
484
484
  )
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, [
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
489
  i("button", {
490
- class: v(["btn dropdown-toggle", {
490
+ class: $(["btn dropdown-toggle", {
491
491
  [`btn-${e.variant}`]: e.variant,
492
492
  [`btn-${e.color}`]: e.color,
493
493
  [`btn-${e.disabled}`]: e.disabled,
@@ -498,30 +498,30 @@ const W = { class: "radio-group" }, Z = ["for"], Ve = /* @__PURE__ */ p({
498
498
  "data-bs-toggle": "dropdown",
499
499
  "aria-expanded": "false",
500
500
  disabled: e.disabled
501
- }, h(y(l) ? y(l).text : e.placeholder), 11, ne),
501
+ }, v(p(d) ? p(d).text : e.placeholder), 11, de),
502
502
  i("ul", {
503
503
  class: "dropdown-menu",
504
504
  "aria-labelledby": e.id
505
505
  }, [
506
- (u(!0), s(B, null, x(y(d), (c, b) => (u(), s("li", { key: b }, [
506
+ (u(!0), c(B, null, k(p(n), (r, y) => (u(), c("li", { key: y }, [
507
507
  f(t.$slots, "option", {}, () => [
508
508
  i("a", {
509
509
  class: "dropdown-item",
510
- onClick: z((O) => n(c.value), ["prevent"])
511
- }, h(c.text), 9, oe)
510
+ onClick: N((g) => a(r.value), ["prevent"])
511
+ }, v(r.text), 9, ie)
512
512
  ])
513
513
  ]))), 128))
514
- ], 8, de)
514
+ ], 8, oe)
515
515
  ])
516
516
  ]),
517
517
  i("label", { for: e.id }, [
518
518
  f(t.$slots, "label", {}, () => [
519
- q(h(e.label), 1)
519
+ O(v(e.label), 1)
520
520
  ])
521
- ], 8, ie)
521
+ ], 8, ue)
522
522
  ]));
523
523
  }
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({
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({
525
525
  __name: "file-input",
526
526
  props: {
527
527
  modelValue: {
@@ -573,67 +573,70 @@ const W = { class: "radio-group" }, Z = ["for"], Ve = /* @__PURE__ */ p({
573
573
  }
574
574
  },
575
575
  emits: ["update:modelValue"],
576
- 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);
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
+ a.push(o);
581
581
  }));
582
582
  }
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"])
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"])
588
588
  }, [
589
589
  i("input", {
590
590
  type: "file",
591
591
  id: e.id,
592
592
  name: e.name,
593
593
  class: "d-none",
594
- onChange: a,
594
+ onChange: l,
595
595
  multiple: e.multiple,
596
596
  accept: e.accept
597
- }, null, 40, ue),
597
+ }, null, 40, se),
598
598
  i("div", re, [
599
- f(l.$slots, "input-prepend"),
599
+ f(d.$slots, "input-prepend"),
600
600
  i("input", {
601
601
  type: "text",
602
- value: y(d),
602
+ value: p(n),
603
603
  id: e.id,
604
604
  name: e.name,
605
605
  class: "form-control"
606
- }, null, 8, se),
607
- f(l.$slots, "input-append", {}, () => [
606
+ }, null, 8, ce),
607
+ f(d.$slots, "input-append", {}, () => [
608
608
  i("label", {
609
609
  for: e.id,
610
610
  class: "btn btn-outline-dark"
611
- }, " Select Image ", 8, ce)
611
+ }, " Select Image ", 8, fe)
612
612
  ])
613
613
  ]),
614
- f(l.$slots, "label", {}, () => [
614
+ f(d.$slots, "label", {}, () => [
615
615
  i("label", {
616
616
  for: e.id,
617
617
  class: "form-input__label",
618
618
  innerHTML: `${e.label}${e.required ? " *" : ""}`
619
- }, null, 8, fe)
619
+ }, null, 8, me)
620
620
  ])
621
621
  ]));
622
622
  }
623
- }), me = { class: "media-upload" }, ye = ["src"], pe = ["for"];
624
- async function be(e) {
625
- return await new Promise((r) => {
626
- let a = new FileReader();
627
- a.onload = () => r(a.result), a.readAsDataURL(e);
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);
628
628
  });
629
629
  }
630
- const we = /* @__PURE__ */ p({
630
+ const Ce = /* @__PURE__ */ b({
631
631
  __name: "media-upload",
632
632
  props: {
633
633
  modelValue: {
634
634
  type: Array,
635
635
  default: []
636
636
  },
637
+ src: {
638
+ type: String
639
+ },
637
640
  name: {
638
641
  type: String,
639
642
  default: () => m()
@@ -679,32 +682,44 @@ const we = /* @__PURE__ */ p({
679
682
  default: "image/*"
680
683
  }
681
684
  },
682
- emits: ["update:modelValue"],
683
- setup(e, { emit: r }) {
684
- const a = S([]), n = S([]);
685
- return $(() => a, async (d, l) => {
685
+ emits: ["update:modelValue", "update:src"],
686
+ setup(e, { emit: s }) {
687
+ const l = e, a = x([]), n = x([]);
688
+ V(() => a, async (t, o) => {
686
689
  n.value = await Promise.all(
687
- d.value.map(async (t) => ({
688
- src: await be(t),
689
- type: t.type
690
+ t.value.map(async (r) => ({
691
+ src: await he(r),
692
+ type: r.type
690
693
  }))
691
694
  );
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
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);
698
+ }, { deep: !0 });
699
+ function d(t) {
700
+ a.value.splice(t, 1);
701
+ }
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,
707
+ class: "media-upload__thumbnail"
699
708
  }, [
700
709
  i("img", {
701
- src: o.src,
702
- class: "img-fluid rounded"
703
- }, null, 8, ye)
710
+ src: g.src,
711
+ class: "img-thumbnail rounded"
712
+ }, null, 8, pe),
713
+ i("button", {
714
+ onClick: N((ve) => d(z), ["prevent"]),
715
+ class: "btn btn--close"
716
+ }, [
717
+ U(r, { symbol: "close" })
718
+ ], 8, be)
704
719
  ]))), 128)),
705
- T(t, {
720
+ U(y, {
706
721
  modelValue: a.value,
707
- "onUpdate:modelValue": l[0] || (l[0] = (o) => a.value = o),
722
+ "onUpdate:modelValue": o[0] || (o[0] = (g) => a.value = g),
708
723
  id: e.id,
709
724
  name: e.name,
710
725
  accept: e.accept,
@@ -713,19 +728,19 @@ const we = /* @__PURE__ */ p({
713
728
  i("label", {
714
729
  for: e.id,
715
730
  class: "btn btn-outline-dark"
716
- }, " Select Image ", 8, pe)
731
+ }, " Select Image ", 8, ge)
717
732
  ]);
718
733
  };
719
734
  }
720
735
  });
721
736
  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
737
+ xe as BaseButton,
738
+ ke as CheckGroup,
739
+ Oe as FileInput,
740
+ Be as FormInput,
741
+ qe as InputDropdown,
742
+ Ve as LoadingSpinner,
743
+ Ce as MediaUpload,
744
+ we as RadioGroup,
745
+ Se as SvgIcon
731
746
  };
@@ -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 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"}})});
@@ -7,7 +7,10 @@ declare const _default: {
7
7
  label: string;
8
8
  pattern: string;
9
9
  required: boolean;
10
- modelValue: File[][];
10
+ modelValue: (string | [{
11
+ type: string;
12
+ src: string;
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): (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
+ }])[];
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): (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
+ }])[];
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: (string | [{
213
+ type: string;
214
+ src: string;
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): (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
+ }])[];
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): (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
+ }])[];
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: (string | [{
425
+ type: string;
426
+ src: string;
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=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}
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.33",
5
5
  "scripts": {
6
6
  "dev": "vite",
7
7
  "build": "vue-tsc --noEmit && vite build",