@solfacil/girassol 0.1.9 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/bin/{girassol → girassol-cli} +0 -0
- package/cli/build/cli.js +68 -0
- package/cli/build/commands/create:component.js +124 -0
- package/cli/build/commands/generate:plugin.js +89 -0
- package/cli/build/commands/generate:types.js +76 -0
- package/cli/build/commands/girassol-cli.js +52 -0
- package/cli/build/extensions/cli-extension.js +17 -0
- package/cli/build/templates/components.d.ts.ejs +1 -0
- package/cli/build/templates/nuxt-plugin.ejs +8 -0
- package/cli/build/templates/vue-plugin.ejs +5 -0
- package/cli/{src → build}/templates/windi.config.ts.ejs +0 -0
- package/cli/build/types/cli.d.ts +1 -0
- package/cli/build/types/commands/create:component.d.ts +1 -0
- package/cli/build/types/commands/generate:plugin.d.ts +1 -0
- package/cli/build/types/commands/generate:types.d.ts +7 -0
- package/cli/build/types/commands/girassol-cli.d.ts +1 -0
- package/cli/build/types/extensions/cli-extension.d.ts +1 -0
- package/cli/build/types/types.d.ts +0 -0
- package/cli/build/types.js +2 -0
- package/dist/cli/src/cli.d.ts +1 -0
- package/dist/cli/src/commands/create:component.d.ts +1 -0
- package/dist/cli/src/commands/generate:plugin.d.ts +1 -0
- package/dist/cli/src/commands/generate:types.d.ts +7 -0
- package/dist/cli/src/commands/girassol-cli.d.ts +1 -0
- package/dist/cli/src/extensions/cli-extension.d.ts +1 -0
- package/dist/cli/src/types.d.ts +0 -0
- package/dist/components.d.ts +21 -0
- package/dist/components.json +1 -0
- package/dist/girassol.es.js +23 -18
- package/dist/girassol.umd.js +2 -2
- package/dist/types/index.d.ts +839 -1
- package/dist/vite-modules/generate-component-types.d.ts +3 -0
- package/package.json +22 -12
- package/vite.config.ts +4 -0
- package/cli/.eslintrc.js +0 -18
- package/cli/LICENSE +0 -21
- package/cli/docs/commands.md +0 -3
- package/cli/docs/plugins.md +0 -47
- package/cli/package.json +0 -53
- package/cli/readme.md +0 -26
- package/cli/src/cli.ts +0 -25
- package/cli/src/commands/create:component.ts +0 -93
- package/cli/src/commands/generate:plugin.ts +0 -68
- package/cli/src/commands/generate:types.ts +0 -38
- package/cli/src/commands/girassol.ts +0 -12
- package/cli/src/extensions/cli-extension.ts +0 -17
- package/cli/src/templates/components/component.spec.ts.ejs +0 -20
- package/cli/src/templates/components/component.stories.mdx.ejs +0 -74
- package/cli/src/templates/components/component.vue.ejs +0 -23
- package/cli/src/templates/components/index.ts.ejs +0 -10
- package/cli/src/templates/components.d.ts.ejs +0 -10
- package/cli/src/templates/nuxt-plugin.ejs +0 -7
- package/cli/src/templates/vue-plugin.ejs +0 -5
- package/cli/src/types.ts +0 -1
- package/cli/tsconfig.json +0 -28
- package/cli/yarn.lock +0 -1804
package/dist/girassol.es.js
CHANGED
|
@@ -23,7 +23,7 @@ const _hoisted_1$l = ["data-testid"];
|
|
|
23
23
|
const _hoisted_2$j = { class: "icon -left" };
|
|
24
24
|
const _hoisted_3$h = { class: "icon -right" };
|
|
25
25
|
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
26
|
-
|
|
26
|
+
__name: "Button",
|
|
27
27
|
props: {
|
|
28
28
|
variant: { default: "primary" },
|
|
29
29
|
dense: { type: Boolean, default: false },
|
|
@@ -64,7 +64,7 @@ _sfc_main$d.install = (app) => {
|
|
|
64
64
|
var Input_vue_vue_type_style_index_0_lang = "";
|
|
65
65
|
const _hoisted_1$k = ["id", "data-testid", "value"];
|
|
66
66
|
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
67
|
-
|
|
67
|
+
__name: "Input",
|
|
68
68
|
props: {
|
|
69
69
|
id: null,
|
|
70
70
|
modelValue: null,
|
|
@@ -103,7 +103,7 @@ const _hoisted_3$g = { class: "container-input" };
|
|
|
103
103
|
const _hoisted_4$6 = ["id"];
|
|
104
104
|
const _hoisted_5$3 = ["id"];
|
|
105
105
|
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
106
|
-
|
|
106
|
+
__name: "Textfield",
|
|
107
107
|
props: {
|
|
108
108
|
id: null,
|
|
109
109
|
class: null,
|
|
@@ -212,7 +212,7 @@ function render$6(_ctx, _cache) {
|
|
|
212
212
|
var EyeOff = { name: "mi-eye-off", render: render$6 };
|
|
213
213
|
const _hoisted_1$g = ["aria-label"];
|
|
214
214
|
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
215
|
-
|
|
215
|
+
__name: "TextfieldPassword",
|
|
216
216
|
props: {
|
|
217
217
|
id: { default: "" },
|
|
218
218
|
label: { default: "Sua senha" }
|
|
@@ -262,7 +262,7 @@ const _hoisted_4$5 = ["id", "data-testid", "invert", "aria-invalid", "aria-descr
|
|
|
262
262
|
const _hoisted_5$2 = ["id"];
|
|
263
263
|
const _hoisted_6$2 = ["id"];
|
|
264
264
|
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
265
|
-
|
|
265
|
+
__name: "Textarea",
|
|
266
266
|
props: {
|
|
267
267
|
id: null,
|
|
268
268
|
class: null,
|
|
@@ -344,7 +344,7 @@ var Radio_vue_vue_type_style_index_0_lang = "";
|
|
|
344
344
|
const _hoisted_1$e = ["id", "data-testid", "checked", "value", "name"];
|
|
345
345
|
const _hoisted_2$e = ["for"];
|
|
346
346
|
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
347
|
-
|
|
347
|
+
__name: "Radio",
|
|
348
348
|
props: {
|
|
349
349
|
id: null,
|
|
350
350
|
name: null,
|
|
@@ -383,7 +383,7 @@ const _hoisted_2$d = ["id", "data-testid"];
|
|
|
383
383
|
const _hoisted_3$c = ["id"];
|
|
384
384
|
const _hoisted_4$4 = ["id"];
|
|
385
385
|
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
386
|
-
|
|
386
|
+
__name: "RadioGroup",
|
|
387
387
|
props: {
|
|
388
388
|
id: null,
|
|
389
389
|
title: null,
|
|
@@ -476,7 +476,7 @@ var Checkbox_vue_vue_type_style_index_0_lang = "";
|
|
|
476
476
|
const _hoisted_1$c = ["id", "data-testid", "checked", "value", "name"];
|
|
477
477
|
const _hoisted_2$c = ["for"];
|
|
478
478
|
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
479
|
-
|
|
479
|
+
__name: "Checkbox",
|
|
480
480
|
props: {
|
|
481
481
|
id: null,
|
|
482
482
|
name: null,
|
|
@@ -515,7 +515,7 @@ const _hoisted_2$b = ["id", "data-testid"];
|
|
|
515
515
|
const _hoisted_3$b = ["id"];
|
|
516
516
|
const _hoisted_4$3 = ["id"];
|
|
517
517
|
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
518
|
-
|
|
518
|
+
__name: "CheckboxGroup",
|
|
519
519
|
props: {
|
|
520
520
|
id: null,
|
|
521
521
|
title: null,
|
|
@@ -616,7 +616,7 @@ const _hoisted_2$a = { class: "switch-container" };
|
|
|
616
616
|
const _hoisted_3$a = ["id", "aria-checked", "aria-labelledby", "data-testid", "checked", "value", "name"];
|
|
617
617
|
const _hoisted_4$2 = /* @__PURE__ */ createElementVNode("span", { class: "ellipse" }, null, -1);
|
|
618
618
|
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
619
|
-
|
|
619
|
+
__name: "Switch",
|
|
620
620
|
props: {
|
|
621
621
|
id: null,
|
|
622
622
|
name: null,
|
|
@@ -753,6 +753,14 @@ const _global = typeof globalThis !== "undefined" ? globalThis : typeof window !
|
|
|
753
753
|
const globalKey = "__vueuse_ssr_handlers__";
|
|
754
754
|
_global[globalKey] = _global[globalKey] || {};
|
|
755
755
|
_global[globalKey];
|
|
756
|
+
var SwipeDirection;
|
|
757
|
+
(function(SwipeDirection2) {
|
|
758
|
+
SwipeDirection2["UP"] = "UP";
|
|
759
|
+
SwipeDirection2["RIGHT"] = "RIGHT";
|
|
760
|
+
SwipeDirection2["DOWN"] = "DOWN";
|
|
761
|
+
SwipeDirection2["LEFT"] = "LEFT";
|
|
762
|
+
SwipeDirection2["NONE"] = "NONE";
|
|
763
|
+
})(SwipeDirection || (SwipeDirection = {}));
|
|
756
764
|
const _hoisted_1$9 = {
|
|
757
765
|
preserveAspectRatio: "xMidYMid meet",
|
|
758
766
|
viewBox: "0 0 24 24",
|
|
@@ -783,7 +791,7 @@ const _hoisted_7 = {
|
|
|
783
791
|
};
|
|
784
792
|
const _hoisted_8 = /* @__PURE__ */ createTextVNode(" Sem dados ");
|
|
785
793
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
786
|
-
|
|
794
|
+
__name: "Dropdown",
|
|
787
795
|
props: {
|
|
788
796
|
id: null,
|
|
789
797
|
label: null,
|
|
@@ -1056,7 +1064,7 @@ const _hoisted_1$6 = ["id", "data-testid", "title", "aria-describedby", "aria-di
|
|
|
1056
1064
|
const _hoisted_2$6 = ["id"];
|
|
1057
1065
|
const _hoisted_3$6 = { class: "label" };
|
|
1058
1066
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
1059
|
-
|
|
1067
|
+
__name: "Chip",
|
|
1060
1068
|
props: {
|
|
1061
1069
|
id: null,
|
|
1062
1070
|
label: null,
|
|
@@ -1142,7 +1150,7 @@ const _hoisted_2$4 = {
|
|
|
1142
1150
|
};
|
|
1143
1151
|
const _hoisted_3$4 = { class: "error" };
|
|
1144
1152
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
1145
|
-
|
|
1153
|
+
__name: "Select",
|
|
1146
1154
|
props: {
|
|
1147
1155
|
id: null,
|
|
1148
1156
|
options: null,
|
|
@@ -1384,7 +1392,7 @@ const _hoisted_5 = {
|
|
|
1384
1392
|
};
|
|
1385
1393
|
const _hoisted_6 = ["data-testid"];
|
|
1386
1394
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
1387
|
-
|
|
1395
|
+
__name: "Toast",
|
|
1388
1396
|
props: {
|
|
1389
1397
|
id: null,
|
|
1390
1398
|
type: { default: DEFAULT_OPTIONS.type },
|
|
@@ -1628,7 +1636,4 @@ function install(App) {
|
|
|
1628
1636
|
App.component(component, components[component]);
|
|
1629
1637
|
}
|
|
1630
1638
|
}
|
|
1631
|
-
|
|
1632
|
-
for (const component in components)
|
|
1633
|
-
componentsNames.push(component);
|
|
1634
|
-
export { _sfc_main$d as SolButton, _sfc_main$6 as SolCheckbox, _sfc_main$5 as SolCheckboxGroup, _sfc_main$2 as SolChip, _sfc_main$3 as SolDropdown, _sfc_main$c as SolInput, _sfc_main$8 as SolRadio, _sfc_main$7 as SolRadioGroup, _sfc_main$1 as SolSelect, _sfc_main$4 as SolSwitch, _sfc_main$9 as SolTextarea, _sfc_main$b as SolTextfield, _sfc_main$a as SolTextfieldPassword, componentsNames, install, useToast };
|
|
1639
|
+
export { _sfc_main$d as SolButton, _sfc_main$6 as SolCheckbox, _sfc_main$5 as SolCheckboxGroup, _sfc_main$2 as SolChip, _sfc_main$3 as SolDropdown, _sfc_main$c as SolInput, _sfc_main$8 as SolRadio, _sfc_main$7 as SolRadioGroup, _sfc_main$1 as SolSelect, _sfc_main$4 as SolSwitch, _sfc_main$9 as SolTextarea, _sfc_main$b as SolTextfield, _sfc_main$a as SolTextfieldPassword, components, install, useToast };
|
package/dist/girassol.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(function(m,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(m=typeof globalThis!="undefined"?globalThis:m||self,e(m.girassol={},m.Vue))})(this,function(m,e){"use strict";var vt=Object.defineProperty,_t=Object.defineProperties;var el=Object.getOwnPropertyDescriptors;var ie=Object.getOwnPropertySymbols;var tl=Object.prototype.hasOwnProperty,ll=Object.prototype.propertyIsEnumerable;var re=(m,e,w)=>e in m?vt(m,e,{enumerable:!0,configurable:!0,writable:!0,value:w}):m[e]=w,P=(m,e)=>{for(var w in e||(e={}))tl.call(e,w)&&re(m,w,e[w]);if(ie)for(var w of ie(e))ll.call(e,w)&&re(m,w,e[w]);return m},X=(m,e)=>_t(m,el(e));var w="";const de=["data-testid"],ce={class:"icon -left"},se={class:"icon -right"},L=e.defineComponent({
|
|
1
|
+
(function(m,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(m=typeof globalThis!="undefined"?globalThis:m||self,e(m.girassol={},m.Vue))})(this,function(m,e){"use strict";var vt=Object.defineProperty,_t=Object.defineProperties;var el=Object.getOwnPropertyDescriptors;var ie=Object.getOwnPropertySymbols;var tl=Object.prototype.hasOwnProperty,ll=Object.prototype.propertyIsEnumerable;var re=(m,e,w)=>e in m?vt(m,e,{enumerable:!0,configurable:!0,writable:!0,value:w}):m[e]=w,P=(m,e)=>{for(var w in e||(e={}))tl.call(e,w)&&re(m,w,e[w]);if(ie)for(var w of ie(e))ll.call(e,w)&&re(m,w,e[w]);return m},X=(m,e)=>_t(m,el(e));var w="";const de=["data-testid"],ce={class:"icon -left"},se={class:"icon -right"},L=e.defineComponent({__name:"Button",props:{variant:{default:"primary"},dense:{type:Boolean,default:!1},invert:{type:Boolean,default:!1},id:null},setup(t){function n(i,r){return i?r:""}const l=e.useSlots(),a=e.computed(()=>!!(l!=null&&l.default)&&(!!(l!=null&&l["icon-right"])||!!(l!=null&&l["icon-left"]))),o=e.computed(()=>!(l!=null&&l.default)&&(!!(l!=null&&l["icon-right"])||!!(l!=null&&l["icon-left"])));return(i,r)=>(e.openBlock(),e.createElementBlock("button",{"data-testid":`button-${t.id}`,class:e.normalizeClass(["sol-button-core",`-${t.variant}
|
|
2
2
|
${n(t.dense,"-dense")} ${n(t.invert,"-invert")}
|
|
3
3
|
${n(e.unref(a),"-has-icon")}
|
|
4
4
|
${n(e.unref(o),"-only-icon")}
|
|
5
|
-
`]),type:"button"},[e.createElementVNode("div",ce,[e.renderSlot(i.$slots,"icon-left")]),e.renderSlot(i.$slots,"default"),e.createElementVNode("div",se,[e.renderSlot(i.$slots,"icon-right")])],10,de))}});L.install=t=>{t.component("SolButton",L)};var nl="";const me=["id","data-testid","value"],C=e.defineComponent({name:"Input",props:{id:null,modelValue:null,invert:{type:Boolean},error:{type:Boolean}},emits:["update:modelValue"],setup(t,{expose:n,emit:l}){function a({target:i}){l("update:modelValue",i==null?void 0:i.value)}const o=e.ref("");return n({input:o}),(i,r)=>(e.openBlock(),e.createElementBlock("input",{id:`input-${t.id}`,ref_key:"input",ref:o,"data-testid":`input-${t.id}`,value:t.modelValue,class:e.normalizeClass(["sol-input-core",{"-invert":t.invert,"-error":t.error}]),onInput:a},null,42,me))}});C.install=t=>{t.component("SolInput",C)};var ol="";const he=["id","data-testid"],ue=["for"],fe={class:"container-input"},$e=["id"],be=["id"],E=e.defineComponent({name:"Textfield",props:{id:null,class:null,modelValue:{default:""},label:{default:"label"},hint:null,invert:{type:Boolean},error:null},emits:["update:modelValue"],setup(t,{emit:n}){const l=t,a=e.computed({get:()=>l.modelValue,set:r=>{n("update:modelValue",r)}});function o(r,d){return!!r&&!d}function i(r,d){return d?`error-${l.id}`:o(r,d)?`hint-${l.id}`:null}return(r,d)=>{var c;return e.openBlock(),e.createElementBlock("div",{id:`textfield-${t.id}`,"data-testid":`textfield-${t.id}`,class:e.normalizeClass([[`${(c=r.$props.class)!=null?c:""}`,{"-invert":t.invert}],"sol-textfield-core"])},[e.renderSlot(r.$slots,"label",{},()=>[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:`input-${t.id}`,class:"label"},[e.createElementVNode("span",null,e.toDisplayString(t.label),1)],8,ue)):e.createCommentVNode("",!0)]),e.createElementVNode("div",fe,[e.renderSlot(r.$slots,"default",{},()=>[e.createVNode(C,e.mergeProps(r.$attrs,{id:t.id,modelValue:e.unref(a),"onUpdate:modelValue":d[0]||(d[0]=s=>e.isRef(a)?a.value=s:null),"data-testid":`input-${t.id}`,class:[t.error&&"-error","input"],invert:t.invert,"aria-invalid":!!t.error,"aria-describedby":i(t.hint,t.error)}),null,16,["id","modelValue","data-testid","class","invert","aria-invalid","aria-describedby"])]),e.renderSlot(r.$slots,"icon")]),o(t.hint,t.error)?(e.openBlock(),e.createElementBlock("span",{key:0,id:`hint-${t.id}`,class:"hint"},e.toDisplayString(t.hint),9,$e)):t.error?(e.openBlock(),e.createElementBlock("span",{key:1,id:`error-${t.id}`,class:"error"},e.toDisplayString(t.error),9,be)):e.createCommentVNode("",!0)],10,he)}}}),ye={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},ge=[e.createElementVNode("g",{fill:"currentColor"},[e.createElementVNode("path",{d:"M15 12a3 3 0 1 1-6 0a3 3 0 0 1 6 0z"}),e.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"})],-1)];function ke(t,n){return e.openBlock(),e.createElementBlock("svg",ye,ge)}var we={name:"mi-eye",render:ke};const Be={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Se=[e.createElementVNode("path",{fill:"currentColor",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"},null,-1)];function Ce(t,n){return e.openBlock(),e.createElementBlock("svg",Be,Se)}var pe={name:"mi-eye-off",render:Ce};const Ve=["aria-label"],I=e.defineComponent({name:"TextfieldPassword",props:{id:{default:""},label:{default:"Sua senha"}},setup(t){const n=e.ref(!1),l=e.computed(()=>n.value?"text":"password");return(a,o)=>(e.openBlock(),e.createBlock(E,{id:t.id,required:"",type:e.unref(l),label:t.label,placeholder:"Insira sua senha"},{icon:e.withCtx(()=>[e.createElementVNode("button",{type:"button","data-testid":"toggle-type-password","aria-label":n.value?"Hide password":"Show password",onClick:o[0]||(o[0]=i=>n.value=!n.value)},[e.withDirectives(e.createVNode(e.unref(we),{"aria-hidden":"true"},null,512),[[e.vShow,n.value]]),e.withDirectives(e.createVNode(e.unref(pe),{"aria-hidden":"true"},null,512),[[e.vShow,!n.value]])],8,Ve)]),_:1},8,["id","type","label"]))}});E.install=t=>{t.component("SolTextfield",E)},I.install=t=>{t.component("SolTextfieldPassword",I)};var rl="";const Ee=["id","data-testid"],Ne=["for"],xe={class:"container-textarea"},ze=["id","data-testid","invert","aria-invalid","aria-describedby"],Te=["id"],Me=["id"],A=e.defineComponent({name:"Textarea",props:{id:null,class:null,modelValue:{default:""},label:{default:"label"},hint:null,invert:{type:Boolean},resize:{default:"both"},error:null},emits:["update:modelValue"],setup(t,{emit:n}){const l=t,a=e.computed({get:()=>l.modelValue,set:r=>{n("update:modelValue",r)}});function o(r,d){return!!r&&!d}function i(r,d){return d?`error-${l.id}`:o(r,d)?`hint-${l.id}`:null}return(r,d)=>{var c;return e.openBlock(),e.createElementBlock("div",{id:`textarea-${t.id}`,"data-testid":`textarea-${t.id}`,class:e.normalizeClass([[`${(c=r.$props.class)!=null?c:""}`,{"-invert":t.invert}],"sol-textarea-core"])},[e.renderSlot(r.$slots,"label",{},()=>[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:`input-${t.id}`,class:"label"},[e.createElementVNode("span",null,e.toDisplayString(t.label),1)],8,Ne)):e.createCommentVNode("",!0)]),e.createElementVNode("div",xe,[e.renderSlot(r.$slots,"default",{},()=>[e.withDirectives(e.createElementVNode("textarea",e.mergeProps(r.$attrs,{id:`input-${t.id}`,"onUpdate:modelValue":d[0]||(d[0]=s=>e.isRef(a)?a.value=s:null),"data-testid":`input-${t.id}`,class:[t.error&&"-error","textarea"],invert:t.invert,style:{resize:t.resize},"aria-invalid":!!t.error,"aria-describedby":i(t.hint,t.error)}),null,16,ze),[[e.vModelText,e.unref(a)]])])]),o(t.hint,t.error)?(e.openBlock(),e.createElementBlock("span",{key:0,id:`hint-${t.id}`,class:"hint"},e.toDisplayString(t.hint),9,Te)):t.error?(e.openBlock(),e.createElementBlock("span",{key:1,id:`error-${t.id}`,class:"error"},e.toDisplayString(t.error),9,Me)):e.createCommentVNode("",!0)],10,Ee)}}});A.install=t=>{t.component("SolTextarea",A)};var dl="";const De=["id","data-testid","checked","value","name"],Pe=["for"],N=e.defineComponent({name:"Radio",props:{id:null,name:null,value:null,label:null,checked:null,class:null},emits:["change"],setup(t,{emit:n}){return(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["sol-radio-core",l.$props.class])},[e.createElementVNode("input",e.mergeProps(l.$attrs,{id:`radio-${t.name}-${t.id}`,type:"radio",class:"radio","data-testid":`radio-${t.name}-${t.id}`,checked:t.checked,value:t.value,name:t.name,onChange:a[0]||(a[0]=o=>n("change",t.value))}),null,16,De),e.createElementVNode("label",{class:"label",for:`radio-${t.name}-${t.id}`},e.toDisplayString(t.label),9,Pe)],2))}});var cl="";const Le=["aria-labelledby"],Ie=["id","data-testid"],Ae=["id"],Oe=["id"],O=e.defineComponent({name:"RadioGroup",props:{id:null,title:null,hideTitle:{type:Boolean,default:!1},hint:null,error:null,radios:null,modelValue:null,direction:{default:"row"}},emits:["change","update:modelValue"],setup(t,{emit:n}){const l=t;function a(d,c){return!!d&&!c}function o(d,c){return c?`error-${l.id}`:a(d,c)?`hint-${l.id}`:null}function i(d){return(l==null?void 0:l.modelValue)===d}function r(d){n("change",d.value),n("update:modelValue",d.value)}return(d,c)=>(e.openBlock(),e.createElementBlock("fieldset",{class:"sol-radio-group-core","aria-labelledby":`radio-group-title-${t.id}`},[e.renderSlot(d.$slots,"title",{id:`radio-group-title-${t.id}`},()=>[e.createElementVNode("legend",{id:`radio-group-title-${t.id}`,class:e.normalizeClass(["title",{"sr-only":t.hideTitle}]),"data-testid":`radio-group-title-${t.id}`},e.toDisplayString(t.title),11,Ie)]),e.createElementVNode("ul",{class:e.normalizeClass(["container-radios",{"flex-col":t.direction==="column"}])},[e.renderSlot(d.$slots,"default",{radios:t.radios,direction:t.direction},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.radios,(s,f)=>{var b;return e.openBlock(),e.createElementBlock("li",{key:f},[e.createVNode(N,e.mergeProps(d.$attrs,{id:(b=s==null?void 0:s.id)!=null?b:`${s.value}`,class:["radio",{"mb-micro":t.direction==="column","mr-micro":t.direction==="row"}],name:s.name,value:s.value,label:s.label,checked:i(s.value),"aria-invalid":!!t.error,"aria-describedby":o(t.hint,t.error),onChange:y=>r(s)}),null,16,["id","class","name","value","label","checked","aria-invalid","aria-describedby","onChange"])])}),128))])],2),a(t.hint,t.error)?(e.openBlock(),e.createElementBlock("p",{key:0,id:`hint-${t.id}`,class:"hint"},e.toDisplayString(t.hint),9,Ae)):t.error?(e.openBlock(),e.createElementBlock("p",{key:1,id:`error-${t.id}`,class:"error"},e.toDisplayString(t.error),9,Oe)):e.createCommentVNode("",!0)],8,Le))}});N.install=t=>{t.component("SolRadio",N)},O.install=t=>{t.component("SolRadioGroup",O)};var sl="";const Re=["id","data-testid","checked","value","name"],He=["for"],x=e.defineComponent({name:"Checkbox",props:{id:null,name:null,value:null,label:null,checked:null,class:null},emits:["change"],setup(t,{emit:n}){return(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["sol-checkbox-core",l.$props.class])},[e.createElementVNode("input",e.mergeProps(l.$attrs,{id:`checkbox-${t.name}-${t.id}`,type:"checkbox",class:"checkbox","data-testid":`checkbox-${t.name}-${t.id}`,checked:t.checked,value:t.value,name:t.name,onChange:a[0]||(a[0]=o=>n("change",t.value))}),null,16,Re),e.createElementVNode("label",{class:"label",for:`checkbox-${t.name}-${t.id}`},e.toDisplayString(t.label),9,He)],2))}});var ml="";const Fe=["aria-labelledby"],Ge=["id","data-testid"],Ke=["id"],Ue=["id"],R=e.defineComponent({name:"CheckboxGroup",props:{id:null,title:null,hideTitle:{type:Boolean,default:!1},hint:null,error:null,checkboxes:null,modelValue:null,direction:{default:"row"}},emits:["change","update:modelValue"],setup(t,{emit:n}){const l=t;function a(c,s){return!!c&&!s}function o(c,s){return s?`error-${l.id}`:a(c,s)?`hint-${l.id}`:null}function i(c){var s;return(s=l==null?void 0:l.modelValue)==null?void 0:s.includes(c)}function r(c){return Array.isArray(l==null?void 0:l.modelValue)?[...l.modelValue,c]:[c]}function d(c){var f;n("change",c.value);const s=i(c.value)?(f=l.modelValue)==null?void 0:f.filter(b=>b!==c.value):r(c.value);n("update:modelValue",s)}return(c,s)=>(e.openBlock(),e.createElementBlock("fieldset",{class:"sol-checkbox-group-core","aria-labelledby":`checkbox-group-title-${t.id}`},[e.renderSlot(c.$slots,"title",{id:`checkbox-group-title-${t.id}`},()=>[e.createElementVNode("legend",{id:`checkbox-group-title-${t.id}`,class:e.normalizeClass(["title",{"sr-only":t.hideTitle}]),"data-testid":`checkbox-group-title-${t.id}`},e.toDisplayString(t.title),11,Ge)]),e.createElementVNode("ul",{class:e.normalizeClass(["container-checkboxes",{"flex-col":t.direction==="column"}])},[e.renderSlot(c.$slots,"default",{checkboxes:t.checkboxes,direction:t.direction},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.checkboxes,(f,b)=>{var y;return e.openBlock(),e.createElementBlock("li",{key:b},[e.createVNode(x,e.mergeProps(c.$attrs,{id:(y=f==null?void 0:f.id)!=null?y:`${f.value}`,class:["checkbox",{"mb-micro":t.direction==="column","mr-micro":t.direction==="row"}],label:f.label,name:f.name,value:f.value,checked:i(f.value),"aria-invalid":!!t.error,"aria-describedby":o(t.hint,t.error),onChange:B=>d(f)}),null,16,["id","class","label","name","value","checked","aria-invalid","aria-describedby","onChange"])])}),128))])],2),a(t.hint,t.error)?(e.openBlock(),e.createElementBlock("p",{key:0,id:`hint-${t.id}`,class:"hint"},e.toDisplayString(t.hint),9,Ke)):t.error?(e.openBlock(),e.createElementBlock("p",{key:1,id:`error-${t.id}`,class:"error"},e.toDisplayString(t.error),9,Ue)):e.createCommentVNode("",!0)],8,Fe))}});x.install=t=>{t.component("SolCheckbox",x)},R.install=t=>{t.component("SolCheckboxGroup",R)};var hl="";const Ye=["id","for","data-testid"],We={class:"switch-container"},je=["id","aria-checked","aria-labelledby","data-testid","checked","value","name"],qe=e.createElementVNode("span",{class:"ellipse"},null,-1),H=e.defineComponent({name:"Switch",props:{id:null,name:null,value:null,label:null,checked:{type:Boolean},class:null,hideLabel:{type:Boolean},horizontalLabel:{type:Boolean}},emits:["change"],setup(t,{emit:n}){return(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["sol-switch-core",[l.$props.class,{"-horizontal":t.horizontalLabel}]])},[e.createElementVNode("label",{id:`switch-label-${t.name}-${t.id}`,class:e.normalizeClass(["label",{"mb-1":!t.horizontalLabel,"sr-only":t.hideLabel}]),for:`switch-${t.name}-${t.id}`,"data-testid":`switch-label-${t.name}-${t.id}`},e.toDisplayString(t.label),11,Ye),e.createElementVNode("div",We,[e.createElementVNode("input",e.mergeProps(l.$attrs,{id:`switch-${t.name}-${t.id}`,type:"checkbox",class:"switch",role:"switch","aria-checked":t.checked,"aria-labelledby":`switch-label-${t.name}-${t.id}`,"data-testid":`switch-${t.name}-${t.id}`,checked:t.checked,value:t.value,name:t.name,onChange:a[0]||(a[0]=o=>n("change",t.value))}),null,16,je),qe])],2))}});H.install=t=>{t.component("SolSwitch",H)};function Je(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}var Z;const z=typeof window!="undefined",Qe=t=>typeof t=="string",Y=()=>{};z&&((Z=window==null?void 0:window.navigator)==null?void 0:Z.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function F(t){var n;const l=e.unref(t);return(n=l==null?void 0:l.$el)!=null?n:l}const v=z?window:void 0;z&&window.document,z&&window.navigator,z&&window.location;function W(...t){let n,l,a,o;if(Qe(t[0])?([l,a,o]=t,n=v):[n,l,a,o]=t,!n)return Y;let i=Y;const r=e.watch(()=>F(n),c=>{i(),c&&(c.addEventListener(l,a,o),i=()=>{c.removeEventListener(l,a,o),i=Y})},{immediate:!0,flush:"post"}),d=()=>{r(),i()};return Je(d),d}function Xe(t,n,l={}){const{window:a=v,ignore:o,capture:i=!0}=l;if(!a)return;const r=e.ref(!0);let d;const c=b=>{a.clearTimeout(d);const y=F(t),B=b.composedPath();!y||y===b.target||B.includes(y)||!r.value||o&&o.length>0&&o.some(S=>{const g=F(S);return g&&(b.target===g||B.includes(g))})||n(b)},s=[W(a,"click",c,{passive:!0,capture:i}),W(a,"pointerdown",b=>{const y=F(t);r.value=!!y&&!b.composedPath().includes(y)},{passive:!0}),W(a,"pointerup",b=>{d=a.setTimeout(()=>c(b),50)},{passive:!0})];return()=>s.forEach(b=>b())}const j=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},q="__vueuse_ssr_handlers__";j[q]=j[q]||{},j[q];const Ze={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},ve=[e.createElementVNode("path",{fill:"currentColor",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"},null,-1)];function _e(t,n){return e.openBlock(),e.createElementBlock("svg",Ze,ve)}var et={name:"mi-search",render:_e},fl="";const tt=["data-testid"],lt=["id","for"],nt=["id","disabled","data-testid","aria-expanded","aria-labelledby","aria-label","aria-controls","onClick"],ot={class:"dropdown-container"},at=["id","data-testid","aria-multiselectable","aria-labelledby"],it=["id","data-testid","selected","aria-selected","onClick","onKeyup"],rt={key:0,class:"no-data"},dt=e.createTextVNode(" Sem dados "),T=e.defineComponent({name:"Dropdown",props:{id:null,label:null,ariaLabel:null,smallerWidth:{type:Boolean},disabled:{type:Boolean},loading:{type:Boolean,default:!1},searchable:{type:Boolean,default:!1},closeOnSelect:{type:Boolean,default:!0},fetchOnSearch:{type:Boolean,default:!1},isMultipleSelect:{type:Boolean},searchPlaceholder:null,selected:null,options:{default:()=>[]}},emits:["closeDropdown","search","update:selected"],setup(t,{emit:n}){const l=t,a=e.ref(),o=e.ref(!1),i=e.ref(""),r=e.computed(()=>{var h;return l.fetchOnSearch?l.options:(h=l.options)==null?void 0:h.filter(u=>typeof u=="string"?u.includes(i.value):u.name.includes(i.value))}),d=e.computed(()=>Array.isArray(l.selected)?l.selected.join(", ").trim():l.selected);Xe(a,()=>{o.value&&f()});function c(){l.disabled||(o.value?f():s())}function s(){o.value=!0}function f(){Zt(),n("closeDropdown")}function b(h){const u=new Set(l.selected);return u.has(h)?u.delete(h):u.add(h),[...u]}function y(h){const u=typeof h=="string"?h:h.value,$=l.isMultipleSelect?b(u):u;n("update:selected",$),l.closeOnSelect&&!l.isMultipleSelect&&f()}function B(h){return Array.isArray(l.selected)?typeof h=="string"?l.selected.includes(h):l.selected.includes(h.value):typeof h=="string"?h===l.selected:h.value===l.selected}const S=e.reactive({list:void 0,search:void 0}),g=e.reactive({id:"",index:0});function Xt({code:h}){const u=k=>{const U=k!=null?k:g.index;k!==void 0&&(g.index=k),setTimeout(()=>{var oe,ae;const V=(oe=S.list)==null?void 0:oe.children[U];g.id=(ae=V==null?void 0:V.id)!=null?ae:"",V==null||V.focus()},0)},$=()=>{var k;l.searchable&&(g.index=0,(k=S==null?void 0:S.search)==null||k.focus())};switch(h){case"ArrowUp":return g.index>0&&(g.index-=1),u();case"ArrowDown":return o.value?(g.index<r.value.length-1&&(g.index+=1),u()):(s(),u(0));case"Home":return u(0);case"End":return u(l.options.length-1);case"Escape":return f();default:!["Enter","NumpadEnter","Space"].includes(h)&&$()}}function Zt(){o.value=!1,g.index=0,i.value=""}function K(h,u){return typeof h=="string"?h:h[u!=null?u:"value"]}function ne(h,u){S[h]=u!=null?u:void 0}return(h,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"el",ref:a,class:e.normalizeClass(["sol-dropdown-core",{"-smaller":t.smallerWidth}]),"data-testid":`dropdown-${t.id}`,onKeydownPassive:Xt},[e.renderSlot(h.$slots,"label",{},()=>[e.createElementVNode("label",{id:`label-dropdown-${t.id}`,class:e.normalizeClass(["label",{"-disabled":t.disabled,"sr-only":t.ariaLabel}]),for:`toggle-dropdown-${t.id}`},e.toDisplayString(t.label||t.ariaLabel),11,lt)]),e.createElementVNode("button",{id:`toggle-dropdown-${t.id}`,disabled:t.disabled,"data-testid":`toggle-dropdown-${t.id}`,class:"button-toggle-dropdown toggle-dropdown","aria-haspopup":"listbox","aria-expanded":o.value,"aria-labelledby":`label-dropdown-${t.id}`,"aria-label":t.ariaLabel,"aria-controls":`dropdown-list-${t.id}`,onClick:e.withModifiers(c,["stop"])},[e.renderSlot(h.$slots,"toggle-dropdown",{toggle:{open:s,close:f,toggleDropdown:c},isOpen:o.value,select:y,selectedSanitized:e.unref(d),selected:t.selected},()=>[e.createTextVNode(e.toDisplayString(e.unref(d)||"Selecione"),1)])],8,nt),e.createVNode(e.Transition,{mode:"out-in",name:"dropdown"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",ot,[t.searchable?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["search-container",{"-loading":t.loading}])},[e.renderSlot(h.$slots,"search",{filter:i.value},()=>[e.createVNode(C,{id:`search-dropdown-${t.id}`,ref:$=>ne("search",$==null?void 0:$.input),modelValue:i.value,"onUpdate:modelValue":u[0]||(u[0]=$=>i.value=$),"data-testid":`search-dropdown-${t.id}`,role:"combobox",class:"search","aria-autocomplete":"list",placeholder:t.searchPlaceholder,"aria-expanded":o.value,"aria-haspopup":"listbox","aria-owns":`dropdown-list-${t.id}`,"aria-controls":`dropdown-list-${t.id}`,"aria-activedescendant":g.id,"aria-labelledby":`label-dropdown-${t.id}`,onClick:u[1]||(u[1]=e.withModifiers(()=>{},["stop"])),onInput:u[2]||(u[2]=$=>{var k;return n("search",(k=$.target)==null?void 0:k.value)})},null,8,["id","modelValue","data-testid","placeholder","aria-expanded","aria-owns","aria-controls","aria-activedescendant","aria-labelledby"]),e.createVNode(e.unref(et),{"aria-hidden":"true",class:"icon"})])],2)):e.createCommentVNode("",!0),e.createElementVNode("ul",{id:`dropdown-list-${t.id}`,ref:$=>ne("list",$),"data-testid":`dropdown-list-${t.id}`,role:"listbox",tabindex:"-1","aria-multiselectable":t.isMultipleSelect,"aria-labelledby":`label-dropdown-${t.id}`,class:"dropdown-list-core"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),($,k)=>(e.openBlock(),e.createElementBlock("li",{id:`option-${t.id}-${K($,"value")}`,key:k,"data-testid":`option-${t.id}-${K($,"value")}`,role:"option",tabindex:"-1",class:"dropdown-item",style:e.normalizeStyle(`--item: ${k+1}`),selected:B($),"aria-selected":B($),onClick:U=>y($),onKeyup:[e.withKeys(U=>y($),["enter"]),e.withKeys(U=>y($),["space"])]},[e.renderSlot(h.$slots,"default",{text:K($,"name"),option:$,isSelect:B},()=>[e.createTextVNode(e.toDisplayString(K($,"name")),1)])],44,it))),128)),e.unref(r).length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",rt,[e.renderSlot(h.$slots,"no-data",{},()=>[dt])]))],8,at)],512),[[e.vShow,o.value]])]),_:3})],42,tt))}});T.install=t=>{t.component("SolDropdown",T)};const ct={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},st=[e.createElementVNode("path",{fill:"currentColor",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"},null,-1)];function mt(t,n){return e.openBlock(),e.createElementBlock("svg",ct,st)}var _={name:"mi-close",render:mt},bl="";const ht=["id","data-testid","title","aria-describedby","aria-disabled","onKeydown"],ut=["id"],ft={class:"label"},M=e.defineComponent({name:"Chip",props:{id:null,label:null,selected:{type:Boolean},disabled:{type:Boolean},removable:{type:Boolean,default:!0}},emits:["close","update:selected"],setup(t,{emit:n}){const l=t;function a({code:o}){if(!l.disabled)switch(o){case"Enter":case"NumpadEnter":case"Space":return n("update:selected");case"Delete":case"Backspace":return l.removable&&n("close");default:return!1}}return(o,i)=>(e.openBlock(),e.createElementBlock("div",{id:`chip-${t.id}`,"data-testid":`chip-${t.id}`,class:e.normalizeClass(["sol-chip-core",{"-selected":t.selected,"-disabled":t.disabled}]),tabindex:"0",title:t.label,"aria-describedby":`chip-description-${t.id}`,"aria-disabled":t.disabled,onClick:i[1]||(i[1]=r=>n("update:selected")),onKeydown:e.withModifiers(a,["self"])},[e.createElementVNode("span",{id:`chip-description-${t.id}`,"z-index":"-1",class:"sr-only"},"Press Delete or Backspace to remove this Chip",8,ut),e.createElementVNode("span",ft,[e.renderSlot(o.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)])]),t.removable?(e.openBlock(),e.createElementBlock("i",{key:0,role:"presentation","aira-hidden":"true",class:"close",onClick:i[0]||(i[0]=e.withModifiers(r=>n("close"),["stop"]))},[e.createVNode(e.unref(_),{class:"icon"})])):e.createCommentVNode("",!0)],42,ht))}}),$t={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},bt=[e.createElementVNode("path",{fill:"currentColor",d:"m17 10l-5 6l-5-6h10z"},null,-1)];function yt(t,n){return e.openBlock(),e.createElementBlock("svg",$t,bt)}var gt={name:"mi-caret-down",render:yt},gl="";const kt={class:"select"},wt={key:2,class:"placeholder-inline"},Bt={class:"error"},G=e.defineComponent({name:"Select",props:{id:null,options:null,label:null,ariaLabel:null,smallerWidth:{type:Boolean},disabled:{type:Boolean},multiple:{type:Boolean},modelValue:null,error:null,fetchOnApi:{type:Boolean},placeholder:{default:"Selecione"},searchPlaceholder:null,searchable:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:n}){return(l,a)=>(e.openBlock(),e.createBlock(T,{id:`select-${t.id}`,selected:t.modelValue,label:t.label,"aria-label":t.ariaLabel,"smaller-width":t.smallerWidth,disabled:t.disabled,"fetch-on-search":t.fetchOnApi,"is-multiple-select":t.multiple,class:"sol-select-core","search-placeholder":t.searchPlaceholder,searchable:t.searchable,options:t.options,"onUpdate:selected":a[0]||(a[0]=o=>n("update:modelValue",o))},{"toggle-dropdown":e.withCtx(({selected:o,isOpen:i,select:r})=>[e.createElementVNode("div",{class:e.normalizeClass(["select-container",{"-disabled":t.disabled,"-error":t.error}])},[e.createElementVNode("div",kt,[t.multiple&&(o==null?void 0:o.length)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(o,(d,c)=>(e.openBlock(),e.createBlock(M,{id:d,key:c,label:d,onClick:e.withModifiers(s=>r(d),["stop"]),onClose:s=>r(d)},null,8,["id","label","onClick","onClose"]))),128)):o!=null&&o.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(o),1)],64)):(e.openBlock(),e.createElementBlock("span",wt,e.toDisplayString(t.placeholder),1))]),e.createVNode(e.unref(gt),{class:e.normalizeClass(["icon",{"-open":i}])},null,8,["class"])],2),e.createElementVNode("span",Bt,e.toDisplayString(t.error),1)]),_:1},8,["id","selected","label","aria-label","smaller-width","disabled","fetch-on-search","is-multiple-select","search-placeholder","searchable","options"]))}});G.install=t=>{t.component("SolSelect",G)},M.install=t=>{t.component("SolChip",M)};var kl="",wl="",Bl="",Sl="";const ee=12,p={type:"success",timeout:5e3,showIcon:!0,showCloseButton:!0,position:"top-right",hideProgressBar:!1};function St(t,n){const l=e.reactive({id:null,intervalId:null,startTime:0,remaining:n}),a=e.ref(100);function o(){clearInterval(l.intervalId),clearTimeout(l.id),l.remaining-=Date.now()-l.startTime}function i(){l.startTime=Date.now(),clearTimeout(l.id),l.intervalId=setInterval(()=>{a.value--},n/100-5),l.id=setTimeout(t,l.remaining)}function r(){clearInterval(l.intervalId),clearTimeout(l.id),a.value=100}return e.onMounted(()=>{if(n<=0)return!1}),e.onUnmounted(()=>{r()}),{start:i,stop:o,clear:r,progress:a}}function Ct(t){return{stylePosition:e.computed(()=>{const{position:l,offset:a}=t();switch(l){case"top-left":return{left:"0",top:`${a}px`};case"bottom-left":return{left:"0",bottom:`${a}px`};case"bottom-right":return{right:"0",bottom:`${a}px`};case"top-center":return{top:`${a}px`,left:"0",right:"0",marginRight:"auto",marginLeft:"auto"};case"bottom-center":return{bottom:`${a}px`,left:"0",right:"0",marginRight:"auto",marginLeft:"auto"};default:return{right:"0",top:`${a}px`}}})}}var te=(t=>(t["top-left"]="bounce-left",t["top-right"]="bounce-right",t["top-center"]="bounce-down",t["bottom-left"]="bounce-left",t["bottom-center"]="bounce-up",t["bottom-right"]="bounce-right",t))(te||{});const pt={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Vt=[e.createElementVNode("path",{fill:"currentColor",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"},null,-1)];function Et(t,n){return e.openBlock(),e.createElementBlock("svg",pt,Vt)}var Nt={name:"mi-circle-check",render:Et};const xt={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},zt=[e.createElementVNode("path",{fill:"currentColor",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"},null,-1)];function Tt(t,n){return e.openBlock(),e.createElementBlock("svg",xt,zt)}var Mt={name:"mi-circle-error",render:Tt};const Dt={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Pt=[e.createElementVNode("g",{fill:"currentColor"},[e.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"}),e.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"})],-1)];function Lt(t,n){return e.openBlock(),e.createElementBlock("svg",Dt,Pt)}var It={name:"mi-circle-warning",render:Lt},El="";const At=["id","data-testid"],Ot={class:"content-wrapper"},Rt={key:0,class:"icon-container","aria-hidden":"true"},Ht={class:"content"},Ft={key:0,class:"description"},Gt=["data-testid"],Kt=e.defineComponent({name:"Toast",props:{id:null,type:{default:p.type},visible:{type:Boolean,default:!1},title:null,description:null,timeout:null,hideProgressBar:{type:Boolean,default:p.hideProgressBar},showIcon:{type:Boolean,default:p.showIcon},offset:{default:0},onClose:null,onCloseHandler:null,position:{default:p.position}},setup(t){const n=t,{start:l,stop:a,progress:o}=St(()=>{var s;(s=n.onCloseHandler)==null||s.call(n)},n.timeout),{stylePosition:i}=Ct(()=>({offset:n.offset,position:n.position})),r=e.computed(()=>n.title&&n.description);function d(){n.timeout>0&&a()}function c(){l()}return e.onMounted(()=>{l()}),(s,f)=>(e.openBlock(),e.createBlock(e.Transition,{name:e.unref(te)[t.position],type:"animation"},{default:e.withCtx(()=>[t.visible?(e.openBlock(),e.createElementBlock("div",{key:0,id:`toast-${t.type}-${t.id}`,role:"status","data-testid":`toast-${t.type}-${t.id}`,style:e.normalizeStyle(e.unref(i)),class:e.normalizeClass(["sol-toast-core",[`-${t.type}`,{"-multiline":e.unref(r)}]]),onKeyup:f[1]||(f[1]=e.withKeys((...b)=>t.onCloseHandler&&t.onCloseHandler(...b),["esc"])),onMouseenter:d,onMouseleave:c,onFocusin:d,onFocusout:c},[e.createElementVNode("section",Ot,[t.showIcon?(e.openBlock(),e.createElementBlock("div",Rt,[e.renderSlot(s.$slots,"icon-status",{type:t.type},()=>[t.type==="success"?(e.openBlock(),e.createBlock(e.unref(Nt),{key:0,class:"icon"})):e.createCommentVNode("",!0),t.type==="info"?(e.openBlock(),e.createBlock(e.unref(It),{key:1,class:"icon"})):e.createCommentVNode("",!0),t.type==="danger"?(e.openBlock(),e.createBlock(e.unref(Mt),{key:2,class:"icon"})):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),e.createElementVNode("div",Ht,[e.createElementVNode("p",{class:e.normalizeClass(["title",{"-multiline":e.unref(r)}])},[e.renderSlot(s.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)])],2),t.description?(e.openBlock(),e.createElementBlock("p",Ft,[e.renderSlot(s.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(t.description),1)])])):e.createCommentVNode("",!0)])]),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["close",{"-multiline":e.unref(r)}]),"data-testid":`toast-close-button-${t.type}-${t.id}`,"aria-label":"close notification",onClick:f[0]||(f[0]=(...b)=>t.onCloseHandler&&t.onCloseHandler(...b))},[e.createVNode(e.unref(_),{class:"icon"})],10,Gt),t.hideProgressBar?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"progressbar","aria-hidden":"true",style:e.normalizeStyle({width:`${e.unref(o)}%`})},null,4))],46,At)):e.createCommentVNode("",!0)]),_:3},8,["name"]))}}),D={"top-left":[],"top-right":[],"top-center":[],"bottom-left":[],"bottom-right":[],"bottom-center":[]};function Ut(){let t=0;function n(){Object.entries(D).forEach(([a,o])=>{o.length&&o.forEach(i=>{var d;const r=(d=i.toastVNode.props)==null?void 0:d.id;J(r,a)})})}return{createToast:(a,o)=>{const i=t++,r=o?Yt(o):p;return o!=null&&o.showOneToast&&n(),Wt(i,r,typeof a=="string"?{title:a}:a),{close:()=>J(i,r.position)}},clearAllToasts:n}}function Yt(t){const n=X(P(P({},p),t),{showIcon:t.showIcon});return n.hideProgressBar=!!(n.timeout&&(n==null?void 0:n.timeout)<=0),t.hideProgressBar&&(n.hideProgressBar=t.hideProgressBar),n}function Wt(t,n,l){setTimeout(()=>{const a=qt(n,D,ee),o=document.createElement("div");document.body.appendChild(o);const i=e.createVNode(Kt,jt(n,t,a,J,l));e.render(i,o),D[n.position].push({toastVNode:i,container:o}),i.component&&(i.component.props.visible=!0)},1)}function jt(t,n,l,a,o){return X(P(P({},t),o),{id:n,offset:l,visible:!1,onCloseHandler(){a(n,t.position?t.position:"top-right")}})}function qt(t,n,l){if(!t.position)throw new Error("no position");return n[t.position].reduce((a,{toastVNode:o})=>(a+=o.el.offsetHeight+l||0,a),l)}function Jt(t,n,l,a){for(let o=t;o<n.length;o++){const{toastVNode:i}=n[o];if(!i.el)return;const r=l.split("-")[0]||"top",d=parseInt(i.el.style[r],10)-a-ee;if(!i.component)return;i.component.props.offset=d}}function J(t,n){var c;const l=D[n],a=l.findIndex(({toastVNode:s})=>{var f;return t===((f=s==null?void 0:s.props)==null?void 0:f.id)});if(a===-1)return;const{container:o,toastVNode:i}=l[a],r=(c=i==null?void 0:i.el)==null?void 0:c.offsetHeight;if(D[n].splice(a,1),Jt(a,l,n,r),!i.component)return;const d=i.component.props;d.visible=!1,d.onClose&&d.onClose(),setTimeout(()=>{e.render(null,o),document.body.removeChild(o)},1e3)}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");const Q={SolButton:L,SolInput:C,SolTextarea:A,SolTextfield:E,SolTextfieldPassword:I,SolRadio:N,SolRadioGroup:O,SolCheckbox:x,SolCheckboxGroup:R,SolSwitch:H,SolDropdown:T,SolSelect:G,SolChip:M};function Qt(t){for(const n in Q)t.component(n,Q[n])}const le=[];for(const t in Q)le.push(t);m.SolButton=L,m.SolCheckbox=x,m.SolCheckboxGroup=R,m.SolChip=M,m.SolDropdown=T,m.SolInput=C,m.SolRadio=N,m.SolRadioGroup=O,m.SolSelect=G,m.SolSwitch=H,m.SolTextarea=A,m.SolTextfield=E,m.SolTextfieldPassword=I,m.componentsNames=le,m.install=Qt,m.useToast=Ut,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
5
|
+
`]),type:"button"},[e.createElementVNode("div",ce,[e.renderSlot(i.$slots,"icon-left")]),e.renderSlot(i.$slots,"default"),e.createElementVNode("div",se,[e.renderSlot(i.$slots,"icon-right")])],10,de))}});L.install=t=>{t.component("SolButton",L)};var nl="";const me=["id","data-testid","value"],C=e.defineComponent({__name:"Input",props:{id:null,modelValue:null,invert:{type:Boolean},error:{type:Boolean}},emits:["update:modelValue"],setup(t,{expose:n,emit:l}){function a({target:i}){l("update:modelValue",i==null?void 0:i.value)}const o=e.ref("");return n({input:o}),(i,r)=>(e.openBlock(),e.createElementBlock("input",{id:`input-${t.id}`,ref_key:"input",ref:o,"data-testid":`input-${t.id}`,value:t.modelValue,class:e.normalizeClass(["sol-input-core",{"-invert":t.invert,"-error":t.error}]),onInput:a},null,42,me))}});C.install=t=>{t.component("SolInput",C)};var ol="";const he=["id","data-testid"],ue=["for"],fe={class:"container-input"},$e=["id"],be=["id"],E=e.defineComponent({__name:"Textfield",props:{id:null,class:null,modelValue:{default:""},label:{default:"label"},hint:null,invert:{type:Boolean},error:null},emits:["update:modelValue"],setup(t,{emit:n}){const l=t,a=e.computed({get:()=>l.modelValue,set:r=>{n("update:modelValue",r)}});function o(r,d){return!!r&&!d}function i(r,d){return d?`error-${l.id}`:o(r,d)?`hint-${l.id}`:null}return(r,d)=>{var c;return e.openBlock(),e.createElementBlock("div",{id:`textfield-${t.id}`,"data-testid":`textfield-${t.id}`,class:e.normalizeClass([[`${(c=r.$props.class)!=null?c:""}`,{"-invert":t.invert}],"sol-textfield-core"])},[e.renderSlot(r.$slots,"label",{},()=>[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:`input-${t.id}`,class:"label"},[e.createElementVNode("span",null,e.toDisplayString(t.label),1)],8,ue)):e.createCommentVNode("",!0)]),e.createElementVNode("div",fe,[e.renderSlot(r.$slots,"default",{},()=>[e.createVNode(C,e.mergeProps(r.$attrs,{id:t.id,modelValue:e.unref(a),"onUpdate:modelValue":d[0]||(d[0]=s=>e.isRef(a)?a.value=s:null),"data-testid":`input-${t.id}`,class:[t.error&&"-error","input"],invert:t.invert,"aria-invalid":!!t.error,"aria-describedby":i(t.hint,t.error)}),null,16,["id","modelValue","data-testid","class","invert","aria-invalid","aria-describedby"])]),e.renderSlot(r.$slots,"icon")]),o(t.hint,t.error)?(e.openBlock(),e.createElementBlock("span",{key:0,id:`hint-${t.id}`,class:"hint"},e.toDisplayString(t.hint),9,$e)):t.error?(e.openBlock(),e.createElementBlock("span",{key:1,id:`error-${t.id}`,class:"error"},e.toDisplayString(t.error),9,be)):e.createCommentVNode("",!0)],10,he)}}}),ye={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},ge=[e.createElementVNode("g",{fill:"currentColor"},[e.createElementVNode("path",{d:"M15 12a3 3 0 1 1-6 0a3 3 0 0 1 6 0z"}),e.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"})],-1)];function ke(t,n){return e.openBlock(),e.createElementBlock("svg",ye,ge)}var we={name:"mi-eye",render:ke};const Be={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Se=[e.createElementVNode("path",{fill:"currentColor",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"},null,-1)];function Ce(t,n){return e.openBlock(),e.createElementBlock("svg",Be,Se)}var Ve={name:"mi-eye-off",render:Ce};const pe=["aria-label"],I=e.defineComponent({__name:"TextfieldPassword",props:{id:{default:""},label:{default:"Sua senha"}},setup(t){const n=e.ref(!1),l=e.computed(()=>n.value?"text":"password");return(a,o)=>(e.openBlock(),e.createBlock(E,{id:t.id,required:"",type:e.unref(l),label:t.label,placeholder:"Insira sua senha"},{icon:e.withCtx(()=>[e.createElementVNode("button",{type:"button","data-testid":"toggle-type-password","aria-label":n.value?"Hide password":"Show password",onClick:o[0]||(o[0]=i=>n.value=!n.value)},[e.withDirectives(e.createVNode(e.unref(we),{"aria-hidden":"true"},null,512),[[e.vShow,n.value]]),e.withDirectives(e.createVNode(e.unref(Ve),{"aria-hidden":"true"},null,512),[[e.vShow,!n.value]])],8,pe)]),_:1},8,["id","type","label"]))}});E.install=t=>{t.component("SolTextfield",E)},I.install=t=>{t.component("SolTextfieldPassword",I)};var rl="";const Ee=["id","data-testid"],Ne=["for"],xe={class:"container-textarea"},Te=["id","data-testid","invert","aria-invalid","aria-describedby"],ze=["id"],Me=["id"],O=e.defineComponent({__name:"Textarea",props:{id:null,class:null,modelValue:{default:""},label:{default:"label"},hint:null,invert:{type:Boolean},resize:{default:"both"},error:null},emits:["update:modelValue"],setup(t,{emit:n}){const l=t,a=e.computed({get:()=>l.modelValue,set:r=>{n("update:modelValue",r)}});function o(r,d){return!!r&&!d}function i(r,d){return d?`error-${l.id}`:o(r,d)?`hint-${l.id}`:null}return(r,d)=>{var c;return e.openBlock(),e.createElementBlock("div",{id:`textarea-${t.id}`,"data-testid":`textarea-${t.id}`,class:e.normalizeClass([[`${(c=r.$props.class)!=null?c:""}`,{"-invert":t.invert}],"sol-textarea-core"])},[e.renderSlot(r.$slots,"label",{},()=>[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:`input-${t.id}`,class:"label"},[e.createElementVNode("span",null,e.toDisplayString(t.label),1)],8,Ne)):e.createCommentVNode("",!0)]),e.createElementVNode("div",xe,[e.renderSlot(r.$slots,"default",{},()=>[e.withDirectives(e.createElementVNode("textarea",e.mergeProps(r.$attrs,{id:`input-${t.id}`,"onUpdate:modelValue":d[0]||(d[0]=s=>e.isRef(a)?a.value=s:null),"data-testid":`input-${t.id}`,class:[t.error&&"-error","textarea"],invert:t.invert,style:{resize:t.resize},"aria-invalid":!!t.error,"aria-describedby":i(t.hint,t.error)}),null,16,Te),[[e.vModelText,e.unref(a)]])])]),o(t.hint,t.error)?(e.openBlock(),e.createElementBlock("span",{key:0,id:`hint-${t.id}`,class:"hint"},e.toDisplayString(t.hint),9,ze)):t.error?(e.openBlock(),e.createElementBlock("span",{key:1,id:`error-${t.id}`,class:"error"},e.toDisplayString(t.error),9,Me)):e.createCommentVNode("",!0)],10,Ee)}}});O.install=t=>{t.component("SolTextarea",O)};var dl="";const De=["id","data-testid","checked","value","name"],Pe=["for"],N=e.defineComponent({__name:"Radio",props:{id:null,name:null,value:null,label:null,checked:null,class:null},emits:["change"],setup(t,{emit:n}){return(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["sol-radio-core",l.$props.class])},[e.createElementVNode("input",e.mergeProps(l.$attrs,{id:`radio-${t.name}-${t.id}`,type:"radio",class:"radio","data-testid":`radio-${t.name}-${t.id}`,checked:t.checked,value:t.value,name:t.name,onChange:a[0]||(a[0]=o=>n("change",t.value))}),null,16,De),e.createElementVNode("label",{class:"label",for:`radio-${t.name}-${t.id}`},e.toDisplayString(t.label),9,Pe)],2))}});var cl="";const Le=["aria-labelledby"],Ie=["id","data-testid"],Oe=["id"],Ae=["id"],A=e.defineComponent({__name:"RadioGroup",props:{id:null,title:null,hideTitle:{type:Boolean,default:!1},hint:null,error:null,radios:null,modelValue:null,direction:{default:"row"}},emits:["change","update:modelValue"],setup(t,{emit:n}){const l=t;function a(d,c){return!!d&&!c}function o(d,c){return c?`error-${l.id}`:a(d,c)?`hint-${l.id}`:null}function i(d){return(l==null?void 0:l.modelValue)===d}function r(d){n("change",d.value),n("update:modelValue",d.value)}return(d,c)=>(e.openBlock(),e.createElementBlock("fieldset",{class:"sol-radio-group-core","aria-labelledby":`radio-group-title-${t.id}`},[e.renderSlot(d.$slots,"title",{id:`radio-group-title-${t.id}`},()=>[e.createElementVNode("legend",{id:`radio-group-title-${t.id}`,class:e.normalizeClass(["title",{"sr-only":t.hideTitle}]),"data-testid":`radio-group-title-${t.id}`},e.toDisplayString(t.title),11,Ie)]),e.createElementVNode("ul",{class:e.normalizeClass(["container-radios",{"flex-col":t.direction==="column"}])},[e.renderSlot(d.$slots,"default",{radios:t.radios,direction:t.direction},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.radios,(s,f)=>{var b;return e.openBlock(),e.createElementBlock("li",{key:f},[e.createVNode(N,e.mergeProps(d.$attrs,{id:(b=s==null?void 0:s.id)!=null?b:`${s.value}`,class:["radio",{"mb-micro":t.direction==="column","mr-micro":t.direction==="row"}],name:s.name,value:s.value,label:s.label,checked:i(s.value),"aria-invalid":!!t.error,"aria-describedby":o(t.hint,t.error),onChange:y=>r(s)}),null,16,["id","class","name","value","label","checked","aria-invalid","aria-describedby","onChange"])])}),128))])],2),a(t.hint,t.error)?(e.openBlock(),e.createElementBlock("p",{key:0,id:`hint-${t.id}`,class:"hint"},e.toDisplayString(t.hint),9,Oe)):t.error?(e.openBlock(),e.createElementBlock("p",{key:1,id:`error-${t.id}`,class:"error"},e.toDisplayString(t.error),9,Ae)):e.createCommentVNode("",!0)],8,Le))}});N.install=t=>{t.component("SolRadio",N)},A.install=t=>{t.component("SolRadioGroup",A)};var sl="";const Re=["id","data-testid","checked","value","name"],He=["for"],x=e.defineComponent({__name:"Checkbox",props:{id:null,name:null,value:null,label:null,checked:null,class:null},emits:["change"],setup(t,{emit:n}){return(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["sol-checkbox-core",l.$props.class])},[e.createElementVNode("input",e.mergeProps(l.$attrs,{id:`checkbox-${t.name}-${t.id}`,type:"checkbox",class:"checkbox","data-testid":`checkbox-${t.name}-${t.id}`,checked:t.checked,value:t.value,name:t.name,onChange:a[0]||(a[0]=o=>n("change",t.value))}),null,16,Re),e.createElementVNode("label",{class:"label",for:`checkbox-${t.name}-${t.id}`},e.toDisplayString(t.label),9,He)],2))}});var ml="";const Fe=["aria-labelledby"],Ge=["id","data-testid"],Ue=["id"],Ke=["id"],R=e.defineComponent({__name:"CheckboxGroup",props:{id:null,title:null,hideTitle:{type:Boolean,default:!1},hint:null,error:null,checkboxes:null,modelValue:null,direction:{default:"row"}},emits:["change","update:modelValue"],setup(t,{emit:n}){const l=t;function a(c,s){return!!c&&!s}function o(c,s){return s?`error-${l.id}`:a(c,s)?`hint-${l.id}`:null}function i(c){var s;return(s=l==null?void 0:l.modelValue)==null?void 0:s.includes(c)}function r(c){return Array.isArray(l==null?void 0:l.modelValue)?[...l.modelValue,c]:[c]}function d(c){var f;n("change",c.value);const s=i(c.value)?(f=l.modelValue)==null?void 0:f.filter(b=>b!==c.value):r(c.value);n("update:modelValue",s)}return(c,s)=>(e.openBlock(),e.createElementBlock("fieldset",{class:"sol-checkbox-group-core","aria-labelledby":`checkbox-group-title-${t.id}`},[e.renderSlot(c.$slots,"title",{id:`checkbox-group-title-${t.id}`},()=>[e.createElementVNode("legend",{id:`checkbox-group-title-${t.id}`,class:e.normalizeClass(["title",{"sr-only":t.hideTitle}]),"data-testid":`checkbox-group-title-${t.id}`},e.toDisplayString(t.title),11,Ge)]),e.createElementVNode("ul",{class:e.normalizeClass(["container-checkboxes",{"flex-col":t.direction==="column"}])},[e.renderSlot(c.$slots,"default",{checkboxes:t.checkboxes,direction:t.direction},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.checkboxes,(f,b)=>{var y;return e.openBlock(),e.createElementBlock("li",{key:b},[e.createVNode(x,e.mergeProps(c.$attrs,{id:(y=f==null?void 0:f.id)!=null?y:`${f.value}`,class:["checkbox",{"mb-micro":t.direction==="column","mr-micro":t.direction==="row"}],label:f.label,name:f.name,value:f.value,checked:i(f.value),"aria-invalid":!!t.error,"aria-describedby":o(t.hint,t.error),onChange:B=>d(f)}),null,16,["id","class","label","name","value","checked","aria-invalid","aria-describedby","onChange"])])}),128))])],2),a(t.hint,t.error)?(e.openBlock(),e.createElementBlock("p",{key:0,id:`hint-${t.id}`,class:"hint"},e.toDisplayString(t.hint),9,Ue)):t.error?(e.openBlock(),e.createElementBlock("p",{key:1,id:`error-${t.id}`,class:"error"},e.toDisplayString(t.error),9,Ke)):e.createCommentVNode("",!0)],8,Fe))}});x.install=t=>{t.component("SolCheckbox",x)},R.install=t=>{t.component("SolCheckboxGroup",R)};var hl="";const We=["id","for","data-testid"],Ye={class:"switch-container"},je=["id","aria-checked","aria-labelledby","data-testid","checked","value","name"],qe=e.createElementVNode("span",{class:"ellipse"},null,-1),H=e.defineComponent({__name:"Switch",props:{id:null,name:null,value:null,label:null,checked:{type:Boolean},class:null,hideLabel:{type:Boolean},horizontalLabel:{type:Boolean}},emits:["change"],setup(t,{emit:n}){return(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["sol-switch-core",[l.$props.class,{"-horizontal":t.horizontalLabel}]])},[e.createElementVNode("label",{id:`switch-label-${t.name}-${t.id}`,class:e.normalizeClass(["label",{"mb-1":!t.horizontalLabel,"sr-only":t.hideLabel}]),for:`switch-${t.name}-${t.id}`,"data-testid":`switch-label-${t.name}-${t.id}`},e.toDisplayString(t.label),11,We),e.createElementVNode("div",Ye,[e.createElementVNode("input",e.mergeProps(l.$attrs,{id:`switch-${t.name}-${t.id}`,type:"checkbox",class:"switch",role:"switch","aria-checked":t.checked,"aria-labelledby":`switch-label-${t.name}-${t.id}`,"data-testid":`switch-${t.name}-${t.id}`,checked:t.checked,value:t.value,name:t.name,onChange:a[0]||(a[0]=o=>n("change",t.value))}),null,16,je),qe])],2))}});H.install=t=>{t.component("SolSwitch",H)};function Je(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}var Z;const T=typeof window!="undefined",Qe=t=>typeof t=="string",W=()=>{};T&&((Z=window==null?void 0:window.navigator)==null?void 0:Z.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function F(t){var n;const l=e.unref(t);return(n=l==null?void 0:l.$el)!=null?n:l}const v=T?window:void 0;T&&window.document,T&&window.navigator,T&&window.location;function Y(...t){let n,l,a,o;if(Qe(t[0])?([l,a,o]=t,n=v):[n,l,a,o]=t,!n)return W;let i=W;const r=e.watch(()=>F(n),c=>{i(),c&&(c.addEventListener(l,a,o),i=()=>{c.removeEventListener(l,a,o),i=W})},{immediate:!0,flush:"post"}),d=()=>{r(),i()};return Je(d),d}function Xe(t,n,l={}){const{window:a=v,ignore:o,capture:i=!0}=l;if(!a)return;const r=e.ref(!0);let d;const c=b=>{a.clearTimeout(d);const y=F(t),B=b.composedPath();!y||y===b.target||B.includes(y)||!r.value||o&&o.length>0&&o.some(S=>{const g=F(S);return g&&(b.target===g||B.includes(g))})||n(b)},s=[Y(a,"click",c,{passive:!0,capture:i}),Y(a,"pointerdown",b=>{const y=F(t);r.value=!!y&&!b.composedPath().includes(y)},{passive:!0}),Y(a,"pointerup",b=>{d=a.setTimeout(()=>c(b),50)},{passive:!0})];return()=>s.forEach(b=>b())}const j=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},q="__vueuse_ssr_handlers__";j[q]=j[q]||{},j[q];var _;(function(t){t.UP="UP",t.RIGHT="RIGHT",t.DOWN="DOWN",t.LEFT="LEFT",t.NONE="NONE"})(_||(_={}));const Ze={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},ve=[e.createElementVNode("path",{fill:"currentColor",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"},null,-1)];function _e(t,n){return e.openBlock(),e.createElementBlock("svg",Ze,ve)}var et={name:"mi-search",render:_e},fl="";const tt=["data-testid"],lt=["id","for"],nt=["id","disabled","data-testid","aria-expanded","aria-labelledby","aria-label","aria-controls","onClick"],ot={class:"dropdown-container"},at=["id","data-testid","aria-multiselectable","aria-labelledby"],it=["id","data-testid","selected","aria-selected","onClick","onKeyup"],rt={key:0,class:"no-data"},dt=e.createTextVNode(" Sem dados "),z=e.defineComponent({__name:"Dropdown",props:{id:null,label:null,ariaLabel:null,smallerWidth:{type:Boolean},disabled:{type:Boolean},loading:{type:Boolean,default:!1},searchable:{type:Boolean,default:!1},closeOnSelect:{type:Boolean,default:!0},fetchOnSearch:{type:Boolean,default:!1},isMultipleSelect:{type:Boolean},searchPlaceholder:null,selected:null,options:{default:()=>[]}},emits:["closeDropdown","search","update:selected"],setup(t,{emit:n}){const l=t,a=e.ref(),o=e.ref(!1),i=e.ref(""),r=e.computed(()=>{var h;return l.fetchOnSearch?l.options:(h=l.options)==null?void 0:h.filter(u=>typeof u=="string"?u.includes(i.value):u.name.includes(i.value))}),d=e.computed(()=>Array.isArray(l.selected)?l.selected.join(", ").trim():l.selected);Xe(a,()=>{o.value&&f()});function c(){l.disabled||(o.value?f():s())}function s(){o.value=!0}function f(){Zt(),n("closeDropdown")}function b(h){const u=new Set(l.selected);return u.has(h)?u.delete(h):u.add(h),[...u]}function y(h){const u=typeof h=="string"?h:h.value,$=l.isMultipleSelect?b(u):u;n("update:selected",$),l.closeOnSelect&&!l.isMultipleSelect&&f()}function B(h){return Array.isArray(l.selected)?typeof h=="string"?l.selected.includes(h):l.selected.includes(h.value):typeof h=="string"?h===l.selected:h.value===l.selected}const S=e.reactive({list:void 0,search:void 0}),g=e.reactive({id:"",index:0});function Xt({code:h}){const u=k=>{const K=k!=null?k:g.index;k!==void 0&&(g.index=k),setTimeout(()=>{var oe,ae;const p=(oe=S.list)==null?void 0:oe.children[K];g.id=(ae=p==null?void 0:p.id)!=null?ae:"",p==null||p.focus()},0)},$=()=>{var k;l.searchable&&(g.index=0,(k=S==null?void 0:S.search)==null||k.focus())};switch(h){case"ArrowUp":return g.index>0&&(g.index-=1),u();case"ArrowDown":return o.value?(g.index<r.value.length-1&&(g.index+=1),u()):(s(),u(0));case"Home":return u(0);case"End":return u(l.options.length-1);case"Escape":return f();default:!["Enter","NumpadEnter","Space"].includes(h)&&$()}}function Zt(){o.value=!1,g.index=0,i.value=""}function U(h,u){return typeof h=="string"?h:h[u!=null?u:"value"]}function ne(h,u){S[h]=u!=null?u:void 0}return(h,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"el",ref:a,class:e.normalizeClass(["sol-dropdown-core",{"-smaller":t.smallerWidth}]),"data-testid":`dropdown-${t.id}`,onKeydownPassive:Xt},[e.renderSlot(h.$slots,"label",{},()=>[e.createElementVNode("label",{id:`label-dropdown-${t.id}`,class:e.normalizeClass(["label",{"-disabled":t.disabled,"sr-only":t.ariaLabel}]),for:`toggle-dropdown-${t.id}`},e.toDisplayString(t.label||t.ariaLabel),11,lt)]),e.createElementVNode("button",{id:`toggle-dropdown-${t.id}`,disabled:t.disabled,"data-testid":`toggle-dropdown-${t.id}`,class:"button-toggle-dropdown toggle-dropdown","aria-haspopup":"listbox","aria-expanded":o.value,"aria-labelledby":`label-dropdown-${t.id}`,"aria-label":t.ariaLabel,"aria-controls":`dropdown-list-${t.id}`,onClick:e.withModifiers(c,["stop"])},[e.renderSlot(h.$slots,"toggle-dropdown",{toggle:{open:s,close:f,toggleDropdown:c},isOpen:o.value,select:y,selectedSanitized:e.unref(d),selected:t.selected},()=>[e.createTextVNode(e.toDisplayString(e.unref(d)||"Selecione"),1)])],8,nt),e.createVNode(e.Transition,{mode:"out-in",name:"dropdown"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",ot,[t.searchable?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["search-container",{"-loading":t.loading}])},[e.renderSlot(h.$slots,"search",{filter:i.value},()=>[e.createVNode(C,{id:`search-dropdown-${t.id}`,ref:$=>ne("search",$==null?void 0:$.input),modelValue:i.value,"onUpdate:modelValue":u[0]||(u[0]=$=>i.value=$),"data-testid":`search-dropdown-${t.id}`,role:"combobox",class:"search","aria-autocomplete":"list",placeholder:t.searchPlaceholder,"aria-expanded":o.value,"aria-haspopup":"listbox","aria-owns":`dropdown-list-${t.id}`,"aria-controls":`dropdown-list-${t.id}`,"aria-activedescendant":g.id,"aria-labelledby":`label-dropdown-${t.id}`,onClick:u[1]||(u[1]=e.withModifiers(()=>{},["stop"])),onInput:u[2]||(u[2]=$=>{var k;return n("search",(k=$.target)==null?void 0:k.value)})},null,8,["id","modelValue","data-testid","placeholder","aria-expanded","aria-owns","aria-controls","aria-activedescendant","aria-labelledby"]),e.createVNode(e.unref(et),{"aria-hidden":"true",class:"icon"})])],2)):e.createCommentVNode("",!0),e.createElementVNode("ul",{id:`dropdown-list-${t.id}`,ref:$=>ne("list",$),"data-testid":`dropdown-list-${t.id}`,role:"listbox",tabindex:"-1","aria-multiselectable":t.isMultipleSelect,"aria-labelledby":`label-dropdown-${t.id}`,class:"dropdown-list-core"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),($,k)=>(e.openBlock(),e.createElementBlock("li",{id:`option-${t.id}-${U($,"value")}`,key:k,"data-testid":`option-${t.id}-${U($,"value")}`,role:"option",tabindex:"-1",class:"dropdown-item",style:e.normalizeStyle(`--item: ${k+1}`),selected:B($),"aria-selected":B($),onClick:K=>y($),onKeyup:[e.withKeys(K=>y($),["enter"]),e.withKeys(K=>y($),["space"])]},[e.renderSlot(h.$slots,"default",{text:U($,"name"),option:$,isSelect:B},()=>[e.createTextVNode(e.toDisplayString(U($,"name")),1)])],44,it))),128)),e.unref(r).length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",rt,[e.renderSlot(h.$slots,"no-data",{},()=>[dt])]))],8,at)],512),[[e.vShow,o.value]])]),_:3})],42,tt))}});z.install=t=>{t.component("SolDropdown",z)};const ct={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},st=[e.createElementVNode("path",{fill:"currentColor",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"},null,-1)];function mt(t,n){return e.openBlock(),e.createElementBlock("svg",ct,st)}var ee={name:"mi-close",render:mt},bl="";const ht=["id","data-testid","title","aria-describedby","aria-disabled","onKeydown"],ut=["id"],ft={class:"label"},M=e.defineComponent({__name:"Chip",props:{id:null,label:null,selected:{type:Boolean},disabled:{type:Boolean},removable:{type:Boolean,default:!0}},emits:["close","update:selected"],setup(t,{emit:n}){const l=t;function a({code:o}){if(!l.disabled)switch(o){case"Enter":case"NumpadEnter":case"Space":return n("update:selected");case"Delete":case"Backspace":return l.removable&&n("close");default:return!1}}return(o,i)=>(e.openBlock(),e.createElementBlock("div",{id:`chip-${t.id}`,"data-testid":`chip-${t.id}`,class:e.normalizeClass(["sol-chip-core",{"-selected":t.selected,"-disabled":t.disabled}]),tabindex:"0",title:t.label,"aria-describedby":`chip-description-${t.id}`,"aria-disabled":t.disabled,onClick:i[1]||(i[1]=r=>n("update:selected")),onKeydown:e.withModifiers(a,["self"])},[e.createElementVNode("span",{id:`chip-description-${t.id}`,"z-index":"-1",class:"sr-only"},"Press Delete or Backspace to remove this Chip",8,ut),e.createElementVNode("span",ft,[e.renderSlot(o.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)])]),t.removable?(e.openBlock(),e.createElementBlock("i",{key:0,role:"presentation","aira-hidden":"true",class:"close",onClick:i[0]||(i[0]=e.withModifiers(r=>n("close"),["stop"]))},[e.createVNode(e.unref(ee),{class:"icon"})])):e.createCommentVNode("",!0)],42,ht))}}),$t={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},bt=[e.createElementVNode("path",{fill:"currentColor",d:"m17 10l-5 6l-5-6h10z"},null,-1)];function yt(t,n){return e.openBlock(),e.createElementBlock("svg",$t,bt)}var gt={name:"mi-caret-down",render:yt},gl="";const kt={class:"select"},wt={key:2,class:"placeholder-inline"},Bt={class:"error"},G=e.defineComponent({__name:"Select",props:{id:null,options:null,label:null,ariaLabel:null,smallerWidth:{type:Boolean},disabled:{type:Boolean},multiple:{type:Boolean},modelValue:null,error:null,fetchOnApi:{type:Boolean},placeholder:{default:"Selecione"},searchPlaceholder:null,searchable:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:n}){return(l,a)=>(e.openBlock(),e.createBlock(z,{id:`select-${t.id}`,selected:t.modelValue,label:t.label,"aria-label":t.ariaLabel,"smaller-width":t.smallerWidth,disabled:t.disabled,"fetch-on-search":t.fetchOnApi,"is-multiple-select":t.multiple,class:"sol-select-core","search-placeholder":t.searchPlaceholder,searchable:t.searchable,options:t.options,"onUpdate:selected":a[0]||(a[0]=o=>n("update:modelValue",o))},{"toggle-dropdown":e.withCtx(({selected:o,isOpen:i,select:r})=>[e.createElementVNode("div",{class:e.normalizeClass(["select-container",{"-disabled":t.disabled,"-error":t.error}])},[e.createElementVNode("div",kt,[t.multiple&&(o==null?void 0:o.length)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(o,(d,c)=>(e.openBlock(),e.createBlock(M,{id:d,key:c,label:d,onClick:e.withModifiers(s=>r(d),["stop"]),onClose:s=>r(d)},null,8,["id","label","onClick","onClose"]))),128)):o!=null&&o.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(o),1)],64)):(e.openBlock(),e.createElementBlock("span",wt,e.toDisplayString(t.placeholder),1))]),e.createVNode(e.unref(gt),{class:e.normalizeClass(["icon",{"-open":i}])},null,8,["class"])],2),e.createElementVNode("span",Bt,e.toDisplayString(t.error),1)]),_:1},8,["id","selected","label","aria-label","smaller-width","disabled","fetch-on-search","is-multiple-select","search-placeholder","searchable","options"]))}});G.install=t=>{t.component("SolSelect",G)},M.install=t=>{t.component("SolChip",M)};var kl="",wl="",Bl="",Sl="";const te=12,V={type:"success",timeout:5e3,showIcon:!0,showCloseButton:!0,position:"top-right",hideProgressBar:!1};function St(t,n){const l=e.reactive({id:null,intervalId:null,startTime:0,remaining:n}),a=e.ref(100);function o(){clearInterval(l.intervalId),clearTimeout(l.id),l.remaining-=Date.now()-l.startTime}function i(){l.startTime=Date.now(),clearTimeout(l.id),l.intervalId=setInterval(()=>{a.value--},n/100-5),l.id=setTimeout(t,l.remaining)}function r(){clearInterval(l.intervalId),clearTimeout(l.id),a.value=100}return e.onMounted(()=>{if(n<=0)return!1}),e.onUnmounted(()=>{r()}),{start:i,stop:o,clear:r,progress:a}}function Ct(t){return{stylePosition:e.computed(()=>{const{position:l,offset:a}=t();switch(l){case"top-left":return{left:"0",top:`${a}px`};case"bottom-left":return{left:"0",bottom:`${a}px`};case"bottom-right":return{right:"0",bottom:`${a}px`};case"top-center":return{top:`${a}px`,left:"0",right:"0",marginRight:"auto",marginLeft:"auto"};case"bottom-center":return{bottom:`${a}px`,left:"0",right:"0",marginRight:"auto",marginLeft:"auto"};default:return{right:"0",top:`${a}px`}}})}}var le=(t=>(t["top-left"]="bounce-left",t["top-right"]="bounce-right",t["top-center"]="bounce-down",t["bottom-left"]="bounce-left",t["bottom-center"]="bounce-up",t["bottom-right"]="bounce-right",t))(le||{});const Vt={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},pt=[e.createElementVNode("path",{fill:"currentColor",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"},null,-1)];function Et(t,n){return e.openBlock(),e.createElementBlock("svg",Vt,pt)}var Nt={name:"mi-circle-check",render:Et};const xt={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Tt=[e.createElementVNode("path",{fill:"currentColor",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"},null,-1)];function zt(t,n){return e.openBlock(),e.createElementBlock("svg",xt,Tt)}var Mt={name:"mi-circle-error",render:zt};const Dt={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Pt=[e.createElementVNode("g",{fill:"currentColor"},[e.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"}),e.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"})],-1)];function Lt(t,n){return e.openBlock(),e.createElementBlock("svg",Dt,Pt)}var It={name:"mi-circle-warning",render:Lt},El="";const Ot=["id","data-testid"],At={class:"content-wrapper"},Rt={key:0,class:"icon-container","aria-hidden":"true"},Ht={class:"content"},Ft={key:0,class:"description"},Gt=["data-testid"],Ut=e.defineComponent({__name:"Toast",props:{id:null,type:{default:V.type},visible:{type:Boolean,default:!1},title:null,description:null,timeout:null,hideProgressBar:{type:Boolean,default:V.hideProgressBar},showIcon:{type:Boolean,default:V.showIcon},offset:{default:0},onClose:null,onCloseHandler:null,position:{default:V.position}},setup(t){const n=t,{start:l,stop:a,progress:o}=St(()=>{var s;(s=n.onCloseHandler)==null||s.call(n)},n.timeout),{stylePosition:i}=Ct(()=>({offset:n.offset,position:n.position})),r=e.computed(()=>n.title&&n.description);function d(){n.timeout>0&&a()}function c(){l()}return e.onMounted(()=>{l()}),(s,f)=>(e.openBlock(),e.createBlock(e.Transition,{name:e.unref(le)[t.position],type:"animation"},{default:e.withCtx(()=>[t.visible?(e.openBlock(),e.createElementBlock("div",{key:0,id:`toast-${t.type}-${t.id}`,role:"status","data-testid":`toast-${t.type}-${t.id}`,style:e.normalizeStyle(e.unref(i)),class:e.normalizeClass(["sol-toast-core",[`-${t.type}`,{"-multiline":e.unref(r)}]]),onKeyup:f[1]||(f[1]=e.withKeys((...b)=>t.onCloseHandler&&t.onCloseHandler(...b),["esc"])),onMouseenter:d,onMouseleave:c,onFocusin:d,onFocusout:c},[e.createElementVNode("section",At,[t.showIcon?(e.openBlock(),e.createElementBlock("div",Rt,[e.renderSlot(s.$slots,"icon-status",{type:t.type},()=>[t.type==="success"?(e.openBlock(),e.createBlock(e.unref(Nt),{key:0,class:"icon"})):e.createCommentVNode("",!0),t.type==="info"?(e.openBlock(),e.createBlock(e.unref(It),{key:1,class:"icon"})):e.createCommentVNode("",!0),t.type==="danger"?(e.openBlock(),e.createBlock(e.unref(Mt),{key:2,class:"icon"})):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),e.createElementVNode("div",Ht,[e.createElementVNode("p",{class:e.normalizeClass(["title",{"-multiline":e.unref(r)}])},[e.renderSlot(s.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)])],2),t.description?(e.openBlock(),e.createElementBlock("p",Ft,[e.renderSlot(s.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(t.description),1)])])):e.createCommentVNode("",!0)])]),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["close",{"-multiline":e.unref(r)}]),"data-testid":`toast-close-button-${t.type}-${t.id}`,"aria-label":"close notification",onClick:f[0]||(f[0]=(...b)=>t.onCloseHandler&&t.onCloseHandler(...b))},[e.createVNode(e.unref(ee),{class:"icon"})],10,Gt),t.hideProgressBar?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"progressbar","aria-hidden":"true",style:e.normalizeStyle({width:`${e.unref(o)}%`})},null,4))],46,Ot)):e.createCommentVNode("",!0)]),_:3},8,["name"]))}}),D={"top-left":[],"top-right":[],"top-center":[],"bottom-left":[],"bottom-right":[],"bottom-center":[]};function Kt(){let t=0;function n(){Object.entries(D).forEach(([a,o])=>{o.length&&o.forEach(i=>{var d;const r=(d=i.toastVNode.props)==null?void 0:d.id;J(r,a)})})}return{createToast:(a,o)=>{const i=t++,r=o?Wt(o):V;return o!=null&&o.showOneToast&&n(),Yt(i,r,typeof a=="string"?{title:a}:a),{close:()=>J(i,r.position)}},clearAllToasts:n}}function Wt(t){const n=X(P(P({},V),t),{showIcon:t.showIcon});return n.hideProgressBar=!!(n.timeout&&(n==null?void 0:n.timeout)<=0),t.hideProgressBar&&(n.hideProgressBar=t.hideProgressBar),n}function Yt(t,n,l){setTimeout(()=>{const a=qt(n,D,te),o=document.createElement("div");document.body.appendChild(o);const i=e.createVNode(Ut,jt(n,t,a,J,l));e.render(i,o),D[n.position].push({toastVNode:i,container:o}),i.component&&(i.component.props.visible=!0)},1)}function jt(t,n,l,a,o){return X(P(P({},t),o),{id:n,offset:l,visible:!1,onCloseHandler(){a(n,t.position?t.position:"top-right")}})}function qt(t,n,l){if(!t.position)throw new Error("no position");return n[t.position].reduce((a,{toastVNode:o})=>(a+=o.el.offsetHeight+l||0,a),l)}function Jt(t,n,l,a){for(let o=t;o<n.length;o++){const{toastVNode:i}=n[o];if(!i.el)return;const r=l.split("-")[0]||"top",d=parseInt(i.el.style[r],10)-a-te;if(!i.component)return;i.component.props.offset=d}}function J(t,n){var c;const l=D[n],a=l.findIndex(({toastVNode:s})=>{var f;return t===((f=s==null?void 0:s.props)==null?void 0:f.id)});if(a===-1)return;const{container:o,toastVNode:i}=l[a],r=(c=i==null?void 0:i.el)==null?void 0:c.offsetHeight;if(D[n].splice(a,1),Jt(a,l,n,r),!i.component)return;const d=i.component.props;d.visible=!1,d.onClose&&d.onClose(),setTimeout(()=>{e.render(null,o),document.body.removeChild(o)},1e3)}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");const Q={SolButton:L,SolInput:C,SolTextarea:O,SolTextfield:E,SolTextfieldPassword:I,SolRadio:N,SolRadioGroup:A,SolCheckbox:x,SolCheckboxGroup:R,SolSwitch:H,SolDropdown:z,SolSelect:G,SolChip:M};function Qt(t){for(const n in Q)t.component(n,Q[n])}m.SolButton=L,m.SolCheckbox=x,m.SolCheckboxGroup=R,m.SolChip=M,m.SolDropdown=z,m.SolInput=C,m.SolRadio=N,m.SolRadioGroup=A,m.SolSelect=G,m.SolSwitch=H,m.SolTextarea=O,m.SolTextfield=E,m.SolTextfieldPassword=I,m.components=Q,m.install=Qt,m.useToast=Kt,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|