ablok-components 0.0.34 → 0.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as b, openBlock as u, createElementBlock as s, normalizeClass as
|
|
1
|
+
import { defineComponent as b, openBlock as u, createElementBlock as s, normalizeClass as g, createElementVNode as i, renderSlot as m, computed as h, resolveComponent as $, createBlock as O, createCommentVNode as q, unref as p, toDisplayString as v, withDirectives as M, isRef as U, vModelDynamic as T, vModelText as A, ref as k, watch as S, onBeforeMount as N, Fragment as B, renderList as w, createTextVNode as C, withModifiers as z, reactive as D, createVNode as L } from "vue";
|
|
2
2
|
const R = {
|
|
3
3
|
class: "icon",
|
|
4
4
|
preserveAspectRatio: "xMaxYMin"
|
|
@@ -24,7 +24,7 @@ const R = {
|
|
|
24
24
|
},
|
|
25
25
|
setup(e) {
|
|
26
26
|
return (r, t) => (u(), s("i", {
|
|
27
|
-
class:
|
|
27
|
+
class: g(["svg-icon", {
|
|
28
28
|
[`svg-icon--${e.size}`]: e.size
|
|
29
29
|
}])
|
|
30
30
|
}, [
|
|
@@ -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"],
|
|
85
|
+
const X = ["type", "disabled", "href", "to"], ke = /* @__PURE__ */ b({
|
|
86
86
|
__name: "base-button",
|
|
87
87
|
props: {
|
|
88
88
|
type: null,
|
|
@@ -99,7 +99,7 @@ const X = ["type", "disabled", "href", "to"], Be = /* @__PURE__ */ b({
|
|
|
99
99
|
fab: { type: Boolean }
|
|
100
100
|
},
|
|
101
101
|
setup(e) {
|
|
102
|
-
const r = e, t =
|
|
102
|
+
const r = e, t = h(() => r.caption && !r.fab);
|
|
103
103
|
return (a, n) => {
|
|
104
104
|
const d = $("svg-icon");
|
|
105
105
|
return u(), s("button", {
|
|
@@ -107,7 +107,7 @@ const X = ["type", "disabled", "href", "to"], Be = /* @__PURE__ */ b({
|
|
|
107
107
|
disabled: e.disabled,
|
|
108
108
|
href: e.href,
|
|
109
109
|
to: e.to,
|
|
110
|
-
class:
|
|
110
|
+
class: g(["base-button btn btn-primary", {
|
|
111
111
|
disabled: e.disabled,
|
|
112
112
|
pending: e.pending,
|
|
113
113
|
rounded: e.rounded,
|
|
@@ -127,8 +127,8 @@ const X = ["type", "disabled", "href", "to"], Be = /* @__PURE__ */ b({
|
|
|
127
127
|
}, null, 8, ["id"])) : q("", !0),
|
|
128
128
|
p(t) ? (u(), s("span", {
|
|
129
129
|
key: 1,
|
|
130
|
-
class:
|
|
131
|
-
},
|
|
130
|
+
class: g(["base-button__caption", { "icon-padding": e.icon }])
|
|
131
|
+
}, v(e.caption), 3)) : q("", !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"],
|
|
143
|
+
}, W = ["name", "id", "disabled", "read-only", "required", "aria-label"], Z = ["for", "innerHTML"], Be = /* @__PURE__ */ b({
|
|
144
144
|
__name: "form-input",
|
|
145
145
|
props: {
|
|
146
146
|
modelValue: {
|
|
@@ -197,7 +197,7 @@ 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 =
|
|
200
|
+
const t = e, a = h({
|
|
201
201
|
get() {
|
|
202
202
|
return t.modelValue;
|
|
203
203
|
},
|
|
@@ -206,7 +206,7 @@ const Y = { class: "input-group form-input__input-group" }, K = ["type", "id", "
|
|
|
206
206
|
}
|
|
207
207
|
});
|
|
208
208
|
return (n, d) => (u(), s("div", {
|
|
209
|
-
class:
|
|
209
|
+
class: g(["form-input", `form-input--${e.type}`])
|
|
210
210
|
}, [
|
|
211
211
|
i("div", Y, [
|
|
212
212
|
m(n.$slots, "input-prepend"),
|
|
@@ -222,9 +222,11 @@ 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: "form-control",
|
|
225
|
+
class: g(["form-control", {
|
|
226
|
+
"form-check-input": e.type === "checkbox"
|
|
227
|
+
}]),
|
|
226
228
|
"aria-label": e.label
|
|
227
|
-
}, null,
|
|
229
|
+
}, null, 10, K), [
|
|
228
230
|
[T, p(a)]
|
|
229
231
|
]),
|
|
230
232
|
m(n.$slots, "input-append", {}, () => [
|
|
@@ -248,9 +250,11 @@ const Y = { class: "input-group form-input__input-group" }, K = ["type", "id", "
|
|
|
248
250
|
m(n.$slots, "label", {}, () => [
|
|
249
251
|
i("label", {
|
|
250
252
|
for: e.id,
|
|
251
|
-
class: "form-input__label",
|
|
253
|
+
class: g(["form-input__label", {
|
|
254
|
+
"form-check-label": e.type === "checkbox"
|
|
255
|
+
}]),
|
|
252
256
|
innerHTML: `${e.label}${e.required ? " *" : ""}`
|
|
253
|
-
}, null,
|
|
257
|
+
}, null, 10, Z)
|
|
254
258
|
])
|
|
255
259
|
], 2));
|
|
256
260
|
}
|
|
@@ -296,7 +300,7 @@ const _ = { class: "radio-group" }, ee = ["for"], we = /* @__PURE__ */ b({
|
|
|
296
300
|
},
|
|
297
301
|
emits: ["change", "update:modelValue"],
|
|
298
302
|
setup(e, { emit: r }) {
|
|
299
|
-
const t = e, a =
|
|
303
|
+
const t = e, a = k([]);
|
|
300
304
|
return S(() => t.modelValue, (n, d) => {
|
|
301
305
|
a.value = t.options.map(
|
|
302
306
|
(l) => l.value ? t.modelValue.some((o) => o["value "] === l.value) : t.modelValue.some((o) => o === l)
|
|
@@ -311,7 +315,7 @@ const _ = { class: "radio-group" }, ee = ["for"], we = /* @__PURE__ */ b({
|
|
|
311
315
|
}), (n, d) => {
|
|
312
316
|
const l = $("form-input");
|
|
313
317
|
return u(), s("div", _, [
|
|
314
|
-
(u(!0), s(
|
|
318
|
+
(u(!0), s(B, null, w(e.options, (o, c) => (u(), O(l, {
|
|
315
319
|
key: c,
|
|
316
320
|
modelValue: p(a)[c],
|
|
317
321
|
"onUpdate:modelValue": (f) => p(a)[c] = f,
|
|
@@ -325,7 +329,7 @@ const _ = { class: "radio-group" }, ee = ["for"], we = /* @__PURE__ */ b({
|
|
|
325
329
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "name", "id", "label", "disabled", "read-only", "required"]))), 128)),
|
|
326
330
|
i("label", { for: e.id }, [
|
|
327
331
|
m(n.$slots, "label", {}, () => [
|
|
328
|
-
C(
|
|
332
|
+
C(v(e.label), 1)
|
|
329
333
|
])
|
|
330
334
|
], 8, ee)
|
|
331
335
|
]);
|
|
@@ -373,7 +377,7 @@ const _ = { class: "radio-group" }, ee = ["for"], we = /* @__PURE__ */ b({
|
|
|
373
377
|
emits: ["change", "update:modelValue"],
|
|
374
378
|
setup(e, { emit: r }) {
|
|
375
379
|
const t = e;
|
|
376
|
-
|
|
380
|
+
k(t.options.map((n) => n.value === t.modelValue));
|
|
377
381
|
function a(n) {
|
|
378
382
|
r("update:modelValue", n);
|
|
379
383
|
}
|
|
@@ -381,7 +385,7 @@ const _ = { class: "radio-group" }, ee = ["for"], we = /* @__PURE__ */ b({
|
|
|
381
385
|
}), (n, d) => {
|
|
382
386
|
const l = $("form-input");
|
|
383
387
|
return u(), s("div", te, [
|
|
384
|
-
(u(!0), s(
|
|
388
|
+
(u(!0), s(B, null, w(e.options, (o, c) => (u(), O(l, {
|
|
385
389
|
key: c,
|
|
386
390
|
type: "radio",
|
|
387
391
|
name: e.name,
|
|
@@ -396,7 +400,7 @@ const _ = { class: "radio-group" }, ee = ["for"], we = /* @__PURE__ */ b({
|
|
|
396
400
|
}, null, 8, ["name", "id", "value", "label", "checked", "disabled", "read-only", "required", "onChange"]))), 128)),
|
|
397
401
|
i("label", { for: e.id }, [
|
|
398
402
|
m(n.$slots, "label", {}, () => [
|
|
399
|
-
C(
|
|
403
|
+
C(v(e.label), 1)
|
|
400
404
|
])
|
|
401
405
|
], 8, le)
|
|
402
406
|
]);
|
|
@@ -464,7 +468,7 @@ const _ = { class: "radio-group" }, ee = ["for"], we = /* @__PURE__ */ b({
|
|
|
464
468
|
emits: ["update:modelValue"],
|
|
465
469
|
setup(e, { emit: r }) {
|
|
466
470
|
const t = e;
|
|
467
|
-
|
|
471
|
+
h({
|
|
468
472
|
get() {
|
|
469
473
|
return t.modelValue;
|
|
470
474
|
},
|
|
@@ -475,19 +479,19 @@ const _ = { class: "radio-group" }, ee = ["for"], we = /* @__PURE__ */ b({
|
|
|
475
479
|
function a(l) {
|
|
476
480
|
r("update:modelValue", l);
|
|
477
481
|
}
|
|
478
|
-
const n =
|
|
482
|
+
const n = h(() => [
|
|
479
483
|
{
|
|
480
484
|
text: "Please select"
|
|
481
485
|
},
|
|
482
486
|
...t.options.map(
|
|
483
487
|
(l) => typeof l == "string" ? { value: l, text: l } : l
|
|
484
488
|
)
|
|
485
|
-
]), d =
|
|
489
|
+
]), d = h(() => [...t.options].find((l) => JSON.stringify(l.value) === JSON.stringify(t.modelValue)));
|
|
486
490
|
return (l, o) => (u(), s("div", ae, [
|
|
487
491
|
i("div", ne, [
|
|
488
492
|
i("div", de, [
|
|
489
493
|
i("button", {
|
|
490
|
-
class:
|
|
494
|
+
class: g(["btn dropdown-toggle", {
|
|
491
495
|
[`btn-${e.variant}`]: e.variant,
|
|
492
496
|
[`btn-${e.color}`]: e.color,
|
|
493
497
|
[`btn-${e.disabled}`]: e.disabled,
|
|
@@ -498,17 +502,17 @@ const _ = { class: "radio-group" }, ee = ["for"], we = /* @__PURE__ */ b({
|
|
|
498
502
|
"data-bs-toggle": "dropdown",
|
|
499
503
|
"aria-expanded": "false",
|
|
500
504
|
disabled: e.disabled
|
|
501
|
-
},
|
|
505
|
+
}, v(p(d) ? p(d).text : e.placeholder), 11, oe),
|
|
502
506
|
i("ul", {
|
|
503
507
|
class: "dropdown-menu",
|
|
504
508
|
"aria-labelledby": e.id
|
|
505
509
|
}, [
|
|
506
|
-
(u(!0), s(
|
|
510
|
+
(u(!0), s(B, null, w(p(n), (c, f) => (u(), s("li", { key: f }, [
|
|
507
511
|
m(l.$slots, "option", {}, () => [
|
|
508
512
|
i("a", {
|
|
509
513
|
class: "dropdown-item",
|
|
510
514
|
onClick: z((V) => a(c.value), ["prevent"])
|
|
511
|
-
},
|
|
515
|
+
}, v(c.text), 9, ue)
|
|
512
516
|
])
|
|
513
517
|
]))), 128))
|
|
514
518
|
], 8, ie)
|
|
@@ -516,7 +520,7 @@ const _ = { class: "radio-group" }, ee = ["for"], we = /* @__PURE__ */ b({
|
|
|
516
520
|
]),
|
|
517
521
|
i("label", { for: e.id }, [
|
|
518
522
|
m(l.$slots, "label", {}, () => [
|
|
519
|
-
C(
|
|
523
|
+
C(v(e.label), 1)
|
|
520
524
|
])
|
|
521
525
|
], 8, re)
|
|
522
526
|
]));
|
|
@@ -580,11 +584,11 @@ const _ = { class: "radio-group" }, ee = ["for"], we = /* @__PURE__ */ b({
|
|
|
580
584
|
a.push(o);
|
|
581
585
|
}));
|
|
582
586
|
}
|
|
583
|
-
const a = D([]), n =
|
|
584
|
-
return
|
|
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) => {
|
|
585
589
|
console.log("file input", d), r("update:modelValue", d);
|
|
586
590
|
}, { deep: !0 }), (d, l) => (u(), s("div", {
|
|
587
|
-
class:
|
|
591
|
+
class: g(["form-input file-input", "file-input--primary"])
|
|
588
592
|
}, [
|
|
589
593
|
i("input", {
|
|
590
594
|
type: "file",
|
|
@@ -684,7 +688,7 @@ const Me = /* @__PURE__ */ b({
|
|
|
684
688
|
},
|
|
685
689
|
emits: ["update:modelValue", "update:src"],
|
|
686
690
|
setup(e, { emit: r }) {
|
|
687
|
-
const t = e, a =
|
|
691
|
+
const t = e, a = k([]), n = k([]), d = h(() => t.modelValue.length ? t.modelValue : t.src ? [{ type: "", src: t.src }] : n.value);
|
|
688
692
|
S(() => a, async (o, c) => {
|
|
689
693
|
n.value = await Promise.all(
|
|
690
694
|
o.value.map(async (f) => ({
|
|
@@ -702,7 +706,7 @@ const Me = /* @__PURE__ */ b({
|
|
|
702
706
|
return (o, c) => {
|
|
703
707
|
const f = $("svg-icon"), V = $("file-input");
|
|
704
708
|
return u(), s("div", pe, [
|
|
705
|
-
(u(!0), s(
|
|
709
|
+
(u(!0), s(B, null, w(p(d), (x, I) => (u(), s("div", {
|
|
706
710
|
key: x.src,
|
|
707
711
|
class: "media-upload__thumbnail"
|
|
708
712
|
}, [
|
|
@@ -734,10 +738,10 @@ const Me = /* @__PURE__ */ b({
|
|
|
734
738
|
}
|
|
735
739
|
});
|
|
736
740
|
export {
|
|
737
|
-
|
|
741
|
+
ke as BaseButton,
|
|
738
742
|
we as CheckGroup,
|
|
739
743
|
Ce as FileInput,
|
|
740
|
-
|
|
744
|
+
Be as FormInput,
|
|
741
745
|
Oe as InputDropdown,
|
|
742
746
|
xe as LoadingSpinner,
|
|
743
747
|
Me as MediaUpload,
|
|
@@ -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"},g=["xlink:href"],b=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,g)]))],2))}}),oe="",h={class:"loading-spinner d-block"},B={class:"loading-spinner__animation"},k={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",B,[(e.openBlock(),e.createElementBlock("svg",k,[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:"form-control","aria-label":t.label},null,8,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:"form-input__label",innerHTML:`${t.label}${t.required?" *":""}`},null,8,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=b,Object.defineProperties(s,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(s,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(s=typeof globalThis<"u"?globalThis:s||self,e(s.AblokComponents={},s.Vue))})(this,function(s,e){"use strict";const y={class:"icon",preserveAspectRatio:"xMaxYMin"},b=["xlink:href"],g=e.defineComponent({__name:"svg-icon",props:{basePath:{type:String,default:"/symbol-defs.svg"},prefix:{type:String,default:"icon-"},symbol:{type:String,default:""},size:{type:String,default:"default"}},setup(t){return(r,l)=>(e.openBlock(),e.createElementBlock("i",{class:e.normalizeClass(["svg-icon",{[`svg-icon--${t.size}`]:t.size}])},[(e.openBlock(),e.createElementBlock("svg",y,[e.createElementVNode("use",{"xlink:href":`${t.basePath}#${t.prefix}${t.symbol}`,"xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0",y:"0"},null,8,b)]))],2))}}),oe="",h={class:"loading-spinner d-block"},k={class:"loading-spinner__animation"},B={class:"d-block",version:"1.1",id:"L9",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 100 100","enable-background":"new 0 0 0 0","xml:space":"preserve"},$=["fill"],S=[e.createElementVNode("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"1s",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"},null,-1)],V=e.defineComponent({__name:"loading-spinner",props:{color:{type:String,default:"#fff"}},setup(t){return(r,l)=>(e.openBlock(),e.createElementBlock("span",h,[e.createElementVNode("span",k,[(e.openBlock(),e.createElementBlock("svg",B,[e.createElementVNode("path",{fill:t.color,d:"M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50"},S,8,$)]))]),e.renderSlot(r.$slots,"default")]))}}),ie="",E=["type","disabled","href","to"],w=e.defineComponent({__name:"base-button",props:{type:null,caption:null,variant:null,size:null,icon:null,href:null,to:null,disabled:{type:Boolean},pending:{type:Boolean},outlined:{type:Boolean},rounded:{type:Boolean},fab:{type:Boolean}},setup(t){const r=t,l=e.computed(()=>r.caption&&!r.fab);return(a,o)=>{const d=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("button",{type:t.type,disabled:t.disabled,href:t.href,to:t.to,class:e.normalizeClass(["base-button btn btn-primary",{disabled:t.disabled,pending:t.pending,rounded:t.rounded,outlined:t.outlined,fab:t.fab,"x-large":t.size==="x-large",large:t.size==="large",small:t.size==="small","x-small":t.size==="x-small"}])},[e.renderSlot(a.$slots,"default",{},()=>[t.icon?(e.openBlock(),e.createBlock(d,{key:0,id:t.icon,class:"base-button__caption"},null,8,["id"])):e.createCommentVNode("",!0),e.unref(l)?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["base-button__caption",{"icon-padding":t.icon}])},e.toDisplayString(t.caption),3)):e.createCommentVNode("",!0)])],10,E)}}}),re="";function u(){return(new Date().valueOf()+Math.random()).toString(36)}const N={class:"input-group form-input__input-group"},C=["type","id","name","placeholder","pattern","disabled","read-only","required","maxlength","checked","aria-label"],x={key:0,class:"form-input__color-swatch"},q=["name","id","disabled","read-only","required","aria-label"],M=["for","innerHTML"],O=e.defineComponent({__name:"form-input",props:{modelValue:{type:[String,Number,Boolean],default:""},type:{type:String,default:"text"},name:{type:String,default:()=>u()},id:{type:String,default:()=>u()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},maxlength:{type:Number},pattern:{type:String,default:null},checked:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:r}){const l=t,a=e.computed({get(){return l.modelValue},set(o){r("update:modelValue",o)}});return(o,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["form-input",`form-input--${t.type}`])},[e.createElementVNode("div",N,[e.renderSlot(o.$slots,"input-prepend"),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":d[0]||(d[0]=n=>e.isRef(a)?a.value=n:null),type:t.type==="color"?"text":t.type,id:t.id,name:t.name,placeholder:t.placeholder,pattern:t.pattern,disabled:t.disabled,"read-only":t.readOnly,required:t.required,maxlength:t.maxlength,checked:t.checked,class:e.normalizeClass(["form-control",{"form-check-input":t.type==="checkbox"}]),"aria-label":t.label},null,10,C),[[e.vModelDynamic,e.unref(a)]]),e.renderSlot(o.$slots,"input-append",{},()=>[t.type==="color"?(e.openBlock(),e.createElementBlock("span",x,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":d[1]||(d[1]=n=>e.isRef(a)?a.value=n:null),type:"color",name:`${t.name}-color`,id:`${t.id}-color`,disabled:t.disabled,"read-only":t.readOnly,required:t.required,class:"form-control","aria-label":t.label},null,8,q),[[e.vModelText,e.unref(a)]])])):e.createCommentVNode("",!0)])]),e.renderSlot(o.$slots,"label",{},()=>[e.createElementVNode("label",{for:t.id,class:e.normalizeClass(["form-input__label",{"form-check-label":t.type==="checkbox"}]),innerHTML:`${t.label}${t.required?" *":""}`},null,10,M)])],2))}}),ce="",z={class:"radio-group"},D=["for"],L=e.defineComponent({__name:"check-group",props:{modelValue:{default:[]},options:{type:Array,default:[]},name:{type:String,default:()=>u()},id:{type:String,default:()=>u()},label:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1}},emits:["change","update:modelValue"],setup(t,{emit:r}){const l=t,a=e.ref([]);return e.watch(()=>l.modelValue,(o,d)=>{a.value=l.options.map(n=>n.value?l.modelValue.some(i=>i["value "]===n.value):l.modelValue.some(i=>i===n))},{immediate:!0}),e.watch(a,(o,d)=>{const n=o.reduce((i,c,m)=>{const f=c&&l.options[m]?[l.options[m]||l.options[m]]:[];return[...i,...f]},[]);r("update:modelValue",n)},{deep:!0}),e.onBeforeMount(()=>{}),(o,d)=>{const n=e.resolveComponent("form-input");return e.openBlock(),e.createElementBlock("div",z,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,(i,c)=>(e.openBlock(),e.createBlock(n,{key:c,modelValue:e.unref(a)[c],"onUpdate:modelValue":m=>e.unref(a)[c]=m,type:"checkbox",name:t.name,id:`${t.id}-${c}`,label:`${i.text||i}${t.required?" *":""}`,disabled:t.disabled,"read-only":t.readOnly,required:t.required},null,8,["modelValue","onUpdate:modelValue","name","id","label","disabled","read-only","required"]))),128)),e.createElementVNode("label",{for:t.id},[e.renderSlot(o.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)])],8,D)])}}}),T={class:"radio-group"},U=["for"],A=e.defineComponent({__name:"radio-group",props:{modelValue:{default:!1},options:{type:Array,default:[]},name:{type:String,default:()=>u()},id:{type:String,default:()=>u()},label:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1}},emits:["change","update:modelValue"],setup(t,{emit:r}){const l=t;e.ref(l.options.map(o=>o.value===l.modelValue));function a(o){r("update:modelValue",o)}return e.onBeforeMount(()=>{}),(o,d)=>{const n=e.resolveComponent("form-input");return e.openBlock(),e.createElementBlock("div",T,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,(i,c)=>(e.openBlock(),e.createBlock(n,{key:c,type:"radio",name:t.name,id:`${t.id}-${c}`,value:i.value||i,label:`${i.text||i}${t.required?" *":""}`,checked:i.value?i.value===t.modelValue:i===t.modelValue,disabled:t.disabled,"read-only":t.readOnly,required:t.required,onChange:m=>a(i)},null,8,["name","id","value","label","checked","disabled","read-only","required","onChange"]))),128)),e.createElementVNode("label",{for:t.id},[e.renderSlot(o.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)])],8,U)])}}}),F={class:"input input-dropdown"},I={class:"dropdown"},R={class:"btn-group",role:"group"},P=["id","disabled"],j=["aria-labelledby"],H=["onClick"],G=["for"],J=e.defineComponent({__name:"input-dropdown",props:{modelValue:{type:[String,Number,Boolean,Object],default:""},name:{type:String,default:()=>u()},id:{type:String,default:()=>u()},label:{type:String,default:""},placeholder:{type:String,default:"Please select"},options:{type:Array,default:[]},variant:{type:String,default:""},color:{type:String,default:""},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},required:{type:Boolean,default:!1},outline:{type:Boolean,default:!0},resetOption:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t,{emit:r}){const l=t;e.computed({get(){return l.modelValue},set(n){r("update:modelValue",n)}});function a(n){r("update:modelValue",n)}const o=e.computed(()=>[{text:"Please select"},...l.options.map(n=>typeof n=="string"?{value:n,text:n}:n)]),d=e.computed(()=>[...l.options].find(n=>JSON.stringify(n.value)===JSON.stringify(l.modelValue)));return(n,i)=>(e.openBlock(),e.createElementBlock("div",F,[e.createElementVNode("div",I,[e.createElementVNode("div",R,[e.createElementVNode("button",{class:e.normalizeClass(["btn dropdown-toggle",{[`btn-${t.variant}`]:t.variant,[`btn-${t.color}`]:t.color,[`btn-${t.disabled}`]:t.disabled,[`btn-outline-${t.color||"dark"}`]:t.outline}]),type:"button",id:t.id,"data-bs-toggle":"dropdown","aria-expanded":"false",disabled:t.disabled},e.toDisplayString(e.unref(d)?e.unref(d).text:t.placeholder),11,P),e.createElementVNode("ul",{class:"dropdown-menu","aria-labelledby":t.id},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o),(c,m)=>(e.openBlock(),e.createElementBlock("li",{key:m},[e.renderSlot(n.$slots,"option",{},()=>[e.createElementVNode("a",{class:"dropdown-item",onClick:e.withModifiers(f=>a(c.value),["prevent"])},e.toDisplayString(c.text),9,H)])]))),128))],8,j)])]),e.createElementVNode("label",{for:t.id},[e.renderSlot(n.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)])],8,G)]))}}),X=["id","name","multiple","accept"],Y={class:"form-input__input-group input-group"},K=["value","id","name"],Q=["for"],W=["for","innerHTML"],Z=e.defineComponent({__name:"file-input",props:{modelValue:{type:Array,default:[]},name:{type:String,default:()=>u()},id:{type:String,default:()=>u()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},pattern:{type:String,default:null},multiple:{type:Boolean,default:!1},accept:{type:String}},emits:["update:modelValue"],setup(t,{emit:r}){function l(d){const n=d.target&&d.target.files;n&&(a.splice(0,a.length),Array.from(n).forEach(i=>{a.push(i)}))}const a=e.reactive([]),o=e.computed(()=>a&&a.map(d=>d.name));return e.computed(()=>a.map(d=>URL.createObjectURL(d))),e.watch(()=>a,(d,n)=>{console.log("file input",d),r("update:modelValue",d)},{deep:!0}),(d,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["form-input file-input","file-input--primary"])},[e.createElementVNode("input",{type:"file",id:t.id,name:t.name,class:"d-none",onChange:l,multiple:t.multiple,accept:t.accept},null,40,X),e.createElementVNode("div",Y,[e.renderSlot(d.$slots,"input-prepend"),e.createElementVNode("input",{type:"text",value:e.unref(o),id:t.id,name:t.name,class:"form-control"},null,8,K),e.renderSlot(d.$slots,"input-append",{},()=>[e.createElementVNode("label",{for:t.id,class:"btn btn-outline-dark"}," Select Image ",8,Q)])]),e.renderSlot(d.$slots,"label",{},()=>[e.createElementVNode("label",{for:t.id,class:"form-input__label",innerHTML:`${t.label}${t.required?" *":""}`},null,8,W)])]))}}),_={class:"media-upload"},v=["src"],ee=["onClick"],te=["for"];async function le(t){return await new Promise(r=>{let l=new FileReader;l.onload=()=>r(l.result),l.readAsDataURL(t)})}const ne=e.defineComponent({__name:"media-upload",props:{modelValue:{type:Array,default:[]},src:{type:String},name:{type:String,default:()=>u()},id:{type:String,default:()=>u()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},pattern:{type:String,default:null},multiple:{type:Boolean,default:!1},accept:{type:String,default:"image/*"}},emits:["update:modelValue","update:src"],setup(t,{emit:r}){const l=t,a=e.ref([]),o=e.ref([]),d=e.computed(()=>l.modelValue.length?l.modelValue:l.src?[{type:"",src:l.src}]:o.value);e.watch(()=>a,async(i,c)=>{o.value=await Promise.all(i.value.map(async m=>({src:await le(m),type:m.type})))},{deep:!0}),e.watch(()=>o,async(i,c)=>{const m=l.multiple?o.value:[o.value[0]];r("update:modelValue",m),l.multiple||r("update:src",o.value[0]&&o.value[0].src)},{deep:!0});function n(i){a.value.splice(i,1)}return(i,c)=>{const m=e.resolveComponent("svg-icon"),f=e.resolveComponent("file-input");return e.openBlock(),e.createElementBlock("div",_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),(p,ae)=>(e.openBlock(),e.createElementBlock("div",{key:p.src,class:"media-upload__thumbnail"},[e.createElementVNode("img",{src:p.src,class:"img-thumbnail rounded"},null,8,v),e.createElementVNode("button",{onClick:e.withModifiers(me=>n(ae),["prevent"]),class:"btn btn--close"},[e.createVNode(m,{symbol:"x"})],8,ee)]))),128)),e.createVNode(f,{modelValue:a.value,"onUpdate:modelValue":c[0]||(c[0]=p=>a.value=p),id:t.id,name:t.name,accept:t.accept,class:"d-none"},null,8,["modelValue","id","name","accept"]),e.createElementVNode("label",{for:t.id,class:"btn btn-outline-dark"}," Select Image ",8,te)])}}}),se="";s.BaseButton=w,s.CheckGroup=L,s.FileInput=Z,s.FormInput=O,s.InputDropdown=J,s.LoadingSpinner=V,s.MediaUpload=ne,s.RadioGroup=A,s.SvgIcon=g,Object.defineProperties(s,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -7,10 +7,10 @@ declare const _default: {
|
|
|
7
7
|
label: string;
|
|
8
8
|
pattern: string;
|
|
9
9
|
required: boolean;
|
|
10
|
-
modelValue:
|
|
10
|
+
modelValue: {
|
|
11
11
|
type?: string | undefined;
|
|
12
|
-
src
|
|
13
|
-
}
|
|
12
|
+
src?: string | undefined;
|
|
13
|
+
}[];
|
|
14
14
|
variant: string;
|
|
15
15
|
name: string;
|
|
16
16
|
id: string;
|
|
@@ -22,28 +22,28 @@ declare const _default: {
|
|
|
22
22
|
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
23
23
|
modelValue: {
|
|
24
24
|
type: {
|
|
25
|
-
(arrayLength: number):
|
|
25
|
+
(arrayLength: number): {
|
|
26
26
|
type?: string | undefined;
|
|
27
|
-
src
|
|
28
|
-
}
|
|
29
|
-
(...items:
|
|
27
|
+
src?: string | undefined;
|
|
28
|
+
}[];
|
|
29
|
+
(...items: {
|
|
30
30
|
type?: string | undefined;
|
|
31
|
-
src
|
|
32
|
-
}
|
|
31
|
+
src?: string | undefined;
|
|
32
|
+
}[]): {
|
|
33
33
|
type?: string | undefined;
|
|
34
|
-
src
|
|
35
|
-
}
|
|
36
|
-
new (arrayLength: number):
|
|
34
|
+
src?: string | undefined;
|
|
35
|
+
}[];
|
|
36
|
+
new (arrayLength: number): {
|
|
37
37
|
type?: string | undefined;
|
|
38
|
-
src
|
|
39
|
-
}
|
|
40
|
-
new (...items:
|
|
38
|
+
src?: string | undefined;
|
|
39
|
+
}[];
|
|
40
|
+
new (...items: {
|
|
41
41
|
type?: string | undefined;
|
|
42
|
-
src
|
|
43
|
-
}
|
|
42
|
+
src?: string | undefined;
|
|
43
|
+
}[]): {
|
|
44
44
|
type?: string | undefined;
|
|
45
|
-
src
|
|
46
|
-
}
|
|
45
|
+
src?: string | undefined;
|
|
46
|
+
}[];
|
|
47
47
|
isArray(arg: any): arg is any[];
|
|
48
48
|
readonly prototype: any[];
|
|
49
49
|
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
@@ -122,28 +122,28 @@ declare const _default: {
|
|
|
122
122
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
123
123
|
modelValue: {
|
|
124
124
|
type: {
|
|
125
|
-
(arrayLength: number):
|
|
125
|
+
(arrayLength: number): {
|
|
126
126
|
type?: string | undefined;
|
|
127
|
-
src
|
|
128
|
-
}
|
|
129
|
-
(...items:
|
|
127
|
+
src?: string | undefined;
|
|
128
|
+
}[];
|
|
129
|
+
(...items: {
|
|
130
130
|
type?: string | undefined;
|
|
131
|
-
src
|
|
132
|
-
}
|
|
131
|
+
src?: string | undefined;
|
|
132
|
+
}[]): {
|
|
133
133
|
type?: string | undefined;
|
|
134
|
-
src
|
|
135
|
-
}
|
|
136
|
-
new (arrayLength: number):
|
|
134
|
+
src?: string | undefined;
|
|
135
|
+
}[];
|
|
136
|
+
new (arrayLength: number): {
|
|
137
137
|
type?: string | undefined;
|
|
138
|
-
src
|
|
139
|
-
}
|
|
140
|
-
new (...items:
|
|
138
|
+
src?: string | undefined;
|
|
139
|
+
}[];
|
|
140
|
+
new (...items: {
|
|
141
141
|
type?: string | undefined;
|
|
142
|
-
src
|
|
143
|
-
}
|
|
142
|
+
src?: string | undefined;
|
|
143
|
+
}[]): {
|
|
144
144
|
type?: string | undefined;
|
|
145
|
-
src
|
|
146
|
-
}
|
|
145
|
+
src?: string | undefined;
|
|
146
|
+
}[];
|
|
147
147
|
isArray(arg: any): arg is any[];
|
|
148
148
|
readonly prototype: any[];
|
|
149
149
|
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
@@ -209,10 +209,10 @@ declare const _default: {
|
|
|
209
209
|
label: string;
|
|
210
210
|
pattern: string;
|
|
211
211
|
required: boolean;
|
|
212
|
-
modelValue:
|
|
212
|
+
modelValue: {
|
|
213
213
|
type?: string | undefined;
|
|
214
|
-
src
|
|
215
|
-
}
|
|
214
|
+
src?: string | undefined;
|
|
215
|
+
}[];
|
|
216
216
|
variant: string;
|
|
217
217
|
name: string;
|
|
218
218
|
id: string;
|
|
@@ -244,28 +244,28 @@ declare const _default: {
|
|
|
244
244
|
} & Readonly<import("vue").ExtractPropTypes<{
|
|
245
245
|
modelValue: {
|
|
246
246
|
type: {
|
|
247
|
-
(arrayLength: number):
|
|
247
|
+
(arrayLength: number): {
|
|
248
248
|
type?: string | undefined;
|
|
249
|
-
src
|
|
250
|
-
}
|
|
251
|
-
(...items:
|
|
249
|
+
src?: string | undefined;
|
|
250
|
+
}[];
|
|
251
|
+
(...items: {
|
|
252
252
|
type?: string | undefined;
|
|
253
|
-
src
|
|
254
|
-
}
|
|
253
|
+
src?: string | undefined;
|
|
254
|
+
}[]): {
|
|
255
255
|
type?: string | undefined;
|
|
256
|
-
src
|
|
257
|
-
}
|
|
258
|
-
new (arrayLength: number):
|
|
256
|
+
src?: string | undefined;
|
|
257
|
+
}[];
|
|
258
|
+
new (arrayLength: number): {
|
|
259
259
|
type?: string | undefined;
|
|
260
|
-
src
|
|
261
|
-
}
|
|
262
|
-
new (...items:
|
|
260
|
+
src?: string | undefined;
|
|
261
|
+
}[];
|
|
262
|
+
new (...items: {
|
|
263
263
|
type?: string | undefined;
|
|
264
|
-
src
|
|
265
|
-
}
|
|
264
|
+
src?: string | undefined;
|
|
265
|
+
}[]): {
|
|
266
266
|
type?: string | undefined;
|
|
267
|
-
src
|
|
268
|
-
}
|
|
267
|
+
src?: string | undefined;
|
|
268
|
+
}[];
|
|
269
269
|
isArray(arg: any): arg is any[];
|
|
270
270
|
readonly prototype: any[];
|
|
271
271
|
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
@@ -334,28 +334,28 @@ declare const _default: {
|
|
|
334
334
|
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
335
335
|
modelValue: {
|
|
336
336
|
type: {
|
|
337
|
-
(arrayLength: number):
|
|
337
|
+
(arrayLength: number): {
|
|
338
338
|
type?: string | undefined;
|
|
339
|
-
src
|
|
340
|
-
}
|
|
341
|
-
(...items:
|
|
339
|
+
src?: string | undefined;
|
|
340
|
+
}[];
|
|
341
|
+
(...items: {
|
|
342
342
|
type?: string | undefined;
|
|
343
|
-
src
|
|
344
|
-
}
|
|
343
|
+
src?: string | undefined;
|
|
344
|
+
}[]): {
|
|
345
345
|
type?: string | undefined;
|
|
346
|
-
src
|
|
347
|
-
}
|
|
348
|
-
new (arrayLength: number):
|
|
346
|
+
src?: string | undefined;
|
|
347
|
+
}[];
|
|
348
|
+
new (arrayLength: number): {
|
|
349
349
|
type?: string | undefined;
|
|
350
|
-
src
|
|
351
|
-
}
|
|
352
|
-
new (...items:
|
|
350
|
+
src?: string | undefined;
|
|
351
|
+
}[];
|
|
352
|
+
new (...items: {
|
|
353
353
|
type?: string | undefined;
|
|
354
|
-
src
|
|
355
|
-
}
|
|
354
|
+
src?: string | undefined;
|
|
355
|
+
}[]): {
|
|
356
356
|
type?: string | undefined;
|
|
357
|
-
src
|
|
358
|
-
}
|
|
357
|
+
src?: string | undefined;
|
|
358
|
+
}[];
|
|
359
359
|
isArray(arg: any): arg is any[];
|
|
360
360
|
readonly prototype: any[];
|
|
361
361
|
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
@@ -421,10 +421,10 @@ declare const _default: {
|
|
|
421
421
|
label: string;
|
|
422
422
|
pattern: string;
|
|
423
423
|
required: boolean;
|
|
424
|
-
modelValue:
|
|
424
|
+
modelValue: {
|
|
425
425
|
type?: string | undefined;
|
|
426
|
-
src
|
|
427
|
-
}
|
|
426
|
+
src?: string | undefined;
|
|
427
|
+
}[];
|
|
428
428
|
variant: string;
|
|
429
429
|
name: string;
|
|
430
430
|
id: string;
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.svg-icon{display:inline-block}.svg-icon svg{display:block;stroke-width:0;stroke:currentColor;fill:currentColor;width:1.5em;height:1.5em}.svg-icon--xxl svg{width:12rem;height:12rem}.svg-icon--xl svg{width:8rem;height:8rem}.svg-icon--large svg{width:4rem;height:4rem}.loading-spinner{min-width:2rem}.base-button{display:flex;justify-content:center;align-items:center;box-sizing:border-box;transition:all .2s ease;text-decoration:none;width:100%;margin:0;padding:1.036em 1.625em;appearance:none;outline:none;border:none;border-radius:.4375em;font-size:.875em;line-height:1.125em;text-transform:uppercase;font-weight:700}@media screen and (min-width: 600px){.base-button{width:auto}}.base-button .icon{width:16px;height:16px;margin-top:-1px}.base-button.s-collapsed>.caption{display:none}.base-button.s-pending{background-repeat:no-repeat;background-position:center center}.base-button.s-pending .caption{margin-left:25px;visibility:hidden}@media screen and (min-width: 600px){.base-button.s-pending{background-position:1.625em center}.base-button.s-pending .caption{visibility:visible}}.base-button[readonly],.base-button[disabled]{cursor:not-allowed}.form-input{display:flex;flex-flow:column}.form-input>*{order:2}.form-input__label{order:0}.form-input__input-group{flex-wrap:nowrap;order:1}.form-input__color-swatch{flex:0 0 3rem;display:block;border-top-right-radius:var(--border-radius);border-bottom-right-radius:var(--border-radius);overflow:hidden;border:thin solid var(--border-color);border-left:none}.form-input input[type=color]{display:block;height:100%;padding:0;border-width:0}.form-input input[type=color]::-webkit-color-swatch-wrapper{padding:0}.form-input input[type=color]::-webkit-color-swatch{border:none}:root,*:before,*:after{--border-color: #ced4da;--border-radius: .25rem}.media-upload__thumbnail{position:relative}.media-upload__thumbnail .btn{position:absolute;right:0;top:0}
|
|
1
|
+
.svg-icon{display:inline-block}.svg-icon svg{display:block;stroke-width:0;stroke:currentColor;fill:currentColor;width:1.5em;height:1.5em}.svg-icon--xxl svg{width:12rem;height:12rem}.svg-icon--xl svg{width:8rem;height:8rem}.svg-icon--large svg{width:4rem;height:4rem}.loading-spinner{min-width:2rem}.base-button{display:flex;justify-content:center;align-items:center;box-sizing:border-box;transition:all .2s ease;text-decoration:none;width:100%;margin:0;padding:1.036em 1.625em;appearance:none;outline:none;border:none;border-radius:.4375em;font-size:.875em;line-height:1.125em;text-transform:uppercase;font-weight:700}@media screen and (min-width: 600px){.base-button{width:auto}}.base-button .icon{width:16px;height:16px;margin-top:-1px}.base-button.s-collapsed>.caption{display:none}.base-button.s-pending{background-repeat:no-repeat;background-position:center center}.base-button.s-pending .caption{margin-left:25px;visibility:hidden}@media screen and (min-width: 600px){.base-button.s-pending{background-position:1.625em center}.base-button.s-pending .caption{visibility:visible}}.base-button[readonly],.base-button[disabled]{cursor:not-allowed}.form-input{display:flex;flex-flow:column}.form-input>*{order:2}.form-input__label{order:0}.form-input__input-group{flex-wrap:nowrap;order:1}.form-input__color-swatch{flex:0 0 3rem;display:block;border-top-right-radius:var(--border-radius);border-bottom-right-radius:var(--border-radius);overflow:hidden;border:thin solid var(--border-color);border-left:none}.form-input input[type=checkbox],.form-input input[type=radio]{flex:none}.form-input input[type=color]{display:block;height:100%;padding:0;border-width:0}.form-input input[type=color]::-webkit-color-swatch-wrapper{padding:0}.form-input input[type=color]::-webkit-color-swatch{border:none}.form-switch .form-check-input{width:2.5rem;height:1.3125rem}:root,*:before,*:after{--border-color: #ced4da;--border-radius: .25rem}.media-upload__thumbnail{position:relative}.media-upload__thumbnail .btn{position:absolute;right:0;top:0}
|