ablok-components 0.0.36 → 0.0.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
- import { defineComponent as b, openBlock as u, createElementBlock as s, normalizeClass as g, createElementVNode as i, renderSlot as m, computed as h, resolveComponent as $, createBlock as O, createCommentVNode as q, unref as p, toDisplayString as v, withDirectives as M, isRef as U, vModelDynamic as T, vModelText as A, ref as k, watch as S, onBeforeMount as N, Fragment as B, renderList as w, createTextVNode as C, withModifiers as z, reactive as D, createVNode as L } from "vue";
1
+ import { defineComponent as g, openBlock as u, createElementBlock as s, normalizeClass as b, createElementVNode as o, renderSlot as m, computed as h, resolveComponent as $, createBlock as U, createCommentVNode as k, unref as p, toDisplayString as v, withDirectives as B, isRef as w, vModelDynamic as A, vModelText as C, ref as q, watch as S, onBeforeMount as T, Fragment as O, renderList as M, createTextVNode as L, withModifiers as I, reactive as D, createVNode as N } from "vue";
2
2
  const R = {
3
3
  class: "icon",
4
4
  preserveAspectRatio: "xMaxYMin"
5
- }, F = ["xlink:href"], Ve = /* @__PURE__ */ b({
5
+ }, F = ["xlink:href"], qe = /* @__PURE__ */ g({
6
6
  __name: "svg-icon",
7
7
  props: {
8
8
  basePath: {
@@ -23,13 +23,13 @@ const R = {
23
23
  }
24
24
  },
25
25
  setup(e) {
26
- return (r, t) => (u(), s("i", {
27
- class: g(["svg-icon", {
26
+ return (r, a) => (u(), s("i", {
27
+ class: b(["svg-icon", {
28
28
  [`svg-icon--${e.size}`]: e.size
29
29
  }])
30
30
  }, [
31
31
  (u(), s("svg", R, [
32
- i("use", {
32
+ o("use", {
33
33
  "xlink:href": `${e.basePath}#${e.prefix}${e.symbol}`,
34
34
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
35
35
  x: "0",
@@ -39,7 +39,7 @@ const R = {
39
39
  ], 2));
40
40
  }
41
41
  });
42
- const P = { class: "loading-spinner d-block" }, H = { class: "loading-spinner__animation" }, E = {
42
+ const H = { class: "loading-spinner d-block" }, P = { class: "loading-spinner__animation" }, E = {
43
43
  class: "d-block",
44
44
  version: "1.1",
45
45
  id: "L9",
@@ -50,7 +50,7 @@ const P = { class: "loading-spinner d-block" }, H = { class: "loading-spinner__a
50
50
  viewBox: "0 0 100 100",
51
51
  "enable-background": "new 0 0 0 0",
52
52
  "xml:space": "preserve"
53
- }, j = ["fill"], G = /* @__PURE__ */ i("animateTransform", {
53
+ }, j = ["fill"], G = /* @__PURE__ */ o("animateTransform", {
54
54
  attributeName: "transform",
55
55
  attributeType: "XML",
56
56
  type: "rotate",
@@ -60,7 +60,7 @@ const P = { class: "loading-spinner d-block" }, H = { class: "loading-spinner__a
60
60
  repeatCount: "indefinite"
61
61
  }, null, -1), J = [
62
62
  G
63
- ], xe = /* @__PURE__ */ b({
63
+ ], Oe = /* @__PURE__ */ g({
64
64
  __name: "loading-spinner",
65
65
  props: {
66
66
  color: {
@@ -69,10 +69,10 @@ const P = { class: "loading-spinner d-block" }, H = { class: "loading-spinner__a
69
69
  }
70
70
  },
71
71
  setup(e) {
72
- return (r, t) => (u(), s("span", P, [
73
- i("span", H, [
72
+ return (r, a) => (u(), s("span", H, [
73
+ o("span", P, [
74
74
  (u(), s("svg", E, [
75
- i("path", {
75
+ o("path", {
76
76
  fill: e.color,
77
77
  d: "M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50"
78
78
  }, J, 8, j)
@@ -82,7 +82,7 @@ const P = { class: "loading-spinner d-block" }, H = { class: "loading-spinner__a
82
82
  ]));
83
83
  }
84
84
  });
85
- const X = ["type", "disabled", "href", "to"], ke = /* @__PURE__ */ b({
85
+ const X = ["type", "disabled", "href", "to"], Me = /* @__PURE__ */ g({
86
86
  __name: "base-button",
87
87
  props: {
88
88
  type: null,
@@ -99,15 +99,15 @@ const X = ["type", "disabled", "href", "to"], ke = /* @__PURE__ */ b({
99
99
  fab: { type: Boolean }
100
100
  },
101
101
  setup(e) {
102
- const r = e, t = h(() => r.caption && !r.fab);
103
- return (a, n) => {
102
+ const r = e, a = h(() => r.caption && !r.fab);
103
+ return (l, n) => {
104
104
  const d = $("svg-icon");
105
105
  return u(), s("button", {
106
106
  type: e.type,
107
107
  disabled: e.disabled,
108
108
  href: e.href,
109
109
  to: e.to,
110
- class: g(["base-button btn btn-primary", {
110
+ class: b(["base-button btn btn-primary", {
111
111
  disabled: e.disabled,
112
112
  pending: e.pending,
113
113
  rounded: e.rounded,
@@ -119,16 +119,16 @@ const X = ["type", "disabled", "href", "to"], ke = /* @__PURE__ */ b({
119
119
  "x-small": e.size === "x-small"
120
120
  }])
121
121
  }, [
122
- m(a.$slots, "default", {}, () => [
123
- e.icon ? (u(), O(d, {
122
+ m(l.$slots, "default", {}, () => [
123
+ e.icon ? (u(), U(d, {
124
124
  key: 0,
125
125
  id: e.icon,
126
126
  class: "base-button__caption"
127
- }, null, 8, ["id"])) : q("", !0),
128
- p(t) ? (u(), s("span", {
127
+ }, null, 8, ["id"])) : k("", !0),
128
+ p(a) ? (u(), s("span", {
129
129
  key: 1,
130
- class: g(["base-button__caption", { "icon-padding": e.icon }])
131
- }, v(e.caption), 3)) : q("", !0)
130
+ class: b(["base-button__caption", { "icon-padding": e.icon }])
131
+ }, v(e.caption), 3)) : k("", !0)
132
132
  ])
133
133
  ], 10, X);
134
134
  };
@@ -140,7 +140,7 @@ function y() {
140
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
- }, W = ["name", "id", "disabled", "read-only", "required", "aria-label"], Z = ["for", "innerHTML"], Be = /* @__PURE__ */ b({
143
+ }, W = ["name", "id", "disabled", "read-only", "required", "aria-label"], Z = ["for", "innerHTML"], Ce = /* @__PURE__ */ g({
144
144
  __name: "form-input",
145
145
  props: {
146
146
  modelValue: {
@@ -197,21 +197,21 @@ const Y = { class: "input-group form-input__input-group" }, K = ["type", "id", "
197
197
  },
198
198
  emits: ["update:modelValue"],
199
199
  setup(e, { emit: r }) {
200
- const t = e, a = h({
200
+ const a = e, l = h({
201
201
  get() {
202
- return t.modelValue;
202
+ return a.modelValue;
203
203
  },
204
204
  set(n) {
205
205
  r("update:modelValue", n);
206
206
  }
207
207
  });
208
208
  return (n, d) => (u(), s("div", {
209
- class: g(["form-input", `form-input--${e.type}`])
209
+ class: b(["form-input", `form-input--${e.type}`])
210
210
  }, [
211
- i("div", Y, [
211
+ o("div", Y, [
212
212
  m(n.$slots, "input-prepend"),
213
- M(i("input", {
214
- "onUpdate:modelValue": d[0] || (d[0] = (l) => U(a) ? a.value = l : null),
213
+ B(o("input", {
214
+ "onUpdate:modelValue": d[0] || (d[0] = (t) => w(l) ? l.value = t : null),
215
215
  type: e.type === "color" ? "text" : e.type,
216
216
  id: e.id,
217
217
  name: e.name,
@@ -222,17 +222,17 @@ const Y = { class: "input-group form-input__input-group" }, K = ["type", "id", "
222
222
  required: e.required,
223
223
  maxlength: e.maxlength,
224
224
  checked: e.checked,
225
- class: g(["form-control", {
225
+ class: b(["form-control", {
226
226
  "form-check-input": e.type === "checkbox"
227
227
  }]),
228
228
  "aria-label": e.label
229
229
  }, null, 10, K), [
230
- [T, p(a)]
230
+ [A, p(l)]
231
231
  ]),
232
232
  m(n.$slots, "input-append", {}, () => [
233
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
+ B(o("input", {
235
+ "onUpdate:modelValue": d[1] || (d[1] = (t) => w(l) ? l.value = t : null),
236
236
  type: "color",
237
237
  name: `${e.name}-color`,
238
238
  id: `${e.id}-color`,
@@ -242,15 +242,15 @@ const Y = { class: "input-group form-input__input-group" }, K = ["type", "id", "
242
242
  class: "form-control",
243
243
  "aria-label": e.label
244
244
  }, null, 8, W), [
245
- [A, p(a)]
245
+ [C, p(l)]
246
246
  ])
247
- ])) : q("", !0)
247
+ ])) : k("", !0)
248
248
  ])
249
249
  ]),
250
250
  m(n.$slots, "label", {}, () => [
251
- i("label", {
251
+ o("label", {
252
252
  for: e.id,
253
- class: g(["form-input__label", {
253
+ class: b(["form-input__label", {
254
254
  "form-check-label": e.type === "checkbox"
255
255
  }]),
256
256
  innerHTML: `${e.label}${e.required ? " *" : ""}`
@@ -259,7 +259,121 @@ const Y = { class: "input-group form-input__input-group" }, K = ["type", "id", "
259
259
  ], 2));
260
260
  }
261
261
  });
262
- const _ = { class: "radio-group" }, ee = ["for"], we = /* @__PURE__ */ b({
262
+ const _ = { class: "form-input form-input--textarea" }, ee = ["type", "id", "name", "placeholder", "pattern", "disabled", "read-only", "required", "maxlength", "aria-label"], te = {
263
+ key: 0,
264
+ class: "form-input__color-swatch"
265
+ }, le = ["name", "id", "disabled", "read-only", "required", "aria-label"], ae = ["for", "innerHTML"], Ue = /* @__PURE__ */ g({
266
+ __name: "input-textarea",
267
+ props: {
268
+ modelValue: {
269
+ type: String,
270
+ default: ""
271
+ },
272
+ type: {
273
+ type: String,
274
+ default: "text"
275
+ },
276
+ name: {
277
+ type: String,
278
+ default: () => y()
279
+ },
280
+ id: {
281
+ type: String,
282
+ default: () => y()
283
+ },
284
+ label: {
285
+ type: String,
286
+ default: ""
287
+ },
288
+ placeholder: {
289
+ type: String,
290
+ default: ""
291
+ },
292
+ variant: {
293
+ type: String,
294
+ default: ""
295
+ },
296
+ disabled: {
297
+ type: Boolean,
298
+ default: !1
299
+ },
300
+ readOnly: {
301
+ type: Boolean,
302
+ default: !1
303
+ },
304
+ required: {
305
+ type: Boolean,
306
+ default: !1
307
+ },
308
+ maxlength: {
309
+ type: Number
310
+ },
311
+ pattern: {
312
+ type: String,
313
+ default: null
314
+ },
315
+ checked: {
316
+ type: Boolean,
317
+ default: !1
318
+ }
319
+ },
320
+ emits: ["update:modelValue"],
321
+ setup(e, { emit: r }) {
322
+ const a = e, l = h({
323
+ get() {
324
+ return a.modelValue;
325
+ },
326
+ set(n) {
327
+ r("update:modelValue", n);
328
+ }
329
+ });
330
+ return (n, d) => (u(), s("div", _, [
331
+ m(n.$slots, "input-prepend"),
332
+ B(o("textarea", {
333
+ "onUpdate:modelValue": d[0] || (d[0] = (t) => w(l) ? l.value = t : null),
334
+ type: e.type === "color" ? "text" : e.type,
335
+ id: e.id,
336
+ name: e.name,
337
+ placeholder: e.placeholder,
338
+ pattern: e.pattern,
339
+ disabled: e.disabled,
340
+ "read-only": e.readOnly,
341
+ required: e.required,
342
+ maxlength: e.maxlength,
343
+ class: b(["form-control", {}]),
344
+ "aria-label": e.label
345
+ }, null, 8, ee), [
346
+ [C, p(l)]
347
+ ]),
348
+ m(n.$slots, "input-append", {}, () => [
349
+ e.type === "color" ? (u(), s("span", te, [
350
+ B(o("input", {
351
+ "onUpdate:modelValue": d[1] || (d[1] = (t) => w(l) ? l.value = t : null),
352
+ type: "color",
353
+ name: `${e.name}-color`,
354
+ id: `${e.id}-color`,
355
+ disabled: e.disabled,
356
+ "read-only": e.readOnly,
357
+ required: e.required,
358
+ class: "form-control",
359
+ "aria-label": e.label
360
+ }, null, 8, le), [
361
+ [C, p(l)]
362
+ ])
363
+ ])) : k("", !0)
364
+ ]),
365
+ m(n.$slots, "label", {}, () => [
366
+ o("label", {
367
+ for: e.id,
368
+ class: b(["form-input__label", {
369
+ "form-check-label": e.type === "checkbox"
370
+ }]),
371
+ innerHTML: `${e.label}${e.required ? " *" : ""}`
372
+ }, null, 10, ae)
373
+ ])
374
+ ]));
375
+ }
376
+ }), ne = { class: "radio-group" }, de = ["for"], Le = /* @__PURE__ */ g({
263
377
  __name: "check-group",
264
378
  props: {
265
379
  modelValue: {
@@ -300,42 +414,42 @@ const _ = { class: "radio-group" }, ee = ["for"], we = /* @__PURE__ */ b({
300
414
  },
301
415
  emits: ["change", "update:modelValue"],
302
416
  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)
417
+ const a = e, l = q([]);
418
+ return S(() => a.modelValue, (n, d) => {
419
+ l.value = a.options.map(
420
+ (t) => t.value ? a.modelValue.some((i) => i["value "] === t.value) : a.modelValue.some((i) => i === t)
307
421
  );
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];
422
+ }, { immediate: !0 }), S(l, (n, d) => {
423
+ const t = n.reduce((i, c, f) => {
424
+ const x = c && a.options[f] ? [a.options[f] || a.options[f]] : [];
425
+ return [...i, ...x];
312
426
  }, []);
313
- r("update:modelValue", l);
314
- }, { deep: !0 }), N(() => {
427
+ r("update:modelValue", t);
428
+ }, { deep: !0 }), T(() => {
315
429
  }), (n, d) => {
316
- const l = $("form-input");
317
- return u(), s("div", _, [
318
- (u(!0), s(B, null, w(e.options, (o, c) => (u(), O(l, {
430
+ const t = $("form-input");
431
+ return u(), s("div", ne, [
432
+ (u(!0), s(O, null, M(e.options, (i, c) => (u(), U(t, {
319
433
  key: c,
320
- modelValue: p(a)[c],
321
- "onUpdate:modelValue": (f) => p(a)[c] = f,
434
+ modelValue: p(l)[c],
435
+ "onUpdate:modelValue": (f) => p(l)[c] = f,
322
436
  type: "checkbox",
323
437
  name: e.name,
324
438
  id: `${e.id}-${c}`,
325
- label: `${o.text || o}${e.required ? " *" : ""}`,
439
+ label: `${i.text || i}${e.required ? " *" : ""}`,
326
440
  disabled: e.disabled,
327
441
  "read-only": e.readOnly,
328
442
  required: e.required
329
443
  }, null, 8, ["modelValue", "onUpdate:modelValue", "name", "id", "label", "disabled", "read-only", "required"]))), 128)),
330
- i("label", { for: e.id }, [
444
+ o("label", { for: e.id }, [
331
445
  m(n.$slots, "label", {}, () => [
332
- C(v(e.label), 1)
446
+ L(v(e.label), 1)
333
447
  ])
334
- ], 8, ee)
448
+ ], 8, de)
335
449
  ]);
336
450
  };
337
451
  }
338
- }), te = { class: "radio-group" }, le = ["for"], qe = /* @__PURE__ */ b({
452
+ }), oe = { class: "radio-group" }, ie = ["for"], Ne = /* @__PURE__ */ g({
339
453
  __name: "radio-group",
340
454
  props: {
341
455
  modelValue: {
@@ -376,40 +490,40 @@ const _ = { class: "radio-group" }, ee = ["for"], we = /* @__PURE__ */ b({
376
490
  },
377
491
  emits: ["change", "update:modelValue"],
378
492
  setup(e, { emit: r }) {
379
- const t = e;
380
- k(t.options.map((n) => n.value === t.modelValue));
381
- function a(n) {
493
+ const a = e;
494
+ q(a.options.map((n) => n.value === a.modelValue));
495
+ function l(n) {
382
496
  r("update:modelValue", n);
383
497
  }
384
- return N(() => {
498
+ return T(() => {
385
499
  }), (n, d) => {
386
- const l = $("form-input");
387
- return u(), s("div", te, [
388
- (u(!0), s(B, null, w(e.options, (o, c) => (u(), O(l, {
500
+ const t = $("form-input");
501
+ return u(), s("div", oe, [
502
+ (u(!0), s(O, null, M(e.options, (i, c) => (u(), U(t, {
389
503
  key: c,
390
504
  type: "radio",
391
505
  name: e.name,
392
506
  id: `${e.id}-${c}`,
393
- value: o.value || o,
394
- label: `${o.text || o}${e.required ? " *" : ""}`,
395
- checked: o.value ? o.value === e.modelValue : o === e.modelValue,
507
+ value: i.value || i,
508
+ label: `${i.text || i}${e.required ? " *" : ""}`,
509
+ checked: i.value ? i.value === e.modelValue : i === e.modelValue,
396
510
  disabled: e.disabled,
397
511
  "read-only": e.readOnly,
398
512
  required: e.required,
399
- onChange: (f) => a(o)
513
+ onChange: (f) => l(i)
400
514
  }, null, 8, ["name", "id", "value", "label", "checked", "disabled", "read-only", "required", "onChange"]))), 128)),
401
- i("label", { for: e.id }, [
515
+ o("label", { for: e.id }, [
402
516
  m(n.$slots, "label", {}, () => [
403
- C(v(e.label), 1)
517
+ L(v(e.label), 1)
404
518
  ])
405
- ], 8, le)
519
+ ], 8, ie)
406
520
  ]);
407
521
  };
408
522
  }
409
- }), ae = { class: "input input-dropdown" }, ne = { class: "dropdown" }, de = {
523
+ }), ue = { class: "input input-dropdown" }, re = { class: "dropdown" }, se = {
410
524
  class: "btn-group",
411
525
  role: "group"
412
- }, oe = ["id", "disabled"], ie = ["aria-labelledby"], ue = ["onClick"], re = ["for"], Oe = /* @__PURE__ */ b({
526
+ }, ce = ["id", "disabled"], fe = ["aria-labelledby"], me = ["onClick"], ye = ["for"], Te = /* @__PURE__ */ g({
413
527
  __name: "input-dropdown",
414
528
  props: {
415
529
  modelValue: {
@@ -467,31 +581,31 @@ const _ = { class: "radio-group" }, ee = ["for"], we = /* @__PURE__ */ b({
467
581
  },
468
582
  emits: ["update:modelValue"],
469
583
  setup(e, { emit: r }) {
470
- const t = e;
584
+ const a = e;
471
585
  h({
472
586
  get() {
473
- return t.modelValue;
587
+ return a.modelValue;
474
588
  },
475
- set(l) {
476
- r("update:modelValue", l);
589
+ set(t) {
590
+ r("update:modelValue", t);
477
591
  }
478
592
  });
479
- function a(l) {
480
- r("update:modelValue", l);
593
+ function l(t) {
594
+ r("update:modelValue", t);
481
595
  }
482
596
  const n = h(() => [
483
597
  {
484
598
  text: "Please select"
485
599
  },
486
- ...t.options.map(
487
- (l) => typeof l == "string" ? { value: l, text: l } : l
600
+ ...a.options.map(
601
+ (t) => typeof t == "string" ? { value: t, text: t } : t
488
602
  )
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, [
493
- i("button", {
494
- class: g(["btn dropdown-toggle", {
603
+ ]), d = h(() => [...a.options].find((t) => JSON.stringify(t.value) === JSON.stringify(a.modelValue)));
604
+ return (t, i) => (u(), s("div", ue, [
605
+ o("div", re, [
606
+ o("div", se, [
607
+ o("button", {
608
+ class: b(["btn dropdown-toggle", {
495
609
  [`btn-${e.variant}`]: e.variant,
496
610
  [`btn-${e.color}`]: e.color,
497
611
  [`btn-${e.disabled}`]: e.disabled,
@@ -502,30 +616,30 @@ const _ = { class: "radio-group" }, ee = ["for"], we = /* @__PURE__ */ b({
502
616
  "data-bs-toggle": "dropdown",
503
617
  "aria-expanded": "false",
504
618
  disabled: e.disabled
505
- }, v(p(d) ? p(d).text : e.placeholder), 11, oe),
506
- i("ul", {
619
+ }, v(p(d) ? p(d).text : e.placeholder), 11, ce),
620
+ o("ul", {
507
621
  class: "dropdown-menu",
508
622
  "aria-labelledby": e.id
509
623
  }, [
510
- (u(!0), s(B, null, w(p(n), (c, f) => (u(), s("li", { key: f }, [
511
- m(l.$slots, "option", {}, () => [
512
- i("a", {
624
+ (u(!0), s(O, null, M(p(n), (c, f) => (u(), s("li", { key: f }, [
625
+ m(t.$slots, "option", {}, () => [
626
+ o("a", {
513
627
  class: "dropdown-item",
514
- onClick: z((V) => a(c.value), ["prevent"])
515
- }, v(c.text), 9, ue)
628
+ onClick: I((x) => l(c.value), ["prevent"])
629
+ }, v(c.text), 9, me)
516
630
  ])
517
631
  ]))), 128))
518
- ], 8, ie)
632
+ ], 8, fe)
519
633
  ])
520
634
  ]),
521
- i("label", { for: e.id }, [
522
- m(l.$slots, "label", {}, () => [
523
- C(v(e.label), 1)
635
+ o("label", { for: e.id }, [
636
+ m(t.$slots, "label", {}, () => [
637
+ L(v(e.label), 1)
524
638
  ])
525
- ], 8, re)
639
+ ], 8, ye)
526
640
  ]));
527
641
  }
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({
642
+ }), pe = ["id", "name", "multiple", "accept"], be = { class: "form-input__input-group input-group" }, ge = ["value", "id", "name"], he = ["for"], ve = ["for", "innerHTML"], Ie = /* @__PURE__ */ g({
529
643
  __name: "file-input",
530
644
  props: {
531
645
  modelValue: {
@@ -578,60 +692,60 @@ const _ = { class: "radio-group" }, ee = ["for"], we = /* @__PURE__ */ b({
578
692
  },
579
693
  emits: ["update:modelValue"],
580
694
  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) => {
584
- a.push(o);
695
+ function a(d) {
696
+ const t = d.target && d.target.files;
697
+ t && (l.splice(0, l.length), Array.from(t).forEach((i) => {
698
+ l.push(i);
585
699
  }));
586
700
  }
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) => {
701
+ const l = D([]), n = h(() => l && l.map((d) => d.name));
702
+ return h(() => l.map((d) => URL.createObjectURL(d))), S(() => l, (d, t) => {
589
703
  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"])
704
+ }, { deep: !0 }), (d, t) => (u(), s("div", {
705
+ class: b(["form-input file-input", "file-input--primary"])
592
706
  }, [
593
- i("input", {
707
+ o("input", {
594
708
  type: "file",
595
709
  id: e.id,
596
710
  name: e.name,
597
711
  class: "d-none",
598
- onChange: t,
712
+ onChange: a,
599
713
  multiple: e.multiple,
600
714
  accept: e.accept
601
- }, null, 40, se),
602
- i("div", ce, [
715
+ }, null, 40, pe),
716
+ o("div", be, [
603
717
  m(d.$slots, "input-prepend"),
604
- i("input", {
718
+ o("input", {
605
719
  type: "text",
606
720
  value: p(n),
607
721
  id: e.id,
608
722
  name: e.name,
609
723
  class: "form-control"
610
- }, null, 8, fe),
724
+ }, null, 8, ge),
611
725
  m(d.$slots, "input-append", {}, () => [
612
- i("label", {
726
+ o("label", {
613
727
  for: e.id,
614
728
  class: "btn btn-outline-dark"
615
- }, " Select Image ", 8, me)
729
+ }, " Select Image ", 8, he)
616
730
  ])
617
731
  ]),
618
732
  m(d.$slots, "label", {}, () => [
619
- i("label", {
733
+ o("label", {
620
734
  for: e.id,
621
735
  class: "form-input__label",
622
736
  innerHTML: `${e.label}${e.required ? " *" : ""}`
623
- }, null, 8, ye)
737
+ }, null, 8, ve)
624
738
  ])
625
739
  ]));
626
740
  }
627
- }), pe = { class: "media-upload" }, be = ["src"], ge = ["onClick"], he = ["for"];
628
- async function ve(e) {
741
+ }), $e = { class: "media-upload" }, Se = ["src"], xe = ["onClick"], Ve = ["for"];
742
+ async function ke(e) {
629
743
  return await new Promise((r) => {
630
- let t = new FileReader();
631
- t.onload = () => r(t.result), t.readAsDataURL(e);
744
+ let a = new FileReader();
745
+ a.onload = () => r(a.result), a.readAsDataURL(e);
632
746
  });
633
747
  }
634
- const Me = /* @__PURE__ */ b({
748
+ const ze = /* @__PURE__ */ g({
635
749
  __name: "media-upload",
636
750
  props: {
637
751
  modelValue: {
@@ -688,63 +802,64 @@ const Me = /* @__PURE__ */ b({
688
802
  },
689
803
  emits: ["update:modelValue", "update:src"],
690
804
  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) => {
805
+ const a = e, l = q([]), n = q([]), d = h(() => a.modelValue.length ? a.modelValue : a.src ? [{ type: "", src: a.src }] : n.value);
806
+ S(() => l, async (i, c) => {
693
807
  n.value = await Promise.all(
694
- o.value.map(async (f) => ({
695
- src: await ve(f),
808
+ i.value.map(async (f) => ({
809
+ src: await ke(f),
696
810
  type: f.type
697
811
  }))
698
812
  );
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);
813
+ }, { deep: !0 }), S(() => n, async (i, c) => {
814
+ const f = a.multiple ? n.value : [n.value[0]];
815
+ r("update:modelValue", f), a.multiple || r("update:src", n.value[0] && n.value[0].src);
702
816
  }, { deep: !0 });
703
- function l(o) {
704
- a.value.splice(o, 1);
817
+ function t(i) {
818
+ l.value.splice(i, 1);
705
819
  }
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,
820
+ return (i, c) => {
821
+ const f = $("svg-icon"), x = $("file-input");
822
+ return u(), s("div", $e, [
823
+ (u(!0), s(O, null, M(p(d), (V, z) => (u(), s("div", {
824
+ key: V.src,
711
825
  class: "media-upload__thumbnail"
712
826
  }, [
713
- i("img", {
714
- src: x.src,
827
+ o("img", {
828
+ src: V.src,
715
829
  class: "img-thumbnail rounded"
716
- }, null, 8, be),
717
- i("button", {
718
- onClick: z(($e) => l(I), ["prevent"]),
830
+ }, null, 8, Se),
831
+ o("button", {
832
+ onClick: I((Be) => t(z), ["prevent"]),
719
833
  class: "btn btn--close"
720
834
  }, [
721
- L(f, { symbol: "x" })
722
- ], 8, ge)
835
+ N(f, { symbol: "x" })
836
+ ], 8, xe)
723
837
  ]))), 128)),
724
- L(V, {
725
- modelValue: a.value,
726
- "onUpdate:modelValue": c[0] || (c[0] = (x) => a.value = x),
838
+ N(x, {
839
+ modelValue: l.value,
840
+ "onUpdate:modelValue": c[0] || (c[0] = (V) => l.value = V),
727
841
  id: e.id,
728
842
  name: e.name,
729
843
  accept: e.accept,
730
844
  class: "d-none"
731
845
  }, null, 8, ["modelValue", "id", "name", "accept"]),
732
- i("label", {
846
+ o("label", {
733
847
  for: e.id,
734
848
  class: "btn btn-outline-dark"
735
- }, " Select Image ", 8, he)
849
+ }, " Select Image ", 8, Ve)
736
850
  ]);
737
851
  };
738
852
  }
739
853
  });
740
854
  export {
741
- ke as BaseButton,
742
- we as CheckGroup,
743
- Ce as FileInput,
744
- Be as FormInput,
745
- Oe as InputDropdown,
746
- xe as LoadingSpinner,
747
- Me as MediaUpload,
748
- qe as RadioGroup,
749
- Ve as SvgIcon
855
+ Me as BaseButton,
856
+ Le as CheckGroup,
857
+ Ie as FileInput,
858
+ Ce as FormInput,
859
+ Te as InputDropdown,
860
+ Ue as InputTextarea,
861
+ Oe as LoadingSpinner,
862
+ ze as MediaUpload,
863
+ Ne as RadioGroup,
864
+ qe as SvgIcon
750
865
  };
@@ -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 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"}})});
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,a)=>(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))}}),me="",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,a)=>(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")]))}}),fe="",E=["type","disabled","href","to"],x=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(n,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(n.$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(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,E)}}}),pe="";function u(){return(new Date().valueOf()+Math.random()).toString(36)}const N={class:"input-group form-input__input-group"},w=["type","id","name","placeholder","pattern","disabled","read-only","required","maxlength","checked","aria-label"],C={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 a=t,n=e.computed({get(){return a.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]=l=>e.isRef(n)?n.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:e.normalizeClass(["form-control",{"form-check-input":t.type==="checkbox"}]),"aria-label":t.label},null,10,w),[[e.vModelDynamic,e.unref(n)]]),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(n)?n.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,q),[[e.vModelText,e.unref(n)]])])):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))}}),ye="",T={class:"form-input form-input--textarea"},z=["type","id","name","placeholder","pattern","disabled","read-only","required","maxlength","aria-label"],D={key:0,class:"form-input__color-swatch"},L=["name","id","disabled","read-only","required","aria-label"],U=["for","innerHTML"],I=e.defineComponent({__name:"input-textarea",props:{modelValue:{type:String,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 a=t,n=e.computed({get(){return a.modelValue},set(o){r("update:modelValue",o)}});return(o,d)=>(e.openBlock(),e.createElementBlock("div",T,[e.renderSlot(o.$slots,"input-prepend"),e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":d[0]||(d[0]=l=>e.isRef(n)?n.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,class:e.normalizeClass(["form-control",{}]),"aria-label":t.label},null,8,z),[[e.vModelText,e.unref(n)]]),e.renderSlot(o.$slots,"input-append",{},()=>[t.type==="color"?(e.openBlock(),e.createElementBlock("span",D,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":d[1]||(d[1]=l=>e.isRef(n)?n.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,L),[[e.vModelText,e.unref(n)]])])):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,U)])]))}}),R={class:"radio-group"},A=["for"],F=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 a=t,n=e.ref([]);return e.watch(()=>a.modelValue,(o,d)=>{n.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(n,(o,d)=>{const l=o.reduce((i,c,m)=>{const f=c&&a.options[m]?[a.options[m]||a.options[m]]:[];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",R,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,(i,c)=>(e.openBlock(),e.createBlock(l,{key:c,modelValue:e.unref(n)[c],"onUpdate:modelValue":m=>e.unref(n)[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,A)])}}}),P={class:"radio-group"},H=["for"],j=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 a=t;e.ref(a.options.map(o=>o.value===a.modelValue));function n(o){r("update:modelValue",o)}return e.onBeforeMount(()=>{}),(o,d)=>{const l=e.resolveComponent("form-input");return e.openBlock(),e.createElementBlock("div",P,[(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:m=>n(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,H)])}}}),G={class:"input input-dropdown"},J={class:"dropdown"},X={class:"btn-group",role:"group"},Y=["id","disabled"],K=["aria-labelledby"],Q=["onClick"],W=["for"],Z=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 a=t;e.computed({get(){return a.modelValue},set(l){r("update:modelValue",l)}});function n(l){r("update:modelValue",l)}const o=e.computed(()=>[{text:"Please select"},...a.options.map(l=>typeof l=="string"?{value:l,text:l}:l)]),d=e.computed(()=>[...a.options].find(l=>JSON.stringify(l.value)===JSON.stringify(a.modelValue)));return(l,i)=>(e.openBlock(),e.createElementBlock("div",G,[e.createElementVNode("div",J,[e.createElementVNode("div",X,[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,Y),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(l.$slots,"option",{},()=>[e.createElementVNode("a",{class:"dropdown-item",onClick:e.withModifiers(f=>n(c.value),["prevent"])},e.toDisplayString(c.text),9,Q)])]))),128))],8,K)])]),e.createElementVNode("label",{for:t.id},[e.renderSlot(l.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)])],8,W)]))}}),_=["id","name","multiple","accept"],v={class:"form-input__input-group input-group"},ee=["value","id","name"],te=["for"],le=["for","innerHTML"],ne=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 a(d){const l=d.target&&d.target.files;l&&(n.splice(0,n.length),Array.from(l).forEach(i=>{n.push(i)}))}const n=e.reactive([]),o=e.computed(()=>n&&n.map(d=>d.name));return e.computed(()=>n.map(d=>URL.createObjectURL(d))),e.watch(()=>n,(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:a,multiple:t.multiple,accept:t.accept},null,40,_),e.createElementVNode("div",v,[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,ee),e.renderSlot(d.$slots,"input-append",{},()=>[e.createElementVNode("label",{for:t.id,class:"btn btn-outline-dark"}," Select Image ",8,te)])]),e.renderSlot(d.$slots,"label",{},()=>[e.createElementVNode("label",{for:t.id,class:"form-input__label",innerHTML:`${t.label}${t.required?" *":""}`},null,8,le)])]))}}),ae={class:"media-upload"},oe=["src"],de=["onClick"],ie=["for"];async function re(t){return await new Promise(r=>{let a=new FileReader;a.onload=()=>r(a.result),a.readAsDataURL(t)})}const ce=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 a=t,n=e.ref([]),o=e.ref([]),d=e.computed(()=>a.modelValue.length?a.modelValue:a.src?[{type:"",src:a.src}]:o.value);e.watch(()=>n,async(i,c)=>{o.value=await Promise.all(i.value.map(async m=>({src:await re(m),type:m.type})))},{deep:!0}),e.watch(()=>o,async(i,c)=>{const m=a.multiple?o.value:[o.value[0]];r("update:modelValue",m),a.multiple||r("update:src",o.value[0]&&o.value[0].src)},{deep:!0});function l(i){n.value.splice(i,1)}return(i,c)=>{const m=e.resolveComponent("svg-icon"),f=e.resolveComponent("file-input");return e.openBlock(),e.createElementBlock("div",ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),(p,se)=>(e.openBlock(),e.createElementBlock("div",{key:p.src,class:"media-upload__thumbnail"},[e.createElementVNode("img",{src:p.src,class:"img-thumbnail rounded"},null,8,oe),e.createElementVNode("button",{onClick:e.withModifiers(ge=>l(se),["prevent"]),class:"btn btn--close"},[e.createVNode(m,{symbol:"x"})],8,de)]))),128)),e.createVNode(f,{modelValue:n.value,"onUpdate:modelValue":c[0]||(c[0]=p=>n.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,ie)])}}}),be="";s.BaseButton=x,s.CheckGroup=F,s.FileInput=ne,s.FormInput=O,s.InputDropdown=Z,s.InputTextarea=I,s.LoadingSpinner=V,s.MediaUpload=ce,s.RadioGroup=j,s.SvgIcon=g,Object.defineProperties(s,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -0,0 +1,305 @@
1
+ declare const _default: {
2
+ new (...args: any[]): {
3
+ $: import("vue").ComponentInternalInstance;
4
+ $data: {};
5
+ $props: Partial<{
6
+ label: string;
7
+ pattern: string;
8
+ required: boolean;
9
+ type: string;
10
+ checked: boolean;
11
+ modelValue: string;
12
+ variant: string;
13
+ name: string;
14
+ id: string;
15
+ disabled: boolean;
16
+ readOnly: boolean;
17
+ placeholder: string;
18
+ }> & Omit<Readonly<import("vue").ExtractPropTypes<{
19
+ modelValue: {
20
+ type: StringConstructor;
21
+ default: string;
22
+ };
23
+ type: {
24
+ type: StringConstructor;
25
+ default: string;
26
+ };
27
+ name: {
28
+ type: StringConstructor;
29
+ default: () => string;
30
+ };
31
+ id: {
32
+ type: StringConstructor;
33
+ default: () => string;
34
+ };
35
+ label: {
36
+ type: StringConstructor;
37
+ default: string;
38
+ };
39
+ placeholder: {
40
+ type: StringConstructor;
41
+ default: string;
42
+ };
43
+ variant: {
44
+ type: StringConstructor;
45
+ default: string;
46
+ };
47
+ disabled: {
48
+ type: BooleanConstructor;
49
+ default: boolean;
50
+ };
51
+ readOnly: {
52
+ type: BooleanConstructor;
53
+ default: boolean;
54
+ };
55
+ required: {
56
+ type: BooleanConstructor;
57
+ default: boolean;
58
+ };
59
+ maxlength: {
60
+ type: NumberConstructor;
61
+ };
62
+ pattern: {
63
+ type: StringConstructor;
64
+ default: null;
65
+ };
66
+ checked: {
67
+ type: BooleanConstructor;
68
+ default: boolean;
69
+ };
70
+ }>> & {
71
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
72
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "label" | "pattern" | "required" | "type" | "checked" | "modelValue" | "variant" | "name" | "id" | "disabled" | "readOnly" | "placeholder">;
73
+ $attrs: {
74
+ [x: string]: unknown;
75
+ };
76
+ $refs: {
77
+ [x: string]: unknown;
78
+ };
79
+ $slots: Readonly<{
80
+ [name: string]: import("vue").Slot | undefined;
81
+ }>;
82
+ $root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
83
+ $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
84
+ $emit: (event: "update:modelValue", ...args: any[]) => void;
85
+ $el: any;
86
+ $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
87
+ modelValue: {
88
+ type: StringConstructor;
89
+ default: string;
90
+ };
91
+ type: {
92
+ type: StringConstructor;
93
+ default: string;
94
+ };
95
+ name: {
96
+ type: StringConstructor;
97
+ default: () => string;
98
+ };
99
+ id: {
100
+ type: StringConstructor;
101
+ default: () => string;
102
+ };
103
+ label: {
104
+ type: StringConstructor;
105
+ default: string;
106
+ };
107
+ placeholder: {
108
+ type: StringConstructor;
109
+ default: string;
110
+ };
111
+ variant: {
112
+ type: StringConstructor;
113
+ default: string;
114
+ };
115
+ disabled: {
116
+ type: BooleanConstructor;
117
+ default: boolean;
118
+ };
119
+ readOnly: {
120
+ type: BooleanConstructor;
121
+ default: boolean;
122
+ };
123
+ required: {
124
+ type: BooleanConstructor;
125
+ default: boolean;
126
+ };
127
+ maxlength: {
128
+ type: NumberConstructor;
129
+ };
130
+ pattern: {
131
+ type: StringConstructor;
132
+ default: null;
133
+ };
134
+ checked: {
135
+ type: BooleanConstructor;
136
+ default: boolean;
137
+ };
138
+ }>> & {
139
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
140
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], string, {
141
+ label: string;
142
+ pattern: string;
143
+ required: boolean;
144
+ type: string;
145
+ checked: boolean;
146
+ modelValue: string;
147
+ variant: string;
148
+ name: string;
149
+ id: string;
150
+ disabled: boolean;
151
+ readOnly: boolean;
152
+ placeholder: string;
153
+ }> & {
154
+ beforeCreate?: ((() => void) | (() => void)[]) | undefined;
155
+ created?: ((() => void) | (() => void)[]) | undefined;
156
+ beforeMount?: ((() => void) | (() => void)[]) | undefined;
157
+ mounted?: ((() => void) | (() => void)[]) | undefined;
158
+ beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
159
+ updated?: ((() => void) | (() => void)[]) | undefined;
160
+ activated?: ((() => void) | (() => void)[]) | undefined;
161
+ deactivated?: ((() => void) | (() => void)[]) | undefined;
162
+ beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
163
+ beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
164
+ destroyed?: ((() => void) | (() => void)[]) | undefined;
165
+ unmounted?: ((() => void) | (() => void)[]) | undefined;
166
+ renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
167
+ renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
168
+ errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void)[]) | undefined;
169
+ };
170
+ $forceUpdate: () => void;
171
+ $nextTick: typeof import("vue").nextTick;
172
+ $watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
173
+ } & Readonly<import("vue").ExtractPropTypes<{
174
+ modelValue: {
175
+ type: StringConstructor;
176
+ default: string;
177
+ };
178
+ type: {
179
+ type: StringConstructor;
180
+ default: string;
181
+ };
182
+ name: {
183
+ type: StringConstructor;
184
+ default: () => string;
185
+ };
186
+ id: {
187
+ type: StringConstructor;
188
+ default: () => string;
189
+ };
190
+ label: {
191
+ type: StringConstructor;
192
+ default: string;
193
+ };
194
+ placeholder: {
195
+ type: StringConstructor;
196
+ default: string;
197
+ };
198
+ variant: {
199
+ type: StringConstructor;
200
+ default: string;
201
+ };
202
+ disabled: {
203
+ type: BooleanConstructor;
204
+ default: boolean;
205
+ };
206
+ readOnly: {
207
+ type: BooleanConstructor;
208
+ default: boolean;
209
+ };
210
+ required: {
211
+ type: BooleanConstructor;
212
+ default: boolean;
213
+ };
214
+ maxlength: {
215
+ type: NumberConstructor;
216
+ };
217
+ pattern: {
218
+ type: StringConstructor;
219
+ default: null;
220
+ };
221
+ checked: {
222
+ type: BooleanConstructor;
223
+ default: boolean;
224
+ };
225
+ }>> & {
226
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
227
+ } & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties;
228
+ __isFragment?: undefined;
229
+ __isTeleport?: undefined;
230
+ __isSuspense?: undefined;
231
+ } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
232
+ modelValue: {
233
+ type: StringConstructor;
234
+ default: string;
235
+ };
236
+ type: {
237
+ type: StringConstructor;
238
+ default: string;
239
+ };
240
+ name: {
241
+ type: StringConstructor;
242
+ default: () => string;
243
+ };
244
+ id: {
245
+ type: StringConstructor;
246
+ default: () => string;
247
+ };
248
+ label: {
249
+ type: StringConstructor;
250
+ default: string;
251
+ };
252
+ placeholder: {
253
+ type: StringConstructor;
254
+ default: string;
255
+ };
256
+ variant: {
257
+ type: StringConstructor;
258
+ default: string;
259
+ };
260
+ disabled: {
261
+ type: BooleanConstructor;
262
+ default: boolean;
263
+ };
264
+ readOnly: {
265
+ type: BooleanConstructor;
266
+ default: boolean;
267
+ };
268
+ required: {
269
+ type: BooleanConstructor;
270
+ default: boolean;
271
+ };
272
+ maxlength: {
273
+ type: NumberConstructor;
274
+ };
275
+ pattern: {
276
+ type: StringConstructor;
277
+ default: null;
278
+ };
279
+ checked: {
280
+ type: BooleanConstructor;
281
+ default: boolean;
282
+ };
283
+ }>> & {
284
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
285
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", {
286
+ label: string;
287
+ pattern: string;
288
+ required: boolean;
289
+ type: string;
290
+ checked: boolean;
291
+ modelValue: string;
292
+ variant: string;
293
+ name: string;
294
+ id: string;
295
+ disabled: boolean;
296
+ readOnly: boolean;
297
+ placeholder: string;
298
+ }> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
299
+ $slots: {
300
+ 'input-prepend': (_: {}) => any;
301
+ 'input-append': (_: {}) => any;
302
+ label: (_: {}) => any;
303
+ };
304
+ });
305
+ export default _default;
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ export { default as SvgIcon } from "./components/svg-icon.vue";
2
2
  export { default as LoadingSpinner } from "./components/loading-spinner.vue";
3
3
  export { default as BaseButton } from "./components/base-button.vue";
4
4
  export { default as FormInput } from "./components/form-input.vue";
5
+ export { default as InputTextarea } from "./components/input-textarea.vue";
5
6
  export { default as CheckGroup } from "./components/check-group.vue";
6
7
  export { default as RadioGroup } from "./components/radio-group.vue";
7
8
  export { default as InputDropdown } from "./components/input-dropdown.vue";
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-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}
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,.form-input>input,.form-input>select,.form-input>textarea{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.36",
4
+ "version": "0.0.37",
5
5
  "scripts": {
6
6
  "dev": "vite",
7
7
  "build": "vue-tsc --noEmit && vite build",