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