@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.
- package/dist/components.d.ts +1 -0
- package/dist/components.json +1 -1
- package/dist/girassol.es.js +1334 -1546
- package/dist/girassol.umd.js +6 -5
- package/dist/style.css +1 -1
- package/dist/theme/safelist.d.ts +14 -0
- package/dist/theme/solfacil/colors.d.ts +6 -0
- package/dist/theme/solfacil/effects.d.ts +3 -3
- package/dist/theme/solfacil/index.d.ts +1 -0
- package/dist/theme/solfacil/spacing.d.ts +3 -0
- package/dist/theme/solfacil/typography.d.ts +2 -1
- package/dist/theme/solfacil/utilities.d.ts +1 -0
- package/dist/types/components/forms/button/Button.vue.d.ts +38 -30
- package/dist/types/components/forms/button/ButtonDestructive.vue.d.ts +73 -0
- package/dist/types/components/forms/button/index.d.ts +2 -1
- package/dist/types/components/forms/textarea/Textarea.vue.d.ts +4 -4
- package/dist/types/components/loader/CircleLoader.vue.d.ts +86 -0
- package/dist/types/index.d.ts +162 -43
- package/package.json +9 -9
- package/theme/safelist.ts +104 -0
- package/theme/solfacil/colors.ts +14 -5
- package/theme/solfacil/effects.ts +5 -5
- package/theme/solfacil/index.ts +2 -1
- package/theme/solfacil/spacing.ts +3 -0
- package/theme/solfacil/typography.ts +8 -7
- package/theme/solfacil/utilities.ts +201 -3
- package/vite.config.ts +1 -0
- package/windi.config.ts +9 -26
package/dist/girassol.umd.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
${
|
|
3
|
-
${
|
|
4
|
-
${
|
|
5
|
-
`]),type:"button"},[e.createElementVNode("div",fe,[e.renderSlot(r.$slots,"icon-left")]),e.renderSlot(r.$slots,"default"),e.createElementVNode("div",$e,[e.renderSlot(r.$slots,"icon-right")])],10,ue))}});H.install=t=>{t.component("SolButton",H)};var Bl="";const be=["id","data-testid","value"],p=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:d}){l("update:modelValue",d==null?void 0:d.value)}const o=e.ref("");return n({input:o}),(d,i)=>(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,be))}});p.install=t=>{t.component("SolInput",p)};var wl="";const ye=["id","data-testid"],ge=["for"],ke={class:"container-input"},Be=["id"],we=["id"],z=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:i=>{n("update:modelValue",i)}});function o(i,r){return!!i&&!r}function d(i,r){return r?`error-${l.id}`:o(i,r)?`hint-${l.id}`:null}return(i,r)=>{var s;return e.openBlock(),e.createElementBlock("div",{id:`textfield-${t.id}`,"data-testid":`textfield-${t.id}`,class:e.normalizeClass([[`${(s=i.$props.class)!=null?s:""}`,{"-invert":t.invert}],"sol-textfield-core"])},[e.renderSlot(i.$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,ge)):e.createCommentVNode("",!0)]),e.createElementVNode("div",ke,[e.renderSlot(i.$slots,"default",{},()=>[e.createVNode(p,e.mergeProps(i.$attrs,{id:t.id,modelValue:e.unref(a),"onUpdate:modelValue":r[0]||(r[0]=m=>e.isRef(a)?a.value=m:null),"data-testid":`input-${t.id}`,class:[t.error&&"-error","input"],invert:t.invert,"aria-invalid":!!t.error,"aria-describedby":d(t.hint,t.error)}),null,16,["id","modelValue","data-testid","class","invert","aria-invalid","aria-describedby"])]),e.renderSlot(i.$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,Be)):t.error?(e.openBlock(),e.createElementBlock("span",{key:1,id:`error-${t.id}`,class:"error"},e.toDisplayString(t.error),9,we)):e.createCommentVNode("",!0)],10,ye)}}}),Se={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Ce=[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 Ee(t,n){return e.openBlock(),e.createElementBlock("svg",Se,Ce)}var Ve={name:"mi-eye",render:Ee};const pe={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Ne=[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 xe(t,n){return e.openBlock(),e.createElementBlock("svg",pe,Ne)}var Te={name:"mi-eye-off",render:xe};const ze=["aria-label"],F=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(z,{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]=d=>n.value=!n.value)},[e.withDirectives(e.createVNode(e.unref(Ve),{"aria-hidden":"true"},null,512),[[e.vShow,n.value]]),e.withDirectives(e.createVNode(e.unref(Te),{"aria-hidden":"true"},null,512),[[e.vShow,!n.value]])],8,ze)]),_:1},8,["id","type","label"]))}});z.install=t=>{t.component("SolTextfield",z)},F.install=t=>{t.component("SolTextfieldPassword",F)};var El="";const Me=["id","data-testid"],De=["for"],Pe={class:"container-textarea"},Le=["id","data-testid","invert","aria-invalid","aria-describedby"],Ie=["id"],Ae=["id"],K=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:i=>{n("update:modelValue",i)}});function o(i,r){return!!i&&!r}function d(i,r){return r?`error-${l.id}`:o(i,r)?`hint-${l.id}`:null}return(i,r)=>{var s;return e.openBlock(),e.createElementBlock("div",{id:`textarea-${t.id}`,"data-testid":`textarea-${t.id}`,class:e.normalizeClass([[`${(s=i.$props.class)!=null?s:""}`,{"-invert":t.invert}],"sol-textarea-core"])},[e.renderSlot(i.$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,De)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Pe,[e.renderSlot(i.$slots,"default",{},()=>[e.withDirectives(e.createElementVNode("textarea",e.mergeProps(i.$attrs,{id:`input-${t.id}`,"onUpdate:modelValue":r[0]||(r[0]=m=>e.isRef(a)?a.value=m:null),"data-testid":`input-${t.id}`,class:[t.error&&"-error","textarea"],invert:t.invert,style:{resize:t.resize},"aria-invalid":!!t.error,"aria-describedby":d(t.hint,t.error)}),null,16,Le),[[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,Ie)):t.error?(e.openBlock(),e.createElementBlock("span",{key:1,id:`error-${t.id}`,class:"error"},e.toDisplayString(t.error),9,Ae)):e.createCommentVNode("",!0)],10,Me)}}});K.install=t=>{t.component("SolTextarea",K)};var Vl="";const Oe=["id","data-testid","checked","value","name"],Re=["for"],M=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,Oe),e.createElementVNode("label",{class:"label",for:`radio-${t.name}-${t.id}`},e.toDisplayString(t.label),9,Re)],2))}});var pl="";const He=["aria-labelledby"],Fe=["id","data-testid"],Ke=["id"],Ge=["id"],G=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(r,s){return!!r&&!s}function o(r,s){return s?`error-${l.id}`:a(r,s)?`hint-${l.id}`:null}function d(r){return(l==null?void 0:l.modelValue)===r}function i(r){n("change",r.value),n("update:modelValue",r.value)}return(r,s)=>(e.openBlock(),e.createElementBlock("fieldset",{class:"sol-radio-group-core","aria-labelledby":`radio-group-title-${t.id}`},[e.renderSlot(r.$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,Fe)]),e.createElementVNode("ul",{class:e.normalizeClass(["container-radios",{"flex-col":t.direction==="column"}])},[e.renderSlot(r.$slots,"default",{radios:t.radios,direction:t.direction},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.radios,(m,$)=>{var w;return e.openBlock(),e.createElementBlock("li",{key:$},[e.createVNode(M,e.mergeProps(r.$attrs,{id:(w=m==null?void 0:m.id)!=null?w:`${m.value}`,class:["radio",{"mb-micro":t.direction==="column","mr-micro":t.direction==="row"}],name:m.name,value:m.value,label:m.label,checked:d(m.value),"aria-invalid":!!t.error,"aria-describedby":o(t.hint,t.error),onChange:y=>i(m)}),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,Ke)):t.error?(e.openBlock(),e.createElementBlock("p",{key:1,id:`error-${t.id}`,class:"error"},e.toDisplayString(t.error),9,Ge)):e.createCommentVNode("",!0)],8,He))}});M.install=t=>{t.component("SolRadio",M)},G.install=t=>{t.component("SolRadioGroup",G)};var Nl="";const Ue=["id","data-testid","checked","value","name"],We=["for"],D=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,Ue),e.createElementVNode("label",{class:"label",for:`checkbox-${t.name}-${t.id}`},e.toDisplayString(t.label),9,We)],2))}});var xl="";const Ye=["aria-labelledby"],je=["id","data-testid"],qe=["id"],Je=["id"],U=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(s,m){return!!s&&!m}function o(s,m){return m?`error-${l.id}`:a(s,m)?`hint-${l.id}`:null}function d(s){var m;return(m=l==null?void 0:l.modelValue)==null?void 0:m.includes(s)}function i(s){return Array.isArray(l==null?void 0:l.modelValue)?[...l.modelValue,s]:[s]}function r(s){var $;n("change",s.value);const m=d(s.value)?($=l.modelValue)==null?void 0:$.filter(w=>w!==s.value):i(s.value);n("update:modelValue",m)}return(s,m)=>(e.openBlock(),e.createElementBlock("fieldset",{class:"sol-checkbox-group-core","aria-labelledby":`checkbox-group-title-${t.id}`},[e.renderSlot(s.$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,je)]),e.createElementVNode("ul",{class:e.normalizeClass(["container-checkboxes",{"flex-col":t.direction==="column"}])},[e.renderSlot(s.$slots,"default",{checkboxes:t.checkboxes,direction:t.direction},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.checkboxes,($,w)=>{var y;return e.openBlock(),e.createElementBlock("li",{key:w},[e.createVNode(D,e.mergeProps(s.$attrs,{id:(y=$==null?void 0:$.id)!=null?y:`${$.value}`,class:["checkbox",{"mb-micro":t.direction==="column","mr-micro":t.direction==="row"}],label:$.label,name:$.name,value:$.value,checked:d($.value),"aria-invalid":!!t.error,"aria-describedby":o(t.hint,t.error),onChange:g=>r($)}),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,qe)):t.error?(e.openBlock(),e.createElementBlock("p",{key:1,id:`error-${t.id}`,class:"error"},e.toDisplayString(t.error),9,Je)):e.createCommentVNode("",!0)],8,Ye))}});D.install=t=>{t.component("SolCheckbox",D)},U.install=t=>{t.component("SolCheckboxGroup",U)};var Tl="";const Qe=["id","for","data-testid"],Xe={class:"switch-container"},Ze=["id","aria-checked","aria-labelledby","data-testid","checked","value","name"],ve=e.createElementVNode("span",{class:"ellipse"},null,-1),W=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,Qe),e.createElementVNode("div",Xe,[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,Ze),ve])],2))}});W.install=t=>{t.component("SolSwitch",W)};var le;const P=typeof window!="undefined",_e=t=>typeof t=="string",X=()=>{};P&&((le=window==null?void 0:window.navigator)==null?void 0:le.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function et(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}function L(t){var n;const l=e.unref(t);return(n=l==null?void 0:l.$el)!=null?n:l}const ne=P?window:void 0;P&&window.document,P&&window.navigator,P&&window.location;function Y(...t){let n,l,a,o;if(_e(t[0])?([l,a,o]=t,n=ne):[n,l,a,o]=t,!n)return X;let d=X;const i=e.watch(()=>L(n),s=>{d(),s&&(s.addEventListener(l,a,o),d=()=>{s.removeEventListener(l,a,o),d=X})},{immediate:!0,flush:"post"}),r=()=>{i(),d()};return et(r),r}function ae(t,n,l={}){const{window:a=ne,ignore:o,capture:d=!0,detectIframe:i=!1}=l;if(!a)return;const r=e.ref(!0);let s;const m=y=>{a.clearTimeout(s);const g=L(t),k=y.composedPath();!g||g===y.target||k.includes(g)||!r.value||o&&o.length>0&&o.some(C=>{const N=L(C);return N&&(y.target===N||k.includes(N))})||n(y)},$=[Y(a,"click",m,{passive:!0,capture:d}),Y(a,"pointerdown",y=>{const g=L(t);r.value=!!g&&!y.composedPath().includes(g)},{passive:!0}),Y(a,"pointerup",y=>{if(y.button===0){const g=y.composedPath();y.composedPath=()=>g,s=a.setTimeout(()=>m(y),50)}},{passive:!0}),i&&Y(a,"blur",y=>{var g;const k=L(t);((g=document.activeElement)==null?void 0:g.tagName)==="IFRAME"&&!(k!=null&&k.contains(document.activeElement))&&n(y)})].filter(Boolean);return()=>$.forEach(y=>y())}const Z=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},v="__vueuse_ssr_handlers__";Z[v]=Z[v]||{},Z[v];var oe;(function(t){t.UP="UP",t.RIGHT="RIGHT",t.DOWN="DOWN",t.LEFT="LEFT",t.NONE="NONE"})(oe||(oe={}));const tt={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},lt=[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 nt(t,n){return e.openBlock(),e.createElementBlock("svg",tt,lt)}var ie={name:"mi-search",render:nt},Ml="";const at=["data-testid"],ot=["id","for"],it=["id","disabled","data-testid","aria-expanded","aria-labelledby","aria-label","aria-controls","onClick"],dt={class:"dropdown-container"},rt=["id","data-testid","aria-multiselectable","aria-labelledby"],ct=["id","data-testid","selected","aria-selected","onClick","onKeyup"],st={key:0,class:"no-data"},mt=e.createTextVNode(" Sem dados "),j=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),d=e.ref(""),i=e.computed(()=>{var c;return l.fetchOnSearch?l.options:(c=l.options)==null?void 0:c.filter(h=>typeof h=="string"?h.includes(d.value):h.name.includes(d.value))}),r=e.computed(()=>Array.isArray(l.selected)?l.selected.join(", ").trim():l.selected);ae(a,()=>{o.value&&$()});function s(){l.disabled||(o.value?$():m())}function m(){o.value=!0}function $(){Q(),n("closeDropdown")}function w(c){const h=new Set(l.selected);return h.has(c)?h.delete(c):h.add(c),[...h]}function y(c){const h=typeof c=="string"?c:c.value,u=l.isMultipleSelect?w(h):h;n("update:selected",u),l.closeOnSelect&&!l.isMultipleSelect&&$()}function g(c){return Array.isArray(l.selected)?typeof c=="string"?l.selected.includes(c):l.selected.includes(c.value):typeof c=="string"?c===l.selected:c.value===l.selected}const k=e.reactive({list:void 0,search:void 0}),C=e.reactive({id:"",index:0});function N({code:c}){const h=B=>{const S=B!=null?B:C.index;B!==void 0&&(C.index=B),setTimeout(()=>{var O,se;const V=(O=k.list)==null?void 0:O.children[S];C.id=(se=V==null?void 0:V.id)!=null?se:"",V==null||V.focus()},0)},u=()=>{var B;l.searchable&&(C.index=0,(B=k==null?void 0:k.search)==null||B.focus())};switch(c){case"ArrowUp":return C.index>0&&(C.index-=1),h();case"ArrowDown":return o.value?(C.index<i.value.length-1&&(C.index+=1),h()):(m(),h(0));case"Home":return h(0);case"End":return h(l.options.length-1);case"Escape":return $();default:!["Enter","NumpadEnter","Space"].includes(c)&&u()}}function Q(){o.value=!1,C.index=0,d.value=""}function T(c,h){return typeof c=="string"?c:c[h!=null?h:"value"]}function b(c,h){k[c]=h!=null?h:void 0}return(c,h)=>(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:N},[e.renderSlot(c.$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,ot)]),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(s,["stop"])},[e.renderSlot(c.$slots,"toggle-dropdown",{toggle:{open:m,close:$,toggleDropdown:s},isOpen:o.value,select:y,selectedSanitized:e.unref(r),selected:t.selected},()=>[e.createTextVNode(e.toDisplayString(e.unref(r)||"Selecione"),1)])],8,it),e.createVNode(e.Transition,{mode:"out-in",name:"dropdown"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",dt,[t.searchable?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["search-container",{"-loading":t.loading}])},[e.renderSlot(c.$slots,"search",{filter:d.value},()=>[e.createVNode(p,{id:`search-dropdown-${t.id}`,ref:u=>b("search",u==null?void 0:u.input),modelValue:d.value,"onUpdate:modelValue":h[0]||(h[0]=u=>d.value=u),"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":C.id,"aria-labelledby":`label-dropdown-${t.id}`,onClick:h[1]||(h[1]=e.withModifiers(()=>{},["stop"])),onInput:h[2]||(h[2]=u=>{var B;return n("search",(B=u.target)==null?void 0:B.value)})},null,8,["id","modelValue","data-testid","placeholder","aria-expanded","aria-owns","aria-controls","aria-activedescendant","aria-labelledby"]),e.createVNode(e.unref(ie),{"aria-hidden":"true",class:"icon"})])],2)):e.createCommentVNode("",!0),e.createElementVNode("ul",{id:`dropdown-list-${t.id}`,ref:u=>b("list",u),"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(i),(u,B)=>(e.openBlock(),e.createElementBlock("li",{id:`option-${t.id}-${T(u,"value")}`,key:B,"data-testid":`option-${t.id}-${T(u,"value")}`,role:"option",tabindex:"-1",class:"dropdown-item",style:e.normalizeStyle(`--item: ${B+1}`),selected:g(u),"aria-selected":g(u),onClick:S=>y(u),onKeyup:[e.withKeys(S=>y(u),["enter"]),e.withKeys(S=>y(u),["space"])]},[e.renderSlot(c.$slots,"default",{text:T(u,"name"),option:u,isSelect:g},()=>[e.createTextVNode(e.toDisplayString(T(u,"name")),1)])],44,ct))),128)),e.unref(i).length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",st,[e.renderSlot(c.$slots,"no-data",{},()=>[mt])]))],8,rt)],512),[[e.vShow,o.value]])]),_:3})],42,at))}});j.install=t=>{t.component("SolDropdown",j)};const ht={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},ut=[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 ft(t,n){return e.openBlock(),e.createElementBlock("svg",ht,ut)}var de={name:"mi-close",render:ft},Pl="";const $t=["id","data-testid","title","aria-describedby","aria-disabled","onKeydown"],bt=["id"],yt={class:"label"},I=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,d)=>(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:d[1]||(d[1]=i=>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,bt),e.createElementVNode("span",yt,[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:d[0]||(d[0]=e.withModifiers(i=>n("close"),["stop"]))},[e.createVNode(e.unref(de),{class:"icon"})])):e.createCommentVNode("",!0)],42,$t))}});var Ll="";const gt=["id","data-testid","aria-multiselectable","aria-labelledby"],kt=["id","data-testid","selected","aria-selected","onClick","onKeyup"],Bt={key:0,class:"no-data"},wt=e.createTextVNode(" Sem dados "),St=e.defineComponent({__name:"ListOption",props:{id:null,options:null,multiple:{type:Boolean},isSelected:null},emits:["select"],setup(t,{expose:n,emit:l}){const a=e.ref("");return n({list:a}),(o,d)=>(e.openBlock(),e.createElementBlock("ul",{id:`select-list-${t.id}`,ref_key:"list",ref:a,"data-testid":`select-list-${t.id}`,role:"listbox",tabindex:"-1","aria-multiselectable":t.multiple,"aria-labelledby":`select-label-${t.id}`,class:"select-list-core"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,(i,r)=>(e.openBlock(),e.createElementBlock("li",{id:`option-${t.id}-${i.value}`,key:r,"data-testid":`option-${t.id}-${i.value}`,role:"option",tabindex:"-1",class:"select-option-item",style:e.normalizeStyle(`--item: ${r+1}`),selected:t.isSelected(i),"aria-selected":t.isSelected(i),onClick:s=>l("select",i),onKeyup:[e.withKeys(s=>l("select",i),["enter"]),e.withKeys(s=>l("select",i),["space"])]},[e.renderSlot(o.$slots,"item-list",{text:i.name,value:i.value,option:i,isSelected:t.isSelected(i)},()=>[e.createTextVNode(e.toDisplayString(i.name),1)])],44,kt))),128)),t.options.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",Bt,[e.renderSlot(o.$slots,"no-data",{},()=>[wt])]))],8,gt))}}),Ct={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Et=[e.createElementVNode("path",{fill:"currentColor",d:"m17 10l-5 6l-5-6h10z"},null,-1)];function Vt(t,n){return e.openBlock(),e.createElementBlock("svg",Ct,Et)}var pt={name:"mi-caret-down",render:Vt},Al="";const Nt=["data-testid"],xt=["id"],Tt=["id","disabled","data-testid","aria-expanded","aria-labelledby","aria-label","aria-controls","onClick"],zt={key:0,class:"container-tags"},Mt={key:1,class:"mr-micro placeholder-inline",tabindex:"-1"},Dt={class:"error"},Pt={class:"select-options-container"},q=e.defineComponent({__name:"Select",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},multiple:{type:Boolean},searchPlaceholder:null,selected:null,options:{default:()=>[]},error:null,placeholder:{default:"placeholder"}},emits:["closeDropdown","search","update:selected"],setup(t,{emit:n}){const l=t,a=e.ref(),o=e.ref(!1),d=e.ref(""),i=e.computed(()=>{var b;return l.fetchOnSearch?l.options:(b=l.options)==null?void 0:b.filter(c=>c.name.includes(d.value))});ae(a,()=>{o.value&&m()});function r(){l.disabled||(o.value?m():s())}function s(){o.value=!0}function m(){N(),n("closeDropdown")}function $(b){if(Array.isArray(l.selected)){const c=l.selected.findIndex(({value:h})=>h===b.value);return c===-1?[...l.selected,b]:l.selected.filter((h,u)=>u!==c)}return[b]}function w(b){l.multiple?n("update:selected",$(b)):n("update:selected",b),l.closeOnSelect&&!l.multiple&&m()}function y(b){var c;return Array.isArray(l.selected)?l.selected.some(({value:h})=>h===b.value):b.value===((c=l.selected)==null?void 0:c.value)}const g=e.reactive({list:void 0,search:void 0}),k=e.reactive({id:"",index:0});function C({code:b}){const c=u=>{const B=u!=null?u:k.index;u!==void 0&&(k.index=u),setTimeout(()=>{var V,O;const S=(V=g.list)==null?void 0:V.children[B];k.id=(O=S==null?void 0:S.id)!=null?O:"",S==null||S.focus()},0)},h=()=>{var u;l.searchable&&(k.index=0,(u=g==null?void 0:g.search)==null||u.focus())};switch(b){case"ArrowUp":return k.index>0&&(k.index-=1),c();case"ArrowDown":return o.value?(k.index<l.options.length-1&&(k.index+=1),c()):(s(),c(0));case"Home":return c(0);case"End":return c(l.options.length-1);case"Escape":return m();default:!["Enter","NumpadEnter","Space"].includes(b)&&h()}}function N(){o.value=!1,k.index=0,d.value=""}function Q(b){return c=>{g[b]=b==="search"?c==null?void 0:c.input:c==null?void 0:c.list}}function T(){var c;const b=l.selected;return(c=b==null?void 0:b.name)!=null?c:l.placeholder}return(b,c)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"el",ref:a,class:e.normalizeClass(["sol-select-core",{"-smaller":t.smallerWidth}]),"data-testid":`select-${t.id}`,onKeydownPassive:C},[e.renderSlot(b.$slots,"label",{id:`select-label-${t.id}`,for:`select-toggle-${t.id}`},()=>[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,id:`select-label-${t.id}`,class:e.normalizeClass(["label",{"-disabled":t.disabled}])},e.toDisplayString(t.label),11,xt)):e.createCommentVNode("",!0)]),e.createElementVNode("button",{id:`select-toggle-${t.id}`,disabled:t.disabled,"data-testid":`select-toggle-${t.id}`,class:"select-button-toggle","aria-haspopup":"listbox","aria-expanded":o.value,"aria-labelledby":`select-label-${t.id}`,"aria-label":t.ariaLabel,"aria-controls":`select-list-${t.id}`,onClick:e.withModifiers(r,["stop"])},[e.renderSlot(b.$slots,"toggle-dropdown",{toggle:{open:s,close:m,toggleDropdown:r},isOpen:o.value,select:w,selected:t.selected},()=>{var h;return[t.multiple&&Array.isArray(t.selected)&&((h=t.selected)==null?void 0:h.length)?(e.openBlock(),e.createElementBlock("div",zt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.selected,(u,B)=>(e.openBlock(),e.createBlock(I,{id:u.value,key:B,label:u.name,onClick:e.withModifiers(S=>w(u),["stop"]),onClose:S=>w(u)},null,8,["id","label","onClick","onClose"]))),128))])):(e.openBlock(),e.createElementBlock("span",Mt,e.toDisplayString(T()),1)),e.createVNode(e.unref(pt),{"aria-hidden":"true",tabindex:"-1",class:e.normalizeClass(["icon",{"-open":o.value}])},null,8,["class"])]})],8,Tt),e.createElementVNode("span",Dt,e.toDisplayString(t.error),1),e.createVNode(e.Transition,{mode:"out-in",name:"dropdown"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",Pt,[e.renderSlot(b.$slots,"search",{},()=>[t.searchable?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["search-container",{"-loading":t.loading}])},[e.renderSlot(b.$slots,"search",{filter:d.value},()=>[e.createVNode(p,{id:`select-search-${t.id}`,ref:Q("search"),modelValue:d.value,"onUpdate:modelValue":c[0]||(c[0]=h=>d.value=h),"data-testid":`select-search-${t.id}`,role:"combobox",class:"search","aria-autocomplete":"list",placeholder:t.searchPlaceholder,"aria-expanded":o.value,"aria-haspopup":"listbox","aria-owns":`select-list-${t.id}`,"aria-controls":`select-list-${t.id}`,"aria-activedescendant":k.id,"aria-labelledby":`select-label-${t.id}`,onClick:c[1]||(c[1]=e.withModifiers(()=>{},["stop"])),onInput:c[2]||(c[2]=h=>{var u;return n("search",(u=h.target)==null?void 0:u.value)})},null,8,["id","modelValue","data-testid","placeholder","aria-expanded","aria-owns","aria-controls","aria-activedescendant","aria-labelledby"]),e.createVNode(e.unref(ie),{"aria-hidden":"true",class:"icon"})])],2)):e.createCommentVNode("",!0),e.createVNode(St,{id:t.id,ref:Q("list"),options:e.unref(i),multiple:t.multiple,"is-selected":y,onSelect:w},{"item-list":e.withCtx(({text:h,value:u,option:B,isSelected:S})=>[e.renderSlot(b.$slots,"default",{text:h,value:u,option:B,isSelected:S})]),"no-data":e.withCtx(()=>[e.renderSlot(b.$slots,"no-data")]),_:3},8,["id","options","multiple"])])],512),[[e.vShow,o.value]])]),_:3})],42,Nt))}});q.install=t=>{t.component("SolSelect",q)},I.install=t=>{t.component("SolChip",I)};const Lt={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},It=[e.createElementVNode("path",{fill:"currentColor",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"},null,-1)];function At(t,n){return e.openBlock(),e.createElementBlock("svg",Lt,It)}var Ot={name:"mi-chevron-up",render:At},Rl="";const Rt=["id","data-testid","aria-disabled"],Ht=["data-testid","tabindex"],Ft=["data-testid"],J=e.defineComponent({__name:"Accordion",props:{id:null,title:{default:"Title"},invert:{type:Boolean},disabled:{type:Boolean}},setup(t){return(n,l)=>(e.openBlock(),e.createElementBlock("details",{id:`accordion-${t.id}`,"data-testid":`accordion-${t.id}`,class:e.normalizeClass(["sol-accordion-core",{"-invert":t.invert,"-disabled":t.disabled}]),"aria-disabled":t.disabled},[e.createElementVNode("summary",{"data-testid":`accordion-title-${t.id}`,class:"summary",tabindex:t.disabled?-1:0},[e.renderSlot(n.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),e.createVNode(e.unref(Ot),{class:"icon","aria-hidden":"true"})],8,Ht),e.createElementVNode("div",{"data-testid":`accordion-content-${t.id}`,class:"container"},[e.renderSlot(n.$slots,"default")],8,Ft)],10,Rt))}});J.install=t=>{t.component("SolAccordion",J)};var Hl="",Fl="",Kl="",Gl="";const re=12,x={type:"success",timeout:5e3,showIcon:!0,showCloseButton:!0,position:"top-right",hideProgressBar:!1};function Kt(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 d(){l.startTime=Date.now(),clearTimeout(l.id),l.intervalId=setInterval(()=>{a.value--},n/100-5),l.id=setTimeout(t,l.remaining)}function i(){clearInterval(l.intervalId),clearTimeout(l.id),a.value=100}return e.onMounted(()=>{if(n<=0)return!1}),e.onUnmounted(()=>{i()}),{start:d,stop:o,clear:i,progress:a}}function Gt(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 ce=(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))(ce||{});const Ut={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Wt=[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 Yt(t,n){return e.openBlock(),e.createElementBlock("svg",Ut,Wt)}var jt={name:"mi-circle-check",render:Yt};const qt={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Jt=[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 Qt(t,n){return e.openBlock(),e.createElementBlock("svg",qt,Jt)}var Xt={name:"mi-circle-error",render:Qt};const Zt={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},vt=[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 _t(t,n){return e.openBlock(),e.createElementBlock("svg",Zt,vt)}var el={name:"mi-circle-warning",render:_t},jl="";const tl=["id","data-testid"],ll={class:"content-wrapper"},nl={key:0,class:"icon-container","aria-hidden":"true"},al={class:"content"},ol={key:0,class:"description"},il=["data-testid"],dl=e.defineComponent({__name:"Toast",props:{id:null,type:{default:x.type},visible:{type:Boolean,default:!1},title:null,description:null,timeout:null,hideProgressBar:{type:Boolean,default:x.hideProgressBar},showIcon:{type:Boolean,default:x.showIcon},offset:{default:0},onClose:null,onCloseHandler:null,position:{default:x.position}},setup(t){const n=t,{start:l,stop:a,progress:o}=Kt(()=>{var m;(m=n.onCloseHandler)==null||m.call(n)},n.timeout),{stylePosition:d}=Gt(()=>({offset:n.offset,position:n.position})),i=e.computed(()=>n.title&&n.description);function r(){n.timeout>0&&a()}function s(){l()}return e.onMounted(()=>{l()}),(m,$)=>(e.openBlock(),e.createBlock(e.Transition,{name:e.unref(ce)[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(d)),class:e.normalizeClass(["sol-toast-core",[`-${t.type}`,{"-multiline":e.unref(i)}]]),onKeyup:$[1]||($[1]=e.withKeys((...w)=>t.onCloseHandler&&t.onCloseHandler(...w),["esc"])),onMouseenter:r,onMouseleave:s,onFocusin:r,onFocusout:s},[e.createElementVNode("section",ll,[t.showIcon?(e.openBlock(),e.createElementBlock("div",nl,[e.renderSlot(m.$slots,"icon-status",{type:t.type},()=>[t.type==="success"?(e.openBlock(),e.createBlock(e.unref(jt),{key:0,class:"icon"})):e.createCommentVNode("",!0),t.type==="info"?(e.openBlock(),e.createBlock(e.unref(el),{key:1,class:"icon"})):e.createCommentVNode("",!0),t.type==="danger"?(e.openBlock(),e.createBlock(e.unref(Xt),{key:2,class:"icon"})):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),e.createElementVNode("div",al,[e.createElementVNode("p",{class:e.normalizeClass(["title",{"-multiline":e.unref(i)}])},[e.renderSlot(m.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)])],2),t.description?(e.openBlock(),e.createElementBlock("p",ol,[e.renderSlot(m.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(t.description),1)])])):e.createCommentVNode("",!0)])]),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["close",{"-multiline":e.unref(i)}]),"data-testid":`toast-close-button-${t.type}-${t.id}`,"aria-label":"close notification",onClick:$[0]||($[0]=(...w)=>t.onCloseHandler&&t.onCloseHandler(...w))},[e.createVNode(e.unref(de),{class:"icon"})],10,il),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,tl)):e.createCommentVNode("",!0)]),_:3},8,["name"]))}}),A={"top-left":[],"top-right":[],"top-center":[],"bottom-left":[],"bottom-right":[],"bottom-center":[]};function rl(){let t=0;function n(){Object.entries(A).forEach(([a,o])=>{o.length&&o.forEach(d=>{var r;const i=(r=d.toastVNode.props)==null?void 0:r.id;_(i,a)})})}return{createToast:(a,o)=>{const d=t++,i=o?cl(o):x;return o!=null&&o.showOneToast&&n(),sl(d,i,typeof a=="string"?{title:a}:a),{close:()=>_(d,i.position)}},clearAllToasts:n}}function cl(t){const n=te(R(R({},x),t),{showIcon:t.showIcon});return n.hideProgressBar=!!(n.timeout&&(n==null?void 0:n.timeout)<=0),t.hideProgressBar&&(n.hideProgressBar=t.hideProgressBar),n}function sl(t,n,l){setTimeout(()=>{const a=hl(n,A,re),o=document.createElement("div");document.body.appendChild(o);const d=e.createVNode(dl,ml(n,t,a,_,l));e.render(d,o),A[n.position].push({toastVNode:d,container:o}),d.component&&(d.component.props.visible=!0)},1)}function ml(t,n,l,a,o){return te(R(R({},t),o),{id:n,offset:l,visible:!1,onCloseHandler(){a(n,t.position?t.position:"top-right")}})}function hl(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 ul(t,n,l,a){for(let o=t;o<n.length;o++){const{toastVNode:d}=n[o];if(!d.el)return;const i=l.split("-")[0]||"top",r=parseInt(d.el.style[i],10)-a-re;if(!d.component)return;d.component.props.offset=r}}function _(t,n){var s;const l=A[n],a=l.findIndex(({toastVNode:m})=>{var $;return t===(($=m==null?void 0:m.props)==null?void 0:$.id)});if(a===-1)return;const{container:o,toastVNode:d}=l[a],i=(s=d==null?void 0:d.el)==null?void 0:s.offsetHeight;if(A[n].splice(a,1),ul(a,l,n,i),!d.component)return;const r=d.component.props;r.visible=!1,r.onClose&&r.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 ee={SolButton:H,SolInput:p,SolTextarea:K,SolTextfield:z,SolTextfieldPassword:F,SolRadio:M,SolRadioGroup:G,SolCheckbox:D,SolCheckboxGroup:U,SolSwitch:W,SolDropdown:j,SolSelect:q,SolChip:I,SolAccordion:J};function fl(t){for(const n in ee)t.component(n,ee[n])}f.SolAccordion=J,f.SolButton=H,f.SolCheckbox=D,f.SolCheckboxGroup=U,f.SolChip=I,f.SolDropdown=j,f.SolInput=p,f.SolRadio=M,f.SolRadioGroup=G,f.SolSelect=q,f.SolSwitch=W,f.SolTextarea=K,f.SolTextfield=z,f.SolTextfieldPassword=F,f.components=ee,f.install=fl,f.useToast=rl,Object.defineProperties(f,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(y,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(y=typeof globalThis<"u"?globalThis:y||self,e(y.girassol={},y.Vue))})(this,function(y,e){"use strict";const se=[e.createElementVNode("path",{class:"path",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"},null,-1)],re=e.defineComponent({__name:"CircleLoader",props:{size:{default:"large"},dark:{type:Boolean}},setup(t){return(n,l)=>(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["sol-inner-loader",`-${t.size}`]),viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},se,2))}}),Bl="",me=["data-testid","disabled"],he={class:"icon -left"},ue={class:"icon -right"},fe={key:0,class:"loading"},x=e.defineComponent({__name:"Button",props:{id:null,loading:{type:Boolean},onColor:{type:Boolean,default:!1},disabled:{type:Boolean},size:{default:"large"},variant:{default:"primary"}},setup(t){function n(i,d){return i?d:""}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,d)=>(e.openBlock(),e.createElementBlock("button",{"data-testid":`button-${t.id}`,class:e.normalizeClass(["sol-button-core",`-${t.variant} -${t.size}
|
|
2
|
+
${n(t.loading,"-loading-helper")}
|
|
3
|
+
${n(t.onColor,"-on-color")}
|
|
4
|
+
${n(e.unref(a),"-has-icon")}
|
|
5
|
+
${n(e.unref(o),"-only-icon")}
|
|
6
|
+
`]),type:"button",disabled:t.disabled||t.loading},[e.createElementVNode("div",he,[e.renderSlot(i.$slots,"icon-left")]),e.renderSlot(i.$slots,"default"),e.createElementVNode("div",ue,[e.renderSlot(i.$slots,"icon-right")]),t.loading?(e.openBlock(),e.createElementBlock("div",fe,[e.createVNode(re,{"data-testid":`button-loader-${t.id}`,size:t.size==="small"?"small":"medium",dark:t.onColor},null,8,["data-testid","size","dark"])])):e.createCommentVNode("",!0)],10,me))}}),wl="",$e={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1em",height:"1em"},be=[e.createElementVNode("path",{fill:"currentColor",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"},null,-1)];function ye(t,n){return e.openBlock(),e.createElementBlock("svg",$e,be)}const ge={name:"material-symbols-delete-outline",render:ye},Z=e.defineComponent({__name:"ButtonDestructive",props:{id:null,size:null,loading:{type:Boolean}},setup(t){return(n,l)=>(e.openBlock(),e.createBlock(x,{id:`destructive-${t.id}`,size:t.size,loading:t.loading,variant:"primary",class:"button-destructive"},{"icon-left":e.withCtx(()=>[e.createVNode(e.unref(ge))]),default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:3},8,["id","size","loading"]))}}),Sl="";x.install=t=>{t.component("SolButton",x)},Z.install=t=>{t.component("SolButton",x)};const ke=["id","data-testid","value"],V=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,d)=>(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,ke))}}),El="";V.install=t=>{t.component("SolInput",V)};const Be=["id","data-testid"],we=["for"],Ce={class:"container-input"},Se=["id"],Ee=["id"],T=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:d=>{n("update:modelValue",d)}});function o(d,s){return!!d&&!s}function i(d,s){return s?`error-${l.id}`:o(d,s)?`hint-${l.id}`:null}return(d,s)=>{var r;return e.openBlock(),e.createElementBlock("div",{id:`textfield-${t.id}`,"data-testid":`textfield-${t.id}`,class:e.normalizeClass([[`${(r=d.$props.class)!=null?r:""}`,{"-invert":t.invert}],"sol-textfield-core"])},[e.renderSlot(d.$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,we)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Ce,[e.renderSlot(d.$slots,"default",{},()=>[e.createVNode(V,e.mergeProps(d.$attrs,{id:t.id,modelValue:e.unref(a),"onUpdate:modelValue":s[0]||(s[0]=m=>e.isRef(a)?a.value=m: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(d.$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,Se)):t.error?(e.openBlock(),e.createElementBlock("span",{key:1,id:`error-${t.id}`,class:"error"},e.toDisplayString(t.error),9,Ee)):e.createCommentVNode("",!0)],10,Be)}}}),Vl="",Ve={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1em",height:"1em"},pe=[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 xe(t,n){return e.openBlock(),e.createElementBlock("svg",Ve,pe)}const Ne={name:"mi-eye",render:xe},ze={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1em",height:"1em"},Te=[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 Me(t,n){return e.openBlock(),e.createElementBlock("svg",ze,Te)}const De={name:"mi-eye-off",render:Me},Le=["aria-label"],R=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(T,{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(Ne),{"aria-hidden":"true"},null,512),[[e.vShow,n.value]]),e.withDirectives(e.createVNode(e.unref(De),{"aria-hidden":"true"},null,512),[[e.vShow,!n.value]])],8,Le)]),_:1},8,["id","type","label"]))}});T.install=t=>{t.component("SolTextfield",T)},R.install=t=>{t.component("SolTextfieldPassword",R)};const Pe=["id","data-testid"],Ae=["for"],Ie={class:"container-textarea"},Oe=["id","data-testid","invert","aria-invalid","aria-describedby"],Re=["id"],He=["id"],H=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:d=>{n("update:modelValue",d)}});function o(d,s){return!!d&&!s}function i(d,s){return s?`error-${l.id}`:o(d,s)?`hint-${l.id}`:null}return(d,s)=>{var r;return e.openBlock(),e.createElementBlock("div",{id:`textarea-${t.id}`,"data-testid":`textarea-${t.id}`,class:e.normalizeClass([[`${(r=d.$props.class)!=null?r:""}`,{"-invert":t.invert}],"sol-textarea-core"])},[e.renderSlot(d.$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,Ae)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Ie,[e.renderSlot(d.$slots,"default",{},()=>[e.withDirectives(e.createElementVNode("textarea",e.mergeProps(d.$attrs,{id:`input-${t.id}`,"onUpdate:modelValue":s[0]||(s[0]=m=>e.isRef(a)?a.value=m: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,Oe),[[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,Re)):t.error?(e.openBlock(),e.createElementBlock("span",{key:1,id:`error-${t.id}`,class:"error"},e.toDisplayString(t.error),9,He)):e.createCommentVNode("",!0)],10,Pe)}}}),Nl="";H.install=t=>{t.component("SolTextarea",H)};const Fe=["id","data-testid","checked","value","name"],Ke=["for"],M=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,Fe),e.createElementVNode("label",{class:"label",for:`radio-${t.name}-${t.id}`},e.toDisplayString(t.label),9,Ke)],2))}}),zl="",Ue=["aria-labelledby"],Ge=["id","data-testid"],Ye=["id"],We=["id"],F=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(s,r){return!!s&&!r}function o(s,r){return r?`error-${l.id}`:a(s,r)?`hint-${l.id}`:null}function i(s){return(l==null?void 0:l.modelValue)===s}function d(s){n("change",s.value),n("update:modelValue",s.value)}return(s,r)=>(e.openBlock(),e.createElementBlock("fieldset",{class:"sol-radio-group-core","aria-labelledby":`radio-group-title-${t.id}`},[e.renderSlot(s.$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,Ge)]),e.createElementVNode("ul",{class:e.normalizeClass(["container-radios",{"flex-col":t.direction==="column"}])},[e.renderSlot(s.$slots,"default",{radios:t.radios,direction:t.direction},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.radios,(m,f)=>{var w;return e.openBlock(),e.createElementBlock("li",{key:f},[e.createVNode(M,e.mergeProps(s.$attrs,{id:(w=m==null?void 0:m.id)!=null?w:`${m.value}`,class:["radio",{"mb-micro":t.direction==="column","mr-micro":t.direction==="row"}],name:m.name,value:m.value,label:m.label,checked:i(m.value),"aria-invalid":!!t.error,"aria-describedby":o(t.hint,t.error),onChange:b=>d(m)}),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,Ye)):t.error?(e.openBlock(),e.createElementBlock("p",{key:1,id:`error-${t.id}`,class:"error"},e.toDisplayString(t.error),9,We)):e.createCommentVNode("",!0)],8,Ue))}}),Tl="";M.install=t=>{t.component("SolRadio",M)},F.install=t=>{t.component("SolRadioGroup",F)};const je=["id","data-testid","checked","value","name"],qe=["for"],D=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,je),e.createElementVNode("label",{class:"label",for:`checkbox-${t.name}-${t.id}`},e.toDisplayString(t.label),9,qe)],2))}}),Ml="",Ze=["aria-labelledby"],Qe=["id","data-testid"],Je=["id"],Xe=["id"],K=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(r,m){return!!r&&!m}function o(r,m){return m?`error-${l.id}`:a(r,m)?`hint-${l.id}`:null}function i(r){var m;return(m=l==null?void 0:l.modelValue)==null?void 0:m.includes(r)}function d(r){return Array.isArray(l==null?void 0:l.modelValue)?[...l.modelValue,r]:[r]}function s(r){var f;n("change",r.value);const m=i(r.value)?(f=l.modelValue)==null?void 0:f.filter(w=>w!==r.value):d(r.value);n("update:modelValue",m)}return(r,m)=>(e.openBlock(),e.createElementBlock("fieldset",{class:"sol-checkbox-group-core","aria-labelledby":`checkbox-group-title-${t.id}`},[e.renderSlot(r.$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,Qe)]),e.createElementVNode("ul",{class:e.normalizeClass(["container-checkboxes",{"flex-col":t.direction==="column"}])},[e.renderSlot(r.$slots,"default",{checkboxes:t.checkboxes,direction:t.direction},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.checkboxes,(f,w)=>{var b;return e.openBlock(),e.createElementBlock("li",{key:w},[e.createVNode(D,e.mergeProps(r.$attrs,{id:(b=f==null?void 0:f.id)!=null?b:`${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:g=>s(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,Je)):t.error?(e.openBlock(),e.createElementBlock("p",{key:1,id:`error-${t.id}`,class:"error"},e.toDisplayString(t.error),9,Xe)):e.createCommentVNode("",!0)],8,Ze))}}),Dl="";D.install=t=>{t.component("SolCheckbox",D)},K.install=t=>{t.component("SolCheckboxGroup",K)};const _e=["id","for","data-testid"],ve={class:"switch-container"},et=["id","aria-checked","aria-labelledby","data-testid","checked","value","name"],tt=e.createElementVNode("span",{class:"ellipse"},null,-1),U=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,_e),e.createElementVNode("div",ve,[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,et),tt])],2))}}),Ll="";U.install=t=>{t.component("SolSwitch",U)};var ee;const L=typeof window<"u",lt=t=>typeof t=="string",Q=()=>{};L&&((ee=window==null?void 0:window.navigator)==null?void 0:ee.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function nt(t){return typeof t=="function"?t():e.unref(t)}function ot(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}function P(t){var n;const l=nt(t);return(n=l==null?void 0:l.$el)!=null?n:l}const te=L?window:void 0;L&&window.document,L&&window.navigator,L&&window.location;function G(...t){let n,l,a,o;if(lt(t[0])?([l,a,o]=t,n=te):[n,l,a,o]=t,!n)return Q;let i=Q;const d=e.watch(()=>P(n),r=>{i(),r&&(r.addEventListener(l,a,o),i=()=>{r.removeEventListener(l,a,o),i=Q})},{immediate:!0,flush:"post"}),s=()=>{d(),i()};return ot(s),s}function le(t,n,l={}){const{window:a=te,ignore:o,capture:i=!0,detectIframe:d=!1}=l;if(!a)return;const s=e.ref(!0);let r;const m=b=>{a.clearTimeout(r);const g=P(t),k=b.composedPath();!g||g===b.target||k.includes(g)||!s.value||o&&o.length>0&&o.some(S=>{const p=P(S);return p&&(b.target===p||k.includes(p))})||n(b)},f=[G(a,"click",m,{passive:!0,capture:i}),G(a,"pointerdown",b=>{const g=P(t);s.value=!!g&&!b.composedPath().includes(g)},{passive:!0}),G(a,"pointerup",b=>{if(b.button===0){const g=b.composedPath();b.composedPath=()=>g,r=a.setTimeout(()=>m(b),50)}},{passive:!0}),d&&G(a,"blur",b=>{var g;const k=P(t);((g=document.activeElement)==null?void 0:g.tagName)==="IFRAME"&&!(k!=null&&k.contains(document.activeElement))&&n(b)})].filter(Boolean);return()=>f.forEach(b=>b())}const J=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},X="__vueuse_ssr_handlers__";J[X]=J[X]||{},J[X];var ne;(function(t){t.UP="UP",t.RIGHT="RIGHT",t.DOWN="DOWN",t.LEFT="LEFT",t.NONE="NONE"})(ne||(ne={}));const at={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1em",height:"1em"},it=[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 dt(t,n){return e.openBlock(),e.createElementBlock("svg",at,it)}const oe={name:"mi-search",render:dt},ct=["data-testid"],st=["id","for"],rt=["id","disabled","data-testid","aria-expanded","aria-labelledby","aria-label","aria-controls","onClick"],mt={class:"dropdown-container"},ht=["id","data-testid","aria-multiselectable","aria-labelledby"],ut=["id","data-testid","selected","aria-selected","onClick","onKeyup"],ft={key:0,class:"no-data"},$t=e.createTextVNode(" Sem dados "),Y=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(""),d=e.computed(()=>{var c;return l.fetchOnSearch?l.options:(c=l.options)==null?void 0:c.filter(h=>typeof h=="string"?h.includes(i.value):h.name.includes(i.value))}),s=e.computed(()=>Array.isArray(l.selected)?l.selected.join(", ").trim():l.selected);le(a,()=>{o.value&&f()});function r(){l.disabled||(o.value?f():m())}function m(){o.value=!0}function f(){q(),n("closeDropdown")}function w(c){const h=new Set(l.selected);return h.has(c)?h.delete(c):h.add(c),[...h]}function b(c){const h=typeof c=="string"?c:c.value,u=l.isMultipleSelect?w(h):h;n("update:selected",u),l.closeOnSelect&&!l.isMultipleSelect&&f()}function g(c){return Array.isArray(l.selected)?typeof c=="string"?l.selected.includes(c):l.selected.includes(c.value):typeof c=="string"?c===l.selected:c.value===l.selected}const k=e.reactive({list:void 0,search:void 0}),S=e.reactive({id:"",index:0});function p({code:c}){const h=B=>{const C=B!=null?B:S.index;B!==void 0&&(S.index=B),setTimeout(()=>{var O,ce;const E=(O=k.list)==null?void 0:O.children[C];S.id=(ce=E==null?void 0:E.id)!=null?ce:"",E==null||E.focus()},0)},u=()=>{var B;l.searchable&&(S.index=0,(B=k==null?void 0:k.search)==null||B.focus())};switch(c){case"ArrowUp":return S.index>0&&(S.index-=1),h();case"ArrowDown":return o.value?(S.index<d.value.length-1&&(S.index+=1),h()):(m(),h(0));case"Home":return h(0);case"End":return h(l.options.length-1);case"Escape":return f();default:!["Enter","NumpadEnter","Space"].includes(c)&&u()}}function q(){o.value=!1,S.index=0,i.value=""}function z(c,h){return typeof c=="string"?c:c[h!=null?h:"value"]}function $(c,h){k[c]=h!=null?h:void 0}return(c,h)=>(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:p},[e.renderSlot(c.$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,st)]),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(r,["stop"])},[e.renderSlot(c.$slots,"toggle-dropdown",{toggle:{open:m,close:f,toggleDropdown:r},isOpen:o.value,select:b,selectedSanitized:e.unref(s),selected:t.selected},()=>[e.createTextVNode(e.toDisplayString(e.unref(s)||"Selecione"),1)])],8,rt),e.createVNode(e.Transition,{mode:"out-in",name:"dropdown"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",mt,[t.searchable?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["search-container",{"-loading":t.loading}])},[e.renderSlot(c.$slots,"search",{filter:i.value},()=>[e.createVNode(V,{id:`search-dropdown-${t.id}`,ref:u=>$("search",u==null?void 0:u.input),modelValue:i.value,"onUpdate:modelValue":h[0]||(h[0]=u=>i.value=u),"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":S.id,"aria-labelledby":`label-dropdown-${t.id}`,onClick:h[1]||(h[1]=e.withModifiers(()=>{},["stop"])),onInput:h[2]||(h[2]=u=>{var B;return n("search",(B=u.target)==null?void 0:B.value)})},null,8,["id","modelValue","data-testid","placeholder","aria-expanded","aria-owns","aria-controls","aria-activedescendant","aria-labelledby"]),e.createVNode(e.unref(oe),{"aria-hidden":"true",class:"icon"})])],2)):e.createCommentVNode("",!0),e.createElementVNode("ul",{id:`dropdown-list-${t.id}`,ref:u=>$("list",u),"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(d),(u,B)=>(e.openBlock(),e.createElementBlock("li",{id:`option-${t.id}-${z(u,"value")}`,key:B,"data-testid":`option-${t.id}-${z(u,"value")}`,role:"option",tabindex:"-1",class:"dropdown-item",style:e.normalizeStyle(`--item: ${B+1}`),selected:g(u),"aria-selected":g(u),onClick:C=>b(u),onKeyup:[e.withKeys(C=>b(u),["enter"]),e.withKeys(C=>b(u),["space"])]},[e.renderSlot(c.$slots,"default",{text:z(u,"name"),option:u,isSelect:g},()=>[e.createTextVNode(e.toDisplayString(z(u,"name")),1)])],44,ut))),128)),e.unref(d).length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",ft,[e.renderSlot(c.$slots,"no-data",{},()=>[$t])]))],8,ht)],512),[[e.vShow,o.value]])]),_:3})],42,ct))}}),Al="";Y.install=t=>{t.component("SolDropdown",Y)};const bt={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1em",height:"1em"},yt=[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 gt(t,n){return e.openBlock(),e.createElementBlock("svg",bt,yt)}const ae={name:"mi-close",render:gt},kt=["id","data-testid","title","aria-describedby","aria-disabled","onKeydown"],Bt=["id"],wt={class:"label"},A=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]=d=>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,Bt),e.createElementVNode("span",wt,[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(d=>n("close"),["stop"]))},[e.createVNode(e.unref(ae),{class:"icon"})])):e.createCommentVNode("",!0)],42,kt))}}),Ol="",Ct=["id","data-testid","aria-multiselectable","aria-labelledby"],St=["id","data-testid","selected","aria-selected","onClick","onKeyup"],Et={key:0,class:"no-data"},Vt=e.createTextVNode(" Sem dados "),pt=e.defineComponent({__name:"ListOption",props:{id:null,options:null,multiple:{type:Boolean},isSelected:null},emits:["select"],setup(t,{expose:n,emit:l}){const a=e.ref("");return n({list:a}),(o,i)=>(e.openBlock(),e.createElementBlock("ul",{id:`select-list-${t.id}`,ref_key:"list",ref:a,"data-testid":`select-list-${t.id}`,role:"listbox",tabindex:"-1","aria-multiselectable":t.multiple,"aria-labelledby":`select-label-${t.id}`,class:"select-list-core"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,(d,s)=>(e.openBlock(),e.createElementBlock("li",{id:`option-${t.id}-${d.value}`,key:s,"data-testid":`option-${t.id}-${d.value}`,role:"option",tabindex:"-1",class:"select-option-item",style:e.normalizeStyle(`--item: ${s+1}`),selected:t.isSelected(d),"aria-selected":t.isSelected(d),onClick:r=>l("select",d),onKeyup:[e.withKeys(r=>l("select",d),["enter"]),e.withKeys(r=>l("select",d),["space"])]},[e.renderSlot(o.$slots,"item-list",{text:d.name,value:d.value,option:d,isSelected:t.isSelected(d)},()=>[e.createTextVNode(e.toDisplayString(d.name),1)])],44,St))),128)),t.options.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",Et,[e.renderSlot(o.$slots,"no-data",{},()=>[Vt])]))],8,Ct))}}),Rl="",xt={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1em",height:"1em"},Nt=[e.createElementVNode("path",{fill:"currentColor",d:"m17 10l-5 6l-5-6h10z"},null,-1)];function zt(t,n){return e.openBlock(),e.createElementBlock("svg",xt,Nt)}const Tt={name:"mi-caret-down",render:zt},Mt=["data-testid"],Dt=["id"],Lt=["id","disabled","data-testid","aria-expanded","aria-labelledby","aria-label","aria-controls","onClick"],Pt={key:0,class:"container-tags"},At={key:1,class:"mr-micro placeholder-inline",tabindex:"-1"},It={class:"error"},Ot={class:"select-options-container"},W=e.defineComponent({__name:"Select",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},multiple:{type:Boolean},searchPlaceholder:null,selected:null,options:{default:()=>[]},error:null,placeholder:{default:"placeholder"}},emits:["closeDropdown","search","update:selected"],setup(t,{emit:n}){const l=t,a=e.ref(),o=e.ref(!1),i=e.ref(""),d=e.computed(()=>{var $;return l.fetchOnSearch?l.options:($=l.options)==null?void 0:$.filter(c=>c.name.includes(i.value))});le(a,()=>{o.value&&m()});function s(){l.disabled||(o.value?m():r())}function r(){o.value=!0}function m(){p(),n("closeDropdown")}function f($){if(Array.isArray(l.selected)){const c=l.selected.findIndex(({value:h})=>h===$.value);return c===-1?[...l.selected,$]:l.selected.filter((h,u)=>u!==c)}return[$]}function w($){l.multiple?n("update:selected",f($)):n("update:selected",$),l.closeOnSelect&&!l.multiple&&m()}function b($){var c;return Array.isArray(l.selected)?l.selected.some(({value:h})=>h===$.value):$.value===((c=l.selected)==null?void 0:c.value)}const g=e.reactive({list:void 0,search:void 0}),k=e.reactive({id:"",index:0});function S({code:$}){const c=u=>{const B=u!=null?u:k.index;u!==void 0&&(k.index=u),setTimeout(()=>{var E,O;const C=(E=g.list)==null?void 0:E.children[B];k.id=(O=C==null?void 0:C.id)!=null?O:"",C==null||C.focus()},0)},h=()=>{var u;l.searchable&&(k.index=0,(u=g==null?void 0:g.search)==null||u.focus())};switch($){case"ArrowUp":return k.index>0&&(k.index-=1),c();case"ArrowDown":return o.value?(k.index<l.options.length-1&&(k.index+=1),c()):(r(),c(0));case"Home":return c(0);case"End":return c(l.options.length-1);case"Escape":return m();default:!["Enter","NumpadEnter","Space"].includes($)&&h()}}function p(){o.value=!1,k.index=0,i.value=""}function q($){return c=>{g[$]=$==="search"?c==null?void 0:c.input:c==null?void 0:c.list}}function z(){var c;const $=l.selected;return(c=$==null?void 0:$.name)!=null?c:l.placeholder}return($,c)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"el",ref:a,class:e.normalizeClass(["sol-select-core",{"-smaller":t.smallerWidth}]),"data-testid":`select-${t.id}`,onKeydownPassive:S},[e.renderSlot($.$slots,"label",{id:`select-label-${t.id}`,for:`select-toggle-${t.id}`},()=>[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,id:`select-label-${t.id}`,class:e.normalizeClass(["label",{"-disabled":t.disabled}])},e.toDisplayString(t.label),11,Dt)):e.createCommentVNode("",!0)]),e.createElementVNode("button",{id:`select-toggle-${t.id}`,disabled:t.disabled,"data-testid":`select-toggle-${t.id}`,class:"select-button-toggle","aria-haspopup":"listbox","aria-expanded":o.value,"aria-labelledby":`select-label-${t.id}`,"aria-label":t.ariaLabel,"aria-controls":`select-list-${t.id}`,onClick:e.withModifiers(s,["stop"])},[e.renderSlot($.$slots,"toggle-dropdown",{toggle:{open:r,close:m,toggleDropdown:s},isOpen:o.value,select:w,selected:t.selected},()=>{var h;return[t.multiple&&Array.isArray(t.selected)&&((h=t.selected)==null?void 0:h.length)?(e.openBlock(),e.createElementBlock("div",Pt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.selected,(u,B)=>(e.openBlock(),e.createBlock(A,{id:u.value,key:B,label:u.name,onClick:e.withModifiers(C=>w(u),["stop"]),onClose:C=>w(u)},null,8,["id","label","onClick","onClose"]))),128))])):(e.openBlock(),e.createElementBlock("span",At,e.toDisplayString(z()),1)),e.createVNode(e.unref(Tt),{"aria-hidden":"true",tabindex:"-1",class:e.normalizeClass(["icon",{"-open":o.value}])},null,8,["class"])]})],8,Lt),e.createElementVNode("span",It,e.toDisplayString(t.error),1),e.createVNode(e.Transition,{mode:"out-in",name:"dropdown"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",Ot,[e.renderSlot($.$slots,"search",{},()=>[t.searchable?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["search-container",{"-loading":t.loading}])},[e.renderSlot($.$slots,"search",{filter:i.value},()=>[e.createVNode(V,{id:`select-search-${t.id}`,ref:q("search"),modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=h=>i.value=h),"data-testid":`select-search-${t.id}`,role:"combobox",class:"search","aria-autocomplete":"list",placeholder:t.searchPlaceholder,"aria-expanded":o.value,"aria-haspopup":"listbox","aria-owns":`select-list-${t.id}`,"aria-controls":`select-list-${t.id}`,"aria-activedescendant":k.id,"aria-labelledby":`select-label-${t.id}`,onClick:c[1]||(c[1]=e.withModifiers(()=>{},["stop"])),onInput:c[2]||(c[2]=h=>{var u;return n("search",(u=h.target)==null?void 0:u.value)})},null,8,["id","modelValue","data-testid","placeholder","aria-expanded","aria-owns","aria-controls","aria-activedescendant","aria-labelledby"]),e.createVNode(e.unref(oe),{"aria-hidden":"true",class:"icon"})])],2)):e.createCommentVNode("",!0),e.createVNode(pt,{id:t.id,ref:q("list"),options:e.unref(d),multiple:t.multiple,"is-selected":b,onSelect:w},{"item-list":e.withCtx(({text:h,value:u,option:B,isSelected:C})=>[e.renderSlot($.$slots,"default",{text:h,value:u,option:B,isSelected:C})]),"no-data":e.withCtx(()=>[e.renderSlot($.$slots,"no-data")]),_:3},8,["id","options","multiple"])])],512),[[e.vShow,o.value]])]),_:3})],42,Mt))}}),Fl="";W.install=t=>{t.component("SolSelect",W)},A.install=t=>{t.component("SolChip",A)};const Rt={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1em",height:"1em"},Ht=[e.createElementVNode("path",{fill:"currentColor",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"},null,-1)];function Ft(t,n){return e.openBlock(),e.createElementBlock("svg",Rt,Ht)}const Kt={name:"mi-chevron-up",render:Ft},Ut=["id","data-testid","aria-disabled"],Gt=["data-testid","tabindex"],Yt=["data-testid"],j=e.defineComponent({__name:"Accordion",props:{id:null,title:{default:"Title"},invert:{type:Boolean},disabled:{type:Boolean}},setup(t){return(n,l)=>(e.openBlock(),e.createElementBlock("details",{id:`accordion-${t.id}`,"data-testid":`accordion-${t.id}`,class:e.normalizeClass(["sol-accordion-core",{"-invert":t.invert,"-disabled":t.disabled}]),"aria-disabled":t.disabled},[e.createElementVNode("summary",{"data-testid":`accordion-title-${t.id}`,class:"summary",tabindex:t.disabled?-1:0},[e.renderSlot(n.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),e.createVNode(e.unref(Kt),{class:"icon","aria-hidden":"true"})],8,Gt),e.createElementVNode("div",{"data-testid":`accordion-content-${t.id}`,class:"container"},[e.renderSlot(n.$slots,"default")],8,Yt)],10,Ut))}}),Ul="";j.install=t=>{t.component("SolAccordion",j)};const Gl="",Yl="",Wl="",jl="",ie=12,N={type:"success",timeout:5e3,showIcon:!0,showCloseButton:!0,position:"top-right",hideProgressBar:!1};function Wt(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 d(){clearInterval(l.intervalId),clearTimeout(l.id),a.value=100}return e.onMounted(()=>{if(n<=0)return!1}),e.onUnmounted(()=>{d()}),{start:i,stop:o,clear:d,progress:a}}function jt(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 de=(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))(de||{});const qt={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1em",height:"1em"},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 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 Qt(t,n){return e.openBlock(),e.createElementBlock("svg",qt,Zt)}const Jt={name:"mi-circle-check",render:Qt},Xt={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1em",height:"1em"},_t=[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 vt(t,n){return e.openBlock(),e.createElementBlock("svg",Xt,_t)}const el={name:"mi-circle-error",render:vt},tl={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1em",height:"1em"},ll=[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 nl(t,n){return e.openBlock(),e.createElementBlock("svg",tl,ll)}const ol={name:"mi-circle-warning",render:nl},al=["id","data-testid"],il={class:"content-wrapper"},dl={key:0,class:"icon-container","aria-hidden":"true"},cl={class:"content"},sl={key:0,class:"description"},rl=["data-testid"],ml=e.defineComponent({__name:"Toast",props:{id:null,type:{default:N.type},visible:{type:Boolean,default:!1},title:null,description:null,timeout:null,hideProgressBar:{type:Boolean,default:N.hideProgressBar},showIcon:{type:Boolean,default:N.showIcon},offset:{default:0},onClose:null,onCloseHandler:null,position:{default:N.position}},setup(t){const n=t,{start:l,stop:a,progress:o}=Wt(()=>{var m;(m=n.onCloseHandler)==null||m.call(n)},n.timeout),{stylePosition:i}=jt(()=>({offset:n.offset,position:n.position})),d=e.computed(()=>n.title&&n.description);function s(){n.timeout>0&&a()}function r(){l()}return e.onMounted(()=>{l()}),(m,f)=>(e.openBlock(),e.createBlock(e.Transition,{name:e.unref(de)[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(d)}]]),onKeyup:f[1]||(f[1]=e.withKeys((...w)=>t.onCloseHandler&&t.onCloseHandler(...w),["esc"])),onMouseenter:s,onMouseleave:r,onFocusin:s,onFocusout:r},[e.createElementVNode("section",il,[t.showIcon?(e.openBlock(),e.createElementBlock("div",dl,[e.renderSlot(m.$slots,"icon-status",{type:t.type},()=>[t.type==="success"?(e.openBlock(),e.createBlock(e.unref(Jt),{key:0,class:"icon"})):e.createCommentVNode("",!0),t.type==="info"?(e.openBlock(),e.createBlock(e.unref(ol),{key:1,class:"icon"})):e.createCommentVNode("",!0),t.type==="danger"?(e.openBlock(),e.createBlock(e.unref(el),{key:2,class:"icon"})):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),e.createElementVNode("div",cl,[e.createElementVNode("p",{class:e.normalizeClass(["title",{"-multiline":e.unref(d)}])},[e.renderSlot(m.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)])],2),t.description?(e.openBlock(),e.createElementBlock("p",sl,[e.renderSlot(m.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(t.description),1)])])):e.createCommentVNode("",!0)])]),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["close",{"-multiline":e.unref(d)}]),"data-testid":`toast-close-button-${t.type}-${t.id}`,"aria-label":"close notification",onClick:f[0]||(f[0]=(...w)=>t.onCloseHandler&&t.onCloseHandler(...w))},[e.createVNode(e.unref(ae),{class:"icon"})],10,rl),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,al)):e.createCommentVNode("",!0)]),_:3},8,["name"]))}}),Jl="",I={"top-left":[],"top-right":[],"top-center":[],"bottom-left":[],"bottom-right":[],"bottom-center":[]};function hl(){let t=0;function n(){Object.entries(I).forEach(([a,o])=>{o.length&&o.forEach(i=>{var s;const d=(s=i.toastVNode.props)==null?void 0:s.id;_(d,a)})})}return{createToast:(a,o)=>{const i=t++,d=o?ul(o):N;return o!=null&&o.showOneToast&&n(),fl(i,d,typeof a=="string"?{title:a}:a),{close:()=>_(i,d.position)}},clearAllToasts:n}}function ul(t){const n={...N,...t,showIcon:t.showIcon};return n.hideProgressBar=!!(n.timeout&&(n==null?void 0:n.timeout)<=0),t.hideProgressBar&&(n.hideProgressBar=t.hideProgressBar),n}function fl(t,n,l){setTimeout(()=>{const a=bl(n,I,ie),o=document.createElement("div");document.body.appendChild(o);const i=e.createVNode(ml,$l(n,t,a,_,l));e.render(i,o),I[n.position].push({toastVNode:i,container:o}),i.component&&(i.component.props.visible=!0)},1)}function $l(t,n,l,a,o){return{...t,...o,id:n,offset:l,visible:!1,onCloseHandler(){a(n,t.position?t.position:"top-right")}}}function bl(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 yl(t,n,l,a){for(let o=t;o<n.length;o++){const{toastVNode:i}=n[o];if(!i.el)return;const d=l.split("-")[0]||"top",s=parseInt(i.el.style[d],10)-a-ie;if(!i.component)return;i.component.props.offset=s}}function _(t,n){var r;const l=I[n],a=l.findIndex(({toastVNode:m})=>{var f;return t===((f=m==null?void 0:m.props)==null?void 0:f.id)});if(a===-1)return;const{container:o,toastVNode:i}=l[a],d=(r=i==null?void 0:i.el)==null?void 0:r.offsetHeight;if(I[n].splice(a,1),yl(a,l,n,d),!i.component)return;const s=i.component.props;s.visible=!1,s.onClose&&s.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 v={SolButton:x,SolButtonDestructive:Z,SolInput:V,SolTextarea:H,SolTextfield:T,SolTextfieldPassword:R,SolRadio:M,SolRadioGroup:F,SolCheckbox:D,SolCheckboxGroup:K,SolSwitch:U,SolDropdown:Y,SolSelect:W,SolChip:A,SolAccordion:j};function gl(t){for(const n in v)t.component(n,v[n])}y.SolAccordion=j,y.SolButton=x,y.SolButtonDestructive=Z,y.SolCheckbox=D,y.SolCheckboxGroup=K,y.SolChip=A,y.SolDropdown=Y,y.SolInput=V,y.SolRadio=M,y.SolRadioGroup=F,y.SolSelect=W,y.SolSwitch=U,y.SolTextarea=H,y.SolTextfield=T,y.SolTextfieldPassword=R,y.components=v,y.install=gl,y.useToast=hl,Object.defineProperties(y,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|