@solfacil/girassol 0.2.0 → 0.2.1

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