ablok-components 0.0.29 → 0.0.32
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.
- package/dist/App.vue.d.ts +45 -1
- package/dist/ablok-components.es.js +461 -311
- package/dist/ablok-components.umd.js +1 -5
- package/dist/components/base-button.story.vue.d.ts +48 -0
- package/dist/components/base-button.vue.d.ts +87 -15
- package/dist/components/base-form.vue.d.ts +66 -8
- package/dist/components/check-group.vue.d.ts +189 -42
- package/dist/components/file-input.vue.d.ts +338 -0
- package/dist/components/form-input.vue.d.ts +244 -60
- package/dist/components/input-dropdown.vue.d.ts +285 -72
- package/dist/components/loading-spinner.vue.d.ts +68 -8
- package/dist/components/media-upload.vue.d.ts +342 -0
- package/dist/components/radio-group.vue.d.ts +189 -42
- package/dist/components/svg-icon.vue.d.ts +109 -21
- package/dist/index.d.ts +2 -0
- package/dist/style.css +1 -1
- package/dist/symbol-defs.svg +323 -0
- package/package.json +6 -6
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import { defineComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, computed, resolveComponent, createBlock, createCommentVNode, unref, toDisplayString, withDirectives, isRef, vModelDynamic, vModelText, ref, watch
|
|
2
|
-
|
|
3
|
-
const _hoisted_1$6 = {
|
|
1
|
+
import { defineComponent as p, openBlock as u, createElementBlock as s, normalizeClass as v, createElementVNode as i, renderSlot as f, computed as g, resolveComponent as V, createBlock as w, createCommentVNode as k, unref as y, toDisplayString as h, withDirectives as M, isRef as C, vModelDynamic as N, vModelText as U, ref as S, watch as $, onBeforeMount as L, Fragment as B, renderList as x, createTextVNode as q, withModifiers as z, reactive as I, createVNode as T } from "vue";
|
|
2
|
+
const A = {
|
|
4
3
|
class: "icon",
|
|
5
4
|
preserveAspectRatio: "xMaxYMin"
|
|
6
|
-
}
|
|
7
|
-
const _hoisted_2$5 = ["xlink:href"];
|
|
8
|
-
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
5
|
+
}, D = ["xlink:href"], he = /* @__PURE__ */ p({
|
|
9
6
|
__name: "svg-icon",
|
|
10
7
|
props: {
|
|
11
8
|
basePath: {
|
|
12
9
|
type: String,
|
|
13
|
-
default: "/
|
|
10
|
+
default: "/symbol-defs.svg"
|
|
14
11
|
},
|
|
15
12
|
prefix: {
|
|
16
13
|
type: String,
|
|
@@ -25,29 +22,24 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
25
22
|
default: "default"
|
|
26
23
|
}
|
|
27
24
|
},
|
|
28
|
-
setup(
|
|
29
|
-
return (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
], 2);
|
|
44
|
-
};
|
|
25
|
+
setup(e) {
|
|
26
|
+
return (r, a) => (u(), s("i", {
|
|
27
|
+
class: v(["svg-icon", {
|
|
28
|
+
[`svg-icon--${e.size}`]: e.size
|
|
29
|
+
}])
|
|
30
|
+
}, [
|
|
31
|
+
(u(), s("svg", A, [
|
|
32
|
+
i("use", {
|
|
33
|
+
"xlink:href": `${e.basePath}#${e.prefix}${e.symbol}`,
|
|
34
|
+
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
35
|
+
x: "0",
|
|
36
|
+
y: "0"
|
|
37
|
+
}, null, 8, D)
|
|
38
|
+
]))
|
|
39
|
+
], 2));
|
|
45
40
|
}
|
|
46
41
|
});
|
|
47
|
-
|
|
48
|
-
const _hoisted_1$5 = { class: "loading-spinner d-block" };
|
|
49
|
-
const _hoisted_2$4 = { class: "loading-spinner__animation" };
|
|
50
|
-
const _hoisted_3$2 = {
|
|
42
|
+
const R = { class: "loading-spinner d-block" }, P = { class: "loading-spinner__animation" }, F = {
|
|
51
43
|
class: "d-block",
|
|
52
44
|
version: "1.1",
|
|
53
45
|
id: "L9",
|
|
@@ -58,9 +50,7 @@ const _hoisted_3$2 = {
|
|
|
58
50
|
viewBox: "0 0 100 100",
|
|
59
51
|
"enable-background": "new 0 0 0 0",
|
|
60
52
|
"xml:space": "preserve"
|
|
61
|
-
}
|
|
62
|
-
const _hoisted_4$2 = ["fill"];
|
|
63
|
-
const _hoisted_5$2 = /* @__PURE__ */ createElementVNode("animateTransform", {
|
|
53
|
+
}, H = ["fill"], E = /* @__PURE__ */ i("animateTransform", {
|
|
64
54
|
attributeName: "transform",
|
|
65
55
|
attributeType: "XML",
|
|
66
56
|
type: "rotate",
|
|
@@ -68,11 +58,9 @@ const _hoisted_5$2 = /* @__PURE__ */ createElementVNode("animateTransform", {
|
|
|
68
58
|
from: "0 50 50",
|
|
69
59
|
to: "360 50 50",
|
|
70
60
|
repeatCount: "indefinite"
|
|
71
|
-
}, null, -1)
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
];
|
|
75
|
-
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
61
|
+
}, null, -1), j = [
|
|
62
|
+
E
|
|
63
|
+
], ve = /* @__PURE__ */ p({
|
|
76
64
|
__name: "loading-spinner",
|
|
77
65
|
props: {
|
|
78
66
|
color: {
|
|
@@ -80,25 +68,21 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
80
68
|
default: "#fff"
|
|
81
69
|
}
|
|
82
70
|
},
|
|
83
|
-
setup(
|
|
84
|
-
return (
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
(
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
]);
|
|
96
|
-
};
|
|
71
|
+
setup(e) {
|
|
72
|
+
return (r, a) => (u(), s("span", R, [
|
|
73
|
+
i("span", P, [
|
|
74
|
+
(u(), s("svg", F, [
|
|
75
|
+
i("path", {
|
|
76
|
+
fill: e.color,
|
|
77
|
+
d: "M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50"
|
|
78
|
+
}, j, 8, H)
|
|
79
|
+
]))
|
|
80
|
+
]),
|
|
81
|
+
f(r.$slots, "default")
|
|
82
|
+
]));
|
|
97
83
|
}
|
|
98
84
|
});
|
|
99
|
-
|
|
100
|
-
const _hoisted_1$4 = ["type", "disabled", "href", "to"];
|
|
101
|
-
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
85
|
+
const G = ["type", "disabled", "href", "to"], $e = /* @__PURE__ */ p({
|
|
102
86
|
__name: "base-button",
|
|
103
87
|
props: {
|
|
104
88
|
type: null,
|
|
@@ -114,58 +98,49 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
114
98
|
rounded: { type: Boolean },
|
|
115
99
|
fab: { type: Boolean }
|
|
116
100
|
},
|
|
117
|
-
setup(
|
|
118
|
-
const
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
"x-
|
|
136
|
-
"large": __props.size === "large",
|
|
137
|
-
"small": __props.size === "small",
|
|
138
|
-
"x-small": __props.size === "x-small"
|
|
101
|
+
setup(e) {
|
|
102
|
+
const r = e, a = g(() => r.caption && !r.fab);
|
|
103
|
+
return (n, d) => {
|
|
104
|
+
const l = V("svg-icon");
|
|
105
|
+
return u(), s("button", {
|
|
106
|
+
type: e.type,
|
|
107
|
+
disabled: e.disabled,
|
|
108
|
+
href: e.href,
|
|
109
|
+
to: e.to,
|
|
110
|
+
class: v(["base-button btn btn-primary", {
|
|
111
|
+
disabled: e.disabled,
|
|
112
|
+
pending: e.pending,
|
|
113
|
+
rounded: e.rounded,
|
|
114
|
+
outlined: e.outlined,
|
|
115
|
+
fab: e.fab,
|
|
116
|
+
"x-large": e.size === "x-large",
|
|
117
|
+
large: e.size === "large",
|
|
118
|
+
small: e.size === "small",
|
|
119
|
+
"x-small": e.size === "x-small"
|
|
139
120
|
}])
|
|
140
121
|
}, [
|
|
141
|
-
|
|
142
|
-
|
|
122
|
+
f(n.$slots, "default", {}, () => [
|
|
123
|
+
e.icon ? (u(), w(l, {
|
|
143
124
|
key: 0,
|
|
144
|
-
id:
|
|
125
|
+
id: e.icon,
|
|
145
126
|
class: "base-button__caption"
|
|
146
|
-
}, null, 8, ["id"])) :
|
|
147
|
-
|
|
127
|
+
}, null, 8, ["id"])) : k("", !0),
|
|
128
|
+
y(a) ? (u(), s("span", {
|
|
148
129
|
key: 1,
|
|
149
|
-
class:
|
|
150
|
-
},
|
|
130
|
+
class: v(["base-button__caption", { "icon-padding": e.icon }])
|
|
131
|
+
}, h(e.caption), 3)) : k("", !0)
|
|
151
132
|
])
|
|
152
|
-
], 10,
|
|
133
|
+
], 10, G);
|
|
153
134
|
};
|
|
154
135
|
}
|
|
155
136
|
});
|
|
156
|
-
function
|
|
137
|
+
function m() {
|
|
157
138
|
return (new Date().valueOf() + Math.random()).toString(36);
|
|
158
139
|
}
|
|
159
|
-
|
|
160
|
-
const _hoisted_1$3 = { class: "input-group form-input__input-group" };
|
|
161
|
-
const _hoisted_2$3 = ["type", "name", "id", "label", "placeholder", "pattern", "disabled", "read-only", "required", "maxlength", "checked", "aria-label"];
|
|
162
|
-
const _hoisted_3$1 = {
|
|
140
|
+
const J = { class: "input-group form-input__input-group" }, X = ["type", "id", "name", "placeholder", "pattern", "disabled", "read-only", "required", "maxlength", "checked", "aria-label"], Y = {
|
|
163
141
|
key: 0,
|
|
164
142
|
class: "form-input__color-swatch"
|
|
165
|
-
}
|
|
166
|
-
const _hoisted_4$1 = ["name", "id", "disabled", "read-only", "required", "aria-label"];
|
|
167
|
-
const _hoisted_5$1 = ["for", "innerHTML"];
|
|
168
|
-
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
143
|
+
}, K = ["name", "id", "disabled", "read-only", "required", "aria-label"], Q = ["for", "innerHTML"], Se = /* @__PURE__ */ p({
|
|
169
144
|
__name: "form-input",
|
|
170
145
|
props: {
|
|
171
146
|
modelValue: {
|
|
@@ -178,11 +153,11 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
178
153
|
},
|
|
179
154
|
name: {
|
|
180
155
|
type: String,
|
|
181
|
-
default: () =>
|
|
156
|
+
default: () => m()
|
|
182
157
|
},
|
|
183
158
|
id: {
|
|
184
159
|
type: String,
|
|
185
|
-
default: () =>
|
|
160
|
+
default: () => m()
|
|
186
161
|
},
|
|
187
162
|
label: {
|
|
188
163
|
type: String,
|
|
@@ -198,15 +173,15 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
198
173
|
},
|
|
199
174
|
disabled: {
|
|
200
175
|
type: Boolean,
|
|
201
|
-
default:
|
|
176
|
+
default: !1
|
|
202
177
|
},
|
|
203
178
|
readOnly: {
|
|
204
179
|
type: Boolean,
|
|
205
|
-
default:
|
|
180
|
+
default: !1
|
|
206
181
|
},
|
|
207
182
|
required: {
|
|
208
183
|
type: Boolean,
|
|
209
|
-
default:
|
|
184
|
+
default: !1
|
|
210
185
|
},
|
|
211
186
|
maxlength: {
|
|
212
187
|
type: Number
|
|
@@ -217,76 +192,70 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
217
192
|
},
|
|
218
193
|
checked: {
|
|
219
194
|
type: Boolean,
|
|
220
|
-
default:
|
|
195
|
+
default: !1
|
|
221
196
|
}
|
|
222
197
|
},
|
|
223
198
|
emits: ["update:modelValue"],
|
|
224
|
-
setup(
|
|
225
|
-
const
|
|
226
|
-
const model = computed({
|
|
199
|
+
setup(e, { emit: r }) {
|
|
200
|
+
const a = e, n = g({
|
|
227
201
|
get() {
|
|
228
|
-
return
|
|
202
|
+
return a.modelValue;
|
|
229
203
|
},
|
|
230
|
-
set(
|
|
231
|
-
|
|
204
|
+
set(d) {
|
|
205
|
+
r("update:modelValue", d);
|
|
232
206
|
}
|
|
233
207
|
});
|
|
234
|
-
return (
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
}, null, 8, _hoisted_2$3), [
|
|
256
|
-
[vModelDynamic, unref(model)]
|
|
257
|
-
]),
|
|
258
|
-
renderSlot(_ctx.$slots, "input-append", {}, () => [
|
|
259
|
-
__props.type === "color" ? (openBlock(), createElementBlock("span", _hoisted_3$1, [
|
|
260
|
-
withDirectives(createElementVNode("input", {
|
|
261
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(model) ? model.value = $event : null),
|
|
262
|
-
type: "color",
|
|
263
|
-
name: `${__props.name}-color`,
|
|
264
|
-
id: `${__props.id}-color`,
|
|
265
|
-
disabled: __props.disabled,
|
|
266
|
-
"read-only": __props.readOnly,
|
|
267
|
-
required: __props.required,
|
|
268
|
-
class: "form-control",
|
|
269
|
-
"aria-label": __props.label
|
|
270
|
-
}, null, 8, _hoisted_4$1), [
|
|
271
|
-
[vModelText, unref(model)]
|
|
272
|
-
])
|
|
273
|
-
])) : createCommentVNode("", true)
|
|
274
|
-
])
|
|
208
|
+
return (d, l) => (u(), s("div", {
|
|
209
|
+
class: v(["form-input", `form-input--${e.type}`])
|
|
210
|
+
}, [
|
|
211
|
+
i("div", J, [
|
|
212
|
+
f(d.$slots, "input-prepend"),
|
|
213
|
+
M(i("input", {
|
|
214
|
+
"onUpdate:modelValue": l[0] || (l[0] = (t) => C(n) ? n.value = t : null),
|
|
215
|
+
type: e.type === "color" ? "text" : e.type,
|
|
216
|
+
id: e.id,
|
|
217
|
+
name: e.name,
|
|
218
|
+
placeholder: e.placeholder,
|
|
219
|
+
pattern: e.pattern,
|
|
220
|
+
disabled: e.disabled,
|
|
221
|
+
"read-only": e.readOnly,
|
|
222
|
+
required: e.required,
|
|
223
|
+
maxlength: e.maxlength,
|
|
224
|
+
checked: e.checked,
|
|
225
|
+
class: "form-control",
|
|
226
|
+
"aria-label": e.label
|
|
227
|
+
}, null, 8, X), [
|
|
228
|
+
[N, y(n)]
|
|
275
229
|
]),
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
230
|
+
f(d.$slots, "input-append", {}, () => [
|
|
231
|
+
e.type === "color" ? (u(), s("span", Y, [
|
|
232
|
+
M(i("input", {
|
|
233
|
+
"onUpdate:modelValue": l[1] || (l[1] = (t) => C(n) ? n.value = t : null),
|
|
234
|
+
type: "color",
|
|
235
|
+
name: `${e.name}-color`,
|
|
236
|
+
id: `${e.id}-color`,
|
|
237
|
+
disabled: e.disabled,
|
|
238
|
+
"read-only": e.readOnly,
|
|
239
|
+
required: e.required,
|
|
240
|
+
class: "form-control",
|
|
241
|
+
"aria-label": e.label
|
|
242
|
+
}, null, 8, K), [
|
|
243
|
+
[U, y(n)]
|
|
244
|
+
])
|
|
245
|
+
])) : k("", !0)
|
|
282
246
|
])
|
|
283
|
-
],
|
|
284
|
-
|
|
247
|
+
]),
|
|
248
|
+
f(d.$slots, "label", {}, () => [
|
|
249
|
+
i("label", {
|
|
250
|
+
for: e.id,
|
|
251
|
+
class: "form-input__label",
|
|
252
|
+
innerHTML: `${e.label}${e.required ? " *" : ""}`
|
|
253
|
+
}, null, 8, Q)
|
|
254
|
+
])
|
|
255
|
+
], 2));
|
|
285
256
|
}
|
|
286
257
|
});
|
|
287
|
-
const
|
|
288
|
-
const _hoisted_2$2 = ["for"];
|
|
289
|
-
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
258
|
+
const W = { class: "radio-group" }, Z = ["for"], Ve = /* @__PURE__ */ p({
|
|
290
259
|
__name: "check-group",
|
|
291
260
|
props: {
|
|
292
261
|
modelValue: {
|
|
@@ -298,11 +267,11 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
298
267
|
},
|
|
299
268
|
name: {
|
|
300
269
|
type: String,
|
|
301
|
-
default: () =>
|
|
270
|
+
default: () => m()
|
|
302
271
|
},
|
|
303
272
|
id: {
|
|
304
273
|
type: String,
|
|
305
|
-
default: () =>
|
|
274
|
+
default: () => m()
|
|
306
275
|
},
|
|
307
276
|
label: {
|
|
308
277
|
type: String,
|
|
@@ -314,66 +283,59 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
314
283
|
},
|
|
315
284
|
disabled: {
|
|
316
285
|
type: Boolean,
|
|
317
|
-
default:
|
|
286
|
+
default: !1
|
|
318
287
|
},
|
|
319
288
|
readOnly: {
|
|
320
289
|
type: Boolean,
|
|
321
|
-
default:
|
|
290
|
+
default: !1
|
|
322
291
|
},
|
|
323
292
|
required: {
|
|
324
293
|
type: Boolean,
|
|
325
|
-
default:
|
|
294
|
+
default: !1
|
|
326
295
|
}
|
|
327
296
|
},
|
|
328
297
|
emits: ["change", "update:modelValue"],
|
|
329
|
-
setup(
|
|
330
|
-
const
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
const
|
|
337
|
-
const
|
|
338
|
-
return [...
|
|
298
|
+
setup(e, { emit: r }) {
|
|
299
|
+
const a = e, n = S([]);
|
|
300
|
+
return $(() => a.modelValue, (d, l) => {
|
|
301
|
+
n.value = a.options.map(
|
|
302
|
+
(t) => t.value ? a.modelValue.some((o) => o["value "] === t.value) : a.modelValue.some((o) => o === t)
|
|
303
|
+
);
|
|
304
|
+
}, { immediate: !0 }), $(n, (d, l) => {
|
|
305
|
+
const t = d.reduce((o, c, b) => {
|
|
306
|
+
const O = c && a.options[b] ? [a.options[b] || a.options[b]] : [];
|
|
307
|
+
return [...o, ...O];
|
|
339
308
|
}, []);
|
|
340
|
-
|
|
341
|
-
}, { deep:
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
}), 128)),
|
|
361
|
-
createElementVNode("label", { for: __props.id }, [
|
|
362
|
-
renderSlot(_ctx.$slots, "label", {}, () => [
|
|
363
|
-
createTextVNode(toDisplayString(__props.label), 1)
|
|
309
|
+
r("update:modelValue", t);
|
|
310
|
+
}, { deep: !0 }), L(() => {
|
|
311
|
+
}), (d, l) => {
|
|
312
|
+
const t = V("form-input");
|
|
313
|
+
return u(), s("div", W, [
|
|
314
|
+
(u(!0), s(B, null, x(e.options, (o, c) => (u(), w(t, {
|
|
315
|
+
key: c,
|
|
316
|
+
modelValue: y(n)[c],
|
|
317
|
+
"onUpdate:modelValue": (b) => y(n)[c] = b,
|
|
318
|
+
type: "checkbox",
|
|
319
|
+
name: e.name,
|
|
320
|
+
id: `${e.id}-${c}`,
|
|
321
|
+
label: `${o.text || o}${e.required ? " *" : ""}`,
|
|
322
|
+
disabled: e.disabled,
|
|
323
|
+
"read-only": e.readOnly,
|
|
324
|
+
required: e.required
|
|
325
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "name", "id", "label", "disabled", "read-only", "required"]))), 128)),
|
|
326
|
+
i("label", { for: e.id }, [
|
|
327
|
+
f(d.$slots, "label", {}, () => [
|
|
328
|
+
q(h(e.label), 1)
|
|
364
329
|
])
|
|
365
|
-
], 8,
|
|
330
|
+
], 8, Z)
|
|
366
331
|
]);
|
|
367
332
|
};
|
|
368
333
|
}
|
|
369
|
-
})
|
|
370
|
-
const _hoisted_1$1 = { class: "radio-group" };
|
|
371
|
-
const _hoisted_2$1 = ["for"];
|
|
372
|
-
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
334
|
+
}), _ = { class: "radio-group" }, ee = ["for"], Be = /* @__PURE__ */ p({
|
|
373
335
|
__name: "radio-group",
|
|
374
336
|
props: {
|
|
375
337
|
modelValue: {
|
|
376
|
-
default:
|
|
338
|
+
default: !1
|
|
377
339
|
},
|
|
378
340
|
options: {
|
|
379
341
|
type: Array,
|
|
@@ -381,11 +343,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
381
343
|
},
|
|
382
344
|
name: {
|
|
383
345
|
type: String,
|
|
384
|
-
default: () =>
|
|
346
|
+
default: () => m()
|
|
385
347
|
},
|
|
386
348
|
id: {
|
|
387
349
|
type: String,
|
|
388
|
-
default: () =>
|
|
350
|
+
default: () => m()
|
|
389
351
|
},
|
|
390
352
|
label: {
|
|
391
353
|
type: String,
|
|
@@ -397,64 +359,53 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
397
359
|
},
|
|
398
360
|
disabled: {
|
|
399
361
|
type: Boolean,
|
|
400
|
-
default:
|
|
362
|
+
default: !1
|
|
401
363
|
},
|
|
402
364
|
readOnly: {
|
|
403
365
|
type: Boolean,
|
|
404
|
-
default:
|
|
366
|
+
default: !1
|
|
405
367
|
},
|
|
406
368
|
required: {
|
|
407
369
|
type: Boolean,
|
|
408
|
-
default:
|
|
370
|
+
default: !1
|
|
409
371
|
}
|
|
410
372
|
},
|
|
411
373
|
emits: ["change", "update:modelValue"],
|
|
412
|
-
setup(
|
|
413
|
-
const
|
|
414
|
-
|
|
415
|
-
function
|
|
416
|
-
|
|
374
|
+
setup(e, { emit: r }) {
|
|
375
|
+
const a = e;
|
|
376
|
+
S(a.options.map((d) => d.value === a.modelValue));
|
|
377
|
+
function n(d) {
|
|
378
|
+
r("update:modelValue", d);
|
|
417
379
|
}
|
|
418
|
-
|
|
419
|
-
})
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
createElementVNode("label", { for: __props.id }, [
|
|
439
|
-
renderSlot(_ctx.$slots, "label", {}, () => [
|
|
440
|
-
createTextVNode(toDisplayString(__props.label), 1)
|
|
380
|
+
return L(() => {
|
|
381
|
+
}), (d, l) => {
|
|
382
|
+
const t = V("form-input");
|
|
383
|
+
return u(), s("div", _, [
|
|
384
|
+
(u(!0), s(B, null, x(e.options, (o, c) => (u(), w(t, {
|
|
385
|
+
key: c,
|
|
386
|
+
type: "radio",
|
|
387
|
+
name: e.name,
|
|
388
|
+
id: `${e.id}-${c}`,
|
|
389
|
+
value: o.value || o,
|
|
390
|
+
label: `${o.text || o}${e.required ? " *" : ""}`,
|
|
391
|
+
checked: o.value ? o.value === e.modelValue : o === e.modelValue,
|
|
392
|
+
disabled: e.disabled,
|
|
393
|
+
"read-only": e.readOnly,
|
|
394
|
+
required: e.required,
|
|
395
|
+
onChange: (b) => n(o)
|
|
396
|
+
}, null, 8, ["name", "id", "value", "label", "checked", "disabled", "read-only", "required", "onChange"]))), 128)),
|
|
397
|
+
i("label", { for: e.id }, [
|
|
398
|
+
f(d.$slots, "label", {}, () => [
|
|
399
|
+
q(h(e.label), 1)
|
|
441
400
|
])
|
|
442
|
-
], 8,
|
|
401
|
+
], 8, ee)
|
|
443
402
|
]);
|
|
444
403
|
};
|
|
445
404
|
}
|
|
446
|
-
})
|
|
447
|
-
const _hoisted_1 = { class: "input input-dropdown" };
|
|
448
|
-
const _hoisted_2 = { class: "dropdown" };
|
|
449
|
-
const _hoisted_3 = {
|
|
405
|
+
}), te = { class: "input input-dropdown" }, le = { class: "dropdown" }, ae = {
|
|
450
406
|
class: "btn-group",
|
|
451
407
|
role: "group"
|
|
452
|
-
}
|
|
453
|
-
const _hoisted_4 = ["id", "disabled"];
|
|
454
|
-
const _hoisted_5 = ["aria-labelledby"];
|
|
455
|
-
const _hoisted_6 = ["onClick"];
|
|
456
|
-
const _hoisted_7 = ["for"];
|
|
457
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
408
|
+
}, ne = ["id", "disabled"], de = ["aria-labelledby"], oe = ["onClick"], ie = ["for"], xe = /* @__PURE__ */ p({
|
|
458
409
|
__name: "input-dropdown",
|
|
459
410
|
props: {
|
|
460
411
|
modelValue: {
|
|
@@ -463,11 +414,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
463
414
|
},
|
|
464
415
|
name: {
|
|
465
416
|
type: String,
|
|
466
|
-
default: () =>
|
|
417
|
+
default: () => m()
|
|
467
418
|
},
|
|
468
419
|
id: {
|
|
469
420
|
type: String,
|
|
470
|
-
default: () =>
|
|
421
|
+
default: () => m()
|
|
471
422
|
},
|
|
472
423
|
label: {
|
|
473
424
|
type: String,
|
|
@@ -491,91 +442,290 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
491
442
|
},
|
|
492
443
|
disabled: {
|
|
493
444
|
type: Boolean,
|
|
494
|
-
default:
|
|
445
|
+
default: !1
|
|
495
446
|
},
|
|
496
447
|
multiple: {
|
|
497
448
|
type: Boolean,
|
|
498
|
-
default:
|
|
449
|
+
default: !1
|
|
499
450
|
},
|
|
500
451
|
required: {
|
|
501
452
|
type: Boolean,
|
|
502
|
-
default:
|
|
453
|
+
default: !1
|
|
503
454
|
},
|
|
504
455
|
outline: {
|
|
505
456
|
type: Boolean,
|
|
506
|
-
default:
|
|
457
|
+
default: !0
|
|
507
458
|
},
|
|
508
459
|
resetOption: {
|
|
509
460
|
type: Boolean,
|
|
510
|
-
default:
|
|
461
|
+
default: !0
|
|
511
462
|
}
|
|
512
463
|
},
|
|
513
464
|
emits: ["update:modelValue"],
|
|
514
|
-
setup(
|
|
515
|
-
const
|
|
516
|
-
|
|
465
|
+
setup(e, { emit: r }) {
|
|
466
|
+
const a = e;
|
|
467
|
+
g({
|
|
517
468
|
get() {
|
|
518
|
-
return
|
|
469
|
+
return a.modelValue;
|
|
519
470
|
},
|
|
520
|
-
set(
|
|
521
|
-
|
|
471
|
+
set(t) {
|
|
472
|
+
r("update:modelValue", t);
|
|
522
473
|
}
|
|
523
474
|
});
|
|
524
|
-
function
|
|
525
|
-
|
|
475
|
+
function n(t) {
|
|
476
|
+
r("update:modelValue", t);
|
|
526
477
|
}
|
|
527
|
-
const
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
478
|
+
const d = g(() => [
|
|
479
|
+
{
|
|
480
|
+
text: "Please select"
|
|
481
|
+
},
|
|
482
|
+
...a.options.map(
|
|
483
|
+
(t) => typeof t == "string" ? { value: t, text: t } : t
|
|
484
|
+
)
|
|
485
|
+
]), l = g(() => [...a.options].find((t) => JSON.stringify(t.value) === JSON.stringify(a.modelValue)));
|
|
486
|
+
return (t, o) => (u(), s("div", te, [
|
|
487
|
+
i("div", le, [
|
|
488
|
+
i("div", ae, [
|
|
489
|
+
i("button", {
|
|
490
|
+
class: v(["btn dropdown-toggle", {
|
|
491
|
+
[`btn-${e.variant}`]: e.variant,
|
|
492
|
+
[`btn-${e.color}`]: e.color,
|
|
493
|
+
[`btn-${e.disabled}`]: e.disabled,
|
|
494
|
+
[`btn-outline-${e.color || "dark"}`]: e.outline
|
|
495
|
+
}]),
|
|
496
|
+
type: "button",
|
|
497
|
+
id: e.id,
|
|
498
|
+
"data-bs-toggle": "dropdown",
|
|
499
|
+
"aria-expanded": "false",
|
|
500
|
+
disabled: e.disabled
|
|
501
|
+
}, h(y(l) ? y(l).text : e.placeholder), 11, ne),
|
|
502
|
+
i("ul", {
|
|
503
|
+
class: "dropdown-menu",
|
|
504
|
+
"aria-labelledby": e.id
|
|
505
|
+
}, [
|
|
506
|
+
(u(!0), s(B, null, x(y(d), (c, b) => (u(), s("li", { key: b }, [
|
|
507
|
+
f(t.$slots, "option", {}, () => [
|
|
508
|
+
i("a", {
|
|
509
|
+
class: "dropdown-item",
|
|
510
|
+
onClick: z((O) => n(c.value), ["prevent"])
|
|
511
|
+
}, h(c.text), 9, oe)
|
|
512
|
+
])
|
|
513
|
+
]))), 128))
|
|
514
|
+
], 8, de)
|
|
515
|
+
])
|
|
516
|
+
]),
|
|
517
|
+
i("label", { for: e.id }, [
|
|
518
|
+
f(t.$slots, "label", {}, () => [
|
|
519
|
+
q(h(e.label), 1)
|
|
520
|
+
])
|
|
521
|
+
], 8, ie)
|
|
522
|
+
]));
|
|
523
|
+
}
|
|
524
|
+
}), ue = ["id", "name", "multiple", "accept"], re = { class: "form-input__input-group input-group" }, se = ["value", "id", "name"], ce = ["for"], fe = ["for", "innerHTML"], ke = /* @__PURE__ */ p({
|
|
525
|
+
__name: "file-input",
|
|
526
|
+
props: {
|
|
527
|
+
modelValue: {
|
|
528
|
+
type: Array,
|
|
529
|
+
default: []
|
|
530
|
+
},
|
|
531
|
+
name: {
|
|
532
|
+
type: String,
|
|
533
|
+
default: () => m()
|
|
534
|
+
},
|
|
535
|
+
id: {
|
|
536
|
+
type: String,
|
|
537
|
+
default: () => m()
|
|
538
|
+
},
|
|
539
|
+
label: {
|
|
540
|
+
type: String,
|
|
541
|
+
default: ""
|
|
542
|
+
},
|
|
543
|
+
placeholder: {
|
|
544
|
+
type: String,
|
|
545
|
+
default: ""
|
|
546
|
+
},
|
|
547
|
+
variant: {
|
|
548
|
+
type: String,
|
|
549
|
+
default: ""
|
|
550
|
+
},
|
|
551
|
+
disabled: {
|
|
552
|
+
type: Boolean,
|
|
553
|
+
default: !1
|
|
554
|
+
},
|
|
555
|
+
readOnly: {
|
|
556
|
+
type: Boolean,
|
|
557
|
+
default: !1
|
|
558
|
+
},
|
|
559
|
+
required: {
|
|
560
|
+
type: Boolean,
|
|
561
|
+
default: !1
|
|
562
|
+
},
|
|
563
|
+
pattern: {
|
|
564
|
+
type: String,
|
|
565
|
+
default: null
|
|
566
|
+
},
|
|
567
|
+
multiple: {
|
|
568
|
+
type: Boolean,
|
|
569
|
+
default: !1
|
|
570
|
+
},
|
|
571
|
+
accept: {
|
|
572
|
+
type: String
|
|
573
|
+
}
|
|
574
|
+
},
|
|
575
|
+
emits: ["update:modelValue"],
|
|
576
|
+
setup(e, { emit: r }) {
|
|
577
|
+
function a(l) {
|
|
578
|
+
const t = l.target && l.target.files;
|
|
579
|
+
t && (n.splice(0, n.length), Array.from(t).forEach((o) => {
|
|
580
|
+
n.push(o);
|
|
581
|
+
}));
|
|
582
|
+
}
|
|
583
|
+
const n = I([]), d = g(() => n && n.map((l) => l.name));
|
|
584
|
+
return g(() => n.map((l) => URL.createObjectURL(l))), $(() => n, (l, t) => {
|
|
585
|
+
console.log("file input", l), r("update:modelValue", l);
|
|
586
|
+
}, { deep: !0 }), (l, t) => (u(), s("div", {
|
|
587
|
+
class: v(["form-input file-input", "file-input--primary"])
|
|
588
|
+
}, [
|
|
589
|
+
i("input", {
|
|
590
|
+
type: "file",
|
|
591
|
+
id: e.id,
|
|
592
|
+
name: e.name,
|
|
593
|
+
class: "d-none",
|
|
594
|
+
onChange: a,
|
|
595
|
+
multiple: e.multiple,
|
|
596
|
+
accept: e.accept
|
|
597
|
+
}, null, 40, ue),
|
|
598
|
+
i("div", re, [
|
|
599
|
+
f(l.$slots, "input-prepend"),
|
|
600
|
+
i("input", {
|
|
601
|
+
type: "text",
|
|
602
|
+
value: y(d),
|
|
603
|
+
id: e.id,
|
|
604
|
+
name: e.name,
|
|
605
|
+
class: "form-control"
|
|
606
|
+
}, null, 8, se),
|
|
607
|
+
f(l.$slots, "input-append", {}, () => [
|
|
608
|
+
i("label", {
|
|
609
|
+
for: e.id,
|
|
610
|
+
class: "btn btn-outline-dark"
|
|
611
|
+
}, " Select Image ", 8, ce)
|
|
612
|
+
])
|
|
613
|
+
]),
|
|
614
|
+
f(l.$slots, "label", {}, () => [
|
|
615
|
+
i("label", {
|
|
616
|
+
for: e.id,
|
|
617
|
+
class: "form-input__label",
|
|
618
|
+
innerHTML: `${e.label}${e.required ? " *" : ""}`
|
|
619
|
+
}, null, 8, fe)
|
|
620
|
+
])
|
|
621
|
+
]));
|
|
622
|
+
}
|
|
623
|
+
}), me = { class: "media-upload" }, ye = ["src"], pe = ["for"];
|
|
624
|
+
async function be(e) {
|
|
625
|
+
return await new Promise((r) => {
|
|
626
|
+
let a = new FileReader();
|
|
627
|
+
a.onload = () => r(a.result), a.readAsDataURL(e);
|
|
628
|
+
});
|
|
629
|
+
}
|
|
630
|
+
const we = /* @__PURE__ */ p({
|
|
631
|
+
__name: "media-upload",
|
|
632
|
+
props: {
|
|
633
|
+
modelValue: {
|
|
634
|
+
type: Array,
|
|
635
|
+
default: []
|
|
636
|
+
},
|
|
637
|
+
name: {
|
|
638
|
+
type: String,
|
|
639
|
+
default: () => m()
|
|
640
|
+
},
|
|
641
|
+
id: {
|
|
642
|
+
type: String,
|
|
643
|
+
default: () => m()
|
|
644
|
+
},
|
|
645
|
+
label: {
|
|
646
|
+
type: String,
|
|
647
|
+
default: ""
|
|
648
|
+
},
|
|
649
|
+
placeholder: {
|
|
650
|
+
type: String,
|
|
651
|
+
default: ""
|
|
652
|
+
},
|
|
653
|
+
variant: {
|
|
654
|
+
type: String,
|
|
655
|
+
default: ""
|
|
656
|
+
},
|
|
657
|
+
disabled: {
|
|
658
|
+
type: Boolean,
|
|
659
|
+
default: !1
|
|
660
|
+
},
|
|
661
|
+
readOnly: {
|
|
662
|
+
type: Boolean,
|
|
663
|
+
default: !1
|
|
664
|
+
},
|
|
665
|
+
required: {
|
|
666
|
+
type: Boolean,
|
|
667
|
+
default: !1
|
|
668
|
+
},
|
|
669
|
+
pattern: {
|
|
670
|
+
type: String,
|
|
671
|
+
default: null
|
|
672
|
+
},
|
|
673
|
+
multiple: {
|
|
674
|
+
type: Boolean,
|
|
675
|
+
default: !1
|
|
676
|
+
},
|
|
677
|
+
accept: {
|
|
678
|
+
type: String,
|
|
679
|
+
default: "image/*"
|
|
680
|
+
}
|
|
681
|
+
},
|
|
682
|
+
emits: ["update:modelValue"],
|
|
683
|
+
setup(e, { emit: r }) {
|
|
684
|
+
const a = S([]), n = S([]);
|
|
685
|
+
return $(() => a, async (d, l) => {
|
|
686
|
+
n.value = await Promise.all(
|
|
687
|
+
d.value.map(async (t) => ({
|
|
688
|
+
src: await be(t),
|
|
689
|
+
type: t.type
|
|
690
|
+
}))
|
|
691
|
+
);
|
|
692
|
+
}, { deep: !0 }), $(() => n, async (d, l) => {
|
|
693
|
+
r("update:modelValue", n.value);
|
|
694
|
+
}, { deep: !0 }), (d, l) => {
|
|
695
|
+
const t = V("file-input");
|
|
696
|
+
return u(), s("div", me, [
|
|
697
|
+
(u(!0), s(B, null, x(n.value, (o) => (u(), s("div", {
|
|
698
|
+
key: o.src
|
|
699
|
+
}, [
|
|
700
|
+
i("img", {
|
|
701
|
+
src: o.src,
|
|
702
|
+
class: "img-fluid rounded"
|
|
703
|
+
}, null, 8, ye)
|
|
704
|
+
]))), 128)),
|
|
705
|
+
T(t, {
|
|
706
|
+
modelValue: a.value,
|
|
707
|
+
"onUpdate:modelValue": l[0] || (l[0] = (o) => a.value = o),
|
|
708
|
+
id: e.id,
|
|
709
|
+
name: e.name,
|
|
710
|
+
accept: e.accept,
|
|
711
|
+
class: "d-none"
|
|
712
|
+
}, null, 8, ["modelValue", "id", "name", "accept"]),
|
|
713
|
+
i("label", {
|
|
714
|
+
for: e.id,
|
|
715
|
+
class: "btn btn-outline-dark"
|
|
716
|
+
}, " Select Image ", 8, pe)
|
|
577
717
|
]);
|
|
578
718
|
};
|
|
579
719
|
}
|
|
580
720
|
});
|
|
581
|
-
export {
|
|
721
|
+
export {
|
|
722
|
+
$e as BaseButton,
|
|
723
|
+
Ve as CheckGroup,
|
|
724
|
+
ke as FileInput,
|
|
725
|
+
Se as FormInput,
|
|
726
|
+
xe as InputDropdown,
|
|
727
|
+
ve as LoadingSpinner,
|
|
728
|
+
we as MediaUpload,
|
|
729
|
+
Be as RadioGroup,
|
|
730
|
+
he as SvgIcon
|
|
731
|
+
};
|