@solfacil/girassol 0.2.1 → 0.2.3
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/components.d.ts +1 -0
- package/dist/components.json +1 -1
- package/dist/girassol.es.js +590 -513
- package/dist/girassol.umd.js +3 -2
- package/dist/style.css +1 -1
- package/dist/types/components/forms/button/Button.vue.d.ts +8 -4
- package/dist/types/components/forms/button/ButtonDestructive.vue.d.ts +73 -0
- package/dist/types/components/forms/button/index.d.ts +2 -1
- package/dist/types/components/forms/textarea/Textarea.vue.d.ts +4 -4
- package/dist/types/components/loader/CircleLoader.vue.d.ts +86 -0
- package/dist/types/index.d.ts +136 -29
- package/package.json +1 -1
- package/theme/solfacil/utilities.ts +4 -4
package/dist/girassol.es.js
CHANGED
|
@@ -1,10 +1,34 @@
|
|
|
1
|
-
import { defineComponent as V,
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as V, openBlock as s, createElementBlock as r, normalizeClass as S, createElementVNode as h, useSlots as Oe, computed as E, unref as g, renderSlot as y, createVNode as M, createCommentVNode as T, createBlock as p, withCtx as D, ref as I, toDisplayString as x, mergeProps as N, isRef as Be, withDirectives as W, vShow as le, vModelText as De, Fragment as J, renderList as X, getCurrentScope as Re, onScopeDispose as pe, watch as He, reactive as Z, withModifiers as H, createTextVNode as O, Transition as we, normalizeStyle as ne, withKeys as j, onMounted as Te, onUnmounted as Ne, render as Me } from "vue";
|
|
2
|
+
const Ue = /* @__PURE__ */ h("path", {
|
|
3
|
+
class: "path",
|
|
4
|
+
d: "M16.0008 1.5C17.905 1.5 19.7905 1.87506 21.5497 2.60375C23.3089 3.33244 24.9074 4.4005 26.2538 5.74695C27.6003 7.0934 28.6684 8.69187 29.397 10.4511C30.1257 12.2103 30.5008 14.0958 30.5008 16C30.5008 17.9042 30.1257 19.7897 29.397 21.5489C28.6684 23.3081 27.6003 24.9066 26.2538 26.2531C24.9074 27.5995 23.3089 28.6676 21.5497 29.3963C19.7905 30.1249 17.905 30.5 16.0008 30.5C14.0966 30.5 12.2111 30.1249 10.4519 29.3963C8.69266 28.6676 7.09419 27.5995 5.74774 26.253C4.4013 24.9066 3.33323 23.3081 2.60454 21.5489C1.87585 19.7897 1.50079 17.9042 1.50079 16C1.5008 14.0958 1.87585 12.2103 2.60454 10.4511C3.33324 8.69187 4.4013 7.0934 5.74775 5.74695C7.0942 4.4005 8.69267 3.33244 10.4519 2.60375C12.2111 1.87505 14.0966 1.5 16.0008 1.5L16.0008 1.5Z"
|
|
5
|
+
}, null, -1), Ge = [
|
|
6
|
+
Ue
|
|
7
|
+
], Fe = /* @__PURE__ */ V({
|
|
8
|
+
__name: "CircleLoader",
|
|
9
|
+
props: {
|
|
10
|
+
size: { default: "large" },
|
|
11
|
+
dark: { type: Boolean }
|
|
12
|
+
},
|
|
13
|
+
setup(e) {
|
|
14
|
+
return (l, t) => (s(), r("svg", {
|
|
15
|
+
class: S(["sol-inner-loader", `-${e.size}`]),
|
|
16
|
+
viewBox: "0 0 32 32",
|
|
17
|
+
fill: "none",
|
|
18
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
19
|
+
}, Ge, 2));
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
const Ke = ["data-testid", "disabled"], Ye = { class: "icon -left" }, We = { class: "icon -right" }, Ze = {
|
|
23
|
+
key: 0,
|
|
24
|
+
class: "loading"
|
|
25
|
+
}, q = /* @__PURE__ */ V({
|
|
3
26
|
__name: "Button",
|
|
4
27
|
props: {
|
|
5
28
|
id: null,
|
|
6
29
|
loading: { type: Boolean },
|
|
7
30
|
onColor: { type: Boolean, default: !1 },
|
|
31
|
+
disabled: { type: Boolean },
|
|
8
32
|
size: { default: "large" },
|
|
9
33
|
variant: { default: "primary" }
|
|
10
34
|
},
|
|
@@ -12,34 +36,85 @@ const Ne = ["data-testid"], Ue = { class: "icon -left" }, Ge = { class: "icon -r
|
|
|
12
36
|
function l(a, o) {
|
|
13
37
|
return a ? o : "";
|
|
14
38
|
}
|
|
15
|
-
const t =
|
|
39
|
+
const t = Oe(), i = E(
|
|
16
40
|
() => !!(t != null && t.default) && (!!(t != null && t["icon-right"]) || !!(t != null && t["icon-left"]))
|
|
17
41
|
), n = E(
|
|
18
42
|
() => !(t != null && t.default) && (!!(t != null && t["icon-right"]) || !!(t != null && t["icon-left"]))
|
|
19
43
|
);
|
|
20
|
-
return (a, o) => (
|
|
44
|
+
return (a, o) => (s(), r("button", {
|
|
21
45
|
"data-testid": `button-${e.id}`,
|
|
22
|
-
class:
|
|
46
|
+
class: S(["sol-button-core", `-${e.variant} -${e.size}
|
|
47
|
+
${l(e.loading, "-loading-helper")}
|
|
23
48
|
${l(e.onColor, "-on-color")}
|
|
24
49
|
${l(g(i), "-has-icon")}
|
|
25
50
|
${l(g(n), "-only-icon")}
|
|
26
51
|
`]),
|
|
27
|
-
type: "button"
|
|
52
|
+
type: "button",
|
|
53
|
+
disabled: e.disabled || e.loading
|
|
28
54
|
}, [
|
|
29
|
-
|
|
55
|
+
h("div", Ye, [
|
|
30
56
|
y(a.$slots, "icon-left")
|
|
31
57
|
]),
|
|
32
58
|
y(a.$slots, "default"),
|
|
33
|
-
|
|
59
|
+
h("div", We, [
|
|
34
60
|
y(a.$slots, "icon-right")
|
|
35
|
-
])
|
|
36
|
-
|
|
61
|
+
]),
|
|
62
|
+
e.loading ? (s(), r("div", Ze, [
|
|
63
|
+
M(Fe, {
|
|
64
|
+
"data-testid": `button-loader-${e.id}`,
|
|
65
|
+
size: e.size === "small" ? "small" : "medium",
|
|
66
|
+
dark: e.onColor
|
|
67
|
+
}, null, 8, ["data-testid", "size", "dark"])
|
|
68
|
+
])) : T("", !0)
|
|
69
|
+
], 10, Ke));
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
const je = {
|
|
73
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
74
|
+
viewBox: "0 0 24 24",
|
|
75
|
+
width: "1em",
|
|
76
|
+
height: "1em"
|
|
77
|
+
}, qe = /* @__PURE__ */ h("path", {
|
|
78
|
+
fill: "currentColor",
|
|
79
|
+
d: "M7 21q-.825 0-1.412-.587Q5 19.825 5 19V6H4V4h5V3h6v1h5v2h-1v13q0 .825-.587 1.413Q17.825 21 17 21ZM17 6H7v13h10ZM9 17h2V8H9Zm4 0h2V8h-2ZM7 6v13Z"
|
|
80
|
+
}, null, -1), Qe = [
|
|
81
|
+
qe
|
|
82
|
+
];
|
|
83
|
+
function Je(e, l) {
|
|
84
|
+
return s(), r("svg", je, Qe);
|
|
85
|
+
}
|
|
86
|
+
const Xe = { name: "material-symbols-delete-outline", render: Je }, ze = /* @__PURE__ */ V({
|
|
87
|
+
__name: "ButtonDestructive",
|
|
88
|
+
props: {
|
|
89
|
+
id: null,
|
|
90
|
+
size: null,
|
|
91
|
+
loading: { type: Boolean }
|
|
92
|
+
},
|
|
93
|
+
setup(e) {
|
|
94
|
+
return (l, t) => (s(), p(q, {
|
|
95
|
+
id: `destructive-${e.id}`,
|
|
96
|
+
size: e.size,
|
|
97
|
+
loading: e.loading,
|
|
98
|
+
variant: "primary",
|
|
99
|
+
class: "button-destructive"
|
|
100
|
+
}, {
|
|
101
|
+
"icon-left": D(() => [
|
|
102
|
+
M(g(Xe))
|
|
103
|
+
]),
|
|
104
|
+
default: D(() => [
|
|
105
|
+
y(l.$slots, "default")
|
|
106
|
+
]),
|
|
107
|
+
_: 3
|
|
108
|
+
}, 8, ["id", "size", "loading"]));
|
|
37
109
|
}
|
|
38
110
|
});
|
|
39
|
-
|
|
40
|
-
e.component("SolButton",
|
|
111
|
+
q.install = (e) => {
|
|
112
|
+
e.component("SolButton", q);
|
|
41
113
|
};
|
|
42
|
-
|
|
114
|
+
ze.install = (e) => {
|
|
115
|
+
e.component("SolButton", q);
|
|
116
|
+
};
|
|
117
|
+
const _e = ["id", "data-testid", "value"], F = /* @__PURE__ */ V({
|
|
43
118
|
__name: "Input",
|
|
44
119
|
props: {
|
|
45
120
|
id: null,
|
|
@@ -52,24 +127,24 @@ const Fe = ["id", "data-testid", "value"], F = /* @__PURE__ */ V({
|
|
|
52
127
|
function i({ target: a }) {
|
|
53
128
|
t("update:modelValue", a == null ? void 0 : a.value);
|
|
54
129
|
}
|
|
55
|
-
const n =
|
|
130
|
+
const n = I("");
|
|
56
131
|
return l({
|
|
57
132
|
input: n
|
|
58
|
-
}), (a, o) => (
|
|
133
|
+
}), (a, o) => (s(), r("input", {
|
|
59
134
|
id: `input-${e.id}`,
|
|
60
135
|
ref_key: "input",
|
|
61
136
|
ref: n,
|
|
62
137
|
"data-testid": `input-${e.id}`,
|
|
63
138
|
value: e.modelValue,
|
|
64
|
-
class:
|
|
139
|
+
class: S(["sol-input-core", { "-invert": e.invert, "-error": e.error }]),
|
|
65
140
|
onInput: i
|
|
66
|
-
}, null, 42,
|
|
141
|
+
}, null, 42, _e));
|
|
67
142
|
}
|
|
68
143
|
});
|
|
69
144
|
F.install = (e) => {
|
|
70
145
|
e.component("SolInput", F);
|
|
71
146
|
};
|
|
72
|
-
const
|
|
147
|
+
const et = ["id", "data-testid"], tt = ["for"], lt = { class: "container-input" }, nt = ["id"], it = ["id"], ie = /* @__PURE__ */ V({
|
|
73
148
|
__name: "Textfield",
|
|
74
149
|
props: {
|
|
75
150
|
id: null,
|
|
@@ -96,26 +171,26 @@ const Ke = ["id", "data-testid"], We = ["for"], Ye = { class: "container-input"
|
|
|
96
171
|
}
|
|
97
172
|
return (o, c) => {
|
|
98
173
|
var u;
|
|
99
|
-
return
|
|
174
|
+
return s(), r("div", {
|
|
100
175
|
id: `textfield-${e.id}`,
|
|
101
176
|
"data-testid": `textfield-${e.id}`,
|
|
102
|
-
class:
|
|
177
|
+
class: S([[`${(u = o.$props.class) != null ? u : ""}`, { "-invert": e.invert }], "sol-textfield-core"])
|
|
103
178
|
}, [
|
|
104
179
|
y(o.$slots, "label", {}, () => [
|
|
105
|
-
e.label ? (
|
|
180
|
+
e.label ? (s(), r("label", {
|
|
106
181
|
key: 0,
|
|
107
182
|
for: `input-${e.id}`,
|
|
108
183
|
class: "label"
|
|
109
184
|
}, [
|
|
110
|
-
|
|
111
|
-
], 8,
|
|
185
|
+
h("span", null, x(e.label), 1)
|
|
186
|
+
], 8, tt)) : T("", !0)
|
|
112
187
|
]),
|
|
113
|
-
|
|
188
|
+
h("div", lt, [
|
|
114
189
|
y(o.$slots, "default", {}, () => [
|
|
115
|
-
|
|
190
|
+
M(F, N(o.$attrs, {
|
|
116
191
|
id: e.id,
|
|
117
192
|
modelValue: g(i),
|
|
118
|
-
"onUpdate:modelValue": c[0] || (c[0] = (
|
|
193
|
+
"onUpdate:modelValue": c[0] || (c[0] = (f) => Be(i) ? i.value = f : null),
|
|
119
194
|
"data-testid": `input-${e.id}`,
|
|
120
195
|
class: [e.error && "-error", "input"],
|
|
121
196
|
invert: e.invert,
|
|
@@ -125,90 +200,90 @@ const Ke = ["id", "data-testid"], We = ["for"], Ye = { class: "container-input"
|
|
|
125
200
|
]),
|
|
126
201
|
y(o.$slots, "icon")
|
|
127
202
|
]),
|
|
128
|
-
n(e.hint, e.error) ? (
|
|
203
|
+
n(e.hint, e.error) ? (s(), r("span", {
|
|
129
204
|
key: 0,
|
|
130
205
|
id: `hint-${e.id}`,
|
|
131
206
|
class: "hint"
|
|
132
|
-
},
|
|
207
|
+
}, x(e.hint), 9, nt)) : e.error ? (s(), r("span", {
|
|
133
208
|
key: 1,
|
|
134
209
|
id: `error-${e.id}`,
|
|
135
210
|
class: "error"
|
|
136
|
-
},
|
|
137
|
-
], 10,
|
|
211
|
+
}, x(e.error), 9, it)) : T("", !0)
|
|
212
|
+
], 10, et);
|
|
138
213
|
};
|
|
139
214
|
}
|
|
140
215
|
});
|
|
141
|
-
const
|
|
216
|
+
const at = {
|
|
142
217
|
preserveAspectRatio: "xMidYMid meet",
|
|
143
218
|
viewBox: "0 0 24 24",
|
|
144
219
|
width: "1em",
|
|
145
220
|
height: "1em"
|
|
146
|
-
},
|
|
147
|
-
/* @__PURE__ */
|
|
148
|
-
/* @__PURE__ */
|
|
149
|
-
], -1),
|
|
150
|
-
|
|
221
|
+
}, ot = /* @__PURE__ */ h("g", { fill: "currentColor" }, [
|
|
222
|
+
/* @__PURE__ */ h("path", { d: "M15 12a3 3 0 1 1-6 0a3 3 0 0 1 6 0z" }),
|
|
223
|
+
/* @__PURE__ */ h("path", { d: "M21.894 11.553C19.736 7.236 15.904 5 12 5c-3.903 0-7.736 2.236-9.894 6.553a1 1 0 0 0 0 .894C4.264 16.764 8.096 19 12 19c3.903 0 7.736-2.236 9.894-6.553a1 1 0 0 0 0-.894zM12 17c-2.969 0-6.002-1.62-7.87-5C5.998 8.62 9.03 7 12 7c2.969 0 6.002 1.62 7.87 5c-1.868 3.38-4.901 5-7.87 5z" })
|
|
224
|
+
], -1), st = [
|
|
225
|
+
ot
|
|
151
226
|
];
|
|
152
|
-
function
|
|
153
|
-
return
|
|
227
|
+
function dt(e, l) {
|
|
228
|
+
return s(), r("svg", at, st);
|
|
154
229
|
}
|
|
155
|
-
const
|
|
230
|
+
const ct = { name: "mi-eye", render: dt }, rt = {
|
|
156
231
|
preserveAspectRatio: "xMidYMid meet",
|
|
157
232
|
viewBox: "0 0 24 24",
|
|
158
233
|
width: "1em",
|
|
159
234
|
height: "1em"
|
|
160
|
-
},
|
|
235
|
+
}, ut = /* @__PURE__ */ h("path", {
|
|
161
236
|
fill: "currentColor",
|
|
162
237
|
d: "M4.707 3.293a1 1 0 0 0-1.414 1.414l2.424 2.424c-1.43 1.076-2.678 2.554-3.611 4.422a1 1 0 0 0 0 .894C4.264 16.764 8.096 19 12 19c1.555 0 3.1-.355 4.53-1.055l2.763 2.762a1 1 0 0 0 1.414-1.414l-16-16zm10.307 13.135c-.98.383-2 .572-3.014.572c-2.969 0-6.002-1.62-7.87-5c.817-1.479 1.858-2.62 3.018-3.437l2.144 2.144a3 3 0 0 0 4.001 4.001l1.72 1.72zm3.538-2.532c.483-.556.926-1.187 1.318-1.896c-1.868-3.38-4.9-5-7.87-5c-.112 0-.224.002-.336.007L9.879 5.223A10.215 10.215 0 0 1 12 5c3.903 0 7.736 2.236 9.894 6.553a1 1 0 0 1 0 .894a13.106 13.106 0 0 1-1.925 2.865l-1.417-1.416z"
|
|
163
|
-
}, null, -1),
|
|
164
|
-
|
|
238
|
+
}, null, -1), ht = [
|
|
239
|
+
ut
|
|
165
240
|
];
|
|
166
|
-
function
|
|
167
|
-
return
|
|
241
|
+
function ft(e, l) {
|
|
242
|
+
return s(), r("svg", rt, ht);
|
|
168
243
|
}
|
|
169
|
-
const
|
|
244
|
+
const mt = { name: "mi-eye-off", render: ft }, $t = ["aria-label"], ce = /* @__PURE__ */ V({
|
|
170
245
|
__name: "TextfieldPassword",
|
|
171
246
|
props: {
|
|
172
247
|
id: { default: "" },
|
|
173
248
|
label: { default: "Sua senha" }
|
|
174
249
|
},
|
|
175
250
|
setup(e) {
|
|
176
|
-
const l =
|
|
251
|
+
const l = I(!1), t = E(
|
|
177
252
|
() => l.value ? "text" : "password"
|
|
178
253
|
);
|
|
179
|
-
return (i, n) => (
|
|
254
|
+
return (i, n) => (s(), p(ie, {
|
|
180
255
|
id: e.id,
|
|
181
256
|
required: "",
|
|
182
257
|
type: g(t),
|
|
183
258
|
label: e.label,
|
|
184
259
|
placeholder: "Insira sua senha"
|
|
185
260
|
}, {
|
|
186
|
-
icon:
|
|
187
|
-
|
|
261
|
+
icon: D(() => [
|
|
262
|
+
h("button", {
|
|
188
263
|
type: "button",
|
|
189
264
|
"data-testid": "toggle-type-password",
|
|
190
265
|
"aria-label": l.value ? "Hide password" : "Show password",
|
|
191
266
|
onClick: n[0] || (n[0] = (a) => l.value = !l.value)
|
|
192
267
|
}, [
|
|
193
|
-
|
|
194
|
-
[
|
|
268
|
+
W(M(g(ct), { "aria-hidden": "true" }, null, 512), [
|
|
269
|
+
[le, l.value]
|
|
195
270
|
]),
|
|
196
|
-
|
|
197
|
-
[
|
|
271
|
+
W(M(g(mt), { "aria-hidden": "true" }, null, 512), [
|
|
272
|
+
[le, !l.value]
|
|
198
273
|
])
|
|
199
|
-
], 8,
|
|
274
|
+
], 8, $t)
|
|
200
275
|
]),
|
|
201
276
|
_: 1
|
|
202
277
|
}, 8, ["id", "type", "label"]));
|
|
203
278
|
}
|
|
204
279
|
});
|
|
205
|
-
|
|
206
|
-
e.component("SolTextfield",
|
|
280
|
+
ie.install = (e) => {
|
|
281
|
+
e.component("SolTextfield", ie);
|
|
207
282
|
};
|
|
208
283
|
ce.install = (e) => {
|
|
209
284
|
e.component("SolTextfieldPassword", ce);
|
|
210
285
|
};
|
|
211
|
-
const
|
|
286
|
+
const vt = ["id", "data-testid"], bt = ["for"], yt = { class: "container-textarea" }, gt = ["id", "data-testid", "invert", "aria-invalid", "aria-describedby"], wt = ["id"], xt = ["id"], re = /* @__PURE__ */ V({
|
|
212
287
|
__name: "Textarea",
|
|
213
288
|
props: {
|
|
214
289
|
id: null,
|
|
@@ -236,53 +311,53 @@ const ot = ["id", "data-testid"], st = ["for"], dt = { class: "container-textare
|
|
|
236
311
|
}
|
|
237
312
|
return (o, c) => {
|
|
238
313
|
var u;
|
|
239
|
-
return
|
|
314
|
+
return s(), r("div", {
|
|
240
315
|
id: `textarea-${e.id}`,
|
|
241
316
|
"data-testid": `textarea-${e.id}`,
|
|
242
|
-
class:
|
|
317
|
+
class: S([[`${(u = o.$props.class) != null ? u : ""}`, { "-invert": e.invert }], "sol-textarea-core"])
|
|
243
318
|
}, [
|
|
244
319
|
y(o.$slots, "label", {}, () => [
|
|
245
|
-
e.label ? (
|
|
320
|
+
e.label ? (s(), r("label", {
|
|
246
321
|
key: 0,
|
|
247
322
|
for: `input-${e.id}`,
|
|
248
323
|
class: "label"
|
|
249
324
|
}, [
|
|
250
|
-
|
|
251
|
-
], 8,
|
|
325
|
+
h("span", null, x(e.label), 1)
|
|
326
|
+
], 8, bt)) : T("", !0)
|
|
252
327
|
]),
|
|
253
|
-
|
|
328
|
+
h("div", yt, [
|
|
254
329
|
y(o.$slots, "default", {}, () => [
|
|
255
|
-
|
|
330
|
+
W(h("textarea", N(o.$attrs, {
|
|
256
331
|
id: `input-${e.id}`,
|
|
257
|
-
"onUpdate:modelValue": c[0] || (c[0] = (
|
|
332
|
+
"onUpdate:modelValue": c[0] || (c[0] = (f) => Be(i) ? i.value = f : null),
|
|
258
333
|
"data-testid": `input-${e.id}`,
|
|
259
334
|
class: [e.error && "-error", "textarea"],
|
|
260
335
|
invert: e.invert,
|
|
261
336
|
style: { resize: e.resize },
|
|
262
337
|
"aria-invalid": !!e.error,
|
|
263
338
|
"aria-describedby": a(e.hint, e.error)
|
|
264
|
-
}), null, 16,
|
|
265
|
-
[
|
|
339
|
+
}), null, 16, gt), [
|
|
340
|
+
[De, g(i)]
|
|
266
341
|
])
|
|
267
342
|
])
|
|
268
343
|
]),
|
|
269
|
-
n(e.hint, e.error) ? (
|
|
344
|
+
n(e.hint, e.error) ? (s(), r("span", {
|
|
270
345
|
key: 0,
|
|
271
346
|
id: `hint-${e.id}`,
|
|
272
347
|
class: "hint"
|
|
273
|
-
},
|
|
348
|
+
}, x(e.hint), 9, wt)) : e.error ? (s(), r("span", {
|
|
274
349
|
key: 1,
|
|
275
350
|
id: `error-${e.id}`,
|
|
276
351
|
class: "error"
|
|
277
|
-
},
|
|
278
|
-
], 10,
|
|
352
|
+
}, x(e.error), 9, xt)) : T("", !0)
|
|
353
|
+
], 10, vt);
|
|
279
354
|
};
|
|
280
355
|
}
|
|
281
356
|
});
|
|
282
357
|
re.install = (e) => {
|
|
283
358
|
e.component("SolTextarea", re);
|
|
284
359
|
};
|
|
285
|
-
const
|
|
360
|
+
const St = ["id", "data-testid", "checked", "value", "name"], Ct = ["for"], ae = /* @__PURE__ */ V({
|
|
286
361
|
__name: "Radio",
|
|
287
362
|
props: {
|
|
288
363
|
id: null,
|
|
@@ -294,10 +369,10 @@ const ht = ["id", "data-testid", "checked", "value", "name"], ft = ["for"], ie =
|
|
|
294
369
|
},
|
|
295
370
|
emits: ["change"],
|
|
296
371
|
setup(e, { emit: l }) {
|
|
297
|
-
return (t, i) => (
|
|
298
|
-
class:
|
|
372
|
+
return (t, i) => (s(), r("div", {
|
|
373
|
+
class: S(["sol-radio-core", t.$props.class])
|
|
299
374
|
}, [
|
|
300
|
-
|
|
375
|
+
h("input", N(t.$attrs, {
|
|
301
376
|
id: `radio-${e.name}-${e.id}`,
|
|
302
377
|
type: "radio",
|
|
303
378
|
class: "radio",
|
|
@@ -306,15 +381,15 @@ const ht = ["id", "data-testid", "checked", "value", "name"], ft = ["for"], ie =
|
|
|
306
381
|
value: e.value,
|
|
307
382
|
name: e.name,
|
|
308
383
|
onChange: i[0] || (i[0] = (n) => l("change", e.value))
|
|
309
|
-
}), null, 16,
|
|
310
|
-
|
|
384
|
+
}), null, 16, St),
|
|
385
|
+
h("label", {
|
|
311
386
|
class: "label",
|
|
312
387
|
for: `radio-${e.name}-${e.id}`
|
|
313
|
-
},
|
|
388
|
+
}, x(e.label), 9, Ct)
|
|
314
389
|
], 2));
|
|
315
390
|
}
|
|
316
391
|
});
|
|
317
|
-
const
|
|
392
|
+
const kt = ["aria-labelledby"], Bt = ["id", "data-testid"], Tt = ["id"], Mt = ["id"], ue = /* @__PURE__ */ V({
|
|
318
393
|
__name: "RadioGroup",
|
|
319
394
|
props: {
|
|
320
395
|
id: null,
|
|
@@ -341,63 +416,63 @@ const mt = ["aria-labelledby"], $t = ["id", "data-testid"], vt = ["id"], bt = ["
|
|
|
341
416
|
function o(c) {
|
|
342
417
|
l("change", c.value), l("update:modelValue", c.value);
|
|
343
418
|
}
|
|
344
|
-
return (c, u) => (
|
|
419
|
+
return (c, u) => (s(), r("fieldset", {
|
|
345
420
|
class: "sol-radio-group-core",
|
|
346
421
|
"aria-labelledby": `radio-group-title-${e.id}`
|
|
347
422
|
}, [
|
|
348
423
|
y(c.$slots, "title", {
|
|
349
424
|
id: `radio-group-title-${e.id}`
|
|
350
425
|
}, () => [
|
|
351
|
-
|
|
426
|
+
h("legend", {
|
|
352
427
|
id: `radio-group-title-${e.id}`,
|
|
353
|
-
class:
|
|
428
|
+
class: S(["title", { "sr-only": e.hideTitle }]),
|
|
354
429
|
"data-testid": `radio-group-title-${e.id}`
|
|
355
|
-
},
|
|
430
|
+
}, x(e.title), 11, Bt)
|
|
356
431
|
]),
|
|
357
|
-
|
|
358
|
-
class:
|
|
432
|
+
h("ul", {
|
|
433
|
+
class: S(["container-radios", { "flex-col": e.direction === "column" }])
|
|
359
434
|
}, [
|
|
360
435
|
y(c.$slots, "default", {
|
|
361
436
|
radios: e.radios,
|
|
362
437
|
direction: e.direction
|
|
363
438
|
}, () => [
|
|
364
|
-
(
|
|
365
|
-
var
|
|
366
|
-
return
|
|
367
|
-
|
|
368
|
-
id: (
|
|
439
|
+
(s(!0), r(J, null, X(e.radios, (f, v) => {
|
|
440
|
+
var z;
|
|
441
|
+
return s(), r("li", { key: v }, [
|
|
442
|
+
M(ae, N(c.$attrs, {
|
|
443
|
+
id: (z = f == null ? void 0 : f.id) != null ? z : `${f.value}`,
|
|
369
444
|
class: ["radio", { "mb-micro": e.direction === "column", "mr-micro": e.direction === "row" }],
|
|
370
|
-
name:
|
|
371
|
-
value:
|
|
372
|
-
label:
|
|
373
|
-
checked: a(
|
|
445
|
+
name: f.name,
|
|
446
|
+
value: f.value,
|
|
447
|
+
label: f.label,
|
|
448
|
+
checked: a(f.value),
|
|
374
449
|
"aria-invalid": !!e.error,
|
|
375
450
|
"aria-describedby": n(e.hint, e.error),
|
|
376
|
-
onChange: (w) => o(
|
|
451
|
+
onChange: (w) => o(f)
|
|
377
452
|
}), null, 16, ["id", "class", "name", "value", "label", "checked", "aria-invalid", "aria-describedby", "onChange"])
|
|
378
453
|
]);
|
|
379
454
|
}), 128))
|
|
380
455
|
])
|
|
381
456
|
], 2),
|
|
382
|
-
i(e.hint, e.error) ? (
|
|
457
|
+
i(e.hint, e.error) ? (s(), r("p", {
|
|
383
458
|
key: 0,
|
|
384
459
|
id: `hint-${e.id}`,
|
|
385
460
|
class: "hint"
|
|
386
|
-
},
|
|
461
|
+
}, x(e.hint), 9, Tt)) : e.error ? (s(), r("p", {
|
|
387
462
|
key: 1,
|
|
388
463
|
id: `error-${e.id}`,
|
|
389
464
|
class: "error"
|
|
390
|
-
},
|
|
391
|
-
], 8,
|
|
465
|
+
}, x(e.error), 9, Mt)) : T("", !0)
|
|
466
|
+
], 8, kt));
|
|
392
467
|
}
|
|
393
468
|
});
|
|
394
|
-
|
|
395
|
-
e.component("SolRadio",
|
|
469
|
+
ae.install = (e) => {
|
|
470
|
+
e.component("SolRadio", ae);
|
|
396
471
|
};
|
|
397
472
|
ue.install = (e) => {
|
|
398
473
|
e.component("SolRadioGroup", ue);
|
|
399
474
|
};
|
|
400
|
-
const
|
|
475
|
+
const zt = ["id", "data-testid", "checked", "value", "name"], Vt = ["for"], oe = /* @__PURE__ */ V({
|
|
401
476
|
__name: "Checkbox",
|
|
402
477
|
props: {
|
|
403
478
|
id: null,
|
|
@@ -409,10 +484,10 @@ const yt = ["id", "data-testid", "checked", "value", "name"], gt = ["for"], ae =
|
|
|
409
484
|
},
|
|
410
485
|
emits: ["change"],
|
|
411
486
|
setup(e, { emit: l }) {
|
|
412
|
-
return (t, i) => (
|
|
413
|
-
class:
|
|
487
|
+
return (t, i) => (s(), r("div", {
|
|
488
|
+
class: S(["sol-checkbox-core", t.$props.class])
|
|
414
489
|
}, [
|
|
415
|
-
|
|
490
|
+
h("input", N(t.$attrs, {
|
|
416
491
|
id: `checkbox-${e.name}-${e.id}`,
|
|
417
492
|
type: "checkbox",
|
|
418
493
|
class: "checkbox",
|
|
@@ -421,15 +496,15 @@ const yt = ["id", "data-testid", "checked", "value", "name"], gt = ["for"], ae =
|
|
|
421
496
|
value: e.value,
|
|
422
497
|
name: e.name,
|
|
423
498
|
onChange: i[0] || (i[0] = (n) => l("change", e.value))
|
|
424
|
-
}), null, 16,
|
|
425
|
-
|
|
499
|
+
}), null, 16, zt),
|
|
500
|
+
h("label", {
|
|
426
501
|
class: "label",
|
|
427
502
|
for: `checkbox-${e.name}-${e.id}`
|
|
428
|
-
},
|
|
503
|
+
}, x(e.label), 9, Vt)
|
|
429
504
|
], 2));
|
|
430
505
|
}
|
|
431
506
|
});
|
|
432
|
-
const
|
|
507
|
+
const Lt = ["aria-labelledby"], At = ["id", "data-testid"], It = ["id"], Et = ["id"], he = /* @__PURE__ */ V({
|
|
433
508
|
__name: "CheckboxGroup",
|
|
434
509
|
props: {
|
|
435
510
|
id: null,
|
|
@@ -444,15 +519,15 @@ const wt = ["aria-labelledby"], St = ["id", "data-testid"], xt = ["id"], kt = ["
|
|
|
444
519
|
emits: ["change", "update:modelValue"],
|
|
445
520
|
setup(e, { emit: l }) {
|
|
446
521
|
const t = e;
|
|
447
|
-
function i(u,
|
|
448
|
-
return !!u && !
|
|
522
|
+
function i(u, f) {
|
|
523
|
+
return !!u && !f;
|
|
449
524
|
}
|
|
450
|
-
function n(u,
|
|
451
|
-
return
|
|
525
|
+
function n(u, f) {
|
|
526
|
+
return f ? `error-${t.id}` : i(u, f) ? `hint-${t.id}` : null;
|
|
452
527
|
}
|
|
453
528
|
function a(u) {
|
|
454
|
-
var
|
|
455
|
-
return (
|
|
529
|
+
var f;
|
|
530
|
+
return (f = t == null ? void 0 : t.modelValue) == null ? void 0 : f.includes(u);
|
|
456
531
|
}
|
|
457
532
|
function o(u) {
|
|
458
533
|
return Array.isArray(t == null ? void 0 : t.modelValue) ? [...t.modelValue, u] : [u];
|
|
@@ -460,33 +535,33 @@ const wt = ["aria-labelledby"], St = ["id", "data-testid"], xt = ["id"], kt = ["
|
|
|
460
535
|
function c(u) {
|
|
461
536
|
var v;
|
|
462
537
|
l("change", u.value);
|
|
463
|
-
const
|
|
464
|
-
l("update:modelValue",
|
|
538
|
+
const f = a(u.value) ? (v = t.modelValue) == null ? void 0 : v.filter((z) => z !== u.value) : o(u.value);
|
|
539
|
+
l("update:modelValue", f);
|
|
465
540
|
}
|
|
466
|
-
return (u,
|
|
541
|
+
return (u, f) => (s(), r("fieldset", {
|
|
467
542
|
class: "sol-checkbox-group-core",
|
|
468
543
|
"aria-labelledby": `checkbox-group-title-${e.id}`
|
|
469
544
|
}, [
|
|
470
545
|
y(u.$slots, "title", {
|
|
471
546
|
id: `checkbox-group-title-${e.id}`
|
|
472
547
|
}, () => [
|
|
473
|
-
|
|
548
|
+
h("legend", {
|
|
474
549
|
id: `checkbox-group-title-${e.id}`,
|
|
475
|
-
class:
|
|
550
|
+
class: S(["title", { "sr-only": e.hideTitle }]),
|
|
476
551
|
"data-testid": `checkbox-group-title-${e.id}`
|
|
477
|
-
},
|
|
552
|
+
}, x(e.title), 11, At)
|
|
478
553
|
]),
|
|
479
|
-
|
|
480
|
-
class:
|
|
554
|
+
h("ul", {
|
|
555
|
+
class: S(["container-checkboxes", { "flex-col": e.direction === "column" }])
|
|
481
556
|
}, [
|
|
482
557
|
y(u.$slots, "default", {
|
|
483
558
|
checkboxes: e.checkboxes,
|
|
484
559
|
direction: e.direction
|
|
485
560
|
}, () => [
|
|
486
|
-
(
|
|
561
|
+
(s(!0), r(J, null, X(e.checkboxes, (v, z) => {
|
|
487
562
|
var w;
|
|
488
|
-
return
|
|
489
|
-
|
|
563
|
+
return s(), r("li", { key: z }, [
|
|
564
|
+
M(oe, N(u.$attrs, {
|
|
490
565
|
id: (w = v == null ? void 0 : v.id) != null ? w : `${v.value}`,
|
|
491
566
|
class: ["checkbox", { "mb-micro": e.direction === "column", "mr-micro": e.direction === "row" }],
|
|
492
567
|
label: v.label,
|
|
@@ -495,31 +570,31 @@ const wt = ["aria-labelledby"], St = ["id", "data-testid"], xt = ["id"], kt = ["
|
|
|
495
570
|
checked: a(v.value),
|
|
496
571
|
"aria-invalid": !!e.error,
|
|
497
572
|
"aria-describedby": n(e.hint, e.error),
|
|
498
|
-
onChange: (
|
|
573
|
+
onChange: (C) => c(v)
|
|
499
574
|
}), null, 16, ["id", "class", "label", "name", "value", "checked", "aria-invalid", "aria-describedby", "onChange"])
|
|
500
575
|
]);
|
|
501
576
|
}), 128))
|
|
502
577
|
])
|
|
503
578
|
], 2),
|
|
504
|
-
i(e.hint, e.error) ? (
|
|
579
|
+
i(e.hint, e.error) ? (s(), r("p", {
|
|
505
580
|
key: 0,
|
|
506
581
|
id: `hint-${e.id}`,
|
|
507
582
|
class: "hint"
|
|
508
|
-
},
|
|
583
|
+
}, x(e.hint), 9, It)) : e.error ? (s(), r("p", {
|
|
509
584
|
key: 1,
|
|
510
585
|
id: `error-${e.id}`,
|
|
511
586
|
class: "error"
|
|
512
|
-
},
|
|
513
|
-
], 8,
|
|
587
|
+
}, x(e.error), 9, Et)) : T("", !0)
|
|
588
|
+
], 8, Lt));
|
|
514
589
|
}
|
|
515
590
|
});
|
|
516
|
-
|
|
517
|
-
e.component("SolCheckbox",
|
|
591
|
+
oe.install = (e) => {
|
|
592
|
+
e.component("SolCheckbox", oe);
|
|
518
593
|
};
|
|
519
594
|
he.install = (e) => {
|
|
520
595
|
e.component("SolCheckboxGroup", he);
|
|
521
596
|
};
|
|
522
|
-
const
|
|
597
|
+
const Pt = ["id", "for", "data-testid"], Ot = { class: "switch-container" }, Dt = ["id", "aria-checked", "aria-labelledby", "data-testid", "checked", "value", "name"], Rt = /* @__PURE__ */ h("span", { class: "ellipse" }, null, -1), fe = /* @__PURE__ */ V({
|
|
523
598
|
__name: "Switch",
|
|
524
599
|
props: {
|
|
525
600
|
id: null,
|
|
@@ -533,17 +608,17 @@ const Ct = ["id", "for", "data-testid"], Bt = { class: "switch-container" }, Tt
|
|
|
533
608
|
},
|
|
534
609
|
emits: ["change"],
|
|
535
610
|
setup(e, { emit: l }) {
|
|
536
|
-
return (t, i) => (
|
|
537
|
-
class:
|
|
611
|
+
return (t, i) => (s(), r("div", {
|
|
612
|
+
class: S(["sol-switch-core", [t.$props.class, { "-horizontal": e.horizontalLabel }]])
|
|
538
613
|
}, [
|
|
539
|
-
|
|
614
|
+
h("label", {
|
|
540
615
|
id: `switch-label-${e.name}-${e.id}`,
|
|
541
|
-
class:
|
|
616
|
+
class: S(["label", { "mb-1": !e.horizontalLabel, "sr-only": e.hideLabel }]),
|
|
542
617
|
for: `switch-${e.name}-${e.id}`,
|
|
543
618
|
"data-testid": `switch-label-${e.name}-${e.id}`
|
|
544
|
-
},
|
|
545
|
-
|
|
546
|
-
|
|
619
|
+
}, x(e.label), 11, Pt),
|
|
620
|
+
h("div", Ot, [
|
|
621
|
+
h("input", N(t.$attrs, {
|
|
547
622
|
id: `switch-${e.name}-${e.id}`,
|
|
548
623
|
type: "checkbox",
|
|
549
624
|
class: "switch",
|
|
@@ -555,8 +630,8 @@ const Ct = ["id", "for", "data-testid"], Bt = { class: "switch-container" }, Tt
|
|
|
555
630
|
value: e.value,
|
|
556
631
|
name: e.name,
|
|
557
632
|
onChange: i[0] || (i[0] = (n) => l("change", e.value))
|
|
558
|
-
}), null, 16,
|
|
559
|
-
|
|
633
|
+
}), null, 16, Dt),
|
|
634
|
+
Rt
|
|
560
635
|
])
|
|
561
636
|
], 2));
|
|
562
637
|
}
|
|
@@ -564,68 +639,68 @@ const Ct = ["id", "for", "data-testid"], Bt = { class: "switch-container" }, Tt
|
|
|
564
639
|
fe.install = (e) => {
|
|
565
640
|
e.component("SolSwitch", fe);
|
|
566
641
|
};
|
|
567
|
-
var
|
|
568
|
-
const
|
|
642
|
+
var Se;
|
|
643
|
+
const _ = typeof window < "u", pt = (e) => typeof e == "string", de = () => {
|
|
569
644
|
};
|
|
570
|
-
|
|
571
|
-
function
|
|
645
|
+
_ && ((Se = window == null ? void 0 : window.navigator) == null ? void 0 : Se.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
646
|
+
function Ht(e) {
|
|
572
647
|
return typeof e == "function" ? e() : g(e);
|
|
573
648
|
}
|
|
574
|
-
function
|
|
575
|
-
return
|
|
649
|
+
function Nt(e) {
|
|
650
|
+
return Re() ? (pe(e), !0) : !1;
|
|
576
651
|
}
|
|
577
|
-
function
|
|
652
|
+
function Y(e) {
|
|
578
653
|
var l;
|
|
579
|
-
const t =
|
|
654
|
+
const t = Ht(e);
|
|
580
655
|
return (l = t == null ? void 0 : t.$el) != null ? l : t;
|
|
581
656
|
}
|
|
582
|
-
const
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
function
|
|
657
|
+
const Ve = _ ? window : void 0;
|
|
658
|
+
_ && window.document;
|
|
659
|
+
_ && window.navigator;
|
|
660
|
+
_ && window.location;
|
|
661
|
+
function te(...e) {
|
|
587
662
|
let l, t, i, n;
|
|
588
|
-
if (
|
|
589
|
-
return
|
|
590
|
-
let a =
|
|
591
|
-
const o =
|
|
663
|
+
if (pt(e[0]) ? ([t, i, n] = e, l = Ve) : [l, t, i, n] = e, !l)
|
|
664
|
+
return de;
|
|
665
|
+
let a = de;
|
|
666
|
+
const o = He(() => Y(l), (u) => {
|
|
592
667
|
a(), u && (u.addEventListener(t, i, n), a = () => {
|
|
593
|
-
u.removeEventListener(t, i, n), a =
|
|
668
|
+
u.removeEventListener(t, i, n), a = de;
|
|
594
669
|
});
|
|
595
670
|
}, { immediate: !0, flush: "post" }), c = () => {
|
|
596
671
|
o(), a();
|
|
597
672
|
};
|
|
598
|
-
return
|
|
673
|
+
return Nt(c), c;
|
|
599
674
|
}
|
|
600
|
-
function
|
|
601
|
-
const { window: i =
|
|
675
|
+
function Le(e, l, t = {}) {
|
|
676
|
+
const { window: i = Ve, ignore: n, capture: a = !0, detectIframe: o = !1 } = t;
|
|
602
677
|
if (!i)
|
|
603
678
|
return;
|
|
604
|
-
const c =
|
|
679
|
+
const c = I(!0);
|
|
605
680
|
let u;
|
|
606
|
-
const
|
|
681
|
+
const f = (w) => {
|
|
607
682
|
i.clearTimeout(u);
|
|
608
|
-
const
|
|
609
|
-
!
|
|
610
|
-
const
|
|
611
|
-
return
|
|
683
|
+
const C = Y(e), k = w.composedPath();
|
|
684
|
+
!C || C === w.target || k.includes(C) || !c.value || n && n.length > 0 && n.some((A) => {
|
|
685
|
+
const R = Y(A);
|
|
686
|
+
return R && (w.target === R || k.includes(R));
|
|
612
687
|
}) || l(w);
|
|
613
688
|
}, v = [
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
const
|
|
617
|
-
c.value = !!
|
|
689
|
+
te(i, "click", f, { passive: !0, capture: a }),
|
|
690
|
+
te(i, "pointerdown", (w) => {
|
|
691
|
+
const C = Y(e);
|
|
692
|
+
c.value = !!C && !w.composedPath().includes(C);
|
|
618
693
|
}, { passive: !0 }),
|
|
619
|
-
|
|
694
|
+
te(i, "pointerup", (w) => {
|
|
620
695
|
if (w.button === 0) {
|
|
621
|
-
const
|
|
622
|
-
w.composedPath = () =>
|
|
696
|
+
const C = w.composedPath();
|
|
697
|
+
w.composedPath = () => C, u = i.setTimeout(() => f(w), 50);
|
|
623
698
|
}
|
|
624
699
|
}, { passive: !0 }),
|
|
625
|
-
o &&
|
|
626
|
-
var
|
|
627
|
-
const
|
|
628
|
-
((
|
|
700
|
+
o && te(i, "blur", (w) => {
|
|
701
|
+
var C;
|
|
702
|
+
const k = Y(e);
|
|
703
|
+
((C = document.activeElement) == null ? void 0 : C.tagName) === "IFRAME" && !(k != null && k.contains(document.activeElement)) && l(w);
|
|
629
704
|
})
|
|
630
705
|
].filter(Boolean);
|
|
631
706
|
return () => v.forEach((w) => w());
|
|
@@ -633,28 +708,28 @@ function Ve(e, l, t = {}) {
|
|
|
633
708
|
const me = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, $e = "__vueuse_ssr_handlers__";
|
|
634
709
|
me[$e] = me[$e] || {};
|
|
635
710
|
me[$e];
|
|
636
|
-
var
|
|
711
|
+
var Ce;
|
|
637
712
|
(function(e) {
|
|
638
713
|
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
|
|
639
|
-
})(
|
|
640
|
-
const
|
|
714
|
+
})(Ce || (Ce = {}));
|
|
715
|
+
const Ut = {
|
|
641
716
|
preserveAspectRatio: "xMidYMid meet",
|
|
642
717
|
viewBox: "0 0 24 24",
|
|
643
718
|
width: "1em",
|
|
644
719
|
height: "1em"
|
|
645
|
-
},
|
|
720
|
+
}, Gt = /* @__PURE__ */ h("path", {
|
|
646
721
|
fill: "currentColor",
|
|
647
722
|
d: "M10 4a6 6 0 1 0 0 12a6 6 0 0 0 0-12zm-8 6a8 8 0 1 1 14.32 4.906l5.387 5.387a1 1 0 0 1-1.414 1.414l-5.387-5.387A8 8 0 0 1 2 10z"
|
|
648
|
-
}, null, -1),
|
|
649
|
-
|
|
723
|
+
}, null, -1), Ft = [
|
|
724
|
+
Gt
|
|
650
725
|
];
|
|
651
|
-
function
|
|
652
|
-
return
|
|
726
|
+
function Kt(e, l) {
|
|
727
|
+
return s(), r("svg", Ut, Ft);
|
|
653
728
|
}
|
|
654
|
-
const
|
|
729
|
+
const Ae = { name: "mi-search", render: Kt }, Yt = ["data-testid"], Wt = ["id", "for"], Zt = ["id", "disabled", "data-testid", "aria-expanded", "aria-labelledby", "aria-label", "aria-controls", "onClick"], jt = { class: "dropdown-container" }, qt = ["id", "data-testid", "aria-multiselectable", "aria-labelledby"], Qt = ["id", "data-testid", "selected", "aria-selected", "onClick", "onKeyup"], Jt = {
|
|
655
730
|
key: 0,
|
|
656
731
|
class: "no-data"
|
|
657
|
-
},
|
|
732
|
+
}, Xt = /* @__PURE__ */ O(" Sem dados "), ve = /* @__PURE__ */ V({
|
|
658
733
|
__name: "Dropdown",
|
|
659
734
|
props: {
|
|
660
735
|
id: null,
|
|
@@ -673,97 +748,97 @@ const Ie = { name: "mi-search", render: Pt }, Ot = ["data-testid"], Dt = ["id",
|
|
|
673
748
|
},
|
|
674
749
|
emits: ["closeDropdown", "search", "update:selected"],
|
|
675
750
|
setup(e, { emit: l }) {
|
|
676
|
-
const t = e, i =
|
|
751
|
+
const t = e, i = I(), n = I(!1), a = I(""), o = E(
|
|
677
752
|
() => {
|
|
678
|
-
var
|
|
679
|
-
return t.fetchOnSearch ? t.options : (
|
|
680
|
-
(
|
|
753
|
+
var d;
|
|
754
|
+
return t.fetchOnSearch ? t.options : (d = t.options) == null ? void 0 : d.filter(
|
|
755
|
+
(m) => typeof m == "string" ? m.includes(a.value) : m.name.includes(a.value)
|
|
681
756
|
);
|
|
682
757
|
}
|
|
683
758
|
), c = E(
|
|
684
759
|
() => Array.isArray(t.selected) ? t.selected.join(", ").trim() : t.selected
|
|
685
760
|
);
|
|
686
|
-
|
|
761
|
+
Le(i, () => {
|
|
687
762
|
n.value && v();
|
|
688
763
|
});
|
|
689
764
|
function u() {
|
|
690
|
-
t.disabled || (n.value ? v() :
|
|
765
|
+
t.disabled || (n.value ? v() : f());
|
|
691
766
|
}
|
|
692
|
-
function
|
|
767
|
+
function f() {
|
|
693
768
|
n.value = !0;
|
|
694
769
|
}
|
|
695
770
|
function v() {
|
|
696
|
-
|
|
771
|
+
ee(), l("closeDropdown");
|
|
697
772
|
}
|
|
698
|
-
function
|
|
699
|
-
const
|
|
700
|
-
return
|
|
773
|
+
function z(d) {
|
|
774
|
+
const m = new Set(t.selected);
|
|
775
|
+
return m.has(d) ? m.delete(d) : m.add(d), [...m];
|
|
701
776
|
}
|
|
702
|
-
function w(
|
|
703
|
-
const
|
|
777
|
+
function w(d) {
|
|
778
|
+
const m = typeof d == "string" ? d : d.value, $ = t.isMultipleSelect ? z(m) : m;
|
|
704
779
|
l("update:selected", $), t.closeOnSelect && !t.isMultipleSelect && v();
|
|
705
780
|
}
|
|
706
|
-
function
|
|
707
|
-
return Array.isArray(t.selected) ? typeof
|
|
781
|
+
function C(d) {
|
|
782
|
+
return Array.isArray(t.selected) ? typeof d == "string" ? t.selected.includes(d) : t.selected.includes(d.value) : typeof d == "string" ? d === t.selected : d.value === t.selected;
|
|
708
783
|
}
|
|
709
|
-
const
|
|
784
|
+
const k = Z({
|
|
710
785
|
list: void 0,
|
|
711
786
|
search: void 0
|
|
712
|
-
}), A =
|
|
787
|
+
}), A = Z({
|
|
713
788
|
id: "",
|
|
714
789
|
index: 0
|
|
715
790
|
});
|
|
716
|
-
function
|
|
717
|
-
const
|
|
718
|
-
const
|
|
791
|
+
function R({ code: d }) {
|
|
792
|
+
const m = (B) => {
|
|
793
|
+
const L = B != null ? B : A.index;
|
|
719
794
|
B !== void 0 && (A.index = B), setTimeout(() => {
|
|
720
|
-
var K,
|
|
721
|
-
const P = (K =
|
|
722
|
-
A.id = (
|
|
795
|
+
var K, xe;
|
|
796
|
+
const P = (K = k.list) == null ? void 0 : K.children[L];
|
|
797
|
+
A.id = (xe = P == null ? void 0 : P.id) != null ? xe : "", P == null || P.focus();
|
|
723
798
|
}, 0);
|
|
724
799
|
}, $ = () => {
|
|
725
800
|
var B;
|
|
726
|
-
t.searchable && (A.index = 0, (B =
|
|
801
|
+
t.searchable && (A.index = 0, (B = k == null ? void 0 : k.search) == null || B.focus());
|
|
727
802
|
};
|
|
728
|
-
switch (
|
|
803
|
+
switch (d) {
|
|
729
804
|
case "ArrowUp":
|
|
730
|
-
return A.index > 0 && (A.index -= 1),
|
|
805
|
+
return A.index > 0 && (A.index -= 1), m();
|
|
731
806
|
case "ArrowDown":
|
|
732
|
-
return n.value ? (A.index < o.value.length - 1 && (A.index += 1),
|
|
807
|
+
return n.value ? (A.index < o.value.length - 1 && (A.index += 1), m()) : (f(), m(0));
|
|
733
808
|
case "Home":
|
|
734
|
-
return
|
|
809
|
+
return m(0);
|
|
735
810
|
case "End":
|
|
736
|
-
return
|
|
811
|
+
return m(t.options.length - 1);
|
|
737
812
|
case "Escape":
|
|
738
813
|
return v();
|
|
739
814
|
default:
|
|
740
|
-
!["Enter", "NumpadEnter", "Space"].includes(
|
|
815
|
+
!["Enter", "NumpadEnter", "Space"].includes(d) && $();
|
|
741
816
|
}
|
|
742
817
|
}
|
|
743
|
-
function
|
|
818
|
+
function ee() {
|
|
744
819
|
n.value = !1, A.index = 0, a.value = "";
|
|
745
820
|
}
|
|
746
|
-
function
|
|
747
|
-
return typeof
|
|
821
|
+
function U(d, m) {
|
|
822
|
+
return typeof d == "string" ? d : d[m != null ? m : "value"];
|
|
748
823
|
}
|
|
749
|
-
function b(
|
|
750
|
-
|
|
824
|
+
function b(d, m) {
|
|
825
|
+
k[d] = m != null ? m : void 0;
|
|
751
826
|
}
|
|
752
|
-
return (
|
|
827
|
+
return (d, m) => (s(), r("div", {
|
|
753
828
|
ref_key: "el",
|
|
754
829
|
ref: i,
|
|
755
|
-
class:
|
|
830
|
+
class: S(["sol-dropdown-core", { "-smaller": e.smallerWidth }]),
|
|
756
831
|
"data-testid": `dropdown-${e.id}`,
|
|
757
|
-
onKeydownPassive:
|
|
832
|
+
onKeydownPassive: R
|
|
758
833
|
}, [
|
|
759
|
-
y(
|
|
760
|
-
|
|
834
|
+
y(d.$slots, "label", {}, () => [
|
|
835
|
+
h("label", {
|
|
761
836
|
id: `label-dropdown-${e.id}`,
|
|
762
|
-
class:
|
|
837
|
+
class: S(["label", { "-disabled": e.disabled, "sr-only": e.ariaLabel }]),
|
|
763
838
|
for: `toggle-dropdown-${e.id}`
|
|
764
|
-
},
|
|
839
|
+
}, x(e.label || e.ariaLabel), 11, Wt)
|
|
765
840
|
]),
|
|
766
|
-
|
|
841
|
+
h("button", {
|
|
767
842
|
id: `toggle-dropdown-${e.id}`,
|
|
768
843
|
disabled: e.disabled,
|
|
769
844
|
"data-testid": `toggle-dropdown-${e.id}`,
|
|
@@ -773,34 +848,34 @@ const Ie = { name: "mi-search", render: Pt }, Ot = ["data-testid"], Dt = ["id",
|
|
|
773
848
|
"aria-labelledby": `label-dropdown-${e.id}`,
|
|
774
849
|
"aria-label": e.ariaLabel,
|
|
775
850
|
"aria-controls": `dropdown-list-${e.id}`,
|
|
776
|
-
onClick:
|
|
851
|
+
onClick: H(u, ["stop"])
|
|
777
852
|
}, [
|
|
778
|
-
y(
|
|
779
|
-
toggle: { open:
|
|
853
|
+
y(d.$slots, "toggle-dropdown", {
|
|
854
|
+
toggle: { open: f, close: v, toggleDropdown: u },
|
|
780
855
|
isOpen: n.value,
|
|
781
856
|
select: w,
|
|
782
857
|
selectedSanitized: g(c),
|
|
783
858
|
selected: e.selected
|
|
784
859
|
}, () => [
|
|
785
|
-
O(
|
|
860
|
+
O(x(g(c) || "Selecione"), 1)
|
|
786
861
|
])
|
|
787
|
-
], 8,
|
|
788
|
-
|
|
862
|
+
], 8, Zt),
|
|
863
|
+
M(we, {
|
|
789
864
|
mode: "out-in",
|
|
790
865
|
name: "dropdown"
|
|
791
866
|
}, {
|
|
792
|
-
default:
|
|
793
|
-
|
|
794
|
-
e.searchable ? (
|
|
867
|
+
default: D(() => [
|
|
868
|
+
W(h("div", jt, [
|
|
869
|
+
e.searchable ? (s(), r("div", {
|
|
795
870
|
key: 0,
|
|
796
|
-
class:
|
|
871
|
+
class: S(["search-container", { "-loading": e.loading }])
|
|
797
872
|
}, [
|
|
798
|
-
y(
|
|
799
|
-
|
|
873
|
+
y(d.$slots, "search", { filter: a.value }, () => [
|
|
874
|
+
M(F, {
|
|
800
875
|
id: `search-dropdown-${e.id}`,
|
|
801
876
|
ref: ($) => b("search", $ == null ? void 0 : $.input),
|
|
802
877
|
modelValue: a.value,
|
|
803
|
-
"onUpdate:modelValue":
|
|
878
|
+
"onUpdate:modelValue": m[0] || (m[0] = ($) => a.value = $),
|
|
804
879
|
"data-testid": `search-dropdown-${e.id}`,
|
|
805
880
|
role: "combobox",
|
|
806
881
|
class: "search",
|
|
@@ -812,20 +887,20 @@ const Ie = { name: "mi-search", render: Pt }, Ot = ["data-testid"], Dt = ["id",
|
|
|
812
887
|
"aria-controls": `dropdown-list-${e.id}`,
|
|
813
888
|
"aria-activedescendant": A.id,
|
|
814
889
|
"aria-labelledby": `label-dropdown-${e.id}`,
|
|
815
|
-
onClick:
|
|
890
|
+
onClick: m[1] || (m[1] = H(() => {
|
|
816
891
|
}, ["stop"])),
|
|
817
|
-
onInput:
|
|
892
|
+
onInput: m[2] || (m[2] = ($) => {
|
|
818
893
|
var B;
|
|
819
894
|
return l("search", (B = $.target) == null ? void 0 : B.value);
|
|
820
895
|
})
|
|
821
896
|
}, null, 8, ["id", "modelValue", "data-testid", "placeholder", "aria-expanded", "aria-owns", "aria-controls", "aria-activedescendant", "aria-labelledby"]),
|
|
822
|
-
|
|
897
|
+
M(g(Ae), {
|
|
823
898
|
"aria-hidden": "true",
|
|
824
899
|
class: "icon"
|
|
825
900
|
})
|
|
826
901
|
])
|
|
827
902
|
], 2)) : T("", !0),
|
|
828
|
-
|
|
903
|
+
h("ul", {
|
|
829
904
|
id: `dropdown-list-${e.id}`,
|
|
830
905
|
ref: ($) => b("list", $),
|
|
831
906
|
"data-testid": `dropdown-list-${e.id}`,
|
|
@@ -835,63 +910,63 @@ const Ie = { name: "mi-search", render: Pt }, Ot = ["data-testid"], Dt = ["id",
|
|
|
835
910
|
"aria-labelledby": `label-dropdown-${e.id}`,
|
|
836
911
|
class: "dropdown-list-core"
|
|
837
912
|
}, [
|
|
838
|
-
(
|
|
839
|
-
id: `option-${e.id}-${
|
|
913
|
+
(s(!0), r(J, null, X(g(o), ($, B) => (s(), r("li", {
|
|
914
|
+
id: `option-${e.id}-${U($, "value")}`,
|
|
840
915
|
key: B,
|
|
841
|
-
"data-testid": `option-${e.id}-${
|
|
916
|
+
"data-testid": `option-${e.id}-${U($, "value")}`,
|
|
842
917
|
role: "option",
|
|
843
918
|
tabindex: "-1",
|
|
844
919
|
class: "dropdown-item",
|
|
845
|
-
style:
|
|
846
|
-
selected:
|
|
847
|
-
"aria-selected":
|
|
848
|
-
onClick: (
|
|
920
|
+
style: ne(`--item: ${B + 1}`),
|
|
921
|
+
selected: C($),
|
|
922
|
+
"aria-selected": C($),
|
|
923
|
+
onClick: (L) => w($),
|
|
849
924
|
onKeyup: [
|
|
850
|
-
|
|
851
|
-
|
|
925
|
+
j((L) => w($), ["enter"]),
|
|
926
|
+
j((L) => w($), ["space"])
|
|
852
927
|
]
|
|
853
928
|
}, [
|
|
854
|
-
y(
|
|
855
|
-
text:
|
|
929
|
+
y(d.$slots, "default", {
|
|
930
|
+
text: U($, "name"),
|
|
856
931
|
option: $,
|
|
857
|
-
isSelect:
|
|
932
|
+
isSelect: C
|
|
858
933
|
}, () => [
|
|
859
|
-
O(
|
|
934
|
+
O(x(U($, "name")), 1)
|
|
860
935
|
])
|
|
861
|
-
], 44,
|
|
862
|
-
g(o).length ? T("", !0) : (
|
|
863
|
-
y(
|
|
864
|
-
|
|
936
|
+
], 44, Qt))), 128)),
|
|
937
|
+
g(o).length ? T("", !0) : (s(), r("li", Jt, [
|
|
938
|
+
y(d.$slots, "no-data", {}, () => [
|
|
939
|
+
Xt
|
|
865
940
|
])
|
|
866
941
|
]))
|
|
867
|
-
], 8,
|
|
942
|
+
], 8, qt)
|
|
868
943
|
], 512), [
|
|
869
|
-
[
|
|
944
|
+
[le, n.value]
|
|
870
945
|
])
|
|
871
946
|
]),
|
|
872
947
|
_: 3
|
|
873
948
|
})
|
|
874
|
-
], 42,
|
|
949
|
+
], 42, Yt));
|
|
875
950
|
}
|
|
876
951
|
});
|
|
877
952
|
ve.install = (e) => {
|
|
878
953
|
e.component("SolDropdown", ve);
|
|
879
954
|
};
|
|
880
|
-
const
|
|
955
|
+
const _t = {
|
|
881
956
|
preserveAspectRatio: "xMidYMid meet",
|
|
882
957
|
viewBox: "0 0 24 24",
|
|
883
958
|
width: "1em",
|
|
884
959
|
height: "1em"
|
|
885
|
-
},
|
|
960
|
+
}, el = /* @__PURE__ */ h("path", {
|
|
886
961
|
fill: "currentColor",
|
|
887
962
|
d: "M5.293 5.293a1 1 0 0 1 1.414 0L12 10.586l5.293-5.293a1 1 0 1 1 1.414 1.414L13.414 12l5.293 5.293a1 1 0 0 1-1.414 1.414L12 13.414l-5.293 5.293a1 1 0 0 1-1.414-1.414L10.586 12L5.293 6.707a1 1 0 0 1 0-1.414z"
|
|
888
|
-
}, null, -1),
|
|
889
|
-
|
|
963
|
+
}, null, -1), tl = [
|
|
964
|
+
el
|
|
890
965
|
];
|
|
891
|
-
function
|
|
892
|
-
return
|
|
966
|
+
function ll(e, l) {
|
|
967
|
+
return s(), r("svg", _t, tl);
|
|
893
968
|
}
|
|
894
|
-
const
|
|
969
|
+
const Ie = { name: "mi-close", render: ll }, nl = ["id", "data-testid", "title", "aria-describedby", "aria-disabled", "onKeydown"], il = ["id"], al = { class: "label" }, se = /* @__PURE__ */ V({
|
|
895
970
|
__name: "Chip",
|
|
896
971
|
props: {
|
|
897
972
|
id: null,
|
|
@@ -917,43 +992,43 @@ const Ae = { name: "mi-close", render: Yt }, jt = ["id", "data-testid", "title",
|
|
|
917
992
|
return !1;
|
|
918
993
|
}
|
|
919
994
|
}
|
|
920
|
-
return (n, a) => (
|
|
995
|
+
return (n, a) => (s(), r("div", {
|
|
921
996
|
id: `chip-${e.id}`,
|
|
922
997
|
"data-testid": `chip-${e.id}`,
|
|
923
|
-
class:
|
|
998
|
+
class: S(["sol-chip-core", { "-selected": e.selected, "-disabled": e.disabled }]),
|
|
924
999
|
tabindex: "0",
|
|
925
1000
|
title: e.label,
|
|
926
1001
|
"aria-describedby": `chip-description-${e.id}`,
|
|
927
1002
|
"aria-disabled": e.disabled,
|
|
928
1003
|
onClick: a[1] || (a[1] = (o) => l("update:selected")),
|
|
929
|
-
onKeydown:
|
|
1004
|
+
onKeydown: H(i, ["self"])
|
|
930
1005
|
}, [
|
|
931
|
-
|
|
1006
|
+
h("span", {
|
|
932
1007
|
id: `chip-description-${e.id}`,
|
|
933
1008
|
"z-index": "-1",
|
|
934
1009
|
class: "sr-only"
|
|
935
|
-
}, "Press Delete or Backspace to remove this Chip", 8,
|
|
936
|
-
|
|
1010
|
+
}, "Press Delete or Backspace to remove this Chip", 8, il),
|
|
1011
|
+
h("span", al, [
|
|
937
1012
|
y(n.$slots, "default", {}, () => [
|
|
938
|
-
O(
|
|
1013
|
+
O(x(e.label), 1)
|
|
939
1014
|
])
|
|
940
1015
|
]),
|
|
941
|
-
e.removable ? (
|
|
1016
|
+
e.removable ? (s(), r("i", {
|
|
942
1017
|
key: 0,
|
|
943
1018
|
role: "presentation",
|
|
944
1019
|
"aira-hidden": "true",
|
|
945
1020
|
class: "close",
|
|
946
|
-
onClick: a[0] || (a[0] =
|
|
1021
|
+
onClick: a[0] || (a[0] = H((o) => l("close"), ["stop"]))
|
|
947
1022
|
}, [
|
|
948
|
-
|
|
1023
|
+
M(g(Ie), { class: "icon" })
|
|
949
1024
|
])) : T("", !0)
|
|
950
|
-
], 42,
|
|
1025
|
+
], 42, nl));
|
|
951
1026
|
}
|
|
952
1027
|
});
|
|
953
|
-
const
|
|
1028
|
+
const ol = ["id", "data-testid", "aria-multiselectable", "aria-labelledby"], sl = ["id", "data-testid", "selected", "aria-selected", "onClick", "onKeyup"], dl = {
|
|
954
1029
|
key: 0,
|
|
955
1030
|
class: "no-data"
|
|
956
|
-
},
|
|
1031
|
+
}, cl = /* @__PURE__ */ O(" Sem dados "), rl = /* @__PURE__ */ V({
|
|
957
1032
|
__name: "ListOption",
|
|
958
1033
|
props: {
|
|
959
1034
|
id: null,
|
|
@@ -963,10 +1038,10 @@ const Qt = ["id", "data-testid", "aria-multiselectable", "aria-labelledby"], Xt
|
|
|
963
1038
|
},
|
|
964
1039
|
emits: ["select"],
|
|
965
1040
|
setup(e, { expose: l, emit: t }) {
|
|
966
|
-
const i =
|
|
1041
|
+
const i = I("");
|
|
967
1042
|
return l({
|
|
968
1043
|
list: i
|
|
969
|
-
}), (n, a) => (
|
|
1044
|
+
}), (n, a) => (s(), r("ul", {
|
|
970
1045
|
id: `select-list-${e.id}`,
|
|
971
1046
|
ref_key: "list",
|
|
972
1047
|
ref: i,
|
|
@@ -977,20 +1052,20 @@ const Qt = ["id", "data-testid", "aria-multiselectable", "aria-labelledby"], Xt
|
|
|
977
1052
|
"aria-labelledby": `select-label-${e.id}`,
|
|
978
1053
|
class: "select-list-core"
|
|
979
1054
|
}, [
|
|
980
|
-
(
|
|
1055
|
+
(s(!0), r(J, null, X(e.options, (o, c) => (s(), r("li", {
|
|
981
1056
|
id: `option-${e.id}-${o.value}`,
|
|
982
1057
|
key: c,
|
|
983
1058
|
"data-testid": `option-${e.id}-${o.value}`,
|
|
984
1059
|
role: "option",
|
|
985
1060
|
tabindex: "-1",
|
|
986
1061
|
class: "select-option-item",
|
|
987
|
-
style:
|
|
1062
|
+
style: ne(`--item: ${c + 1}`),
|
|
988
1063
|
selected: e.isSelected(o),
|
|
989
1064
|
"aria-selected": e.isSelected(o),
|
|
990
1065
|
onClick: (u) => t("select", o),
|
|
991
1066
|
onKeyup: [
|
|
992
|
-
|
|
993
|
-
|
|
1067
|
+
j((u) => t("select", o), ["enter"]),
|
|
1068
|
+
j((u) => t("select", o), ["space"])
|
|
994
1069
|
]
|
|
995
1070
|
}, [
|
|
996
1071
|
y(n.$slots, "item-list", {
|
|
@@ -999,39 +1074,39 @@ const Qt = ["id", "data-testid", "aria-multiselectable", "aria-labelledby"], Xt
|
|
|
999
1074
|
option: o,
|
|
1000
1075
|
isSelected: e.isSelected(o)
|
|
1001
1076
|
}, () => [
|
|
1002
|
-
O(
|
|
1077
|
+
O(x(o.name), 1)
|
|
1003
1078
|
])
|
|
1004
|
-
], 44,
|
|
1005
|
-
e.options.length ? T("", !0) : (
|
|
1079
|
+
], 44, sl))), 128)),
|
|
1080
|
+
e.options.length ? T("", !0) : (s(), r("li", dl, [
|
|
1006
1081
|
y(n.$slots, "no-data", {}, () => [
|
|
1007
|
-
|
|
1082
|
+
cl
|
|
1008
1083
|
])
|
|
1009
1084
|
]))
|
|
1010
|
-
], 8,
|
|
1085
|
+
], 8, ol));
|
|
1011
1086
|
}
|
|
1012
1087
|
});
|
|
1013
|
-
const
|
|
1088
|
+
const ul = {
|
|
1014
1089
|
preserveAspectRatio: "xMidYMid meet",
|
|
1015
1090
|
viewBox: "0 0 24 24",
|
|
1016
1091
|
width: "1em",
|
|
1017
1092
|
height: "1em"
|
|
1018
|
-
},
|
|
1093
|
+
}, hl = /* @__PURE__ */ h("path", {
|
|
1019
1094
|
fill: "currentColor",
|
|
1020
1095
|
d: "m17 10l-5 6l-5-6h10z"
|
|
1021
|
-
}, null, -1),
|
|
1022
|
-
|
|
1096
|
+
}, null, -1), fl = [
|
|
1097
|
+
hl
|
|
1023
1098
|
];
|
|
1024
|
-
function
|
|
1025
|
-
return
|
|
1099
|
+
function ml(e, l) {
|
|
1100
|
+
return s(), r("svg", ul, fl);
|
|
1026
1101
|
}
|
|
1027
|
-
const
|
|
1102
|
+
const $l = { name: "mi-caret-down", render: ml }, vl = ["data-testid"], bl = ["id"], yl = ["id", "disabled", "data-testid", "aria-expanded", "aria-labelledby", "aria-label", "aria-controls", "onClick"], gl = {
|
|
1028
1103
|
key: 0,
|
|
1029
1104
|
class: "container-tags"
|
|
1030
|
-
},
|
|
1105
|
+
}, wl = {
|
|
1031
1106
|
key: 1,
|
|
1032
1107
|
class: "mr-micro placeholder-inline",
|
|
1033
1108
|
tabindex: "-1"
|
|
1034
|
-
},
|
|
1109
|
+
}, xl = { class: "error" }, Sl = { class: "select-options-container" }, be = /* @__PURE__ */ V({
|
|
1035
1110
|
__name: "Select",
|
|
1036
1111
|
props: {
|
|
1037
1112
|
id: null,
|
|
@@ -1052,91 +1127,91 @@ const al = { name: "mi-caret-down", render: il }, ol = ["data-testid"], sl = ["i
|
|
|
1052
1127
|
},
|
|
1053
1128
|
emits: ["closeDropdown", "search", "update:selected"],
|
|
1054
1129
|
setup(e, { emit: l }) {
|
|
1055
|
-
const t = e, i =
|
|
1130
|
+
const t = e, i = I(), n = I(!1), a = I(""), o = E(
|
|
1056
1131
|
() => {
|
|
1057
1132
|
var b;
|
|
1058
|
-
return t.fetchOnSearch ? t.options : (b = t.options) == null ? void 0 : b.filter((
|
|
1133
|
+
return t.fetchOnSearch ? t.options : (b = t.options) == null ? void 0 : b.filter((d) => d.name.includes(a.value));
|
|
1059
1134
|
}
|
|
1060
1135
|
);
|
|
1061
|
-
|
|
1062
|
-
n.value &&
|
|
1136
|
+
Le(i, () => {
|
|
1137
|
+
n.value && f();
|
|
1063
1138
|
});
|
|
1064
1139
|
function c() {
|
|
1065
|
-
t.disabled || (n.value ?
|
|
1140
|
+
t.disabled || (n.value ? f() : u());
|
|
1066
1141
|
}
|
|
1067
1142
|
function u() {
|
|
1068
1143
|
n.value = !0;
|
|
1069
1144
|
}
|
|
1070
|
-
function
|
|
1071
|
-
|
|
1145
|
+
function f() {
|
|
1146
|
+
R(), l("closeDropdown");
|
|
1072
1147
|
}
|
|
1073
1148
|
function v(b) {
|
|
1074
1149
|
if (Array.isArray(t.selected)) {
|
|
1075
|
-
const
|
|
1076
|
-
({ value:
|
|
1150
|
+
const d = t.selected.findIndex(
|
|
1151
|
+
({ value: m }) => m === b.value
|
|
1077
1152
|
);
|
|
1078
|
-
return
|
|
1153
|
+
return d === -1 ? [...t.selected, b] : t.selected.filter((m, $) => $ !== d);
|
|
1079
1154
|
}
|
|
1080
1155
|
return [b];
|
|
1081
1156
|
}
|
|
1082
|
-
function
|
|
1083
|
-
t.multiple ? l("update:selected", v(b)) : l("update:selected", b), t.closeOnSelect && !t.multiple &&
|
|
1157
|
+
function z(b) {
|
|
1158
|
+
t.multiple ? l("update:selected", v(b)) : l("update:selected", b), t.closeOnSelect && !t.multiple && f();
|
|
1084
1159
|
}
|
|
1085
1160
|
function w(b) {
|
|
1086
|
-
var
|
|
1087
|
-
return Array.isArray(t.selected) ? t.selected.some(({ value:
|
|
1161
|
+
var d;
|
|
1162
|
+
return Array.isArray(t.selected) ? t.selected.some(({ value: m }) => m === b.value) : b.value === ((d = t.selected) == null ? void 0 : d.value);
|
|
1088
1163
|
}
|
|
1089
|
-
const
|
|
1164
|
+
const C = Z({
|
|
1090
1165
|
list: void 0,
|
|
1091
1166
|
search: void 0
|
|
1092
|
-
}),
|
|
1167
|
+
}), k = Z({
|
|
1093
1168
|
id: "",
|
|
1094
1169
|
index: 0
|
|
1095
1170
|
});
|
|
1096
1171
|
function A({ code: b }) {
|
|
1097
|
-
const
|
|
1098
|
-
const B = $ != null ? $ :
|
|
1099
|
-
$ !== void 0 && (
|
|
1172
|
+
const d = ($) => {
|
|
1173
|
+
const B = $ != null ? $ : k.index;
|
|
1174
|
+
$ !== void 0 && (k.index = $), setTimeout(() => {
|
|
1100
1175
|
var P, K;
|
|
1101
|
-
const
|
|
1102
|
-
|
|
1176
|
+
const L = (P = C.list) == null ? void 0 : P.children[B];
|
|
1177
|
+
k.id = (K = L == null ? void 0 : L.id) != null ? K : "", L == null || L.focus();
|
|
1103
1178
|
}, 0);
|
|
1104
|
-
},
|
|
1179
|
+
}, m = () => {
|
|
1105
1180
|
var $;
|
|
1106
|
-
t.searchable && (
|
|
1181
|
+
t.searchable && (k.index = 0, ($ = C == null ? void 0 : C.search) == null || $.focus());
|
|
1107
1182
|
};
|
|
1108
1183
|
switch (b) {
|
|
1109
1184
|
case "ArrowUp":
|
|
1110
|
-
return
|
|
1185
|
+
return k.index > 0 && (k.index -= 1), d();
|
|
1111
1186
|
case "ArrowDown":
|
|
1112
|
-
return n.value ? (
|
|
1187
|
+
return n.value ? (k.index < t.options.length - 1 && (k.index += 1), d()) : (u(), d(0));
|
|
1113
1188
|
case "Home":
|
|
1114
|
-
return
|
|
1189
|
+
return d(0);
|
|
1115
1190
|
case "End":
|
|
1116
|
-
return
|
|
1191
|
+
return d(t.options.length - 1);
|
|
1117
1192
|
case "Escape":
|
|
1118
|
-
return
|
|
1193
|
+
return f();
|
|
1119
1194
|
default:
|
|
1120
|
-
!["Enter", "NumpadEnter", "Space"].includes(b) &&
|
|
1195
|
+
!["Enter", "NumpadEnter", "Space"].includes(b) && m();
|
|
1121
1196
|
}
|
|
1122
1197
|
}
|
|
1123
|
-
function
|
|
1124
|
-
n.value = !1,
|
|
1198
|
+
function R() {
|
|
1199
|
+
n.value = !1, k.index = 0, a.value = "";
|
|
1125
1200
|
}
|
|
1126
|
-
function
|
|
1127
|
-
return (
|
|
1128
|
-
|
|
1201
|
+
function ee(b) {
|
|
1202
|
+
return (d) => {
|
|
1203
|
+
C[b] = b === "search" ? d == null ? void 0 : d.input : d == null ? void 0 : d.list;
|
|
1129
1204
|
};
|
|
1130
1205
|
}
|
|
1131
|
-
function
|
|
1132
|
-
var
|
|
1206
|
+
function U() {
|
|
1207
|
+
var d;
|
|
1133
1208
|
const b = t.selected;
|
|
1134
|
-
return (
|
|
1209
|
+
return (d = b == null ? void 0 : b.name) != null ? d : t.placeholder;
|
|
1135
1210
|
}
|
|
1136
|
-
return (b,
|
|
1211
|
+
return (b, d) => (s(), r("div", {
|
|
1137
1212
|
ref_key: "el",
|
|
1138
1213
|
ref: i,
|
|
1139
|
-
class:
|
|
1214
|
+
class: S(["sol-select-core", { "-smaller": e.smallerWidth }]),
|
|
1140
1215
|
"data-testid": `select-${e.id}`,
|
|
1141
1216
|
onKeydownPassive: A
|
|
1142
1217
|
}, [
|
|
@@ -1144,13 +1219,13 @@ const al = { name: "mi-caret-down", render: il }, ol = ["data-testid"], sl = ["i
|
|
|
1144
1219
|
id: `select-label-${e.id}`,
|
|
1145
1220
|
for: `select-toggle-${e.id}`
|
|
1146
1221
|
}, () => [
|
|
1147
|
-
e.label ? (
|
|
1222
|
+
e.label ? (s(), r("label", {
|
|
1148
1223
|
key: 0,
|
|
1149
1224
|
id: `select-label-${e.id}`,
|
|
1150
|
-
class:
|
|
1151
|
-
},
|
|
1225
|
+
class: S(["label", { "-disabled": e.disabled }])
|
|
1226
|
+
}, x(e.label), 11, bl)) : T("", !0)
|
|
1152
1227
|
]),
|
|
1153
|
-
|
|
1228
|
+
h("button", {
|
|
1154
1229
|
id: `select-toggle-${e.id}`,
|
|
1155
1230
|
disabled: e.disabled,
|
|
1156
1231
|
"data-testid": `select-toggle-${e.id}`,
|
|
@@ -1160,51 +1235,51 @@ const al = { name: "mi-caret-down", render: il }, ol = ["data-testid"], sl = ["i
|
|
|
1160
1235
|
"aria-labelledby": `select-label-${e.id}`,
|
|
1161
1236
|
"aria-label": e.ariaLabel,
|
|
1162
1237
|
"aria-controls": `select-list-${e.id}`,
|
|
1163
|
-
onClick:
|
|
1238
|
+
onClick: H(c, ["stop"])
|
|
1164
1239
|
}, [
|
|
1165
1240
|
y(b.$slots, "toggle-dropdown", {
|
|
1166
|
-
toggle: { open: u, close:
|
|
1241
|
+
toggle: { open: u, close: f, toggleDropdown: c },
|
|
1167
1242
|
isOpen: n.value,
|
|
1168
|
-
select:
|
|
1243
|
+
select: z,
|
|
1169
1244
|
selected: e.selected
|
|
1170
1245
|
}, () => {
|
|
1171
|
-
var
|
|
1246
|
+
var m;
|
|
1172
1247
|
return [
|
|
1173
|
-
e.multiple && Array.isArray(e.selected) && ((
|
|
1174
|
-
(
|
|
1248
|
+
e.multiple && Array.isArray(e.selected) && ((m = e.selected) == null ? void 0 : m.length) ? (s(), r("div", gl, [
|
|
1249
|
+
(s(!0), r(J, null, X(e.selected, ($, B) => (s(), p(se, {
|
|
1175
1250
|
id: $.value,
|
|
1176
1251
|
key: B,
|
|
1177
1252
|
label: $.name,
|
|
1178
|
-
onClick:
|
|
1179
|
-
onClose: (
|
|
1253
|
+
onClick: H((L) => z($), ["stop"]),
|
|
1254
|
+
onClose: (L) => z($)
|
|
1180
1255
|
}, null, 8, ["id", "label", "onClick", "onClose"]))), 128))
|
|
1181
|
-
])) : (
|
|
1182
|
-
|
|
1256
|
+
])) : (s(), r("span", wl, x(U()), 1)),
|
|
1257
|
+
M(g($l), {
|
|
1183
1258
|
"aria-hidden": "true",
|
|
1184
1259
|
tabindex: "-1",
|
|
1185
|
-
class:
|
|
1260
|
+
class: S(["icon", { "-open": n.value }])
|
|
1186
1261
|
}, null, 8, ["class"])
|
|
1187
1262
|
];
|
|
1188
1263
|
})
|
|
1189
|
-
], 8,
|
|
1190
|
-
|
|
1191
|
-
|
|
1264
|
+
], 8, yl),
|
|
1265
|
+
h("span", xl, x(e.error), 1),
|
|
1266
|
+
M(we, {
|
|
1192
1267
|
mode: "out-in",
|
|
1193
1268
|
name: "dropdown"
|
|
1194
1269
|
}, {
|
|
1195
|
-
default:
|
|
1196
|
-
|
|
1270
|
+
default: D(() => [
|
|
1271
|
+
W(h("div", Sl, [
|
|
1197
1272
|
y(b.$slots, "search", {}, () => [
|
|
1198
|
-
e.searchable ? (
|
|
1273
|
+
e.searchable ? (s(), r("div", {
|
|
1199
1274
|
key: 0,
|
|
1200
|
-
class:
|
|
1275
|
+
class: S(["search-container", { "-loading": e.loading }])
|
|
1201
1276
|
}, [
|
|
1202
1277
|
y(b.$slots, "search", { filter: a.value }, () => [
|
|
1203
|
-
|
|
1278
|
+
M(F, {
|
|
1204
1279
|
id: `select-search-${e.id}`,
|
|
1205
|
-
ref:
|
|
1280
|
+
ref: ee("search"),
|
|
1206
1281
|
modelValue: a.value,
|
|
1207
|
-
"onUpdate:modelValue":
|
|
1282
|
+
"onUpdate:modelValue": d[0] || (d[0] = (m) => a.value = m),
|
|
1208
1283
|
"data-testid": `select-search-${e.id}`,
|
|
1209
1284
|
role: "combobox",
|
|
1210
1285
|
class: "search",
|
|
@@ -1214,73 +1289,73 @@ const al = { name: "mi-caret-down", render: il }, ol = ["data-testid"], sl = ["i
|
|
|
1214
1289
|
"aria-haspopup": "listbox",
|
|
1215
1290
|
"aria-owns": `select-list-${e.id}`,
|
|
1216
1291
|
"aria-controls": `select-list-${e.id}`,
|
|
1217
|
-
"aria-activedescendant":
|
|
1292
|
+
"aria-activedescendant": k.id,
|
|
1218
1293
|
"aria-labelledby": `select-label-${e.id}`,
|
|
1219
|
-
onClick:
|
|
1294
|
+
onClick: d[1] || (d[1] = H(() => {
|
|
1220
1295
|
}, ["stop"])),
|
|
1221
|
-
onInput:
|
|
1296
|
+
onInput: d[2] || (d[2] = (m) => {
|
|
1222
1297
|
var $;
|
|
1223
|
-
return l("search", ($ =
|
|
1298
|
+
return l("search", ($ = m.target) == null ? void 0 : $.value);
|
|
1224
1299
|
})
|
|
1225
1300
|
}, null, 8, ["id", "modelValue", "data-testid", "placeholder", "aria-expanded", "aria-owns", "aria-controls", "aria-activedescendant", "aria-labelledby"]),
|
|
1226
|
-
|
|
1301
|
+
M(g(Ae), {
|
|
1227
1302
|
"aria-hidden": "true",
|
|
1228
1303
|
class: "icon"
|
|
1229
1304
|
})
|
|
1230
1305
|
])
|
|
1231
1306
|
], 2)) : T("", !0),
|
|
1232
|
-
|
|
1307
|
+
M(rl, {
|
|
1233
1308
|
id: e.id,
|
|
1234
|
-
ref:
|
|
1309
|
+
ref: ee("list"),
|
|
1235
1310
|
options: g(o),
|
|
1236
1311
|
multiple: e.multiple,
|
|
1237
1312
|
"is-selected": w,
|
|
1238
|
-
onSelect:
|
|
1313
|
+
onSelect: z
|
|
1239
1314
|
}, {
|
|
1240
|
-
"item-list":
|
|
1315
|
+
"item-list": D(({ text: m, value: $, option: B, isSelected: L }) => [
|
|
1241
1316
|
y(b.$slots, "default", {
|
|
1242
|
-
text:
|
|
1317
|
+
text: m,
|
|
1243
1318
|
value: $,
|
|
1244
1319
|
option: B,
|
|
1245
|
-
isSelected:
|
|
1320
|
+
isSelected: L
|
|
1246
1321
|
})
|
|
1247
1322
|
]),
|
|
1248
|
-
"no-data":
|
|
1323
|
+
"no-data": D(() => [
|
|
1249
1324
|
y(b.$slots, "no-data")
|
|
1250
1325
|
]),
|
|
1251
1326
|
_: 3
|
|
1252
1327
|
}, 8, ["id", "options", "multiple"])
|
|
1253
1328
|
])
|
|
1254
1329
|
], 512), [
|
|
1255
|
-
[
|
|
1330
|
+
[le, n.value]
|
|
1256
1331
|
])
|
|
1257
1332
|
]),
|
|
1258
1333
|
_: 3
|
|
1259
1334
|
})
|
|
1260
|
-
], 42,
|
|
1335
|
+
], 42, vl));
|
|
1261
1336
|
}
|
|
1262
1337
|
});
|
|
1263
1338
|
be.install = (e) => {
|
|
1264
1339
|
e.component("SolSelect", be);
|
|
1265
1340
|
};
|
|
1266
|
-
|
|
1267
|
-
e.component("SolChip",
|
|
1341
|
+
se.install = (e) => {
|
|
1342
|
+
e.component("SolChip", se);
|
|
1268
1343
|
};
|
|
1269
|
-
const
|
|
1344
|
+
const Cl = {
|
|
1270
1345
|
preserveAspectRatio: "xMidYMid meet",
|
|
1271
1346
|
viewBox: "0 0 24 24",
|
|
1272
1347
|
width: "1em",
|
|
1273
1348
|
height: "1em"
|
|
1274
|
-
},
|
|
1349
|
+
}, kl = /* @__PURE__ */ h("path", {
|
|
1275
1350
|
fill: "currentColor",
|
|
1276
1351
|
d: "M11.293 7.293a1 1 0 0 1 1.414 0l6 6a1 1 0 0 1-1.414 1.414L12 9.414l-5.293 5.293a1 1 0 0 1-1.414-1.414l6-6z"
|
|
1277
|
-
}, null, -1),
|
|
1278
|
-
|
|
1352
|
+
}, null, -1), Bl = [
|
|
1353
|
+
kl
|
|
1279
1354
|
];
|
|
1280
|
-
function
|
|
1281
|
-
return
|
|
1355
|
+
function Tl(e, l) {
|
|
1356
|
+
return s(), r("svg", Cl, Bl);
|
|
1282
1357
|
}
|
|
1283
|
-
const
|
|
1358
|
+
const Ml = { name: "mi-chevron-up", render: Tl }, zl = ["id", "data-testid", "aria-disabled"], Vl = ["data-testid", "tabindex"], Ll = ["data-testid"], ye = /* @__PURE__ */ V({
|
|
1284
1359
|
__name: "Accordion",
|
|
1285
1360
|
props: {
|
|
1286
1361
|
id: null,
|
|
@@ -1289,38 +1364,38 @@ const bl = { name: "mi-chevron-up", render: vl }, yl = ["id", "data-testid", "ar
|
|
|
1289
1364
|
disabled: { type: Boolean }
|
|
1290
1365
|
},
|
|
1291
1366
|
setup(e) {
|
|
1292
|
-
return (l, t) => (
|
|
1367
|
+
return (l, t) => (s(), r("details", {
|
|
1293
1368
|
id: `accordion-${e.id}`,
|
|
1294
1369
|
"data-testid": `accordion-${e.id}`,
|
|
1295
|
-
class:
|
|
1370
|
+
class: S(["sol-accordion-core", { "-invert": e.invert, "-disabled": e.disabled }]),
|
|
1296
1371
|
"aria-disabled": e.disabled
|
|
1297
1372
|
}, [
|
|
1298
|
-
|
|
1373
|
+
h("summary", {
|
|
1299
1374
|
"data-testid": `accordion-title-${e.id}`,
|
|
1300
1375
|
class: "summary",
|
|
1301
1376
|
tabindex: e.disabled ? -1 : 0
|
|
1302
1377
|
}, [
|
|
1303
1378
|
y(l.$slots, "title", {}, () => [
|
|
1304
|
-
O(
|
|
1379
|
+
O(x(e.title), 1)
|
|
1305
1380
|
]),
|
|
1306
|
-
|
|
1381
|
+
M(g(Ml), {
|
|
1307
1382
|
class: "icon",
|
|
1308
1383
|
"aria-hidden": "true"
|
|
1309
1384
|
})
|
|
1310
|
-
], 8,
|
|
1311
|
-
|
|
1385
|
+
], 8, Vl),
|
|
1386
|
+
h("div", {
|
|
1312
1387
|
"data-testid": `accordion-content-${e.id}`,
|
|
1313
1388
|
class: "container"
|
|
1314
1389
|
}, [
|
|
1315
1390
|
y(l.$slots, "default")
|
|
1316
|
-
], 8,
|
|
1317
|
-
], 10,
|
|
1391
|
+
], 8, Ll)
|
|
1392
|
+
], 10, zl));
|
|
1318
1393
|
}
|
|
1319
1394
|
});
|
|
1320
1395
|
ye.install = (e) => {
|
|
1321
1396
|
e.component("SolAccordion", ye);
|
|
1322
1397
|
};
|
|
1323
|
-
const
|
|
1398
|
+
const Ee = 12, G = {
|
|
1324
1399
|
type: "success",
|
|
1325
1400
|
timeout: 5e3,
|
|
1326
1401
|
showIcon: !0,
|
|
@@ -1328,13 +1403,13 @@ const Le = 12, U = {
|
|
|
1328
1403
|
position: "top-right",
|
|
1329
1404
|
hideProgressBar: !1
|
|
1330
1405
|
};
|
|
1331
|
-
function
|
|
1332
|
-
const t =
|
|
1406
|
+
function Al(e, l) {
|
|
1407
|
+
const t = Z({
|
|
1333
1408
|
id: null,
|
|
1334
1409
|
intervalId: null,
|
|
1335
1410
|
startTime: 0,
|
|
1336
1411
|
remaining: l
|
|
1337
|
-
}), i =
|
|
1412
|
+
}), i = I(100);
|
|
1338
1413
|
function n() {
|
|
1339
1414
|
clearInterval(t.intervalId), clearTimeout(t.id), t.remaining -= Date.now() - t.startTime;
|
|
1340
1415
|
}
|
|
@@ -1349,7 +1424,7 @@ function Sl(e, l) {
|
|
|
1349
1424
|
return Te(() => {
|
|
1350
1425
|
if (l <= 0)
|
|
1351
1426
|
return !1;
|
|
1352
|
-
}),
|
|
1427
|
+
}), Ne(() => {
|
|
1353
1428
|
o();
|
|
1354
1429
|
}), {
|
|
1355
1430
|
start: a,
|
|
@@ -1358,7 +1433,7 @@ function Sl(e, l) {
|
|
|
1358
1433
|
progress: i
|
|
1359
1434
|
};
|
|
1360
1435
|
}
|
|
1361
|
-
function
|
|
1436
|
+
function Il(e) {
|
|
1362
1437
|
return {
|
|
1363
1438
|
stylePosition: E(() => {
|
|
1364
1439
|
const { position: t, offset: i } = e();
|
|
@@ -1403,77 +1478,77 @@ function xl(e) {
|
|
|
1403
1478
|
})
|
|
1404
1479
|
};
|
|
1405
1480
|
}
|
|
1406
|
-
var
|
|
1407
|
-
const
|
|
1481
|
+
var Pe = /* @__PURE__ */ ((e) => (e["top-left"] = "bounce-left", e["top-right"] = "bounce-right", e["top-center"] = "bounce-down", e["bottom-left"] = "bounce-left", e["bottom-center"] = "bounce-up", e["bottom-right"] = "bounce-right", e))(Pe || {});
|
|
1482
|
+
const El = {
|
|
1408
1483
|
preserveAspectRatio: "xMidYMid meet",
|
|
1409
1484
|
viewBox: "0 0 24 24",
|
|
1410
1485
|
width: "1em",
|
|
1411
1486
|
height: "1em"
|
|
1412
|
-
},
|
|
1487
|
+
}, Pl = /* @__PURE__ */ h("path", {
|
|
1413
1488
|
fill: "currentColor",
|
|
1414
1489
|
d: "M12 4a8 8 0 1 0 0 16a8 8 0 0 0 0-16zM2 12C2 6.477 6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12zm14.664-3.247a1 1 0 0 1 .083 1.411l-5.333 6a1 1 0 0 1-1.495 0l-2.666-3a1 1 0 0 1 1.494-1.328l1.92 2.159l4.586-5.16a1 1 0 0 1 1.411-.082z"
|
|
1415
|
-
}, null, -1),
|
|
1416
|
-
|
|
1490
|
+
}, null, -1), Ol = [
|
|
1491
|
+
Pl
|
|
1417
1492
|
];
|
|
1418
|
-
function
|
|
1419
|
-
return
|
|
1493
|
+
function Dl(e, l) {
|
|
1494
|
+
return s(), r("svg", El, Ol);
|
|
1420
1495
|
}
|
|
1421
|
-
const
|
|
1496
|
+
const Rl = { name: "mi-circle-check", render: Dl }, pl = {
|
|
1422
1497
|
preserveAspectRatio: "xMidYMid meet",
|
|
1423
1498
|
viewBox: "0 0 24 24",
|
|
1424
1499
|
width: "1em",
|
|
1425
1500
|
height: "1em"
|
|
1426
|
-
},
|
|
1501
|
+
}, Hl = /* @__PURE__ */ h("path", {
|
|
1427
1502
|
fill: "currentColor",
|
|
1428
1503
|
d: "M12 4a8 8 0 1 0 0 16a8 8 0 0 0 0-16zM2 12C2 6.477 6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12zm5.793-4.207a1 1 0 0 1 1.414 0L12 10.586l2.793-2.793a1 1 0 1 1 1.414 1.414L13.414 12l2.793 2.793a1 1 0 0 1-1.414 1.414L12 13.414l-2.793 2.793a1 1 0 0 1-1.414-1.414L10.586 12L7.793 9.207a1 1 0 0 1 0-1.414z"
|
|
1429
|
-
}, null, -1),
|
|
1430
|
-
|
|
1504
|
+
}, null, -1), Nl = [
|
|
1505
|
+
Hl
|
|
1431
1506
|
];
|
|
1432
|
-
function
|
|
1433
|
-
return
|
|
1507
|
+
function Ul(e, l) {
|
|
1508
|
+
return s(), r("svg", pl, Nl);
|
|
1434
1509
|
}
|
|
1435
|
-
const
|
|
1510
|
+
const Gl = { name: "mi-circle-error", render: Ul }, Fl = {
|
|
1436
1511
|
preserveAspectRatio: "xMidYMid meet",
|
|
1437
1512
|
viewBox: "0 0 24 24",
|
|
1438
1513
|
width: "1em",
|
|
1439
1514
|
height: "1em"
|
|
1440
|
-
},
|
|
1441
|
-
/* @__PURE__ */
|
|
1442
|
-
/* @__PURE__ */
|
|
1443
|
-
], -1),
|
|
1444
|
-
|
|
1515
|
+
}, Kl = /* @__PURE__ */ h("g", { fill: "currentColor" }, [
|
|
1516
|
+
/* @__PURE__ */ h("path", { d: "M12 4a8 8 0 1 0 0 16a8 8 0 0 0 0-16zM2 12C2 6.477 6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12z" }),
|
|
1517
|
+
/* @__PURE__ */ h("path", { d: "M12 14a1 1 0 0 1-1-1V7a1 1 0 1 1 2 0v6a1 1 0 0 1-1 1zm-1.5 2.5a1.5 1.5 0 1 1 3 0a1.5 1.5 0 0 1-3 0z" })
|
|
1518
|
+
], -1), Yl = [
|
|
1519
|
+
Kl
|
|
1445
1520
|
];
|
|
1446
|
-
function
|
|
1447
|
-
return
|
|
1521
|
+
function Wl(e, l) {
|
|
1522
|
+
return s(), r("svg", Fl, Yl);
|
|
1448
1523
|
}
|
|
1449
|
-
const
|
|
1524
|
+
const Zl = { name: "mi-circle-warning", render: Wl }, jl = ["id", "data-testid"], ql = { class: "content-wrapper" }, Ql = {
|
|
1450
1525
|
key: 0,
|
|
1451
1526
|
class: "icon-container",
|
|
1452
1527
|
"aria-hidden": "true"
|
|
1453
|
-
},
|
|
1528
|
+
}, Jl = { class: "content" }, Xl = {
|
|
1454
1529
|
key: 0,
|
|
1455
1530
|
class: "description"
|
|
1456
|
-
},
|
|
1531
|
+
}, _l = ["data-testid"], en = /* @__PURE__ */ V({
|
|
1457
1532
|
__name: "Toast",
|
|
1458
1533
|
props: {
|
|
1459
1534
|
id: null,
|
|
1460
|
-
type: { default:
|
|
1535
|
+
type: { default: G.type },
|
|
1461
1536
|
visible: { type: Boolean, default: !1 },
|
|
1462
1537
|
title: null,
|
|
1463
1538
|
description: null,
|
|
1464
1539
|
timeout: null,
|
|
1465
|
-
hideProgressBar: { type: Boolean, default:
|
|
1466
|
-
showIcon: { type: Boolean, default:
|
|
1540
|
+
hideProgressBar: { type: Boolean, default: G.hideProgressBar },
|
|
1541
|
+
showIcon: { type: Boolean, default: G.showIcon },
|
|
1467
1542
|
offset: { default: 0 },
|
|
1468
1543
|
onClose: null,
|
|
1469
1544
|
onCloseHandler: null,
|
|
1470
|
-
position: { default:
|
|
1545
|
+
position: { default: G.position }
|
|
1471
1546
|
},
|
|
1472
1547
|
setup(e) {
|
|
1473
|
-
const l = e, { start: t, stop: i, progress: n } =
|
|
1474
|
-
var
|
|
1475
|
-
(
|
|
1476
|
-
}, l.timeout), { stylePosition: a } =
|
|
1548
|
+
const l = e, { start: t, stop: i, progress: n } = Al(() => {
|
|
1549
|
+
var f;
|
|
1550
|
+
(f = l.onCloseHandler) == null || f.call(l);
|
|
1551
|
+
}, l.timeout), { stylePosition: a } = Il(() => ({
|
|
1477
1552
|
offset: l.offset,
|
|
1478
1553
|
position: l.position
|
|
1479
1554
|
})), o = E(() => l.title && l.description);
|
|
@@ -1485,20 +1560,20 @@ const Rl = { name: "mi-circle-warning", render: Dl }, pl = ["id", "data-testid"]
|
|
|
1485
1560
|
}
|
|
1486
1561
|
return Te(() => {
|
|
1487
1562
|
t();
|
|
1488
|
-
}), (
|
|
1489
|
-
name: g(
|
|
1563
|
+
}), (f, v) => (s(), p(we, {
|
|
1564
|
+
name: g(Pe)[e.position],
|
|
1490
1565
|
type: "animation"
|
|
1491
1566
|
}, {
|
|
1492
|
-
default:
|
|
1493
|
-
e.visible ? (
|
|
1567
|
+
default: D(() => [
|
|
1568
|
+
e.visible ? (s(), r("div", {
|
|
1494
1569
|
key: 0,
|
|
1495
1570
|
id: `toast-${e.type}-${e.id}`,
|
|
1496
1571
|
role: "status",
|
|
1497
1572
|
"data-testid": `toast-${e.type}-${e.id}`,
|
|
1498
|
-
style:
|
|
1499
|
-
class:
|
|
1500
|
-
onKeyup: v[1] || (v[1] =
|
|
1501
|
-
(...
|
|
1573
|
+
style: ne(g(a)),
|
|
1574
|
+
class: S(["sol-toast-core", [`-${e.type}`, { "-multiline": g(o) }]]),
|
|
1575
|
+
onKeyup: v[1] || (v[1] = j(
|
|
1576
|
+
(...z) => e.onCloseHandler && e.onCloseHandler(...z),
|
|
1502
1577
|
["esc"]
|
|
1503
1578
|
)),
|
|
1504
1579
|
onMouseenter: c,
|
|
@@ -1506,60 +1581,60 @@ const Rl = { name: "mi-circle-warning", render: Dl }, pl = ["id", "data-testid"]
|
|
|
1506
1581
|
onFocusin: c,
|
|
1507
1582
|
onFocusout: u
|
|
1508
1583
|
}, [
|
|
1509
|
-
|
|
1510
|
-
e.showIcon ? (
|
|
1511
|
-
y(
|
|
1512
|
-
e.type === "success" ? (
|
|
1584
|
+
h("section", ql, [
|
|
1585
|
+
e.showIcon ? (s(), r("div", Ql, [
|
|
1586
|
+
y(f.$slots, "icon-status", { type: e.type }, () => [
|
|
1587
|
+
e.type === "success" ? (s(), p(g(Rl), {
|
|
1513
1588
|
key: 0,
|
|
1514
1589
|
class: "icon"
|
|
1515
1590
|
})) : T("", !0),
|
|
1516
|
-
e.type === "info" ? (
|
|
1591
|
+
e.type === "info" ? (s(), p(g(Zl), {
|
|
1517
1592
|
key: 1,
|
|
1518
1593
|
class: "icon"
|
|
1519
1594
|
})) : T("", !0),
|
|
1520
|
-
e.type === "danger" ? (
|
|
1595
|
+
e.type === "danger" ? (s(), p(g(Gl), {
|
|
1521
1596
|
key: 2,
|
|
1522
1597
|
class: "icon"
|
|
1523
1598
|
})) : T("", !0)
|
|
1524
1599
|
])
|
|
1525
1600
|
])) : T("", !0),
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
class:
|
|
1601
|
+
h("div", Jl, [
|
|
1602
|
+
h("p", {
|
|
1603
|
+
class: S(["title", { "-multiline": g(o) }])
|
|
1529
1604
|
}, [
|
|
1530
|
-
y(
|
|
1531
|
-
O(
|
|
1605
|
+
y(f.$slots, "title", {}, () => [
|
|
1606
|
+
O(x(e.title), 1)
|
|
1532
1607
|
])
|
|
1533
1608
|
], 2),
|
|
1534
|
-
e.description ? (
|
|
1535
|
-
y(
|
|
1536
|
-
O(
|
|
1609
|
+
e.description ? (s(), r("p", Xl, [
|
|
1610
|
+
y(f.$slots, "description", {}, () => [
|
|
1611
|
+
O(x(e.description), 1)
|
|
1537
1612
|
])
|
|
1538
1613
|
])) : T("", !0)
|
|
1539
1614
|
])
|
|
1540
1615
|
]),
|
|
1541
|
-
|
|
1616
|
+
h("button", {
|
|
1542
1617
|
type: "button",
|
|
1543
|
-
class:
|
|
1618
|
+
class: S(["close", { "-multiline": g(o) }]),
|
|
1544
1619
|
"data-testid": `toast-close-button-${e.type}-${e.id}`,
|
|
1545
1620
|
"aria-label": "close notification",
|
|
1546
|
-
onClick: v[0] || (v[0] = (...
|
|
1621
|
+
onClick: v[0] || (v[0] = (...z) => e.onCloseHandler && e.onCloseHandler(...z))
|
|
1547
1622
|
}, [
|
|
1548
|
-
|
|
1549
|
-
], 10,
|
|
1550
|
-
e.hideProgressBar ? T("", !0) : (
|
|
1623
|
+
M(g(Ie), { class: "icon" })
|
|
1624
|
+
], 10, _l),
|
|
1625
|
+
e.hideProgressBar ? T("", !0) : (s(), r("div", {
|
|
1551
1626
|
key: 0,
|
|
1552
1627
|
class: "progressbar",
|
|
1553
1628
|
"aria-hidden": "true",
|
|
1554
|
-
style:
|
|
1629
|
+
style: ne({ width: `${g(n)}%` })
|
|
1555
1630
|
}, null, 4))
|
|
1556
|
-
], 46,
|
|
1631
|
+
], 46, jl)) : T("", !0)
|
|
1557
1632
|
]),
|
|
1558
1633
|
_: 3
|
|
1559
1634
|
}, 8, ["name"]));
|
|
1560
1635
|
}
|
|
1561
1636
|
});
|
|
1562
|
-
const
|
|
1637
|
+
const Q = {
|
|
1563
1638
|
"top-left": [],
|
|
1564
1639
|
"top-right": [],
|
|
1565
1640
|
"top-center": [],
|
|
@@ -1567,10 +1642,10 @@ const J = {
|
|
|
1567
1642
|
"bottom-right": [],
|
|
1568
1643
|
"bottom-center": []
|
|
1569
1644
|
};
|
|
1570
|
-
function
|
|
1645
|
+
function dn() {
|
|
1571
1646
|
let e = 0;
|
|
1572
1647
|
function l() {
|
|
1573
|
-
Object.entries(
|
|
1648
|
+
Object.entries(Q).forEach(([i, n]) => {
|
|
1574
1649
|
n.length && n.forEach((a) => {
|
|
1575
1650
|
var c;
|
|
1576
1651
|
const o = (c = a.toastVNode.props) == null ? void 0 : c.id;
|
|
@@ -1580,34 +1655,34 @@ function Xl() {
|
|
|
1580
1655
|
}
|
|
1581
1656
|
return {
|
|
1582
1657
|
createToast: (i, n) => {
|
|
1583
|
-
const a = e++, o = n ?
|
|
1584
|
-
return n != null && n.showOneToast && l(),
|
|
1658
|
+
const a = e++, o = n ? tn(n) : G;
|
|
1659
|
+
return n != null && n.showOneToast && l(), ln(a, o, typeof i == "string" ? { title: i } : i), {
|
|
1585
1660
|
close: () => ge(a, o.position)
|
|
1586
1661
|
};
|
|
1587
1662
|
},
|
|
1588
1663
|
clearAllToasts: l
|
|
1589
1664
|
};
|
|
1590
1665
|
}
|
|
1591
|
-
function
|
|
1666
|
+
function tn(e) {
|
|
1592
1667
|
const l = {
|
|
1593
|
-
...
|
|
1668
|
+
...G,
|
|
1594
1669
|
...e,
|
|
1595
1670
|
showIcon: e.showIcon
|
|
1596
1671
|
};
|
|
1597
1672
|
return l.hideProgressBar = !!(l.timeout && (l == null ? void 0 : l.timeout) <= 0), e.hideProgressBar && (l.hideProgressBar = e.hideProgressBar), l;
|
|
1598
1673
|
}
|
|
1599
|
-
function
|
|
1674
|
+
function ln(e, l, t) {
|
|
1600
1675
|
setTimeout(() => {
|
|
1601
|
-
const i =
|
|
1676
|
+
const i = an(l, Q, Ee), n = document.createElement("div");
|
|
1602
1677
|
document.body.appendChild(n);
|
|
1603
|
-
const a =
|
|
1604
|
-
|
|
1605
|
-
|
|
1678
|
+
const a = M(
|
|
1679
|
+
en,
|
|
1680
|
+
nn(l, e, i, ge, t)
|
|
1606
1681
|
);
|
|
1607
|
-
Me(a, n),
|
|
1682
|
+
Me(a, n), Q[l.position].push({ toastVNode: a, container: n }), a.component && (a.component.props.visible = !0);
|
|
1608
1683
|
}, 1);
|
|
1609
1684
|
}
|
|
1610
|
-
function
|
|
1685
|
+
function nn(e, l, t, i, n) {
|
|
1611
1686
|
return {
|
|
1612
1687
|
...e,
|
|
1613
1688
|
...n,
|
|
@@ -1619,17 +1694,17 @@ function jl(e, l, t, i, n) {
|
|
|
1619
1694
|
}
|
|
1620
1695
|
};
|
|
1621
1696
|
}
|
|
1622
|
-
function
|
|
1697
|
+
function an(e, l, t) {
|
|
1623
1698
|
if (!e.position)
|
|
1624
1699
|
throw new Error("no position");
|
|
1625
1700
|
return l[e.position].reduce((i, { toastVNode: n }) => (i += n.el.offsetHeight + t || 0, i), t);
|
|
1626
1701
|
}
|
|
1627
|
-
function
|
|
1702
|
+
function on(e, l, t, i) {
|
|
1628
1703
|
for (let n = e; n < l.length; n++) {
|
|
1629
1704
|
const { toastVNode: a } = l[n];
|
|
1630
1705
|
if (!a.el)
|
|
1631
1706
|
return;
|
|
1632
|
-
const o = t.split("-")[0] || "top", c = parseInt(a.el.style[o], 10) - i -
|
|
1707
|
+
const o = t.split("-")[0] || "top", c = parseInt(a.el.style[o], 10) - i - Ee;
|
|
1633
1708
|
if (!a.component)
|
|
1634
1709
|
return;
|
|
1635
1710
|
a.component.props.offset = c;
|
|
@@ -1637,16 +1712,16 @@ function Jl(e, l, t, i) {
|
|
|
1637
1712
|
}
|
|
1638
1713
|
function ge(e, l) {
|
|
1639
1714
|
var u;
|
|
1640
|
-
const t =
|
|
1641
|
-
({ toastVNode:
|
|
1715
|
+
const t = Q[l], i = t.findIndex(
|
|
1716
|
+
({ toastVNode: f }) => {
|
|
1642
1717
|
var v;
|
|
1643
|
-
return e === ((v =
|
|
1718
|
+
return e === ((v = f == null ? void 0 : f.props) == null ? void 0 : v.id);
|
|
1644
1719
|
}
|
|
1645
1720
|
);
|
|
1646
1721
|
if (i === -1)
|
|
1647
1722
|
return;
|
|
1648
1723
|
const { container: n, toastVNode: a } = t[i], o = (u = a == null ? void 0 : a.el) == null ? void 0 : u.offsetHeight;
|
|
1649
|
-
if (
|
|
1724
|
+
if (Q[l].splice(i, 1), on(i, t, l, o), !a.component)
|
|
1650
1725
|
return;
|
|
1651
1726
|
const c = a.component.props;
|
|
1652
1727
|
c.visible = !1, c.onClose && c.onClose(), setTimeout(() => {
|
|
@@ -1654,42 +1729,44 @@ function ge(e, l) {
|
|
|
1654
1729
|
}, 1e3);
|
|
1655
1730
|
}
|
|
1656
1731
|
console.log("%c\u{1F33B}[Girassol]\u{1F33B}", "padding: 8px;background: #212121;color: gold; font-family: 'Fira code'; font-weight: bold; font-size: 1.2rem");
|
|
1657
|
-
const
|
|
1658
|
-
SolButton:
|
|
1732
|
+
const ke = {
|
|
1733
|
+
SolButton: q,
|
|
1734
|
+
SolButtonDestructive: ze,
|
|
1659
1735
|
SolInput: F,
|
|
1660
1736
|
SolTextarea: re,
|
|
1661
|
-
SolTextfield:
|
|
1737
|
+
SolTextfield: ie,
|
|
1662
1738
|
SolTextfieldPassword: ce,
|
|
1663
|
-
SolRadio:
|
|
1739
|
+
SolRadio: ae,
|
|
1664
1740
|
SolRadioGroup: ue,
|
|
1665
|
-
SolCheckbox:
|
|
1741
|
+
SolCheckbox: oe,
|
|
1666
1742
|
SolCheckboxGroup: he,
|
|
1667
1743
|
SolSwitch: fe,
|
|
1668
1744
|
SolDropdown: ve,
|
|
1669
1745
|
SolSelect: be,
|
|
1670
|
-
SolChip:
|
|
1746
|
+
SolChip: se,
|
|
1671
1747
|
SolAccordion: ye
|
|
1672
1748
|
};
|
|
1673
|
-
function
|
|
1674
|
-
for (const l in
|
|
1675
|
-
e.component(l,
|
|
1749
|
+
function cn(e) {
|
|
1750
|
+
for (const l in ke)
|
|
1751
|
+
e.component(l, ke[l]);
|
|
1676
1752
|
}
|
|
1677
1753
|
export {
|
|
1678
1754
|
ye as SolAccordion,
|
|
1679
|
-
|
|
1680
|
-
|
|
1755
|
+
q as SolButton,
|
|
1756
|
+
ze as SolButtonDestructive,
|
|
1757
|
+
oe as SolCheckbox,
|
|
1681
1758
|
he as SolCheckboxGroup,
|
|
1682
|
-
|
|
1759
|
+
se as SolChip,
|
|
1683
1760
|
ve as SolDropdown,
|
|
1684
1761
|
F as SolInput,
|
|
1685
|
-
|
|
1762
|
+
ae as SolRadio,
|
|
1686
1763
|
ue as SolRadioGroup,
|
|
1687
1764
|
be as SolSelect,
|
|
1688
1765
|
fe as SolSwitch,
|
|
1689
1766
|
re as SolTextarea,
|
|
1690
|
-
|
|
1767
|
+
ie as SolTextfield,
|
|
1691
1768
|
ce as SolTextfieldPassword,
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1769
|
+
ke as components,
|
|
1770
|
+
cn as install,
|
|
1771
|
+
dn as useToast
|
|
1695
1772
|
};
|