@bobbykim/mcl-forms 0.9.3 → 0.9.5
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/mcl-forms.js +351 -351
- package/dist/mcl-forms.umd.cjs +2 -2
- package/package.json +5 -5
package/dist/mcl-forms.umd.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('.switch[data-v-07d209bd]{width:var(--switch-width);height:var(--switch-height)}.slider[data-v-07d209bd]:before{content:"";height:var(--slider-size);width:var(--slider-size);left:var(--gutter-size);bottom:var(--gutter-size)}input:checked+.slider[data-v-07d209bd]:before{transform:translate(var(--slider-size))}.options-enter-active[data-v-f80afd47],.options-leave-active[data-v-f80afd47]{opacity:1;transition:opacity .3s linear,transform .3s linear}.options-enter-from[data-v-f80afd47],.options-leave-to[data-v-f80afd47]{opacity:0;transform:translateY(-10px)}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
-
(function(L,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("@bobbykim/manguito-theme"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["exports","vue","@bobbykim/manguito-theme","@vueuse/core"],t):(L=typeof globalThis<"u"?globalThis:L||self,t(L.MclForms={},L.Vue,L.ManguitoTheme,L.core))})(this,function(L,t,x,Ge){"use strict";const We=["for"],qe=t.defineComponent({__name:"MclFormGroup",props:{labelFor:{},textColor:{default:"dark-3"},textSize:{default:"md"},textBold:{type:Boolean,default:!1},label:{}},setup(e){const o=e;t.useSlots();const n=t.computed(()=>{const{textColor:l,textSize:r,textBold:s}=o,i=[x("TEXTCOLOR",l),x("BODYTEXT",r)];return s&&i.push("font-bold"),i.join(" ")});return(l,r)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("label",{for:l.labelFor,class:"inline-block"},[t.renderSlot(l.$slots,"label",{},()=>[t.createElementVNode("p",{class:t.normalizeClass(["mb-2xs",n.value])},t.toDisplayString(l.label),3)])],8,We),t.renderSlot(l.$slots,"default")]))}}),Ue={class:"shrink-0 my-3xs ml-3xs mr-xs"},Ke=["id","required","accept"],Xe=t.defineComponent({__name:"MclInputFile",props:t.mergeModels({id:{},displayBorder:{type:Boolean,default:!1},borderColor:{default:"light-4"},rounded:{type:Boolean,default:!1},bgColor:{default:"light-1"},buttonText:{default:"Browse File"},buttonTextColor:{default:"dark-3"},buttonColor:{default:"light-4"},displayShadow:{type:Boolean,default:!0},textColor:{default:"black"},displayClear:{type:Boolean,default:!1},isRequired:{type:Boolean,default:!1},accept:{default:"image/jpg,image/jpeg,image/png"}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const o=e,n=t.useModel(e,"modelValue"),l=t.ref(),r=t.ref(0),s=()=>{l.value.click()},i=f=>{const d=f.target.files[0];n.value=d},a=()=>{n.value=null,r.value++},h=t.computed(()=>{const{rounded:f,displayBorder:d,borderColor:g,displayShadow:w,bgColor:k}=o,y=[x("BGCOLOR",k)];return f&&y.push("rounded-md"),d&&(y.push("border-2"),y.push(x("BORDER",g))),w&&y.push("shadow-md"),y.join(" ")}),u=t.computed(()=>{const{textColor:f}=o;return[x("TEXTCOLOR",f)].join(" ")}),p=t.computed(()=>{const{buttonColor:f,buttonTextColor:d,rounded:g}=o,w=[x("BGCOLOR",f),x("TEXTCOLOR",d)];return g&&w.push("rounded-l-md"),w.join(" ")}),c=t.computed(()=>{const{buttonColor:f,rounded:d}=o,g=[x("BGCOLOR",f)];return d&&g.push("rounded-r-md"),g.join(" ")});return(f,d)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex items-center overflow-hidden",h.value])},[t.createElementVNode("div",Ue,[t.createElementVNode("button",{class:t.normalizeClass(["px-xs py-2xs hover:bg-opacity-70 transition-all duration-200 ease-linear max-w-full",p.value]),onClick:s},t.toDisplayString(f.buttonText),3)]),(t.openBlock(),t.createElementBlock("input",{type:"file",id:f.id,ref_key:"inputRef",ref:l,class:t.normalizeClass(["file:hidden w-full bg-transparent",[u.value]]),required:f.isRequired,accept:f.accept,key:r.value,onChange:i},null,42,Ke)),f.displayClear?(t.openBlock(),t.createElementBlock("div",{key:0,class:"self-stretch my-3xs mr-3xs",onClick:a},[t.createElementVNode("button",{class:t.normalizeClass(["px-xs py-2xs h-full flex items-center hover:bg-opacity-70 transition-all duration-200 ease-linear",[c.value]]),"aria-label":"clear"},[(t.openBlock(),t.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",class:t.normalizeClass(["h-xs",t.unref(x)("SVGFILL",f.buttonTextColor)])},d[0]||(d[0]=[t.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))],2)])):t.createCommentVNode("",!0)],2))}}),Ye={class:"flex items-center"},Je=["id","value","checked"],Qe=t.defineComponent({__name:"MclInputRadio",props:{id:{},radioSize:{default:"md"},bgColor:{default:"success"},checkedColor:{default:"light-1"},displayShadow:{type:Boolean,default:!1},value:{default:""},checked:{type:Boolean,default:!1}},emits:["change"],setup(e,{emit:o}){const n=e,l=t.ref(),r=o,s=()=>{var p;(p=l.value)==null||p.click()},i=t.computed(()=>{const{radioSize:p}=n;return p==="sm"?"h-xs w-xs":p==="lg"?"h-md w-md":"h-sm w-sm"}),a=t.computed(()=>{const{radioSize:p}=n;return p==="sm"?"peer-checked:before:h-2xs peer-checked:before:w-2xs":p==="lg"?"peer-checked:before:h-xs peer-checked:before:w-xs":"peer-checked:before:h-[12px] peer-checked:before:w-[12px]"}),h=t.computed(()=>{const{bgColor:p,checkedColor:c,displayShadow:f}=n,d=[x("BGCOLOR",p),x("BEFOREBG",c)];return f&&d.push("drop-shadow-md"),d.join(" ")}),u=p=>{const c=p.target.value;r("change",p,c)};return(p,c)=>(t.openBlock(),t.createElementBlock("div",Ye,[t.createElementVNode("input",{id:p.id,type:"radio",class:"appearance-none peer",ref_key:"radioRef",ref:l,value:p.value,checked:p.checked,onChange:u},null,40,Je),t.createElementVNode("span",{class:t.normalizeClass(["rounded-full inline-block relative before:absolute before:rounded-full before:top-1/2 before:left-1/2 before:-translate-x-1/2 before:-translate-y-1/2",[i.value,a.value,h.value]]),onClick:s},null,2)]))}}),Ze=["id"],et=t.defineComponent({__name:"MclInputSwitch",props:t.mergeModels({id:{},sliderColor:{default:"light-1"},onColor:{default:"success"},offColor:{default:"dark-1"},switchSize:{default:"md"},rounded:{type:Boolean,default:!0}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const o=e,n=t.useModel(e,"modelValue"),l=t.ref(),r={primary:"peer-checked/input:bg-primary",secondary:"peer-checked/input:bg-secondary",success:"peer-checked/input:bg-success",info:"peer-checked/input:bg-info",warning:"peer-checked/input:bg-warning",danger:"peer-checked/input:bg-danger","light-1":"peer-checked/input:bg-light-1","light-2":"peer-checked/input:bg-light-2","light-3":"peer-checked/input:bg-light-3","light-4":"peer-checked/input:bg-light-4","dark-1":"peer-checked/input:bg-dark-1","dark-2":"peer-checked/input:bg-dark-2","dark-3":"peer-checked/input:bg-dark-3","dark-4":"peer-checked/input:bg-dark-1",transparent:"peer-checked/input:bg-transparent",black:"peer-checked/input:bg-black",white:"peer-checked/input:bg-white"},s=()=>{var h;(h=l.value)==null||h.click()},i=t.computed(()=>o.switchSize==="sm"?{"--switch-width":"30px","--switch-height":"17px","--slider-size":"13px","--gutter-size":"2px"}:o.switchSize==="lg"?{"--switch-width":"60px","--switch-height":"34px","--slider-size":"26px","--gutter-size":"4px"}:{"--switch-width":"45px","--switch-height":"25.5px","--slider-size":"19.5px","--gutter-size":"3px"}),a=t.computed(()=>{const{sliderColor:h,onColor:u,offColor:p,rounded:c}=o,f=[x("BGCOLOR",p),x("BEFOREBG",h),r[u]];return c&&f.push("rounded-full before:rounded-full"),f.join(" ")});return(h,u)=>(t.openBlock(),t.createElementBlock("div",{class:"switch relative",style:t.normalizeStyle(i.value),onClick:s},[t.withDirectives(t.createElementVNode("input",{id:h.id,class:"hidden peer/input","onUpdate:modelValue":u[0]||(u[0]=p=>n.value=p),ref_key:"inputRef",ref:l,type:"checkbox"},null,8,Ze),[[t.vModelCheckbox,n.value]]),t.createElementVNode("span",{class:t.normalizeClass(["slider absolute inset-0 cursor-pointer transition-all duration-300 before:absolute before:transition-all before:duration-300",a.value])},null,2)],4))}}),Be=(e,o)=>{const n=e.__vccOpts||e;for(const[l,r]of o)n[l]=r;return n},tt=Be(et,[["__scopeId","data-v-07d209bd"]]),Re=t.defineComponent({__name:"InputHighlight",props:{color:{default:"primary"},rounded:{type:Boolean,default:!1},offset:{default:1}},setup(e){const o=e,n={1:"-top-1",2.5:"-top-2.5"},l=t.computed(()=>{const r=[x("BEFOREBG",o.color)];return o.rounded&&r.push("rounded-b-md"),r.push(n[o.offset]),r.join(" ")});return(r,s)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["relative h-3xs overflow-hidden before:absolute before:bottom-0 before:left-0 before:h-full before:w-0 peer-focus:before:w-full before:transition-[width] before:duration-300 before:ease-linear",l.value])},null,2))}}),ot=["id","type","placeholder","required","minlength","maxlength","pattern"],nt={class:"peer-valid/validation:hidden peer-inavlid/validation:block ml-3xs"},lt={class:"text-xs text-danger"},rt=t.defineComponent({__name:"MclInputText",props:t.mergeModels({id:{},displayBorder:{type:Boolean,default:!1},borderColor:{default:"light-4"},rounded:{type:Boolean,default:!1},displayHighlight:{type:Boolean,default:!0},highlightColor:{default:"primary"},textcolor:{default:"black"},bgColor:{default:"light-1"},placeholder:{default:""},type:{default:"text"},displayShadow:{type:Boolean,default:!0},required:{type:Boolean,default:!1},invalidFeedback:{},minLength:{},maxLength:{},pattern:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const o=e,n=t.useModel(e,"modelValue"),l=t.computed(()=>{const{bgColor:r,displayBorder:s,borderColor:i,displayHighlight:a,displayShadow:h,rounded:u,textcolor:p}=o,c=[x("BGCOLOR",r),x("TEXTCOLOR",p)];return s&&(c.push("border-2"),c.push(x("BORDER",i))),a||(c.push("focus:ring-4 ring-offset-2 transition-all duration-300 ease-linear"),c.push(x("FOCUSRING",i))),h&&c.push("shadow-md"),u&&c.push("rounded-md"),c.join(" ")});return(r,s)=>(t.openBlock(),t.createElementBlock("div",null,[t.withDirectives(t.createElementVNode("input",{id:r.id,type:r.type,class:t.normalizeClass(["w-full p-2xs outline-none peer peer/validation",l.value]),"onUpdate:modelValue":s[0]||(s[0]=i=>n.value=i),placeholder:r.placeholder,required:r.required,minlength:r.minLength,maxlength:r.maxLength,pattern:r.pattern},null,10,ot),[[t.vModelDynamic,n.value]]),r.displayHighlight?(t.openBlock(),t.createBlock(Re,{key:0,color:r.highlightColor,rounded:r.rounded},null,8,["color","rounded"])):t.createCommentVNode("",!0),t.createElementVNode("div",nt,[t.renderSlot(r.$slots,"invalid-feedback",{},()=>[t.createElementVNode("span",lt,t.toDisplayString(r.invalidFeedback),1)])])]))}}),oe=Math.min,G=Math.max,ne=Math.round,le=Math.floor,z=e=>({x:e,y:e}),it={left:"right",right:"left",bottom:"top",top:"bottom"},st={start:"end",end:"start"};function ve(e,o,n){return G(e,oe(o,n))}function re(e,o){return typeof e=="function"?e(o):e}function W(e){return e.split("-")[0]}function ie(e){return e.split("-")[1]}function Oe(e){return e==="x"?"y":"x"}function Ee(e){return e==="y"?"height":"width"}function q(e){return["top","bottom"].includes(W(e))?"y":"x"}function Se(e){return Oe(q(e))}function ct(e,o,n){n===void 0&&(n=!1);const l=ie(e),r=Se(e),s=Ee(r);let i=r==="x"?l===(n?"end":"start")?"right":"left":l==="start"?"bottom":"top";return o.reference[s]>o.floating[s]&&(i=se(i)),[i,se(i)]}function at(e){const o=se(e);return[he(e),o,he(o)]}function he(e){return e.replace(/start|end/g,o=>st[o])}function dt(e,o,n){const l=["left","right"],r=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?o?r:l:o?l:r;case"left":case"right":return o?s:i;default:return[]}}function ut(e,o,n,l){const r=ie(e);let s=dt(W(e),n==="start",l);return r&&(s=s.map(i=>i+"-"+r),o&&(s=s.concat(s.map(he)))),s}function se(e){return e.replace(/left|right|bottom|top/g,o=>it[o])}function ft(e){return{top:0,right:0,bottom:0,left:0,...e}}function pt(e){return typeof e!="number"?ft(e):{top:e,right:e,bottom:e,left:e}}function ce(e){const{x:o,y:n,width:l,height:r}=e;return{width:l,height:r,top:n,left:o,right:o+l,bottom:n+r,x:o,y:n}}function Ve(e,o,n){let{reference:l,floating:r}=e;const s=q(o),i=Se(o),a=Ee(i),h=W(o),u=s==="y",p=l.x+l.width/2-r.width/2,c=l.y+l.height/2-r.height/2,f=l[a]/2-r[a]/2;let d;switch(h){case"top":d={x:p,y:l.y-r.height};break;case"bottom":d={x:p,y:l.y+l.height};break;case"right":d={x:l.x+l.width,y:c};break;case"left":d={x:l.x-r.width,y:c};break;default:d={x:l.x,y:l.y}}switch(ie(o)){case"start":d[i]-=f*(n&&u?-1:1);break;case"end":d[i]+=f*(n&&u?-1:1);break}return d}const ht=async(e,o,n)=>{const{placement:l="bottom",strategy:r="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),h=await(i.isRTL==null?void 0:i.isRTL(o));let u=await i.getElementRects({reference:e,floating:o,strategy:r}),{x:p,y:c}=Ve(u,l,h),f=l,d={},g=0;for(let w=0;w<a.length;w++){const{name:k,fn:y}=a[w],{x:C,y:R,data:E,reset:O}=await y({x:p,y:c,initialPlacement:l,placement:f,strategy:r,middlewareData:d,rects:u,platform:i,elements:{reference:e,floating:o}});p=C??p,c=R??c,d={...d,[k]:{...d[k],...E}},O&&g<=50&&(g++,typeof O=="object"&&(O.placement&&(f=O.placement),O.rects&&(u=O.rects===!0?await i.getElementRects({reference:e,floating:o,strategy:r}):O.rects),{x:p,y:c}=Ve(u,f,h)),w=-1)}return{x:p,y:c,placement:f,strategy:r,middlewareData:d}};async function Le(e,o){var n;o===void 0&&(o={});const{x:l,y:r,platform:s,rects:i,elements:a,strategy:h}=e,{boundary:u="clippingAncestors",rootBoundary:p="viewport",elementContext:c="floating",altBoundary:f=!1,padding:d=0}=re(o,e),g=pt(d),k=a[f?c==="floating"?"reference":"floating":c],y=ce(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(k)))==null||n?k:k.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:p,strategy:h})),C=c==="floating"?{x:l,y:r,width:i.floating.width,height:i.floating.height}:i.reference,R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),E=await(s.isElement==null?void 0:s.isElement(R))?await(s.getScale==null?void 0:s.getScale(R))||{x:1,y:1}:{x:1,y:1},O=ce(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:C,offsetParent:R,strategy:h}):C);return{top:(y.top-O.top+g.top)/E.y,bottom:(O.bottom-y.bottom+g.bottom)/E.y,left:(y.left-O.left+g.left)/E.x,right:(O.right-y.right+g.right)/E.x}}const mt=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(o){var n,l;const{placement:r,middlewareData:s,rects:i,initialPlacement:a,platform:h,elements:u}=o,{mainAxis:p=!0,crossAxis:c=!0,fallbackPlacements:f,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:w=!0,...k}=re(e,o);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=W(r),C=q(a),R=W(a)===a,E=await(h.isRTL==null?void 0:h.isRTL(u.floating)),O=f||(R||!w?[se(a)]:at(a)),$=g!=="none";!f&&$&&O.push(...ut(a,w,g,E));const v=[a,...O],A=await Le(o,k),I=[];let H=((l=s.flip)==null?void 0:l.overflows)||[];if(p&&I.push(A[y]),c){const _=ct(r,i,E);I.push(A[_[0]],A[_[1]])}if(H=[...H,{placement:r,overflows:I}],!I.every(_=>_<=0)){var j,te;const _=(((j=s.flip)==null?void 0:j.index)||0)+1,m=v[_];if(m){var fe;const B=c==="alignment"?C!==q(m):!1,S=((fe=H[0])==null?void 0:fe.overflows[0])>0;if(!B||S)return{data:{index:_,overflows:H},reset:{placement:m}}}let b=(te=H.filter(B=>B.overflows[0]<=0).sort((B,S)=>B.overflows[1]-S.overflows[1])[0])==null?void 0:te.placement;if(!b)switch(d){case"bestFit":{var pe;const B=(pe=H.filter(S=>{if($){const V=q(S.placement);return V===C||V==="y"}return!0}).map(S=>[S.placement,S.overflows.filter(V=>V>0).reduce((V,Ce)=>V+Ce,0)]).sort((S,V)=>S[1]-V[1])[0])==null?void 0:pe[0];B&&(b=B);break}case"initialPlacement":b=a;break}if(r!==b)return{reset:{placement:b}}}return{}}}};async function gt(e,o){const{placement:n,platform:l,elements:r}=e,s=await(l.isRTL==null?void 0:l.isRTL(r.floating)),i=W(n),a=ie(n),h=q(n)==="y",u=["left","top"].includes(i)?-1:1,p=s&&h?-1:1,c=re(o,e);let{mainAxis:f,crossAxis:d,alignmentAxis:g}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return a&&typeof g=="number"&&(d=a==="end"?g*-1:g),h?{x:d*p,y:f*u}:{x:f*u,y:d*p}}const yt=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(o){var n,l;const{x:r,y:s,placement:i,middlewareData:a}=o,h=await gt(o,e);return i===((n=a.offset)==null?void 0:n.placement)&&(l=a.arrow)!=null&&l.alignmentOffset?{}:{x:r+h.x,y:s+h.y,data:{...h,placement:i}}}}},bt=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(o){const{x:n,y:l,placement:r}=o,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:k=>{let{x:y,y:C}=k;return{x:y,y:C}}},...h}=re(e,o),u={x:n,y:l},p=await Le(o,h),c=q(W(r)),f=Oe(c);let d=u[f],g=u[c];if(s){const k=f==="y"?"top":"left",y=f==="y"?"bottom":"right",C=d+p[k],R=d-p[y];d=ve(C,d,R)}if(i){const k=c==="y"?"top":"left",y=c==="y"?"bottom":"right",C=g+p[k],R=g-p[y];g=ve(C,g,R)}const w=a.fn({...o,[f]:d,[c]:g});return{...w,data:{x:w.x-n,y:w.y-l,enabled:{[f]:s,[c]:i}}}}}};function ae(){return typeof window<"u"}function U(e){return me(e)?(e.nodeName||"").toLowerCase():"#document"}function M(e){var o;return(e==null||(o=e.ownerDocument)==null?void 0:o.defaultView)||window}function F(e){var o;return(o=(me(e)?e.ownerDocument:e.document)||window.document)==null?void 0:o.documentElement}function me(e){return ae()?e instanceof Node||e instanceof M(e).Node:!1}function T(e){return ae()?e instanceof Element||e instanceof M(e).Element:!1}function N(e){return ae()?e instanceof HTMLElement||e instanceof M(e).HTMLElement:!1}function Ae(e){return!ae()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof M(e).ShadowRoot}function Q(e){const{overflow:o,overflowX:n,overflowY:l,display:r}=D(e);return/auto|scroll|overlay|hidden|clip/.test(o+l+n)&&!["inline","contents"].includes(r)}function wt(e){return["table","td","th"].includes(U(e))}function de(e){return[":popover-open",":modal"].some(o=>{try{return e.matches(o)}catch{return!1}})}function ge(e){const o=ye(),n=T(e)?D(e):e;return["transform","translate","scale","rotate","perspective"].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)||["transform","translate","scale","rotate","perspective","filter"].some(l=>(n.willChange||"").includes(l))||["paint","layout","strict","content"].some(l=>(n.contain||"").includes(l))}function xt(e){let o=P(e);for(;N(o)&&!X(o);){if(ge(o))return o;if(de(o))return null;o=P(o)}return null}function ye(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function X(e){return["html","body","#document"].includes(U(e))}function D(e){return M(e).getComputedStyle(e)}function ue(e){return T(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function P(e){if(U(e)==="html")return e;const o=e.assignedSlot||e.parentNode||Ae(e)&&e.host||F(e);return Ae(o)?o.host:o}function Me(e){const o=P(e);return X(o)?e.ownerDocument?e.ownerDocument.body:e.body:N(o)&&Q(o)?o:Me(o)}function Z(e,o,n){var l;o===void 0&&(o=[]),n===void 0&&(n=!0);const r=Me(e),s=r===((l=e.ownerDocument)==null?void 0:l.body),i=M(r);if(s){const a=be(i);return o.concat(i,i.visualViewport||[],Q(r)?r:[],a&&n?Z(a):[])}return o.concat(r,Z(r,[],n))}function be(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Te(e){const o=D(e);let n=parseFloat(o.width)||0,l=parseFloat(o.height)||0;const r=N(e),s=r?e.offsetWidth:n,i=r?e.offsetHeight:l,a=ne(n)!==s||ne(l)!==i;return a&&(n=s,l=i),{width:n,height:l,$:a}}function we(e){return T(e)?e:e.contextElement}function Y(e){const o=we(e);if(!N(o))return z(1);const n=o.getBoundingClientRect(),{width:l,height:r,$:s}=Te(o);let i=(s?ne(n.width):n.width)/l,a=(s?ne(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const kt=z(0);function De(e){const o=M(e);return!ye()||!o.visualViewport?kt:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function Ct(e,o,n){return o===void 0&&(o=!1),!n||o&&n!==M(e)?!1:o}function K(e,o,n,l){o===void 0&&(o=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=we(e);let i=z(1);o&&(l?T(l)&&(i=Y(l)):i=Y(e));const a=Ct(s,n,l)?De(s):z(0);let h=(r.left+a.x)/i.x,u=(r.top+a.y)/i.y,p=r.width/i.x,c=r.height/i.y;if(s){const f=M(s),d=l&&T(l)?M(l):l;let g=f,w=be(g);for(;w&&l&&d!==g;){const k=Y(w),y=w.getBoundingClientRect(),C=D(w),R=y.left+(w.clientLeft+parseFloat(C.paddingLeft))*k.x,E=y.top+(w.clientTop+parseFloat(C.paddingTop))*k.y;h*=k.x,u*=k.y,p*=k.x,c*=k.y,h+=R,u+=E,g=M(w),w=be(g)}}return ce({width:p,height:c,x:h,y:u})}function xe(e,o){const n=ue(e).scrollLeft;return o?o.left+n:K(F(e)).left+n}function ze(e,o,n){n===void 0&&(n=!1);const l=e.getBoundingClientRect(),r=l.left+o.scrollLeft-(n?0:xe(e,l)),s=l.top+o.scrollTop;return{x:r,y:s}}function Bt(e){let{elements:o,rect:n,offsetParent:l,strategy:r}=e;const s=r==="fixed",i=F(l),a=o?de(o.floating):!1;if(l===i||a&&s)return n;let h={scrollLeft:0,scrollTop:0},u=z(1);const p=z(0),c=N(l);if((c||!c&&!s)&&((U(l)!=="body"||Q(i))&&(h=ue(l)),N(l))){const d=K(l);u=Y(l),p.x=d.x+l.clientLeft,p.y=d.y+l.clientTop}const f=i&&!c&&!s?ze(i,h,!0):z(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-h.scrollLeft*u.x+p.x+f.x,y:n.y*u.y-h.scrollTop*u.y+p.y+f.y}}function Rt(e){return Array.from(e.getClientRects())}function vt(e){const o=F(e),n=ue(e),l=e.ownerDocument.body,r=G(o.scrollWidth,o.clientWidth,l.scrollWidth,l.clientWidth),s=G(o.scrollHeight,o.clientHeight,l.scrollHeight,l.clientHeight);let i=-n.scrollLeft+xe(e);const a=-n.scrollTop;return D(l).direction==="rtl"&&(i+=G(o.clientWidth,l.clientWidth)-r),{width:r,height:s,x:i,y:a}}function Ot(e,o){const n=M(e),l=F(e),r=n.visualViewport;let s=l.clientWidth,i=l.clientHeight,a=0,h=0;if(r){s=r.width,i=r.height;const u=ye();(!u||u&&o==="fixed")&&(a=r.offsetLeft,h=r.offsetTop)}return{width:s,height:i,x:a,y:h}}function Et(e,o){const n=K(e,!0,o==="fixed"),l=n.top+e.clientTop,r=n.left+e.clientLeft,s=N(e)?Y(e):z(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,h=r*s.x,u=l*s.y;return{width:i,height:a,x:h,y:u}}function Fe(e,o,n){let l;if(o==="viewport")l=Ot(e,n);else if(o==="document")l=vt(F(e));else if(T(o))l=Et(o,n);else{const r=De(e);l={x:o.x-r.x,y:o.y-r.y,width:o.width,height:o.height}}return ce(l)}function Ne(e,o){const n=P(e);return n===o||!T(n)||X(n)?!1:D(n).position==="fixed"||Ne(n,o)}function St(e,o){const n=o.get(e);if(n)return n;let l=Z(e,[],!1).filter(a=>T(a)&&U(a)!=="body"),r=null;const s=D(e).position==="fixed";let i=s?P(e):e;for(;T(i)&&!X(i);){const a=D(i),h=ge(i);!h&&a.position==="fixed"&&(r=null),(s?!h&&!r:!h&&a.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||Q(i)&&!h&&Ne(e,i))?l=l.filter(p=>p!==i):r=a,i=P(i)}return o.set(e,l),l}function Vt(e){let{element:o,boundary:n,rootBoundary:l,strategy:r}=e;const i=[...n==="clippingAncestors"?de(o)?[]:St(o,this._c):[].concat(n),l],a=i[0],h=i.reduce((u,p)=>{const c=Fe(o,p,r);return u.top=G(c.top,u.top),u.right=oe(c.right,u.right),u.bottom=oe(c.bottom,u.bottom),u.left=G(c.left,u.left),u},Fe(o,a,r));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}}function Lt(e){const{width:o,height:n}=Te(e);return{width:o,height:n}}function At(e,o,n){const l=N(o),r=F(o),s=n==="fixed",i=K(e,!0,s,o);let a={scrollLeft:0,scrollTop:0};const h=z(0);function u(){h.x=xe(r)}if(l||!l&&!s)if((U(o)!=="body"||Q(r))&&(a=ue(o)),l){const d=K(o,!0,s,o);h.x=d.x+o.clientLeft,h.y=d.y+o.clientTop}else r&&u();s&&!l&&r&&u();const p=r&&!l&&!s?ze(r,a):z(0),c=i.left+a.scrollLeft-h.x-p.x,f=i.top+a.scrollTop-h.y-p.y;return{x:c,y:f,width:i.width,height:i.height}}function ke(e){return D(e).position==="static"}function $e(e,o){if(!N(e)||D(e).position==="fixed")return null;if(o)return o(e);let n=e.offsetParent;return F(e)===n&&(n=n.ownerDocument.body),n}function Ie(e,o){const n=M(e);if(de(e))return n;if(!N(e)){let r=P(e);for(;r&&!X(r);){if(T(r)&&!ke(r))return r;r=P(r)}return n}let l=$e(e,o);for(;l&&wt(l)&&ke(l);)l=$e(l,o);return l&&X(l)&&ke(l)&&!ge(l)?n:l||xt(e)||n}const Mt=async function(e){const o=this.getOffsetParent||Ie,n=this.getDimensions,l=await n(e.floating);return{reference:At(e.reference,await o(e.floating),e.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}};function Tt(e){return D(e).direction==="rtl"}const Dt={convertOffsetParentRelativeRectToViewportRelativeRect:Bt,getDocumentElement:F,getClippingRect:Vt,getOffsetParent:Ie,getElementRects:Mt,getClientRects:Rt,getDimensions:Lt,getScale:Y,isElement:T,isRTL:Tt};function _e(e,o){return e.x===o.x&&e.y===o.y&&e.width===o.width&&e.height===o.height}function zt(e,o){let n=null,l;const r=F(e);function s(){var a;clearTimeout(l),(a=n)==null||a.disconnect(),n=null}function i(a,h){a===void 0&&(a=!1),h===void 0&&(h=1),s();const u=e.getBoundingClientRect(),{left:p,top:c,width:f,height:d}=u;if(a||o(),!f||!d)return;const g=le(c),w=le(r.clientWidth-(p+f)),k=le(r.clientHeight-(c+d)),y=le(p),R={rootMargin:-g+"px "+-w+"px "+-k+"px "+-y+"px",threshold:G(0,oe(1,h))||1};let E=!0;function O($){const v=$[0].intersectionRatio;if(v!==h){if(!E)return i();v?i(!1,v):l=setTimeout(()=>{i(!1,1e-7)},1e3)}v===1&&!_e(u,e.getBoundingClientRect())&&i(),E=!1}try{n=new IntersectionObserver(O,{...R,root:r.ownerDocument})}catch{n=new IntersectionObserver(O,R)}n.observe(e)}return i(!0),s}function Ft(e,o,n,l){l===void 0&&(l={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:h=!1}=l,u=we(e),p=r||s?[...u?Z(u):[],...Z(o)]:[];p.forEach(y=>{r&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const c=u&&a?zt(u,n):null;let f=-1,d=null;i&&(d=new ResizeObserver(y=>{let[C]=y;C&&C.target===u&&d&&(d.unobserve(o),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var R;(R=d)==null||R.observe(o)})),n()}),u&&!h&&d.observe(u),d.observe(o));let g,w=h?K(e):null;h&&k();function k(){const y=K(e);w&&!_e(w,y)&&n(),w=y,g=requestAnimationFrame(k)}return n(),()=>{var y;p.forEach(C=>{r&&C.removeEventListener("scroll",n),s&&C.removeEventListener("resize",n)}),c==null||c(),(y=d)==null||y.disconnect(),d=null,h&&cancelAnimationFrame(g)}}const Nt=yt,$t=bt,It=mt,_t=(e,o,n)=>{const l=new Map,r={platform:Dt,...n},s={...r.platform,_c:l};return ht(e,o,{...r,platform:s})};function Pt(e){return e!=null&&typeof e=="object"&&"$el"in e}function Pe(e){if(Pt(e)){const o=e.$el;return me(o)&&U(o)==="#comment"?null:o}return e}function ee(e){return typeof e=="function"?e():t.unref(e)}function He(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function je(e,o){const n=He(e);return Math.round(o*n)/n}function Ht(e,o,n){n===void 0&&(n={});const l=n.whileElementsMounted,r=t.computed(()=>{var v;return(v=ee(n.open))!=null?v:!0}),s=t.computed(()=>ee(n.middleware)),i=t.computed(()=>{var v;return(v=ee(n.placement))!=null?v:"bottom"}),a=t.computed(()=>{var v;return(v=ee(n.strategy))!=null?v:"absolute"}),h=t.computed(()=>{var v;return(v=ee(n.transform))!=null?v:!0}),u=t.computed(()=>Pe(e.value)),p=t.computed(()=>Pe(o.value)),c=t.ref(0),f=t.ref(0),d=t.ref(a.value),g=t.ref(i.value),w=t.shallowRef({}),k=t.ref(!1),y=t.computed(()=>{const v={position:d.value,left:"0",top:"0"};if(!p.value)return v;const A=je(p.value,c.value),I=je(p.value,f.value);return h.value?{...v,transform:"translate("+A+"px, "+I+"px)",...He(p.value)>=1.5&&{willChange:"transform"}}:{position:d.value,left:A+"px",top:I+"px"}});let C;function R(){if(u.value==null||p.value==null)return;const v=r.value;_t(u.value,p.value,{middleware:s.value,placement:i.value,strategy:a.value}).then(A=>{c.value=A.x,f.value=A.y,d.value=A.strategy,g.value=A.placement,w.value=A.middlewareData,k.value=v!==!1})}function E(){typeof C=="function"&&(C(),C=void 0)}function O(){if(E(),l===void 0){R();return}if(u.value!=null&&p.value!=null){C=l(u.value,p.value,R);return}}function $(){r.value||(k.value=!1)}return t.watch([s,i,a,r],R,{flush:"sync"}),t.watch([u,p],O,{flush:"sync"}),t.watch(r,$,{flush:"sync"}),t.getCurrentScope()&&t.onScopeDispose(E),{x:t.shallowReadonly(c),y:t.shallowReadonly(f),strategy:t.shallowReadonly(d),placement:t.shallowReadonly(g),middlewareData:t.shallowReadonly(w),isPositioned:t.shallowReadonly(k),floatingStyles:y,update:R}}const jt=["id","placeholder","aria-expanded"],Gt=["onClick","onMouseenter"],Wt=Be(t.defineComponent({__name:"MclSelect",props:t.mergeModels({id:{},displayBorder:{type:Boolean,default:!1},borderColor:{default:"light-4"},rounded:{type:Boolean,default:!1},displayHighlight:{type:Boolean,default:!0},highlightColor:{default:"primary"},textcolor:{default:"black"},bgColor:{default:"light-1"},iconColor:{default:"dark-4"},placeholder:{default:""},displayShadow:{type:Boolean,default:!0},required:{type:Boolean,default:!1},options:{},selectColor:{default:"primary"},invalidFeedback:{default:"No match."}},{modelValue:{default:null},modelModifiers:{}}),emits:t.mergeModels(["open","close","clear","changed","select"],["update:modelValue"]),setup(e,{emit:o}){const n=e;t.useSlots();const l=o,r=t.useModel(e,"modelValue"),s=t.ref(),i=t.ref(),a=t.ref(),h=t.ref([]),u=t.ref(null),p=t.ref(),c=t.ref(!1),f=t.ref(""),d=t.ref(0),g=()=>{c.value=!0},w=()=>{var m;f.value="",c.value=!1,u.value=null,(m=i.value)==null||m.blur(),r.value=""},k=()=>{c.value=!1,d.value=0},y=()=>{var m;c.value=!c.value,d.value=0,c.value===!0&&((m=i.value)==null||m.focus())},C=m=>{m.preventDefault(),f.value!==""&&(f.value=""),d.value=0,r.value="",l("clear")},R=(m,b)=>{h.value[b]=m},E=m=>{m.style.pointerEvents="none"},O=m=>{m.style.pointerEvents="auto"},$=m=>{d.value=m},v=(m,b)=>{m.preventDefault(),f.value=typeof b=="string"?b:b.text;const B=typeof b=="string"?b:b.value;r.value=B,c.value=!1,l("select",B)},A=t.computed(()=>{const{bgColor:m,displayBorder:b,borderColor:B,displayHighlight:S,displayShadow:V,rounded:Ce,textcolor:Jt}=n,J=[x("BGCOLOR",m),x("TEXTCOLOR",Jt)];return b&&(J.push("border-2"),J.push(x("BORDER",B))),S||J.push("ring-offset-2 transition-all duration-300 ease-linear"),V&&J.push("shadow-md"),Ce&&J.push("rounded-md"),J.join(" ")}),I=t.computed(()=>{const{highlightColor:m,rounded:b}=n,B=[x("BEFOREBG",m)];return b&&B.push("rounded-b-md"),B.join(" ")}),H=t.computed(()=>{const{displayHighlight:m,bgColor:b,borderColor:B,rounded:S}=n,V=[x("BGCOLOR",b),x("BORDER",B)];return m||V.push("mt-2xs"),S&&V.push("rounded-md"),V.join(" ")}),j=t.computed(()=>f.value===""?n.options:n.options.filter(b=>{const B=new RegExp(`${f.value}`,"gi");return typeof b=="string"?b.match(B):b.text.match(B)})),te=m=>{c.value&&(m==="up"&&d.value>0&&d.value--,m==="down"&&d.value<j.value.length-1&&d.value++)},fe=()=>{if(!c.value)return;const m=j.value[d.value];let b;typeof m=="string"?(f.value=m,b=m):(f.value=m.text,b=m.value),r.value=b,c.value=!1,l("select",b)},pe=t.computed(()=>({width:`${p.value}px`})),{floatingStyles:_}=Ht(s,a,{whileElementsMounted:Ft,strategy:"absolute",open:c,transform:!1,placement:"bottom",middleware:[It(),Nt(-2.2),$t()]});return Ge.useResizeObserver(s,()=>{s.value&&(p.value=s.value.clientWidth)}),t.watch(c,m=>{l(m===!0?"open":"close")}),t.watch(r,m=>{if(m===null){c.value=!1,u.value=null;return}l("changed",m)}),t.watch(d,()=>{u.value=h.value[d.value],u.value&&u.value.scrollIntoView&&u.value.scrollIntoView({block:"nearest"})}),(m,b)=>t.withDirectives((t.openBlock(),t.createElementBlock("div",{onKeyup:[t.withKeys(w,["esc"]),b[1]||(b[1]=t.withKeys(B=>te("down"),["down"])),b[2]||(b[2]=t.withKeys(B=>te("up"),["up"])),t.withKeys(fe,["enter"])],ref_key:"componentRef",ref:s,class:"relative"},[t.createElementVNode("div",{class:t.normalizeClass(["p-2xs flex relative gap-3xs",[!m.displayHighlight&&c.value&&t.unref(x)("RINGCOLOR",m.borderColor)+" ring-4",A.value]])},[t.withDirectives(t.createElementVNode("input",{id:m.id,type:"text",class:"w-full bg-transparent outline-none","onUpdate:modelValue":b[0]||(b[0]=B=>f.value=B),ref_key:"inputBox",ref:i,role:"combobox",autocomplete:"off",placeholder:m.placeholder,"aria-autocomplete":"list","aria-expanded":c.value,onFocus:g},null,40,jt),[[t.vModelText,f.value]]),t.createElementVNode("div",{class:t.normalizeClass(["flex items-center px-3xs",[f.value===""?"hidden cursor-text":"block cursor-pointer"]]),onClick:C},[(t.openBlock(),t.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",class:t.normalizeClass(["h-xs opacity-70",[t.unref(x)("SVGFILL",m.iconColor)]])},b[3]||(b[3]=[t.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))],2),t.createElementVNode("div",{class:"flex items-center px-3xs",onClick:y},[(t.openBlock(),t.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",class:t.normalizeClass(["h-xs",[c.value?"rotate-180":"rotate-0","transition-transform duration-300 ease-in",t.unref(x)("SVGFILL",m.iconColor)]])},b[4]||(b[4]=[t.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))])],2),m.displayHighlight?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.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 -top-1",[c.value?"before:w-full":"before:w-0",I.value]])},null,2)):t.createCommentVNode("",!0),t.createVNode(t.Transition,{name:"options",onBeforeLeave:E,onEnter:O},{default:t.withCtx(()=>[c.value?(t.openBlock(),t.createElementBlock("ul",{key:0,class:t.normalizeClass([[H.value],"max-h-[200px] overflow-y-auto border-2"]),style:t.normalizeStyle({...pe.value,...t.unref(_)}),role:"listbox",ref_key:"dropdownRef",ref:a},[j.value.length>0?t.renderSlot(m.$slots,"dropdown",{key:0,optionClick:v,options:j.value,activeIndex:d.value,setRef:R,hover:$},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(j.value,(B,S)=>(t.openBlock(),t.createElementBlock("li",{key:S,class:t.normalizeClass(["p-2xs cursor-pointer",[d.value===S&&t.unref(x)("BGCOLOR",m.highlightColor)]]),role:"option",ref_for:!0,ref:V=>R(V,S),onClick:V=>v(V,B),onMouseenter:V=>$(S)},t.toDisplayString(typeof B=="string"?B:B.text),43,Gt))),128))],!0):t.renderSlot(m.$slots,"no-match",{key:1},()=>[t.createElementVNode("li",{class:t.normalizeClass(["p-2xs cursor-pointer",[t.unref(x)("HVBGCOLOR",m.selectColor)]])},[t.createElementVNode("span",null,t.toDisplayString(m.invalidFeedback),1)],2)],!0)],6)):t.createCommentVNode("",!0)]),_:3})],32)),[[t.unref(x.vClickOutside),k]])}}),[["__scopeId","data-v-f80afd47"]]),qt=["id","placeholder","required","rows"],Ut=t.defineComponent({__name:"MclTextArea",props:t.mergeModels({id:{},displayBorder:{type:Boolean,default:!1},borderColor:{default:"light-4"},rounded:{type:Boolean,default:!1},displayHighlight:{type:Boolean,default:!0},highlightColor:{default:"primary"},bgColor:{default:"light-1"},textcolor:{default:"black"},placeholder:{default:""},displayShadow:{type:Boolean,default:!0},required:{type:Boolean,default:!1},rows:{default:5}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const o=e,n=t.useModel(e,"modelValue"),l=t.computed(()=>{const{bgColor:r,displayBorder:s,borderColor:i,displayHighlight:a,displayShadow:h,rounded:u,textcolor:p}=o,c=[x("BGCOLOR",r),x("TEXTCOLOR",p)];return s&&(c.push("border-2"),c.push(x("BORDER",i))),a||(c.push("focus:ring-4 ring-offset-2 transition-all duration-300 ease-linear"),c.push(x("FOCUSRING",i))),h&&c.push("shadow-md"),u&&c.push("rounded-md"),c.join(" ")});return(r,s)=>(t.openBlock(),t.createElementBlock("div",null,[t.withDirectives(t.createElementVNode("textarea",{id:r.id,class:t.normalizeClass(["w-full p-2xs outline-none input__text peer",l.value]),"onUpdate:modelValue":s[0]||(s[0]=i=>n.value=i),placeholder:r.placeholder,required:r.required,rows:r.rows},null,10,qt),[[t.vModelText,n.value]]),r.displayHighlight?(t.openBlock(),t.createBlock(Re,{key:0,color:r.highlightColor,rounded:r.rounded,offset:2.5},null,8,["color","rounded"])):t.createCommentVNode("",!0)]))}}),Kt={class:"relative"},Xt=["id","value","checked"],Yt=t.defineComponent({__name:"MclCheckbox",props:t.mergeModels({id:{},inputSize:{default:"md"},bgColor:{default:"light-1"},checkedBgColor:{default:"warning"},checkColor:{default:"dark-3"},borderColor:{default:"dark-1"},displayShadow:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},value:{},checked:{type:Boolean,default:!1}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:t.mergeModels(["checkbox-click"],["update:modelValue"]),setup(e,{emit:o}){const n={primary:"peer-checked/input:bg-primary",secondary:"peer-checked/input:bg-secondary",success:"peer-checked/input:bg-success",info:"peer-checked/input:bg-info",warning:"peer-checked/input:bg-warning",danger:"peer-checked/input:bg-danger","light-1":"peer-checked/input:bg-light-1","light-2":"peer-checked/input:bg-light-2","light-3":"peer-checked/input:bg-light-3","light-4":"peer-checked/input:bg-light-4","dark-1":"peer-checked/input:bg-dark-1","dark-2":"peer-checked/input:bg-dark-2","dark-3":"peer-checked/input:bg-dark-3","dark-4":"peer-checked/input:bg-dark-1",transparent:"peer-checked/input:bg-transparent",black:"peer-checked/input:bg-black",white:"peer-checked/input:bg-white"},l={primary:"before:text-primary",secondary:"before:text-secondary",success:"before:text-success",info:"before:text-info",warning:"before:text-warning",danger:"before:text-danger","light-1":"before:text-light-1","light-2":"before:text-light-2","light-3":"before:text-light-3","light-4":"before:text-light-4","dark-1":"before:text-dark-1","dark-2":"before:text-dark-2","dark-3":"before:text-dark-3","dark-4":"before:text-dark-1",transparent:"before:text-transparent",black:"before:text-black",white:"before:text-white"},r=e,s=t.useModel(e,"modelValue"),i=t.ref(),a=o,h=()=>{var f;(f=i.value)==null||f.click()},u=f=>{var g;const d=f.target.value;a("checkbox-click",f,i.value.checked,(g=i.value)!=null&&g.checked?d:"")},p=t.computed(()=>{const{inputSize:f}=r;return f==="sm"?"h-xs w-xs":f==="lg"?"h-md w-md":"h-sm w-sm"}),c=t.computed(()=>{const{bgColor:f,borderColor:d,displayShadow:g,rounded:w,checkedBgColor:k,checkColor:y}=r,C=[x("BGCOLOR",f),x("BORDER",d),l[y],n[k]];return g&&C.push("drop-shadow-md"),w&&C.push("rounded-md"),C.join(" ")});return(f,d)=>(t.openBlock(),t.createElementBlock("div",Kt,[t.withDirectives(t.createElementVNode("input",{id:f.id,ref_key:"checkboxRef",ref:i,type:"checkbox",value:f.value,checked:f.checked,"onUpdate:modelValue":d[0]||(d[0]=g=>s.value=g),class:"appearance-none peer/input",onChange:u},null,40,Xt),[[t.vModelCheckbox,s.value]]),t.createElementVNode("span",{class:t.normalizeClass(["relative border peer-checked/input:border-2 inline-block p-3xs hover:bg-opacity-60 peer-checked/input:hover:bg-opacity-60 peer-checked/input:before:content-['\\2713'] peer-checked/input:before:inline-block peer-checked/input:before:absolute before:top-1/2 before:-translate-y-1/2 before:left-1/2 before:-translate-x-1/2 transition-colors duration-200 ease-linear",[c.value,p.value]]),onClick:h},null,2)]))}});L.MclCheckbox=Yt,L.MclFormGroup=qe,L.MclInputFile=Xe,L.MclInputRadio=Qe,L.MclInputSwitch=tt,L.MclInputText=rt,L.MclSelect=Wt,L.MclTextArea=Ut,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('.switch[data-v-07d209bd]{width:var(--switch-width);height:var(--switch-height)}.slider[data-v-07d209bd]:before{content:"";height:var(--slider-size);width:var(--slider-size);left:var(--gutter-size);bottom:var(--gutter-size)}input:checked+.slider[data-v-07d209bd]:before{-webkit-transform:translateX(var(--slider-size));-ms-transform:translateX(var(--slider-size));transform:translate(var(--slider-size))}.options-enter-active[data-v-f80afd47],.options-leave-active[data-v-f80afd47]{opacity:1;transition:opacity .3s linear,transform .3s linear}.options-enter-from[data-v-f80afd47],.options-leave-to[data-v-f80afd47]{opacity:0;transform:translateY(-10px)}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
(function(L,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("@bobbykim/manguito-theme"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["exports","vue","@bobbykim/manguito-theme","@vueuse/core"],t):(L=typeof globalThis<"u"?globalThis:L||self,t(L.MclForms={},L.Vue,L.ManguitoTheme,L.core))})(this,function(L,t,x,Ge){"use strict";const We=["for"],qe=t.defineComponent({__name:"MclFormGroup",props:{labelFor:{},textColor:{default:"dark-3"},textSize:{default:"md"},textBold:{type:Boolean,default:!1},label:{}},setup(e){const o=e;t.useSlots();const n=t.computed(()=>{const{textColor:l,textSize:r,textBold:s}=o,i=[x("TEXTCOLOR",l),x("BODYTEXT",r)];return s&&i.push("font-bold"),i.join(" ")});return(l,r)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("label",{for:l.labelFor,class:"inline-block"},[t.renderSlot(l.$slots,"label",{},()=>[t.createElementVNode("p",{class:t.normalizeClass(["mb-2xs",n.value])},t.toDisplayString(l.label),3)])],8,We),t.renderSlot(l.$slots,"default")]))}}),Ue={class:"shrink-0 my-3xs ml-3xs mr-xs"},Ke=["id","required","accept"],Xe=t.defineComponent({__name:"MclInputFile",props:t.mergeModels({id:{},displayBorder:{type:Boolean,default:!1},borderColor:{default:"light-4"},rounded:{type:Boolean,default:!1},bgColor:{default:"light-1"},buttonText:{default:"Browse File"},buttonTextColor:{default:"dark-3"},buttonColor:{default:"light-4"},displayShadow:{type:Boolean,default:!0},textColor:{default:"black"},displayClear:{type:Boolean,default:!1},isRequired:{type:Boolean,default:!1},accept:{default:"image/jpg,image/jpeg,image/png"}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const o=e,n=t.useModel(e,"modelValue"),l=t.ref(),r=t.ref(0),s=()=>{l.value.click()},i=u=>{const d=u.target.files[0];n.value=d},c=()=>{n.value=null,r.value++},h=t.computed(()=>{const{rounded:u,displayBorder:d,borderColor:g,displayShadow:w,bgColor:k}=o,b=[x("BGCOLOR",k)];return u&&b.push("rounded-md"),d&&(b.push("border-2"),b.push(x("BORDER",g))),w&&b.push("shadow-md"),b.join(" ")}),f=t.computed(()=>{const{textColor:u}=o;return[x("TEXTCOLOR",u)].join(" ")}),p=t.computed(()=>{const{buttonColor:u,buttonTextColor:d,rounded:g}=o,w=[x("BGCOLOR",u),x("TEXTCOLOR",d)];return g&&w.push("rounded-l-md"),w.join(" ")}),a=t.computed(()=>{const{buttonColor:u,rounded:d}=o,g=[x("BGCOLOR",u)];return d&&g.push("rounded-r-md"),g.join(" ")});return(u,d)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex items-center overflow-hidden",h.value])},[t.createElementVNode("div",Ue,[t.createElementVNode("button",{class:t.normalizeClass(["px-xs py-2xs hover:bg-opacity-70 transition-all duration-200 ease-linear max-w-full",p.value]),onClick:s},t.toDisplayString(u.buttonText),3)]),(t.openBlock(),t.createElementBlock("input",{type:"file",id:u.id,ref_key:"inputRef",ref:l,class:t.normalizeClass(["file:hidden w-full bg-transparent",[f.value]]),required:u.isRequired,accept:u.accept,key:r.value,onChange:i},null,42,Ke)),u.displayClear?(t.openBlock(),t.createElementBlock("div",{key:0,class:"self-stretch my-3xs mr-3xs",onClick:c},[t.createElementVNode("button",{class:t.normalizeClass(["px-xs py-2xs h-full flex items-center hover:bg-opacity-70 transition-all duration-200 ease-linear",[a.value]]),"aria-label":"clear"},[(t.openBlock(),t.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",class:t.normalizeClass(["h-xs",t.unref(x)("SVGFILL",u.buttonTextColor)])},d[0]||(d[0]=[t.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))],2)])):t.createCommentVNode("",!0)],2))}}),Ye={class:"flex items-center"},Je=["id","value","checked"],Qe=t.defineComponent({__name:"MclInputRadio",props:{id:{},radioSize:{default:"md"},bgColor:{default:"success"},checkedColor:{default:"light-1"},displayShadow:{type:Boolean,default:!1},value:{default:""},checked:{type:Boolean,default:!1}},emits:["change"],setup(e,{emit:o}){const n=e,l=t.ref(),r=o,s=()=>{var p;(p=l.value)==null||p.click()},i=t.computed(()=>{const{radioSize:p}=n;return p==="sm"?"h-xs w-xs":p==="lg"?"h-md w-md":"h-sm w-sm"}),c=t.computed(()=>{const{radioSize:p}=n;return p==="sm"?"peer-checked:before:h-2xs peer-checked:before:w-2xs":p==="lg"?"peer-checked:before:h-xs peer-checked:before:w-xs":"peer-checked:before:h-[12px] peer-checked:before:w-[12px]"}),h=t.computed(()=>{const{bgColor:p,checkedColor:a,displayShadow:u}=n,d=[x("BGCOLOR",p),x("BEFOREBG",a)];return u&&d.push("drop-shadow-md"),d.join(" ")}),f=p=>{const a=p.target.value;r("change",p,a)};return(p,a)=>(t.openBlock(),t.createElementBlock("div",Ye,[t.createElementVNode("input",{id:p.id,type:"radio",class:"appearance-none peer",ref_key:"radioRef",ref:l,value:p.value,checked:p.checked,onChange:f},null,40,Je),t.createElementVNode("span",{class:t.normalizeClass(["rounded-full inline-block relative before:absolute before:rounded-full before:top-1/2 before:left-1/2 before:-translate-x-1/2 before:-translate-y-1/2",[i.value,c.value,h.value]]),onClick:s},null,2)]))}}),Ze=["id"],et=t.defineComponent({__name:"MclInputSwitch",props:t.mergeModels({id:{},sliderColor:{default:"light-1"},onColor:{default:"success"},offColor:{default:"dark-1"},switchSize:{default:"md"},rounded:{type:Boolean,default:!0}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const o=e,n=t.useModel(e,"modelValue"),l=t.ref(),r={primary:"peer-checked/input:bg-primary",secondary:"peer-checked/input:bg-secondary",success:"peer-checked/input:bg-success",info:"peer-checked/input:bg-info",warning:"peer-checked/input:bg-warning",danger:"peer-checked/input:bg-danger","light-1":"peer-checked/input:bg-light-1","light-2":"peer-checked/input:bg-light-2","light-3":"peer-checked/input:bg-light-3","light-4":"peer-checked/input:bg-light-4","dark-1":"peer-checked/input:bg-dark-1","dark-2":"peer-checked/input:bg-dark-2","dark-3":"peer-checked/input:bg-dark-3","dark-4":"peer-checked/input:bg-dark-1",transparent:"peer-checked/input:bg-transparent",black:"peer-checked/input:bg-black",white:"peer-checked/input:bg-white"},s=()=>{var h;(h=l.value)==null||h.click()},i=t.computed(()=>o.switchSize==="sm"?{"--switch-width":"30px","--switch-height":"17px","--slider-size":"13px","--gutter-size":"2px"}:o.switchSize==="lg"?{"--switch-width":"60px","--switch-height":"34px","--slider-size":"26px","--gutter-size":"4px"}:{"--switch-width":"45px","--switch-height":"25.5px","--slider-size":"19.5px","--gutter-size":"3px"}),c=t.computed(()=>{const{sliderColor:h,onColor:f,offColor:p,rounded:a}=o,u=[x("BGCOLOR",p),x("BEFOREBG",h),r[f]];return a&&u.push("rounded-full before:rounded-full"),u.join(" ")});return(h,f)=>(t.openBlock(),t.createElementBlock("div",{class:"switch relative",style:t.normalizeStyle(i.value),onClick:s},[t.withDirectives(t.createElementVNode("input",{id:h.id,class:"hidden peer/input","onUpdate:modelValue":f[0]||(f[0]=p=>n.value=p),ref_key:"inputRef",ref:l,type:"checkbox"},null,8,Ze),[[t.vModelCheckbox,n.value]]),t.createElementVNode("span",{class:t.normalizeClass(["slider absolute inset-0 cursor-pointer transition-all duration-300 before:absolute before:transition-all before:duration-300",c.value])},null,2)],4))}}),Be=(e,o)=>{const n=e.__vccOpts||e;for(const[l,r]of o)n[l]=r;return n},tt=Be(et,[["__scopeId","data-v-07d209bd"]]),Re=t.defineComponent({__name:"InputHighlight",props:{color:{default:"primary"},rounded:{type:Boolean,default:!1},offset:{default:1}},setup(e){const o=e,n={1:"-top-1",2.5:"-top-2.5"},l=t.computed(()=>{const r=[x("BEFOREBG",o.color)];return o.rounded&&r.push("rounded-b-md"),r.push(n[o.offset]),r.join(" ")});return(r,s)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["relative h-3xs overflow-hidden before:absolute before:bottom-0 before:left-0 before:h-full before:w-0 peer-focus:before:w-full before:transition-[width] before:duration-300 before:ease-linear",l.value])},null,2))}}),ot=["id","type","placeholder","required","minlength","maxlength","pattern"],nt={class:"peer-valid/validation:hidden peer-inavlid/validation:block ml-3xs"},lt={class:"text-xs text-danger"},rt=t.defineComponent({__name:"MclInputText",props:t.mergeModels({id:{},displayBorder:{type:Boolean,default:!1},borderColor:{default:"light-4"},rounded:{type:Boolean,default:!1},displayHighlight:{type:Boolean,default:!0},highlightColor:{default:"primary"},textcolor:{default:"black"},bgColor:{default:"light-1"},placeholder:{default:""},type:{default:"text"},displayShadow:{type:Boolean,default:!0},required:{type:Boolean,default:!1},invalidFeedback:{},minLength:{},maxLength:{},pattern:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const o=e,n=t.useModel(e,"modelValue"),l=t.computed(()=>{const{bgColor:r,displayBorder:s,borderColor:i,displayHighlight:c,displayShadow:h,rounded:f,textcolor:p}=o,a=[x("BGCOLOR",r),x("TEXTCOLOR",p)];return s&&(a.push("border-2"),a.push(x("BORDER",i))),c||(a.push("focus:ring-4 ring-offset-2 transition-all duration-300 ease-linear"),a.push(x("FOCUSRING",i))),h&&a.push("shadow-md"),f&&a.push("rounded-md"),a.join(" ")});return(r,s)=>(t.openBlock(),t.createElementBlock("div",null,[t.withDirectives(t.createElementVNode("input",{id:r.id,type:r.type,class:t.normalizeClass(["w-full p-2xs outline-none peer peer/validation",l.value]),"onUpdate:modelValue":s[0]||(s[0]=i=>n.value=i),placeholder:r.placeholder,required:r.required,minlength:r.minLength,maxlength:r.maxLength,pattern:r.pattern},null,10,ot),[[t.vModelDynamic,n.value]]),r.displayHighlight?(t.openBlock(),t.createBlock(Re,{key:0,color:r.highlightColor,rounded:r.rounded},null,8,["color","rounded"])):t.createCommentVNode("",!0),t.createElementVNode("div",nt,[t.renderSlot(r.$slots,"invalid-feedback",{},()=>[t.createElementVNode("span",lt,t.toDisplayString(r.invalidFeedback),1)])])]))}}),oe=Math.min,G=Math.max,ne=Math.round,le=Math.floor,z=e=>({x:e,y:e}),it={left:"right",right:"left",bottom:"top",top:"bottom"},st={start:"end",end:"start"};function ve(e,o,n){return G(e,oe(o,n))}function re(e,o){return typeof e=="function"?e(o):e}function W(e){return e.split("-")[0]}function ie(e){return e.split("-")[1]}function Oe(e){return e==="x"?"y":"x"}function Ee(e){return e==="y"?"height":"width"}function q(e){return["top","bottom"].includes(W(e))?"y":"x"}function Se(e){return Oe(q(e))}function at(e,o,n){n===void 0&&(n=!1);const l=ie(e),r=Se(e),s=Ee(r);let i=r==="x"?l===(n?"end":"start")?"right":"left":l==="start"?"bottom":"top";return o.reference[s]>o.floating[s]&&(i=se(i)),[i,se(i)]}function ct(e){const o=se(e);return[he(e),o,he(o)]}function he(e){return e.replace(/start|end/g,o=>st[o])}function dt(e,o,n){const l=["left","right"],r=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?o?r:l:o?l:r;case"left":case"right":return o?s:i;default:return[]}}function ft(e,o,n,l){const r=ie(e);let s=dt(W(e),n==="start",l);return r&&(s=s.map(i=>i+"-"+r),o&&(s=s.concat(s.map(he)))),s}function se(e){return e.replace(/left|right|bottom|top/g,o=>it[o])}function ut(e){return{top:0,right:0,bottom:0,left:0,...e}}function pt(e){return typeof e!="number"?ut(e):{top:e,right:e,bottom:e,left:e}}function ae(e){const{x:o,y:n,width:l,height:r}=e;return{width:l,height:r,top:n,left:o,right:o+l,bottom:n+r,x:o,y:n}}function Ve(e,o,n){let{reference:l,floating:r}=e;const s=q(o),i=Se(o),c=Ee(i),h=W(o),f=s==="y",p=l.x+l.width/2-r.width/2,a=l.y+l.height/2-r.height/2,u=l[c]/2-r[c]/2;let d;switch(h){case"top":d={x:p,y:l.y-r.height};break;case"bottom":d={x:p,y:l.y+l.height};break;case"right":d={x:l.x+l.width,y:a};break;case"left":d={x:l.x-r.width,y:a};break;default:d={x:l.x,y:l.y}}switch(ie(o)){case"start":d[i]-=u*(n&&f?-1:1);break;case"end":d[i]+=u*(n&&f?-1:1);break}return d}const ht=async(e,o,n)=>{const{placement:l="bottom",strategy:r="absolute",middleware:s=[],platform:i}=n,c=s.filter(Boolean),h=await(i.isRTL==null?void 0:i.isRTL(o));let f=await i.getElementRects({reference:e,floating:o,strategy:r}),{x:p,y:a}=Ve(f,l,h),u=l,d={},g=0;for(let w=0;w<c.length;w++){const{name:k,fn:b}=c[w],{x:C,y:R,data:E,reset:O}=await b({x:p,y:a,initialPlacement:l,placement:u,strategy:r,middlewareData:d,rects:f,platform:i,elements:{reference:e,floating:o}});p=C??p,a=R??a,d={...d,[k]:{...d[k],...E}},O&&g<=50&&(g++,typeof O=="object"&&(O.placement&&(u=O.placement),O.rects&&(f=O.rects===!0?await i.getElementRects({reference:e,floating:o,strategy:r}):O.rects),{x:p,y:a}=Ve(f,u,h)),w=-1)}return{x:p,y:a,placement:u,strategy:r,middlewareData:d}};async function Le(e,o){var n;o===void 0&&(o={});const{x:l,y:r,platform:s,rects:i,elements:c,strategy:h}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:a="floating",altBoundary:u=!1,padding:d=0}=re(o,e),g=pt(d),k=c[u?a==="floating"?"reference":"floating":a],b=ae(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(k)))==null||n?k:k.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:f,rootBoundary:p,strategy:h})),C=a==="floating"?{x:l,y:r,width:i.floating.width,height:i.floating.height}:i.reference,R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),E=await(s.isElement==null?void 0:s.isElement(R))?await(s.getScale==null?void 0:s.getScale(R))||{x:1,y:1}:{x:1,y:1},O=ae(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:C,offsetParent:R,strategy:h}):C);return{top:(b.top-O.top+g.top)/E.y,bottom:(O.bottom-b.bottom+g.bottom)/E.y,left:(b.left-O.left+g.left)/E.x,right:(O.right-b.right+g.right)/E.x}}const mt=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(o){var n,l;const{placement:r,middlewareData:s,rects:i,initialPlacement:c,platform:h,elements:f}=o,{mainAxis:p=!0,crossAxis:a=!0,fallbackPlacements:u,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:w=!0,...k}=re(e,o);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const b=W(r),C=q(c),R=W(c)===c,E=await(h.isRTL==null?void 0:h.isRTL(f.floating)),O=u||(R||!w?[se(c)]:ct(c)),$=g!=="none";!u&&$&&O.push(...ft(c,w,g,E));const v=[c,...O],A=await Le(o,k),I=[];let H=((l=s.flip)==null?void 0:l.overflows)||[];if(p&&I.push(A[b]),a){const _=at(r,i,E);I.push(A[_[0]],A[_[1]])}if(H=[...H,{placement:r,overflows:I}],!I.every(_=>_<=0)){var j,te;const _=(((j=s.flip)==null?void 0:j.index)||0)+1,m=v[_];if(m){var ue;const B=a==="alignment"?C!==q(m):!1,S=((ue=H[0])==null?void 0:ue.overflows[0])>0;if(!B||S)return{data:{index:_,overflows:H},reset:{placement:m}}}let y=(te=H.filter(B=>B.overflows[0]<=0).sort((B,S)=>B.overflows[1]-S.overflows[1])[0])==null?void 0:te.placement;if(!y)switch(d){case"bestFit":{var pe;const B=(pe=H.filter(S=>{if($){const V=q(S.placement);return V===C||V==="y"}return!0}).map(S=>[S.placement,S.overflows.filter(V=>V>0).reduce((V,Ce)=>V+Ce,0)]).sort((S,V)=>S[1]-V[1])[0])==null?void 0:pe[0];B&&(y=B);break}case"initialPlacement":y=c;break}if(r!==y)return{reset:{placement:y}}}return{}}}};async function gt(e,o){const{placement:n,platform:l,elements:r}=e,s=await(l.isRTL==null?void 0:l.isRTL(r.floating)),i=W(n),c=ie(n),h=q(n)==="y",f=["left","top"].includes(i)?-1:1,p=s&&h?-1:1,a=re(o,e);let{mainAxis:u,crossAxis:d,alignmentAxis:g}=typeof a=="number"?{mainAxis:a,crossAxis:0,alignmentAxis:null}:{mainAxis:a.mainAxis||0,crossAxis:a.crossAxis||0,alignmentAxis:a.alignmentAxis};return c&&typeof g=="number"&&(d=c==="end"?g*-1:g),h?{x:d*p,y:u*f}:{x:u*f,y:d*p}}const bt=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(o){var n,l;const{x:r,y:s,placement:i,middlewareData:c}=o,h=await gt(o,e);return i===((n=c.offset)==null?void 0:n.placement)&&(l=c.arrow)!=null&&l.alignmentOffset?{}:{x:r+h.x,y:s+h.y,data:{...h,placement:i}}}}},yt=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(o){const{x:n,y:l,placement:r}=o,{mainAxis:s=!0,crossAxis:i=!1,limiter:c={fn:k=>{let{x:b,y:C}=k;return{x:b,y:C}}},...h}=re(e,o),f={x:n,y:l},p=await Le(o,h),a=q(W(r)),u=Oe(a);let d=f[u],g=f[a];if(s){const k=u==="y"?"top":"left",b=u==="y"?"bottom":"right",C=d+p[k],R=d-p[b];d=ve(C,d,R)}if(i){const k=a==="y"?"top":"left",b=a==="y"?"bottom":"right",C=g+p[k],R=g-p[b];g=ve(C,g,R)}const w=c.fn({...o,[u]:d,[a]:g});return{...w,data:{x:w.x-n,y:w.y-l,enabled:{[u]:s,[a]:i}}}}}};function ce(){return typeof window<"u"}function U(e){return me(e)?(e.nodeName||"").toLowerCase():"#document"}function M(e){var o;return(e==null||(o=e.ownerDocument)==null?void 0:o.defaultView)||window}function F(e){var o;return(o=(me(e)?e.ownerDocument:e.document)||window.document)==null?void 0:o.documentElement}function me(e){return ce()?e instanceof Node||e instanceof M(e).Node:!1}function T(e){return ce()?e instanceof Element||e instanceof M(e).Element:!1}function N(e){return ce()?e instanceof HTMLElement||e instanceof M(e).HTMLElement:!1}function Ae(e){return!ce()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof M(e).ShadowRoot}function Q(e){const{overflow:o,overflowX:n,overflowY:l,display:r}=D(e);return/auto|scroll|overlay|hidden|clip/.test(o+l+n)&&!["inline","contents"].includes(r)}function wt(e){return["table","td","th"].includes(U(e))}function de(e){return[":popover-open",":modal"].some(o=>{try{return e.matches(o)}catch{return!1}})}function ge(e){const o=be(),n=T(e)?D(e):e;return["transform","translate","scale","rotate","perspective"].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)||["transform","translate","scale","rotate","perspective","filter"].some(l=>(n.willChange||"").includes(l))||["paint","layout","strict","content"].some(l=>(n.contain||"").includes(l))}function xt(e){let o=P(e);for(;N(o)&&!X(o);){if(ge(o))return o;if(de(o))return null;o=P(o)}return null}function be(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function X(e){return["html","body","#document"].includes(U(e))}function D(e){return M(e).getComputedStyle(e)}function fe(e){return T(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function P(e){if(U(e)==="html")return e;const o=e.assignedSlot||e.parentNode||Ae(e)&&e.host||F(e);return Ae(o)?o.host:o}function Me(e){const o=P(e);return X(o)?e.ownerDocument?e.ownerDocument.body:e.body:N(o)&&Q(o)?o:Me(o)}function Z(e,o,n){var l;o===void 0&&(o=[]),n===void 0&&(n=!0);const r=Me(e),s=r===((l=e.ownerDocument)==null?void 0:l.body),i=M(r);if(s){const c=ye(i);return o.concat(i,i.visualViewport||[],Q(r)?r:[],c&&n?Z(c):[])}return o.concat(r,Z(r,[],n))}function ye(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Te(e){const o=D(e);let n=parseFloat(o.width)||0,l=parseFloat(o.height)||0;const r=N(e),s=r?e.offsetWidth:n,i=r?e.offsetHeight:l,c=ne(n)!==s||ne(l)!==i;return c&&(n=s,l=i),{width:n,height:l,$:c}}function we(e){return T(e)?e:e.contextElement}function Y(e){const o=we(e);if(!N(o))return z(1);const n=o.getBoundingClientRect(),{width:l,height:r,$:s}=Te(o);let i=(s?ne(n.width):n.width)/l,c=(s?ne(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const kt=z(0);function De(e){const o=M(e);return!be()||!o.visualViewport?kt:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function Ct(e,o,n){return o===void 0&&(o=!1),!n||o&&n!==M(e)?!1:o}function K(e,o,n,l){o===void 0&&(o=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=we(e);let i=z(1);o&&(l?T(l)&&(i=Y(l)):i=Y(e));const c=Ct(s,n,l)?De(s):z(0);let h=(r.left+c.x)/i.x,f=(r.top+c.y)/i.y,p=r.width/i.x,a=r.height/i.y;if(s){const u=M(s),d=l&&T(l)?M(l):l;let g=u,w=ye(g);for(;w&&l&&d!==g;){const k=Y(w),b=w.getBoundingClientRect(),C=D(w),R=b.left+(w.clientLeft+parseFloat(C.paddingLeft))*k.x,E=b.top+(w.clientTop+parseFloat(C.paddingTop))*k.y;h*=k.x,f*=k.y,p*=k.x,a*=k.y,h+=R,f+=E,g=M(w),w=ye(g)}}return ae({width:p,height:a,x:h,y:f})}function xe(e,o){const n=fe(e).scrollLeft;return o?o.left+n:K(F(e)).left+n}function ze(e,o,n){n===void 0&&(n=!1);const l=e.getBoundingClientRect(),r=l.left+o.scrollLeft-(n?0:xe(e,l)),s=l.top+o.scrollTop;return{x:r,y:s}}function Bt(e){let{elements:o,rect:n,offsetParent:l,strategy:r}=e;const s=r==="fixed",i=F(l),c=o?de(o.floating):!1;if(l===i||c&&s)return n;let h={scrollLeft:0,scrollTop:0},f=z(1);const p=z(0),a=N(l);if((a||!a&&!s)&&((U(l)!=="body"||Q(i))&&(h=fe(l)),N(l))){const d=K(l);f=Y(l),p.x=d.x+l.clientLeft,p.y=d.y+l.clientTop}const u=i&&!a&&!s?ze(i,h,!0):z(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-h.scrollLeft*f.x+p.x+u.x,y:n.y*f.y-h.scrollTop*f.y+p.y+u.y}}function Rt(e){return Array.from(e.getClientRects())}function vt(e){const o=F(e),n=fe(e),l=e.ownerDocument.body,r=G(o.scrollWidth,o.clientWidth,l.scrollWidth,l.clientWidth),s=G(o.scrollHeight,o.clientHeight,l.scrollHeight,l.clientHeight);let i=-n.scrollLeft+xe(e);const c=-n.scrollTop;return D(l).direction==="rtl"&&(i+=G(o.clientWidth,l.clientWidth)-r),{width:r,height:s,x:i,y:c}}function Ot(e,o){const n=M(e),l=F(e),r=n.visualViewport;let s=l.clientWidth,i=l.clientHeight,c=0,h=0;if(r){s=r.width,i=r.height;const f=be();(!f||f&&o==="fixed")&&(c=r.offsetLeft,h=r.offsetTop)}return{width:s,height:i,x:c,y:h}}function Et(e,o){const n=K(e,!0,o==="fixed"),l=n.top+e.clientTop,r=n.left+e.clientLeft,s=N(e)?Y(e):z(1),i=e.clientWidth*s.x,c=e.clientHeight*s.y,h=r*s.x,f=l*s.y;return{width:i,height:c,x:h,y:f}}function Fe(e,o,n){let l;if(o==="viewport")l=Ot(e,n);else if(o==="document")l=vt(F(e));else if(T(o))l=Et(o,n);else{const r=De(e);l={x:o.x-r.x,y:o.y-r.y,width:o.width,height:o.height}}return ae(l)}function Ne(e,o){const n=P(e);return n===o||!T(n)||X(n)?!1:D(n).position==="fixed"||Ne(n,o)}function St(e,o){const n=o.get(e);if(n)return n;let l=Z(e,[],!1).filter(c=>T(c)&&U(c)!=="body"),r=null;const s=D(e).position==="fixed";let i=s?P(e):e;for(;T(i)&&!X(i);){const c=D(i),h=ge(i);!h&&c.position==="fixed"&&(r=null),(s?!h&&!r:!h&&c.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||Q(i)&&!h&&Ne(e,i))?l=l.filter(p=>p!==i):r=c,i=P(i)}return o.set(e,l),l}function Vt(e){let{element:o,boundary:n,rootBoundary:l,strategy:r}=e;const i=[...n==="clippingAncestors"?de(o)?[]:St(o,this._c):[].concat(n),l],c=i[0],h=i.reduce((f,p)=>{const a=Fe(o,p,r);return f.top=G(a.top,f.top),f.right=oe(a.right,f.right),f.bottom=oe(a.bottom,f.bottom),f.left=G(a.left,f.left),f},Fe(o,c,r));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}}function Lt(e){const{width:o,height:n}=Te(e);return{width:o,height:n}}function At(e,o,n){const l=N(o),r=F(o),s=n==="fixed",i=K(e,!0,s,o);let c={scrollLeft:0,scrollTop:0};const h=z(0);function f(){h.x=xe(r)}if(l||!l&&!s)if((U(o)!=="body"||Q(r))&&(c=fe(o)),l){const d=K(o,!0,s,o);h.x=d.x+o.clientLeft,h.y=d.y+o.clientTop}else r&&f();s&&!l&&r&&f();const p=r&&!l&&!s?ze(r,c):z(0),a=i.left+c.scrollLeft-h.x-p.x,u=i.top+c.scrollTop-h.y-p.y;return{x:a,y:u,width:i.width,height:i.height}}function ke(e){return D(e).position==="static"}function $e(e,o){if(!N(e)||D(e).position==="fixed")return null;if(o)return o(e);let n=e.offsetParent;return F(e)===n&&(n=n.ownerDocument.body),n}function Ie(e,o){const n=M(e);if(de(e))return n;if(!N(e)){let r=P(e);for(;r&&!X(r);){if(T(r)&&!ke(r))return r;r=P(r)}return n}let l=$e(e,o);for(;l&&wt(l)&&ke(l);)l=$e(l,o);return l&&X(l)&&ke(l)&&!ge(l)?n:l||xt(e)||n}const Mt=async function(e){const o=this.getOffsetParent||Ie,n=this.getDimensions,l=await n(e.floating);return{reference:At(e.reference,await o(e.floating),e.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}};function Tt(e){return D(e).direction==="rtl"}const Dt={convertOffsetParentRelativeRectToViewportRelativeRect:Bt,getDocumentElement:F,getClippingRect:Vt,getOffsetParent:Ie,getElementRects:Mt,getClientRects:Rt,getDimensions:Lt,getScale:Y,isElement:T,isRTL:Tt};function _e(e,o){return e.x===o.x&&e.y===o.y&&e.width===o.width&&e.height===o.height}function zt(e,o){let n=null,l;const r=F(e);function s(){var c;clearTimeout(l),(c=n)==null||c.disconnect(),n=null}function i(c,h){c===void 0&&(c=!1),h===void 0&&(h=1),s();const f=e.getBoundingClientRect(),{left:p,top:a,width:u,height:d}=f;if(c||o(),!u||!d)return;const g=le(a),w=le(r.clientWidth-(p+u)),k=le(r.clientHeight-(a+d)),b=le(p),R={rootMargin:-g+"px "+-w+"px "+-k+"px "+-b+"px",threshold:G(0,oe(1,h))||1};let E=!0;function O($){const v=$[0].intersectionRatio;if(v!==h){if(!E)return i();v?i(!1,v):l=setTimeout(()=>{i(!1,1e-7)},1e3)}v===1&&!_e(f,e.getBoundingClientRect())&&i(),E=!1}try{n=new IntersectionObserver(O,{...R,root:r.ownerDocument})}catch{n=new IntersectionObserver(O,R)}n.observe(e)}return i(!0),s}function Ft(e,o,n,l){l===void 0&&(l={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:h=!1}=l,f=we(e),p=r||s?[...f?Z(f):[],...Z(o)]:[];p.forEach(b=>{r&&b.addEventListener("scroll",n,{passive:!0}),s&&b.addEventListener("resize",n)});const a=f&&c?zt(f,n):null;let u=-1,d=null;i&&(d=new ResizeObserver(b=>{let[C]=b;C&&C.target===f&&d&&(d.unobserve(o),cancelAnimationFrame(u),u=requestAnimationFrame(()=>{var R;(R=d)==null||R.observe(o)})),n()}),f&&!h&&d.observe(f),d.observe(o));let g,w=h?K(e):null;h&&k();function k(){const b=K(e);w&&!_e(w,b)&&n(),w=b,g=requestAnimationFrame(k)}return n(),()=>{var b;p.forEach(C=>{r&&C.removeEventListener("scroll",n),s&&C.removeEventListener("resize",n)}),a==null||a(),(b=d)==null||b.disconnect(),d=null,h&&cancelAnimationFrame(g)}}const Nt=bt,$t=yt,It=mt,_t=(e,o,n)=>{const l=new Map,r={platform:Dt,...n},s={...r.platform,_c:l};return ht(e,o,{...r,platform:s})};function Pt(e){return e!=null&&typeof e=="object"&&"$el"in e}function Pe(e){if(Pt(e)){const o=e.$el;return me(o)&&U(o)==="#comment"?null:o}return e}function ee(e){return typeof e=="function"?e():t.unref(e)}function He(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function je(e,o){const n=He(e);return Math.round(o*n)/n}function Ht(e,o,n){n===void 0&&(n={});const l=n.whileElementsMounted,r=t.computed(()=>{var v;return(v=ee(n.open))!=null?v:!0}),s=t.computed(()=>ee(n.middleware)),i=t.computed(()=>{var v;return(v=ee(n.placement))!=null?v:"bottom"}),c=t.computed(()=>{var v;return(v=ee(n.strategy))!=null?v:"absolute"}),h=t.computed(()=>{var v;return(v=ee(n.transform))!=null?v:!0}),f=t.computed(()=>Pe(e.value)),p=t.computed(()=>Pe(o.value)),a=t.ref(0),u=t.ref(0),d=t.ref(c.value),g=t.ref(i.value),w=t.shallowRef({}),k=t.ref(!1),b=t.computed(()=>{const v={position:d.value,left:"0",top:"0"};if(!p.value)return v;const A=je(p.value,a.value),I=je(p.value,u.value);return h.value?{...v,transform:"translate("+A+"px, "+I+"px)",...He(p.value)>=1.5&&{willChange:"transform"}}:{position:d.value,left:A+"px",top:I+"px"}});let C;function R(){if(f.value==null||p.value==null)return;const v=r.value;_t(f.value,p.value,{middleware:s.value,placement:i.value,strategy:c.value}).then(A=>{a.value=A.x,u.value=A.y,d.value=A.strategy,g.value=A.placement,w.value=A.middlewareData,k.value=v!==!1})}function E(){typeof C=="function"&&(C(),C=void 0)}function O(){if(E(),l===void 0){R();return}if(f.value!=null&&p.value!=null){C=l(f.value,p.value,R);return}}function $(){r.value||(k.value=!1)}return t.watch([s,i,c,r],R,{flush:"sync"}),t.watch([f,p],O,{flush:"sync"}),t.watch(r,$,{flush:"sync"}),t.getCurrentScope()&&t.onScopeDispose(E),{x:t.shallowReadonly(a),y:t.shallowReadonly(u),strategy:t.shallowReadonly(d),placement:t.shallowReadonly(g),middlewareData:t.shallowReadonly(w),isPositioned:t.shallowReadonly(k),floatingStyles:b,update:R}}const jt=["id","placeholder","aria-expanded"],Gt=["onClick","onMouseenter"],Wt=Be(t.defineComponent({__name:"MclSelect",props:t.mergeModels({id:{},displayBorder:{type:Boolean,default:!1},borderColor:{default:"light-4"},rounded:{type:Boolean,default:!1},displayHighlight:{type:Boolean,default:!0},highlightColor:{default:"primary"},textcolor:{default:"black"},bgColor:{default:"light-1"},iconColor:{default:"dark-4"},placeholder:{default:""},displayShadow:{type:Boolean,default:!0},required:{type:Boolean,default:!1},options:{},selectColor:{default:"primary"},invalidFeedback:{default:"No match."}},{modelValue:{default:null},modelModifiers:{}}),emits:t.mergeModels(["open","close","clear","changed","select"],["update:modelValue"]),setup(e,{emit:o}){const n=e;t.useSlots();const l=o,r=t.useModel(e,"modelValue"),s=t.ref(),i=t.ref(),c=t.ref(),h=t.ref([]),f=t.ref(null),p=t.ref(),a=t.ref(!1),u=t.ref(""),d=t.ref(0),g=()=>{a.value=!0},w=()=>{var m;u.value="",a.value=!1,f.value=null,(m=i.value)==null||m.blur(),r.value=""},k=()=>{a.value=!1,d.value=0},b=()=>{var m;a.value=!a.value,d.value=0,a.value===!0&&((m=i.value)==null||m.focus())},C=m=>{m.preventDefault(),u.value!==""&&(u.value=""),d.value=0,r.value="",l("clear")},R=(m,y)=>{h.value[y]=m},E=m=>{m.style.pointerEvents="none"},O=m=>{m.style.pointerEvents="auto"},$=m=>{d.value=m},v=(m,y)=>{m.preventDefault(),u.value=typeof y=="string"?y:y.text;const B=typeof y=="string"?y:y.value;r.value=B,a.value=!1,l("select",B)},A=t.computed(()=>{const{bgColor:m,displayBorder:y,borderColor:B,displayHighlight:S,displayShadow:V,rounded:Ce,textcolor:Jt}=n,J=[x("BGCOLOR",m),x("TEXTCOLOR",Jt)];return y&&(J.push("border-2"),J.push(x("BORDER",B))),S||J.push("ring-offset-2 transition-all duration-300 ease-linear"),V&&J.push("shadow-md"),Ce&&J.push("rounded-md"),J.join(" ")}),I=t.computed(()=>{const{highlightColor:m,rounded:y}=n,B=[x("BEFOREBG",m)];return y&&B.push("rounded-b-md"),B.join(" ")}),H=t.computed(()=>{const{displayHighlight:m,bgColor:y,borderColor:B,rounded:S}=n,V=[x("BGCOLOR",y),x("BORDER",B)];return m||V.push("mt-2xs"),S&&V.push("rounded-md"),V.join(" ")}),j=t.computed(()=>u.value===""?n.options:n.options.filter(y=>{const B=new RegExp(`${u.value}`,"gi");return typeof y=="string"?y.match(B):y.text.match(B)})),te=m=>{a.value&&(m==="up"&&d.value>0&&d.value--,m==="down"&&d.value<j.value.length-1&&d.value++)},ue=()=>{if(!a.value)return;const m=j.value[d.value];let y;typeof m=="string"?(u.value=m,y=m):(u.value=m.text,y=m.value),r.value=y,a.value=!1,l("select",y)},pe=t.computed(()=>({width:`${p.value}px`})),{floatingStyles:_}=Ht(s,c,{whileElementsMounted:Ft,strategy:"absolute",open:a,transform:!1,placement:"bottom",middleware:[It(),Nt(-2.2),$t()]});return Ge.useResizeObserver(s,()=>{s.value&&(p.value=s.value.clientWidth)}),t.watch(a,m=>{l(m===!0?"open":"close")}),t.watch(r,m=>{if(m===null){a.value=!1,f.value=null;return}l("changed",m)}),t.watch(d,()=>{f.value=h.value[d.value],f.value&&f.value.scrollIntoView&&f.value.scrollIntoView({block:"nearest"})}),(m,y)=>t.withDirectives((t.openBlock(),t.createElementBlock("div",{onKeyup:[t.withKeys(w,["esc"]),y[1]||(y[1]=t.withKeys(B=>te("down"),["down"])),y[2]||(y[2]=t.withKeys(B=>te("up"),["up"])),t.withKeys(ue,["enter"])],ref_key:"componentRef",ref:s,class:"relative"},[t.createElementVNode("div",{class:t.normalizeClass(["p-2xs flex relative gap-3xs",[!m.displayHighlight&&a.value&&t.unref(x)("RINGCOLOR",m.borderColor)+" ring-4",A.value]])},[t.withDirectives(t.createElementVNode("input",{id:m.id,type:"text",class:"w-full bg-transparent outline-none","onUpdate:modelValue":y[0]||(y[0]=B=>u.value=B),ref_key:"inputBox",ref:i,role:"combobox",autocomplete:"off",placeholder:m.placeholder,"aria-autocomplete":"list","aria-expanded":a.value,onFocus:g},null,40,jt),[[t.vModelText,u.value]]),t.createElementVNode("div",{class:t.normalizeClass(["flex items-center px-3xs",[u.value===""?"hidden cursor-text":"block cursor-pointer"]]),onClick:C},[(t.openBlock(),t.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",class:t.normalizeClass(["h-xs opacity-70",[t.unref(x)("SVGFILL",m.iconColor)]])},y[3]||(y[3]=[t.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))],2),t.createElementVNode("div",{class:"flex items-center px-3xs",onClick:b},[(t.openBlock(),t.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",class:t.normalizeClass(["h-xs",[a.value?"rotate-180":"rotate-0","transition-transform duration-300 ease-in",t.unref(x)("SVGFILL",m.iconColor)]])},y[4]||(y[4]=[t.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))])],2),m.displayHighlight?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.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 -top-1",[a.value?"before:w-full":"before:w-0",I.value]])},null,2)):t.createCommentVNode("",!0),t.createVNode(t.Transition,{name:"options",onBeforeLeave:E,onEnter:O},{default:t.withCtx(()=>[a.value?(t.openBlock(),t.createElementBlock("ul",{key:0,class:t.normalizeClass([[H.value],"max-h-[200px] overflow-y-auto border-2"]),style:t.normalizeStyle({...pe.value,...t.unref(_)}),role:"listbox",ref_key:"dropdownRef",ref:c},[j.value.length>0?t.renderSlot(m.$slots,"dropdown",{key:0,optionClick:v,options:j.value,activeIndex:d.value,setRef:R,hover:$},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(j.value,(B,S)=>(t.openBlock(),t.createElementBlock("li",{key:S,class:t.normalizeClass(["p-2xs cursor-pointer",[d.value===S&&t.unref(x)("BGCOLOR",m.highlightColor)]]),role:"option",ref_for:!0,ref:V=>R(V,S),onClick:V=>v(V,B),onMouseenter:V=>$(S)},t.toDisplayString(typeof B=="string"?B:B.text),43,Gt))),128))],!0):t.renderSlot(m.$slots,"no-match",{key:1},()=>[t.createElementVNode("li",{class:t.normalizeClass(["p-2xs cursor-pointer",[t.unref(x)("HVBGCOLOR",m.selectColor)]])},[t.createElementVNode("span",null,t.toDisplayString(m.invalidFeedback),1)],2)],!0)],6)):t.createCommentVNode("",!0)]),_:3})],32)),[[t.unref(x.vClickOutside),k]])}}),[["__scopeId","data-v-f80afd47"]]),qt=["id","placeholder","required","rows"],Ut=t.defineComponent({__name:"MclTextArea",props:t.mergeModels({id:{},displayBorder:{type:Boolean,default:!1},borderColor:{default:"light-4"},rounded:{type:Boolean,default:!1},displayHighlight:{type:Boolean,default:!0},highlightColor:{default:"primary"},bgColor:{default:"light-1"},textcolor:{default:"black"},placeholder:{default:""},displayShadow:{type:Boolean,default:!0},required:{type:Boolean,default:!1},rows:{default:5}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const o=e,n=t.useModel(e,"modelValue"),l=t.computed(()=>{const{bgColor:r,displayBorder:s,borderColor:i,displayHighlight:c,displayShadow:h,rounded:f,textcolor:p}=o,a=[x("BGCOLOR",r),x("TEXTCOLOR",p)];return s&&(a.push("border-2"),a.push(x("BORDER",i))),c||(a.push("focus:ring-4 ring-offset-2 transition-all duration-300 ease-linear"),a.push(x("FOCUSRING",i))),h&&a.push("shadow-md"),f&&a.push("rounded-md"),a.join(" ")});return(r,s)=>(t.openBlock(),t.createElementBlock("div",null,[t.withDirectives(t.createElementVNode("textarea",{id:r.id,class:t.normalizeClass(["w-full p-2xs outline-none input__text peer",l.value]),"onUpdate:modelValue":s[0]||(s[0]=i=>n.value=i),placeholder:r.placeholder,required:r.required,rows:r.rows},null,10,qt),[[t.vModelText,n.value]]),r.displayHighlight?(t.openBlock(),t.createBlock(Re,{key:0,color:r.highlightColor,rounded:r.rounded,offset:2.5},null,8,["color","rounded"])):t.createCommentVNode("",!0)]))}}),Kt={class:"relative"},Xt=["id","value","checked"],Yt=t.defineComponent({__name:"MclCheckbox",props:t.mergeModels({id:{},inputSize:{default:"md"},bgColor:{default:"light-1"},checkedBgColor:{default:"warning"},checkColor:{default:"dark-3"},borderColor:{default:"dark-1"},displayShadow:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},value:{},checked:{type:Boolean,default:!1}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:t.mergeModels(["checkbox-click"],["update:modelValue"]),setup(e,{emit:o}){const n={primary:"peer-checked/input:bg-primary",secondary:"peer-checked/input:bg-secondary",success:"peer-checked/input:bg-success",info:"peer-checked/input:bg-info",warning:"peer-checked/input:bg-warning",danger:"peer-checked/input:bg-danger","light-1":"peer-checked/input:bg-light-1","light-2":"peer-checked/input:bg-light-2","light-3":"peer-checked/input:bg-light-3","light-4":"peer-checked/input:bg-light-4","dark-1":"peer-checked/input:bg-dark-1","dark-2":"peer-checked/input:bg-dark-2","dark-3":"peer-checked/input:bg-dark-3","dark-4":"peer-checked/input:bg-dark-1",transparent:"peer-checked/input:bg-transparent",black:"peer-checked/input:bg-black",white:"peer-checked/input:bg-white"},l={primary:"before:bg-primary",secondary:"before:bg-secondary",success:"before:bg-success",info:"before:bg-info",warning:"before:bg-warning",danger:"before:bg-danger","light-1":"before:bg-light-1","light-2":"before:bg-light-2","light-3":"before:bg-light-3","light-4":"before:bg-light-4","dark-1":"before:bg-dark-1","dark-2":"before:bg-dark-2","dark-3":"before:bg-dark-3","dark-4":"before:bg-dark-1",transparent:"before:bg-transparent",black:"before:bg-black",white:"before:bg-white"},r=e,s=t.useModel(e,"modelValue"),i=t.ref(),c=o,h=()=>{var u;(u=i.value)==null||u.click()},f=u=>{var g;const d=u.target.value;c("checkbox-click",u,i.value.checked,(g=i.value)!=null&&g.checked?d:"")},p=t.computed(()=>{const{inputSize:u}=r;return u==="sm"?"h-xs w-xs before:h-2xs before:w-2xs":u==="lg"?"h-md w-md before:h-xs before:w-xs":"h-sm w-sm before:w-[12px] before:h-[12px]"}),a=t.computed(()=>{const{bgColor:u,borderColor:d,displayShadow:g,rounded:w,checkedBgColor:k,checkColor:b}=r,C=[x("BGCOLOR",u),x("BORDER",d),l[b],n[k]];return g&&C.push("drop-shadow-md"),w&&C.push("rounded-md before:rounded-[3px]"),C.join(" ")});return(u,d)=>(t.openBlock(),t.createElementBlock("div",Kt,[t.withDirectives(t.createElementVNode("input",{id:u.id,ref_key:"checkboxRef",ref:i,type:"checkbox",value:u.value,checked:u.checked,"onUpdate:modelValue":d[0]||(d[0]=g=>s.value=g),class:"appearance-none peer/input",onChange:f},null,40,Xt),[[t.vModelCheckbox,s.value]]),t.createElementVNode("span",{class:t.normalizeClass(["relative border inline-block p-3xs hover:bg-opacity-60 peer-checked/input:hover:bg-opacity-60 before:opacity-0 peer-checked/input:before:opacity-100 before:absolute before:top-1/2 before:-translate-y-1/2 before:left-1/2 before:-translate-x-1/2 transition-colors duration-200 ease-linear before:transition-opacity before:duration-200 before:ease-linar",[a.value,p.value]]),onClick:h},null,2)]))}});L.MclCheckbox=Yt,L.MclFormGroup=qe,L.MclInputFile=Xe,L.MclInputRadio=Qe,L.MclInputSwitch=tt,L.MclInputText=rt,L.MclSelect=Wt,L.MclTextArea=Ut,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bobbykim/mcl-forms",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.5",
|
|
4
4
|
"description": "form group components based on manguito-theme",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
"types": "./dist/index.d.ts",
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
14
15
|
"import": "./dist/mcl-forms.js",
|
|
15
|
-
"require": "./dist/mcl-forms.umd.cjs"
|
|
16
|
-
"types": "./dist/index.d.ts"
|
|
16
|
+
"require": "./dist/mcl-forms.umd.cjs"
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"license": "MIT",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@bobbykim/manguito-theme": "0.
|
|
36
|
+
"@bobbykim/manguito-theme": "0.26.0",
|
|
37
37
|
"@floating-ui/vue": "^1.1.5",
|
|
38
38
|
"@vueuse/core": "^12.0.0",
|
|
39
39
|
"vue": "^3.5.13"
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"vite-plugin-dts": "^4.3.0",
|
|
48
48
|
"vue-tsc": "^2.1.10"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "6cc7d9ea39279a8c924a0d4ef29a021f9e6463a6"
|
|
51
51
|
}
|