ablok-components 0.0.30 → 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 +378 -308
- 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 +285 -72
- 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,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, 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
|
-
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"], pe = /* @__PURE__ */ g({
|
|
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 n = e, a = p({
|
|
227
201
|
get() {
|
|
228
|
-
return
|
|
202
|
+
return n.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
|
+
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)]
|
|
275
229
|
]),
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
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),
|
|
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
|
+
[C, y(a)]
|
|
244
|
+
])
|
|
245
|
+
])) : S("", !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"], he = /* @__PURE__ */ g({
|
|
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 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];
|
|
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 }), 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)
|
|
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"], ve = /* @__PURE__ */ g({
|
|
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 n = e;
|
|
376
|
+
N(n.options.map((d) => d.value === n.modelValue));
|
|
377
|
+
function a(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 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)
|
|
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"], $e = /* @__PURE__ */ g({
|
|
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,210 @@ 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 n = e;
|
|
467
|
+
p({
|
|
517
468
|
get() {
|
|
518
|
-
return
|
|
469
|
+
return n.modelValue;
|
|
519
470
|
},
|
|
520
|
-
set(
|
|
521
|
-
|
|
471
|
+
set(t) {
|
|
472
|
+
r("update:modelValue", t);
|
|
522
473
|
}
|
|
523
474
|
});
|
|
524
|
-
function
|
|
525
|
-
|
|
475
|
+
function a(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
|
-
|
|
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"
|
|
558
626
|
}, [
|
|
559
|
-
(
|
|
560
|
-
|
|
561
|
-
renderSlot(_ctx.$slots, "option", {}, () => [
|
|
562
|
-
createElementVNode("a", {
|
|
563
|
-
class: "dropdown-item",
|
|
564
|
-
onClick: withModifiers(($event) => select(option.value), ["prevent"])
|
|
565
|
-
}, toDisplayString(option.text), 9, _hoisted_6)
|
|
566
|
-
])
|
|
567
|
-
]);
|
|
568
|
-
}), 128))
|
|
569
|
-
], 8, _hoisted_5)
|
|
627
|
+
A(o, { symbol: "upload" })
|
|
628
|
+
], 8, ce)
|
|
570
629
|
])
|
|
571
630
|
]),
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
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
|
+
])
|
|
577
638
|
]);
|
|
578
639
|
};
|
|
579
640
|
}
|
|
580
641
|
});
|
|
581
|
-
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
|
+
};
|