@solfacil/girassol 0.2.0 → 0.2.4

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