@solfacil/girassol 0.2.1 → 0.2.5
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 +3 -0
- package/dist/components.json +1 -1
- package/dist/girassol.es.js +962 -708
- package/dist/girassol.umd.js +6 -5
- package/dist/style.css +1 -1
- package/dist/theme/solfacil/miscs.d.ts +124 -0
- package/dist/theme/solfacil/spacing.d.ts +58 -44
- 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/components/menu/Menu.vue.d.ts +112 -0
- package/dist/types/components/menu/index.d.ts +2 -0
- package/dist/types/components/menu/menu.spec.d.ts +1 -0
- package/dist/types/components/menu-item/MenuItemLink.vue.d.ts +87 -0
- package/dist/types/components/menu-item/index.d.ts +2 -0
- package/dist/types/composables/use-navigate/index.d.ts +20 -0
- package/dist/types/composables/use-navigate/types.d.ts +19 -0
- package/dist/types/composables/use-toast/Toast.vue.d.ts +4 -4
- package/dist/types/index.d.ts +388 -29
- package/package.json +1 -1
- package/theme/safelist.ts +2 -0
- package/theme/solfacil/miscs.ts +12 -1
- package/theme/solfacil/spacing.ts +27 -50
- package/theme/solfacil/utilities.ts +59 -97
- package/windi.config.ts +3 -1
package/dist/girassol.es.js
CHANGED
|
@@ -1,10 +1,34 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as z, openBlock as s, createElementBlock as u, normalizeClass as k, createElementVNode as h, useSlots as Re, computed as P, unref as x, renderSlot as b, createVNode as L, createCommentVNode as I, createBlock as p, withCtx as R, ref as O, toDisplayString as C, mergeProps as F, isRef as Ie, withDirectives as G, vShow as Z, vModelText as He, Fragment as _, renderList as ee, getCurrentScope as pe, onScopeDispose as Ne, watch as Fe, reactive as Y, withModifiers as N, createTextVNode as E, Transition as Se, normalizeStyle as ne, withKeys as Q, onMounted as ze, onUnmounted as Ue, render as Le } from "vue";
|
|
2
|
+
const Ke = /* @__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
|
+
Ke
|
|
7
|
+
], Ye = /* @__PURE__ */ z({
|
|
8
|
+
__name: "CircleLoader",
|
|
9
|
+
props: {
|
|
10
|
+
size: { default: "large" },
|
|
11
|
+
dark: { type: Boolean }
|
|
12
|
+
},
|
|
13
|
+
setup(e) {
|
|
14
|
+
return (l, t) => (s(), u("svg", {
|
|
15
|
+
class: k(["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 We = ["data-testid", "disabled"], je = { class: "icon -left" }, qe = { class: "icon -right" }, Ze = {
|
|
23
|
+
key: 0,
|
|
24
|
+
class: "loading"
|
|
25
|
+
}, J = /* @__PURE__ */ z({
|
|
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 = Re(), n = P(
|
|
16
40
|
() => !!(t != null && t.default) && (!!(t != null && t["icon-right"]) || !!(t != null && t["icon-left"]))
|
|
17
|
-
),
|
|
41
|
+
), i = P(
|
|
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(), u("button", {
|
|
21
45
|
"data-testid": `button-${e.id}`,
|
|
22
|
-
class:
|
|
46
|
+
class: k(["sol-button-core", `-${e.variant} -${e.size}
|
|
47
|
+
${l(e.loading, "-loading-helper")}
|
|
23
48
|
${l(e.onColor, "-on-color")}
|
|
24
|
-
${l(
|
|
25
|
-
${l(
|
|
49
|
+
${l(x(n), "-has-icon")}
|
|
50
|
+
${l(x(i), "-only-icon")}
|
|
26
51
|
`]),
|
|
27
|
-
type: "button"
|
|
52
|
+
type: "button",
|
|
53
|
+
disabled: e.disabled || e.loading
|
|
28
54
|
}, [
|
|
29
|
-
|
|
30
|
-
|
|
55
|
+
h("div", je, [
|
|
56
|
+
b(a.$slots, "icon-left")
|
|
31
57
|
]),
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
])
|
|
36
|
-
|
|
58
|
+
b(a.$slots, "default"),
|
|
59
|
+
h("div", qe, [
|
|
60
|
+
b(a.$slots, "icon-right")
|
|
61
|
+
]),
|
|
62
|
+
e.loading ? (s(), u("div", Ze, [
|
|
63
|
+
L(Ye, {
|
|
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
|
+
])) : I("", !0)
|
|
69
|
+
], 10, We));
|
|
37
70
|
}
|
|
38
71
|
});
|
|
39
|
-
|
|
40
|
-
|
|
72
|
+
const Qe = {
|
|
73
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
74
|
+
viewBox: "0 0 24 24",
|
|
75
|
+
width: "1em",
|
|
76
|
+
height: "1em"
|
|
77
|
+
}, Je = /* @__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), Xe = [
|
|
81
|
+
Je
|
|
82
|
+
];
|
|
83
|
+
function _e(e, l) {
|
|
84
|
+
return s(), u("svg", Qe, Xe);
|
|
85
|
+
}
|
|
86
|
+
const et = { name: "material-symbols-delete-outline", render: _e }, Ve = /* @__PURE__ */ z({
|
|
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(J, {
|
|
95
|
+
id: `destructive-${e.id}`,
|
|
96
|
+
size: e.size,
|
|
97
|
+
loading: e.loading,
|
|
98
|
+
variant: "primary",
|
|
99
|
+
class: "button-destructive"
|
|
100
|
+
}, {
|
|
101
|
+
"icon-left": R(() => [
|
|
102
|
+
L(x(et))
|
|
103
|
+
]),
|
|
104
|
+
default: R(() => [
|
|
105
|
+
b(l.$slots, "default")
|
|
106
|
+
]),
|
|
107
|
+
_: 3
|
|
108
|
+
}, 8, ["id", "size", "loading"]));
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
J.install = (e) => {
|
|
112
|
+
e.component("SolButton", J);
|
|
113
|
+
};
|
|
114
|
+
Ve.install = (e) => {
|
|
115
|
+
e.component("SolButton", J);
|
|
41
116
|
};
|
|
42
|
-
const
|
|
117
|
+
const tt = ["id", "data-testid", "value"], W = /* @__PURE__ */ z({
|
|
43
118
|
__name: "Input",
|
|
44
119
|
props: {
|
|
45
120
|
id: null,
|
|
@@ -49,27 +124,27 @@ const Fe = ["id", "data-testid", "value"], F = /* @__PURE__ */ V({
|
|
|
49
124
|
},
|
|
50
125
|
emits: ["update:modelValue"],
|
|
51
126
|
setup(e, { expose: l, emit: t }) {
|
|
52
|
-
function
|
|
127
|
+
function n({ target: a }) {
|
|
53
128
|
t("update:modelValue", a == null ? void 0 : a.value);
|
|
54
129
|
}
|
|
55
|
-
const
|
|
130
|
+
const i = O("");
|
|
56
131
|
return l({
|
|
57
|
-
input:
|
|
58
|
-
}), (a, o) => (
|
|
132
|
+
input: i
|
|
133
|
+
}), (a, o) => (s(), u("input", {
|
|
59
134
|
id: `input-${e.id}`,
|
|
60
135
|
ref_key: "input",
|
|
61
|
-
ref:
|
|
136
|
+
ref: i,
|
|
62
137
|
"data-testid": `input-${e.id}`,
|
|
63
138
|
value: e.modelValue,
|
|
64
|
-
class:
|
|
65
|
-
onInput:
|
|
66
|
-
}, null, 42,
|
|
139
|
+
class: k(["sol-input-core", { "-invert": e.invert, "-error": e.error }]),
|
|
140
|
+
onInput: n
|
|
141
|
+
}, null, 42, tt));
|
|
67
142
|
}
|
|
68
143
|
});
|
|
69
|
-
|
|
70
|
-
e.component("SolInput",
|
|
144
|
+
W.install = (e) => {
|
|
145
|
+
e.component("SolInput", W);
|
|
71
146
|
};
|
|
72
|
-
const
|
|
147
|
+
const lt = ["id", "data-testid"], nt = ["for"], it = { class: "container-input" }, at = ["id"], ot = ["id"], ie = /* @__PURE__ */ z({
|
|
73
148
|
__name: "Textfield",
|
|
74
149
|
props: {
|
|
75
150
|
id: null,
|
|
@@ -82,40 +157,40 @@ const Ke = ["id", "data-testid"], We = ["for"], Ye = { class: "container-input"
|
|
|
82
157
|
},
|
|
83
158
|
emits: ["update:modelValue"],
|
|
84
159
|
setup(e, { emit: l }) {
|
|
85
|
-
const t = e,
|
|
160
|
+
const t = e, n = P({
|
|
86
161
|
get: () => t.modelValue,
|
|
87
162
|
set: (o) => {
|
|
88
163
|
l("update:modelValue", o);
|
|
89
164
|
}
|
|
90
165
|
});
|
|
91
|
-
function
|
|
92
|
-
return !!o && !
|
|
166
|
+
function i(o, d) {
|
|
167
|
+
return !!o && !d;
|
|
93
168
|
}
|
|
94
|
-
function a(o,
|
|
95
|
-
return
|
|
169
|
+
function a(o, d) {
|
|
170
|
+
return d ? `error-${t.id}` : i(o, d) ? `hint-${t.id}` : null;
|
|
96
171
|
}
|
|
97
|
-
return (o,
|
|
98
|
-
var
|
|
99
|
-
return
|
|
172
|
+
return (o, d) => {
|
|
173
|
+
var r;
|
|
174
|
+
return s(), u("div", {
|
|
100
175
|
id: `textfield-${e.id}`,
|
|
101
176
|
"data-testid": `textfield-${e.id}`,
|
|
102
|
-
class:
|
|
177
|
+
class: k([[`${(r = o.$props.class) != null ? r : ""}`, { "-invert": e.invert }], "sol-textfield-core"])
|
|
103
178
|
}, [
|
|
104
|
-
|
|
105
|
-
e.label ? (
|
|
179
|
+
b(o.$slots, "label", {}, () => [
|
|
180
|
+
e.label ? (s(), u("label", {
|
|
106
181
|
key: 0,
|
|
107
182
|
for: `input-${e.id}`,
|
|
108
183
|
class: "label"
|
|
109
184
|
}, [
|
|
110
|
-
|
|
111
|
-
], 8,
|
|
185
|
+
h("span", null, C(e.label), 1)
|
|
186
|
+
], 8, nt)) : I("", !0)
|
|
112
187
|
]),
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
188
|
+
h("div", it, [
|
|
189
|
+
b(o.$slots, "default", {}, () => [
|
|
190
|
+
L(W, F(o.$attrs, {
|
|
116
191
|
id: e.id,
|
|
117
|
-
modelValue:
|
|
118
|
-
"onUpdate:modelValue":
|
|
192
|
+
modelValue: x(n),
|
|
193
|
+
"onUpdate:modelValue": d[0] || (d[0] = (f) => Ie(n) ? n.value = f : null),
|
|
119
194
|
"data-testid": `input-${e.id}`,
|
|
120
195
|
class: [e.error && "-error", "input"],
|
|
121
196
|
invert: e.invert,
|
|
@@ -123,92 +198,92 @@ const Ke = ["id", "data-testid"], We = ["for"], Ye = { class: "container-input"
|
|
|
123
198
|
"aria-describedby": a(e.hint, e.error)
|
|
124
199
|
}), null, 16, ["id", "modelValue", "data-testid", "class", "invert", "aria-invalid", "aria-describedby"])
|
|
125
200
|
]),
|
|
126
|
-
|
|
201
|
+
b(o.$slots, "icon")
|
|
127
202
|
]),
|
|
128
|
-
|
|
203
|
+
i(e.hint, e.error) ? (s(), u("span", {
|
|
129
204
|
key: 0,
|
|
130
205
|
id: `hint-${e.id}`,
|
|
131
206
|
class: "hint"
|
|
132
|
-
},
|
|
207
|
+
}, C(e.hint), 9, at)) : e.error ? (s(), u("span", {
|
|
133
208
|
key: 1,
|
|
134
209
|
id: `error-${e.id}`,
|
|
135
210
|
class: "error"
|
|
136
|
-
},
|
|
137
|
-
], 10,
|
|
211
|
+
}, C(e.error), 9, ot)) : I("", !0)
|
|
212
|
+
], 10, lt);
|
|
138
213
|
};
|
|
139
214
|
}
|
|
140
215
|
});
|
|
141
|
-
const
|
|
216
|
+
const st = {
|
|
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
|
+
}, dt = /* @__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), ct = [
|
|
225
|
+
dt
|
|
151
226
|
];
|
|
152
|
-
function
|
|
153
|
-
return
|
|
227
|
+
function rt(e, l) {
|
|
228
|
+
return s(), u("svg", st, ct);
|
|
154
229
|
}
|
|
155
|
-
const
|
|
230
|
+
const ut = { name: "mi-eye", render: rt }, ht = {
|
|
156
231
|
preserveAspectRatio: "xMidYMid meet",
|
|
157
232
|
viewBox: "0 0 24 24",
|
|
158
233
|
width: "1em",
|
|
159
234
|
height: "1em"
|
|
160
|
-
},
|
|
235
|
+
}, ft = /* @__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), mt = [
|
|
239
|
+
ft
|
|
165
240
|
];
|
|
166
|
-
function
|
|
167
|
-
return
|
|
241
|
+
function vt(e, l) {
|
|
242
|
+
return s(), u("svg", ht, mt);
|
|
168
243
|
}
|
|
169
|
-
const
|
|
244
|
+
const $t = { name: "mi-eye-off", render: vt }, bt = ["aria-label"], ce = /* @__PURE__ */ z({
|
|
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 = O(!1), t = P(
|
|
177
252
|
() => l.value ? "text" : "password"
|
|
178
253
|
);
|
|
179
|
-
return (
|
|
254
|
+
return (n, i) => (s(), p(ie, {
|
|
180
255
|
id: e.id,
|
|
181
256
|
required: "",
|
|
182
|
-
type:
|
|
257
|
+
type: x(t),
|
|
183
258
|
label: e.label,
|
|
184
259
|
placeholder: "Insira sua senha"
|
|
185
260
|
}, {
|
|
186
|
-
icon:
|
|
187
|
-
|
|
261
|
+
icon: R(() => [
|
|
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
|
-
onClick:
|
|
266
|
+
onClick: i[0] || (i[0] = (a) => l.value = !l.value)
|
|
192
267
|
}, [
|
|
193
|
-
|
|
194
|
-
[
|
|
268
|
+
G(L(x(ut), { "aria-hidden": "true" }, null, 512), [
|
|
269
|
+
[Z, l.value]
|
|
195
270
|
]),
|
|
196
|
-
|
|
197
|
-
[
|
|
271
|
+
G(L(x($t), { "aria-hidden": "true" }, null, 512), [
|
|
272
|
+
[Z, !l.value]
|
|
198
273
|
])
|
|
199
|
-
], 8,
|
|
274
|
+
], 8, bt)
|
|
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 yt = ["id", "data-testid"], gt = ["for"], wt = { class: "container-textarea" }, xt = ["id", "data-testid", "invert", "aria-invalid", "aria-describedby"], St = ["id"], kt = ["id"], re = /* @__PURE__ */ z({
|
|
212
287
|
__name: "Textarea",
|
|
213
288
|
props: {
|
|
214
289
|
id: null,
|
|
@@ -222,67 +297,67 @@ const ot = ["id", "data-testid"], st = ["for"], dt = { class: "container-textare
|
|
|
222
297
|
},
|
|
223
298
|
emits: ["update:modelValue"],
|
|
224
299
|
setup(e, { emit: l }) {
|
|
225
|
-
const t = e,
|
|
300
|
+
const t = e, n = P({
|
|
226
301
|
get: () => t.modelValue,
|
|
227
302
|
set: (o) => {
|
|
228
303
|
l("update:modelValue", o);
|
|
229
304
|
}
|
|
230
305
|
});
|
|
231
|
-
function
|
|
232
|
-
return !!o && !
|
|
306
|
+
function i(o, d) {
|
|
307
|
+
return !!o && !d;
|
|
233
308
|
}
|
|
234
|
-
function a(o,
|
|
235
|
-
return
|
|
309
|
+
function a(o, d) {
|
|
310
|
+
return d ? `error-${t.id}` : i(o, d) ? `hint-${t.id}` : null;
|
|
236
311
|
}
|
|
237
|
-
return (o,
|
|
238
|
-
var
|
|
239
|
-
return
|
|
312
|
+
return (o, d) => {
|
|
313
|
+
var r;
|
|
314
|
+
return s(), u("div", {
|
|
240
315
|
id: `textarea-${e.id}`,
|
|
241
316
|
"data-testid": `textarea-${e.id}`,
|
|
242
|
-
class:
|
|
317
|
+
class: k([[`${(r = o.$props.class) != null ? r : ""}`, { "-invert": e.invert }], "sol-textarea-core"])
|
|
243
318
|
}, [
|
|
244
|
-
|
|
245
|
-
e.label ? (
|
|
319
|
+
b(o.$slots, "label", {}, () => [
|
|
320
|
+
e.label ? (s(), u("label", {
|
|
246
321
|
key: 0,
|
|
247
322
|
for: `input-${e.id}`,
|
|
248
323
|
class: "label"
|
|
249
324
|
}, [
|
|
250
|
-
|
|
251
|
-
], 8,
|
|
325
|
+
h("span", null, C(e.label), 1)
|
|
326
|
+
], 8, gt)) : I("", !0)
|
|
252
327
|
]),
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
328
|
+
h("div", wt, [
|
|
329
|
+
b(o.$slots, "default", {}, () => [
|
|
330
|
+
G(h("textarea", F(o.$attrs, {
|
|
256
331
|
id: `input-${e.id}`,
|
|
257
|
-
"onUpdate:modelValue":
|
|
332
|
+
"onUpdate:modelValue": d[0] || (d[0] = (f) => Ie(n) ? n.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, xt), [
|
|
340
|
+
[He, x(n)]
|
|
266
341
|
])
|
|
267
342
|
])
|
|
268
343
|
]),
|
|
269
|
-
|
|
344
|
+
i(e.hint, e.error) ? (s(), u("span", {
|
|
270
345
|
key: 0,
|
|
271
346
|
id: `hint-${e.id}`,
|
|
272
347
|
class: "hint"
|
|
273
|
-
},
|
|
348
|
+
}, C(e.hint), 9, St)) : e.error ? (s(), u("span", {
|
|
274
349
|
key: 1,
|
|
275
350
|
id: `error-${e.id}`,
|
|
276
351
|
class: "error"
|
|
277
|
-
},
|
|
278
|
-
], 10,
|
|
352
|
+
}, C(e.error), 9, kt)) : I("", !0)
|
|
353
|
+
], 10, yt);
|
|
279
354
|
};
|
|
280
355
|
}
|
|
281
356
|
});
|
|
282
357
|
re.install = (e) => {
|
|
283
358
|
e.component("SolTextarea", re);
|
|
284
359
|
};
|
|
285
|
-
const
|
|
360
|
+
const Ct = ["id", "data-testid", "checked", "value", "name"], Bt = ["for"], ae = /* @__PURE__ */ z({
|
|
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,
|
|
298
|
-
class:
|
|
372
|
+
return (t, n) => (s(), u("div", {
|
|
373
|
+
class: k(["sol-radio-core", t.$props.class])
|
|
299
374
|
}, [
|
|
300
|
-
|
|
375
|
+
h("input", F(t.$attrs, {
|
|
301
376
|
id: `radio-${e.name}-${e.id}`,
|
|
302
377
|
type: "radio",
|
|
303
378
|
class: "radio",
|
|
@@ -305,16 +380,16 @@ const ht = ["id", "data-testid", "checked", "value", "name"], ft = ["for"], ie =
|
|
|
305
380
|
checked: e.checked,
|
|
306
381
|
value: e.value,
|
|
307
382
|
name: e.name,
|
|
308
|
-
onChange:
|
|
309
|
-
}), null, 16,
|
|
310
|
-
|
|
383
|
+
onChange: n[0] || (n[0] = (i) => l("change", e.value))
|
|
384
|
+
}), null, 16, Ct),
|
|
385
|
+
h("label", {
|
|
311
386
|
class: "label",
|
|
312
387
|
for: `radio-${e.name}-${e.id}`
|
|
313
|
-
},
|
|
388
|
+
}, C(e.label), 9, Bt)
|
|
314
389
|
], 2));
|
|
315
390
|
}
|
|
316
391
|
});
|
|
317
|
-
const
|
|
392
|
+
const Mt = ["aria-labelledby"], Tt = ["id", "data-testid"], It = ["id"], zt = ["id"], ue = /* @__PURE__ */ z({
|
|
318
393
|
__name: "RadioGroup",
|
|
319
394
|
props: {
|
|
320
395
|
id: null,
|
|
@@ -329,75 +404,75 @@ const mt = ["aria-labelledby"], $t = ["id", "data-testid"], vt = ["id"], bt = ["
|
|
|
329
404
|
emits: ["change", "update:modelValue"],
|
|
330
405
|
setup(e, { emit: l }) {
|
|
331
406
|
const t = e;
|
|
332
|
-
function
|
|
333
|
-
return !!
|
|
407
|
+
function n(d, r) {
|
|
408
|
+
return !!d && !r;
|
|
334
409
|
}
|
|
335
|
-
function
|
|
336
|
-
return
|
|
410
|
+
function i(d, r) {
|
|
411
|
+
return r ? `error-${t.id}` : n(d, r) ? `hint-${t.id}` : null;
|
|
337
412
|
}
|
|
338
|
-
function a(
|
|
339
|
-
return (t == null ? void 0 : t.modelValue) ===
|
|
413
|
+
function a(d) {
|
|
414
|
+
return (t == null ? void 0 : t.modelValue) === d;
|
|
340
415
|
}
|
|
341
|
-
function o(
|
|
342
|
-
l("change",
|
|
416
|
+
function o(d) {
|
|
417
|
+
l("change", d.value), l("update:modelValue", d.value);
|
|
343
418
|
}
|
|
344
|
-
return (
|
|
419
|
+
return (d, r) => (s(), u("fieldset", {
|
|
345
420
|
class: "sol-radio-group-core",
|
|
346
421
|
"aria-labelledby": `radio-group-title-${e.id}`
|
|
347
422
|
}, [
|
|
348
|
-
|
|
423
|
+
b(d.$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: k(["title", { "sr-only": e.hideTitle }]),
|
|
354
429
|
"data-testid": `radio-group-title-${e.id}`
|
|
355
|
-
},
|
|
430
|
+
}, C(e.title), 11, Tt)
|
|
356
431
|
]),
|
|
357
|
-
|
|
358
|
-
class:
|
|
432
|
+
h("ul", {
|
|
433
|
+
class: k(["container-radios", { "flex-col": e.direction === "column" }])
|
|
359
434
|
}, [
|
|
360
|
-
|
|
435
|
+
b(d.$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), u(_, null, ee(e.radios, (f, m) => {
|
|
440
|
+
var B;
|
|
441
|
+
return s(), u("li", { key: m }, [
|
|
442
|
+
L(ae, F(d.$attrs, {
|
|
443
|
+
id: (B = f == null ? void 0 : f.id) != null ? B : `${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
|
-
"aria-describedby":
|
|
376
|
-
onChange: (
|
|
450
|
+
"aria-describedby": i(e.hint, e.error),
|
|
451
|
+
onChange: (g) => 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
|
-
|
|
457
|
+
n(e.hint, e.error) ? (s(), u("p", {
|
|
383
458
|
key: 0,
|
|
384
459
|
id: `hint-${e.id}`,
|
|
385
460
|
class: "hint"
|
|
386
|
-
},
|
|
461
|
+
}, C(e.hint), 9, It)) : e.error ? (s(), u("p", {
|
|
387
462
|
key: 1,
|
|
388
463
|
id: `error-${e.id}`,
|
|
389
464
|
class: "error"
|
|
390
|
-
},
|
|
391
|
-
], 8,
|
|
465
|
+
}, C(e.error), 9, zt)) : I("", !0)
|
|
466
|
+
], 8, Mt));
|
|
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 Lt = ["id", "data-testid", "checked", "value", "name"], Vt = ["for"], oe = /* @__PURE__ */ z({
|
|
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,
|
|
413
|
-
class:
|
|
487
|
+
return (t, n) => (s(), u("div", {
|
|
488
|
+
class: k(["sol-checkbox-core", t.$props.class])
|
|
414
489
|
}, [
|
|
415
|
-
|
|
490
|
+
h("input", F(t.$attrs, {
|
|
416
491
|
id: `checkbox-${e.name}-${e.id}`,
|
|
417
492
|
type: "checkbox",
|
|
418
493
|
class: "checkbox",
|
|
@@ -420,16 +495,16 @@ const yt = ["id", "data-testid", "checked", "value", "name"], gt = ["for"], ae =
|
|
|
420
495
|
checked: e.checked,
|
|
421
496
|
value: e.value,
|
|
422
497
|
name: e.name,
|
|
423
|
-
onChange:
|
|
424
|
-
}), null, 16,
|
|
425
|
-
|
|
498
|
+
onChange: n[0] || (n[0] = (i) => l("change", e.value))
|
|
499
|
+
}), null, 16, Lt),
|
|
500
|
+
h("label", {
|
|
426
501
|
class: "label",
|
|
427
502
|
for: `checkbox-${e.name}-${e.id}`
|
|
428
|
-
},
|
|
503
|
+
}, C(e.label), 9, Vt)
|
|
429
504
|
], 2));
|
|
430
505
|
}
|
|
431
506
|
});
|
|
432
|
-
const
|
|
507
|
+
const Ot = ["aria-labelledby"], At = ["id", "data-testid"], Pt = ["id"], Et = ["id"], he = /* @__PURE__ */ z({
|
|
433
508
|
__name: "CheckboxGroup",
|
|
434
509
|
props: {
|
|
435
510
|
id: null,
|
|
@@ -444,82 +519,82 @@ 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
|
|
448
|
-
return !!
|
|
522
|
+
function n(r, f) {
|
|
523
|
+
return !!r && !f;
|
|
449
524
|
}
|
|
450
|
-
function
|
|
451
|
-
return
|
|
525
|
+
function i(r, f) {
|
|
526
|
+
return f ? `error-${t.id}` : n(r, f) ? `hint-${t.id}` : null;
|
|
452
527
|
}
|
|
453
|
-
function a(
|
|
454
|
-
var
|
|
455
|
-
return (
|
|
528
|
+
function a(r) {
|
|
529
|
+
var f;
|
|
530
|
+
return (f = t == null ? void 0 : t.modelValue) == null ? void 0 : f.includes(r);
|
|
456
531
|
}
|
|
457
|
-
function o(
|
|
458
|
-
return Array.isArray(t == null ? void 0 : t.modelValue) ? [...t.modelValue,
|
|
532
|
+
function o(r) {
|
|
533
|
+
return Array.isArray(t == null ? void 0 : t.modelValue) ? [...t.modelValue, r] : [r];
|
|
459
534
|
}
|
|
460
|
-
function
|
|
461
|
-
var
|
|
462
|
-
l("change",
|
|
463
|
-
const
|
|
464
|
-
l("update:modelValue",
|
|
535
|
+
function d(r) {
|
|
536
|
+
var m;
|
|
537
|
+
l("change", r.value);
|
|
538
|
+
const f = a(r.value) ? (m = t.modelValue) == null ? void 0 : m.filter((B) => B !== r.value) : o(r.value);
|
|
539
|
+
l("update:modelValue", f);
|
|
465
540
|
}
|
|
466
|
-
return (
|
|
541
|
+
return (r, f) => (s(), u("fieldset", {
|
|
467
542
|
class: "sol-checkbox-group-core",
|
|
468
543
|
"aria-labelledby": `checkbox-group-title-${e.id}`
|
|
469
544
|
}, [
|
|
470
|
-
|
|
545
|
+
b(r.$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: k(["title", { "sr-only": e.hideTitle }]),
|
|
476
551
|
"data-testid": `checkbox-group-title-${e.id}`
|
|
477
|
-
},
|
|
552
|
+
}, C(e.title), 11, At)
|
|
478
553
|
]),
|
|
479
|
-
|
|
480
|
-
class:
|
|
554
|
+
h("ul", {
|
|
555
|
+
class: k(["container-checkboxes", { "flex-col": e.direction === "column" }])
|
|
481
556
|
}, [
|
|
482
|
-
|
|
557
|
+
b(r.$slots, "default", {
|
|
483
558
|
checkboxes: e.checkboxes,
|
|
484
559
|
direction: e.direction
|
|
485
560
|
}, () => [
|
|
486
|
-
(
|
|
487
|
-
var
|
|
488
|
-
return
|
|
489
|
-
|
|
490
|
-
id: (
|
|
561
|
+
(s(!0), u(_, null, ee(e.checkboxes, (m, B) => {
|
|
562
|
+
var g;
|
|
563
|
+
return s(), u("li", { key: B }, [
|
|
564
|
+
L(oe, F(r.$attrs, {
|
|
565
|
+
id: (g = m == null ? void 0 : m.id) != null ? g : `${m.value}`,
|
|
491
566
|
class: ["checkbox", { "mb-micro": e.direction === "column", "mr-micro": e.direction === "row" }],
|
|
492
|
-
label:
|
|
493
|
-
name:
|
|
494
|
-
value:
|
|
495
|
-
checked: a(
|
|
567
|
+
label: m.label,
|
|
568
|
+
name: m.name,
|
|
569
|
+
value: m.value,
|
|
570
|
+
checked: a(m.value),
|
|
496
571
|
"aria-invalid": !!e.error,
|
|
497
|
-
"aria-describedby":
|
|
498
|
-
onChange: (
|
|
572
|
+
"aria-describedby": i(e.hint, e.error),
|
|
573
|
+
onChange: (w) => d(m)
|
|
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
|
-
|
|
579
|
+
n(e.hint, e.error) ? (s(), u("p", {
|
|
505
580
|
key: 0,
|
|
506
581
|
id: `hint-${e.id}`,
|
|
507
582
|
class: "hint"
|
|
508
|
-
},
|
|
583
|
+
}, C(e.hint), 9, Pt)) : e.error ? (s(), u("p", {
|
|
509
584
|
key: 1,
|
|
510
585
|
id: `error-${e.id}`,
|
|
511
586
|
class: "error"
|
|
512
|
-
},
|
|
513
|
-
], 8,
|
|
587
|
+
}, C(e.error), 9, Et)) : I("", !0)
|
|
588
|
+
], 8, Ot));
|
|
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 Dt = ["id", "for", "data-testid"], Rt = { class: "switch-container" }, Ht = ["id", "aria-checked", "aria-labelledby", "data-testid", "checked", "value", "name"], pt = /* @__PURE__ */ h("span", { class: "ellipse" }, null, -1), fe = /* @__PURE__ */ z({
|
|
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,
|
|
537
|
-
class:
|
|
611
|
+
return (t, n) => (s(), u("div", {
|
|
612
|
+
class: k(["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: k(["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
|
+
}, C(e.label), 11, Dt),
|
|
620
|
+
h("div", Rt, [
|
|
621
|
+
h("input", F(t.$attrs, {
|
|
547
622
|
id: `switch-${e.name}-${e.id}`,
|
|
548
623
|
type: "checkbox",
|
|
549
624
|
class: "switch",
|
|
@@ -554,9 +629,9 @@ const Ct = ["id", "for", "data-testid"], Bt = { class: "switch-container" }, Tt
|
|
|
554
629
|
checked: e.checked,
|
|
555
630
|
value: e.value,
|
|
556
631
|
name: e.name,
|
|
557
|
-
onChange:
|
|
558
|
-
}), null, 16,
|
|
559
|
-
|
|
632
|
+
onChange: n[0] || (n[0] = (i) => l("change", e.value))
|
|
633
|
+
}), null, 16, Ht),
|
|
634
|
+
pt
|
|
560
635
|
])
|
|
561
636
|
], 2));
|
|
562
637
|
}
|
|
@@ -564,97 +639,97 @@ 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 Be;
|
|
643
|
+
const te = typeof window < "u", Nt = (e) => typeof e == "string", de = () => {
|
|
569
644
|
};
|
|
570
|
-
|
|
571
|
-
function
|
|
572
|
-
return typeof e == "function" ? e() :
|
|
645
|
+
te && ((Be = window == null ? void 0 : window.navigator) == null ? void 0 : Be.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
646
|
+
function Ft(e) {
|
|
647
|
+
return typeof e == "function" ? e() : x(e);
|
|
573
648
|
}
|
|
574
|
-
function
|
|
575
|
-
return
|
|
649
|
+
function Ut(e) {
|
|
650
|
+
return pe() ? (Ne(e), !0) : !1;
|
|
576
651
|
}
|
|
577
|
-
function
|
|
652
|
+
function q(e) {
|
|
578
653
|
var l;
|
|
579
|
-
const t =
|
|
654
|
+
const t = Ft(e);
|
|
580
655
|
return (l = t == null ? void 0 : t.$el) != null ? l : t;
|
|
581
656
|
}
|
|
582
|
-
const
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
function
|
|
587
|
-
let l, t,
|
|
588
|
-
if (
|
|
589
|
-
return
|
|
590
|
-
let a =
|
|
591
|
-
const o =
|
|
592
|
-
a(),
|
|
593
|
-
|
|
657
|
+
const Oe = te ? window : void 0;
|
|
658
|
+
te && window.document;
|
|
659
|
+
te && window.navigator;
|
|
660
|
+
te && window.location;
|
|
661
|
+
function le(...e) {
|
|
662
|
+
let l, t, n, i;
|
|
663
|
+
if (Nt(e[0]) ? ([t, n, i] = e, l = Oe) : [l, t, n, i] = e, !l)
|
|
664
|
+
return de;
|
|
665
|
+
let a = de;
|
|
666
|
+
const o = Fe(() => q(l), (r) => {
|
|
667
|
+
a(), r && (r.addEventListener(t, n, i), a = () => {
|
|
668
|
+
r.removeEventListener(t, n, i), a = de;
|
|
594
669
|
});
|
|
595
|
-
}, { immediate: !0, flush: "post" }),
|
|
670
|
+
}, { immediate: !0, flush: "post" }), d = () => {
|
|
596
671
|
o(), a();
|
|
597
672
|
};
|
|
598
|
-
return
|
|
673
|
+
return Ut(d), d;
|
|
599
674
|
}
|
|
600
|
-
function
|
|
601
|
-
const { window:
|
|
602
|
-
if (!
|
|
675
|
+
function ke(e, l, t = {}) {
|
|
676
|
+
const { window: n = Oe, ignore: i, capture: a = !0, detectIframe: o = !1 } = t;
|
|
677
|
+
if (!n)
|
|
603
678
|
return;
|
|
604
|
-
const
|
|
605
|
-
let
|
|
606
|
-
const
|
|
607
|
-
|
|
608
|
-
const
|
|
609
|
-
!
|
|
610
|
-
const
|
|
611
|
-
return
|
|
612
|
-
}) || l(
|
|
613
|
-
},
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
const
|
|
617
|
-
|
|
679
|
+
const d = O(!0);
|
|
680
|
+
let r;
|
|
681
|
+
const f = (g) => {
|
|
682
|
+
n.clearTimeout(r);
|
|
683
|
+
const w = q(e), S = g.composedPath();
|
|
684
|
+
!w || w === g.target || S.includes(w) || !d.value || i && i.length > 0 && i.some((M) => {
|
|
685
|
+
const A = q(M);
|
|
686
|
+
return A && (g.target === A || S.includes(A));
|
|
687
|
+
}) || l(g);
|
|
688
|
+
}, m = [
|
|
689
|
+
le(n, "click", f, { passive: !0, capture: a }),
|
|
690
|
+
le(n, "pointerdown", (g) => {
|
|
691
|
+
const w = q(e);
|
|
692
|
+
d.value = !!w && !g.composedPath().includes(w);
|
|
618
693
|
}, { passive: !0 }),
|
|
619
|
-
|
|
620
|
-
if (
|
|
621
|
-
const
|
|
622
|
-
|
|
694
|
+
le(n, "pointerup", (g) => {
|
|
695
|
+
if (g.button === 0) {
|
|
696
|
+
const w = g.composedPath();
|
|
697
|
+
g.composedPath = () => w, r = n.setTimeout(() => f(g), 50);
|
|
623
698
|
}
|
|
624
699
|
}, { passive: !0 }),
|
|
625
|
-
o &&
|
|
626
|
-
var
|
|
627
|
-
const
|
|
628
|
-
((
|
|
700
|
+
o && le(n, "blur", (g) => {
|
|
701
|
+
var w;
|
|
702
|
+
const S = q(e);
|
|
703
|
+
((w = document.activeElement) == null ? void 0 : w.tagName) === "IFRAME" && !(S != null && S.contains(document.activeElement)) && l(g);
|
|
629
704
|
})
|
|
630
705
|
].filter(Boolean);
|
|
631
|
-
return () =>
|
|
706
|
+
return () => m.forEach((g) => g());
|
|
632
707
|
}
|
|
633
|
-
const me = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {},
|
|
634
|
-
me[
|
|
635
|
-
me[
|
|
636
|
-
var
|
|
708
|
+
const me = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ve = "__vueuse_ssr_handlers__";
|
|
709
|
+
me[ve] = me[ve] || {};
|
|
710
|
+
me[ve];
|
|
711
|
+
var Me;
|
|
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
|
+
})(Me || (Me = {}));
|
|
715
|
+
const Kt = {
|
|
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), Yt = [
|
|
724
|
+
Gt
|
|
650
725
|
];
|
|
651
|
-
function
|
|
652
|
-
return
|
|
726
|
+
function Wt(e, l) {
|
|
727
|
+
return s(), u("svg", Kt, Yt);
|
|
653
728
|
}
|
|
654
|
-
const
|
|
729
|
+
const Ae = { name: "mi-search", render: Wt }, jt = ["data-testid"], qt = ["id", "for"], Zt = ["id", "disabled", "data-testid", "aria-expanded", "aria-labelledby", "aria-label", "aria-controls", "onClick"], Qt = { class: "dropdown-container" }, Jt = ["id", "data-testid", "aria-multiselectable", "aria-labelledby"], Xt = ["id", "data-testid", "selected", "aria-selected", "onClick", "onKeyup"], _t = {
|
|
655
730
|
key: 0,
|
|
656
731
|
class: "no-data"
|
|
657
|
-
},
|
|
732
|
+
}, el = /* @__PURE__ */ E(" Sem dados "), $e = /* @__PURE__ */ z({
|
|
658
733
|
__name: "Dropdown",
|
|
659
734
|
props: {
|
|
660
735
|
id: null,
|
|
@@ -673,161 +748,161 @@ 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,
|
|
751
|
+
const t = e, n = O(), i = O(!1), a = O(""), o = P(
|
|
677
752
|
() => {
|
|
678
|
-
var
|
|
679
|
-
return t.fetchOnSearch ? t.options : (
|
|
680
|
-
(
|
|
753
|
+
var c;
|
|
754
|
+
return t.fetchOnSearch ? t.options : (c = t.options) == null ? void 0 : c.filter(
|
|
755
|
+
(v) => typeof v == "string" ? v.includes(a.value) : v.name.includes(a.value)
|
|
681
756
|
);
|
|
682
757
|
}
|
|
683
|
-
),
|
|
758
|
+
), d = P(
|
|
684
759
|
() => Array.isArray(t.selected) ? t.selected.join(", ").trim() : t.selected
|
|
685
760
|
);
|
|
686
|
-
|
|
687
|
-
|
|
761
|
+
ke(n, () => {
|
|
762
|
+
i.value && m();
|
|
688
763
|
});
|
|
689
|
-
function
|
|
690
|
-
t.disabled || (
|
|
764
|
+
function r() {
|
|
765
|
+
t.disabled || (i.value ? m() : f());
|
|
691
766
|
}
|
|
692
|
-
function
|
|
693
|
-
|
|
767
|
+
function f() {
|
|
768
|
+
i.value = !0;
|
|
694
769
|
}
|
|
695
|
-
function
|
|
696
|
-
|
|
770
|
+
function m() {
|
|
771
|
+
H(), l("closeDropdown");
|
|
697
772
|
}
|
|
698
|
-
function
|
|
699
|
-
const
|
|
700
|
-
return
|
|
773
|
+
function B(c) {
|
|
774
|
+
const v = new Set(t.selected);
|
|
775
|
+
return v.has(c) ? v.delete(c) : v.add(c), [...v];
|
|
701
776
|
}
|
|
702
|
-
function
|
|
703
|
-
const
|
|
704
|
-
l("update:selected", $), t.closeOnSelect && !t.isMultipleSelect &&
|
|
777
|
+
function g(c) {
|
|
778
|
+
const v = typeof c == "string" ? c : c.value, $ = t.isMultipleSelect ? B(v) : v;
|
|
779
|
+
l("update:selected", $), t.closeOnSelect && !t.isMultipleSelect && m();
|
|
705
780
|
}
|
|
706
|
-
function
|
|
707
|
-
return Array.isArray(t.selected) ? typeof
|
|
781
|
+
function w(c) {
|
|
782
|
+
return Array.isArray(t.selected) ? typeof c == "string" ? t.selected.includes(c) : t.selected.includes(c.value) : typeof c == "string" ? c === t.selected : c.value === t.selected;
|
|
708
783
|
}
|
|
709
|
-
const
|
|
784
|
+
const S = Y({
|
|
710
785
|
list: void 0,
|
|
711
786
|
search: void 0
|
|
712
|
-
}),
|
|
787
|
+
}), M = Y({
|
|
713
788
|
id: "",
|
|
714
789
|
index: 0
|
|
715
790
|
});
|
|
716
|
-
function
|
|
717
|
-
const
|
|
718
|
-
const
|
|
719
|
-
|
|
720
|
-
var
|
|
721
|
-
const
|
|
722
|
-
|
|
791
|
+
function A({ code: c }) {
|
|
792
|
+
const v = (T) => {
|
|
793
|
+
const V = T != null ? T : M.index;
|
|
794
|
+
T !== void 0 && (M.index = T), setTimeout(() => {
|
|
795
|
+
var j, Ce;
|
|
796
|
+
const D = (j = S.list) == null ? void 0 : j.children[V];
|
|
797
|
+
M.id = (Ce = D == null ? void 0 : D.id) != null ? Ce : "", D == null || D.focus();
|
|
723
798
|
}, 0);
|
|
724
799
|
}, $ = () => {
|
|
725
|
-
var
|
|
726
|
-
t.searchable && (
|
|
800
|
+
var T;
|
|
801
|
+
t.searchable && (M.index = 0, (T = S == null ? void 0 : S.search) == null || T.focus());
|
|
727
802
|
};
|
|
728
|
-
switch (
|
|
803
|
+
switch (c) {
|
|
729
804
|
case "ArrowUp":
|
|
730
|
-
return
|
|
805
|
+
return M.index > 0 && (M.index -= 1), v();
|
|
731
806
|
case "ArrowDown":
|
|
732
|
-
return
|
|
807
|
+
return i.value ? (M.index < o.value.length - 1 && (M.index += 1), v()) : (f(), v(0));
|
|
733
808
|
case "Home":
|
|
734
|
-
return
|
|
809
|
+
return v(0);
|
|
735
810
|
case "End":
|
|
736
|
-
return
|
|
811
|
+
return v(t.options.length - 1);
|
|
737
812
|
case "Escape":
|
|
738
|
-
return
|
|
813
|
+
return m();
|
|
739
814
|
default:
|
|
740
|
-
!["Enter", "NumpadEnter", "Space"].includes(
|
|
815
|
+
!["Enter", "NumpadEnter", "Space"].includes(c) && $();
|
|
741
816
|
}
|
|
742
817
|
}
|
|
743
|
-
function
|
|
744
|
-
|
|
818
|
+
function H() {
|
|
819
|
+
i.value = !1, M.index = 0, a.value = "";
|
|
745
820
|
}
|
|
746
|
-
function
|
|
747
|
-
return typeof
|
|
821
|
+
function U(c, v) {
|
|
822
|
+
return typeof c == "string" ? c : c[v != null ? v : "value"];
|
|
748
823
|
}
|
|
749
|
-
function
|
|
750
|
-
|
|
824
|
+
function y(c, v) {
|
|
825
|
+
S[c] = v != null ? v : void 0;
|
|
751
826
|
}
|
|
752
|
-
return (
|
|
827
|
+
return (c, v) => (s(), u("div", {
|
|
753
828
|
ref_key: "el",
|
|
754
|
-
ref:
|
|
755
|
-
class:
|
|
829
|
+
ref: n,
|
|
830
|
+
class: k(["sol-dropdown-core", { "-smaller": e.smallerWidth }]),
|
|
756
831
|
"data-testid": `dropdown-${e.id}`,
|
|
757
|
-
onKeydownPassive:
|
|
832
|
+
onKeydownPassive: A
|
|
758
833
|
}, [
|
|
759
|
-
|
|
760
|
-
|
|
834
|
+
b(c.$slots, "label", {}, () => [
|
|
835
|
+
h("label", {
|
|
761
836
|
id: `label-dropdown-${e.id}`,
|
|
762
|
-
class:
|
|
837
|
+
class: k(["label", { "-disabled": e.disabled, "sr-only": e.ariaLabel }]),
|
|
763
838
|
for: `toggle-dropdown-${e.id}`
|
|
764
|
-
},
|
|
839
|
+
}, C(e.label || e.ariaLabel), 11, qt)
|
|
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}`,
|
|
770
845
|
class: "button-toggle-dropdown toggle-dropdown",
|
|
771
846
|
"aria-haspopup": "listbox",
|
|
772
|
-
"aria-expanded":
|
|
847
|
+
"aria-expanded": i.value,
|
|
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: N(r, ["stop"])
|
|
777
852
|
}, [
|
|
778
|
-
|
|
779
|
-
toggle: { open:
|
|
780
|
-
isOpen:
|
|
781
|
-
select:
|
|
782
|
-
selectedSanitized:
|
|
853
|
+
b(c.$slots, "toggle-dropdown", {
|
|
854
|
+
toggle: { open: f, close: m, toggleDropdown: r },
|
|
855
|
+
isOpen: i.value,
|
|
856
|
+
select: g,
|
|
857
|
+
selectedSanitized: x(d),
|
|
783
858
|
selected: e.selected
|
|
784
859
|
}, () => [
|
|
785
|
-
|
|
860
|
+
E(C(x(d) || "Selecione"), 1)
|
|
786
861
|
])
|
|
787
|
-
], 8,
|
|
788
|
-
|
|
862
|
+
], 8, Zt),
|
|
863
|
+
L(Se, {
|
|
789
864
|
mode: "out-in",
|
|
790
865
|
name: "dropdown"
|
|
791
866
|
}, {
|
|
792
|
-
default:
|
|
793
|
-
|
|
794
|
-
e.searchable ? (
|
|
867
|
+
default: R(() => [
|
|
868
|
+
G(h("div", Qt, [
|
|
869
|
+
e.searchable ? (s(), u("div", {
|
|
795
870
|
key: 0,
|
|
796
|
-
class:
|
|
871
|
+
class: k(["search-container", { "-loading": e.loading }])
|
|
797
872
|
}, [
|
|
798
|
-
|
|
799
|
-
|
|
873
|
+
b(c.$slots, "search", { filter: a.value }, () => [
|
|
874
|
+
L(W, {
|
|
800
875
|
id: `search-dropdown-${e.id}`,
|
|
801
|
-
ref: ($) =>
|
|
876
|
+
ref: ($) => y("search", $ == null ? void 0 : $.input),
|
|
802
877
|
modelValue: a.value,
|
|
803
|
-
"onUpdate:modelValue":
|
|
878
|
+
"onUpdate:modelValue": v[0] || (v[0] = ($) => a.value = $),
|
|
804
879
|
"data-testid": `search-dropdown-${e.id}`,
|
|
805
880
|
role: "combobox",
|
|
806
881
|
class: "search",
|
|
807
882
|
"aria-autocomplete": "list",
|
|
808
883
|
placeholder: e.searchPlaceholder,
|
|
809
|
-
"aria-expanded":
|
|
884
|
+
"aria-expanded": i.value,
|
|
810
885
|
"aria-haspopup": "listbox",
|
|
811
886
|
"aria-owns": `dropdown-list-${e.id}`,
|
|
812
887
|
"aria-controls": `dropdown-list-${e.id}`,
|
|
813
|
-
"aria-activedescendant":
|
|
888
|
+
"aria-activedescendant": M.id,
|
|
814
889
|
"aria-labelledby": `label-dropdown-${e.id}`,
|
|
815
|
-
onClick:
|
|
890
|
+
onClick: v[1] || (v[1] = N(() => {
|
|
816
891
|
}, ["stop"])),
|
|
817
|
-
onInput:
|
|
818
|
-
var
|
|
819
|
-
return l("search", (
|
|
892
|
+
onInput: v[2] || (v[2] = ($) => {
|
|
893
|
+
var T;
|
|
894
|
+
return l("search", (T = $.target) == null ? void 0 : T.value);
|
|
820
895
|
})
|
|
821
896
|
}, null, 8, ["id", "modelValue", "data-testid", "placeholder", "aria-expanded", "aria-owns", "aria-controls", "aria-activedescendant", "aria-labelledby"]),
|
|
822
|
-
|
|
897
|
+
L(x(Ae), {
|
|
823
898
|
"aria-hidden": "true",
|
|
824
899
|
class: "icon"
|
|
825
900
|
})
|
|
826
901
|
])
|
|
827
|
-
], 2)) :
|
|
828
|
-
|
|
902
|
+
], 2)) : I("", !0),
|
|
903
|
+
h("ul", {
|
|
829
904
|
id: `dropdown-list-${e.id}`,
|
|
830
|
-
ref: ($) =>
|
|
905
|
+
ref: ($) => y("list", $),
|
|
831
906
|
"data-testid": `dropdown-list-${e.id}`,
|
|
832
907
|
role: "listbox",
|
|
833
908
|
tabindex: "-1",
|
|
@@ -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}-${
|
|
840
|
-
key:
|
|
841
|
-
"data-testid": `option-${e.id}-${
|
|
913
|
+
(s(!0), u(_, null, ee(x(o), ($, T) => (s(), u("li", {
|
|
914
|
+
id: `option-${e.id}-${U($, "value")}`,
|
|
915
|
+
key: T,
|
|
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: ${T + 1}`),
|
|
921
|
+
selected: w($),
|
|
922
|
+
"aria-selected": w($),
|
|
923
|
+
onClick: (V) => g($),
|
|
849
924
|
onKeyup: [
|
|
850
|
-
|
|
851
|
-
|
|
925
|
+
Q((V) => g($), ["enter"]),
|
|
926
|
+
Q((V) => g($), ["space"])
|
|
852
927
|
]
|
|
853
928
|
}, [
|
|
854
|
-
|
|
855
|
-
text:
|
|
929
|
+
b(c.$slots, "default", {
|
|
930
|
+
text: U($, "name"),
|
|
856
931
|
option: $,
|
|
857
|
-
isSelect:
|
|
932
|
+
isSelect: w
|
|
858
933
|
}, () => [
|
|
859
|
-
|
|
934
|
+
E(C(U($, "name")), 1)
|
|
860
935
|
])
|
|
861
|
-
], 44,
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
936
|
+
], 44, Xt))), 128)),
|
|
937
|
+
x(o).length ? I("", !0) : (s(), u("li", _t, [
|
|
938
|
+
b(c.$slots, "no-data", {}, () => [
|
|
939
|
+
el
|
|
865
940
|
])
|
|
866
941
|
]))
|
|
867
|
-
], 8,
|
|
942
|
+
], 8, Jt)
|
|
868
943
|
], 512), [
|
|
869
|
-
[
|
|
944
|
+
[Z, i.value]
|
|
870
945
|
])
|
|
871
946
|
]),
|
|
872
947
|
_: 3
|
|
873
948
|
})
|
|
874
|
-
], 42,
|
|
949
|
+
], 42, jt));
|
|
875
950
|
}
|
|
876
951
|
});
|
|
877
|
-
|
|
878
|
-
e.component("SolDropdown",
|
|
952
|
+
$e.install = (e) => {
|
|
953
|
+
e.component("SolDropdown", $e);
|
|
879
954
|
};
|
|
880
|
-
const
|
|
955
|
+
const tl = {
|
|
881
956
|
preserveAspectRatio: "xMidYMid meet",
|
|
882
957
|
viewBox: "0 0 24 24",
|
|
883
958
|
width: "1em",
|
|
884
959
|
height: "1em"
|
|
885
|
-
},
|
|
960
|
+
}, ll = /* @__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), nl = [
|
|
964
|
+
ll
|
|
890
965
|
];
|
|
891
|
-
function
|
|
892
|
-
return
|
|
966
|
+
function il(e, l) {
|
|
967
|
+
return s(), u("svg", tl, nl);
|
|
893
968
|
}
|
|
894
|
-
const
|
|
969
|
+
const Pe = { name: "mi-close", render: il }, al = ["id", "data-testid", "title", "aria-describedby", "aria-disabled", "onKeydown"], ol = ["id"], sl = { class: "label" }, se = /* @__PURE__ */ z({
|
|
895
970
|
__name: "Chip",
|
|
896
971
|
props: {
|
|
897
972
|
id: null,
|
|
@@ -903,9 +978,9 @@ const Ae = { name: "mi-close", render: Yt }, jt = ["id", "data-testid", "title",
|
|
|
903
978
|
emits: ["close", "update:selected"],
|
|
904
979
|
setup(e, { emit: l }) {
|
|
905
980
|
const t = e;
|
|
906
|
-
function
|
|
981
|
+
function n({ code: i }) {
|
|
907
982
|
if (!t.disabled)
|
|
908
|
-
switch (
|
|
983
|
+
switch (i) {
|
|
909
984
|
case "Enter":
|
|
910
985
|
case "NumpadEnter":
|
|
911
986
|
case "Space":
|
|
@@ -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 (
|
|
995
|
+
return (i, a) => (s(), u("div", {
|
|
921
996
|
id: `chip-${e.id}`,
|
|
922
997
|
"data-testid": `chip-${e.id}`,
|
|
923
|
-
class:
|
|
998
|
+
class: k(["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: N(n, ["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
|
-
|
|
937
|
-
|
|
938
|
-
|
|
1010
|
+
}, "Press Delete or Backspace to remove this Chip", 8, ol),
|
|
1011
|
+
h("span", sl, [
|
|
1012
|
+
b(i.$slots, "default", {}, () => [
|
|
1013
|
+
E(C(e.label), 1)
|
|
939
1014
|
])
|
|
940
1015
|
]),
|
|
941
|
-
e.removable ? (
|
|
1016
|
+
e.removable ? (s(), u("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] = N((o) => l("close"), ["stop"]))
|
|
947
1022
|
}, [
|
|
948
|
-
|
|
949
|
-
])) :
|
|
950
|
-
], 42,
|
|
1023
|
+
L(x(Pe), { class: "icon" })
|
|
1024
|
+
])) : I("", !0)
|
|
1025
|
+
], 42, al));
|
|
951
1026
|
}
|
|
952
1027
|
});
|
|
953
|
-
const
|
|
1028
|
+
const dl = ["id", "data-testid", "aria-multiselectable", "aria-labelledby"], cl = ["id", "data-testid", "selected", "aria-selected", "onClick", "onKeyup"], rl = {
|
|
954
1029
|
key: 0,
|
|
955
1030
|
class: "no-data"
|
|
956
|
-
},
|
|
1031
|
+
}, ul = /* @__PURE__ */ E(" Sem dados "), hl = /* @__PURE__ */ z({
|
|
957
1032
|
__name: "ListOption",
|
|
958
1033
|
props: {
|
|
959
1034
|
id: null,
|
|
@@ -963,13 +1038,13 @@ 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
|
|
1041
|
+
const n = O("");
|
|
967
1042
|
return l({
|
|
968
|
-
list:
|
|
969
|
-
}), (
|
|
1043
|
+
list: n
|
|
1044
|
+
}), (i, a) => (s(), u("ul", {
|
|
970
1045
|
id: `select-list-${e.id}`,
|
|
971
1046
|
ref_key: "list",
|
|
972
|
-
ref:
|
|
1047
|
+
ref: n,
|
|
973
1048
|
"data-testid": `select-list-${e.id}`,
|
|
974
1049
|
role: "listbox",
|
|
975
1050
|
tabindex: "-1",
|
|
@@ -977,61 +1052,61 @@ 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), u(_, null, ee(e.options, (o, d) => (s(), u("li", {
|
|
981
1056
|
id: `option-${e.id}-${o.value}`,
|
|
982
|
-
key:
|
|
1057
|
+
key: d,
|
|
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: ${d + 1}`),
|
|
988
1063
|
selected: e.isSelected(o),
|
|
989
1064
|
"aria-selected": e.isSelected(o),
|
|
990
|
-
onClick: (
|
|
1065
|
+
onClick: (r) => t("select", o),
|
|
991
1066
|
onKeyup: [
|
|
992
|
-
|
|
993
|
-
|
|
1067
|
+
Q((r) => t("select", o), ["enter"]),
|
|
1068
|
+
Q((r) => t("select", o), ["space"])
|
|
994
1069
|
]
|
|
995
1070
|
}, [
|
|
996
|
-
|
|
1071
|
+
b(i.$slots, "item-list", {
|
|
997
1072
|
text: o.name,
|
|
998
1073
|
value: o.value,
|
|
999
1074
|
option: o,
|
|
1000
1075
|
isSelected: e.isSelected(o)
|
|
1001
1076
|
}, () => [
|
|
1002
|
-
|
|
1077
|
+
E(C(o.name), 1)
|
|
1003
1078
|
])
|
|
1004
|
-
], 44,
|
|
1005
|
-
e.options.length ?
|
|
1006
|
-
|
|
1007
|
-
|
|
1079
|
+
], 44, cl))), 128)),
|
|
1080
|
+
e.options.length ? I("", !0) : (s(), u("li", rl, [
|
|
1081
|
+
b(i.$slots, "no-data", {}, () => [
|
|
1082
|
+
ul
|
|
1008
1083
|
])
|
|
1009
1084
|
]))
|
|
1010
|
-
], 8,
|
|
1085
|
+
], 8, dl));
|
|
1011
1086
|
}
|
|
1012
1087
|
});
|
|
1013
|
-
const
|
|
1088
|
+
const fl = {
|
|
1014
1089
|
preserveAspectRatio: "xMidYMid meet",
|
|
1015
1090
|
viewBox: "0 0 24 24",
|
|
1016
1091
|
width: "1em",
|
|
1017
1092
|
height: "1em"
|
|
1018
|
-
},
|
|
1093
|
+
}, ml = /* @__PURE__ */ h("path", {
|
|
1019
1094
|
fill: "currentColor",
|
|
1020
1095
|
d: "m17 10l-5 6l-5-6h10z"
|
|
1021
|
-
}, null, -1),
|
|
1022
|
-
|
|
1096
|
+
}, null, -1), vl = [
|
|
1097
|
+
ml
|
|
1023
1098
|
];
|
|
1024
|
-
function
|
|
1025
|
-
return
|
|
1099
|
+
function $l(e, l) {
|
|
1100
|
+
return s(), u("svg", fl, vl);
|
|
1026
1101
|
}
|
|
1027
|
-
const
|
|
1102
|
+
const bl = { name: "mi-caret-down", render: $l }, yl = ["data-testid"], gl = ["id"], wl = ["id", "disabled", "data-testid", "aria-expanded", "aria-labelledby", "aria-label", "aria-controls", "onClick"], xl = {
|
|
1028
1103
|
key: 0,
|
|
1029
1104
|
class: "container-tags"
|
|
1030
|
-
},
|
|
1105
|
+
}, Sl = {
|
|
1031
1106
|
key: 1,
|
|
1032
1107
|
class: "mr-micro placeholder-inline",
|
|
1033
1108
|
tabindex: "-1"
|
|
1034
|
-
},
|
|
1109
|
+
}, kl = { class: "error" }, Cl = { class: "select-options-container" }, be = /* @__PURE__ */ z({
|
|
1035
1110
|
__name: "Select",
|
|
1036
1111
|
props: {
|
|
1037
1112
|
id: null,
|
|
@@ -1052,235 +1127,235 @@ 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,
|
|
1130
|
+
const t = e, n = O(), i = O(!1), a = O(""), o = P(
|
|
1056
1131
|
() => {
|
|
1057
|
-
var
|
|
1058
|
-
return t.fetchOnSearch ? t.options : (
|
|
1132
|
+
var y;
|
|
1133
|
+
return t.fetchOnSearch ? t.options : (y = t.options) == null ? void 0 : y.filter((c) => c.name.includes(a.value));
|
|
1059
1134
|
}
|
|
1060
1135
|
);
|
|
1061
|
-
|
|
1062
|
-
|
|
1136
|
+
ke(n, () => {
|
|
1137
|
+
i.value && f();
|
|
1063
1138
|
});
|
|
1064
|
-
function
|
|
1065
|
-
t.disabled || (
|
|
1139
|
+
function d() {
|
|
1140
|
+
t.disabled || (i.value ? f() : r());
|
|
1066
1141
|
}
|
|
1067
|
-
function
|
|
1068
|
-
|
|
1142
|
+
function r() {
|
|
1143
|
+
i.value = !0;
|
|
1069
1144
|
}
|
|
1070
|
-
function
|
|
1071
|
-
|
|
1145
|
+
function f() {
|
|
1146
|
+
A(), l("closeDropdown");
|
|
1072
1147
|
}
|
|
1073
|
-
function
|
|
1148
|
+
function m(y) {
|
|
1074
1149
|
if (Array.isArray(t.selected)) {
|
|
1075
|
-
const
|
|
1076
|
-
({ value:
|
|
1150
|
+
const c = t.selected.findIndex(
|
|
1151
|
+
({ value: v }) => v === y.value
|
|
1077
1152
|
);
|
|
1078
|
-
return
|
|
1153
|
+
return c === -1 ? [...t.selected, y] : t.selected.filter((v, $) => $ !== c);
|
|
1079
1154
|
}
|
|
1080
|
-
return [
|
|
1155
|
+
return [y];
|
|
1081
1156
|
}
|
|
1082
|
-
function
|
|
1083
|
-
t.multiple ? l("update:selected",
|
|
1157
|
+
function B(y) {
|
|
1158
|
+
t.multiple ? l("update:selected", m(y)) : l("update:selected", y), t.closeOnSelect && !t.multiple && f();
|
|
1084
1159
|
}
|
|
1085
|
-
function
|
|
1086
|
-
var
|
|
1087
|
-
return Array.isArray(t.selected) ? t.selected.some(({ value:
|
|
1160
|
+
function g(y) {
|
|
1161
|
+
var c;
|
|
1162
|
+
return Array.isArray(t.selected) ? t.selected.some(({ value: v }) => v === y.value) : y.value === ((c = t.selected) == null ? void 0 : c.value);
|
|
1088
1163
|
}
|
|
1089
|
-
const
|
|
1164
|
+
const w = Y({
|
|
1090
1165
|
list: void 0,
|
|
1091
1166
|
search: void 0
|
|
1092
|
-
}),
|
|
1167
|
+
}), S = Y({
|
|
1093
1168
|
id: "",
|
|
1094
1169
|
index: 0
|
|
1095
1170
|
});
|
|
1096
|
-
function
|
|
1097
|
-
const
|
|
1098
|
-
const
|
|
1099
|
-
$ !== void 0 && (
|
|
1100
|
-
var
|
|
1101
|
-
const
|
|
1102
|
-
|
|
1171
|
+
function M({ code: y }) {
|
|
1172
|
+
const c = ($) => {
|
|
1173
|
+
const T = $ != null ? $ : S.index;
|
|
1174
|
+
$ !== void 0 && (S.index = $), setTimeout(() => {
|
|
1175
|
+
var D, j;
|
|
1176
|
+
const V = (D = w.list) == null ? void 0 : D.children[T];
|
|
1177
|
+
S.id = (j = V == null ? void 0 : V.id) != null ? j : "", V == null || V.focus();
|
|
1103
1178
|
}, 0);
|
|
1104
|
-
},
|
|
1179
|
+
}, v = () => {
|
|
1105
1180
|
var $;
|
|
1106
|
-
t.searchable && (
|
|
1181
|
+
t.searchable && (S.index = 0, ($ = w == null ? void 0 : w.search) == null || $.focus());
|
|
1107
1182
|
};
|
|
1108
|
-
switch (
|
|
1183
|
+
switch (y) {
|
|
1109
1184
|
case "ArrowUp":
|
|
1110
|
-
return
|
|
1185
|
+
return S.index > 0 && (S.index -= 1), c();
|
|
1111
1186
|
case "ArrowDown":
|
|
1112
|
-
return
|
|
1187
|
+
return i.value ? (S.index < t.options.length - 1 && (S.index += 1), c()) : (r(), c(0));
|
|
1113
1188
|
case "Home":
|
|
1114
|
-
return
|
|
1189
|
+
return c(0);
|
|
1115
1190
|
case "End":
|
|
1116
|
-
return
|
|
1191
|
+
return c(t.options.length - 1);
|
|
1117
1192
|
case "Escape":
|
|
1118
|
-
return
|
|
1193
|
+
return f();
|
|
1119
1194
|
default:
|
|
1120
|
-
!["Enter", "NumpadEnter", "Space"].includes(
|
|
1195
|
+
!["Enter", "NumpadEnter", "Space"].includes(y) && v();
|
|
1121
1196
|
}
|
|
1122
1197
|
}
|
|
1123
|
-
function
|
|
1124
|
-
|
|
1198
|
+
function A() {
|
|
1199
|
+
i.value = !1, S.index = 0, a.value = "";
|
|
1125
1200
|
}
|
|
1126
|
-
function
|
|
1127
|
-
return (
|
|
1128
|
-
|
|
1201
|
+
function H(y) {
|
|
1202
|
+
return (c) => {
|
|
1203
|
+
w[y] = y === "search" ? c == null ? void 0 : c.input : c == null ? void 0 : c.list;
|
|
1129
1204
|
};
|
|
1130
1205
|
}
|
|
1131
|
-
function
|
|
1132
|
-
var
|
|
1133
|
-
const
|
|
1134
|
-
return (
|
|
1206
|
+
function U() {
|
|
1207
|
+
var c;
|
|
1208
|
+
const y = t.selected;
|
|
1209
|
+
return (c = y == null ? void 0 : y.name) != null ? c : t.placeholder;
|
|
1135
1210
|
}
|
|
1136
|
-
return (
|
|
1211
|
+
return (y, c) => (s(), u("div", {
|
|
1137
1212
|
ref_key: "el",
|
|
1138
|
-
ref:
|
|
1139
|
-
class:
|
|
1213
|
+
ref: n,
|
|
1214
|
+
class: k(["sol-select-core", { "-smaller": e.smallerWidth }]),
|
|
1140
1215
|
"data-testid": `select-${e.id}`,
|
|
1141
|
-
onKeydownPassive:
|
|
1216
|
+
onKeydownPassive: M
|
|
1142
1217
|
}, [
|
|
1143
|
-
y
|
|
1218
|
+
b(y.$slots, "label", {
|
|
1144
1219
|
id: `select-label-${e.id}`,
|
|
1145
1220
|
for: `select-toggle-${e.id}`
|
|
1146
1221
|
}, () => [
|
|
1147
|
-
e.label ? (
|
|
1222
|
+
e.label ? (s(), u("label", {
|
|
1148
1223
|
key: 0,
|
|
1149
1224
|
id: `select-label-${e.id}`,
|
|
1150
|
-
class:
|
|
1151
|
-
},
|
|
1225
|
+
class: k(["label", { "-disabled": e.disabled }])
|
|
1226
|
+
}, C(e.label), 11, gl)) : I("", !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}`,
|
|
1157
1232
|
class: "select-button-toggle",
|
|
1158
1233
|
"aria-haspopup": "listbox",
|
|
1159
|
-
"aria-expanded":
|
|
1234
|
+
"aria-expanded": i.value,
|
|
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: N(d, ["stop"])
|
|
1164
1239
|
}, [
|
|
1165
|
-
y
|
|
1166
|
-
toggle: { open:
|
|
1167
|
-
isOpen:
|
|
1168
|
-
select:
|
|
1240
|
+
b(y.$slots, "toggle-dropdown", {
|
|
1241
|
+
toggle: { open: r, close: f, toggleDropdown: d },
|
|
1242
|
+
isOpen: i.value,
|
|
1243
|
+
select: B,
|
|
1169
1244
|
selected: e.selected
|
|
1170
1245
|
}, () => {
|
|
1171
|
-
var
|
|
1246
|
+
var v;
|
|
1172
1247
|
return [
|
|
1173
|
-
e.multiple && Array.isArray(e.selected) && ((
|
|
1174
|
-
(
|
|
1248
|
+
e.multiple && Array.isArray(e.selected) && ((v = e.selected) == null ? void 0 : v.length) ? (s(), u("div", xl, [
|
|
1249
|
+
(s(!0), u(_, null, ee(e.selected, ($, T) => (s(), p(se, {
|
|
1175
1250
|
id: $.value,
|
|
1176
|
-
key:
|
|
1251
|
+
key: T,
|
|
1177
1252
|
label: $.name,
|
|
1178
|
-
onClick:
|
|
1179
|
-
onClose: (
|
|
1253
|
+
onClick: N((V) => B($), ["stop"]),
|
|
1254
|
+
onClose: (V) => B($)
|
|
1180
1255
|
}, null, 8, ["id", "label", "onClick", "onClose"]))), 128))
|
|
1181
|
-
])) : (
|
|
1182
|
-
|
|
1256
|
+
])) : (s(), u("span", Sl, C(U()), 1)),
|
|
1257
|
+
L(x(bl), {
|
|
1183
1258
|
"aria-hidden": "true",
|
|
1184
1259
|
tabindex: "-1",
|
|
1185
|
-
class:
|
|
1260
|
+
class: k(["icon", { "-open": i.value }])
|
|
1186
1261
|
}, null, 8, ["class"])
|
|
1187
1262
|
];
|
|
1188
1263
|
})
|
|
1189
|
-
], 8,
|
|
1190
|
-
|
|
1191
|
-
|
|
1264
|
+
], 8, wl),
|
|
1265
|
+
h("span", kl, C(e.error), 1),
|
|
1266
|
+
L(Se, {
|
|
1192
1267
|
mode: "out-in",
|
|
1193
1268
|
name: "dropdown"
|
|
1194
1269
|
}, {
|
|
1195
|
-
default:
|
|
1196
|
-
|
|
1197
|
-
y
|
|
1198
|
-
e.searchable ? (
|
|
1270
|
+
default: R(() => [
|
|
1271
|
+
G(h("div", Cl, [
|
|
1272
|
+
b(y.$slots, "search", {}, () => [
|
|
1273
|
+
e.searchable ? (s(), u("div", {
|
|
1199
1274
|
key: 0,
|
|
1200
|
-
class:
|
|
1275
|
+
class: k(["search-container", { "-loading": e.loading }])
|
|
1201
1276
|
}, [
|
|
1202
|
-
y
|
|
1203
|
-
|
|
1277
|
+
b(y.$slots, "search", { filter: a.value }, () => [
|
|
1278
|
+
L(W, {
|
|
1204
1279
|
id: `select-search-${e.id}`,
|
|
1205
|
-
ref:
|
|
1280
|
+
ref: H("search"),
|
|
1206
1281
|
modelValue: a.value,
|
|
1207
|
-
"onUpdate:modelValue":
|
|
1282
|
+
"onUpdate:modelValue": c[0] || (c[0] = (v) => a.value = v),
|
|
1208
1283
|
"data-testid": `select-search-${e.id}`,
|
|
1209
1284
|
role: "combobox",
|
|
1210
1285
|
class: "search",
|
|
1211
1286
|
"aria-autocomplete": "list",
|
|
1212
1287
|
placeholder: e.searchPlaceholder,
|
|
1213
|
-
"aria-expanded":
|
|
1288
|
+
"aria-expanded": i.value,
|
|
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": S.id,
|
|
1218
1293
|
"aria-labelledby": `select-label-${e.id}`,
|
|
1219
|
-
onClick:
|
|
1294
|
+
onClick: c[1] || (c[1] = N(() => {
|
|
1220
1295
|
}, ["stop"])),
|
|
1221
|
-
onInput:
|
|
1296
|
+
onInput: c[2] || (c[2] = (v) => {
|
|
1222
1297
|
var $;
|
|
1223
|
-
return l("search", ($ =
|
|
1298
|
+
return l("search", ($ = v.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
|
+
L(x(Ae), {
|
|
1227
1302
|
"aria-hidden": "true",
|
|
1228
1303
|
class: "icon"
|
|
1229
1304
|
})
|
|
1230
1305
|
])
|
|
1231
|
-
], 2)) :
|
|
1232
|
-
|
|
1306
|
+
], 2)) : I("", !0),
|
|
1307
|
+
L(hl, {
|
|
1233
1308
|
id: e.id,
|
|
1234
|
-
ref:
|
|
1235
|
-
options:
|
|
1309
|
+
ref: H("list"),
|
|
1310
|
+
options: x(o),
|
|
1236
1311
|
multiple: e.multiple,
|
|
1237
|
-
"is-selected":
|
|
1238
|
-
onSelect:
|
|
1312
|
+
"is-selected": g,
|
|
1313
|
+
onSelect: B
|
|
1239
1314
|
}, {
|
|
1240
|
-
"item-list":
|
|
1241
|
-
y
|
|
1242
|
-
text:
|
|
1315
|
+
"item-list": R(({ text: v, value: $, option: T, isSelected: V }) => [
|
|
1316
|
+
b(y.$slots, "default", {
|
|
1317
|
+
text: v,
|
|
1243
1318
|
value: $,
|
|
1244
|
-
option:
|
|
1245
|
-
isSelected:
|
|
1319
|
+
option: T,
|
|
1320
|
+
isSelected: V
|
|
1246
1321
|
})
|
|
1247
1322
|
]),
|
|
1248
|
-
"no-data":
|
|
1249
|
-
y
|
|
1323
|
+
"no-data": R(() => [
|
|
1324
|
+
b(y.$slots, "no-data")
|
|
1250
1325
|
]),
|
|
1251
1326
|
_: 3
|
|
1252
1327
|
}, 8, ["id", "options", "multiple"])
|
|
1253
1328
|
])
|
|
1254
1329
|
], 512), [
|
|
1255
|
-
[
|
|
1330
|
+
[Z, i.value]
|
|
1256
1331
|
])
|
|
1257
1332
|
]),
|
|
1258
1333
|
_: 3
|
|
1259
1334
|
})
|
|
1260
|
-
], 42,
|
|
1335
|
+
], 42, yl));
|
|
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 Bl = {
|
|
1270
1345
|
preserveAspectRatio: "xMidYMid meet",
|
|
1271
1346
|
viewBox: "0 0 24 24",
|
|
1272
1347
|
width: "1em",
|
|
1273
1348
|
height: "1em"
|
|
1274
|
-
},
|
|
1349
|
+
}, Ml = /* @__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), Tl = [
|
|
1353
|
+
Ml
|
|
1279
1354
|
];
|
|
1280
|
-
function
|
|
1281
|
-
return
|
|
1355
|
+
function Il(e, l) {
|
|
1356
|
+
return s(), u("svg", Bl, Tl);
|
|
1282
1357
|
}
|
|
1283
|
-
const
|
|
1358
|
+
const zl = { name: "mi-chevron-up", render: Il }, Ll = ["id", "data-testid", "aria-disabled"], Vl = ["data-testid", "tabindex"], Ol = ["data-testid"], ye = /* @__PURE__ */ z({
|
|
1284
1359
|
__name: "Accordion",
|
|
1285
1360
|
props: {
|
|
1286
1361
|
id: null,
|
|
@@ -1289,38 +1364,211 @@ 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(), u("details", {
|
|
1293
1368
|
id: `accordion-${e.id}`,
|
|
1294
1369
|
"data-testid": `accordion-${e.id}`,
|
|
1295
|
-
class:
|
|
1370
|
+
class: k(["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
|
-
|
|
1304
|
-
|
|
1378
|
+
b(l.$slots, "title", {}, () => [
|
|
1379
|
+
E(C(e.title), 1)
|
|
1305
1380
|
]),
|
|
1306
|
-
|
|
1381
|
+
L(x(zl), {
|
|
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
|
-
|
|
1316
|
-
], 8,
|
|
1317
|
-
], 10,
|
|
1390
|
+
b(l.$slots, "default")
|
|
1391
|
+
], 8, Ol)
|
|
1392
|
+
], 10, Ll));
|
|
1318
1393
|
}
|
|
1319
1394
|
});
|
|
1320
1395
|
ye.install = (e) => {
|
|
1321
1396
|
e.component("SolAccordion", ye);
|
|
1322
1397
|
};
|
|
1323
|
-
|
|
1398
|
+
function Al(e, l) {
|
|
1399
|
+
function t({ code: n }) {
|
|
1400
|
+
var o;
|
|
1401
|
+
const i = n;
|
|
1402
|
+
(() => {
|
|
1403
|
+
if (!(l != null && l.fallback))
|
|
1404
|
+
return !1;
|
|
1405
|
+
const d = (r) => Array.isArray(r) ? !r.includes(i) : i !== r;
|
|
1406
|
+
return l != null && l.exclude ? !e.hasOwnProperty(i) && d(l.exclude) : !e.hasOwnProperty(i);
|
|
1407
|
+
})() && (l == null || l.fallback()), e.hasOwnProperty(i) && ((o = e[i]) == null || o.call(e));
|
|
1408
|
+
}
|
|
1409
|
+
return {
|
|
1410
|
+
navigate: t
|
|
1411
|
+
};
|
|
1412
|
+
}
|
|
1413
|
+
function Pl({ target: e, query: l }) {
|
|
1414
|
+
const t = Y({
|
|
1415
|
+
id: "",
|
|
1416
|
+
index: -1
|
|
1417
|
+
});
|
|
1418
|
+
function n(m) {
|
|
1419
|
+
const B = m != null ? m : t.index, g = e == null ? void 0 : e.value;
|
|
1420
|
+
m !== void 0 && (t.index = m), setTimeout(() => {
|
|
1421
|
+
var M;
|
|
1422
|
+
const w = g.children[B], S = l && w.querySelector(l) ? w.querySelector(l) : w;
|
|
1423
|
+
t.id = (M = w == null ? void 0 : w.id) != null ? M : "", S == null || S.focus();
|
|
1424
|
+
}, 0);
|
|
1425
|
+
}
|
|
1426
|
+
function i() {
|
|
1427
|
+
t.index > 0 && (t.index -= 1, n());
|
|
1428
|
+
}
|
|
1429
|
+
function a(m) {
|
|
1430
|
+
t.index < m - 1 && (t.index += 1, n());
|
|
1431
|
+
}
|
|
1432
|
+
function o() {
|
|
1433
|
+
n(0);
|
|
1434
|
+
}
|
|
1435
|
+
function d(m) {
|
|
1436
|
+
n(m - 1);
|
|
1437
|
+
}
|
|
1438
|
+
function r(m) {
|
|
1439
|
+
return m.id ? m.id === t.id : m.index === t.index;
|
|
1440
|
+
}
|
|
1441
|
+
function f() {
|
|
1442
|
+
t.id = "", t.index = -1;
|
|
1443
|
+
}
|
|
1444
|
+
return {
|
|
1445
|
+
elementFocus: t,
|
|
1446
|
+
isItemFocused: r,
|
|
1447
|
+
resetStateFocus: f,
|
|
1448
|
+
focusListItem: n,
|
|
1449
|
+
focusOnPreviousItem: i,
|
|
1450
|
+
focusOnNextItem: a,
|
|
1451
|
+
focusOnFirstItem: o,
|
|
1452
|
+
focusOnLastItem: d
|
|
1453
|
+
};
|
|
1454
|
+
}
|
|
1455
|
+
const El = ["id", "data-testid"], Dl = ["id", "aria-expanded"], Rl = ["id", "data-testid", "aria-labelledby"], ge = /* @__PURE__ */ z({
|
|
1456
|
+
__name: "Menu",
|
|
1457
|
+
props: {
|
|
1458
|
+
id: null,
|
|
1459
|
+
label: { default: "Teste" },
|
|
1460
|
+
position: { default: "bottom" }
|
|
1461
|
+
},
|
|
1462
|
+
emits: ["change"],
|
|
1463
|
+
setup(e, { emit: l }) {
|
|
1464
|
+
const t = O();
|
|
1465
|
+
ke(t, () => {
|
|
1466
|
+
g();
|
|
1467
|
+
});
|
|
1468
|
+
const n = O(!1), i = O(), a = P(
|
|
1469
|
+
() => i.value ? i.value.childElementCount : 0
|
|
1470
|
+
), {
|
|
1471
|
+
resetStateFocus: o,
|
|
1472
|
+
focusOnPreviousItem: d,
|
|
1473
|
+
focusOnNextItem: r,
|
|
1474
|
+
focusOnFirstItem: f,
|
|
1475
|
+
focusOnLastItem: m
|
|
1476
|
+
} = Pl({ target: i, query: '[role="menuitem"]' }), { navigate: B } = Al({
|
|
1477
|
+
Home: f,
|
|
1478
|
+
End: () => m(a.value),
|
|
1479
|
+
ArrowUp: d,
|
|
1480
|
+
ArrowDown: () => {
|
|
1481
|
+
!n.value && w(), r(a.value);
|
|
1482
|
+
},
|
|
1483
|
+
Escape: g
|
|
1484
|
+
});
|
|
1485
|
+
function g() {
|
|
1486
|
+
n.value = !1, o();
|
|
1487
|
+
}
|
|
1488
|
+
function w() {
|
|
1489
|
+
n.value = !0;
|
|
1490
|
+
}
|
|
1491
|
+
function S() {
|
|
1492
|
+
n.value = !0;
|
|
1493
|
+
}
|
|
1494
|
+
return (M, A) => (s(), u("div", {
|
|
1495
|
+
id: `menu-${e.id}`,
|
|
1496
|
+
ref_key: "el",
|
|
1497
|
+
ref: t,
|
|
1498
|
+
"data-testid": `menu-${e.id}`,
|
|
1499
|
+
class: k([`-${e.position}`, "sol-menu-core"]),
|
|
1500
|
+
onKeyupPassive: A[0] || (A[0] = (...H) => x(B) && x(B)(...H)),
|
|
1501
|
+
onFocusin: A[1] || (A[1] = (H) => l("change", "teste"))
|
|
1502
|
+
}, [
|
|
1503
|
+
h("button", {
|
|
1504
|
+
id: `menu-button-${e.id}`,
|
|
1505
|
+
type: "button",
|
|
1506
|
+
role: "menuitem",
|
|
1507
|
+
class: "toggle-menu",
|
|
1508
|
+
"aria-haspopup": "true",
|
|
1509
|
+
"aria-expanded": n.value,
|
|
1510
|
+
onClick: S
|
|
1511
|
+
}, [
|
|
1512
|
+
b(M.$slots, "label", {}, () => [
|
|
1513
|
+
E(C(e.label), 1)
|
|
1514
|
+
])
|
|
1515
|
+
], 8, Dl),
|
|
1516
|
+
G(h("menu", {
|
|
1517
|
+
id: `menu-container-${e.id}`,
|
|
1518
|
+
ref_key: "menu",
|
|
1519
|
+
ref: i,
|
|
1520
|
+
"data-testid": `menu-container-${e.id}`,
|
|
1521
|
+
role: "menu",
|
|
1522
|
+
"aria-labelledby": `menu-button-${e.id}`,
|
|
1523
|
+
class: k(["menu", { "-open": n.value }])
|
|
1524
|
+
}, [
|
|
1525
|
+
b(M.$slots, "default")
|
|
1526
|
+
], 10, Rl), [
|
|
1527
|
+
[Z, n.value]
|
|
1528
|
+
])
|
|
1529
|
+
], 42, El));
|
|
1530
|
+
}
|
|
1531
|
+
});
|
|
1532
|
+
ge.install = (e) => {
|
|
1533
|
+
e.component("SolMenu", ge);
|
|
1534
|
+
};
|
|
1535
|
+
const Hl = ["id"], pl = ["href", "target"], we = /* @__PURE__ */ z({
|
|
1536
|
+
__name: "MenuItemLink",
|
|
1537
|
+
props: {
|
|
1538
|
+
id: null,
|
|
1539
|
+
text: null,
|
|
1540
|
+
link: null,
|
|
1541
|
+
active: { type: Boolean },
|
|
1542
|
+
external: { type: Boolean }
|
|
1543
|
+
},
|
|
1544
|
+
setup(e) {
|
|
1545
|
+
return (l, t) => (s(), u("li", {
|
|
1546
|
+
id: `menu-item-link-${e.id}`,
|
|
1547
|
+
class: "sol-menuitem-link-core",
|
|
1548
|
+
tabindex: "-1",
|
|
1549
|
+
role: "none"
|
|
1550
|
+
}, [
|
|
1551
|
+
b(l.$slots, "default", {
|
|
1552
|
+
id: e.id,
|
|
1553
|
+
active: e.active,
|
|
1554
|
+
link: e.link,
|
|
1555
|
+
text: e.text,
|
|
1556
|
+
external: e.external
|
|
1557
|
+
}, () => [
|
|
1558
|
+
h("a", {
|
|
1559
|
+
role: "menuitem",
|
|
1560
|
+
class: k({ "-active": e.active }),
|
|
1561
|
+
href: e.link,
|
|
1562
|
+
target: e.external ? "_blank" : "_parent"
|
|
1563
|
+
}, C(e.text), 11, pl)
|
|
1564
|
+
])
|
|
1565
|
+
], 8, Hl));
|
|
1566
|
+
}
|
|
1567
|
+
});
|
|
1568
|
+
we.install = (e) => {
|
|
1569
|
+
e.component("SolMenuItemLink", we);
|
|
1570
|
+
};
|
|
1571
|
+
const Ee = 12, K = {
|
|
1324
1572
|
type: "success",
|
|
1325
1573
|
timeout: 5e3,
|
|
1326
1574
|
showIcon: !0,
|
|
@@ -1328,59 +1576,59 @@ const Le = 12, U = {
|
|
|
1328
1576
|
position: "top-right",
|
|
1329
1577
|
hideProgressBar: !1
|
|
1330
1578
|
};
|
|
1331
|
-
function
|
|
1332
|
-
const t =
|
|
1579
|
+
function Nl(e, l) {
|
|
1580
|
+
const t = Y({
|
|
1333
1581
|
id: null,
|
|
1334
1582
|
intervalId: null,
|
|
1335
1583
|
startTime: 0,
|
|
1336
1584
|
remaining: l
|
|
1337
|
-
}),
|
|
1338
|
-
function
|
|
1585
|
+
}), n = O(100);
|
|
1586
|
+
function i() {
|
|
1339
1587
|
clearInterval(t.intervalId), clearTimeout(t.id), t.remaining -= Date.now() - t.startTime;
|
|
1340
1588
|
}
|
|
1341
1589
|
function a() {
|
|
1342
1590
|
t.startTime = Date.now(), clearTimeout(t.id), t.intervalId = setInterval(() => {
|
|
1343
|
-
|
|
1591
|
+
n.value--;
|
|
1344
1592
|
}, l / 100 - 5), t.id = setTimeout(e, t.remaining);
|
|
1345
1593
|
}
|
|
1346
1594
|
function o() {
|
|
1347
|
-
clearInterval(t.intervalId), clearTimeout(t.id),
|
|
1595
|
+
clearInterval(t.intervalId), clearTimeout(t.id), n.value = 100;
|
|
1348
1596
|
}
|
|
1349
|
-
return
|
|
1597
|
+
return ze(() => {
|
|
1350
1598
|
if (l <= 0)
|
|
1351
1599
|
return !1;
|
|
1352
|
-
}),
|
|
1600
|
+
}), Ue(() => {
|
|
1353
1601
|
o();
|
|
1354
1602
|
}), {
|
|
1355
1603
|
start: a,
|
|
1356
|
-
stop:
|
|
1604
|
+
stop: i,
|
|
1357
1605
|
clear: o,
|
|
1358
|
-
progress:
|
|
1606
|
+
progress: n
|
|
1359
1607
|
};
|
|
1360
1608
|
}
|
|
1361
|
-
function
|
|
1609
|
+
function Fl(e) {
|
|
1362
1610
|
return {
|
|
1363
|
-
stylePosition:
|
|
1364
|
-
const { position: t, offset:
|
|
1611
|
+
stylePosition: P(() => {
|
|
1612
|
+
const { position: t, offset: n } = e();
|
|
1365
1613
|
switch (t) {
|
|
1366
1614
|
case "top-left":
|
|
1367
1615
|
return {
|
|
1368
1616
|
left: "0",
|
|
1369
|
-
top: `${
|
|
1617
|
+
top: `${n}px`
|
|
1370
1618
|
};
|
|
1371
1619
|
case "bottom-left":
|
|
1372
1620
|
return {
|
|
1373
1621
|
left: "0",
|
|
1374
|
-
bottom: `${
|
|
1622
|
+
bottom: `${n}px`
|
|
1375
1623
|
};
|
|
1376
1624
|
case "bottom-right":
|
|
1377
1625
|
return {
|
|
1378
1626
|
right: "0",
|
|
1379
|
-
bottom: `${
|
|
1627
|
+
bottom: `${n}px`
|
|
1380
1628
|
};
|
|
1381
1629
|
case "top-center":
|
|
1382
1630
|
return {
|
|
1383
|
-
top: `${
|
|
1631
|
+
top: `${n}px`,
|
|
1384
1632
|
left: "0",
|
|
1385
1633
|
right: "0",
|
|
1386
1634
|
marginRight: "auto",
|
|
@@ -1388,7 +1636,7 @@ function xl(e) {
|
|
|
1388
1636
|
};
|
|
1389
1637
|
case "bottom-center":
|
|
1390
1638
|
return {
|
|
1391
|
-
bottom: `${
|
|
1639
|
+
bottom: `${n}px`,
|
|
1392
1640
|
left: "0",
|
|
1393
1641
|
right: "0",
|
|
1394
1642
|
marginRight: "auto",
|
|
@@ -1397,169 +1645,169 @@ function xl(e) {
|
|
|
1397
1645
|
default:
|
|
1398
1646
|
return {
|
|
1399
1647
|
right: "0",
|
|
1400
|
-
top: `${
|
|
1648
|
+
top: `${n}px`
|
|
1401
1649
|
};
|
|
1402
1650
|
}
|
|
1403
1651
|
})
|
|
1404
1652
|
};
|
|
1405
1653
|
}
|
|
1406
|
-
var
|
|
1407
|
-
const
|
|
1654
|
+
var De = /* @__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))(De || {});
|
|
1655
|
+
const Ul = {
|
|
1408
1656
|
preserveAspectRatio: "xMidYMid meet",
|
|
1409
1657
|
viewBox: "0 0 24 24",
|
|
1410
1658
|
width: "1em",
|
|
1411
1659
|
height: "1em"
|
|
1412
|
-
},
|
|
1660
|
+
}, Kl = /* @__PURE__ */ h("path", {
|
|
1413
1661
|
fill: "currentColor",
|
|
1414
1662
|
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
|
-
|
|
1663
|
+
}, null, -1), Gl = [
|
|
1664
|
+
Kl
|
|
1417
1665
|
];
|
|
1418
|
-
function
|
|
1419
|
-
return
|
|
1666
|
+
function Yl(e, l) {
|
|
1667
|
+
return s(), u("svg", Ul, Gl);
|
|
1420
1668
|
}
|
|
1421
|
-
const
|
|
1669
|
+
const Wl = { name: "mi-circle-check", render: Yl }, jl = {
|
|
1422
1670
|
preserveAspectRatio: "xMidYMid meet",
|
|
1423
1671
|
viewBox: "0 0 24 24",
|
|
1424
1672
|
width: "1em",
|
|
1425
1673
|
height: "1em"
|
|
1426
|
-
},
|
|
1674
|
+
}, ql = /* @__PURE__ */ h("path", {
|
|
1427
1675
|
fill: "currentColor",
|
|
1428
1676
|
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
|
-
|
|
1677
|
+
}, null, -1), Zl = [
|
|
1678
|
+
ql
|
|
1431
1679
|
];
|
|
1432
|
-
function
|
|
1433
|
-
return
|
|
1680
|
+
function Ql(e, l) {
|
|
1681
|
+
return s(), u("svg", jl, Zl);
|
|
1434
1682
|
}
|
|
1435
|
-
const
|
|
1683
|
+
const Jl = { name: "mi-circle-error", render: Ql }, Xl = {
|
|
1436
1684
|
preserveAspectRatio: "xMidYMid meet",
|
|
1437
1685
|
viewBox: "0 0 24 24",
|
|
1438
1686
|
width: "1em",
|
|
1439
1687
|
height: "1em"
|
|
1440
|
-
},
|
|
1441
|
-
/* @__PURE__ */
|
|
1442
|
-
/* @__PURE__ */
|
|
1443
|
-
], -1),
|
|
1444
|
-
|
|
1688
|
+
}, _l = /* @__PURE__ */ h("g", { fill: "currentColor" }, [
|
|
1689
|
+
/* @__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" }),
|
|
1690
|
+
/* @__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" })
|
|
1691
|
+
], -1), en = [
|
|
1692
|
+
_l
|
|
1445
1693
|
];
|
|
1446
|
-
function
|
|
1447
|
-
return
|
|
1694
|
+
function tn(e, l) {
|
|
1695
|
+
return s(), u("svg", Xl, en);
|
|
1448
1696
|
}
|
|
1449
|
-
const
|
|
1697
|
+
const ln = { name: "mi-circle-warning", render: tn }, nn = ["id", "data-testid"], an = { class: "content-wrapper" }, on = {
|
|
1450
1698
|
key: 0,
|
|
1451
1699
|
class: "icon-container",
|
|
1452
1700
|
"aria-hidden": "true"
|
|
1453
|
-
},
|
|
1701
|
+
}, sn = { class: "content" }, dn = {
|
|
1454
1702
|
key: 0,
|
|
1455
1703
|
class: "description"
|
|
1456
|
-
},
|
|
1704
|
+
}, cn = ["data-testid"], rn = /* @__PURE__ */ z({
|
|
1457
1705
|
__name: "Toast",
|
|
1458
1706
|
props: {
|
|
1459
1707
|
id: null,
|
|
1460
|
-
type: { default:
|
|
1708
|
+
type: { default: K.type },
|
|
1461
1709
|
visible: { type: Boolean, default: !1 },
|
|
1462
1710
|
title: null,
|
|
1463
1711
|
description: null,
|
|
1464
1712
|
timeout: null,
|
|
1465
|
-
hideProgressBar: { type: Boolean, default:
|
|
1466
|
-
showIcon: { type: Boolean, default:
|
|
1713
|
+
hideProgressBar: { type: Boolean, default: K.hideProgressBar },
|
|
1714
|
+
showIcon: { type: Boolean, default: K.showIcon },
|
|
1467
1715
|
offset: { default: 0 },
|
|
1468
1716
|
onClose: null,
|
|
1469
1717
|
onCloseHandler: null,
|
|
1470
|
-
position: { default:
|
|
1718
|
+
position: { default: K.position }
|
|
1471
1719
|
},
|
|
1472
1720
|
setup(e) {
|
|
1473
|
-
const l = e, { start: t, stop:
|
|
1474
|
-
var
|
|
1475
|
-
(
|
|
1476
|
-
}, l.timeout), { stylePosition: a } =
|
|
1721
|
+
const l = e, { start: t, stop: n, progress: i } = Nl(() => {
|
|
1722
|
+
var f;
|
|
1723
|
+
(f = l.onCloseHandler) == null || f.call(l);
|
|
1724
|
+
}, l.timeout), { stylePosition: a } = Fl(() => ({
|
|
1477
1725
|
offset: l.offset,
|
|
1478
1726
|
position: l.position
|
|
1479
|
-
})), o =
|
|
1480
|
-
function
|
|
1481
|
-
l.timeout > 0 &&
|
|
1727
|
+
})), o = P(() => l.title && l.description);
|
|
1728
|
+
function d() {
|
|
1729
|
+
l.timeout > 0 && n();
|
|
1482
1730
|
}
|
|
1483
|
-
function
|
|
1731
|
+
function r() {
|
|
1484
1732
|
t();
|
|
1485
1733
|
}
|
|
1486
|
-
return
|
|
1734
|
+
return ze(() => {
|
|
1487
1735
|
t();
|
|
1488
|
-
}), (
|
|
1489
|
-
name:
|
|
1736
|
+
}), (f, m) => (s(), p(Se, {
|
|
1737
|
+
name: x(De)[e.position],
|
|
1490
1738
|
type: "animation"
|
|
1491
1739
|
}, {
|
|
1492
|
-
default:
|
|
1493
|
-
e.visible ? (
|
|
1740
|
+
default: R(() => [
|
|
1741
|
+
e.visible ? (s(), u("div", {
|
|
1494
1742
|
key: 0,
|
|
1495
1743
|
id: `toast-${e.type}-${e.id}`,
|
|
1496
1744
|
role: "status",
|
|
1497
1745
|
"data-testid": `toast-${e.type}-${e.id}`,
|
|
1498
|
-
style:
|
|
1499
|
-
class:
|
|
1500
|
-
onKeyup:
|
|
1501
|
-
(...
|
|
1746
|
+
style: ne(x(a)),
|
|
1747
|
+
class: k(["sol-toast-core", [`-${e.type}`, { "-multiline": x(o) }]]),
|
|
1748
|
+
onKeyup: m[1] || (m[1] = Q(
|
|
1749
|
+
(...B) => e.onCloseHandler && e.onCloseHandler(...B),
|
|
1502
1750
|
["esc"]
|
|
1503
1751
|
)),
|
|
1504
|
-
onMouseenter:
|
|
1505
|
-
onMouseleave:
|
|
1506
|
-
onFocusin:
|
|
1507
|
-
onFocusout:
|
|
1752
|
+
onMouseenter: d,
|
|
1753
|
+
onMouseleave: r,
|
|
1754
|
+
onFocusin: d,
|
|
1755
|
+
onFocusout: r
|
|
1508
1756
|
}, [
|
|
1509
|
-
|
|
1510
|
-
e.showIcon ? (
|
|
1511
|
-
|
|
1512
|
-
e.type === "success" ? (
|
|
1757
|
+
h("section", an, [
|
|
1758
|
+
e.showIcon ? (s(), u("div", on, [
|
|
1759
|
+
b(f.$slots, "icon-status", { type: e.type }, () => [
|
|
1760
|
+
e.type === "success" ? (s(), p(x(Wl), {
|
|
1513
1761
|
key: 0,
|
|
1514
1762
|
class: "icon"
|
|
1515
|
-
})) :
|
|
1516
|
-
e.type === "info" ? (
|
|
1763
|
+
})) : I("", !0),
|
|
1764
|
+
e.type === "info" ? (s(), p(x(ln), {
|
|
1517
1765
|
key: 1,
|
|
1518
1766
|
class: "icon"
|
|
1519
|
-
})) :
|
|
1520
|
-
e.type === "danger" ? (
|
|
1767
|
+
})) : I("", !0),
|
|
1768
|
+
e.type === "danger" ? (s(), p(x(Jl), {
|
|
1521
1769
|
key: 2,
|
|
1522
1770
|
class: "icon"
|
|
1523
|
-
})) :
|
|
1771
|
+
})) : I("", !0)
|
|
1524
1772
|
])
|
|
1525
|
-
])) :
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
class:
|
|
1773
|
+
])) : I("", !0),
|
|
1774
|
+
h("div", sn, [
|
|
1775
|
+
h("p", {
|
|
1776
|
+
class: k(["title", { "-multiline": x(o) }])
|
|
1529
1777
|
}, [
|
|
1530
|
-
|
|
1531
|
-
|
|
1778
|
+
b(f.$slots, "title", {}, () => [
|
|
1779
|
+
E(C(e.title), 1)
|
|
1532
1780
|
])
|
|
1533
1781
|
], 2),
|
|
1534
|
-
e.description ? (
|
|
1535
|
-
|
|
1536
|
-
|
|
1782
|
+
e.description ? (s(), u("p", dn, [
|
|
1783
|
+
b(f.$slots, "description", {}, () => [
|
|
1784
|
+
E(C(e.description), 1)
|
|
1537
1785
|
])
|
|
1538
|
-
])) :
|
|
1786
|
+
])) : I("", !0)
|
|
1539
1787
|
])
|
|
1540
1788
|
]),
|
|
1541
|
-
|
|
1789
|
+
h("button", {
|
|
1542
1790
|
type: "button",
|
|
1543
|
-
class:
|
|
1791
|
+
class: k(["close", { "-multiline": x(o) }]),
|
|
1544
1792
|
"data-testid": `toast-close-button-${e.type}-${e.id}`,
|
|
1545
1793
|
"aria-label": "close notification",
|
|
1546
|
-
onClick:
|
|
1794
|
+
onClick: m[0] || (m[0] = (...B) => e.onCloseHandler && e.onCloseHandler(...B))
|
|
1547
1795
|
}, [
|
|
1548
|
-
|
|
1549
|
-
], 10,
|
|
1550
|
-
e.hideProgressBar ?
|
|
1796
|
+
L(x(Pe), { class: "icon" })
|
|
1797
|
+
], 10, cn),
|
|
1798
|
+
e.hideProgressBar ? I("", !0) : (s(), u("div", {
|
|
1551
1799
|
key: 0,
|
|
1552
1800
|
class: "progressbar",
|
|
1553
1801
|
"aria-hidden": "true",
|
|
1554
|
-
style:
|
|
1802
|
+
style: ne({ width: `${x(i)}%` })
|
|
1555
1803
|
}, null, 4))
|
|
1556
|
-
], 46,
|
|
1804
|
+
], 46, nn)) : I("", !0)
|
|
1557
1805
|
]),
|
|
1558
1806
|
_: 3
|
|
1559
1807
|
}, 8, ["name"]));
|
|
1560
1808
|
}
|
|
1561
1809
|
});
|
|
1562
|
-
const
|
|
1810
|
+
const X = {
|
|
1563
1811
|
"top-left": [],
|
|
1564
1812
|
"top-right": [],
|
|
1565
1813
|
"top-center": [],
|
|
@@ -1567,129 +1815,135 @@ const J = {
|
|
|
1567
1815
|
"bottom-right": [],
|
|
1568
1816
|
"bottom-center": []
|
|
1569
1817
|
};
|
|
1570
|
-
function
|
|
1818
|
+
function bn() {
|
|
1571
1819
|
let e = 0;
|
|
1572
1820
|
function l() {
|
|
1573
|
-
Object.entries(
|
|
1574
|
-
|
|
1575
|
-
var
|
|
1576
|
-
const o = (
|
|
1577
|
-
|
|
1821
|
+
Object.entries(X).forEach(([n, i]) => {
|
|
1822
|
+
i.length && i.forEach((a) => {
|
|
1823
|
+
var d;
|
|
1824
|
+
const o = (d = a.toastVNode.props) == null ? void 0 : d.id;
|
|
1825
|
+
xe(o, n);
|
|
1578
1826
|
});
|
|
1579
1827
|
});
|
|
1580
1828
|
}
|
|
1581
1829
|
return {
|
|
1582
|
-
createToast: (
|
|
1583
|
-
const a = e++, o =
|
|
1584
|
-
return
|
|
1585
|
-
close: () =>
|
|
1830
|
+
createToast: (n, i) => {
|
|
1831
|
+
const a = e++, o = i ? un(i) : K;
|
|
1832
|
+
return i != null && i.showOneToast && l(), hn(a, o, typeof n == "string" ? { title: n } : n), {
|
|
1833
|
+
close: () => xe(a, o.position)
|
|
1586
1834
|
};
|
|
1587
1835
|
},
|
|
1588
1836
|
clearAllToasts: l
|
|
1589
1837
|
};
|
|
1590
1838
|
}
|
|
1591
|
-
function
|
|
1839
|
+
function un(e) {
|
|
1592
1840
|
const l = {
|
|
1593
|
-
...
|
|
1841
|
+
...K,
|
|
1594
1842
|
...e,
|
|
1595
1843
|
showIcon: e.showIcon
|
|
1596
1844
|
};
|
|
1597
1845
|
return l.hideProgressBar = !!(l.timeout && (l == null ? void 0 : l.timeout) <= 0), e.hideProgressBar && (l.hideProgressBar = e.hideProgressBar), l;
|
|
1598
1846
|
}
|
|
1599
|
-
function
|
|
1847
|
+
function hn(e, l, t) {
|
|
1600
1848
|
setTimeout(() => {
|
|
1601
|
-
const
|
|
1602
|
-
document.body.appendChild(
|
|
1603
|
-
const a =
|
|
1604
|
-
|
|
1605
|
-
|
|
1849
|
+
const n = mn(l, X, Ee), i = document.createElement("div");
|
|
1850
|
+
document.body.appendChild(i);
|
|
1851
|
+
const a = L(
|
|
1852
|
+
rn,
|
|
1853
|
+
fn(l, e, n, xe, t)
|
|
1606
1854
|
);
|
|
1607
|
-
|
|
1855
|
+
Le(a, i), X[l.position].push({ toastVNode: a, container: i }), a.component && (a.component.props.visible = !0);
|
|
1608
1856
|
}, 1);
|
|
1609
1857
|
}
|
|
1610
|
-
function
|
|
1858
|
+
function fn(e, l, t, n, i) {
|
|
1611
1859
|
return {
|
|
1612
1860
|
...e,
|
|
1613
|
-
...
|
|
1861
|
+
...i,
|
|
1614
1862
|
id: l,
|
|
1615
1863
|
offset: t,
|
|
1616
1864
|
visible: !1,
|
|
1617
1865
|
onCloseHandler() {
|
|
1618
|
-
|
|
1866
|
+
n(l, e.position ? e.position : "top-right");
|
|
1619
1867
|
}
|
|
1620
1868
|
};
|
|
1621
1869
|
}
|
|
1622
|
-
function
|
|
1870
|
+
function mn(e, l, t) {
|
|
1623
1871
|
if (!e.position)
|
|
1624
1872
|
throw new Error("no position");
|
|
1625
|
-
return l[e.position].reduce((
|
|
1873
|
+
return l[e.position].reduce((n, { toastVNode: i }) => (n += i.el.offsetHeight + t || 0, n), t);
|
|
1626
1874
|
}
|
|
1627
|
-
function
|
|
1628
|
-
for (let
|
|
1629
|
-
const { toastVNode: a } = l[
|
|
1875
|
+
function vn(e, l, t, n) {
|
|
1876
|
+
for (let i = e; i < l.length; i++) {
|
|
1877
|
+
const { toastVNode: a } = l[i];
|
|
1630
1878
|
if (!a.el)
|
|
1631
1879
|
return;
|
|
1632
|
-
const o = t.split("-")[0] || "top",
|
|
1880
|
+
const o = t.split("-")[0] || "top", d = parseInt(a.el.style[o], 10) - n - Ee;
|
|
1633
1881
|
if (!a.component)
|
|
1634
1882
|
return;
|
|
1635
|
-
a.component.props.offset =
|
|
1883
|
+
a.component.props.offset = d;
|
|
1636
1884
|
}
|
|
1637
1885
|
}
|
|
1638
|
-
function
|
|
1639
|
-
var
|
|
1640
|
-
const t =
|
|
1641
|
-
({ toastVNode:
|
|
1642
|
-
var
|
|
1643
|
-
return e === ((
|
|
1886
|
+
function xe(e, l) {
|
|
1887
|
+
var r;
|
|
1888
|
+
const t = X[l], n = t.findIndex(
|
|
1889
|
+
({ toastVNode: f }) => {
|
|
1890
|
+
var m;
|
|
1891
|
+
return e === ((m = f == null ? void 0 : f.props) == null ? void 0 : m.id);
|
|
1644
1892
|
}
|
|
1645
1893
|
);
|
|
1646
|
-
if (
|
|
1894
|
+
if (n === -1)
|
|
1647
1895
|
return;
|
|
1648
|
-
const { container:
|
|
1649
|
-
if (
|
|
1896
|
+
const { container: i, toastVNode: a } = t[n], o = (r = a == null ? void 0 : a.el) == null ? void 0 : r.offsetHeight;
|
|
1897
|
+
if (X[l].splice(n, 1), vn(n, t, l, o), !a.component)
|
|
1650
1898
|
return;
|
|
1651
|
-
const
|
|
1652
|
-
|
|
1653
|
-
|
|
1899
|
+
const d = a.component.props;
|
|
1900
|
+
d.visible = !1, d.onClose && d.onClose(), setTimeout(() => {
|
|
1901
|
+
Le(null, i), document.body.removeChild(i);
|
|
1654
1902
|
}, 1e3);
|
|
1655
1903
|
}
|
|
1656
1904
|
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:
|
|
1659
|
-
|
|
1905
|
+
const Te = {
|
|
1906
|
+
SolButton: J,
|
|
1907
|
+
SolButtonDestructive: Ve,
|
|
1908
|
+
SolInput: W,
|
|
1660
1909
|
SolTextarea: re,
|
|
1661
|
-
SolTextfield:
|
|
1910
|
+
SolTextfield: ie,
|
|
1662
1911
|
SolTextfieldPassword: ce,
|
|
1663
|
-
SolRadio:
|
|
1912
|
+
SolRadio: ae,
|
|
1664
1913
|
SolRadioGroup: ue,
|
|
1665
|
-
SolCheckbox:
|
|
1914
|
+
SolCheckbox: oe,
|
|
1666
1915
|
SolCheckboxGroup: he,
|
|
1667
1916
|
SolSwitch: fe,
|
|
1668
|
-
SolDropdown:
|
|
1917
|
+
SolDropdown: $e,
|
|
1669
1918
|
SolSelect: be,
|
|
1670
|
-
SolChip:
|
|
1671
|
-
SolAccordion: ye
|
|
1919
|
+
SolChip: se,
|
|
1920
|
+
SolAccordion: ye,
|
|
1921
|
+
SolMenu: ge,
|
|
1922
|
+
SolMenuItemLink: we
|
|
1672
1923
|
};
|
|
1673
|
-
function
|
|
1674
|
-
for (const l in
|
|
1675
|
-
e.component(l,
|
|
1924
|
+
function yn(e) {
|
|
1925
|
+
for (const l in Te)
|
|
1926
|
+
e.component(l, Te[l]);
|
|
1676
1927
|
}
|
|
1677
1928
|
export {
|
|
1678
1929
|
ye as SolAccordion,
|
|
1679
|
-
|
|
1680
|
-
|
|
1930
|
+
J as SolButton,
|
|
1931
|
+
Ve as SolButtonDestructive,
|
|
1932
|
+
oe as SolCheckbox,
|
|
1681
1933
|
he as SolCheckboxGroup,
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1934
|
+
se as SolChip,
|
|
1935
|
+
$e as SolDropdown,
|
|
1936
|
+
W as SolInput,
|
|
1937
|
+
ge as SolMenu,
|
|
1938
|
+
we as SolMenuItemLink,
|
|
1939
|
+
ae as SolRadio,
|
|
1686
1940
|
ue as SolRadioGroup,
|
|
1687
1941
|
be as SolSelect,
|
|
1688
1942
|
fe as SolSwitch,
|
|
1689
1943
|
re as SolTextarea,
|
|
1690
|
-
|
|
1944
|
+
ie as SolTextfield,
|
|
1691
1945
|
ce as SolTextfieldPassword,
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1946
|
+
Te as components,
|
|
1947
|
+
yn as install,
|
|
1948
|
+
bn as useToast
|
|
1695
1949
|
};
|