@bobbykim/mcl-forms 0.12.3 → 0.13.0
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/index.d.ts +0 -1
- package/dist/mcl-forms.js +408 -419
- package/dist/mcl-forms.umd.cjs +2 -2
- package/package.json +2 -2
package/dist/mcl-forms.umd.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var
|
|
2
|
-
(function(M,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@bobbykim/manguito-theme"),require("@bobbykim/manguito-theme/directives"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["exports","vue","@bobbykim/manguito-theme","@bobbykim/manguito-theme/directives","@vueuse/core"],e):(M=typeof globalThis<"u"?globalThis:M||self,e(M.MclForms={},M.Vue,M.ManguitoTheme,M.ManguitoThemeDirectives,M.core))})(this,(function(M,e,v,et,tt){"use strict";const ot=["id"],nt={class:"text-xs text-danger"},X=e.defineComponent({__name:"FieldFeedback",props:{id:{},invalid:{type:Boolean,default:!1},text:{default:""}},setup(t){return(o,n)=>t.invalid?(e.openBlock(),e.createElementBlock("div",{key:0,id:t.id,role:"alert",class:"ml-3xs"},[e.renderSlot(o.$slots,"default",{},()=>[e.createElementVNode("span",nt,e.toDisplayString(t.text),1)])],8,ot)):e.createCommentVNode("",!0)}}),Ee=Symbol("mcl-field");let lt=0;const oe=t=>t!==void 0&&t!==""?t:void 0,Re=t=>oe(t)??oe(e.useId())??`mcl-field-${++lt}`,Me=(t,o,n)=>e.computed(()=>{const l=[];return t&&l.push(t),n.value&&o!==void 0&&l.push(o),l.length>0?l.join(" "):void 0}),rt=t=>{const o=Re(t.fieldId),n=e.computed(()=>e.toValue(t.invalid)??!1),l=`${o}-error`,a=t.hasHelpText?`${o}-description`:void 0,r={id:o,name:e.computed(()=>e.toValue(t.name)??o),errorId:l,descriptionId:a,invalid:n,required:e.computed(()=>e.toValue(t.required)??!1),disabled:e.computed(()=>e.toValue(t.disabled)??!1),describedBy:Me(a,l,n),feedbackOwnedByGroup:t.ownsFeedback,isGroupLabel:t.isGroupLabel};return e.provide(Ee,r),r},W=(t,o)=>{const n=e.inject(Ee,null),l=o?.rendersOwnFeedback??!0,a=Re(void 0),r=oe(t.id),i=n!==null&&!n.isGroupLabel?oe(n.id):void 0,s=r??i??a,d=n?.feedbackOwnedByGroup??!1,c=d?n.errorId:`${s}-error`,f=d||l,m=n?.descriptionId,u=e.computed(()=>t.invalid??n?.invalid.value??!1);return{id:s,name:e.computed(()=>t.name??e.toValue(n?.name)),errorId:c,descriptionId:m,invalid:u,required:e.computed(()=>t.required??n?.required.value??!1),disabled:e.computed(()=>t.disabled??n?.disabled.value??!1),describedBy:Me(m,f?c:void 0,u),feedbackOwnedByGroup:d,isGroupLabel:n?.isGroupLabel??!1}},at={key:0,class:"m-0 min-w-0 border-0 p-0"},it={key:0,class:"inline-block"},st=["id"],ct={key:1},dt=["for"],ft=["id"],ut=e.defineComponent({__name:"MclFormGroup",props:{fieldId:{},groupLabel:{type:Boolean,default:!1},label:{},helpText:{},invalidFeedback:{},invalid:{type:Boolean,default:void 0},required:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},textColor:{default:"dark-3"},textSize:{default:"md"},textBold:{type:Boolean,default:!1}},setup(t){const o=t,n=e.useSlots(),l=n["invalid-feedback"]!==void 0,a=o.helpText!==void 0||n.help!==void 0,r=o.invalidFeedback!==void 0||l,i=o.groupLabel,s=rt({fieldId:o.fieldId,invalid:()=>o.invalid,required:()=>o.required,disabled:()=>o.disabled,hasHelpText:a,ownsFeedback:r,isGroupLabel:i}),d=e.computed(()=>{const c=[v.generateClass.textColorVariant({color:o.textColor}),v.generateClass.bodyTextVariant({size:o.textSize})];return o.textBold&&c.push("font-bold"),c.join(" ")});return(c,f)=>e.unref(i)?(e.openBlock(),e.createElementBlock("fieldset",at,[t.label||c.$slots.label?(e.openBlock(),e.createElementBlock("legend",it,[e.renderSlot(c.$slots,"label",{},()=>[e.createElementVNode("span",{class:e.normalizeClass(["mb-2xs block",d.value])},e.toDisplayString(t.label),3)])])):e.createCommentVNode("",!0),e.unref(a)?(e.openBlock(),e.createElementBlock("p",{key:1,id:e.unref(s).descriptionId,class:"mb-2xs text-xs"},[e.renderSlot(c.$slots,"help",{},()=>[e.createTextVNode(e.toDisplayString(t.helpText),1)])],8,st)):e.createCommentVNode("",!0),e.renderSlot(c.$slots,"default"),e.unref(r)?(e.openBlock(),e.createBlock(X,{key:2,id:e.unref(s).errorId,invalid:e.unref(s).invalid.value,text:t.invalidFeedback},{default:e.withCtx(()=>[l?e.renderSlot(c.$slots,"invalid-feedback",{key:0}):e.createCommentVNode("",!0)]),_:3},8,["id","invalid","text"])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",ct,[t.label||c.$slots.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(s).id,class:"inline-block"},[e.renderSlot(c.$slots,"label",{},()=>[e.createElementVNode("span",{class:e.normalizeClass(["mb-2xs block",d.value])},e.toDisplayString(t.label),3)])],8,dt)):e.createCommentVNode("",!0),e.unref(a)?(e.openBlock(),e.createElementBlock("p",{key:1,id:e.unref(s).descriptionId,class:"mb-2xs text-xs"},[e.renderSlot(c.$slots,"help",{},()=>[e.createTextVNode(e.toDisplayString(t.helpText),1)])],8,ft)):e.createCommentVNode("",!0),e.renderSlot(c.$slots,"default"),e.unref(r)?(e.openBlock(),e.createBlock(X,{key:2,id:e.unref(s).errorId,invalid:e.unref(s).invalid.value,text:t.invalidFeedback},{default:e.withCtx(()=>[l?e.renderSlot(c.$slots,"invalid-feedback",{key:0}):e.createCommentVNode("",!0)]),_:3},8,["id","invalid","text"])):e.createCommentVNode("",!0)]))}}),Oe=e.defineComponent({__name:"XMark",props:{color:{default:"dark-4"},className:{default:""}},setup(t){const o=t,n=e.computed(()=>[v.generateClass.svgFillColorVariant({color:o.color}),o.className].filter(Boolean).join(" "));return(l,a)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512","aria-hidden":"true",focusable:"false",class:e.normalizeClass(n.value)},[...a[0]||(a[0]=[e.createElementVNode("path",{d:"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"},null,-1)])],2))}}),ne=t=>e.computed(()=>{const{bgColor:o,textColor:n,borderColor:l,showBorder:a,showShadow:r,rounded:i}=t,s=t.showHighlight??!1,d=[v.generateClass.bgColorVariant({color:o}),v.generateClass.textColorVariant({color:n})];return a&&d.push("border-2",v.generateClass.borderColorVariant({color:l})),s||d.push("focus-visible:ring-4 ring-offset-2 transition-all duration-300 ease-linear",v.generateClass.focusVisibleRingColorVariant({color:l})),r&&d.push("shadow-md"),i&&d.push("rounded-md"),d.join(" ")}),mt={class:"my-3xs mr-xs ml-3xs shrink-0"},pt=["aria-controls","disabled"],ht=["id","name","accept","required","disabled","aria-invalid","aria-describedby"],bt={key:0,class:"my-3xs mr-3xs self-stretch"},gt=["disabled"],yt=e.defineComponent({__name:"MclInputFile",props:e.mergeModels({id:{},name:{},accept:{default:"image/jpg,image/jpeg,image/png"},buttonText:{default:"Browse File"},buttonTextColor:{default:"dark-3"},buttonColor:{default:"light-4"},showBorder:{type:Boolean,default:!1},borderColor:{default:"light-4"},rounded:{type:Boolean,default:!1},bgColor:{default:"light-1"},textColor:{default:"black"},showShadow:{type:Boolean,default:!0},showClear:{type:Boolean,default:!1},invalidFeedback:{},invalid:{type:Boolean,default:void 0},required:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const o=t,n=e.useModel(t,"modelValue"),l=W(o),a=ne(o),r=e.ref(),i=e.ref(0),s=()=>{r.value?.click()},d=u=>{const p=u.target.files;n.value=p&&p.length>0?p[0]:null},c=()=>{n.value=null,i.value++},f=e.computed(()=>{const u=[v.generateClass.bgColorVariant({color:o.buttonColor}),v.generateClass.textColorVariant({color:o.buttonTextColor})];return o.rounded&&u.push("rounded-l-md"),u.join(" ")}),m=e.computed(()=>{const u=[v.generateClass.bgColorVariant({color:o.buttonColor})];return o.rounded&&u.push("rounded-r-md"),u.join(" ")});return(u,p)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",{class:e.normalizeClass(["flex items-center overflow-hidden",e.unref(a)])},[e.createElementVNode("div",mt,[e.createElementVNode("button",{type:"button","aria-controls":e.unref(l).id,disabled:e.unref(l).disabled.value,class:e.normalizeClass(["max-w-full px-xs py-2xs transition-all duration-200 ease-linear hover:bg-opacity-70 disabled:cursor-not-allowed disabled:opacity-50",f.value]),onClick:s},e.toDisplayString(t.buttonText),11,pt)]),(e.openBlock(),e.createElementBlock("input",{id:e.unref(l).id,ref_key:"inputRef",ref:r,key:i.value,type:"file",class:"w-full bg-transparent file:hidden",name:e.unref(l).name.value,accept:t.accept,required:e.unref(l).required.value,disabled:e.unref(l).disabled.value,"aria-invalid":e.unref(l).invalid.value||void 0,"aria-describedby":e.unref(l).describedBy.value,onChange:d},null,40,ht)),t.showClear?(e.openBlock(),e.createElementBlock("div",bt,[e.createElementVNode("button",{type:"button","aria-label":"Clear selected file",disabled:e.unref(l).disabled.value,class:e.normalizeClass(["flex h-full items-center px-xs py-2xs transition-all duration-200 ease-linear hover:bg-opacity-70 disabled:cursor-not-allowed disabled:opacity-50",m.value]),onClick:c},[e.createVNode(Oe,{color:t.buttonTextColor,"class-name":"h-xs"},null,8,["color"])],10,gt)])):e.createCommentVNode("",!0)],2),e.unref(l).feedbackOwnedByGroup?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(X,{key:0,id:e.unref(l).errorId,invalid:e.unref(l).invalid.value,text:t.invalidFeedback},{default:e.withCtx(()=>[u.$slots["invalid-feedback"]?e.renderSlot(u.$slots,"invalid-feedback",{key:0}):e.createCommentVNode("",!0)]),_:3},8,["id","invalid","text"]))]))}}),wt={sm:"h-xs w-xs before:h-2xs before:w-2xs",md:"h-sm w-sm before:h-[12px] before:w-[12px]",lg:"h-md w-md before:h-xs before:w-xs"},xt={sm:{"--switch-width":"30px","--switch-height":"17px","--slider-size":"13px","--gutter-size":"2px"},md:{"--switch-width":"45px","--switch-height":"25.5px","--slider-size":"19.5px","--gutter-size":"3px"},lg:{"--switch-width":"60px","--switch-height":"34px","--slider-size":"26px","--gutter-size":"4px"}},Ct="rounded-md before:rounded-[3px]",ye=t=>{const o=e.computed(()=>{const{bgColor:a,borderColor:r,indicatorColor:i,checkedBgColor:s,showShadow:d}=t,c=t.rounded??!1,f=[v.generateClass.bgColorVariant({color:a}),v.generateClass.borderColorVariant({color:r}),v.generateClass.beforeBgColorVariant({color:i}),v.generateClass.peerCheckedBgColorVariant({color:s}),"peer-focus-visible:ring-2 ring-offset-2",v.generateClass.peerFocusVisibleRingColorVariant({color:r})];return d&&f.push("drop-shadow-md"),c&&f.push(t.roundedClass??Ct),f.join(" ")}),n=e.computed(()=>wt[t.size]),l=e.computed(()=>({...xt[t.size]}));return{boxClass:o,sizeClass:n,switchVars:l}},kt={class:"relative inline-flex"},Bt=["id","name","value","required","disabled","aria-invalid","aria-describedby"],Vt=e.defineComponent({__name:"MclInputRadio",props:e.mergeModels({id:{},name:{},size:{default:"md"},bgColor:{default:"light-1"},checkedBgColor:{default:"success"},indicatorColor:{default:"light-1"},borderColor:{default:"dark-1"},showShadow:{type:Boolean,default:!1},value:{default:""},invalid:{type:Boolean,default:void 0},required:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0}},{modelValue:{default:null},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(t,{emit:o}){const n=t,l=e.useModel(t,"modelValue"),a=o,r=W(n,{rendersOwnFeedback:!1}),{boxClass:i,sizeClass:s}=ye(n),d=e.computed(()=>r.name.value??r.id),c=f=>{a("change",f)};return(f,m)=>(e.openBlock(),e.createElementBlock("div",kt,[e.withDirectives(e.createElementVNode("input",{id:e.unref(r).id,"onUpdate:modelValue":m[0]||(m[0]=u=>l.value=u),type:"radio",class:"peer absolute inset-0 z-10 h-full w-full cursor-pointer appearance-none opacity-0 disabled:cursor-not-allowed",name:d.value,value:t.value,required:e.unref(r).required.value,disabled:e.unref(r).disabled.value,"aria-invalid":e.unref(r).invalid.value||void 0,"aria-describedby":e.unref(r).describedBy.value,onChange:c},null,40,Bt),[[e.vModelRadio,l.value]]),e.createElementVNode("span",{"aria-hidden":"true",class:e.normalizeClass(["relative inline-block rounded-full border transition-colors duration-200 ease-linear peer-disabled:opacity-50 before:absolute before:top-1/2 before:left-1/2 before:-translate-x-1/2 before:-translate-y-1/2 before:rounded-full before:opacity-0 before:transition-opacity before:duration-200 peer-checked:before:opacity-100",[e.unref(i),e.unref(s)]])},null,2)]))}}),vt=["id","name","required","disabled","aria-invalid","aria-describedby"],St="rounded-full before:rounded-full",Et=e.defineComponent({__name:"MclInputSwitch",props:e.mergeModels({id:{},name:{},size:{default:"md"},bgColor:{default:"dark-1"},checkedBgColor:{default:"success"},indicatorColor:{default:"light-1"},borderColor:{default:"dark-1"},showShadow:{type:Boolean,default:!1},rounded:{type:Boolean,default:!0},invalid:{type:Boolean,default:void 0},required:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(t,{emit:o}){const n=t,l=e.useModel(t,"modelValue"),a=o,r=W(n,{rendersOwnFeedback:!1}),i={get size(){return n.size},get bgColor(){return n.bgColor},get checkedBgColor(){return n.checkedBgColor},get indicatorColor(){return n.indicatorColor},get borderColor(){return n.borderColor},get showShadow(){return n.showShadow},get rounded(){return n.rounded},roundedClass:St},{boxClass:s,switchVars:d}=ye(i),c=f=>{a("change",f)};return(f,m)=>(e.openBlock(),e.createElementBlock("div",{class:"switch relative",style:e.normalizeStyle(e.unref(d))},[e.withDirectives(e.createElementVNode("input",{id:e.unref(r).id,"onUpdate:modelValue":m[0]||(m[0]=u=>l.value=u),type:"checkbox",role:"switch",class:"peer absolute inset-0 z-10 h-full w-full cursor-pointer appearance-none opacity-0 disabled:cursor-not-allowed",name:e.unref(r).name.value,required:e.unref(r).required.value,disabled:e.unref(r).disabled.value,"aria-invalid":e.unref(r).invalid.value||void 0,"aria-describedby":e.unref(r).describedBy.value,onChange:c},null,40,vt),[[e.vModelCheckbox,l.value]]),e.createElementVNode("span",{"aria-hidden":"true",class:e.normalizeClass(["slider absolute inset-0 transition-all duration-300 peer-disabled:opacity-50 before:absolute before:transition-all before:duration-300",e.unref(s)])},null,2)],4))}}),$e=(t,o)=>{const n=t.__vccOpts||t;for(const[l,a]of o)n[l]=a;return n},Rt=$e(Et,[["__scopeId","data-v-784930f6"]]),Ae=e.defineComponent({__name:"InputHighlight",props:{color:{default:"primary"},rounded:{type:Boolean,default:!1},offset:{default:1}},setup(t){const o=t,n={1:"-top-1",2.5:"-top-2.5"},l=e.computed(()=>{const a=[v.generateClass.beforeBgColorVariant({color:o.color})];return o.rounded&&a.push("rounded-b-md"),a.push(n[o.offset]),a.join(" ")});return(a,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative h-3xs overflow-hidden before:absolute before:bottom-0 before:left-0 before:h-full before:w-0 before:transition-[width] before:duration-300 before:ease-linear peer-focus:before:w-full",l.value])},null,2))}}),Mt=["id","type","name","placeholder","autocomplete","minlength","maxlength","pattern","required","disabled","aria-invalid","aria-describedby"],Ot=e.defineComponent({__name:"MclInputText",props:e.mergeModels({id:{},name:{},type:{default:"text"},placeholder:{default:""},autocomplete:{},showBorder:{type:Boolean,default:!1},borderColor:{default:"light-4"},rounded:{type:Boolean,default:!1},showHighlight:{type:Boolean,default:!0},highlightColor:{default:"primary"},textColor:{default:"black"},bgColor:{default:"light-1"},showShadow:{type:Boolean,default:!0},invalidFeedback:{},minLength:{},maxLength:{},pattern:{},invalid:{type:Boolean,default:void 0},required:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const o=t,n=e.useModel(t,"modelValue"),l=W(o),a=ne(o);return(r,i)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("input",{id:e.unref(l).id,"onUpdate:modelValue":i[0]||(i[0]=s=>n.value=s),class:e.normalizeClass(["peer w-full p-2xs outline-none disabled:cursor-not-allowed disabled:opacity-50",e.unref(a)]),type:t.type,name:e.unref(l).name.value,placeholder:t.placeholder,autocomplete:t.autocomplete,minlength:t.minLength,maxlength:t.maxLength,pattern:t.pattern,required:e.unref(l).required.value,disabled:e.unref(l).disabled.value,"aria-invalid":e.unref(l).invalid.value||void 0,"aria-describedby":e.unref(l).describedBy.value},null,10,Mt),[[e.vModelDynamic,n.value]]),t.showHighlight?(e.openBlock(),e.createBlock(Ae,{key:0,color:t.highlightColor,rounded:t.rounded},null,8,["color","rounded"])):e.createCommentVNode("",!0),e.unref(l).feedbackOwnedByGroup?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(X,{key:1,id:e.unref(l).errorId,invalid:e.unref(l).invalid.value,text:t.invalidFeedback},{default:e.withCtx(()=>[r.$slots["invalid-feedback"]?e.renderSlot(r.$slots,"invalid-feedback",{key:0}):e.createCommentVNode("",!0)]),_:3},8,["id","invalid","text"]))]))}}),le=Math.min,j=Math.max,re=Math.round,ae=Math.floor,D=t=>({x:t,y:t}),$t={left:"right",right:"left",bottom:"top",top:"bottom"},At={start:"end",end:"start"};function Ne(t,o,n){return j(t,le(o,n))}function ie(t,o){return typeof t=="function"?t(o):t}function G(t){return t.split("-")[0]}function se(t){return t.split("-")[1]}function Fe(t){return t==="x"?"y":"x"}function Le(t){return t==="y"?"height":"width"}const Nt=new Set(["top","bottom"]);function P(t){return Nt.has(G(t))?"y":"x"}function De(t){return Fe(P(t))}function Ft(t,o,n){n===void 0&&(n=!1);const l=se(t),a=De(t),r=Le(a);let i=a==="x"?l===(n?"end":"start")?"right":"left":l==="start"?"bottom":"top";return o.reference[r]>o.floating[r]&&(i=ce(i)),[i,ce(i)]}function Lt(t){const o=ce(t);return[we(t),o,we(o)]}function we(t){return t.replace(/start|end/g,o=>At[o])}const Ie=["left","right"],Te=["right","left"],Dt=["top","bottom"],It=["bottom","top"];function Tt(t,o,n){switch(t){case"top":case"bottom":return n?o?Te:Ie:o?Ie:Te;case"left":case"right":return o?Dt:It;default:return[]}}function zt(t,o,n,l){const a=se(t);let r=Tt(G(t),n==="start",l);return a&&(r=r.map(i=>i+"-"+a),o&&(r=r.concat(r.map(we)))),r}function ce(t){return t.replace(/left|right|bottom|top/g,o=>$t[o])}function qt(t){return{top:0,right:0,bottom:0,left:0,...t}}function Pt(t){return typeof t!="number"?qt(t):{top:t,right:t,bottom:t,left:t}}function de(t){const{x:o,y:n,width:l,height:a}=t;return{width:l,height:a,top:n,left:o,right:o+l,bottom:n+a,x:o,y:n}}function ze(t,o,n){let{reference:l,floating:a}=t;const r=P(o),i=De(o),s=Le(i),d=G(o),c=r==="y",f=l.x+l.width/2-a.width/2,m=l.y+l.height/2-a.height/2,u=l[s]/2-a[s]/2;let p;switch(d){case"top":p={x:f,y:l.y-a.height};break;case"bottom":p={x:f,y:l.y+l.height};break;case"right":p={x:l.x+l.width,y:m};break;case"left":p={x:l.x-a.width,y:m};break;default:p={x:l.x,y:l.y}}switch(se(o)){case"start":p[i]-=u*(n&&c?-1:1);break;case"end":p[i]+=u*(n&&c?-1:1);break}return p}async function _t(t,o){var n;o===void 0&&(o={});const{x:l,y:a,platform:r,rects:i,elements:s,strategy:d}=t,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:m="floating",altBoundary:u=!1,padding:p=0}=ie(o,t),h=Pt(p),y=s[u?m==="floating"?"reference":"floating":m],b=de(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(y)))==null||n?y:y.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(s.floating)),boundary:c,rootBoundary:f,strategy:d})),x=m==="floating"?{x:l,y:a,width:i.floating.width,height:i.floating.height}:i.reference,C=await(r.getOffsetParent==null?void 0:r.getOffsetParent(s.floating)),B=await(r.isElement==null?void 0:r.isElement(C))?await(r.getScale==null?void 0:r.getScale(C))||{x:1,y:1}:{x:1,y:1},R=de(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:C,strategy:d}):x);return{top:(b.top-R.top+h.top)/B.y,bottom:(R.bottom-b.bottom+h.bottom)/B.y,left:(b.left-R.left+h.left)/B.x,right:(R.right-b.right+h.right)/B.x}}const Ht=async(t,o,n)=>{const{placement:l="bottom",strategy:a="absolute",middleware:r=[],platform:i}=n,s=r.filter(Boolean),d=await(i.isRTL==null?void 0:i.isRTL(o));let c=await i.getElementRects({reference:t,floating:o,strategy:a}),{x:f,y:m}=ze(c,l,d),u=l,p={},h=0;for(let y=0;y<s.length;y++){var g;const{name:b,fn:x}=s[y],{x:C,y:B,data:R,reset:E}=await x({x:f,y:m,initialPlacement:l,placement:u,strategy:a,middlewareData:p,rects:c,platform:{...i,detectOverflow:(g=i.detectOverflow)!=null?g:_t},elements:{reference:t,floating:o}});f=C??f,m=B??m,p={...p,[b]:{...p[b],...R}},E&&h<=50&&(h++,typeof E=="object"&&(E.placement&&(u=E.placement),E.rects&&(c=E.rects===!0?await i.getElementRects({reference:t,floating:o,strategy:a}):E.rects),{x:f,y:m}=ze(c,u,d)),y=-1)}return{x:f,y:m,placement:u,strategy:a,middlewareData:p}},Wt=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(o){var n,l;const{placement:a,middlewareData:r,rects:i,initialPlacement:s,platform:d,elements:c}=o,{mainAxis:f=!0,crossAxis:m=!0,fallbackPlacements:u,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...y}=ie(t,o);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const b=G(a),x=P(s),C=G(s)===s,B=await(d.isRTL==null?void 0:d.isRTL(c.floating)),R=u||(C||!g?[ce(s)]:Lt(s)),E=h!=="none";!u&&E&&R.push(...zt(s,g,h,B));const k=[s,...R],$=await d.detectOverflow(o,y),q=[];let H=((l=r.flip)==null?void 0:l.overflows)||[];if(f&&q.push($[b]),m){const z=Ft(a,i,B);q.push($[z[0]],$[z[1]])}if(H=[...H,{placement:a,overflows:q}],!q.every(z=>z<=0)){var be,te;const z=(((be=r.flip)==null?void 0:be.index)||0)+1,w=k[z];if(w&&(!(m==="alignment"?x!==P(w):!1)||H.every(O=>P(O.placement)===x?O.overflows[0]>0:!0)))return{data:{index:z,overflows:H},reset:{placement:w}};let V=(te=H.filter(S=>S.overflows[0]<=0).sort((S,O)=>S.overflows[1]-O.overflows[1])[0])==null?void 0:te.placement;if(!V)switch(p){case"bestFit":{var ge;const S=(ge=H.filter(O=>{if(E){const N=P(O.placement);return N===x||N==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(N=>N>0).reduce((N,jo)=>N+jo,0)]).sort((O,N)=>O[1]-N[1])[0])==null?void 0:ge[0];S&&(V=S);break}case"initialPlacement":V=s;break}if(a!==V)return{reset:{placement:V}}}return{}}}},jt=new Set(["left","top"]);async function Gt(t,o){const{placement:n,platform:l,elements:a}=t,r=await(l.isRTL==null?void 0:l.isRTL(a.floating)),i=G(n),s=se(n),d=P(n)==="y",c=jt.has(i)?-1:1,f=r&&d?-1:1,m=ie(o,t);let{mainAxis:u,crossAxis:p,alignmentAxis:h}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return s&&typeof h=="number"&&(p=s==="end"?h*-1:h),d?{x:p*f,y:u*c}:{x:u*c,y:p*f}}const Ut=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(o){var n,l;const{x:a,y:r,placement:i,middlewareData:s}=o,d=await Gt(o,t);return i===((n=s.offset)==null?void 0:n.placement)&&(l=s.arrow)!=null&&l.alignmentOffset?{}:{x:a+d.x,y:r+d.y,data:{...d,placement:i}}}}},Kt=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(o){const{x:n,y:l,placement:a,platform:r}=o,{mainAxis:i=!0,crossAxis:s=!1,limiter:d={fn:b=>{let{x,y:C}=b;return{x,y:C}}},...c}=ie(t,o),f={x:n,y:l},m=await r.detectOverflow(o,c),u=P(G(a)),p=Fe(u);let h=f[p],g=f[u];if(i){const b=p==="y"?"top":"left",x=p==="y"?"bottom":"right",C=h+m[b],B=h-m[x];h=Ne(C,h,B)}if(s){const b=u==="y"?"top":"left",x=u==="y"?"bottom":"right",C=g+m[b],B=g-m[x];g=Ne(C,g,B)}const y=d.fn({...o,[p]:h,[u]:g});return{...y,data:{x:y.x-n,y:y.y-l,enabled:{[p]:i,[u]:s}}}}}};function fe(){return typeof window<"u"}function U(t){return xe(t)?(t.nodeName||"").toLowerCase():"#document"}function A(t){var o;return(t==null||(o=t.ownerDocument)==null?void 0:o.defaultView)||window}function I(t){var o;return(o=(xe(t)?t.ownerDocument:t.document)||window.document)==null?void 0:o.documentElement}function xe(t){return fe()?t instanceof Node||t instanceof A(t).Node:!1}function F(t){return fe()?t instanceof Element||t instanceof A(t).Element:!1}function T(t){return fe()?t instanceof HTMLElement||t instanceof A(t).HTMLElement:!1}function qe(t){return!fe()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof A(t).ShadowRoot}const Xt=new Set(["inline","contents"]);function J(t){const{overflow:o,overflowX:n,overflowY:l,display:a}=L(t);return/auto|scroll|overlay|hidden|clip/.test(o+l+n)&&!Xt.has(a)}const Yt=new Set(["table","td","th"]);function Zt(t){return Yt.has(U(t))}const Jt=[":popover-open",":modal"];function ue(t){return Jt.some(o=>{try{return t.matches(o)}catch{return!1}})}const Qt=["transform","translate","scale","rotate","perspective"],eo=["transform","translate","scale","rotate","perspective","filter"],to=["paint","layout","strict","content"];function Ce(t){const o=ke(),n=F(t)?L(t):t;return Qt.some(l=>n[l]?n[l]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!o&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!o&&(n.filter?n.filter!=="none":!1)||eo.some(l=>(n.willChange||"").includes(l))||to.some(l=>(n.contain||"").includes(l))}function oo(t){let o=_(t);for(;T(o)&&!Y(o);){if(Ce(o))return o;if(ue(o))return null;o=_(o)}return null}function ke(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const no=new Set(["html","body","#document"]);function Y(t){return no.has(U(t))}function L(t){return A(t).getComputedStyle(t)}function me(t){return F(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function _(t){if(U(t)==="html")return t;const o=t.assignedSlot||t.parentNode||qe(t)&&t.host||I(t);return qe(o)?o.host:o}function Pe(t){const o=_(t);return Y(o)?t.ownerDocument?t.ownerDocument.body:t.body:T(o)&&J(o)?o:Pe(o)}function Q(t,o,n){var l;o===void 0&&(o=[]),n===void 0&&(n=!0);const a=Pe(t),r=a===((l=t.ownerDocument)==null?void 0:l.body),i=A(a);if(r){const s=Be(i);return o.concat(i,i.visualViewport||[],J(a)?a:[],s&&n?Q(s):[])}return o.concat(a,Q(a,[],n))}function Be(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function _e(t){const o=L(t);let n=parseFloat(o.width)||0,l=parseFloat(o.height)||0;const a=T(t),r=a?t.offsetWidth:n,i=a?t.offsetHeight:l,s=re(n)!==r||re(l)!==i;return s&&(n=r,l=i),{width:n,height:l,$:s}}function Ve(t){return F(t)?t:t.contextElement}function Z(t){const o=Ve(t);if(!T(o))return D(1);const n=o.getBoundingClientRect(),{width:l,height:a,$:r}=_e(o);let i=(r?re(n.width):n.width)/l,s=(r?re(n.height):n.height)/a;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const lo=D(0);function He(t){const o=A(t);return!ke()||!o.visualViewport?lo:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function ro(t,o,n){return o===void 0&&(o=!1),!n||o&&n!==A(t)?!1:o}function K(t,o,n,l){o===void 0&&(o=!1),n===void 0&&(n=!1);const a=t.getBoundingClientRect(),r=Ve(t);let i=D(1);o&&(l?F(l)&&(i=Z(l)):i=Z(t));const s=ro(r,n,l)?He(r):D(0);let d=(a.left+s.x)/i.x,c=(a.top+s.y)/i.y,f=a.width/i.x,m=a.height/i.y;if(r){const u=A(r),p=l&&F(l)?A(l):l;let h=u,g=Be(h);for(;g&&l&&p!==h;){const y=Z(g),b=g.getBoundingClientRect(),x=L(g),C=b.left+(g.clientLeft+parseFloat(x.paddingLeft))*y.x,B=b.top+(g.clientTop+parseFloat(x.paddingTop))*y.y;d*=y.x,c*=y.y,f*=y.x,m*=y.y,d+=C,c+=B,h=A(g),g=Be(h)}}return de({width:f,height:m,x:d,y:c})}function pe(t,o){const n=me(t).scrollLeft;return o?o.left+n:K(I(t)).left+n}function We(t,o){const n=t.getBoundingClientRect(),l=n.left+o.scrollLeft-pe(t,n),a=n.top+o.scrollTop;return{x:l,y:a}}function ao(t){let{elements:o,rect:n,offsetParent:l,strategy:a}=t;const r=a==="fixed",i=I(l),s=o?ue(o.floating):!1;if(l===i||s&&r)return n;let d={scrollLeft:0,scrollTop:0},c=D(1);const f=D(0),m=T(l);if((m||!m&&!r)&&((U(l)!=="body"||J(i))&&(d=me(l)),T(l))){const p=K(l);c=Z(l),f.x=p.x+l.clientLeft,f.y=p.y+l.clientTop}const u=i&&!m&&!r?We(i,d):D(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-d.scrollLeft*c.x+f.x+u.x,y:n.y*c.y-d.scrollTop*c.y+f.y+u.y}}function io(t){return Array.from(t.getClientRects())}function so(t){const o=I(t),n=me(t),l=t.ownerDocument.body,a=j(o.scrollWidth,o.clientWidth,l.scrollWidth,l.clientWidth),r=j(o.scrollHeight,o.clientHeight,l.scrollHeight,l.clientHeight);let i=-n.scrollLeft+pe(t);const s=-n.scrollTop;return L(l).direction==="rtl"&&(i+=j(o.clientWidth,l.clientWidth)-a),{width:a,height:r,x:i,y:s}}const je=25;function co(t,o){const n=A(t),l=I(t),a=n.visualViewport;let r=l.clientWidth,i=l.clientHeight,s=0,d=0;if(a){r=a.width,i=a.height;const f=ke();(!f||f&&o==="fixed")&&(s=a.offsetLeft,d=a.offsetTop)}const c=pe(l);if(c<=0){const f=l.ownerDocument,m=f.body,u=getComputedStyle(m),p=f.compatMode==="CSS1Compat"&&parseFloat(u.marginLeft)+parseFloat(u.marginRight)||0,h=Math.abs(l.clientWidth-m.clientWidth-p);h<=je&&(r-=h)}else c<=je&&(r+=c);return{width:r,height:i,x:s,y:d}}const fo=new Set(["absolute","fixed"]);function uo(t,o){const n=K(t,!0,o==="fixed"),l=n.top+t.clientTop,a=n.left+t.clientLeft,r=T(t)?Z(t):D(1),i=t.clientWidth*r.x,s=t.clientHeight*r.y,d=a*r.x,c=l*r.y;return{width:i,height:s,x:d,y:c}}function Ge(t,o,n){let l;if(o==="viewport")l=co(t,n);else if(o==="document")l=so(I(t));else if(F(o))l=uo(o,n);else{const a=He(t);l={x:o.x-a.x,y:o.y-a.y,width:o.width,height:o.height}}return de(l)}function Ue(t,o){const n=_(t);return n===o||!F(n)||Y(n)?!1:L(n).position==="fixed"||Ue(n,o)}function mo(t,o){const n=o.get(t);if(n)return n;let l=Q(t,[],!1).filter(s=>F(s)&&U(s)!=="body"),a=null;const r=L(t).position==="fixed";let i=r?_(t):t;for(;F(i)&&!Y(i);){const s=L(i),d=Ce(i);!d&&s.position==="fixed"&&(a=null),(r?!d&&!a:!d&&s.position==="static"&&!!a&&fo.has(a.position)||J(i)&&!d&&Ue(t,i))?l=l.filter(f=>f!==i):a=s,i=_(i)}return o.set(t,l),l}function po(t){let{element:o,boundary:n,rootBoundary:l,strategy:a}=t;const i=[...n==="clippingAncestors"?ue(o)?[]:mo(o,this._c):[].concat(n),l],s=i[0],d=i.reduce((c,f)=>{const m=Ge(o,f,a);return c.top=j(m.top,c.top),c.right=le(m.right,c.right),c.bottom=le(m.bottom,c.bottom),c.left=j(m.left,c.left),c},Ge(o,s,a));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function ho(t){const{width:o,height:n}=_e(t);return{width:o,height:n}}function bo(t,o,n){const l=T(o),a=I(o),r=n==="fixed",i=K(t,!0,r,o);let s={scrollLeft:0,scrollTop:0};const d=D(0);function c(){d.x=pe(a)}if(l||!l&&!r)if((U(o)!=="body"||J(a))&&(s=me(o)),l){const p=K(o,!0,r,o);d.x=p.x+o.clientLeft,d.y=p.y+o.clientTop}else a&&c();r&&!l&&a&&c();const f=a&&!l&&!r?We(a,s):D(0),m=i.left+s.scrollLeft-d.x-f.x,u=i.top+s.scrollTop-d.y-f.y;return{x:m,y:u,width:i.width,height:i.height}}function ve(t){return L(t).position==="static"}function Ke(t,o){if(!T(t)||L(t).position==="fixed")return null;if(o)return o(t);let n=t.offsetParent;return I(t)===n&&(n=n.ownerDocument.body),n}function Xe(t,o){const n=A(t);if(ue(t))return n;if(!T(t)){let a=_(t);for(;a&&!Y(a);){if(F(a)&&!ve(a))return a;a=_(a)}return n}let l=Ke(t,o);for(;l&&Zt(l)&&ve(l);)l=Ke(l,o);return l&&Y(l)&&ve(l)&&!Ce(l)?n:l||oo(t)||n}const go=async function(t){const o=this.getOffsetParent||Xe,n=this.getDimensions,l=await n(t.floating);return{reference:bo(t.reference,await o(t.floating),t.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}};function yo(t){return L(t).direction==="rtl"}const wo={convertOffsetParentRelativeRectToViewportRelativeRect:ao,getDocumentElement:I,getClippingRect:po,getOffsetParent:Xe,getElementRects:go,getClientRects:io,getDimensions:ho,getScale:Z,isElement:F,isRTL:yo};function Ye(t,o){return t.x===o.x&&t.y===o.y&&t.width===o.width&&t.height===o.height}function xo(t,o){let n=null,l;const a=I(t);function r(){var s;clearTimeout(l),(s=n)==null||s.disconnect(),n=null}function i(s,d){s===void 0&&(s=!1),d===void 0&&(d=1),r();const c=t.getBoundingClientRect(),{left:f,top:m,width:u,height:p}=c;if(s||o(),!u||!p)return;const h=ae(m),g=ae(a.clientWidth-(f+u)),y=ae(a.clientHeight-(m+p)),b=ae(f),C={rootMargin:-h+"px "+-g+"px "+-y+"px "+-b+"px",threshold:j(0,le(1,d))||1};let B=!0;function R(E){const k=E[0].intersectionRatio;if(k!==d){if(!B)return i();k?i(!1,k):l=setTimeout(()=>{i(!1,1e-7)},1e3)}k===1&&!Ye(c,t.getBoundingClientRect())&&i(),B=!1}try{n=new IntersectionObserver(R,{...C,root:a.ownerDocument})}catch{n=new IntersectionObserver(R,C)}n.observe(t)}return i(!0),r}function Co(t,o,n,l){l===void 0&&(l={});const{ancestorScroll:a=!0,ancestorResize:r=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:d=!1}=l,c=Ve(t),f=a||r?[...c?Q(c):[],...Q(o)]:[];f.forEach(b=>{a&&b.addEventListener("scroll",n,{passive:!0}),r&&b.addEventListener("resize",n)});const m=c&&s?xo(c,n):null;let u=-1,p=null;i&&(p=new ResizeObserver(b=>{let[x]=b;x&&x.target===c&&p&&(p.unobserve(o),cancelAnimationFrame(u),u=requestAnimationFrame(()=>{var C;(C=p)==null||C.observe(o)})),n()}),c&&!d&&p.observe(c),p.observe(o));let h,g=d?K(t):null;d&&y();function y(){const b=K(t);g&&!Ye(g,b)&&n(),g=b,h=requestAnimationFrame(y)}return n(),()=>{var b;f.forEach(x=>{a&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),m?.(),(b=p)==null||b.disconnect(),p=null,d&&cancelAnimationFrame(h)}}const ko=Ut,Bo=Kt,Vo=Wt,vo=(t,o,n)=>{const l=new Map,a={platform:wo,...n},r={...a.platform,_c:l};return Ht(t,o,{...a,platform:r})};function So(t){return t!=null&&typeof t=="object"&&"$el"in t}function Ze(t){if(So(t)){const o=t.$el;return xe(o)&&U(o)==="#comment"?null:o}return t}function ee(t){return typeof t=="function"?t():e.unref(t)}function Je(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Qe(t,o){const n=Je(t);return Math.round(o*n)/n}function Eo(t,o,n){n===void 0&&(n={});const l=n.whileElementsMounted,a=e.computed(()=>{var k;return(k=ee(n.open))!=null?k:!0}),r=e.computed(()=>ee(n.middleware)),i=e.computed(()=>{var k;return(k=ee(n.placement))!=null?k:"bottom"}),s=e.computed(()=>{var k;return(k=ee(n.strategy))!=null?k:"absolute"}),d=e.computed(()=>{var k;return(k=ee(n.transform))!=null?k:!0}),c=e.computed(()=>Ze(t.value)),f=e.computed(()=>Ze(o.value)),m=e.ref(0),u=e.ref(0),p=e.ref(s.value),h=e.ref(i.value),g=e.shallowRef({}),y=e.ref(!1),b=e.computed(()=>{const k={position:p.value,left:"0",top:"0"};if(!f.value)return k;const $=Qe(f.value,m.value),q=Qe(f.value,u.value);return d.value?{...k,transform:"translate("+$+"px, "+q+"px)",...Je(f.value)>=1.5&&{willChange:"transform"}}:{position:p.value,left:$+"px",top:q+"px"}});let x;function C(){if(c.value==null||f.value==null)return;const k=a.value;vo(c.value,f.value,{middleware:r.value,placement:i.value,strategy:s.value}).then($=>{m.value=$.x,u.value=$.y,p.value=$.strategy,h.value=$.placement,g.value=$.middlewareData,y.value=k!==!1})}function B(){typeof x=="function"&&(x(),x=void 0)}function R(){if(B(),l===void 0){C();return}if(c.value!=null&&f.value!=null){x=l(c.value,f.value,C);return}}function E(){a.value||(y.value=!1)}return e.watch([r,i,s,a],C,{flush:"sync"}),e.watch([c,f],R,{flush:"sync"}),e.watch(a,E,{flush:"sync"}),e.getCurrentScope()&&e.onScopeDispose(B),{x:e.shallowReadonly(m),y:e.shallowReadonly(u),strategy:e.shallowReadonly(p),placement:e.shallowReadonly(h),middlewareData:e.shallowReadonly(g),isPositioned:e.shallowReadonly(y),floatingStyles:b,update:C}}const Ro=e.defineComponent({__name:"CaretDown",props:{color:{default:"dark-4"},className:{default:""}},setup(t){const o=t,n=e.computed(()=>[v.generateClass.svgFillColorVariant({color:o.color}),o.className].filter(Boolean).join(" "));return(l,a)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512","aria-hidden":"true",focusable:"false",class:e.normalizeClass(n.value)},[...a[0]||(a[0]=[e.createElementVNode("path",{d:"M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"},null,-1)])],2))}}),Mo=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),he=t=>typeof t=="string"?t:t.text,Se=t=>typeof t=="string"?t:t.value,Oo=(t,o)=>e.computed(()=>{const n=e.toValue(t),l=e.toValue(o);if(l==="")return n;const a=new RegExp(Mo(l),"i");return n.filter(r=>a.test(he(r)))}),$o=t=>{const{isOpen:o,activeIndex:n,onSelect:l,onClear:a,onActiveChange:r}=t,i=f=>{const m=e.toValue(t.optionCount);if(m<=0){n.value=-1;return}const u=Math.max(0,Math.min(f,m-1));n.value=u,r?.(u)},s=()=>{o.value=!1,n.value=-1},d=f=>{switch(f.key){case"ArrowDown":if(f.preventDefault(),!o.value){o.value=!0;return}if(f.altKey)return;i(n.value+1);return;case"ArrowUp":if(f.preventDefault(),!o.value){o.value=!0;return}i(n.value<0?e.toValue(t.optionCount)-1:n.value-1);return;case"Home":if(!o.value)return;f.preventDefault(),i(0);return;case"End":if(!o.value)return;f.preventDefault(),i(e.toValue(t.optionCount)-1);return;case"Enter":if(!o.value||n.value<0)return;f.preventDefault(),l(n.value);return;case"Escape":if(o.value){s();return}a();return;case"Tab":o.value&&s();return;default:return}},c=e.computed(()=>o.value&&n.value>=0?`${e.toValue(t.idPrefix)}-option-${n.value}`:void 0);return{onKeydown:d,activeDescendantId:c}},Ao=["id","placeholder","disabled","aria-expanded","aria-controls","aria-activedescendant","aria-required","aria-invalid","aria-describedby"],No=["disabled"],Fo=["disabled"],Lo=["id"],Do=["id","aria-selected","onClick","onMouseenter"],Io=["id"],To=["name","value"],zo=$e(e.defineComponent({__name:"MclSelect",props:e.mergeModels({options:{},id:{},name:{},placeholder:{default:""},showBorder:{type:Boolean,default:!1},borderColor:{default:"light-4"},rounded:{type:Boolean,default:!1},showHighlight:{type:Boolean,default:!0},highlightColor:{default:"primary"},textColor:{default:"black"},bgColor:{default:"light-1"},iconColor:{default:"dark-4"},optionHoverColor:{default:"primary"},showShadow:{type:Boolean,default:!0},noMatchText:{default:"No match."},invalidFeedback:{},invalid:{type:Boolean,default:void 0},required:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0}},{modelValue:{default:null},modelModifiers:{}}),emits:e.mergeModels(["open","close","clear","changed","select"],["update:modelValue"]),setup(t,{emit:o}){const n=t,l=e.useModel(t,"modelValue"),a=o,r=W(n),i=ne(n),s=e.ref(),d=e.ref(),c=e.ref(),f=e.ref([]),m=e.ref(),u=e.ref(!1),p=e.ref(-1),h=w=>{if(w===null||w==="")return"";const V=n.options.find(S=>Se(S)===w);return V?he(V):String(w)},g=e.ref(h(l.value)),y=e.ref(!1),b=Oo(()=>n.options,()=>y.value?g.value:""),x=(w,V)=>{f.value[V]=w},C=w=>{f.value[w]?.scrollIntoView?.({block:"nearest"})},B=()=>{u.value||(u.value=!0,y.value=!1,p.value=-1)},R=()=>{u.value=!1,p.value=-1},E=w=>{g.value=he(w);const V=Se(w);l.value=V,y.value=!1,u.value=!1,p.value=-1,a("select",V)},k=()=>{g.value="",p.value=-1,l.value=null,y.value=!1,a("clear"),d.value?.focus()},{onKeydown:$,activeDescendantId:q}=$o({isOpen:u,activeIndex:p,optionCount:()=>b.value.length,idPrefix:()=>r.id,onSelect:w=>{const V=b.value[w];V!==void 0&&E(V)},onClear:k,onActiveChange:C}),H=()=>{if(u.value){R();return}B(),d.value?.focus()},be=e.computed(()=>{const w=[v.generateClass.beforeBgColorVariant({color:n.highlightColor})];return n.rounded&&w.push("rounded-b-md"),w.join(" ")}),te=e.computed(()=>{const w=[v.generateClass.bgColorVariant({color:n.bgColor}),v.generateClass.borderColorVariant({color:n.borderColor})];return n.showHighlight||w.push("mt-2xs"),n.rounded&&w.push("rounded-md"),w.join(" ")}),ge=w=>l.value!==null&&l.value!==""&&Se(w)===l.value,{floatingStyles:z}=Eo(s,c,{whileElementsMounted:Co,strategy:"absolute",open:u,transform:!1,placement:"bottom",middleware:[Vo(),ko(-2.2),Bo()]});return tt.useResizeObserver(s,()=>{s.value&&(m.value=s.value.clientWidth)}),e.watch(b,()=>{p.value=-1}),e.watch(u,w=>{if(w){a("open");return}y.value&&(g.value=h(l.value),y.value=!1),a("close")}),e.watch(()=>r.disabled.value,w=>{w&&R()}),e.watch(()=>n.options,()=>{y.value||(g.value=h(l.value))}),e.watch(l,w=>{g.value=h(w),y.value=!1,w!==null&&a("changed",w)}),(w,V)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{ref_key:"rootRef",ref:s,class:"relative"},[e.createElementVNode("div",{class:e.normalizeClass(["relative flex gap-3xs p-2xs",[e.unref(i),!t.showHighlight&&u.value&&e.unref(v.generateClass).ringColorVariant({color:t.borderColor})+" ring-4"]])},[e.withDirectives(e.createElementVNode("input",{id:e.unref(r).id,ref_key:"inputRef",ref:d,"onUpdate:modelValue":V[0]||(V[0]=S=>g.value=S),type:"text",role:"combobox",autocomplete:"off",class:"w-full bg-transparent outline-none disabled:cursor-not-allowed",placeholder:t.placeholder,disabled:e.unref(r).disabled.value,"aria-autocomplete":"list","aria-expanded":u.value,"aria-controls":`${e.unref(r).id}-listbox`,"aria-activedescendant":e.unref(q),"aria-required":e.unref(r).required.value||void 0,"aria-invalid":e.unref(r).invalid.value||void 0,"aria-describedby":e.unref(r).describedBy.value,onFocus:B,onInput:V[1]||(V[1]=S=>y.value=!0),onKeydown:V[2]||(V[2]=(...S)=>e.unref($)&&e.unref($)(...S))},null,40,Ao),[[e.vModelText,g.value]]),g.value!==""?(e.openBlock(),e.createElementBlock("button",{key:0,"data-mcl":"clear",type:"button","aria-label":"Clear selection",class:"flex items-center px-3xs",disabled:e.unref(r).disabled.value,onClick:k},[e.createVNode(Oe,{color:t.iconColor,"class-name":"h-xs opacity-70"},null,8,["color"])],8,No)):e.createCommentVNode("",!0),e.createElementVNode("button",{"data-mcl":"caret",type:"button",tabindex:"-1","aria-label":"Toggle options",class:"flex items-center px-3xs",disabled:e.unref(r).disabled.value,onClick:H},[e.createVNode(Ro,{color:t.iconColor,"class-name":`h-xs transition-transform duration-300 ease-in ${u.value?"rotate-180":"rotate-0"}`},null,8,["color","class-name"])],8,Fo)],2),t.showHighlight?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["relative -top-1 h-3xs overflow-hidden before:absolute before:bottom-0 before:left-0 before:h-full before:transition-[width] before:duration-300 before:ease-linear",[u.value?"before:w-full":"before:w-0",be.value]])},null,2)):e.createCommentVNode("",!0),e.createVNode(e.Transition,{name:"options"},{default:e.withCtx(()=>[u.value&&e.unref(b).length>0?(e.openBlock(),e.createElementBlock("ul",{key:0,id:`${e.unref(r).id}-listbox`,ref_key:"dropdownRef",ref:c,role:"listbox",class:e.normalizeClass(["max-h-[12.5rem] overflow-y-auto border-2",te.value]),style:e.normalizeStyle({width:`${m.value}px`,...e.unref(z)})},[e.renderSlot(w.$slots,"dropdown",{options:e.unref(b),activeIndex:p.value,optionClick:E,setRef:x,hover:S=>p.value=S,optionId:S=>`${e.unref(r).id}-option-${S}`},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(b),(S,O)=>(e.openBlock(),e.createElementBlock("li",{id:`${e.unref(r).id}-option-${O}`,key:O,ref_for:!0,ref:N=>x(N,O),role:"option",class:e.normalizeClass(["cursor-pointer p-2xs",[p.value===O&&e.unref(v.generateClass).bgColorVariant({color:t.optionHoverColor})]]),"aria-selected":ge(S),onClick:N=>E(S),onMouseenter:N=>p.value=O},e.toDisplayString(e.unref(he)(S)),43,Do))),128))],!0)],14,Lo)):e.createCommentVNode("",!0)]),_:3}),u.value&&e.unref(b).length===0?(e.openBlock(),e.createElementBlock("div",{key:1,id:`${e.unref(r).id}-listbox`,ref_key:"dropdownRef",ref:c,role:"status",class:e.normalizeClass(["border-2 p-2xs",te.value]),style:e.normalizeStyle({width:`${m.value}px`,...e.unref(z)})},[e.renderSlot(w.$slots,"no-match",{},()=>[e.createElementVNode("span",null,e.toDisplayString(t.noMatchText),1)],!0)],14,Io)):e.createCommentVNode("",!0),e.unref(r).name.value?(e.openBlock(),e.createElementBlock("input",{key:2,type:"hidden",name:e.unref(r).name.value,value:l.value??""},null,8,To)):e.createCommentVNode("",!0),e.unref(r).feedbackOwnedByGroup?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(X,{key:3,id:e.unref(r).errorId,invalid:e.unref(r).invalid.value,text:t.invalidFeedback},{default:e.withCtx(()=>[w.$slots["invalid-feedback"]?e.renderSlot(w.$slots,"invalid-feedback",{key:0},void 0,!0):e.createCommentVNode("",!0)]),_:3},8,["id","invalid","text"]))])),[[e.unref(et.vClickOutside),R]])}}),[["__scopeId","data-v-2695c901"]]),qo=["id","name","rows","placeholder","required","disabled","aria-invalid","aria-describedby"],Po=e.defineComponent({__name:"MclTextArea",props:e.mergeModels({id:{},name:{},placeholder:{default:""},rows:{default:5},showBorder:{type:Boolean,default:!1},borderColor:{default:"light-4"},rounded:{type:Boolean,default:!1},showHighlight:{type:Boolean,default:!0},highlightColor:{default:"primary"},textColor:{default:"black"},bgColor:{default:"light-1"},showShadow:{type:Boolean,default:!0},invalidFeedback:{},invalid:{type:Boolean,default:void 0},required:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const o=t,n=e.useModel(t,"modelValue"),l=W(o),a=ne(o);return(r,i)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("textarea",{id:e.unref(l).id,"onUpdate:modelValue":i[0]||(i[0]=s=>n.value=s),class:e.normalizeClass(["peer w-full p-2xs outline-none disabled:cursor-not-allowed disabled:opacity-50",e.unref(a)]),name:e.unref(l).name.value,rows:t.rows,placeholder:t.placeholder,required:e.unref(l).required.value,disabled:e.unref(l).disabled.value,"aria-invalid":e.unref(l).invalid.value||void 0,"aria-describedby":e.unref(l).describedBy.value},null,10,qo),[[e.vModelText,n.value]]),t.showHighlight?(e.openBlock(),e.createBlock(Ae,{key:0,color:t.highlightColor,rounded:t.rounded,offset:2.5},null,8,["color","rounded"])):e.createCommentVNode("",!0),e.unref(l).feedbackOwnedByGroup?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(X,{key:1,id:e.unref(l).errorId,invalid:e.unref(l).invalid.value,text:t.invalidFeedback},{default:e.withCtx(()=>[r.$slots["invalid-feedback"]?e.renderSlot(r.$slots,"invalid-feedback",{key:0}):e.createCommentVNode("",!0)]),_:3},8,["id","invalid","text"]))]))}}),_o={class:"relative inline-flex"},Ho=["id","name","value","required","disabled","aria-invalid","aria-describedby"],Wo=e.defineComponent({__name:"MclCheckbox",props:e.mergeModels({id:{},name:{},size:{default:"md"},bgColor:{default:"light-1"},checkedBgColor:{default:"warning"},indicatorColor:{default:"dark-3"},borderColor:{default:"dark-1"},showShadow:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},value:{},invalid:{type:Boolean,default:void 0},required:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(t,{emit:o}){const n=t,l=e.useModel(t,"modelValue"),a=o,r=W(n,{rendersOwnFeedback:!1}),{boxClass:i,sizeClass:s}=ye(n),d=c=>{a("change",c)};return(c,f)=>(e.openBlock(),e.createElementBlock("div",_o,[e.withDirectives(e.createElementVNode("input",{id:e.unref(r).id,"onUpdate:modelValue":f[0]||(f[0]=m=>l.value=m),type:"checkbox",class:"peer absolute inset-0 z-10 h-full w-full cursor-pointer appearance-none opacity-0 disabled:cursor-not-allowed",name:e.unref(r).name.value,value:t.value,required:e.unref(r).required.value,disabled:e.unref(r).disabled.value,"aria-invalid":e.unref(r).invalid.value||void 0,"aria-describedby":e.unref(r).describedBy.value,onChange:d},null,40,Ho),[[e.vModelCheckbox,l.value]]),e.createElementVNode("span",{"aria-hidden":"true",class:e.normalizeClass(["relative inline-block border p-3xs transition-colors duration-200 ease-linear peer-disabled:opacity-50 before:absolute before:top-1/2 before:left-1/2 before:-translate-x-1/2 before:-translate-y-1/2 before:opacity-0 before:transition-opacity before:duration-200 peer-checked:before:opacity-100",[e.unref(i),e.unref(s)]])},null,2)]))}});M.MclCheckbox=Wo,M.MclFormGroup=ut,M.MclInputFile=yt,M.MclInputRadio=Vt,M.MclInputSwitch=Rt,M.MclInputText=Ot,M.MclSelect=zo,M.MclTextArea=Po,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"})}));
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.switch[data-v-784930f6]{width:var(--switch-width);height:var(--switch-height)}.slider[data-v-784930f6]:before{content:"";height:var(--slider-size);width:var(--slider-size);left:var(--gutter-size);bottom:var(--gutter-size)}input:checked+.slider[data-v-784930f6]:before{transform:translate(var(--slider-size))}.options-enter-active[data-v-1c4c7f20],.options-leave-active[data-v-1c4c7f20]{opacity:1;transition:opacity .3s linear,transform .3s linear}.options-enter-from[data-v-1c4c7f20],.options-leave-to[data-v-1c4c7f20]{opacity:0;transform:translateY(-10px)}.options-leave-active[data-v-1c4c7f20]{pointer-events:none}@media(prefers-reduced-motion:reduce){.options-enter-active[data-v-1c4c7f20],.options-leave-active[data-v-1c4c7f20]{transition:opacity .3s linear}.options-enter-from[data-v-1c4c7f20],.options-leave-to[data-v-1c4c7f20]{transform:none}}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
+
(function(M,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@bobbykim/manguito-theme"),require("@bobbykim/manguito-theme/directives"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["exports","vue","@bobbykim/manguito-theme","@bobbykim/manguito-theme/directives","@vueuse/core"],e):(M=typeof globalThis<"u"?globalThis:M||self,e(M.MclForms={},M.Vue,M.ManguitoTheme,M.ManguitoThemeDirectives,M.core))})(this,(function(M,e,S,et,tt){"use strict";const ot=["id"],nt={class:"text-xs text-danger"},X=e.defineComponent({__name:"FieldFeedback",props:{id:{},invalid:{type:Boolean,default:!1},text:{default:""}},setup(t){return(o,n)=>t.invalid?(e.openBlock(),e.createElementBlock("div",{key:0,id:t.id,role:"alert",class:"ml-3xs"},[e.renderSlot(o.$slots,"default",{},()=>[e.createElementVNode("span",nt,e.toDisplayString(t.text),1)])],8,ot)):e.createCommentVNode("",!0)}}),Ee=Symbol("mcl-field");let lt=0;const oe=t=>t!==void 0&&t!==""?t:void 0,Re=t=>oe(t)??oe(e.useId())??`mcl-field-${++lt}`,Me=(t,o,n)=>e.computed(()=>{const l=[];return t&&l.push(t),n.value&&o!==void 0&&l.push(o),l.length>0?l.join(" "):void 0}),rt=t=>{const o=Re(t.fieldId),n=e.computed(()=>e.toValue(t.invalid)??!1),l=`${o}-error`,a=t.hasHelpText?`${o}-description`:void 0,r={id:o,name:e.computed(()=>e.toValue(t.name)??o),errorId:l,descriptionId:a,invalid:n,required:e.computed(()=>e.toValue(t.required)??!1),disabled:e.computed(()=>e.toValue(t.disabled)??!1),describedBy:Me(a,l,n),feedbackOwnedByGroup:t.ownsFeedback,isGroupLabel:t.isGroupLabel};return e.provide(Ee,r),r},W=(t,o)=>{const n=e.inject(Ee,null),l=o?.rendersOwnFeedback??!0,a=Re(void 0),r=oe(t.id),i=n!==null&&!n.isGroupLabel?oe(n.id):void 0,s=r??i??a,d=n?.feedbackOwnedByGroup??!1,c=d?n.errorId:`${s}-error`,f=d||l,m=n?.descriptionId,u=e.computed(()=>t.invalid??n?.invalid.value??!1);return{id:s,name:e.computed(()=>t.name??e.toValue(n?.name)),errorId:c,descriptionId:m,invalid:u,required:e.computed(()=>t.required??n?.required.value??!1),disabled:e.computed(()=>t.disabled??n?.disabled.value??!1),describedBy:Me(m,f?c:void 0,u),feedbackOwnedByGroup:d,isGroupLabel:n?.isGroupLabel??!1}},at={key:0,class:"m-0 min-w-0 border-0 p-0"},it={key:0,class:"inline-block"},st=["id"],ct={key:1},dt=["for"],ft=["id"],ut=e.defineComponent({__name:"MclFormGroup",props:{fieldId:{},groupLabel:{type:Boolean,default:!1},label:{},helpText:{},invalidFeedback:{},invalid:{type:Boolean,default:void 0},required:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},textColor:{default:"dark-3"},textSize:{default:"md"},textBold:{type:Boolean,default:!1}},setup(t){const o=t,n=e.useSlots(),l=n["invalid-feedback"]!==void 0,a=o.helpText!==void 0||n.help!==void 0,r=o.invalidFeedback!==void 0||l,i=o.groupLabel,s=rt({fieldId:o.fieldId,invalid:()=>o.invalid,required:()=>o.required,disabled:()=>o.disabled,hasHelpText:a,ownsFeedback:r,isGroupLabel:i}),d=e.computed(()=>{const c=[S.generateClass.textColorVariant({color:o.textColor}),S.generateClass.bodyTextVariant({size:o.textSize})];return o.textBold&&c.push("font-bold"),c.join(" ")});return(c,f)=>e.unref(i)?(e.openBlock(),e.createElementBlock("fieldset",at,[t.label||c.$slots.label?(e.openBlock(),e.createElementBlock("legend",it,[e.renderSlot(c.$slots,"label",{},()=>[e.createElementVNode("span",{class:e.normalizeClass(["mb-2xs block",d.value])},e.toDisplayString(t.label),3)])])):e.createCommentVNode("",!0),e.unref(a)?(e.openBlock(),e.createElementBlock("p",{key:1,id:e.unref(s).descriptionId,class:"mb-2xs text-xs"},[e.renderSlot(c.$slots,"help",{},()=>[e.createTextVNode(e.toDisplayString(t.helpText),1)])],8,st)):e.createCommentVNode("",!0),e.renderSlot(c.$slots,"default"),e.unref(r)?(e.openBlock(),e.createBlock(X,{key:2,id:e.unref(s).errorId,invalid:e.unref(s).invalid.value,text:t.invalidFeedback},{default:e.withCtx(()=>[l?e.renderSlot(c.$slots,"invalid-feedback",{key:0}):e.createCommentVNode("",!0)]),_:3},8,["id","invalid","text"])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",ct,[t.label||c.$slots.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(s).id,class:"inline-block"},[e.renderSlot(c.$slots,"label",{},()=>[e.createElementVNode("span",{class:e.normalizeClass(["mb-2xs block",d.value])},e.toDisplayString(t.label),3)])],8,dt)):e.createCommentVNode("",!0),e.unref(a)?(e.openBlock(),e.createElementBlock("p",{key:1,id:e.unref(s).descriptionId,class:"mb-2xs text-xs"},[e.renderSlot(c.$slots,"help",{},()=>[e.createTextVNode(e.toDisplayString(t.helpText),1)])],8,ft)):e.createCommentVNode("",!0),e.renderSlot(c.$slots,"default"),e.unref(r)?(e.openBlock(),e.createBlock(X,{key:2,id:e.unref(s).errorId,invalid:e.unref(s).invalid.value,text:t.invalidFeedback},{default:e.withCtx(()=>[l?e.renderSlot(c.$slots,"invalid-feedback",{key:0}):e.createCommentVNode("",!0)]),_:3},8,["id","invalid","text"])):e.createCommentVNode("",!0)]))}}),$e=e.defineComponent({__name:"XMark",props:{color:{default:"dark-4"},className:{default:""}},setup(t){const o=t,n=e.computed(()=>[S.generateClass.svgFillColorVariant({color:o.color}),o.className].filter(Boolean).join(" "));return(l,a)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512","aria-hidden":"true",focusable:"false",class:e.normalizeClass(n.value)},[...a[0]||(a[0]=[e.createElementVNode("path",{d:"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"},null,-1)])],2))}}),ne=t=>e.computed(()=>{const{bgColor:o,textColor:n,borderColor:l,showBorder:a,showShadow:r,rounded:i}=t,s=[S.generateClass.bgColorVariant({color:o}),S.generateClass.textColorVariant({color:n})];return a&&s.push("border-2",S.generateClass.borderColorVariant({color:l})),s.push("focus-visible:mcl-focus-ring"),r&&s.push("shadow-md"),i&&s.push("rounded-md"),s.join(" ")}),mt={class:"my-3xs mr-xs ml-3xs shrink-0"},pt=["aria-controls","disabled"],ht=["id","name","accept","required","disabled","aria-invalid","aria-describedby"],bt={key:0,class:"my-3xs mr-3xs self-stretch"},gt=["disabled"],yt=e.defineComponent({__name:"MclInputFile",props:e.mergeModels({id:{},name:{},accept:{default:"image/jpg,image/jpeg,image/png"},buttonText:{default:"Browse File"},buttonTextColor:{default:"dark-3"},buttonColor:{default:"light-4"},showBorder:{type:Boolean,default:!1},borderColor:{default:"light-4"},rounded:{type:Boolean,default:!1},bgColor:{default:"light-1"},textColor:{default:"black"},showShadow:{type:Boolean,default:!0},showClear:{type:Boolean,default:!1},invalidFeedback:{},invalid:{type:Boolean,default:void 0},required:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const o=t,n=e.useModel(t,"modelValue"),l=W(o),a=ne(o),r=e.ref(),i=e.ref(0),s=()=>{r.value?.click()},d=u=>{const p=u.target.files;n.value=p&&p.length>0?p[0]:null},c=()=>{n.value=null,i.value++},f=e.computed(()=>{const u=[S.generateClass.bgColorVariant({color:o.buttonColor}),S.generateClass.textColorVariant({color:o.buttonTextColor})];return o.rounded&&u.push("rounded-l-md"),u.join(" ")}),m=e.computed(()=>{const u=[S.generateClass.bgColorVariant({color:o.buttonColor})];return o.rounded&&u.push("rounded-r-md"),u.join(" ")});return(u,p)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",{class:e.normalizeClass(["flex items-center overflow-hidden",e.unref(a)])},[e.createElementVNode("div",mt,[e.createElementVNode("button",{type:"button","aria-controls":e.unref(l).id,disabled:e.unref(l).disabled.value,class:e.normalizeClass(["max-w-full px-xs py-2xs transition-all duration-200 ease-linear hover:bg-opacity-70 disabled:cursor-not-allowed disabled:opacity-50",f.value]),onClick:s},e.toDisplayString(t.buttonText),11,pt)]),(e.openBlock(),e.createElementBlock("input",{id:e.unref(l).id,ref_key:"inputRef",ref:r,key:i.value,type:"file",class:"w-full bg-transparent file:hidden",name:e.unref(l).name.value,accept:t.accept,required:e.unref(l).required.value,disabled:e.unref(l).disabled.value,"aria-invalid":e.unref(l).invalid.value||void 0,"aria-describedby":e.unref(l).describedBy.value,onChange:d},null,40,ht)),t.showClear?(e.openBlock(),e.createElementBlock("div",bt,[e.createElementVNode("button",{type:"button","aria-label":"Clear selected file",disabled:e.unref(l).disabled.value,class:e.normalizeClass(["flex h-full items-center px-xs py-2xs transition-all duration-200 ease-linear hover:bg-opacity-70 disabled:cursor-not-allowed disabled:opacity-50",m.value]),onClick:c},[e.createVNode($e,{color:t.buttonTextColor,"class-name":"h-xs"},null,8,["color"])],10,gt)])):e.createCommentVNode("",!0)],2),e.unref(l).feedbackOwnedByGroup?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(X,{key:0,id:e.unref(l).errorId,invalid:e.unref(l).invalid.value,text:t.invalidFeedback},{default:e.withCtx(()=>[u.$slots["invalid-feedback"]?e.renderSlot(u.$slots,"invalid-feedback",{key:0}):e.createCommentVNode("",!0)]),_:3},8,["id","invalid","text"]))]))}}),wt={sm:"h-xs w-xs before:h-2xs before:w-2xs",md:"h-sm w-sm before:h-[12px] before:w-[12px]",lg:"h-md w-md before:h-xs before:w-xs"},xt={sm:{"--switch-width":"30px","--switch-height":"17px","--slider-size":"13px","--gutter-size":"2px"},md:{"--switch-width":"45px","--switch-height":"25.5px","--slider-size":"19.5px","--gutter-size":"3px"},lg:{"--switch-width":"60px","--switch-height":"34px","--slider-size":"26px","--gutter-size":"4px"}},Ct="rounded-md before:rounded-[3px]",ye=t=>{const o=e.computed(()=>{const{bgColor:a,borderColor:r,indicatorColor:i,checkedBgColor:s,showShadow:d}=t,c=t.rounded??!1,f=[S.generateClass.bgColorVariant({color:a}),S.generateClass.borderColorVariant({color:r}),S.generateClass.beforeBgColorVariant({color:i}),S.generateClass.peerCheckedBgColorVariant({color:s}),"peer-focus-visible:mcl-focus-ring"];return d&&f.push("drop-shadow-md"),c&&f.push(t.roundedClass??Ct),f.join(" ")}),n=e.computed(()=>wt[t.size]),l=e.computed(()=>({...xt[t.size]}));return{boxClass:o,sizeClass:n,switchVars:l}},kt={class:"relative inline-flex"},Bt=["id","name","value","required","disabled","aria-invalid","aria-describedby"],Vt=e.defineComponent({__name:"MclInputRadio",props:e.mergeModels({id:{},name:{},size:{default:"md"},bgColor:{default:"light-1"},checkedBgColor:{default:"success"},indicatorColor:{default:"light-1"},borderColor:{default:"dark-1"},showShadow:{type:Boolean,default:!1},value:{default:""},invalid:{type:Boolean,default:void 0},required:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0}},{modelValue:{default:null},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(t,{emit:o}){const n=t,l=e.useModel(t,"modelValue"),a=o,r=W(n,{rendersOwnFeedback:!1}),{boxClass:i,sizeClass:s}=ye(n),d=e.computed(()=>r.name.value??r.id),c=f=>{a("change",f)};return(f,m)=>(e.openBlock(),e.createElementBlock("div",kt,[e.withDirectives(e.createElementVNode("input",{id:e.unref(r).id,"onUpdate:modelValue":m[0]||(m[0]=u=>l.value=u),type:"radio",class:"peer absolute inset-0 z-10 h-full w-full cursor-pointer appearance-none opacity-0 disabled:cursor-not-allowed",name:d.value,value:t.value,required:e.unref(r).required.value,disabled:e.unref(r).disabled.value,"aria-invalid":e.unref(r).invalid.value||void 0,"aria-describedby":e.unref(r).describedBy.value,onChange:c},null,40,Bt),[[e.vModelRadio,l.value]]),e.createElementVNode("span",{"aria-hidden":"true",class:e.normalizeClass(["relative inline-block rounded-full border transition-colors duration-200 ease-linear peer-disabled:opacity-50 before:absolute before:top-1/2 before:left-1/2 before:-translate-x-1/2 before:-translate-y-1/2 before:rounded-full before:opacity-0 before:transition-opacity before:duration-200 peer-checked:before:opacity-100",[e.unref(i),e.unref(s)]])},null,2)]))}}),vt=["id","name","required","disabled","aria-invalid","aria-describedby"],St="rounded-full before:rounded-full",Et=e.defineComponent({__name:"MclInputSwitch",props:e.mergeModels({id:{},name:{},size:{default:"md"},bgColor:{default:"dark-1"},checkedBgColor:{default:"success"},indicatorColor:{default:"light-1"},borderColor:{default:"dark-1"},showShadow:{type:Boolean,default:!1},rounded:{type:Boolean,default:!0},invalid:{type:Boolean,default:void 0},required:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(t,{emit:o}){const n=t,l=e.useModel(t,"modelValue"),a=o,r=W(n,{rendersOwnFeedback:!1}),i={get size(){return n.size},get bgColor(){return n.bgColor},get checkedBgColor(){return n.checkedBgColor},get indicatorColor(){return n.indicatorColor},get borderColor(){return n.borderColor},get showShadow(){return n.showShadow},get rounded(){return n.rounded},roundedClass:St},{boxClass:s,switchVars:d}=ye(i),c=f=>{a("change",f)};return(f,m)=>(e.openBlock(),e.createElementBlock("div",{class:"switch relative",style:e.normalizeStyle(e.unref(d))},[e.withDirectives(e.createElementVNode("input",{id:e.unref(r).id,"onUpdate:modelValue":m[0]||(m[0]=u=>l.value=u),type:"checkbox",role:"switch",class:"peer absolute inset-0 z-10 h-full w-full cursor-pointer appearance-none opacity-0 disabled:cursor-not-allowed",name:e.unref(r).name.value,required:e.unref(r).required.value,disabled:e.unref(r).disabled.value,"aria-invalid":e.unref(r).invalid.value||void 0,"aria-describedby":e.unref(r).describedBy.value,onChange:c},null,40,vt),[[e.vModelCheckbox,l.value]]),e.createElementVNode("span",{"aria-hidden":"true",class:e.normalizeClass(["slider absolute inset-0 transition-all duration-300 peer-disabled:opacity-50 before:absolute before:transition-all before:duration-300",e.unref(s)])},null,2)],4))}}),Oe=(t,o)=>{const n=t.__vccOpts||t;for(const[l,a]of o)n[l]=a;return n},Rt=Oe(Et,[["__scopeId","data-v-784930f6"]]),Ae=e.defineComponent({__name:"InputHighlight",props:{color:{default:"primary"},rounded:{type:Boolean,default:!1}},setup(t){const o=t,n=e.computed(()=>{const l=[S.generateClass.beforeBgColorVariant({color:o.color})];return o.rounded&&l.push("rounded-b-md"),l.push("-top-1"),l.join(" ")});return(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative h-3xs overflow-hidden before:absolute before:bottom-0 before:left-0 before:h-full before:w-0 before:transition-[width] before:duration-300 before:ease-linear peer-focus:before:w-full",n.value])},null,2))}}),Mt=["id","type","name","placeholder","autocomplete","minlength","maxlength","pattern","required","disabled","aria-invalid","aria-describedby"],$t=e.defineComponent({__name:"MclInputText",props:e.mergeModels({id:{},name:{},type:{default:"text"},placeholder:{default:""},autocomplete:{},showBorder:{type:Boolean,default:!1},borderColor:{default:"light-4"},rounded:{type:Boolean,default:!1},showHighlight:{type:Boolean,default:!0},highlightColor:{default:"primary"},textColor:{default:"black"},bgColor:{default:"light-1"},showShadow:{type:Boolean,default:!0},invalidFeedback:{},minLength:{},maxLength:{},pattern:{},invalid:{type:Boolean,default:void 0},required:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const o=t,n=e.useModel(t,"modelValue"),l=W(o),a=ne(o);return(r,i)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("input",{id:e.unref(l).id,"onUpdate:modelValue":i[0]||(i[0]=s=>n.value=s),class:e.normalizeClass(["peer w-full p-2xs outline-none disabled:cursor-not-allowed disabled:opacity-50",e.unref(a)]),type:t.type,name:e.unref(l).name.value,placeholder:t.placeholder,autocomplete:t.autocomplete,minlength:t.minLength,maxlength:t.maxLength,pattern:t.pattern,required:e.unref(l).required.value,disabled:e.unref(l).disabled.value,"aria-invalid":e.unref(l).invalid.value||void 0,"aria-describedby":e.unref(l).describedBy.value},null,10,Mt),[[e.vModelDynamic,n.value]]),t.showHighlight?(e.openBlock(),e.createBlock(Ae,{key:0,color:t.highlightColor,rounded:t.rounded},null,8,["color","rounded"])):e.createCommentVNode("",!0),e.unref(l).feedbackOwnedByGroup?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(X,{key:1,id:e.unref(l).errorId,invalid:e.unref(l).invalid.value,text:t.invalidFeedback},{default:e.withCtx(()=>[r.$slots["invalid-feedback"]?e.renderSlot(r.$slots,"invalid-feedback",{key:0}):e.createCommentVNode("",!0)]),_:3},8,["id","invalid","text"]))]))}}),le=Math.min,j=Math.max,re=Math.round,ae=Math.floor,D=t=>({x:t,y:t}),Ot={left:"right",right:"left",bottom:"top",top:"bottom"},At={start:"end",end:"start"};function Ne(t,o,n){return j(t,le(o,n))}function ie(t,o){return typeof t=="function"?t(o):t}function G(t){return t.split("-")[0]}function se(t){return t.split("-")[1]}function Fe(t){return t==="x"?"y":"x"}function Le(t){return t==="y"?"height":"width"}const Nt=new Set(["top","bottom"]);function P(t){return Nt.has(G(t))?"y":"x"}function De(t){return Fe(P(t))}function Ft(t,o,n){n===void 0&&(n=!1);const l=se(t),a=De(t),r=Le(a);let i=a==="x"?l===(n?"end":"start")?"right":"left":l==="start"?"bottom":"top";return o.reference[r]>o.floating[r]&&(i=ce(i)),[i,ce(i)]}function Lt(t){const o=ce(t);return[we(t),o,we(o)]}function we(t){return t.replace(/start|end/g,o=>At[o])}const Ie=["left","right"],Te=["right","left"],Dt=["top","bottom"],It=["bottom","top"];function Tt(t,o,n){switch(t){case"top":case"bottom":return n?o?Te:Ie:o?Ie:Te;case"left":case"right":return o?Dt:It;default:return[]}}function zt(t,o,n,l){const a=se(t);let r=Tt(G(t),n==="start",l);return a&&(r=r.map(i=>i+"-"+a),o&&(r=r.concat(r.map(we)))),r}function ce(t){return t.replace(/left|right|bottom|top/g,o=>Ot[o])}function qt(t){return{top:0,right:0,bottom:0,left:0,...t}}function Pt(t){return typeof t!="number"?qt(t):{top:t,right:t,bottom:t,left:t}}function de(t){const{x:o,y:n,width:l,height:a}=t;return{width:l,height:a,top:n,left:o,right:o+l,bottom:n+a,x:o,y:n}}function ze(t,o,n){let{reference:l,floating:a}=t;const r=P(o),i=De(o),s=Le(i),d=G(o),c=r==="y",f=l.x+l.width/2-a.width/2,m=l.y+l.height/2-a.height/2,u=l[s]/2-a[s]/2;let p;switch(d){case"top":p={x:f,y:l.y-a.height};break;case"bottom":p={x:f,y:l.y+l.height};break;case"right":p={x:l.x+l.width,y:m};break;case"left":p={x:l.x-a.width,y:m};break;default:p={x:l.x,y:l.y}}switch(se(o)){case"start":p[i]-=u*(n&&c?-1:1);break;case"end":p[i]+=u*(n&&c?-1:1);break}return p}async function _t(t,o){var n;o===void 0&&(o={});const{x:l,y:a,platform:r,rects:i,elements:s,strategy:d}=t,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:m="floating",altBoundary:u=!1,padding:p=0}=ie(o,t),h=Pt(p),y=s[u?m==="floating"?"reference":"floating":m],b=de(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(y)))==null||n?y:y.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(s.floating)),boundary:c,rootBoundary:f,strategy:d})),x=m==="floating"?{x:l,y:a,width:i.floating.width,height:i.floating.height}:i.reference,C=await(r.getOffsetParent==null?void 0:r.getOffsetParent(s.floating)),B=await(r.isElement==null?void 0:r.isElement(C))?await(r.getScale==null?void 0:r.getScale(C))||{x:1,y:1}:{x:1,y:1},R=de(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:C,strategy:d}):x);return{top:(b.top-R.top+h.top)/B.y,bottom:(R.bottom-b.bottom+h.bottom)/B.y,left:(b.left-R.left+h.left)/B.x,right:(R.right-b.right+h.right)/B.x}}const Ht=async(t,o,n)=>{const{placement:l="bottom",strategy:a="absolute",middleware:r=[],platform:i}=n,s=r.filter(Boolean),d=await(i.isRTL==null?void 0:i.isRTL(o));let c=await i.getElementRects({reference:t,floating:o,strategy:a}),{x:f,y:m}=ze(c,l,d),u=l,p={},h=0;for(let y=0;y<s.length;y++){var g;const{name:b,fn:x}=s[y],{x:C,y:B,data:R,reset:E}=await x({x:f,y:m,initialPlacement:l,placement:u,strategy:a,middlewareData:p,rects:c,platform:{...i,detectOverflow:(g=i.detectOverflow)!=null?g:_t},elements:{reference:t,floating:o}});f=C??f,m=B??m,p={...p,[b]:{...p[b],...R}},E&&h<=50&&(h++,typeof E=="object"&&(E.placement&&(u=E.placement),E.rects&&(c=E.rects===!0?await i.getElementRects({reference:t,floating:o,strategy:a}):E.rects),{x:f,y:m}=ze(c,u,d)),y=-1)}return{x:f,y:m,placement:u,strategy:a,middlewareData:p}},Wt=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(o){var n,l;const{placement:a,middlewareData:r,rects:i,initialPlacement:s,platform:d,elements:c}=o,{mainAxis:f=!0,crossAxis:m=!0,fallbackPlacements:u,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...y}=ie(t,o);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const b=G(a),x=P(s),C=G(s)===s,B=await(d.isRTL==null?void 0:d.isRTL(c.floating)),R=u||(C||!g?[ce(s)]:Lt(s)),E=h!=="none";!u&&E&&R.push(...zt(s,g,h,B));const k=[s,...R],O=await d.detectOverflow(o,y),q=[];let H=((l=r.flip)==null?void 0:l.overflows)||[];if(f&&q.push(O[b]),m){const z=Ft(a,i,B);q.push(O[z[0]],O[z[1]])}if(H=[...H,{placement:a,overflows:q}],!q.every(z=>z<=0)){var be,te;const z=(((be=r.flip)==null?void 0:be.index)||0)+1,w=k[z];if(w&&(!(m==="alignment"?x!==P(w):!1)||H.every($=>P($.placement)===x?$.overflows[0]>0:!0)))return{data:{index:z,overflows:H},reset:{placement:w}};let V=(te=H.filter(v=>v.overflows[0]<=0).sort((v,$)=>v.overflows[1]-$.overflows[1])[0])==null?void 0:te.placement;if(!V)switch(p){case"bestFit":{var ge;const v=(ge=H.filter($=>{if(E){const N=P($.placement);return N===x||N==="y"}return!0}).map($=>[$.placement,$.overflows.filter(N=>N>0).reduce((N,jo)=>N+jo,0)]).sort(($,N)=>$[1]-N[1])[0])==null?void 0:ge[0];v&&(V=v);break}case"initialPlacement":V=s;break}if(a!==V)return{reset:{placement:V}}}return{}}}},jt=new Set(["left","top"]);async function Gt(t,o){const{placement:n,platform:l,elements:a}=t,r=await(l.isRTL==null?void 0:l.isRTL(a.floating)),i=G(n),s=se(n),d=P(n)==="y",c=jt.has(i)?-1:1,f=r&&d?-1:1,m=ie(o,t);let{mainAxis:u,crossAxis:p,alignmentAxis:h}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return s&&typeof h=="number"&&(p=s==="end"?h*-1:h),d?{x:p*f,y:u*c}:{x:u*c,y:p*f}}const Ut=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(o){var n,l;const{x:a,y:r,placement:i,middlewareData:s}=o,d=await Gt(o,t);return i===((n=s.offset)==null?void 0:n.placement)&&(l=s.arrow)!=null&&l.alignmentOffset?{}:{x:a+d.x,y:r+d.y,data:{...d,placement:i}}}}},Kt=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(o){const{x:n,y:l,placement:a,platform:r}=o,{mainAxis:i=!0,crossAxis:s=!1,limiter:d={fn:b=>{let{x,y:C}=b;return{x,y:C}}},...c}=ie(t,o),f={x:n,y:l},m=await r.detectOverflow(o,c),u=P(G(a)),p=Fe(u);let h=f[p],g=f[u];if(i){const b=p==="y"?"top":"left",x=p==="y"?"bottom":"right",C=h+m[b],B=h-m[x];h=Ne(C,h,B)}if(s){const b=u==="y"?"top":"left",x=u==="y"?"bottom":"right",C=g+m[b],B=g-m[x];g=Ne(C,g,B)}const y=d.fn({...o,[p]:h,[u]:g});return{...y,data:{x:y.x-n,y:y.y-l,enabled:{[p]:i,[u]:s}}}}}};function fe(){return typeof window<"u"}function U(t){return xe(t)?(t.nodeName||"").toLowerCase():"#document"}function A(t){var o;return(t==null||(o=t.ownerDocument)==null?void 0:o.defaultView)||window}function I(t){var o;return(o=(xe(t)?t.ownerDocument:t.document)||window.document)==null?void 0:o.documentElement}function xe(t){return fe()?t instanceof Node||t instanceof A(t).Node:!1}function F(t){return fe()?t instanceof Element||t instanceof A(t).Element:!1}function T(t){return fe()?t instanceof HTMLElement||t instanceof A(t).HTMLElement:!1}function qe(t){return!fe()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof A(t).ShadowRoot}const Xt=new Set(["inline","contents"]);function J(t){const{overflow:o,overflowX:n,overflowY:l,display:a}=L(t);return/auto|scroll|overlay|hidden|clip/.test(o+l+n)&&!Xt.has(a)}const Yt=new Set(["table","td","th"]);function Zt(t){return Yt.has(U(t))}const Jt=[":popover-open",":modal"];function ue(t){return Jt.some(o=>{try{return t.matches(o)}catch{return!1}})}const Qt=["transform","translate","scale","rotate","perspective"],eo=["transform","translate","scale","rotate","perspective","filter"],to=["paint","layout","strict","content"];function Ce(t){const o=ke(),n=F(t)?L(t):t;return Qt.some(l=>n[l]?n[l]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!o&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!o&&(n.filter?n.filter!=="none":!1)||eo.some(l=>(n.willChange||"").includes(l))||to.some(l=>(n.contain||"").includes(l))}function oo(t){let o=_(t);for(;T(o)&&!Y(o);){if(Ce(o))return o;if(ue(o))return null;o=_(o)}return null}function ke(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const no=new Set(["html","body","#document"]);function Y(t){return no.has(U(t))}function L(t){return A(t).getComputedStyle(t)}function me(t){return F(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function _(t){if(U(t)==="html")return t;const o=t.assignedSlot||t.parentNode||qe(t)&&t.host||I(t);return qe(o)?o.host:o}function Pe(t){const o=_(t);return Y(o)?t.ownerDocument?t.ownerDocument.body:t.body:T(o)&&J(o)?o:Pe(o)}function Q(t,o,n){var l;o===void 0&&(o=[]),n===void 0&&(n=!0);const a=Pe(t),r=a===((l=t.ownerDocument)==null?void 0:l.body),i=A(a);if(r){const s=Be(i);return o.concat(i,i.visualViewport||[],J(a)?a:[],s&&n?Q(s):[])}return o.concat(a,Q(a,[],n))}function Be(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function _e(t){const o=L(t);let n=parseFloat(o.width)||0,l=parseFloat(o.height)||0;const a=T(t),r=a?t.offsetWidth:n,i=a?t.offsetHeight:l,s=re(n)!==r||re(l)!==i;return s&&(n=r,l=i),{width:n,height:l,$:s}}function Ve(t){return F(t)?t:t.contextElement}function Z(t){const o=Ve(t);if(!T(o))return D(1);const n=o.getBoundingClientRect(),{width:l,height:a,$:r}=_e(o);let i=(r?re(n.width):n.width)/l,s=(r?re(n.height):n.height)/a;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const lo=D(0);function He(t){const o=A(t);return!ke()||!o.visualViewport?lo:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function ro(t,o,n){return o===void 0&&(o=!1),!n||o&&n!==A(t)?!1:o}function K(t,o,n,l){o===void 0&&(o=!1),n===void 0&&(n=!1);const a=t.getBoundingClientRect(),r=Ve(t);let i=D(1);o&&(l?F(l)&&(i=Z(l)):i=Z(t));const s=ro(r,n,l)?He(r):D(0);let d=(a.left+s.x)/i.x,c=(a.top+s.y)/i.y,f=a.width/i.x,m=a.height/i.y;if(r){const u=A(r),p=l&&F(l)?A(l):l;let h=u,g=Be(h);for(;g&&l&&p!==h;){const y=Z(g),b=g.getBoundingClientRect(),x=L(g),C=b.left+(g.clientLeft+parseFloat(x.paddingLeft))*y.x,B=b.top+(g.clientTop+parseFloat(x.paddingTop))*y.y;d*=y.x,c*=y.y,f*=y.x,m*=y.y,d+=C,c+=B,h=A(g),g=Be(h)}}return de({width:f,height:m,x:d,y:c})}function pe(t,o){const n=me(t).scrollLeft;return o?o.left+n:K(I(t)).left+n}function We(t,o){const n=t.getBoundingClientRect(),l=n.left+o.scrollLeft-pe(t,n),a=n.top+o.scrollTop;return{x:l,y:a}}function ao(t){let{elements:o,rect:n,offsetParent:l,strategy:a}=t;const r=a==="fixed",i=I(l),s=o?ue(o.floating):!1;if(l===i||s&&r)return n;let d={scrollLeft:0,scrollTop:0},c=D(1);const f=D(0),m=T(l);if((m||!m&&!r)&&((U(l)!=="body"||J(i))&&(d=me(l)),T(l))){const p=K(l);c=Z(l),f.x=p.x+l.clientLeft,f.y=p.y+l.clientTop}const u=i&&!m&&!r?We(i,d):D(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-d.scrollLeft*c.x+f.x+u.x,y:n.y*c.y-d.scrollTop*c.y+f.y+u.y}}function io(t){return Array.from(t.getClientRects())}function so(t){const o=I(t),n=me(t),l=t.ownerDocument.body,a=j(o.scrollWidth,o.clientWidth,l.scrollWidth,l.clientWidth),r=j(o.scrollHeight,o.clientHeight,l.scrollHeight,l.clientHeight);let i=-n.scrollLeft+pe(t);const s=-n.scrollTop;return L(l).direction==="rtl"&&(i+=j(o.clientWidth,l.clientWidth)-a),{width:a,height:r,x:i,y:s}}const je=25;function co(t,o){const n=A(t),l=I(t),a=n.visualViewport;let r=l.clientWidth,i=l.clientHeight,s=0,d=0;if(a){r=a.width,i=a.height;const f=ke();(!f||f&&o==="fixed")&&(s=a.offsetLeft,d=a.offsetTop)}const c=pe(l);if(c<=0){const f=l.ownerDocument,m=f.body,u=getComputedStyle(m),p=f.compatMode==="CSS1Compat"&&parseFloat(u.marginLeft)+parseFloat(u.marginRight)||0,h=Math.abs(l.clientWidth-m.clientWidth-p);h<=je&&(r-=h)}else c<=je&&(r+=c);return{width:r,height:i,x:s,y:d}}const fo=new Set(["absolute","fixed"]);function uo(t,o){const n=K(t,!0,o==="fixed"),l=n.top+t.clientTop,a=n.left+t.clientLeft,r=T(t)?Z(t):D(1),i=t.clientWidth*r.x,s=t.clientHeight*r.y,d=a*r.x,c=l*r.y;return{width:i,height:s,x:d,y:c}}function Ge(t,o,n){let l;if(o==="viewport")l=co(t,n);else if(o==="document")l=so(I(t));else if(F(o))l=uo(o,n);else{const a=He(t);l={x:o.x-a.x,y:o.y-a.y,width:o.width,height:o.height}}return de(l)}function Ue(t,o){const n=_(t);return n===o||!F(n)||Y(n)?!1:L(n).position==="fixed"||Ue(n,o)}function mo(t,o){const n=o.get(t);if(n)return n;let l=Q(t,[],!1).filter(s=>F(s)&&U(s)!=="body"),a=null;const r=L(t).position==="fixed";let i=r?_(t):t;for(;F(i)&&!Y(i);){const s=L(i),d=Ce(i);!d&&s.position==="fixed"&&(a=null),(r?!d&&!a:!d&&s.position==="static"&&!!a&&fo.has(a.position)||J(i)&&!d&&Ue(t,i))?l=l.filter(f=>f!==i):a=s,i=_(i)}return o.set(t,l),l}function po(t){let{element:o,boundary:n,rootBoundary:l,strategy:a}=t;const i=[...n==="clippingAncestors"?ue(o)?[]:mo(o,this._c):[].concat(n),l],s=i[0],d=i.reduce((c,f)=>{const m=Ge(o,f,a);return c.top=j(m.top,c.top),c.right=le(m.right,c.right),c.bottom=le(m.bottom,c.bottom),c.left=j(m.left,c.left),c},Ge(o,s,a));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function ho(t){const{width:o,height:n}=_e(t);return{width:o,height:n}}function bo(t,o,n){const l=T(o),a=I(o),r=n==="fixed",i=K(t,!0,r,o);let s={scrollLeft:0,scrollTop:0};const d=D(0);function c(){d.x=pe(a)}if(l||!l&&!r)if((U(o)!=="body"||J(a))&&(s=me(o)),l){const p=K(o,!0,r,o);d.x=p.x+o.clientLeft,d.y=p.y+o.clientTop}else a&&c();r&&!l&&a&&c();const f=a&&!l&&!r?We(a,s):D(0),m=i.left+s.scrollLeft-d.x-f.x,u=i.top+s.scrollTop-d.y-f.y;return{x:m,y:u,width:i.width,height:i.height}}function ve(t){return L(t).position==="static"}function Ke(t,o){if(!T(t)||L(t).position==="fixed")return null;if(o)return o(t);let n=t.offsetParent;return I(t)===n&&(n=n.ownerDocument.body),n}function Xe(t,o){const n=A(t);if(ue(t))return n;if(!T(t)){let a=_(t);for(;a&&!Y(a);){if(F(a)&&!ve(a))return a;a=_(a)}return n}let l=Ke(t,o);for(;l&&Zt(l)&&ve(l);)l=Ke(l,o);return l&&Y(l)&&ve(l)&&!Ce(l)?n:l||oo(t)||n}const go=async function(t){const o=this.getOffsetParent||Xe,n=this.getDimensions,l=await n(t.floating);return{reference:bo(t.reference,await o(t.floating),t.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}};function yo(t){return L(t).direction==="rtl"}const wo={convertOffsetParentRelativeRectToViewportRelativeRect:ao,getDocumentElement:I,getClippingRect:po,getOffsetParent:Xe,getElementRects:go,getClientRects:io,getDimensions:ho,getScale:Z,isElement:F,isRTL:yo};function Ye(t,o){return t.x===o.x&&t.y===o.y&&t.width===o.width&&t.height===o.height}function xo(t,o){let n=null,l;const a=I(t);function r(){var s;clearTimeout(l),(s=n)==null||s.disconnect(),n=null}function i(s,d){s===void 0&&(s=!1),d===void 0&&(d=1),r();const c=t.getBoundingClientRect(),{left:f,top:m,width:u,height:p}=c;if(s||o(),!u||!p)return;const h=ae(m),g=ae(a.clientWidth-(f+u)),y=ae(a.clientHeight-(m+p)),b=ae(f),C={rootMargin:-h+"px "+-g+"px "+-y+"px "+-b+"px",threshold:j(0,le(1,d))||1};let B=!0;function R(E){const k=E[0].intersectionRatio;if(k!==d){if(!B)return i();k?i(!1,k):l=setTimeout(()=>{i(!1,1e-7)},1e3)}k===1&&!Ye(c,t.getBoundingClientRect())&&i(),B=!1}try{n=new IntersectionObserver(R,{...C,root:a.ownerDocument})}catch{n=new IntersectionObserver(R,C)}n.observe(t)}return i(!0),r}function Co(t,o,n,l){l===void 0&&(l={});const{ancestorScroll:a=!0,ancestorResize:r=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:d=!1}=l,c=Ve(t),f=a||r?[...c?Q(c):[],...Q(o)]:[];f.forEach(b=>{a&&b.addEventListener("scroll",n,{passive:!0}),r&&b.addEventListener("resize",n)});const m=c&&s?xo(c,n):null;let u=-1,p=null;i&&(p=new ResizeObserver(b=>{let[x]=b;x&&x.target===c&&p&&(p.unobserve(o),cancelAnimationFrame(u),u=requestAnimationFrame(()=>{var C;(C=p)==null||C.observe(o)})),n()}),c&&!d&&p.observe(c),p.observe(o));let h,g=d?K(t):null;d&&y();function y(){const b=K(t);g&&!Ye(g,b)&&n(),g=b,h=requestAnimationFrame(y)}return n(),()=>{var b;f.forEach(x=>{a&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),m?.(),(b=p)==null||b.disconnect(),p=null,d&&cancelAnimationFrame(h)}}const ko=Ut,Bo=Kt,Vo=Wt,vo=(t,o,n)=>{const l=new Map,a={platform:wo,...n},r={...a.platform,_c:l};return Ht(t,o,{...a,platform:r})};function So(t){return t!=null&&typeof t=="object"&&"$el"in t}function Ze(t){if(So(t)){const o=t.$el;return xe(o)&&U(o)==="#comment"?null:o}return t}function ee(t){return typeof t=="function"?t():e.unref(t)}function Je(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Qe(t,o){const n=Je(t);return Math.round(o*n)/n}function Eo(t,o,n){n===void 0&&(n={});const l=n.whileElementsMounted,a=e.computed(()=>{var k;return(k=ee(n.open))!=null?k:!0}),r=e.computed(()=>ee(n.middleware)),i=e.computed(()=>{var k;return(k=ee(n.placement))!=null?k:"bottom"}),s=e.computed(()=>{var k;return(k=ee(n.strategy))!=null?k:"absolute"}),d=e.computed(()=>{var k;return(k=ee(n.transform))!=null?k:!0}),c=e.computed(()=>Ze(t.value)),f=e.computed(()=>Ze(o.value)),m=e.ref(0),u=e.ref(0),p=e.ref(s.value),h=e.ref(i.value),g=e.shallowRef({}),y=e.ref(!1),b=e.computed(()=>{const k={position:p.value,left:"0",top:"0"};if(!f.value)return k;const O=Qe(f.value,m.value),q=Qe(f.value,u.value);return d.value?{...k,transform:"translate("+O+"px, "+q+"px)",...Je(f.value)>=1.5&&{willChange:"transform"}}:{position:p.value,left:O+"px",top:q+"px"}});let x;function C(){if(c.value==null||f.value==null)return;const k=a.value;vo(c.value,f.value,{middleware:r.value,placement:i.value,strategy:s.value}).then(O=>{m.value=O.x,u.value=O.y,p.value=O.strategy,h.value=O.placement,g.value=O.middlewareData,y.value=k!==!1})}function B(){typeof x=="function"&&(x(),x=void 0)}function R(){if(B(),l===void 0){C();return}if(c.value!=null&&f.value!=null){x=l(c.value,f.value,C);return}}function E(){a.value||(y.value=!1)}return e.watch([r,i,s,a],C,{flush:"sync"}),e.watch([c,f],R,{flush:"sync"}),e.watch(a,E,{flush:"sync"}),e.getCurrentScope()&&e.onScopeDispose(B),{x:e.shallowReadonly(m),y:e.shallowReadonly(u),strategy:e.shallowReadonly(p),placement:e.shallowReadonly(h),middlewareData:e.shallowReadonly(g),isPositioned:e.shallowReadonly(y),floatingStyles:b,update:C}}const Ro=e.defineComponent({__name:"CaretDown",props:{color:{default:"dark-4"},className:{default:""}},setup(t){const o=t,n=e.computed(()=>[S.generateClass.svgFillColorVariant({color:o.color}),o.className].filter(Boolean).join(" "));return(l,a)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512","aria-hidden":"true",focusable:"false",class:e.normalizeClass(n.value)},[...a[0]||(a[0]=[e.createElementVNode("path",{d:"M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"},null,-1)])],2))}}),Mo=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),he=t=>typeof t=="string"?t:t.text,Se=t=>typeof t=="string"?t:t.value,$o=(t,o)=>e.computed(()=>{const n=e.toValue(t),l=e.toValue(o);if(l==="")return n;const a=new RegExp(Mo(l),"i");return n.filter(r=>a.test(he(r)))}),Oo=t=>{const{isOpen:o,activeIndex:n,onSelect:l,onClear:a,onActiveChange:r}=t,i=f=>{const m=e.toValue(t.optionCount);if(m<=0){n.value=-1;return}const u=Math.max(0,Math.min(f,m-1));n.value=u,r?.(u)},s=()=>{o.value=!1,n.value=-1},d=f=>{switch(f.key){case"ArrowDown":if(f.preventDefault(),!o.value){o.value=!0;return}if(f.altKey)return;i(n.value+1);return;case"ArrowUp":if(f.preventDefault(),!o.value){o.value=!0;return}i(n.value<0?e.toValue(t.optionCount)-1:n.value-1);return;case"Home":if(!o.value)return;f.preventDefault(),i(0);return;case"End":if(!o.value)return;f.preventDefault(),i(e.toValue(t.optionCount)-1);return;case"Enter":if(!o.value||n.value<0)return;f.preventDefault(),l(n.value);return;case"Escape":if(o.value){s();return}a();return;case"Tab":o.value&&s();return;default:return}},c=e.computed(()=>o.value&&n.value>=0?`${e.toValue(t.idPrefix)}-option-${n.value}`:void 0);return{onKeydown:d,activeDescendantId:c}},Ao=["id","placeholder","disabled","aria-expanded","aria-controls","aria-activedescendant","aria-required","aria-invalid","aria-describedby"],No=["disabled"],Fo=["disabled"],Lo=["id"],Do=["id","aria-selected","onClick","onMouseenter"],Io=["id"],To=["name","value"],zo=Oe(e.defineComponent({__name:"MclSelect",props:e.mergeModels({options:{},id:{},name:{},placeholder:{default:""},showBorder:{type:Boolean,default:!1},borderColor:{default:"light-4"},rounded:{type:Boolean,default:!1},showHighlight:{type:Boolean,default:!0},highlightColor:{default:"primary"},textColor:{default:"black"},bgColor:{default:"light-1"},iconColor:{default:"dark-4"},optionHoverColor:{default:"primary"},showShadow:{type:Boolean,default:!0},noMatchText:{default:"No match."},invalidFeedback:{},invalid:{type:Boolean,default:void 0},required:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0}},{modelValue:{default:null},modelModifiers:{}}),emits:e.mergeModels(["open","close","clear","changed","select"],["update:modelValue"]),setup(t,{emit:o}){const n=t,l=e.useModel(t,"modelValue"),a=o,r=W(n),i=ne(n),s=e.ref(),d=e.ref(),c=e.ref(),f=e.ref([]),m=e.ref(),u=e.ref(!1),p=e.ref(-1),h=w=>{if(w===null||w==="")return"";const V=n.options.find(v=>Se(v)===w);return V?he(V):String(w)},g=e.ref(h(l.value)),y=e.ref(!1),b=$o(()=>n.options,()=>y.value?g.value:""),x=(w,V)=>{f.value[V]=w},C=w=>{f.value[w]?.scrollIntoView?.({block:"nearest"})},B=()=>{u.value||(u.value=!0,y.value=!1,p.value=-1)},R=()=>{u.value=!1,p.value=-1},E=w=>{g.value=he(w);const V=Se(w);l.value=V,y.value=!1,u.value=!1,p.value=-1,a("select",V)},k=()=>{g.value="",p.value=-1,l.value=null,y.value=!1,a("clear"),d.value?.focus()},{onKeydown:O,activeDescendantId:q}=Oo({isOpen:u,activeIndex:p,optionCount:()=>b.value.length,idPrefix:()=>r.id,onSelect:w=>{const V=b.value[w];V!==void 0&&E(V)},onClear:k,onActiveChange:C}),H=()=>{if(u.value){R();return}B(),d.value?.focus()},be=e.computed(()=>{const w=[S.generateClass.beforeBgColorVariant({color:n.highlightColor})];return n.rounded&&w.push("rounded-b-md"),w.join(" ")}),te=e.computed(()=>{const w=[S.generateClass.bgColorVariant({color:n.bgColor}),S.generateClass.borderColorVariant({color:n.borderColor})];return n.showHighlight||w.push("mt-2xs"),n.rounded&&w.push("rounded-md"),w.join(" ")}),ge=w=>l.value!==null&&l.value!==""&&Se(w)===l.value,{floatingStyles:z}=Eo(s,c,{whileElementsMounted:Co,strategy:"absolute",open:u,transform:!1,placement:"bottom",middleware:[Vo(),ko(-2.2),Bo()]});return tt.useResizeObserver(s,()=>{s.value&&(m.value=s.value.clientWidth)}),e.watch(b,()=>{p.value=-1}),e.watch(u,w=>{if(w){a("open");return}y.value&&(g.value=h(l.value),y.value=!1),a("close")}),e.watch(()=>r.disabled.value,w=>{w&&R()}),e.watch(()=>n.options,()=>{y.value||(g.value=h(l.value))}),e.watch(l,w=>{g.value=h(w),y.value=!1,w!==null&&a("changed",w)}),(w,V)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{ref_key:"rootRef",ref:s,class:"relative"},[e.createElementVNode("div",{class:e.normalizeClass(["relative flex gap-3xs p-2xs has-[input:focus-visible]:mcl-focus-ring",e.unref(i)])},[e.withDirectives(e.createElementVNode("input",{id:e.unref(r).id,ref_key:"inputRef",ref:d,"onUpdate:modelValue":V[0]||(V[0]=v=>g.value=v),type:"text",role:"combobox",autocomplete:"off",class:"w-full bg-transparent outline-none disabled:cursor-not-allowed",placeholder:t.placeholder,disabled:e.unref(r).disabled.value,"aria-autocomplete":"list","aria-expanded":u.value,"aria-controls":`${e.unref(r).id}-listbox`,"aria-activedescendant":e.unref(q),"aria-required":e.unref(r).required.value||void 0,"aria-invalid":e.unref(r).invalid.value||void 0,"aria-describedby":e.unref(r).describedBy.value,onFocus:B,onInput:V[1]||(V[1]=v=>y.value=!0),onKeydown:V[2]||(V[2]=(...v)=>e.unref(O)&&e.unref(O)(...v))},null,40,Ao),[[e.vModelText,g.value]]),g.value!==""?(e.openBlock(),e.createElementBlock("button",{key:0,"data-mcl":"clear",type:"button","aria-label":"Clear selection",class:"flex items-center px-3xs focus-visible:mcl-focus-ring",disabled:e.unref(r).disabled.value,onClick:k},[e.createVNode($e,{color:t.iconColor,"class-name":"h-xs opacity-70"},null,8,["color"])],8,No)):e.createCommentVNode("",!0),e.createElementVNode("button",{"data-mcl":"caret",type:"button",tabindex:"-1","aria-label":"Toggle options",class:"flex items-center px-3xs",disabled:e.unref(r).disabled.value,onClick:H},[e.createVNode(Ro,{color:t.iconColor,"class-name":`h-xs transition-transform duration-300 ease-in ${u.value?"rotate-180":"rotate-0"}`},null,8,["color","class-name"])],8,Fo)],2),t.showHighlight?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["relative -top-1 h-3xs overflow-hidden before:absolute before:bottom-0 before:left-0 before:h-full before:transition-[width] before:duration-300 before:ease-linear",[u.value?"before:w-full":"before:w-0",be.value]])},null,2)):e.createCommentVNode("",!0),e.createVNode(e.Transition,{name:"options"},{default:e.withCtx(()=>[u.value&&e.unref(b).length>0?(e.openBlock(),e.createElementBlock("ul",{key:0,id:`${e.unref(r).id}-listbox`,ref_key:"dropdownRef",ref:c,role:"listbox",class:e.normalizeClass(["max-h-[12.5rem] overflow-y-auto border-2",te.value]),style:e.normalizeStyle({width:`${m.value}px`,...e.unref(z)})},[e.renderSlot(w.$slots,"dropdown",{options:e.unref(b),activeIndex:p.value,optionClick:E,setRef:x,hover:v=>p.value=v,optionId:v=>`${e.unref(r).id}-option-${v}`},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(b),(v,$)=>(e.openBlock(),e.createElementBlock("li",{id:`${e.unref(r).id}-option-${$}`,key:$,ref_for:!0,ref:N=>x(N,$),role:"option",class:e.normalizeClass(["cursor-pointer p-2xs",[p.value===$&&e.unref(S.generateClass).bgColorVariant({color:t.optionHoverColor})]]),"aria-selected":ge(v),onClick:N=>E(v),onMouseenter:N=>p.value=$},e.toDisplayString(e.unref(he)(v)),43,Do))),128))],!0)],14,Lo)):e.createCommentVNode("",!0)]),_:3}),u.value&&e.unref(b).length===0?(e.openBlock(),e.createElementBlock("div",{key:1,id:`${e.unref(r).id}-listbox`,ref_key:"dropdownRef",ref:c,role:"status",class:e.normalizeClass(["border-2 p-2xs",te.value]),style:e.normalizeStyle({width:`${m.value}px`,...e.unref(z)})},[e.renderSlot(w.$slots,"no-match",{},()=>[e.createElementVNode("span",null,e.toDisplayString(t.noMatchText),1)],!0)],14,Io)):e.createCommentVNode("",!0),e.unref(r).name.value?(e.openBlock(),e.createElementBlock("input",{key:2,type:"hidden",name:e.unref(r).name.value,value:l.value??""},null,8,To)):e.createCommentVNode("",!0),e.unref(r).feedbackOwnedByGroup?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(X,{key:3,id:e.unref(r).errorId,invalid:e.unref(r).invalid.value,text:t.invalidFeedback},{default:e.withCtx(()=>[w.$slots["invalid-feedback"]?e.renderSlot(w.$slots,"invalid-feedback",{key:0},void 0,!0):e.createCommentVNode("",!0)]),_:3},8,["id","invalid","text"]))])),[[e.unref(et.vClickOutside),R]])}}),[["__scopeId","data-v-1c4c7f20"]]),qo=["id","name","rows","placeholder","required","disabled","aria-invalid","aria-describedby"],Po=e.defineComponent({__name:"MclTextArea",props:e.mergeModels({id:{},name:{},placeholder:{default:""},rows:{default:5},showBorder:{type:Boolean,default:!1},borderColor:{default:"light-4"},rounded:{type:Boolean,default:!1},showHighlight:{type:Boolean,default:!0},highlightColor:{default:"primary"},textColor:{default:"black"},bgColor:{default:"light-1"},showShadow:{type:Boolean,default:!0},invalidFeedback:{},invalid:{type:Boolean,default:void 0},required:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const o=t,n=e.useModel(t,"modelValue"),l=W(o),a=ne(o);return(r,i)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("textarea",{id:e.unref(l).id,"onUpdate:modelValue":i[0]||(i[0]=s=>n.value=s),class:e.normalizeClass(["peer block w-full p-2xs outline-none disabled:cursor-not-allowed disabled:opacity-50",e.unref(a)]),name:e.unref(l).name.value,rows:t.rows,placeholder:t.placeholder,required:e.unref(l).required.value,disabled:e.unref(l).disabled.value,"aria-invalid":e.unref(l).invalid.value||void 0,"aria-describedby":e.unref(l).describedBy.value},null,10,qo),[[e.vModelText,n.value]]),t.showHighlight?(e.openBlock(),e.createBlock(Ae,{key:0,color:t.highlightColor,rounded:t.rounded},null,8,["color","rounded"])):e.createCommentVNode("",!0),e.unref(l).feedbackOwnedByGroup?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(X,{key:1,id:e.unref(l).errorId,invalid:e.unref(l).invalid.value,text:t.invalidFeedback},{default:e.withCtx(()=>[r.$slots["invalid-feedback"]?e.renderSlot(r.$slots,"invalid-feedback",{key:0}):e.createCommentVNode("",!0)]),_:3},8,["id","invalid","text"]))]))}}),_o={class:"relative inline-flex"},Ho=["id","name","value","required","disabled","aria-invalid","aria-describedby"],Wo=e.defineComponent({__name:"MclCheckbox",props:e.mergeModels({id:{},name:{},size:{default:"md"},bgColor:{default:"light-1"},checkedBgColor:{default:"warning"},indicatorColor:{default:"dark-3"},borderColor:{default:"dark-1"},showShadow:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},value:{},invalid:{type:Boolean,default:void 0},required:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(t,{emit:o}){const n=t,l=e.useModel(t,"modelValue"),a=o,r=W(n,{rendersOwnFeedback:!1}),{boxClass:i,sizeClass:s}=ye(n),d=c=>{a("change",c)};return(c,f)=>(e.openBlock(),e.createElementBlock("div",_o,[e.withDirectives(e.createElementVNode("input",{id:e.unref(r).id,"onUpdate:modelValue":f[0]||(f[0]=m=>l.value=m),type:"checkbox",class:"peer absolute inset-0 z-10 h-full w-full cursor-pointer appearance-none opacity-0 disabled:cursor-not-allowed",name:e.unref(r).name.value,value:t.value,required:e.unref(r).required.value,disabled:e.unref(r).disabled.value,"aria-invalid":e.unref(r).invalid.value||void 0,"aria-describedby":e.unref(r).describedBy.value,onChange:d},null,40,Ho),[[e.vModelCheckbox,l.value]]),e.createElementVNode("span",{"aria-hidden":"true",class:e.normalizeClass(["relative inline-block border p-3xs transition-colors duration-200 ease-linear peer-disabled:opacity-50 before:absolute before:top-1/2 before:left-1/2 before:-translate-x-1/2 before:-translate-y-1/2 before:opacity-0 before:transition-opacity before:duration-200 peer-checked:before:opacity-100",[e.unref(i),e.unref(s)]])},null,2)]))}});M.MclCheckbox=Wo,M.MclFormGroup=ut,M.MclInputFile=yt,M.MclInputRadio=Vt,M.MclInputSwitch=Rt,M.MclInputText=$t,M.MclSelect=zo,M.MclTextArea=Po,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bobbykim/mcl-forms",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "form group components based on manguito-theme",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@floating-ui/vue": "^1.1.5",
|
|
34
34
|
"@vueuse/core": "^12.0.0",
|
|
35
35
|
"vue": "^3.5.13",
|
|
36
|
-
"@bobbykim/manguito-theme": "1.
|
|
36
|
+
"@bobbykim/manguito-theme": "1.6.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@vitejs/plugin-vue": "^5.2.1",
|