ablok-components 0.0.27 → 0.0.31
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 +379 -303
- 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 +305 -0
- package/dist/components/form-input.vue.d.ts +244 -60
- package/dist/components/input-dropdown.vue.d.ts +284 -71
- package/dist/components/loading-spinner.vue.d.ts +68 -8
- 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 +1 -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
|
|
2
|
-
|
|
3
|
-
const _hoisted_1$6 = {
|
|
1
|
+
import { defineComponent as g, openBlock as u, createElementBlock as s, normalizeClass as v, createElementVNode as i, renderSlot as f, computed as p, resolveComponent as $, createBlock as k, createCommentVNode as S, unref as y, toDisplayString as h, withDirectives as x, isRef as V, vModelDynamic as I, vModelText as C, ref as N, watch as B, onBeforeMount as z, Fragment as w, renderList as q, createTextVNode as O, withModifiers as L, reactive as T, createVNode as A } from "vue";
|
|
2
|
+
const D = {
|
|
4
3
|
class: "icon",
|
|
5
4
|
preserveAspectRatio: "xMaxYMin"
|
|
6
|
-
}
|
|
7
|
-
const _hoisted_2$5 = ["xlink:href"];
|
|
8
|
-
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
5
|
+
}, U = ["xlink:href"], ye = /* @__PURE__ */ g({
|
|
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, n) => (u(), s("i", {
|
|
27
|
+
class: v(["svg-icon", {
|
|
28
|
+
[`svg-icon--${e.size}`]: e.size
|
|
29
|
+
}])
|
|
30
|
+
}, [
|
|
31
|
+
(u(), s("svg", D, [
|
|
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, U)
|
|
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 F = { class: "loading-spinner d-block" }, H = { class: "loading-spinner__animation" }, P = {
|
|
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
|
+
}, E = ["fill"], R = /* @__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), G = [
|
|
62
|
+
R
|
|
63
|
+
], be = /* @__PURE__ */ g({
|
|
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, n) => (u(), s("span", F, [
|
|
73
|
+
i("span", H, [
|
|
74
|
+
(u(), s("svg", P, [
|
|
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
|
+
}, G, 8, E)
|
|
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 J = ["type", "disabled", "href", "to"], ge = /* @__PURE__ */ g({
|
|
102
86
|
__name: "base-button",
|
|
103
87
|
props: {
|
|
104
88
|
type: null,
|
|
@@ -114,55 +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, n = p(() => r.caption && !r.fab);
|
|
103
|
+
return (a, d) => {
|
|
104
|
+
const l = $("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(a.$slots, "default", {}, () => [
|
|
123
|
+
e.icon ? (u(), k(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"])) : S("", !0),
|
|
128
|
+
y(n) ? (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)) : S("", !0)
|
|
151
132
|
])
|
|
152
|
-
], 10,
|
|
133
|
+
], 10, J);
|
|
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
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
const _hoisted_4$1 = ["name", "id", "disabled", "read-only", "required", "aria-label"];
|
|
164
|
-
const _hoisted_5$1 = ["for", "innerHTML"];
|
|
165
|
-
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
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 = {
|
|
141
|
+
key: 0,
|
|
142
|
+
class: "form-input__color-swatch"
|
|
143
|
+
}, K = ["name", "id", "disabled", "read-only", "required", "aria-label"], Q = ["for", "innerHTML"], pe = /* @__PURE__ */ g({
|
|
166
144
|
__name: "form-input",
|
|
167
145
|
props: {
|
|
168
146
|
modelValue: {
|
|
@@ -175,11 +153,11 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
175
153
|
},
|
|
176
154
|
name: {
|
|
177
155
|
type: String,
|
|
178
|
-
default: () =>
|
|
156
|
+
default: () => m()
|
|
179
157
|
},
|
|
180
158
|
id: {
|
|
181
159
|
type: String,
|
|
182
|
-
default: () =>
|
|
160
|
+
default: () => m()
|
|
183
161
|
},
|
|
184
162
|
label: {
|
|
185
163
|
type: String,
|
|
@@ -195,15 +173,15 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
195
173
|
},
|
|
196
174
|
disabled: {
|
|
197
175
|
type: Boolean,
|
|
198
|
-
default:
|
|
176
|
+
default: !1
|
|
199
177
|
},
|
|
200
178
|
readOnly: {
|
|
201
179
|
type: Boolean,
|
|
202
|
-
default:
|
|
180
|
+
default: !1
|
|
203
181
|
},
|
|
204
182
|
required: {
|
|
205
183
|
type: Boolean,
|
|
206
|
-
default:
|
|
184
|
+
default: !1
|
|
207
185
|
},
|
|
208
186
|
maxlength: {
|
|
209
187
|
type: Number
|
|
@@ -214,73 +192,70 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
214
192
|
},
|
|
215
193
|
checked: {
|
|
216
194
|
type: Boolean,
|
|
217
|
-
default:
|
|
195
|
+
default: !1
|
|
218
196
|
}
|
|
219
197
|
},
|
|
220
198
|
emits: ["update:modelValue"],
|
|
221
|
-
setup(
|
|
222
|
-
const
|
|
223
|
-
const model = computed({
|
|
199
|
+
setup(e, { emit: r }) {
|
|
200
|
+
const n = e, a = p({
|
|
224
201
|
get() {
|
|
225
|
-
return
|
|
202
|
+
return n.modelValue;
|
|
226
203
|
},
|
|
227
|
-
set(
|
|
228
|
-
|
|
204
|
+
set(d) {
|
|
205
|
+
r("update:modelValue", d);
|
|
229
206
|
}
|
|
230
207
|
});
|
|
231
|
-
return (
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
"onUpdate:modelValue":
|
|
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
|
+
x(i("input", {
|
|
214
|
+
"onUpdate:modelValue": l[0] || (l[0] = (t) => V(a) ? a.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
|
+
[I, y(a)]
|
|
229
|
+
]),
|
|
230
|
+
f(d.$slots, "input-append", {}, () => [
|
|
231
|
+
e.type === "color" ? (u(), s("span", Y, [
|
|
232
|
+
x(i("input", {
|
|
233
|
+
"onUpdate:modelValue": l[1] || (l[1] = (t) => V(a) ? a.value = t : null),
|
|
257
234
|
type: "color",
|
|
258
|
-
name: `${
|
|
259
|
-
id: `${
|
|
260
|
-
disabled:
|
|
261
|
-
"read-only":
|
|
262
|
-
required:
|
|
235
|
+
name: `${e.name}-color`,
|
|
236
|
+
id: `${e.id}-color`,
|
|
237
|
+
disabled: e.disabled,
|
|
238
|
+
"read-only": e.readOnly,
|
|
239
|
+
required: e.required,
|
|
263
240
|
class: "form-control",
|
|
264
|
-
"aria-label":
|
|
265
|
-
}, null, 8,
|
|
266
|
-
[
|
|
267
|
-
])
|
|
268
|
-
])
|
|
269
|
-
]),
|
|
270
|
-
renderSlot(_ctx.$slots, "label", {}, () => [
|
|
271
|
-
createElementVNode("label", {
|
|
272
|
-
for: __props.id,
|
|
273
|
-
class: "form-input__label",
|
|
274
|
-
innerHTML: __props.label
|
|
275
|
-
}, null, 8, _hoisted_5$1)
|
|
241
|
+
"aria-label": e.label
|
|
242
|
+
}, null, 8, K), [
|
|
243
|
+
[C, y(a)]
|
|
244
|
+
])
|
|
245
|
+
])) : S("", !0)
|
|
276
246
|
])
|
|
277
|
-
])
|
|
278
|
-
|
|
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));
|
|
279
256
|
}
|
|
280
257
|
});
|
|
281
|
-
const
|
|
282
|
-
const _hoisted_2$2 = ["for"];
|
|
283
|
-
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
258
|
+
const W = { class: "radio-group" }, Z = ["for"], he = /* @__PURE__ */ g({
|
|
284
259
|
__name: "check-group",
|
|
285
260
|
props: {
|
|
286
261
|
modelValue: {
|
|
@@ -292,11 +267,11 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
292
267
|
},
|
|
293
268
|
name: {
|
|
294
269
|
type: String,
|
|
295
|
-
default: () =>
|
|
270
|
+
default: () => m()
|
|
296
271
|
},
|
|
297
272
|
id: {
|
|
298
273
|
type: String,
|
|
299
|
-
default: () =>
|
|
274
|
+
default: () => m()
|
|
300
275
|
},
|
|
301
276
|
label: {
|
|
302
277
|
type: String,
|
|
@@ -308,66 +283,59 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
308
283
|
},
|
|
309
284
|
disabled: {
|
|
310
285
|
type: Boolean,
|
|
311
|
-
default:
|
|
286
|
+
default: !1
|
|
312
287
|
},
|
|
313
288
|
readOnly: {
|
|
314
289
|
type: Boolean,
|
|
315
|
-
default:
|
|
290
|
+
default: !1
|
|
316
291
|
},
|
|
317
292
|
required: {
|
|
318
293
|
type: Boolean,
|
|
319
|
-
default:
|
|
294
|
+
default: !1
|
|
320
295
|
}
|
|
321
296
|
},
|
|
322
297
|
emits: ["change", "update:modelValue"],
|
|
323
|
-
setup(
|
|
324
|
-
const
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
const
|
|
331
|
-
const
|
|
332
|
-
return [...
|
|
298
|
+
setup(e, { emit: r }) {
|
|
299
|
+
const n = e, a = N([]);
|
|
300
|
+
return B(() => n.modelValue, (d, l) => {
|
|
301
|
+
a.value = n.options.map(
|
|
302
|
+
(t) => t.value ? n.modelValue.some((o) => o["value "] === t.value) : n.modelValue.some((o) => o === t)
|
|
303
|
+
);
|
|
304
|
+
}, { immediate: !0 }), B(a, (d, l) => {
|
|
305
|
+
const t = d.reduce((o, c, b) => {
|
|
306
|
+
const M = c && n.options[b] ? [n.options[b] || n.options[b]] : [];
|
|
307
|
+
return [...o, ...M];
|
|
333
308
|
}, []);
|
|
334
|
-
|
|
335
|
-
}, { deep:
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
}), 128)),
|
|
355
|
-
createElementVNode("label", { for: __props.id }, [
|
|
356
|
-
renderSlot(_ctx.$slots, "label", {}, () => [
|
|
357
|
-
createTextVNode(toDisplayString(__props.label), 1)
|
|
309
|
+
r("update:modelValue", t);
|
|
310
|
+
}, { deep: !0 }), z(() => {
|
|
311
|
+
}), (d, l) => {
|
|
312
|
+
const t = $("form-input");
|
|
313
|
+
return u(), s("div", W, [
|
|
314
|
+
(u(!0), s(w, null, q(e.options, (o, c) => (u(), k(t, {
|
|
315
|
+
key: c,
|
|
316
|
+
modelValue: y(a)[c],
|
|
317
|
+
"onUpdate:modelValue": (b) => y(a)[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
|
+
O(h(e.label), 1)
|
|
358
329
|
])
|
|
359
|
-
], 8,
|
|
330
|
+
], 8, Z)
|
|
360
331
|
]);
|
|
361
332
|
};
|
|
362
333
|
}
|
|
363
|
-
})
|
|
364
|
-
const _hoisted_1$1 = { class: "radio-group" };
|
|
365
|
-
const _hoisted_2$1 = ["for"];
|
|
366
|
-
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
334
|
+
}), _ = { class: "radio-group" }, ee = ["for"], ve = /* @__PURE__ */ g({
|
|
367
335
|
__name: "radio-group",
|
|
368
336
|
props: {
|
|
369
337
|
modelValue: {
|
|
370
|
-
default:
|
|
338
|
+
default: !1
|
|
371
339
|
},
|
|
372
340
|
options: {
|
|
373
341
|
type: Array,
|
|
@@ -375,11 +343,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
375
343
|
},
|
|
376
344
|
name: {
|
|
377
345
|
type: String,
|
|
378
|
-
default: () =>
|
|
346
|
+
default: () => m()
|
|
379
347
|
},
|
|
380
348
|
id: {
|
|
381
349
|
type: String,
|
|
382
|
-
default: () =>
|
|
350
|
+
default: () => m()
|
|
383
351
|
},
|
|
384
352
|
label: {
|
|
385
353
|
type: String,
|
|
@@ -391,64 +359,53 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
391
359
|
},
|
|
392
360
|
disabled: {
|
|
393
361
|
type: Boolean,
|
|
394
|
-
default:
|
|
362
|
+
default: !1
|
|
395
363
|
},
|
|
396
364
|
readOnly: {
|
|
397
365
|
type: Boolean,
|
|
398
|
-
default:
|
|
366
|
+
default: !1
|
|
399
367
|
},
|
|
400
368
|
required: {
|
|
401
369
|
type: Boolean,
|
|
402
|
-
default:
|
|
370
|
+
default: !1
|
|
403
371
|
}
|
|
404
372
|
},
|
|
405
373
|
emits: ["change", "update:modelValue"],
|
|
406
|
-
setup(
|
|
407
|
-
const
|
|
408
|
-
|
|
409
|
-
function
|
|
410
|
-
|
|
374
|
+
setup(e, { emit: r }) {
|
|
375
|
+
const n = e;
|
|
376
|
+
N(n.options.map((d) => d.value === n.modelValue));
|
|
377
|
+
function a(d) {
|
|
378
|
+
r("update:modelValue", d);
|
|
411
379
|
}
|
|
412
|
-
|
|
413
|
-
})
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
createElementVNode("label", { for: __props.id }, [
|
|
433
|
-
renderSlot(_ctx.$slots, "label", {}, () => [
|
|
434
|
-
createTextVNode(toDisplayString(__props.label), 1)
|
|
380
|
+
return z(() => {
|
|
381
|
+
}), (d, l) => {
|
|
382
|
+
const t = $("form-input");
|
|
383
|
+
return u(), s("div", _, [
|
|
384
|
+
(u(!0), s(w, null, q(e.options, (o, c) => (u(), k(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) => a(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
|
+
O(h(e.label), 1)
|
|
435
400
|
])
|
|
436
|
-
], 8,
|
|
401
|
+
], 8, ee)
|
|
437
402
|
]);
|
|
438
403
|
};
|
|
439
404
|
}
|
|
440
|
-
})
|
|
441
|
-
const _hoisted_1 = { class: "input input-dropdown" };
|
|
442
|
-
const _hoisted_2 = { class: "dropdown" };
|
|
443
|
-
const _hoisted_3 = {
|
|
405
|
+
}), te = { class: "input input-dropdown" }, le = { class: "dropdown" }, ae = {
|
|
444
406
|
class: "btn-group",
|
|
445
407
|
role: "group"
|
|
446
|
-
}
|
|
447
|
-
const _hoisted_4 = ["id", "disabled"];
|
|
448
|
-
const _hoisted_5 = ["aria-labelledby"];
|
|
449
|
-
const _hoisted_6 = ["onClick"];
|
|
450
|
-
const _hoisted_7 = ["for"];
|
|
451
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
408
|
+
}, ne = ["id", "disabled"], de = ["aria-labelledby"], oe = ["onClick"], ie = ["for"], $e = /* @__PURE__ */ g({
|
|
452
409
|
__name: "input-dropdown",
|
|
453
410
|
props: {
|
|
454
411
|
modelValue: {
|
|
@@ -457,11 +414,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
457
414
|
},
|
|
458
415
|
name: {
|
|
459
416
|
type: String,
|
|
460
|
-
default: () =>
|
|
417
|
+
default: () => m()
|
|
461
418
|
},
|
|
462
419
|
id: {
|
|
463
420
|
type: String,
|
|
464
|
-
default: () =>
|
|
421
|
+
default: () => m()
|
|
465
422
|
},
|
|
466
423
|
label: {
|
|
467
424
|
type: String,
|
|
@@ -485,91 +442,210 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
485
442
|
},
|
|
486
443
|
disabled: {
|
|
487
444
|
type: Boolean,
|
|
488
|
-
default:
|
|
445
|
+
default: !1
|
|
489
446
|
},
|
|
490
447
|
multiple: {
|
|
491
448
|
type: Boolean,
|
|
492
|
-
default:
|
|
449
|
+
default: !1
|
|
493
450
|
},
|
|
494
451
|
required: {
|
|
495
452
|
type: Boolean,
|
|
496
|
-
default:
|
|
453
|
+
default: !1
|
|
497
454
|
},
|
|
498
455
|
outline: {
|
|
499
456
|
type: Boolean,
|
|
500
|
-
default:
|
|
457
|
+
default: !0
|
|
501
458
|
},
|
|
502
459
|
resetOption: {
|
|
503
460
|
type: Boolean,
|
|
504
|
-
default:
|
|
461
|
+
default: !0
|
|
505
462
|
}
|
|
506
463
|
},
|
|
507
464
|
emits: ["update:modelValue"],
|
|
508
|
-
setup(
|
|
509
|
-
const
|
|
510
|
-
|
|
465
|
+
setup(e, { emit: r }) {
|
|
466
|
+
const n = e;
|
|
467
|
+
p({
|
|
511
468
|
get() {
|
|
512
|
-
return
|
|
469
|
+
return n.modelValue;
|
|
513
470
|
},
|
|
514
|
-
set(
|
|
515
|
-
|
|
471
|
+
set(t) {
|
|
472
|
+
r("update:modelValue", t);
|
|
516
473
|
}
|
|
517
474
|
});
|
|
518
|
-
function
|
|
519
|
-
|
|
475
|
+
function a(t) {
|
|
476
|
+
r("update:modelValue", t);
|
|
520
477
|
}
|
|
521
|
-
const
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
478
|
+
const d = p(() => [
|
|
479
|
+
{
|
|
480
|
+
text: "Please select"
|
|
481
|
+
},
|
|
482
|
+
...n.options.map(
|
|
483
|
+
(t) => typeof t == "string" ? { value: t, text: t } : t
|
|
484
|
+
)
|
|
485
|
+
]), l = p(() => [...n.options].find((t) => JSON.stringify(t.value) === JSON.stringify(n.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(w, null, q(y(d), (c, b) => (u(), s("li", { key: b }, [
|
|
507
|
+
f(t.$slots, "option", {}, () => [
|
|
508
|
+
i("a", {
|
|
509
|
+
class: "dropdown-item",
|
|
510
|
+
onClick: L((M) => a(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
|
+
O(h(e.label), 1)
|
|
520
|
+
])
|
|
521
|
+
], 8, ie)
|
|
522
|
+
]));
|
|
523
|
+
}
|
|
524
|
+
}), ue = { class: "input-group" }, re = ["v-model", "id", "name"], se = ["name", "id", "placeholder", "pattern", "disabled", "read-only", "required", "maxlength", "checked", "aria-label"], ce = ["for"], fe = ["for", "innerHTML"], Se = /* @__PURE__ */ g({
|
|
525
|
+
__name: "file-input",
|
|
526
|
+
props: {
|
|
527
|
+
modelValue: {
|
|
528
|
+
type: [String, Number, Boolean],
|
|
529
|
+
default: ""
|
|
530
|
+
},
|
|
531
|
+
type: {
|
|
532
|
+
type: String,
|
|
533
|
+
default: "text"
|
|
534
|
+
},
|
|
535
|
+
name: {
|
|
536
|
+
type: String,
|
|
537
|
+
default: () => m()
|
|
538
|
+
},
|
|
539
|
+
id: {
|
|
540
|
+
type: String,
|
|
541
|
+
default: () => m()
|
|
542
|
+
},
|
|
543
|
+
label: {
|
|
544
|
+
type: String,
|
|
545
|
+
default: ""
|
|
546
|
+
},
|
|
547
|
+
placeholder: {
|
|
548
|
+
type: String,
|
|
549
|
+
default: ""
|
|
550
|
+
},
|
|
551
|
+
variant: {
|
|
552
|
+
type: String,
|
|
553
|
+
default: ""
|
|
554
|
+
},
|
|
555
|
+
disabled: {
|
|
556
|
+
type: Boolean,
|
|
557
|
+
default: !1
|
|
558
|
+
},
|
|
559
|
+
readOnly: {
|
|
560
|
+
type: Boolean,
|
|
561
|
+
default: !1
|
|
562
|
+
},
|
|
563
|
+
required: {
|
|
564
|
+
type: Boolean,
|
|
565
|
+
default: !1
|
|
566
|
+
},
|
|
567
|
+
maxlength: {
|
|
568
|
+
type: Number
|
|
569
|
+
},
|
|
570
|
+
pattern: {
|
|
571
|
+
type: String,
|
|
572
|
+
default: null
|
|
573
|
+
},
|
|
574
|
+
checked: {
|
|
575
|
+
type: Boolean,
|
|
576
|
+
default: !1
|
|
577
|
+
}
|
|
578
|
+
},
|
|
579
|
+
emits: ["update:modelValue"],
|
|
580
|
+
setup(e, { emit: r }) {
|
|
581
|
+
function n(l) {
|
|
582
|
+
const t = l.target && l.target.files;
|
|
583
|
+
t && (a.splice(0, a.length), Array.from(t).forEach((o) => {
|
|
584
|
+
a.push(o);
|
|
585
|
+
}));
|
|
586
|
+
}
|
|
587
|
+
const a = T([]), d = p(() => a.map((l) => l.name));
|
|
588
|
+
return B(() => a, (l, t) => {
|
|
589
|
+
l !== t && r("update:modelValue", l);
|
|
590
|
+
}, { deep: !0 }), (l, t) => {
|
|
591
|
+
const o = $("svg-icon");
|
|
592
|
+
return u(), s("div", {
|
|
593
|
+
class: v(["file-input", "file-input--primary"])
|
|
594
|
+
}, [
|
|
595
|
+
i("div", ue, [
|
|
596
|
+
f(l.$slots, "input-prepend"),
|
|
597
|
+
i("input", {
|
|
598
|
+
"v-model": a,
|
|
599
|
+
type: "file",
|
|
600
|
+
id: e.id,
|
|
601
|
+
name: e.name,
|
|
602
|
+
onChange: n,
|
|
603
|
+
class: "d-none"
|
|
604
|
+
}, null, 40, re),
|
|
605
|
+
x(i("input", {
|
|
606
|
+
"onUpdate:modelValue": t[0] || (t[0] = (c) => V(d) ? d.value = c : null),
|
|
607
|
+
type: "text",
|
|
608
|
+
name: `${e.name}--text`,
|
|
609
|
+
id: `${e.name}--text`,
|
|
610
|
+
placeholder: e.placeholder,
|
|
611
|
+
pattern: e.pattern,
|
|
612
|
+
disabled: e.disabled,
|
|
613
|
+
"read-only": e.readOnly,
|
|
614
|
+
required: e.required,
|
|
615
|
+
maxlength: e.maxlength,
|
|
616
|
+
checked: e.checked,
|
|
617
|
+
class: "form-control",
|
|
618
|
+
"aria-label": e.label
|
|
619
|
+
}, null, 8, se), [
|
|
620
|
+
[C, y(d)]
|
|
621
|
+
]),
|
|
622
|
+
f(l.$slots, "input-append", {}, () => [
|
|
623
|
+
i("label", {
|
|
624
|
+
for: e.id,
|
|
625
|
+
class: "input-group-text"
|
|
552
626
|
}, [
|
|
553
|
-
(
|
|
554
|
-
|
|
555
|
-
renderSlot(_ctx.$slots, "option", {}, () => [
|
|
556
|
-
createElementVNode("a", {
|
|
557
|
-
class: "dropdown-item",
|
|
558
|
-
onClick: withModifiers(($event) => select(option.value), ["prevent"])
|
|
559
|
-
}, toDisplayString(option.text), 9, _hoisted_6)
|
|
560
|
-
])
|
|
561
|
-
]);
|
|
562
|
-
}), 128))
|
|
563
|
-
], 8, _hoisted_5)
|
|
627
|
+
A(o, { symbol: "upload" })
|
|
628
|
+
], 8, ce)
|
|
564
629
|
])
|
|
565
630
|
]),
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
631
|
+
f(l.$slots, "label", {}, () => [
|
|
632
|
+
i("label", {
|
|
633
|
+
for: e.id,
|
|
634
|
+
class: "form-input__label",
|
|
635
|
+
innerHTML: `${e.label}${e.required ? " *" : ""}`
|
|
636
|
+
}, null, 8, fe)
|
|
637
|
+
])
|
|
571
638
|
]);
|
|
572
639
|
};
|
|
573
640
|
}
|
|
574
641
|
});
|
|
575
|
-
export {
|
|
642
|
+
export {
|
|
643
|
+
ge as BaseButton,
|
|
644
|
+
he as CheckGroup,
|
|
645
|
+
Se as FileInput,
|
|
646
|
+
pe as FormInput,
|
|
647
|
+
$e as InputDropdown,
|
|
648
|
+
be as LoadingSpinner,
|
|
649
|
+
ve as RadioGroup,
|
|
650
|
+
ye as SvgIcon
|
|
651
|
+
};
|