Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lui-ui/lui-vue

Package Overview
Dependencies
Maintainers
3
Versions
141
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lui-ui/lui-vue - npm Package Compare versions

Comparing version 0.27.7 to 0.27.8

.vscode/extensions.json

2

dist/lui-vue.umd.js

@@ -1,1 +0,1 @@

var tn=Object.defineProperty;var v=Object.getOwnPropertySymbols;var nn=Object.prototype.hasOwnProperty,ln=Object.prototype.propertyIsEnumerable;var J=(g,t,d)=>t in g?tn(g,t,{enumerable:!0,configurable:!0,writable:!0,value:d}):g[t]=d,c=(g,t)=>{for(var d in t||(t={}))nn.call(t,d)&&J(g,d,t[d]);if(v)for(var d of v(t))ln.call(t,d)&&J(g,d,t[d]);return g};(function(g,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(g=typeof globalThis!="undefined"?globalThis:g||self,t(g.LuiVue={},g.Vue))})(this,function(g,t){"use strict";function d(e){const l=[];return e.map(i=>{l.push(...Object.values(i))}),l.join(" ").toString().replace(/\s+/g," ")}function L(e,l){const i=l==="none"?`bg-${e}`:l==="darker"?`bg-${e}-800`:`bg-${e}-50`,n=e==="white"?"text-primary":l==="none"?"text-white":l==="darker"?`text-${e}-50`:`text-${e}-500`;return{backgroundColor:i,fontColor:n}}function W(e,l,i){return{colorClasses:l==="none"||["white","black","light","dark"].includes(e)?`${i}-${e}`:l==="darker"?`${i}-${e}-800`:`${i}-${e}-50`}}const Q=()=>{},Z=Array.isArray,ee=e=>typeof e=="function",te=e=>typeof e=="symbol";let ne;function le(e,l){l=l||ne,l&&l.active&&l.effects.push(e)}const ie=e=>{const l=new Set(e);return l.w=0,l.n=0,l},M=e=>(e.w&B)>0,K=e=>(e.n&B)>0,ae=({deps:e})=>{if(e.length)for(let l=0;l<e.length;l++)e[l].w|=B},oe=e=>{const{deps:l}=e;if(l.length){let i=0;for(let n=0;n<l.length;n++){const s=l[n];M(s)&&!K(s)?s.delete(e):l[i++]=s,s.w&=~B,s.n&=~B}l.length=i}};let V=0,B=1;const D=30,E=[];let S;class se{constructor(l,i=null,n){this.fn=l,this.scheduler=i,this.active=!0,this.deps=[],le(this,n)}run(){if(!this.active)return this.fn();if(!E.includes(this))try{return E.push(S=this),re(),B=1<<++V,V<=D?ae(this):G(this),this.fn()}finally{V<=D&&oe(this),B=1<<--V,de(),E.pop();const l=E.length;S=l>0?E[l-1]:void 0}}stop(){this.active&&(G(this),this.onStop&&this.onStop(),this.active=!1)}}function G(e){const{deps:l}=e;if(l.length){for(let i=0;i<l.length;i++)l[i].delete(e);l.length=0}}let A=!0;const X=[];function re(){X.push(A),A=!0}function de(){const e=X.pop();A=e===void 0?!0:e}function ce(){return A&&S!==void 0}function me(e,l){let i=!1;V<=D?K(e)||(e.n|=B,i=!M(e)):i=!e.has(S),i&&(e.add(S),S.deps.push(e))}function fe(e,l){for(const i of Z(e)?e:[...e])(i!==S||i.allowRecurse)&&(i.scheduler?i.scheduler():i.run())}new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(te));function P(e){const l=e&&e.__v_raw;return l?P(l):e}function ue(e){ce()&&(e=P(e),e.dep||(e.dep=ie()),me(e.dep))}function ge(e,l){e=P(e),e.dep&&fe(e.dep)}class be{constructor(l,i,n){this._setter=i,this.dep=void 0,this._dirty=!0,this.__v_isRef=!0,this.effect=new se(l,()=>{this._dirty||(this._dirty=!0,ge(this))}),this.__v_isReadonly=n}get value(){const l=P(this);return ue(l),l._dirty&&(l._dirty=!1,l._value=l.effect.run()),l._value}set value(l){this._setter(l)}}function R(e,l){let i,n;const s=ee(e);return s?(i=e,n=Q):(i=e.get,n=e.set),new be(i,n,s||!n)}Promise.resolve();function w(e,l){return{props:{[e||"variant"]:{type:String,default:l||"primary",validator(i){return(e==="variant"?["primary","secondary","info","success","warning","danger"]:["light","dark","white","black","primary","secondary","info","success","warning","danger"]).includes(i)}}}}}function p(e){return{props:{[e||"filter"]:{type:String,default:"none",validator(l){return["darker","lighter","none"].includes(l)}}}}}function x(e,l){const n=l||["2xs","xs","sm","md","lg"];return{props:{size:{type:String,default:e||"md",validator:s=>n.includes(s)}}}}function f(e,l){return{props:{[e]:{type:Boolean,default:l||!1}}}}function b(e,l,i){let n={type:String,default:l||""};return i!==void 0&&(n.validator=s=>i.includes(s)),{props:{[e]:n}}}var k=(e,l)=>{const i=e.__vccOpts||e;for(const[n,s]of l)i[n]=s;return i};const he={mixins:[b("name","none"),f("fill",!1),f("line",!1),x("none",["lg","xl","xxs","xs","sm","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x","fw","fwh","none"])],setup(e){return{classes:R(()=>[`ri-${e.name}${e.fill?"-fill":""}${e.line?"-line":""}`,e.size!=="none"?`ri-${e.size}`:""])}}};function Ce(e,l,i,n,s,r){return t.openBlock(),t.createElementBlock("i",{class:t.normalizeClass(n.classes)},null,2)}var $=k(he,[["render",Ce]]);const ke={components:{LuiIcon:$},mixins:[b("title","title"),f("active",!1),f("disabled",!1),w(null,"secondary")],setup(e){let l=t.inject("activeAccordion",t.ref(null)),i=t.computed(()=>l.value===e.title);function n(){l.value!==e.title?l.value=e.title:l.value=""}let s=t.ref(!1);const r=t.computed(()=>{const a={wrapper:{width:"w-full",border:"border",borderColor:e.disabled?"border-secondary-100":"border-secondary-200",borderRadius:"rounded-2xl",paddingY:"py-8",paddingX:"px-6",margin:"mb-7",focus:s.value?"ring-2 ring-primary ring-offset-2":""},button:{width:"w-full",display:"flex",alignItems:"items-center",justifyContent:"justify-between",color:`text-${e.variant}-700`,disabled:"disabled:text-secondary-300",outline:"outline-none"},title:{fontSize:"text-lg",fontWeight:"font-semibold",lineHeight:"leading-6",textAlign:"text-left"},icon:{fontSize:"text-2xl"},content:{marginTop:"mt-6",fontColor:"text-secondary-600"}},{wrapper:u,button:o,title:h,icon:C,content:_}=a;return{wrapper:d([c({},u)]),button:d([c({},o)]),title:d([c({},h)]),icon:d([c({},C)]),content:d([c({},_)])}});return{expandItem:n,isActive:i,computedClasses:r,btnFocus:s}}},ye=["aria-expanded","disabled"];function xe(e,l,i,n,s,r){const a=t.resolveComponent("lui-icon");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(n.computedClasses.wrapper)},[t.createElementVNode("h3",null,[t.createElementVNode("button",{"aria-expanded":n.isActive,disabled:e.disabled,class:t.normalizeClass(n.computedClasses.button),onClick:l[0]||(l[0]=(...u)=>n.expandItem&&n.expandItem(...u)),onFocus:l[1]||(l[1]=u=>n.btnFocus=!0),onFocusout:l[2]||(l[2]=u=>n.btnFocus=!1)},[t.createElementVNode("span",{class:t.normalizeClass(n.computedClasses.title)},t.toDisplayString(e.title),3),t.createVNode(a,{name:n.isActive?"close":"add",line:"",class:t.normalizeClass(n.computedClasses.icon)},null,8,["name","class"])],42,ye)]),n.isActive?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(n.computedClasses.content),role:"region",tabindex:"0"},[t.renderSlot(e.$slots,"default")],2)):t.createCommentVNode("",!0)],2)}var we=k(ke,[["render",xe]]);const ze={setup(){let e=t.ref(null);t.provide("activeAccordion",e)}},Be={ref:"LuiAccordionGroup",class:"accordionGroup"};function pe(e,l,i,n,s,r){return t.openBlock(),t.createElementBlock("div",Be,[t.renderSlot(e.$slots,"default")],512)}var $e=k(ze,[["render",pe]]);const Se={mixins:[w(),f("border"),x(),p()],setup(e){return{computedClasses:t.computed(()=>{const i={width:e.size==="2xs"?"w-2":e.size==="xs"?"w-3":e.size==="sm"?"w-4":e.size==="md"?"w-5":"w-6",height:e.size==="2xs"?"h-2":e.size==="xs"?"h-3":e.size==="sm"?"h-4":e.size==="md"?"h-5":"h-6",backgroundColor:L(e.variant,e.filter).backgroundColor,border:e.border?"border border-white":"",display:"inline-block",borderRadius:"rounded-full"};return d([c({},i)])})}}};function _e(e,l,i,n,s,r){return t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(n.computedClasses)},null,2)}var j=k(Se,[["render",_e]]);const Le={components:{LuiIcon:$,LuiBadge:j},mixins:[w(),p(),x(),f("rounded"),f("roundedFull"),f("border"),b("icon","none"),b("img","none")],inheritAttrs:!1,props:{text:{type:String,default:"",validator(e){return e.length<=2}},badge:{type:[Object],default(){return{position:"",variant:""}},validator(e){return["","primary","secondary","info","success","warning","danger"].includes(e.variant)&&["","top","bottom"].includes(e.position)}}},emits:["click"],setup(e){const l=t.computed(()=>{const r={width:e.size==="2xs"?"w-5":e.size==="xs"?"w-6":e.size==="sm"?"w-8":e.size==="md"?"w-12":e.size==="lg"?"w-16":"w-12",height:e.size==="2xs"?"h-5":e.size==="xs"?"h-6":e.size==="sm"?"h-8":e.size==="md"?"h-12":e.size==="lg"?"h-16":"h-12",display:"flex",justifyContent:"justify-center",alignItems:"items-center",verticalAlign:"align-middle",textAlign:"text-center",position:"relative",borderSize:e.border?["2xs","xs","sm"].includes(e.size)?"border":"border-2":"",borderColor:e.border?"border-white":"",borderStyle:e.border?"border-solid":"",borderRadius:e.roundedFull?"rounded-full":e.rounded?`rounded-${e.size}`:"",backgroundColor:L(e.variant,e.filter).backgroundColor,fontColor:L(e.variant,e.filter).fontColor,fontSize:e.size==="2xs"||e.size==="xs"?"text-2xs":e.size==="sm"?"text-sm":e.size==="md"?"text-md":e.size==="lg"?"text-xl":"",fontWeight:"font-semibold"};return d([c({},r)])}),i=t.computed(()=>{const r={fontSize:["2xs","xs"].includes(e.size)?"text-2xs":e.size==="sm"?"text-sm":e.size==="md"?"text-xl":"text-2xl"};return d([c({},r)])}),n=t.computed(()=>{const r={width:"w-full",height:"h-full",borderRadius:e.roundedFull?"rounded-full":e.rounded?`rounded-${e.size}`:"",objectFit:"object-cover"};return d([c({},r)])}),s=t.computed(()=>{const r={position:"absolute",top:e.badge.position==="top"?"bottom-full":"top-full",left:"left-full",transform:e.badge.position==="top"?"-translate-x-1/2 translate-y-1/2":"-translate-x-1/2 -translate-y-1/2",margin:e.roundedFull?e.badge.position==="top"?e.size==="lg"?"-ml-2 -mb-2":e.size==="md"?"-ml-1.5 -mb-1.5":e.size==="sm"?"-ml-1 -mb-1":(e.size==="xs","-ml-0.5 -mb-0.5"):e.size==="lg"?"-ml-2 -mt-2":e.size==="md"?"-ml-1.5 -mt-1.5":e.size==="sm"?"-ml-1 -mt-1":(e.size==="xs","-ml-0.5 -mt-0.5"):""};return d([c({},r)])});return{computedClasses:l,iconClasses:i,imgClasses:n,badgeClasses:s}}},Ve=["src"],Ee={key:2};function Ae(e,l,i,n,s,r){const a=t.resolveComponent("lui-icon"),u=t.resolveComponent("lui-badge");return t.openBlock(),t.createElementBlock("div",t.mergeProps({class:["lui-avatar",[n.computedClasses]]},e.$attrs,{onClick:l[0]||(l[0]=o=>e.$emit("click"))}),[e.icon!=="none"?(t.openBlock(),t.createBlock(a,{key:0,name:e.icon,fill:"",class:t.normalizeClass(n.iconClasses)},null,8,["name","class"])):t.createCommentVNode("",!0),e.img!=="none"?(t.openBlock(),t.createElementBlock("img",{key:1,src:e.img,class:t.normalizeClass(n.imgClasses),alt:"Lui avatar"},null,10,Ve)):(t.openBlock(),t.createElementBlock("span",Ee,t.toDisplayString(i.text.toUpperCase().slice(0,2)),1)),i.badge.variant!==""&&i.badge.position!==""?(t.openBlock(),t.createBlock(u,{key:3,class:t.normalizeClass(n.badgeClasses),variant:i.badge.variant,border:"",size:["2xs","xs","sm"].includes(e.size)?"2xs":"xs"},null,8,["class","variant","size"])):t.createCommentVNode("",!0)],16)}var Pe=k(Le,[["render",Ae]]);const Ne={components:{LuiIcon:$},mixins:[w(),p(),f("rounded"),f("roundedFull"),f("block"),f("uppercase"),f("iconLine",!0),f("fontBold"),b("prepend","none"),b("icon","none"),b("type","default",["default","text","outline","link","link-underline"]),x("md",["sm","md","lg"])],inheritAttrs:!1,props:{disableStyles:{type:[Array,Boolean],default:()=>[""],validator(e){return typeof e=="boolean"||["hover","focus","disable","underline",""].some(l=>e.indexOf(l)>=0)}}},setup(e,l){const i=t.computed(()=>{const s={padding:e.type==="link"||e.type==="link-underline"?"p-0":l.slots.default?e.size==="lg"?"px-6 py-3":e.size==="md"?"px-4 py-2":"px-3 py-1.5":e.size==="lg"?"p-3":e.size==="md"?"p-2.5":"p-1.5",backgroundColor:e.type==="default"?L(e.variant,e.filter).backgroundColor:"",fontColor:e.type==="default"?L(e.variant,e.filter).fontColor:e.filter==="none"?`text-${e.variant}`:e.filter==="darker"?`text-${e.variant}-800`:`text-${e.variant}-50`,fontWeight:e.fontBold===!0?"font-semibold":"",fontSize:e.size==="sm"?"text-xs":"text-base",lineHeight:e.size==="sm"?"leading-4.5":"leading-6",borderWidth:e.type==="outline"||e.type==="default"?"border":"",borderStyle:e.type==="outline"||e.type==="default"?"border-solid":"",borderColor:e.type==="outline"||e.type==="default"?e.filter==="none"?`border-${e.variant}`:e.filter==="darker"?`border-${e.variant}-800`:`border-${e.variant}-50`:"",borderBottom:typeof e.disableStyles=="boolean"&&e.disableStyles===!0||Array.isArray(e.disableStyles)&&e.disableStyles.includes("underline")?"":e.type==="link-underline"?e.filter==="darker"?`border-b border-${e.variant}-800`:e.filter==="lighter"?`border-b border-${e.variant}-100`:`border-b border-${e.variant}`:"",borderRadius:e.type!=="link"&&(e.rounded||e.roundedFull)?e.rounded?`rounded-${e.size}`:e.roundedFull?"rounded-full":"":"",uppercase:e.uppercase?"uppercase":"",width:!e.block||e.type==="link"?"":"w-full",display:e.prepend!=="none"||e.icon!=="none"?"flex":"",justifyContent:e.prepend!=="none"||e.icon!=="none"?"justify-center":"",alignItems:e.prepend!=="none"||e.icon!=="none"?"items-center":""};let r={hover:{backgroundColor:e.type==="link"||e.type==="link-underline"?"":e.type==="outline"?e.filter==="darker"?`hover:bg-${e.variant}-800`:e.filter==="lighter"?`hover:bg-${e.variant}-50`:`hover:bg-${e.variant}`:e.filter==="lighter"?`hover:bg-${e.variant}`:e.filter==="darker"?`hover:bg-${e.variant}`:e.variant!=="white"?`hover:bg-${e.variant}-50`:"hover:bg-primary",fontColor:e.type==="default"?e.filter==="none"?`hover:text-${e.variant}`:(e.filter==="darker","hover:text-white"):e.type!=="outline"?e.filter==="none"?`hover:text-${e.variant}--400`:e.filter==="darker"?`hover:text-${e.variant}--700`:`hover:text-${e.variant}--200`:"hover:text-white",borderColor:e.type==="outline"?e.filter==="none"?`hover:border-${e.variant}`:e.filter==="darker"?`hover:border-${e.variant}-800`:`hover:border-${e.variant}-50`:e.type==="default"?e.filter==="none"?`hover:border-${e.variant}-50`:`hover:border-${e.variant}`:""},disable:{backgroundColor:e.type==="default"?"disabled:bg-secondary-300":e.type==="outline"?"disabled:bg-secondary-100":"",fontColor:e.type==="default"?"disabled:text-white":"disabled:text-secondary-300",borderColor:"disabled:border-secondary-300",cursor:"disabled:cursor-default"},focus:{outline:"focus:outline-none",boxShadow:e.filter==="darker"?`focus:ring-2 focus:ring-${e.variant}-800 focus:ring-offset-2`:e.filter==="lighter"?`focus:ring-2 focus:ring-${e.variant}-50 focus:ring-offset-2`:e.variant!=="white"?`focus:ring-2 focus:ring-${e.variant} focus:ring-offset-2`:"focus:ring-2 focus:ring-primary focus:ring-offset-2"}};typeof e.disableStyles=="boolean"&&e.disableStyles===!0&&(r=""),Array.isArray(e.disableStyles)&&e.disableStyles.map(h=>r[h]="");const{disable:a,focus:u,hover:o}=r;return d([c({},s),c({},a),c({},u),c({},o)])}),n=t.computed(()=>{const s={fontSize:e.size==="sm"?"text-base":e.size==="md"?"text-xl":"text-2xl",lineHeight:e.size==="lg"?"leading-5":"leading-none",prependMargin:e.prepend!=="none"&&!!l.slots.default&&l.slots.default()[0].children!=""&&e.icon==="none"?e.size==="sm"?"mr-1.5 -ml-0.5":"mr-2 -ml-1":"m-0",suffixMargin:e.prepend==="none"&&!!l.slots.default&&l.slots.default()[0].children!=""&&e.icon!=="none"?e.size==="sm"?"ml-1.5 -mr-0.5":"ml-2 -mr-1":"m-0"};return d([c({},s)])});return{computedClasses:i,iconClasses:n}}};function Ie(e,l,i,n,s,r){const a=t.resolveComponent("lui-icon");return t.openBlock(),t.createElementBlock("button",t.mergeProps({class:[n.computedClasses]},e.$attrs),[e.prepend!=="none"?(t.openBlock(),t.createBlock(a,{key:0,name:e.prepend,fill:!e.iconLine,line:e.iconLine,class:t.normalizeClass(n.iconClasses)},null,8,["name","fill","line","class"])):t.createCommentVNode("",!0),e.prepend!=="none"&&e.icon!=="none"?(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(e.size==="sm"?"mx-1.5":"mx-2.5")},[t.renderSlot(e.$slots,"default")],2)):t.renderSlot(e.$slots,"default",{key:2}),e.icon!=="none"?(t.openBlock(),t.createBlock(a,{key:3,name:e.icon,fill:!e.iconLine,line:e.iconLine,class:t.normalizeClass(n.iconClasses)},null,8,["name","fill","line","class"])):t.createCommentVNode("",!0)],16)}var N=k(Ne,[["render",Ie]]);const Te={mixins:[b("img","none"),b("imgAlt","imgAlt"),f("border"),f("rounded"),f("bodyPadding",!0),p("borderFilter"),p("bgFilter"),p("textFilter"),w("bgVariant","light"),w("textVariant","dark"),w("borderVariant","secondary")],setup(e){const l=R(()=>{const n={backgroundColor:W(e.bgVariant,e.bgFilter,"bg").colorClasses,backgroundClip:"bg-clip-border",border:e.border?"border":"",borderStyle:e.border?"border-solid":"",borderColor:W(e.borderVariant,e.borderFilter,"border").colorClasses,color:W(e.textVariant,e.textFilter,"text").colorClasses,borderRadius:e.rounded?"rounded-md":"",flexDirection:"flex-col",display:"flex",minWidth:"min-w-0",position:"relative",wordBreak:"break-words"};return d([c({},n)])}),i=R(()=>d([c({},{width:"w-full",height:"h-full"})]));return{computedClasses:l,imgClasses:i}}},Fe=["src","alt"];function We(e,l,i,n,s,r){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["lui-card",n.computedClasses])},[e.img!=="none"?(t.openBlock(),t.createElementBlock("img",{key:0,src:e.img,alt:e.imgAlt,class:t.normalizeClass(n.imgClasses)},null,10,Fe)):t.createCommentVNode("",!0),e.$slots.default?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["lui-card--body",e.bodyPadding?"p-6":"p-0"])},[t.renderSlot(e.$slots,"default")],2)):t.createCommentVNode("",!0)],2)}var De=k(Te,[["render",We]]);const Re={mixins:[x("sm",["sm","md","lg"])],inheritAttrs:!1,props:{state:{type:[String,Boolean,null],default:null,validator(e){return[null,"warning",!0,!1].includes(e)}},modelValue:{type:Boolean,required:!0,default:!1}},emits:["update:modelValue"],setup(e,{attrs:l}){function i(a){return a[e.size]}const n=t.computed(()=>l.id),s=t.computed(()=>{const a={width:i({sm:"8px",md:"12px",lg:"14px"}),height:i({sm:"6px",md:"10px",lg:"12px"})};return{width:a.width,height:a.height}});return{computedClasses:t.computed(()=>{const a={parent:{display:"flex items-center"},input:{position:"absolute",overflow:"overflow-hidden",outline:"outline-none",width:e.size==="sm"?"w-4":e.size==="md"?"w-5":"w-6",height:e.size==="sm"?"h-4":e.size==="md"?"h-5":"h-6",zIndex:"z-20",border:"border-0",opacity:"opacity-0",peer:"peer"},label:{position:"relative",display:"inline-flex",alignItems:"items-center",justifyContent:"justify-center",fontSize:i({sm:"text-xs",md:"text-sm",lg:"text-base"}),color:"text-secondary-600",cursor:"cursor-pointer",border:"border",width:i({sm:"w-4",md:"w-5",lg:"w-6"}),height:i({sm:"h-4",md:"h-5",lg:"h-6"}),ringWidth:"peer-focus:ring-2",ringOffset:"peer-focus:ring-offset-2",ringColor:e.state===null?"peer-focus:ring-primary":e.state==="warning"?"peer-focus:ring-warning":e.state===!1?"peer-focus:ring-danger":"peer-focus:ring-success",borderColorDisabled:"peer-disabled:border-secondary-300",borderColorChecked:"peer-checked:border-white",borderColor:e.state===null?"border-primary":e.state==="warning"?"border-warning":e.state===!1?"border-danger":"border-success",borderRadius:i({sm:"rounded-xs",md:"rounded-xs",lg:"rounded-sm"}),backgroundColorDisabled:"peer-disabled:bg-secondary-100",backgroundColorChecked:e.state===null?"peer-checked:bg-primary":e.state==="warning"?"peer-checked:bg-warning":e.state===!1?"peer-checked:bg-danger":"peer-checked:bg-success",backgroundColor:"bg-white"},icon:{position:"relative",left:"left-0",top:"top-0",zIndex:"z-10",color:"text-white peer-disabled:text-secondary-300"}};return{parent:d([c({},a.parent)]),input:d([c({},a.input)]),label:d([c({},a.label)]),icon:d([c({},a.icon)])}}),computedFor:n,iconSizes:s}}},je=["checked"],Oe=["for"],He=["width","height","viewBox"],Me=["d"];function Ke(e,l,i,n,s,r){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(n.computedClasses.parent)},[t.createElementVNode("input",t.mergeProps({type:"checkbox",class:n.computedClasses.input},e.$attrs,{checked:i.modelValue,onChange:l[0]||(l[0]=a=>e.$emit("update:modelValue",a.target.checked))}),null,16,je),t.createElementVNode("span",{for:n.computedFor,class:t.normalizeClass(n.computedClasses.label)},[(t.openBlock(),t.createElementBlock("svg",{width:n.iconSizes.width,height:n.iconSizes.height,viewBox:e.size==="sm"?"0 0 8 6":e.size==="md"?"0 0 12 10":"0 0 14 12",fill:"none",class:t.normalizeClass(n.computedClasses.icon)},[t.createElementVNode("path",{d:e.size==="sm"?"M1 3.4L2.71429 5L7 1":e.size==="md"?"M2 5.6L4.28571 8L10 2":"M2 6.8L4.85714 10L12 2",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,Me)],10,He))],10,Oe)],2)}var q=k(Re,[["render",Ke]]);const Ge={components:{LuiIcon:$},mixins:[w(),p(),x("sm",["sm","md","lg"]),f("rounded"),f("roundedFull"),f("clickable"),f("iconLine"),b("prepend","none"),b("icon","none"),b("type","default",["default","outline"])],inheritAttrs:!1,setup(e){const l=t.computed(()=>{const n={backgroundColor:e.type==="default"?L(e.variant,e.filter).backgroundColor:"",paddingY:e.size==="sm"?"py-0.5":e.size==="md"?"py-1":"py-2",paddingX:e.size==="sm"?"px-1.5":e.size==="md"?"px-2":"px-3",borderWidth:"border",borderStyle:"border-solid",borderColor:e.type==="outline"||e.type==="default"?e.filter==="none"?`border-${e.variant}`:e.filter==="darker"?`border-${e.variant}-800`:`border-${e.variant}-50`:"",lineHeight:e.size==="sm"?"leading-3":e.size==="md"?"leading-3.5":"leading-4",fontSize:e.size==="sm"?"text-xs":e.size==="md"?"text-sm leading":"text-base",fontColor:e.filter==="none"?e.type==="default"?"text-white":`text-${e.variant}`:e.filter==="darker"?e.type==="default"?"text-white":`text-${e.variant}-800`:e.type==="default"?`text-${e.variant}`:`text-${e.variant}-50`,borderRadius:e.rounded?`rounded-${e.size}`:e.roundedFull?"rounded-full":"",display:e.icon!=="none"||e.prepend!=="none"?"flex":"inline-block",alingItmes:e.icon!=="none"||e.prepend!=="none"?"items-center":"",width:e.icon!=="none"||e.prepend!=="none"?"w-max":""};return d([c({},n)])}),i=t.computed(()=>({size:e.size==="sm"?"text-xs":e.size==="md"?"text-sm":"text-base",marginPrepend:e.size==="sm"?"mr-0.5":e.size==="md"?"mr-1":"mr-1.5",marginIcon:e.size==="sm"?"ml-0.5":e.size==="md"?"ml-1":"ml-1.5",lineHeight:e.size==="sm"?"leading-3":e.size==="md"?"leading-3.5":"leading-4"}));return{computedClasses:l,iconClasses:i}}},Xe=["tabindex","role"];function qe(e,l,i,n,s,r){const a=t.resolveComponent("lui-icon");return t.openBlock(),t.createElementBlock("span",t.mergeProps({tabindex:e.clickable?"0":null,role:e.clickable?"button":null,class:n.computedClasses},e.$attrs),[e.prepend!=="none"?(t.openBlock(),t.createBlock(a,{key:0,name:e.prepend,line:e.iconLine,fill:!e.iconLine,class:t.normalizeClass([n.iconClasses.size,n.iconClasses.marginPrepend,n.iconClasses.lineHeight])},null,8,["name","line","fill","class"])):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"default"),e.icon!=="none"?(t.openBlock(),t.createBlock(a,{key:1,name:e.icon,line:e.iconLine,fill:!e.iconLine,class:t.normalizeClass([n.iconClasses.size,n.iconClasses.marginIcon,n.iconClasses.lineHeight])},null,8,["name","line","fill","class"])):t.createCommentVNode("",!0)],16,Xe)}var Y=k(Ge,[["render",qe]]);const Ye={components:{LuiButton:N},mixins:[w(),p(),f("rounded",!0),f("block",!1),f("uppercase"),b("icon","default"),b("prepend","none"),f("iconLine",!0),f("fontBold",!1),b("placement","bottomLeft",["bottomLeft","bottomRight","topLeft","topRight","rightTop","rightBottom","leftTop","leftBottom"]),b("text",""),x("md",["sm","md","lg"])],emits:["onChange"],setup(e,{emit:l}){t.onMounted(()=>{document.addEventListener("click",r)}),t.onUnmounted(()=>{document.removeEventListener("click",r)});const i=t.ref({variant:e.variant,filter:e.filter,rounded:e.rounded,block:e.block,size:e.size});t.provide("parentProps",i.value);const n=t.ref(!1),s=t.ref(null);t.watch(n,o=>{l("onChange",o)});function r(o){s.value.$el.contains(o.target)||(n.value=!1)}const a=t.computed(()=>{if(e.icon==="default"){let o={prepend:"none",append:"none"};return e.placement.startsWith("bottom")&&(n.value?o.append="arrow-down-s":o.append="arrow-up-s"),e.placement.startsWith("top")&&(n.value?o.append="arrow-up-s":o.append="arrow-down-s"),e.placement.startsWith("right")&&(n.value?o.append="arrow-right-s":o.append="arrow-left-s"),e.placement.startsWith("left")&&(n.value?o.prepend="arrow-left-s":o.prepend="arrow-right-s"),o}return null}),u=t.computed(()=>{const o={container:{position:"relative",width:e.block?"w-full":"w-max",zIndex:n.value?"z-50":"z-10"},content:{position:"absolute",top:e.placement.includes("bottom")||e.placement.includes("Bottom")?"top-full":e.placement.includes("Top")?"top-0":"",bottom:e.placement.startsWith("top")?"bottom-full":"",left:e.placement.includes("Left")?"left-0":e.placement.startsWith("right")?"left-full":"",right:e.placement.includes("Right")?"right-0":e.placement.startsWith("left")?"right-full":"",backgroundColor:"bg-white",borderRadius:e.rounded?"rounded-lg":"",borderWidth:"border",borderColor:"border-secondary-200",width:"w-max",paddingBottom:"pb-2",marginTop:e.placement.includes("bottom")?"mt-2":"",marginBottom:e.placement.includes("top")?"mb-2":"",marginLeft:e.placement.includes("right")?"ml-2":"",marginRight:e.placement.includes("left")?"mr-2":"",boxShadow:"shadow-md"}};return{container:d([c({},o.container)]),content:d([c({},o.content)])}});return{menuActive:n,computedClasses:u,iconName:a,luiDropdown:s}}};function Ue(e,l,i,n,s,r){const a=t.resolveComponent("lui-button");return t.openBlock(),t.createElementBlock("div",{role:"listbox",class:t.normalizeClass(["dropdown",n.computedClasses.container])},[t.createVNode(a,t.mergeProps({type:"link",ref:"luiDropdown"},e.$attrs,{variant:e.variant,size:e.size,rounded:e.rounded,"aria-expanded":n.menuActive,icon:e.icon==="default"?n.iconName.append:e.icon,prepend:e.icon==="default"?n.iconName.prepend:e.prepend,block:e.block,"icon-line":e.iconLine,uppercase:e.uppercase,filter:e.filter,"font-bold":e.fontBold,onClick:l[0]||(l[0]=u=>n.menuActive=!n.menuActive)}),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.text),1)]),_:1},16,["variant","size","rounded","aria-expanded","icon","prepend","block","icon-line","uppercase","filter","font-bold"]),t.withDirectives(t.createElementVNode("ul",{class:t.normalizeClass([n.computedClasses.content,"dropdown-menu"])},[t.renderSlot(e.$slots,"default")],2),[[t.vShow,n.menuActive]])],2)}var ve=k(Ye,[["render",Ue]]);const Je={mixins:[f("disabled")],inheritAttrs:!1,setup(e){const l=t.inject("parentProps");return{computedClasses:t.computed(()=>{const n={marginLeft:"ml-2",marginRight:"mr-2",marginTop:"mt-2",padding:l.size==="sm"?"p-1.5":l.size==="md"?"p-2":"p-3",borderRadius:l.rounded?"rounded-lg":"",cursor:e.disabled?"cursor-not-allowed":"cursor-pointer",backgroundColor:e.disabled?"":`hover:bg-${l.variant}-100`,fontSize:l.size==="sm"?"text-xs":"text-base",lineHeight:e.size==="sm"?"leading-4.5":"leading-6",fontColor:e.disabled?"text-secondary-300":`text-secondary-600 hover:text-${l.variant}`,display:"block",outline:"focus:outline-none",ring:e.disabled?"":`focus:ring-2 focus:ring-${l.variant}`,width:l.block?"w-full":""};return d([c({},n)])})}}},Qe=["tabIndex"];function Ze(e,l,i,n,s,r){return t.openBlock(),t.createElementBlock("li",null,[t.createElementVNode("a",t.mergeProps({class:n.computedClasses},e.$attrs,{tabIndex:e.disabled?null:"0"}),[t.renderSlot(e.$slots,"default")],16,Qe)])}var et=k(Je,[["render",Ze]]);const tt={},nt={class:"mt-1 -mb-1 text-secondary-100"};function lt(e,l,i,n,s,r){return t.openBlock(),t.createElementBlock("hr",nt)}var it=k(tt,[["render",lt]]);const at={mixins:[x("default",["2xs","xs","sm","md","lg","xl","default"]),b("level","2",["1","2","3","4","5","6"]),f("display")],setup(e){function l(r,a){const u=a?"display":"normal";return{6:{normal:"text-sm",display:"text-4xl"},5:{normal:"text-base",display:"text-5xl"},4:{normal:"text-lg",display:"text-6xl"},3:{normal:"text-xl",display:"text-7xl"},2:{normal:"text-2xl",display:"text-8xl"},1:{normal:"text-3xl",display:"text-9xl"},"2xs":{normal:"text-sm",display:"text-4xl"},xs:{normal:"text-base",display:"text-5xl"},sm:{normal:"text-lg",display:"text-6xl"},md:{normal:"text-xl",display:"text-7xl"},lg:{normal:"text-2xl",display:"text-8xl"},xl:{normal:"text-3xl",display:"text-9xl"}}[r][u]}function i(r){return{6:"leading-4.5",5:"leading-5",4:"leading-6",3:"leading-6",2:"leading-8",1:"leading-9","2xs":"leading-4.5",xs:"leading-5",sm:"leading-6",md:"leading-6",lg:"leading-8",xl:"leading-9"}[r]}const n=t.computed(()=>`h${e.level}`),s=t.computed(()=>{const r={fontSize:e.size==="default"?l(e.level,e.display):l(e.size,e.display),lineHeight:e.display?"":e.size==="default"?i(e.level):i(e.size)};return d([c({},r)])});return{setLevel:n,computedClasses:s}}};function ot(e,l,i,n,s,r){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(n.setLevel),{class:t.normalizeClass(n.computedClasses)},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["class"])}var st=k(at,[["render",ot]]);const rt={components:{LuiIcon:$,LuiButton:N},mixins:[b("prepend","none"),b("modelValue",""),x("sm",["sm","md","lg"]),f("clear",!1),f("block",!1),b("description","none")],inheritAttrs:!1,props:{state:{type:[String,Boolean,null],default:null,validator(e){return[null,"warning",!0,!1].includes(e)}}},emits:["update:modelValue","change"],setup(e,l){const i=t.computed(()=>l.attrs.class);function n(o){l.emit("update:modelValue",o.target.value),l.emit("change",o.target.value)}const s=t.computed(()=>{const o={paddingLeft:e.prepend==="none"?e.size==="lg"?"pl-3":"pl-2":e.size==="lg"?"pl-11":e.size==="md"?"pl-9":"pl-8",paddingRight:e.state!==null&&e.clear===!0?e.size==="lg"?"pr-20":e.size==="md"?"pr-16":"pr-14":e.state===null&&e.clear===!1?e.size==="lg"?"pr-3":"pr-2":e.size==="lg"?"pr-11":e.size==="md"?"pr-9":"pr-8",paddingY:e.size==="sm"?"py-1.5":e.size==="md"?"py-2":"py-3",border:e.state==="warning"?"border border-warning":e.state===!0?"border border-success":e.state===!1?"border border-danger":"border border-secondary-200",ring:e.state==="warning"?"ring-4 ring-warning-100":e.state===!0?"ring-4 ring-success-100":e.state===!1?"ring-4 ring-danger-100":"",borderRadius:`rounded-${e.size}`,fontSize:e.size==="sm"?"text-xs":"text-base",lineHeight:e.size==="sm"?"leading-4.5":"leading-6",fontColor:"placeholder-secondary-400 text-secondary-600",width:e.block?"w-full":"w-48"},h={focus:{ring:e.state===null?"focus:ring-4 focus:ring-primary-100":"",outline:"outline-none",border:e.state===null?"focus:border-primary":""},disabled:{border:"disabled:border-secondary",backgroundColor:"disabled:bg-secondary-100",fontColor:"disabled:text-secondary-300",ring:"disabled:ring-0 disabled:ring-transparent"}},{focus:C,disabled:_}=h;return d([c({},o),c({},C),c({},_)])}),r=t.computed(()=>`${e.state===!0?"text-success":e.state===!1?"text-danger":e.state==="warning"?"text-warning":"text-secondary-600"} inline-block text-xs leading-4.5 mt-1`),a=t.computed(()=>({name:l.attrs.disabled?"forbid":e.state==="warning"?"feedback":e.state===!1?"error-warning":e.state===!0?"checkbox-circle":"",size:e.size==="sm"?"text-base":e.size==="md"?"text-xl":"text-2xl",color:l.attrs.disabled?"text-secondary-300":e.state==="warning"?"text-warning":e.state===!1?"text-danger":e.state===!0?"text-success":"",position:"absolute top-2/4 transform -translate-y-1/2",prepend:e.size==="lg"?"text-secondary-400 left-3":"text-secondary-400 left-2",state:e.size==="lg"?"right-3":"right-2",clear:e.state===null?e.size==="lg"?"right-3":"right-2":e.size==="lg"?"right-12":e.size==="md"?"right-9":"right-8"}));return{computedClasses:s,descriptionClasses:r,iconClasses:a,parentClasses:"relative",attrClasses:i,handleInputEvents:n}}},dt=["value"];function ct(e,l,i,n,s,r){const a=t.resolveComponent("lui-icon"),u=t.resolveComponent("lui-button");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([n.attrClasses,e.block?"w-full":"w-max"])},[t.createElementVNode("div",{class:t.normalizeClass(n.parentClasses)},[e.prepend!=="none"?(t.openBlock(),t.createBlock(a,{key:0,name:e.prepend,class:t.normalizeClass([n.iconClasses.size,n.iconClasses.position,n.iconClasses.prepend]),line:""},null,8,["name","class"])):t.createCommentVNode("",!0),t.createElementVNode("input",t.mergeProps({ref:"Linput"},e.$attrs,{class:n.computedClasses,value:e.modelValue,onInput:l[0]||(l[0]=o=>n.handleInputEvents(o))}),null,16,dt),e.clear&&!e.$attrs.disabled?(t.openBlock(),t.createBlock(u,{key:1,type:"link",variant:"secondary",icon:"close",size:e.size,"disable-styles":"",class:t.normalizeClass([n.iconClasses.position,n.iconClasses.clear]),onClick:l[1]||(l[1]=o=>e.$refs.Linput.value="")},null,8,["size","class"])):t.createCommentVNode("",!0),i.state!==null?(t.openBlock(),t.createBlock(a,{key:2,name:n.iconClasses.name,class:t.normalizeClass([n.iconClasses.size,n.iconClasses.color,n.iconClasses.position,n.iconClasses.state]),line:""},null,8,["name","class"])):t.createCommentVNode("",!0)],2),e.description!=="none"?(t.openBlock(),t.createElementBlock("p",{key:0,class:t.normalizeClass(n.descriptionClasses)},t.toDisplayString(e.description),3)):t.createCommentVNode("",!0)],2)}var mt=k(rt,[["render",ct]]);const ft={mixins:[x("sm",["sm","lg"])],inheritAttrs:!1,setup(e){return{classes:t.computed(()=>{const i={fontColor:"text-secondary-600",fontSize:e.size==="sm"?"text-xs":"text-sm",lineHeight:e.size==="sm"?"leading-4.5":""};return d([c({},i)])})}}};function ut(e,l,i,n,s,r){return t.openBlock(),t.createElementBlock("label",t.mergeProps({role:"label"},e.$attrs,{class:n.classes}),[t.renderSlot(e.$slots,"default")],16)}var gt=k(ft,[["render",ut]]);const bt={inheritAttrs:!1,props:{to:{type:[String,Object],default:"https://"}},mixins:[x("sm",["xxsm","xsm","sm","lg","xlg"]),b("tag","a",["a","vue","nuxt"]),w("variant","secondary"),w("activeVariant","success"),w("exactActiveVariant","success"),w("prefetchedVariant","success"),f("prefetch",!1),f("noPrefetch",!1),b("ariaCurrentValue","page"),f("replace",!1)],setup(e){function l(a){return a[e.size]}const i=t.computed(()=>({to:e.to,replace:e.replace,ariaCurrentValue:e.ariaCurrentValue,activeClass:e.activeClass,exacActiveClass:e.exacActiveClass})),n=t.computed(()=>({to:e.to,replace:e.replace,ariaCurrentValue:e.ariaCurrentValue,activeClass:e.activeClass,exacActiveClass:e.exacActiveClass,prefetchedClass:e.prefetchedClass,prefetch:e.prefetch,noPrefetch:e.noPrefetch})),s=t.computed(()=>e.tag==="vue"?"router-link":e.tag==="nuxt"?"nuxt-link":"a");return{computedClasses:t.computed(()=>{const a={fontSize:l({xxsm:"text-2xs",xsm:"text-xs",sm:"text-sm",lg:"text-base",xlg:"text-xl"}),lineHeight:l({xxsm:"leading-3",xsm:"leading-4.5",sm:"leading-5",lg:"leading-6",xlg:"leading-7"}),underline:"underline"},u={fontColor:`text-${e.variant}-400 hover:text-${e.variant}-500`},o={fontColor:`text-${e.activeVariant}-400 hover:text-${e.activeVariant}-500`},h={fontColor:`text-${e.exactactiveClass}-400 hover:text-${e.exactactiveClass}-500`},C={fontColor:`text-${e.prefetchedVariant}-400 hover:text-${e.prefetchedVariant}-500`};return{classes:d([c({},a)]),activeClass:d([c({},o)]),inactiveClass:d([c({},u)]),exactactiveClass:d([c({},h)]),prefetchedClass:d([c({},C)])}}),routerLinkProps:i,nuxtLinkProps:n,componentName:s}}},ht=["href"],Ct=["href","onClick"];function kt(e,l,i,n,s,r){return e.tag==="a"?(t.openBlock(),t.createElementBlock("a",t.mergeProps({key:0},e.$attrs,{href:i.to,target:"_blank",class:[n.computedClasses.classes,n.computedClasses.inactiveClass]}),[t.renderSlot(e.$slots,"default")],16,ht)):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n.componentName),t.mergeProps({key:1},e.tag==="vue"?n.routerLinkProps:n.nuxtLinkProps,{custom:""}),{default:t.withCtx(({isActive:a,href:u,navigate:o,isExactActive:h,prefetchedClass:C})=>[t.createElementVNode("a",t.mergeProps(e.$attrs,{href:u,onClick:o,class:[n.computedClasses.classes,a?n.computedClasses.activeClass:n.computedClasses.inactiveClass,h?n.computedClasses.exactactiveClass:n.computedClasses.inactiveClass,C?n.computedClasses.prefetchedClass:n.computedClasses.inactiveClass]}),[t.renderSlot(e.$slots,"default")],16,Ct)]),_:3},16))}var yt=k(bt,[["render",kt]]);const xt={inheritAttrs:!1,components:{LuiIcon:$,LuiButton:N,LuiCheckbox:q},mixins:[b("state","info",["info","success","warning","danger"]),f("show",!1),b("title",""),b("description",""),f("vertical",!1),f("showCheckbox",!1),f("showIcon",!0),b("checkboxLabel","Dont show again"),b("confirmLabel","Confirm"),b("cancelLabel","Cancel")],emits:["onConfirm","onCancel","onCheckboxChanged"],setup(e,{slots:l}){const i=t.computed(()=>!!l.icon),n=t.computed(()=>({title:!!l.title,description:!!l.description,check:!!l.check,cancelButton:!!l.cancelButton,confirmButton:!!l.confirmButton})),s={success:"check-double",warning:"feedback",info:"information",danger:"error-warning"};return{computedClasses:t.computed(()=>{const a={dialog:{position:"fixed",left:"left-0",top:"top-0",overflow:"overflow-hidden",width:"w-screen",height:"h-screen",display:"flex",alignItems:"items-center",justifyContent:"justify-center",zIndex:e.show?"z-50":""},content:{padding:"p-6",minWidth:"min-w-[20rem]",maxWidth:e.vertical?"max-w-sm":"",backgroundColor:"bg-white",borderWidth:"border",borderColor:"border-secondary-200",borderRadius:"rounded-xl",boxShadow:"shadow",display:e.vertical?"flex":"grid",gridCols:e.vertical?"":"grid-cols-[48px_420px]",gridGap:e.vertical?"":"gap-x-4",alingItems:e.vertical?"items-center":"",flexDirection:e.vertical?"flex-col":""},iconWrapper:{width:"w-12",height:"h-12",display:"grid",palceItems:"place-items-center",borderRadius:"rounded-full",backgroundColor:e.state==="info"?"bg-primary-50":`bg-${e.state}-50`,color:e.state==="info"?"text-primary":`text-${e.state}`,fontSize:"text-2xl",lineHeight:"leading-none",marginBottom:e.vertical?"mb-4":""},title:{color:"text-secondary-800",fontSize:"text-lg",fontWeight:"font-semibold",marginBottom:"mb-1",textAlign:e.vertical?"text-center":""},description:{color:"text-secondary-600",fontSize:"text-base",marginBottom:"mb-12",textAlign:e.vertical?"text-center":""},bottom:{display:"flex",alignItems:e.vertical?"items-center":"",flexDirection:e.vertical?"flex-col":""},checkWrapper:{display:"flex",color:"text-secondary-600",alignItems:e.vertical?"":"items-center",flexOrder:e.vertical?"order-last":"",spaceX:"space-x-2"},buttonWrapper:{display:"flex",alignItems:"items-center",marginLeft:e.vertical?"":"ml-auto",flexDirection:e.vertical?"flex-col":"",width:e.vertical?"w-full":"",spaceY:e.vertical?"space-y-3":"",spaceX:e.vertical?"":"space-x-3",marginBottom:e.vertical?"mb-4":""}};return{dialog:d([c({},a.dialog)]),content:d([c({},a.content)]),iconWrapper:d([c({},a.iconWrapper)]),title:d([c({},a.title)]),description:d([c({},a.description)]),bottom:d([c({},a.bottom)]),checkWrapper:d([c({},a.checkWrapper)]),buttonWrapper:d([c({},a.buttonWrapper)])}}),hasIconSlot:i,iconNames:s,checkNamedSlots:n}}},wt={for:"lui-modal-checkbox"};function zt(e,l,i,n,s,r){const a=t.resolveComponent("lui-icon"),u=t.resolveComponent("lui-checkbox"),o=t.resolveComponent("lui-button");return e.show?(t.openBlock(),t.createElementBlock("div",t.mergeProps({key:0,id:"dialog1",role:"dialog","aria-labelledby":"dialog1_label","aria-modal":"true"},e.$attrs,{class:n.computedClasses.dialog,style:{"background-color":"rgba(0, 0, 0, 0.6)"}}),[t.createElementVNode("div",{class:t.normalizeClass(["content",n.computedClasses.content])},[e.showIcon?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(n.computedClasses.iconWrapper)},[t.renderSlot(e.$slots,"icon"),n.hasIconSlot?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(a,{key:0,name:n.iconNames[e.state],line:""},null,8,["name"]))],2)):t.createCommentVNode("",!0),t.createElementVNode("div",null,[n.checkNamedSlots.title?t.renderSlot(e.$slots,"title",{key:0}):(t.openBlock(),t.createElementBlock("h3",{key:1,class:t.normalizeClass(["title",n.computedClasses.title])},t.toDisplayString(e.title),3)),n.checkNamedSlots.description?t.renderSlot(e.$slots,"description",{key:2}):(t.openBlock(),t.createElementBlock("p",{key:3,class:t.normalizeClass(["description",n.computedClasses.description])},t.toDisplayString(e.description),3)),t.renderSlot(e.$slots,"default"),t.createElementVNode("div",{class:t.normalizeClass(["bottom",n.computedClasses.bottom])},[e.showCheckbox?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["check",n.computedClasses.checkWrapper])},[n.checkNamedSlots.check?t.renderSlot(e.$slots,"check",{key:0}):(t.openBlock(),t.createBlock(u,{key:1,id:"lui-modal-checkbox",size:"lg",onOnChange:l[0]||(l[0]=h=>e.$emit("onCheckboxChanged",h))})),t.createElementVNode("label",wt,t.toDisplayString(e.checkboxLabel),1)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["button",n.computedClasses.buttonWrapper])},[n.checkNamedSlots.cancelButton?t.renderSlot(e.$slots,"cancelButton",{key:0}):(t.openBlock(),t.createBlock(o,{key:1,variant:"secondary",type:"outline",rounded:"",block:"",onClick:l[1]||(l[1]=h=>e.$emit("onCancel"))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.cancelLabel),1)]),_:1})),n.checkNamedSlots.confirmButton?t.renderSlot(e.$slots,"confirmButton",{key:2}):(t.openBlock(),t.createBlock(o,{key:3,rounded:"",block:"",onClick:l[2]||(l[2]=h=>e.$emit("onConfirm"))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.confirmLabel),1)]),_:1}))],2)],2)])],2)],16)):t.createCommentVNode("",!0)}var Bt=k(xt,[["render",zt]]);const pt={mixins:[x("sm",["sm","md","lg"])],inheritAttrs:!1,props:{checked:{type:Boolean,default:!1},value:{type:String,default:""},state:{type:[String,Boolean,null],default:null,validator(e){return[null,"warning",!0,!1].includes(e)}}},emits:["change","update:modelValue"],setup(e,{attrs:l}){function i(r){return r[e.size]}const n=t.computed(()=>e.checked||(l==null?void 0:l.modelValue)===e.value);return{computedClasses:t.computed(()=>{const r={input:{position:"absolute",opacity:"opacity-0",width:i({sm:"w-4",md:"w-5",lg:"w-6"}),height:i({sm:"h-4",md:"h-5",lg:"h-6"}),peer:"peer"},span:{width:i({sm:"w-4",md:"w-5",lg:"w-6"}),height:i({sm:"h-4",md:"h-5",lg:"h-6"}),display:"flex items-center justify-center",borderWidth:i({sm:"border-1.5",md:"border-2",lg:"border-2.5"}),borderColor:e.state===null?"border-primary":e.state==="warning"?"border-warning":e.state===!0?"border-success":"border-danger",borderRadius:"rounded-full",backgroundColor:"bg-white",ringWidth:e.size==="sm"?"peer-focus:ring-1":"peer-focus:ring-2",ringOffset:"peer-focus:ring-offset-2",ringColor:e.state===null?"peer-focus:ring-primary":e.state==="warning"?"peer-focus:ring-warning":e.state===!0?"peer-focus:ring-success":"peer-focus:ring-danger"},spanBefore:{width:i({sm:"before:w-2",md:"before:w-2.5",lg:"before:w-3"}),height:i({sm:"before:h-2",md:"before:h-2.5",lg:"before:h-3"}),borderRadius:"before:rounded-full",backgroundColor:"before:bg-white",backgroundColorChecked:e.state===null?"peer-checked:before:bg-primary":e.state==="warning"?"peer-checked:before:bg-warning":e.state===!0?"peer-checked:before:bg-success":"peer-checked:before:bg-danger"},spanStates:{border:"peer-disabled:border-secondary-300",background:"peer-disabled:before:bg-white"}};return{input:d([c({},r.input)]),span:d([c({},r.span),c({},r.spanBefore),c({},r.spanStates)])}}),isChecked:n}}},$t={class:"container"},St=["checked","value"];function _t(e,l,i,n,s,r){return t.openBlock(),t.createElementBlock("div",$t,[t.createElementVNode("input",t.mergeProps({type:"radio"},e.$attrs,{class:n.computedClasses.input,checked:n.isChecked,value:i.value,onChange:l[0]||(l[0]=a=>e.$emit("change",a.target.value)),onInput:l[1]||(l[1]=a=>e.$emit("update:modelValue",a.target.value))}),null,16,St),t.createElementVNode("span",{class:t.normalizeClass(n.computedClasses.span)},null,2)])}var Lt=k(pt,[["render",_t]]);const Vt={mixins:[f("selected",!1),f("disabled",!1),b("value","")],setup(e){const l=t.inject("parentProps"),i=t.computed(()=>{const s={marginLeft:"ml-2",marginRight:"mr-2",marginTop:"mt-2",padding:l.size==="sm"?"p-1.5":l.size==="md"?"p-2":l.size==="lg"?"p-3":"",fontSize:l.size==="sm"?"text-xs":"text-base",borderRadius:l.rounded?"rounded-lg":"",cursor:e.disabled===!1?"cursor-pointer":"cursor-not-allowed",display:"flex",alignItems:"items-center",outline:"outline-none"};return d([c({},s)])}),n=t.computed(()=>e.selected?"bg-primary text-white focus:ring-2 focus:ring-offset-2 focus:ring-primary":e.disabled?"bg-secondary-100 text-secondary-300":"bg-white hover:bg-primary-100 focus:bg-primary-100 text-secondary-600 hover:text-primary focus:text-primary");return{computedClasses:i,selectedStyles:n}}};function Et(e,l,i,n,s,r){return t.openBlock(),t.createElementBlock("li",t.mergeProps(e.$attrs,{class:[n.computedClasses,n.selectedStyles]}),[t.renderSlot(e.$slots,"default")],16)}var U=k(Vt,[["render",Et]]);const At={components:{LuiChip:Y,LuiOption:U,LuiIcon:$,LuiBadge:j},mixins:[b("placeholder","select item"),b("textField","none"),b("valueField","none"),f("multiple",!1),f("rounded",!0),x("md",["sm","md","lg"])],inheritAttrs:!1,props:{options:{type:Array,default:()=>[]},modelValue:{type:[String,Number,Array],default:""},selectPrepend:{type:[Object,null],default:null},selectAppend:{type:[Object,null],default:null},optionPrepend:{type:[Object,null],default:null},optionAppend:{type:[Object,null],default:null},state:{type:[String,Boolean,null],default:null,validator(e){return[null,"warning",!0,!1].includes(e)}}},emits:["update:modelValue"],setup(e,{emit:l}){const i=t.ref(!1),n=t.ref(e.options),s=t.ref([]);let r=t.ref(e.placeholder),a=t.ref([]),u=t.ref("");const o=t.ref({size:e.size,rounded:e.rounded,selectedOptions:a.value});if(t.provide("parentProps",o.value),e.modelValue!==""){const m=t.ref(e.modelValue);e.multiple?a.value=m.value:r.value=m.value}t.watch(()=>e.modelValue,m=>{e.multiple?a.value=m:r.value=m}),t.onMounted(()=>{document.addEventListener("click",T)}),t.onUnmounted(()=>{document.removeEventListener("click",T)});function h(m){return m[e.size]}function C(m){if(!e.multiple)return e.textField!=="none"?r.value===m[e.textField]:r.value===m;let y;return e.textField!=="none"?y=a.value.findIndex(z=>z[e.textField]===m[e.textField]):y=a.value.findIndex(z=>z===m),y!==-1}function _(m){let y;e.textField!=="none"?y=a.value.findIndex(z=>z[e.textField]===m[e.textField]):y=a.value.findIndex(z=>z===m),a.value.splice(y,1)}function I(m,y){if(!m.disabled)if(e.multiple){y.stopPropagation();let z;e.textField!=="none"?z=a.value.findIndex(H=>H[e.textField]===m[e.textField]):z=a.value.findIndex(H=>H===m),z===-1?a.value.push(m):a.value.splice(z,1),l("update:modelValue",a.value)}else e.textField!=="none"?(l("update:modelValue",m[e.textField]),r.value=m[e.textField]):(l("update:modelValue",m),r.value=m,i.value=!1)}function T(){i.value=!1}function O(m){m.keyCode===40&&(u.value=0,s.value[u.value].$el.focus())}function F(){s.value[u.value].$el.focus()}function Qt(m){m.keyCode===13&&I(e.options[u.value],m);const y=e.options.length-1;m.keyCode===40&&(u.value<y?(u.value++,F()):u.value===y&&(u.value=0,F())),m.keyCode===38&&(u.value>0?(u.value--,F()):u.value===0&&(u.value=y,F()))}const Zt=t.computed(()=>{let m={selectPrepend:e.selectPrepend,selectAppend:e.selectAppend,optionPrepend:e.optionPrepend,optionAppend:e.optionAppend};return["selectPrepend","selectAppend","optionPrepend","optionAppend"].forEach(y=>{m[y]!==null&&(m[y].tag==="lui-icon"?m[y].class=h({sm:"text-base leading-none",md:"text-xl leading-none",lg:"text-2xl leading-none"}):m[y].size=h({sm:"2xs",md:"xs",lg:"sm"}))}),m}),en=t.computed(()=>e.size==="lg"?"md":e.size);return{computedClasses:t.computed(()=>{const m={selectWrapper:{width:"w-max",position:"relative",zIndex:"z-10"},button:{display:"flex",alignItems:"items-center",paddingTop:h({sm:"pt-1.5",md:"pt-2",lg:"pt-3"}),paddingBottom:a.value.length<0?"p-0":h({sm:"pb-1.5",md:"pb-2",lg:"pb-3"}),paddingX:"px-3",fontSize:e.size==="sm"?"text-xs":"text-base",lineHeight:e.size==="sm"?"leading-4.5":"leading-6",textColor:"text-secondary-600",borderWidth:"border",borderColor:e.state===!0?"border-success":e.state===!1?"border-danger":e.state==="warning"?"border-warning":"border-secondary-200 focus:border-primary",borderRadius:e.rounded?"rounded-lg":"",backgroundColor:"bg-white",width:"w-80",outline:"focus:outline-none",ringWidth:e.state===null?"focus:ring-4":"ring-4",ringColor:e.state===null?"focus:ring-primary-100":e.state===!0?"ring-success-100":e.state===!1?"ring-danger-100":"ring-warning-100",disabled:"disabled:border-secondary-300 disabled:text-secondary-600 disabled:bg-secondary-100"},options:{backgroundColor:"bg-white",borderWidth:"border",borderRadius:e.rounded?"rounded-lg":"",borderColor:e.state===!0?"border-success":e.state===!1?"border-danger":e.state==="warning"?"border-warning":"border-secondary-200 focus:border-primary",paddingBottom:"pb-2",boxShadow:"shadow-md",marginTop:"mt-2",position:"absolute",width:"w-full",top:"top-full",marginTop:"mt-2"},multipleWrapper:{display:"flex",flexWrap:"flex-wrap",marginLeft:e.selectPrepend!==null?"-ml-1":"-ml-2",marginBottom:"-mb-2"},multipleItem:{marginLeft:"ml-2",marginBottom:"mb-2"},text:{marginLeft:e.selectPrepend!==null||e.optionPrepend!==null?"ml-2":""},append:{marginLeft:"ml-auto"},prepend:{marginRight:"mr-2"}};return{selectWrapper:d([c({},m.selectWrapper)]),button:d([c({},m.button)]),options:d([c({},m.options)]),multipleItem:d([c({},m.multipleItem)]),multipleWrapper:d([c({},m.multipleWrapper)]),append:d([c({},m.append)]),prepend:d([c({},m.prepend)])}}),optionsActive:i,selectedOption:r,selectOption:I,optionsArr:n,selectedOptions:a,unselectOption:_,chipSize:en,isOptionSelected:C,handleOptionsKeyEvents:Qt,handleButtonKeyEvents:O,optionsRef:s,targetOption:u,contentProps:Zt}}},Pt=["aria-expanded"],Nt={key:2},It=["aria-activedescendant"];function Tt(e,l,i,n,s,r){const a=t.resolveComponent("lui-chip"),u=t.resolveComponent("lui-option");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(n.computedClasses.selectWrapper)},[t.createElementVNode("button",t.mergeProps({type:"button","aria-haspopup":"listbox","aria-labelledby":"exp_elem exp_button","aria-expanded":n.optionsActive,class:n.computedClasses.button},e.$attrs,{onClick:l[0]||(l[0]=t.withModifiers(o=>n.optionsActive=!n.optionsActive,["stop"])),onKeydown:l[1]||(l[1]=o=>n.handleButtonKeyEvents(o))}),[i.selectPrepend!==null?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.selectPrepend.tag),t.mergeProps({key:0},n.contentProps.selectPrepend,{class:n.computedClasses.prepend}),null,16,["class"])):t.createCommentVNode("",!0),e.multiple&&n.selectedOptions.length>0?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(n.computedClasses.multipleWrapper)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.selectedOptions,(o,h)=>(t.openBlock(),t.createBlock(a,{key:h,filter:"lighter",variant:"primary",tabindex:"-1",type:"default","rounded-full":e.rounded,size:n.chipSize,icon:"close",clickable:"",class:t.normalizeClass(n.computedClasses.multipleItem),onClick:t.withModifiers(C=>n.unselectOption(o),["stop"])},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.textField!=="none"?o[e.textField]:o),1)]),_:2},1032,["rounded-full","size","class","onClick"]))),128))],2)):(t.openBlock(),t.createElementBlock("span",Nt,t.toDisplayString(n.selectedOption),1)),i.selectAppend!==null?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.selectAppend.tag),t.mergeProps({key:3},n.contentProps.selectAppend,{class:n.computedClasses.append}),null,16,["class"])):t.createCommentVNode("",!0)],16,Pt),t.withDirectives(t.createElementVNode("ul",{tabindex:"-1",role:"listbox","aria-labelledby":"exp_elem","aria-activedescendant":n.selectedOption,class:t.normalizeClass(n.computedClasses.options),onKeydown:l[2]||(l[2]=t.withModifiers(o=>n.handleOptionsKeyEvents(o),["stop"]))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.options,(o,h)=>(t.openBlock(),t.createBlock(u,{id:e.textField!=="null"?o[e.textField]:o,ref_for:!0,ref:C=>n.optionsRef[h]=C,key:h,tabindex:"-1",role:"option",selected:n.isOptionSelected(o),disabled:o.disabled!==void 0&&o.disabled===!0,onClick:C=>n.selectOption(o,C)},{default:t.withCtx(()=>[i.optionPrepend!==null?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.optionPrepend.tag),t.mergeProps({key:0},n.contentProps.optionPrepend,{class:n.computedClasses.prepend}),null,16,["class"])):t.createCommentVNode("",!0),t.createElementVNode("span",null,t.toDisplayString(e.textField!=="none"?o[e.textField]:o),1),i.optionAppend!==null?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.optionAppend.tag),t.mergeProps({key:1},n.contentProps.optionAppend,{class:n.computedClasses.append}),null,16,["class"])):t.createCommentVNode("",!0)]),_:2},1032,["id","selected","disabled","onClick"]))),128))],42,It),[[t.vShow,n.optionsActive]])],2)}var Ft=k(At,[["render",Tt]]);const Wt={mixins:[x("sm",["sm","lg"])],inheritAttrs:!1,setup(e){function l(n){return n[e.size]}return{computedClasses:t.computed(()=>{const n={input:{position:"absolute",opacity:"opacity-0",width:l({sm:"w-8",lg:"w-10"}),height:l({sm:"h-4",lg:"h-5"}),cursor:"cursor-pointer",peer:"peer"},span:{display:"flex items-center",alignItems:"peer-checked:justify-end",width:l({sm:"w-8",lg:"w-10"}),height:l({sm:"h-4",lg:"h-5"}),borderRadius:"rounded-full",backgroundColor:"bg-secondary-300 peer-checked:bg-success",borderWidth:"border",borderColor:"border-secondary-200 peer-checked:border-success-100",ringWidth:"peer-focus:ring-2",ringOffset:"peer-focus:ring-offset-2",ringColor:"peer-focus:ring-success",paddigX:"px-0.5"},spanBefore:{width:l({sm:"before:w-3",lg:"before:w-4"}),height:l({sm:"before:h-3",lg:"before:h-4"}),borderRadius:"before:rounded-full",backgroundColor:"before:bg-white",borderWidth:"before:border",borderColor:"before:border-secondary-200 peer-checked:before:border-success-100"}};return{input:d([c({},n.input)]),span:d([c({},n.span),c({},n.spanBefore)])}})}}},Dt={class:"container"};function Rt(e,l,i,n,s,r){return t.openBlock(),t.createElementBlock("div",Dt,[t.createElementVNode("input",t.mergeProps({type:"checkbox",class:n.computedClasses.input},e.$attrs),null,16),t.createElementVNode("span",{class:t.normalizeClass(n.computedClasses.span)},null,2)])}var jt=k(Wt,[["render",Rt]]);const Ot={mixins:[b("alignTabs","left",["left","center","right"]),b("alignContent","left",["left","center","right"]),f("stretch")],setup(e,{slots:l}){const i=t.ref(l.default().map(o=>o.props));let n=i.value.findIndex(o=>o.active!==void 0);n=n===-1?!1:n;let s=t.ref(i.value[n||0].title);const r=t.ref([]);t.provide("selectedTitle",s);function a(o,h){let C=null;o.keyCode===39&&this.tabProps.length>h+1&&(C=h+1),o.keyCode===37&&h-1>=0&&(C=h-1),o.keyCode===36&&(C=0),o.keyCode===35&&(C=this.tabProps.length-1),C!==null&&this.tabProps[C].disabled===void 0&&(this.selectedTitle=this.tabProps[C].title,r.value[C].focus())}const u=t.computed(()=>{const o={width:"w-full",display:"flex",margin:"mb-8",flexWrap:"flex-wrap",alingItems:"items-center",justifyContent:e.alignTabs==="left"?"justify-start":e.alignTabs==="center"?"justify-center":"justify-end"},h={lineHeight:"leading-5",fontSize:"text-base",fontWeight:"font-semibold",position:"relative",margin:"mb-2",flexGrow:e.stretch?"flex-grow":"",disabled:"disabled:text-secondary-300",after:"after:w-full after:h-0.5 after:absolute after:-bottom-2 after:left-0 after:inline-block after:rounded-full after:bg-transparent"},C=e.alignContent==="left"?"text-left":e.alignContent==="center"?"text-center":"text-right",_="text-primary after:bg-primary",I="text-secondary-500",T="w-full",O="px-4";return{tabContainer:d([c({},o)]),tab:d([c({},h)]),panel:C,activeTab:_,defaultTab:I,tabMenuContainer:T,tabText:O}});return{tabProps:i,selectedTitle:s,elements:r,computedClasses:u,handleKeyEvents:a}}},Ht=["tabindex","aria-selected","disabled","onClick","onKeydown"];function Mt(e,l,i,n,s,r){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(n.computedClasses.tabMenuContainer)},[t.createElementVNode("div",{class:t.normalizeClass(["overflow-y-auto",n.computedClasses.tabContainer]),role:"tablist"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.tabProps,(a,u)=>(t.openBlock(),t.createElementBlock("button",{key:a.title,ref_for:!0,ref:o=>n.elements[u]=o,role:"tab",tabindex:n.selectedTitle===a.title?"0":"-1","aria-selected":n.selectedTitle===a.title,disabled:a.disabled!==void 0,class:t.normalizeClass([n.computedClasses.tab,n.selectedTitle===a.title?n.computedClasses.activeTab:n.computedClasses.defaultTab]),onClick:o=>n.selectedTitle=a.title,onKeydown:o=>n.handleKeyEvents(o,u)},[t.createElementVNode("span",{class:t.normalizeClass(n.computedClasses.tabText)},t.toDisplayString(a.title),3)],42,Ht))),128))],2),t.createElementVNode("div",{class:t.normalizeClass(n.computedClasses.panel)},[t.renderSlot(e.$slots,"default")],2)],2)}var Kt=k(Ot,[["render",Mt]]);const Gt={mixins:[b("title","Title"),f("active"),f("disabled")],setup(){return{selectedTitle:t.inject("selectedTitle")}}},Xt={role:"tabpanel",tabindex:"0"};function qt(e,l,i,n,s,r){return t.withDirectives((t.openBlock(),t.createElementBlock("div",Xt,[t.renderSlot(e.$slots,"default")],512)),[[t.vShow,e.title==n.selectedTitle]])}var Yt=k(Gt,[["render",qt]]);const Ut={mixins:[b("tag","p",["p","span","br","strong","em","quotes","blockquote","code","pre","mark","ins","del","sup","sub","small","i","b","abbr","address","bdi","bdo","cite","dfn","kbs","meter","q","rp","rt","ruby","s","samp","time","u","var","wbr"]),x("md",["xs","sm","md","lg"]),w("variant","secondary")],setup(e){return{classes:t.computed(()=>{const i={fontColor:`text-${e.variant}-600`,fontSize:e.size==="xs"?"text-xs":e.size==="sm"?"text-sm":e.size==="md"?"text-base":"text-xl",lineHeight:e.size==="xs"?"leading-3":e.size==="sm"?"leading-4.5":e.size==="md"?"leading-5":"leading-6"};return d([c({},i)])})}}};function vt(e,l,i,n,s,r){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.tag),t.mergeProps({class:n.classes},e.$attrs),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16,["class"])}var Jt=k(Ut,[["render",vt]]);g.LuiAccordion=we,g.LuiAccordionGroup=$e,g.LuiAvatar=Pe,g.LuiBadge=j,g.LuiButton=N,g.LuiCard=De,g.LuiCheckbox=q,g.LuiChip=Y,g.LuiDropdown=ve,g.LuiDropdownDivider=it,g.LuiDropdownItem=et,g.LuiHeading=st,g.LuiIcon=$,g.LuiInput=mt,g.LuiLabel=gt,g.LuiLink=yt,g.LuiModal=Bt,g.LuiOption=U,g.LuiRadio=Lt,g.LuiSelect=Ft,g.LuiSwitch=jt,g.LuiTab=Yt,g.LuiTabs=Kt,g.LuiText=Jt,Object.defineProperty(g,"__esModule",{value:!0}),g[Symbol.toStringTag]="Module"});
(function(k,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(k=typeof globalThis<"u"?globalThis:k||self,e(k.LuiVue={},k.Vue))})(this,function(k,e){"use strict";function G(t){const l=e.computed(()=>({backgroundColor:t.variant.value==="solid"?{[`bg-${t.color.value}-500`]:t.filter.value==="none",[`bg-${t.color.value}-100`]:t.filter.value==="lighten",[`bg-${t.color.value}-800`]:t.filter.value==="darken"}:null})),n=e.computed(()=>({textColor:t.variant.value==="solid"?{["text-white"]:t.filter.value==="none",[`text-${t.color.value}-500`]:t.filter.value==="lighten",[`text-${t.color.value}-100`]:t.filter.value==="darken"}:{[`text-${t.color.value}-500`]:t.filter.value==="none",[`text-${t.color.value}-100`]:t.filter.value==="lighten",[`text-${t.color.value}-800`]:t.filter.value==="darken"}})),o=e.computed(()=>({borderColor:t.variant.value==="outline"?{[`border-${t.color.value}-500`]:t.filter.value==="none",[`border-${t.color.value}-100`]:t.filter.value==="lighten",[`border-${t.color.value}-800`]:t.filter.value==="darken"}:t.border.value?{["border-white"]:t.filter.value==="none",[`border-${t.color.value}-500`]:t.filter.value==="lighten",[`border-${t.color.value}-100`]:t.filter.value==="darken"}:"border-transparent"}));return{backgroundColorClasses:l.value,textColorClasses:n.value,borderColorClasses:o.value}}function W(){return{position:"absolute",overflow:"overflow-hidden",outlineStyle:"outline-none",cursor:"disabled:cursor-not-allowed",borderWidth:"border-0",opacity:"opacity-0",zIndex:"z-10",peer:"peer"}}function R(t,l){return{descriptionClasses:e.computed(()=>{const o={fontSize:"text-sm",lineHeight:"leading-normal",margin:"mt-1",textColor:l.disabled!==void 0&&l.disabled===!0?"text-secondary-200 dark:text-secondary-700":{"text-secondary-600 dark:text-secondary-400":t.state.value===null,"text-warning-500":t.state.value==="warning","text-danger-500":t.state.value===!1,"text-success-500":t.state.value===!0}};return Object.values({...o})})}}function H(t,l){const n=e.toRef(t,"modelValue"),o=function(c){if(typeof t.modelValue=="boolean"||t.modelValue===void 0)return c.target.checked;if(c.target.checked)n.value.push(c.target.value);else{const a=n.value.indexOf(c.target.value);n.value.splice(a,1)}return n.value},r=e.computed(()=>t.modelValue===void 0?l.checked!==void 0?l.checked:!1:typeof t.modelValue=="boolean"?t.modelValue:n.value.includes(t.value));return{handleVModel:o,isInputChecked:r}}const Y=["src","alt"],ee={name:"LuiAvatar"},te=e.defineComponent({...ee,props:{variant:{type:String,default:"solid"},color:{type:String,default:"primary"},filter:{type:String,default:"none"},size:{type:String,default:"md"},border:{type:Boolean,default:!1},rounded:{type:[Boolean,String],default:!1},text:{type:String,default:""},src:{type:String,default:""},alt:{type:String,default:""}},setup(t){const l=t,{backgroundColorClasses:n,textColorClasses:o,borderColorClasses:r}=G(e.toRefs(l)),c=e.computed(()=>{const s={borderWidth:"border",borderStyle:"border-solid",display:"block",width:"w-full",height:"h-full",objectFit:"object-cover",borderRadius:{"rounded-lg":l.rounded===!0,"rounded-full":l.rounded==="full"},borderColor:r.borderColor};return Object.values(s)}),a=e.computed(()=>Object.values({display:"flex",justifyContent:"justify-center",alignItems:"items-center"})),d=e.computed(()=>{const s={display:"flex",borderRadius:{"rounded-lg":l.rounded===!0,"rounded-full":l.rounded==="full"},borderWidth:"border",borderStyle:"border-solid",justifyContent:"justify-center",alignItems:"items-center",width:{"w-6":l.size==="xs","w-8":l.size==="sm","w-12":l.size==="md","w-16":l.size==="lg","w-20":l.size==="xl"},height:{"h-6":l.size==="xs","h-8":l.size==="sm","h-12":l.size==="md","h-16":l.size==="lg","h-20":l.size==="xl"},fontSize:{"text-sm":l.size==="xs"||l.size==="sm","text-xl":l.size==="md","text-3xl":l.size==="lg"||l.size==="xl"},backgroundColor:l.src.length===0?n.backgroundColor:null,textColor:o.textColor,borderColor:l.src.length===0?r.borderColor:"border-transparent"};return Object.values(s)});return(s,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["lui-avatar",e.unref(d)])},[t.src.length>0?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.src,alt:t.alt,class:e.normalizeClass(e.unref(c))},null,10,Y)):e.createCommentVNode("",!0),s.$slots.icon?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(a))},[e.renderSlot(s.$slots,"icon")],2)):e.createCommentVNode("",!0),t.text.length>0?(e.openBlock(),e.createElementBlock("span",{key:2,ref:"avatarContent"},e.toDisplayString(t.text),513)):e.createCommentVNode("",!0)],2))}}),le={name:"LuiBadge"},ne=e.defineComponent({...le,props:{variant:{type:String,default:"solid"},color:{type:String,default:"primary"},filter:{type:String,default:"none"},size:{type:String,default:"md"},border:{type:Boolean,default:!1},text:{type:String,default:""},position:{type:String,default:"bottom-right"}},setup(t){const l=t,n=e.useSlots(),{backgroundColorClasses:o,textColorClasses:r,borderColorClasses:c}=G(e.toRefs(l)),a=e.ref(null),d=e.ref(null),s=e.ref(!1);e.watchEffect(()=>{var I,z;const b=(I=a.value)==null?void 0:I.scrollWidth,S=(z=d.value)==null?void 0:z.scrollWidth;b&&S&&(S>b?s.value=!0:s.value=!1)});const f=e.computed(()=>Object.values({position:"relative",display:"inline-block"})),u=e.computed(()=>Object.values({display:"flex",justifyContent:"justify-center",alignItems:"items-center"})),y=e.computed(()=>{const b={display:s.value?"inline-block":"flex",position:{absolute:!!n.default},top:n.default?{"top-0":l.position==="top-left"||l.position==="top-right"}:null,bottom:n.default?{"bottom-0":l.position==="bottom-left"||l.position==="bottom-right"}:null,left:n.default?{"left-0":l.position==="bottom-left"||l.position==="top-left"}:null,right:n.default?{"right-0":l.position==="bottom-right"||l.position==="top-right"}:null,translate:n.default?{"-translate-y-1/2 -translate-x-1/2":l.position==="top-left","-translate-y-1/2 translate-x-1/2":l.position==="top-right","translate-y-1/2 -translate-x-1/2":l.position==="bottom-left","translate-y-1/2 translate-x-1/2":l.position==="bottom-right"}:null,borderRadius:"rounded-full",borderWidth:"border",borderStyle:"border-solid",justifyContent:{["justify-center"]:!s.value},alignItems:{["items-center"]:!s.value},padding:l.text.length>0||!!n.icon?{"px-0.5":l.size==="xs","px-1":l.size==="sm","px-1.5":l.size==="md","px-2":l.size==="lg","px-2.5":l.size==="xl"}:null,width:l.text.length>0||!!n.icon?s.value?null:{"w-3":l.size==="xs","w-4":l.size==="sm","w-5":l.size==="md","w-6":l.size==="lg","w-7":l.size==="xl"}:{"w-1.5":l.size==="xs","w-2":l.size==="sm","w-2.5":l.size==="md","w-3":l.size==="lg","w-3.5":l.size==="xl"},height:l.text.length>0||!!n.icon?s.value?null:{"h-3":l.size==="xs","h-4":l.size==="sm","h-5":l.size==="md","h-6":l.size==="lg","h-7":l.size==="xl"}:{"h-1.5":l.size==="xs","h-2":l.size==="sm","h-2.5":l.size==="md","h-3":l.size==="lg","h-3.5":l.size==="xl"},fontSize:{"text-xs":l.size==="xs"||l.size==="sm","text-sm":l.size==="md","text-base":l.size==="lg"||l.size==="xl"},backgroundColor:o.backgroundColor,textColor:r.textColor,borderColor:c.borderColor};return Object.values(b)});return(b,S)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["lui-badge",e.unref(f)])},[e.renderSlot(b.$slots,"default"),e.createElementVNode("div",{ref_key:"badgeWrapper",ref:a,class:e.normalizeClass(e.unref(y))},[b.$slots.icon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(u))},[e.renderSlot(b.$slots,"icon")],2)):e.createCommentVNode("",!0),l.text.length>0?(e.openBlock(),e.createElementBlock("span",{key:1,ref_key:"badgeContent",ref:d},e.toDisplayString(t.text),513)):e.createCommentVNode("",!0)],2)],2))}});function oe(t){const l=e.useSlots(),n=e.computed(()=>!!l.icon),o=e.computed(()=>!!l.icon||!!l.prepend||!!l.append),r=e.computed(()=>{const a={outlineStyle:"outline-none",ringWidth:"focus-visible:ring-4",transitionProperty:"transition-colors transition-transform",translate:"active:translate-y-0.5 disabled:translate-y-0",cursor:{["cursor-pointer disabled:cursor-not-allowed"]:t.tag.value==="button"},fontSize:{"text-xs":t.size.value==="xs","text-sm":t.size.value==="sm","text-base":t.size.value==="md","text-lg":t.size.value==="lg","text-xl":t.size.value==="xl"},backgroundColor:t.variant.value==="solid"?{[`bg-${t.color.value}-500 hover:bg-${t.color.value}-400 disabled:bg-secondary-500`]:t.filter.value==="none",[`bg-${t.color.value}-100 hover:bg-${t.color.value}-50 disabled:bg-secondary-100`]:t.filter.value==="lighten",[`bg-${t.color.value}-800 hover:bg-${t.color.value}-700 disabled:bg-secondary-800`]:t.filter.value==="darken"}:null,textColor:t.variant.value==="solid"?{["text-white disabled:text-secondary-300"]:t.filter.value==="none",[`text-${t.color.value}-500 disabled:text-secondary-300`]:t.filter.value==="lighten",[`text-${t.color.value}-100 disabled:text-secondary-300`]:t.filter.value==="darken"}:{[`text-${t.color.value}-500 hover:text-${t.color.value}-400 disabled:text-secondary-500`]:t.filter.value==="none",[`text-${t.color.value}-100 hover:text-${t.color.value}-50 disabled:text-secondary-100`]:t.filter.value==="lighten",[`text-${t.color.value}-800 hover:text-${t.color.value}-700 disabled:text-secondary-800`]:t.filter.value==="darken"},borderColor:t.variant.value==="text"?"border-transparent":t.variant.value==="solid"||t.variant.value==="outline"?{[`border-${t.color.value}-500 hover:border-${t.color.value}-400 disabled:border-secondary-500`]:t.filter.value==="none",[`border-${t.color.value}-100 hover:border-${t.color.value}-50 disabled:border-secondary-100`]:t.filter.value==="lighten",[`border-${t.color.value}-800 hover:border-${t.color.value}-700 disabled:border-secondary-800`]:t.filter.value==="darken"}:null,borderWidth:{border:t.variant.value!="link"},borderStyle:{"border-solid":t.variant.value!="link"},width:{"w-full":t.block.value&&t.variant.value!=="link"},ringColor:`focus-visible:ring-${t.color.value}-500/40`,padding:t.variant.value!=="link"?n.value?{"p-1.5":t.size.value==="xs","p-2":t.size.value==="sm","p-2.5":t.size.value==="md","p-3.5":t.size.value==="lg","p-4":t.size.value==="xl"}:{"py-1 px-3":t.size.value==="xs","py-1.5 px-4":t.size.value==="sm","py-2 px-5":t.size.value==="md","py-2.5 px-6":t.size.value==="lg","py-3.5 px-7":t.size.value==="xl"}:"p-0",borderRadius:{"rounded-lg":t.rounded.value===!0,"rounded-full":t.rounded.value==="full"},display:{flex:o.value,"inline-block":!o.value&&t.tag.value!=="button"},alignItems:{"items-center":o.value},justifyContent:{"justify-center":o.value},space:!!l.prepend||!!l.append?{"space-x-1":t.size.value==="xs"||t.size.value==="sm","space-x-1.5":t.size.value==="md","space-x-2":t.size.value==="lg"||t.size.value==="xl"}:""};return Object.values({...a})}),c=e.computed(()=>t.size.value==="xs"?"text-xs":t.size.value==="sm"?"text-base":t.size.value==="xl"?"text-2xl":"text-xl");return{buttonClasses:r,computedIconSize:c}}const se={name:"LuiButton",inheritAttrs:!1},q=e.defineComponent({...se,props:{tag:{type:String,default:"button"},variant:{type:String,default:"solid"},color:{type:String,default:"primary"},filter:{type:String,default:"none"},size:{type:String,default:"md"},rounded:{type:[Boolean,String],default:!1},block:{type:Boolean,default:!1}},setup(t){const l=t,{buttonClasses:n,computedIconSize:o}=oe(e.toRefs(l)),r=e.useSlots();return(c,a)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),e.mergeProps(c.$attrs,{class:[e.unref(n),"lui-button"]}),{default:e.withCtx(()=>[e.unref(r).icon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([e.unref(o),"leading-none flex items-center"])},[e.renderSlot(c.$slots,"icon")],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.unref(r).prepend?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([e.unref(o),"leading-none flex items-center"])},[e.renderSlot(c.$slots,"prepend")],2)):e.createCommentVNode("",!0),e.createElementVNode("span",null,[e.renderSlot(c.$slots,"default")]),e.unref(r).append?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass([e.unref(o),"leading-none flex items-center"])},[e.renderSlot(c.$slots,"append")],2)):e.createCommentVNode("",!0)],64))]),_:3},16,["class"]))}});function ae(t){const l=e.computed(()=>{const r={...W(),width:{"w-4":t.size.value==="xs","w-5":t.size.value==="sm","w-6":t.size.value==="md","w-7":t.size.value==="lg","w-8":t.size.value==="xl"},height:{"h-4":t.size.value==="xs","h-5":t.size.value==="sm","h-6":t.size.value==="md","h-7":t.size.value==="lg","h-8":t.size.value==="xl"}};return Object.values({...r})}),n=e.computed(()=>{const r={display:"inline-flex",alignItems:"items-center",justifyContent:"justify-center",width:{"w-4":t.size.value==="xs","w-5":t.size.value==="sm","w-6":t.size.value==="md","w-7":t.size.value==="lg","w-8":t.size.value==="xl"},height:{"h-4":t.size.value==="xs","h-5":t.size.value==="sm","h-6":t.size.value==="md","h-7":t.size.value==="lg","h-8":t.size.value==="xl"},borderRadius:{rounded:t.rounded.value===!0,"rounded-full":t.rounded.value==="full"},backgroundColor:"bg-secondary-50 dark:bg-secondary-900 peer-checked:bg-primary-500 dark:peer-disabled:bg-secondary-800 peer-disabled:bg-secondary-200",borderWidth:"border peer-checked:border-0",borderColor:"border-secondary-200 dark:border-secondary-700 peer-checked:border-transparent",ringOffsetColor:"peer-focus-visible:ring-2",ringColor:{"peer-focus-visible:ring-primary-500/40":t.state.value===null,"peer-focus-visible:ring-warning-500/40":t.state.value==="warning","peer-focus-visible:ring-danger-500/40":t.state.value===!1,"peer-focus-visible:ring-success-500/40":t.state.value===!0},transitionProperty:"transition-colors"};return Object.values({...r})}),o=e.computed(()=>Object.values({...{position:"absolute",left:"left-0",right:"right-0",top:"top-0",bottom:"bottom-0",margin:"m-auto",display:"hidden peer-checked:block",textColor:"text-white peer-disabled:text-secondary-300 dark:peer-disabled:text-secondary-600"}}));return{inputClasses:l,spanClasses:n,iconClasses:o}}const re={class:"inline-block leading-3"},ie={class:"relative inline-flex"},de=["checked","value"],ce=["width","height"],ue=[e.createElementVNode("path",{d:"M9.64286 3.42857L4.63393 8.57143L2.35714 6.23376",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)],fe=[e.createElementVNode("path",{d:"M1 1H9",stroke:"white","stroke-width":"1.5","stroke-linecap":"round"},null,-1)],me=[e.createElementVNode("path",{d:"M1 1H11",stroke:"white","stroke-width":"1.75","stroke-linecap":"round"},null,-1)],he=[e.createElementVNode("path",{d:"M1 1H15",stroke:"white","stroke-width":"2","stroke-linecap":"round"},null,-1)],ge=[e.createElementVNode("path",{d:"M1 1H17",stroke:"white","stroke-width":"2","stroke-linecap":"round"},null,-1)],be=[e.createElementVNode("path",{d:"M1 1H21",stroke:"white","stroke-width":"2","stroke-linecap":"round"},null,-1)],xe={name:"LuiCheckbox",inheritAttrs:!1},ye=e.defineComponent({...xe,props:{size:{type:String,default:"md"},rounded:{type:[Boolean,String],default:!1,validator(t){return[!0,!1,"full"].includes(t)}},state:{type:[String,Boolean,null],default:null},description:{type:[String,null],default:null},indeterminate:{type:Boolean,default:!1},value:{type:[String,Boolean],default:!1},modelValue:{type:[Array,Boolean,void 0],default:void 0}},emits:["update:modelValue"],setup(t,{emit:l}){const n=t,o=e.useAttrs(),{inputClasses:r,spanClasses:c,iconClasses:a}=ae(e.toRefs(n)),{descriptionClasses:d}=R(e.toRefs(n),o),{handleVModel:s,isInputChecked:f}=H(n,o);function u(b){l("update:modelValue",s(b))}const y=e.computed(()=>n.size==="xs"?{checkbox:"12",indeterminate:{width:"10",stroke:"1.5",viewBox:"0 0 10 2"}}:n.size==="sm"?{checkbox:"16",indeterminate:{width:"12",stroke:"1.75",viewBox:"0 0 12 2"}}:n.size==="md"?{checkbox:"20",indeterminate:{width:"16",stroke:"2",viewBox:"0 0 16 2"}}:n.size==="lg"?{checkbox:"24",indeterminate:{width:"18",stroke:"2",viewBox:"0 0 18 2"}}:{checkbox:"28",indeterminate:{width:"22",stroke:"2",viewBox:"0 0 22 2"}});return(b,S)=>(e.openBlock(),e.createElementBlock("div",re,[e.createElementVNode("div",ie,[e.createElementVNode("input",e.mergeProps({type:"checkbox",checked:e.unref(f),value:t.value,onChange:u,class:e.unref(r)},b.$attrs),null,16,de),e.createElementVNode("span",{class:e.normalizeClass(e.unref(c))},null,2),t.indeterminate?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass(e.unref(a)),width:e.unref(y).checkbox,height:e.unref(y).checkbox,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ue,10,ce)),t.indeterminate&&t.size==="xs"?(e.openBlock(),e.createElementBlock("svg",{key:1,width:"10",height:"2",viewBox:"0 0 10 2",class:e.normalizeClass(e.unref(a)),fill:"none",xmlns:"http://www.w3.org/2000/svg"},fe,2)):e.createCommentVNode("",!0),t.indeterminate&&t.size==="sm"?(e.openBlock(),e.createElementBlock("svg",{key:2,width:"12",height:"2",viewBox:"0 0 12 2",class:e.normalizeClass(e.unref(a)),fill:"none",xmlns:"http://www.w3.org/2000/svg"},me,2)):e.createCommentVNode("",!0),t.indeterminate&&t.size==="md"?(e.openBlock(),e.createElementBlock("svg",{key:3,width:"16",height:"2",viewBox:"0 0 16 2",class:e.normalizeClass(e.unref(a)),fill:"none",xmlns:"http://www.w3.org/2000/svg"},he,2)):e.createCommentVNode("",!0),t.indeterminate&&t.size==="lg"?(e.openBlock(),e.createElementBlock("svg",{key:4,width:"18",height:"2",viewBox:"0 0 18 2",class:e.normalizeClass(e.unref(a)),fill:"none",xmlns:"http://www.w3.org/2000/svg"},ge,2)):e.createCommentVNode("",!0),t.indeterminate&&t.size==="xl"?(e.openBlock(),e.createElementBlock("svg",{key:5,width:"22",height:"2",viewBox:"0 0 22 2",class:e.normalizeClass(e.unref(a)),fill:"none",xmlns:"http://www.w3.org/2000/svg"},be,2)):e.createCommentVNode("",!0)]),t.description!==null?(e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass(e.unref(d))},e.toDisplayString(t.description),3)):e.createCommentVNode("",!0)]))}});function Z(t,l){function n(o){const r=e.unref(t);r!=null&&r.contains(o.target)&&l()}e.onMounted(()=>document.addEventListener("click",n)),e.onUnmounted(()=>document.removeEventListener("click",n))}function J(t){const l=e.ref("bottom"),n=e.unref(t);function o(){if(n===null){l.value="bottom";return}const{y:r,bottom:c}=n==null?void 0:n.getBoundingClientRect();window.innerHeight-c>=r?l.value="bottom":l.value="top"}return e.onMounted(()=>window.addEventListener("scroll",o)),e.onUnmounted(()=>window.removeEventListener("scroll",o)),{properPosition:l}}let ze=0;function ke(){return++ze}function D(){return ke()}const pe=["width","height"],we=[e.createElementVNode("path",{d:"M5.99999 6.58599L8.47499 4.11099L9.18199 4.81799L5.99999 7.99999L2.81799 4.81799L3.52499 4.11099L5.99999 6.58599Z",fill:"white"},null,-1)],Ce=["aria-activedescendant"],ve={name:"LuiDropdown",inheritAttrs:!1},Be=e.defineComponent({...ve,props:{text:{type:String,default:""},menuPosition:{type:String,default:"bottomLeft"},variant:{type:String,default:"solid"},color:{type:String,default:"primary"},filter:{type:String,default:"none"},size:{type:String,default:"md"},rounded:{type:[Boolean,String],default:!1},block:{type:Boolean,default:!1}},emits:["onTrigger"],setup(t,{emit:l}){const n=t;console.log(n);const o=e.useSlots(),r=e.ref(null),c=e.ref(null),a=e.ref(null),d=e.ref(!1),s=`lui-dropdown-button-${D()}`,f=`lui-dropdown-menu-${D()}`,u=e.reactive({items:[],currentIndex:0,currentId:""});Z(c,()=>I());const{properPosition:y}=J(r),b={bottomLeft:{classes:"top-full mt-1",oppositeClasses:"bottom-full mb-1 left-0",direction:"bottom"},topLeft:{classes:"bottom-full mb-1 left-0",oppositeClasses:"top-full mt-1",direction:"top"},bottomRight:{classes:"top-full mt-1 right-0",oppositeClasses:"bottom-full mb-1 right-0",direction:"bottom"},topRight:{classes:"bottom-full mb-1 right-0",oppositeClasses:"top-full mt-1 right-0",direction:"top"},leftTop:{classes:"top-0 mr-1 right-full",oppositeClasses:"bottom-0 mr-1 right-full",direction:"bottom"},leftBottom:{classes:"bottom-0 mr-1 right-full",oppositeClasses:"top-0 mr-1 right-full",direction:"top"},rightTop:{classes:"top-0 ml-1 left-full",oppositeClasses:"bottom-0 ml-1 left-full",direction:"bottom"},rightBottom:{classes:"bottom-0 ml-1 left-full",oppositeClasses:"top-0 ml-1 left-full",direction:"top"}},S=e.computed(()=>b[n.menuPosition].direction===y.value?b[n.menuPosition].classes:b[n.menuPosition].oppositeClasses);function I(){d.value=!1,l("onTrigger",d.value)}function z(){d.value=!0,l("onTrigger",d.value)}function B(){d.value=!d.value,l("onTrigger",d.value)}(function(){const C=o.default&&o.default().map(p=>p.type.toString()==="Symbol(Fragment)"?p.children.map(j=>j.props):p.props).flat();C&&C.length&&(u.items=C)})();function v(m){var C;switch(m.code){case"ArrowDown":m.preventDefault(),$(a.value,p=>p+1);break;case"ArrowUp":m.preventDefault(),$(a.value,p=>p-1);break;case"Enter":m.preventDefault(),m.stopPropagation(),((C=a.value)==null?void 0:C.children[u.currentIndex]).click();break;case"Home":m.preventDefault(),$(a.value,p=>p+1,0);break;case"End":m.preventDefault();{const p=u.items.length-1;$(a.value,j=>j-1,p)}break;case"Escape":m.preventDefault(),I();break;case"Tab":m.preventDefault(),m.stopPropagation();break}}function N(m){switch(m.code){case"ArrowDown":case"Enter":case"Space":m.preventDefault(),z(),$(a.value,C=>C+1,0);break}}function $(m,C,p=null){const j=h=>h>=0&&h<=u.items.length-1,K=h=>{var g,w;return((g=u.items[h])==null?void 0:g.disabled)===void 0||((w=u.items[h])==null?void 0:w.disabled)===!1};let _=u.currentIndex;if(p!==null?_=p:_=C(_),!j(_))return;for(;!K(_);)if(_=C(_),!j(_))return;u.currentIndex=_;const i=m==null?void 0:m.children[u.currentIndex];(i==null?void 0:i.id)!==void 0&&(u.currentId=i==null?void 0:i.id,e.nextTick(()=>i==null?void 0:i.focus({preventScroll:!0})))}const A=e.computed(()=>{const m={position:"absolute",backgroundColor:"bg-secondary-50 dark:bg-secondary-900",borderWidth:"border",borderColor:"border-secondary-200 dark:border-secondary-700",borderRadius:{"rounded-md":n.rounded===!0,"rounded-2xl":n.rounded==="full"},padding:{"p-1.5":n.size==="xs"||n.size==="sm","p-2":n.size==="md","p-2.5":n.size==="lg"||n.size==="xl"},boxShadow:"shadow-lg",bottom:y.value=="top"?"bottom-full":"",top:y.value=="bottom"?"top-full":"",margin:y.value=="bottom"?"mt-2":"mb-2",space:n.size==="xs"||n.size==="sm"?"space-y-1.5":"space-y-2"};return Object.values({...m})}),F=e.computed(()=>({color:n.color,block:n.block,rounded:n.rounded,size:n.size,variant:n.variant,filter:n.filter}));function P(m){return m==="xs"?"12":m==="sm"?"16":m==="xl"?"24":"20"}return(m,C)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"luiDropdownWrapper",ref:r,class:"relative leading-3 w-fit"},[e.createElementVNode("div",{ref_key:"luiDropdownButton",ref:c,class:"trigger-wrapper"},[e.renderSlot(m.$slots,"trigger",{id:s,type:"button",ariaHaspopup:"true",ariaExpanded:d.value,ariaControls:f,onClick:B,onKeydown:N},()=>[e.createVNode(q,e.mergeProps({id:s,type:"button","aria-haspopup":"true","aria-expanded":d.value,"aria-controls":f,onClick:B,onKeydown:N},e.unref(F)),{append:e.withCtx(()=>[e.renderSlot(m.$slots,"triggerAppend",{},()=>[(e.openBlock(),e.createElementBlock("svg",{viewBox:"0 0 12 12",width:P(t.size),height:P(t.size),fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},we,8,pe))])]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.text)+" ",1)]),_:3},16,["aria-expanded"])])],512),e.createVNode(e.Transition,{"enter-active-class":"transition duration-100 ease-out","enter-from-class":"transform scale-95 opacity-0","enter-to-class":"transform scale-100 opacity-100","leave-active-class":"transition duration-75 ease-in","leave-from-class":"transform scale-100 opacity-100","leave-to-class":"transform scale-95 opacity-0"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("ul",{id:f,role:"menu",ref_key:"luiDropdownMenu",ref:a,"aria-labelledby":s,"aria-activedescendant":String(u.currentIndex),tabindex:"0",class:e.normalizeClass([e.unref(S),e.unref(A)]),onKeydown:v},[e.renderSlot(m.$slots,"default")],42,Ce),[[e.vShow,d.value]])]),_:3})],512))}}),Se={name:"LuiDropdownItem"},$e=e.defineComponent({...Se,props:{disabled:{type:Boolean,default:!1},tag:{type:String,default:"button"},color:{type:String,default:"secondary"},size:{type:String,default:"md"},rounded:{type:[Boolean,String],default:!1}},setup(t){const l=t,n=e.useSlots(),o=`lui-dropdown-item-${D()}`,r=e.computed(()=>{const d={width:"w-full",display:"flex",justifyContent:"justify-between",alignItems:"items-center",outlineWidth:"outline-none",textColor:`text-${l.color}-600 dark:text-${l.color}-400 disabled:text-secondary-300 disabled:dark:text-secondary-700`,backgroundColor:`hover:bg-${l.color}-600/20 focus:bg-${l.color}-600/20 dark:hover:bg-${l.color}-400/20 dark:focus:bg-${l.color}-400/20 disabled:bg-transparent disabled:dark:bg-transparent`,fontSize:{"text-xs":l.size==="xs","text-sm":l.size==="sm","text-base":l.size==="md","text-lg":l.size==="lg","text-xl":l.size==="xl"},padding:{"py-1 px-1.5":l.size==="xs","py-1.5 px-2":l.size==="sm","py-2 px-2.5":l.size==="md","py-2.5 px-2.5":l.size==="lg","py-3.5 px-3":l.size==="xl"},borderRadius:{"rounded-md":l.rounded===!0,"rounded-full":l.rounded==="full"},space:!!n.prepend||!!n.append?{"space-x-1.5":l.size==="xs","space-x-2":l.size==="sm","space-x-2.5":l.size==="md"||l.size==="lg","space-x-3":l.size==="xl"}:"",cursor:{["cursor-pointer disabled:cursor-not-allowed"]:l.tag==="button"},pointerEvents:l.disabled?"pointer-events-none":""};return Object.values(d)}),c=e.computed(()=>Object.values({display:"flex",alignItems:"items-center",justifyContent:"justify-center"})),a=e.computed(()=>Object.values({display:"flex flex-1",alignItems:"items-center"}));return(d,s)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),e.mergeProps({role:"menuitem",class:"lui-menu-item",id:o},d.$attrs,{class:e.unref(r)}),{default:e.withCtx(()=>[d.$slots.prepend?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(c))},[e.renderSlot(d.$slots,"prepend")],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(a))},[e.renderSlot(d.$slots,"default")],2),d.$slots.append?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(c))},[e.renderSlot(d.$slots,"append")],2)):e.createCommentVNode("",!0)]),_:3},16,["class"]))}});function _e(t,l){const n=e.useSlots(),o=e.computed(()=>t.stateIcon.value===!0&&t.state.value!==null||t.clear.value===!0?n.prepend?"twoIcon":"rightIcon":n.prepend?"leftIcon":"noIcon"),r={position:"absolute",translate:"-translate-y-1/2",top:"top-2/4",fontSize:{"text-xs":t.size.value==="xs","text-base":t.size.value==="sm","text-xl":t.size.value==="md"||t.size.value==="lg","text-2xl":t.size.value==="xl"}},c=e.computed(()=>{const f={peer:"peer",width:"w-full",textColor:"text-secondary-600 placeholder:text-secondary-400 disabled:placeholder:text-secondary-300 dark:text-secondary-300 dark:placeholder:text-secondary-600 dark:disabled:text-secondary-700",backgroundColor:"bg-secondary-50 disabled:bg-secondary-100 dark:bg-secondary-900 dark:disabled:secondary-800",outlineStyle:"outline-none",borderWidth:"border",borderStyle:"border-solid",cursor:"disabled:cursor-not-allowed",borderColor:{["border-secondary-200 focus:border-primary-500 disabled:border-secondary-200"]:t.state.value===null,["disabled:border-secondary-200 border-warning-500"]:t.state.value==="warning",["disabled:border-secondary-200 border-danger-500"]:t.state.value===!1,["disabled:border-secondary-200 border-success-500"]:t.state.value===!0},ringWidth:l.disabled!==void 0&&l.disabled===!0?"ring-0":t.state.value===null?"focus:ring-4":"ring-4",ringColor:{"focus:ring-primary-500/40":t.state.value===null,"ring-warning-500/40":t.state.value==="warning","ring-danger-500/40":t.state.value===!1,"ring-success-500/40":t.state.value===!0},borderRadius:{"rounded-lg":t.rounded.value===!0,"rounded-full":t.rounded.value==="full"},fontSize:{"text-xs":t.size.value==="xs","text-sm":t.size.value==="sm","text-base":t.size.value==="md","text-lg":t.size.value==="lg","text-xl":t.size.value==="xl"},padding:o.value==="noIcon"?{"py-1 px-1.5":t.size.value==="xs","py-1.5 px-2":t.size.value==="sm","py-2 px-2.5":t.size.value==="md","py-2.5 px-2.5":t.size.value==="lg","py-3.5 px-3":t.size.value==="xl"}:o.value==="rightIcon"?{"py-1 pl-1.5 pr-6":t.size.value==="xs","py-1.5 pl-2 pr-8":t.size.value==="sm","py-2 pl-2.5 pr-10":t.size.value==="md","py-2.5 pl-2.5 pr-10":t.size.value==="lg","py-3.5 pl-3 pr-12":t.size.value==="xl"}:o.value==="twoIcon"?{"py-1 px-6":t.size.value==="xs","py-1.5 px-8":t.size.value==="sm","py-2 px-10":t.size.value==="md","py-2.5 px-10":t.size.value==="lg","py-3.5 px-12":t.size.value==="xl"}:{"py-1 pr-1.5 pl-6":t.size.value==="xs","py-1.5 pr-2 pl-8":t.size.value==="sm","py-2 pr-2.5 pl-10":t.size.value==="md","py-2.5 pr-2.5 pl-10":t.size.value==="lg","py-3.5 pr-3 pl-12":t.size.value==="xl"}};return Object.values({...f})}),a=e.computed(()=>{const f={...r,left:{"left-2":t.size.value==="xs","left-2.5":t.size.value==="sm","left-3":t.size.value==="md"||t.size.value==="lg","left-4":t.size.value==="xl"},textColor:l.disabled!==void 0&&l.disabled.value?"text-secondary-300 dark:text-secondary-700":"text-secondary-400 peer-focus:text-secondary-600 dark:text-secondary-600 dark:peer-focus:text-secondary-300"};return Object.values({...f})}),d=e.computed(()=>{const f={...r,right:{"right-2":t.size.value==="xs","right-2.5":t.size.value==="sm","right-3":t.size.value==="md"||t.size.value==="lg","right-4":t.size.value==="xl"},textColor:l.disabled!==void 0&&l.disabled===!0?"text-secondary-300":{"text-warning-500":t.state.value==="warning","text-danger-500":t.state.value===!1,"text-success-500":t.state.value===!0}};return Object.values({...f})}),s=e.computed(()=>{const f={...r,right:{"right-2":t.size.value==="xs","right-2.5":t.size.value==="sm","right-3":t.size.value==="md"||t.size.value==="lg","right-4":t.size.value==="xl"},display:"flex",outlineStyle:"outline-none",textColor:"text-secondary-400 peer-focus:text-secondary-600 dark:text-secondary-600 dark:peer-focus:text-secondary-300",ringWidth:"focus-visible:ring-2",ringColor:"focus-visible:ring-secondary-200"};return Object.values({...f})});return{inputClasses:c,prependClasses:a,stateIconClasses:d,closeIconClasses:s}}const Ve={class:"relative"},Ee=["value"],Ie=["width","height"],Ne=[e.createElementVNode("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),e.createElementVNode("path",{d:"M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"},null,-1)],Oe=["width","height"],Le=[e.createElementVNode("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),e.createElementVNode("path",{d:"M6.455 19L2 22.5V4a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6.455zM4 18.385L5.763 17H20V5H4v13.385zM11 13h2v2h-2v-2zm0-6h2v5h-2V7z"},null,-1)],je=["width","height"],Me=[e.createElementVNode("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),e.createElementVNode("path",{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm-1-5h2v2h-2v-2zm0-8h2v6h-2V7z"},null,-1)],De=["width","height"],Re=[e.createElementVNode("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),e.createElementVNode("path",{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm-.997-4L6.76 11.757l1.414-1.414 2.829 2.829 5.656-5.657 1.415 1.414L11.003 16z"},null,-1)],Ae=["width","height"],Pe=[e.createElementVNode("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),e.createElementVNode("path",{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm4.891-11.477l-8.368 8.368a6.04 6.04 0 0 1-1.414-1.414l8.368-8.368a6.04 6.04 0 0 1 1.414 1.414z"},null,-1)],We={name:"LuiInput",inheritAttrs:!1},Q=e.defineComponent({...We,props:{size:{type:String,default:"md"},rounded:{type:[Boolean,String],default:!1},state:{type:[String,Boolean,null],default:null},stateIcon:{type:[Boolean],default:null},block:{type:Boolean,default:!1},clear:{type:Boolean,default:!1},description:{type:[String,null],default:null},modelValue:{type:[String,Number],default:""}},emits:["update:modelValue"],setup(t,{expose:l,emit:n}){const o=t,r=e.useAttrs(),c=e.useSlots(),a=e.ref(null),{inputClasses:d,prependClasses:s,stateIconClasses:f,closeIconClasses:u}=_e(e.toRefs(o),r),{descriptionClasses:y}=R(e.toRefs(o),r);function b(){a.value.value="",a.value.focus()}l({focus:()=>a.value.focus()});function I(v){n("update:modelValue",v.target.value)}const z=e.computed(()=>o.size==="xs"?"12":o.size==="sm"?"16":o.size==="xl"?"24":"20"),B=e.computed(()=>r.disabled!==void 0&&r.disabled===!0);return(v,N)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["inline-block leading-3",t.block?"w-full":"w-48"])},[e.createElementVNode("div",Ve,[e.createElementVNode("input",e.mergeProps({ref_key:"LuiInputRef",ref:a,value:t.modelValue,class:e.unref(d)},v.$attrs,{onInput:N[0]||(N[0]=$=>I($))}),null,16,Ee),e.unref(c).prepend?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([e.unref(s),"leading-none"])},[e.renderSlot(v.$slots,"prepend")],2)):e.createCommentVNode("",!0),t.clear&&!e.unref(r).disabled?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:b,class:e.normalizeClass(e.unref(u))},[(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e.unref(z),height:e.unref(z),fill:"currentColor"},Ne,8,Ie))],2)):e.createCommentVNode("",!0),t.stateIcon&&t.state!==null&&!e.unref(B)?(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass(e.unref(f))},[t.state==="warning"?(e.openBlock(),e.createElementBlock("svg",{key:0,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e.unref(z),height:e.unref(z),fill:"currentColor"},Le,8,Oe)):e.createCommentVNode("",!0),t.state===!1?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e.unref(z),height:e.unref(z),fill:"currentColor"},Me,8,je)):e.createCommentVNode("",!0),t.state===!0?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e.unref(z),height:e.unref(z),fill:"currentColor"},Re,8,De)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),e.createElementVNode("span",null,[t.stateIcon&&e.unref(B)?(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass(e.unref(f)),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e.unref(z),height:e.unref(z),fill:"currentColor"},Pe,10,Ae)):e.createCommentVNode("",!0)])]),t.description!==null?(e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass(e.unref(y))},e.toDisplayString(t.description),3)):e.createCommentVNode("",!0)],2))}});function He(t){const l=e.computed(()=>{const o={...W(),width:{"w-4":t.size.value==="xs","w-5":t.size.value==="sm","w-6":t.size.value==="md","w-7":t.size.value==="lg","w-8":t.size.value==="xl"},height:{"h-4":t.size.value==="xs","h-5":t.size.value==="sm","h-6":t.size.value==="md","h-7":t.size.value==="lg","h-8":t.size.value==="xl"},borderRadius:"rounded-full"};return Object.values({...o})}),n=e.computed(()=>{const o={lineHeight:"leading-none",width:{"w-4 before:w-2":t.size.value==="xs","w-5 before:w-2.5":t.size.value==="sm","w-6 before:w-3":t.size.value==="md","w-7 before:w-3.5":t.size.value==="lg","w-8 before:w-4":t.size.value==="xl"},height:{"h-4 before:h-2":t.size.value==="xs","h-5 before:h-2.5":t.size.value==="sm","h-6 before:h-3":t.size.value==="md","h-7 before:h-3.5":t.size.value==="lg","h-8 before:h-4":t.size.value==="xl"},borderWidth:"border peer-checked:border-0",borderColor:"border-secondary-200 dark:border-secondary-700",borderRadius:"rounded-full before:rounded-full",backgroundColor:"bg-secondary-50 dark:bg-secondary-900 peer-checked:bg-primary-500 before:bg-transparent peer-checked:before:bg-white peer-disabled:before:bg-seconday-200 dark:peer-disabled:bg-secondary-800 dark:peer-disabled:bg-secondary-800 peer-disabled:bg-secondary-200",ringWidth:"peer-focus-visible:ring-2",ringColor:{"peer-focus-visible:ring-primary-500/40":t.state.value===null,"peer-focus-visible:ring-warning-500/40":t.state.value==="warning","peer-focus-visible:ring-danger-500/40":t.state.value===!1,"peer-focus-visible:ring-success-500/40":t.state.value===!0},display:"inline-flex",alignItems:"items-center",justifyContent:"justify-center",flexShrink:"shrink-0",transitionProperty:"transition-colors before:transition-colors"};return Object.values({...o})});return{inputClasses:l,spanClasses:n}}const Te={class:"inline-block leading-3"},Fe={class:"relative"},Ke=["checked","value"],Ue={name:"LuiRadio",inheritAttrs:!1},Ge=e.defineComponent({...Ue,props:{size:{type:String,default:"md"},state:{type:[String,Boolean,null],default:null},description:{type:[String,null],default:null},value:{type:String,default:""},modelValue:{type:[Array,Boolean,void 0],default:void 0}},emits:["update:modelValue"],setup(t,{emit:l}){const n=t,o=e.useAttrs(),{inputClasses:r,spanClasses:c}=He(e.toRefs(n)),{descriptionClasses:a}=R(e.toRefs(n),o),{handleVModel:d,isInputChecked:s}=H(n,o);function f(u){l("update:modelValue",d(u))}return(u,y)=>(e.openBlock(),e.createElementBlock("div",Te,[e.createElementVNode("div",Fe,[e.createElementVNode("input",e.mergeProps({type:"checkbox",class:e.unref(r),checked:e.unref(s),value:t.value,onChange:f},u.$attrs),null,16,Ke),e.createElementVNode("span",{class:e.normalizeClass(e.unref(c))},null,2)]),t.description?(e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass(e.unref(a))},e.toDisplayString(t.description),3)):e.createCommentVNode("",!0)]))}}),X=Symbol("ContextKey"),qe=["aria-selected"],Ze={key:0},Je={key:1,class:"ml-auto"},Qe={name:"LuiOption",inheritAttrs:!1},T=e.defineComponent({...Qe,props:{selected:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{type:String,default:"md"},rounded:{type:[Boolean,String],default:!1},value:{type:[String,Number],default:""},text:{type:String,default:""}},setup(t){const l=t,n=e.inject(X),o=e.useSlots(),r=`lui-option-${D()}`;e.nextTick(()=>{(n==null?void 0:n.selectedOption.value)===void 0&&l.selected&&!l.disabled&&(n==null||n.updateSelectedOption({value:l.value,text:l.text,selected:l.selected}))}),e.watch(()=>l.selected,s=>{n==null||n.updateSelectedOption({value:l.value,text:l.text,selected:s})});function c(s){s.preventDefault(),n==null||n.updateSelectedOption({value:l.value,text:l.text,selected:l.selected}),e.nextTick(()=>n==null?void 0:n.focusButton())}const a=e.computed(()=>(n==null?void 0:n.selectedOption.value)===void 0?l.selected:typeof(n==null?void 0:n.selectedOption.value)=="string"?l.text===(n==null?void 0:n.selectedOption.value):l.text===(n==null?void 0:n.selectedOption.value.text)),d=e.computed(()=>{const s={backgroundColor:l.disabled?"":a.value===!0?"bg-primary-500 hover:text-primary-600 focus:text-primary-600":"hover:bg-primary-500/20 focus:bg-primary-500/20",padding:{"px-1.5 py-1":l.size==="xs","px-2 py-1.5":l.size==="sm","px-2 py-2.5":l.size==="md","p-2.5":l.size==="lg","px-3 py-3.5":l.size==="xl"},textColor:l.disabled?"text-secondary-300 dark:text-secondary-700":a.value===!0?"text-white":"text-secondary-600 dark:text-secondary-300 hover:text-primary-500 focus:text-primary-500",outlineWidth:"outline-none",borderRadius:{"rounded-md":l.rounded===!0,"rounded-2xl":l.rounded==="full"},display:o.prepend||o.append?"flex":"",alignItems:o.prepend||o.append?"items-center":"",cursor:l.disabled?"cursor-not-allowed":"",pointerEvents:l.disabled?"pointer-events-none":""};return Object.values({...s})});return(s,f)=>(e.openBlock(),e.createElementBlock("li",e.mergeProps({role:"option",tabindex:"-1"},s.$attrs,{id:r,"aria-selected":e.unref(a),class:e.unref(d),onClick:c}),[s.$slots.prepend?(e.openBlock(),e.createElementBlock("span",Ze,[e.renderSlot(s.$slots,"prepend")])):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass(s.$slots.prepend?"ml-1":"")},e.toDisplayString(t.text),3),s.$slots.append?(e.openBlock(),e.createElementBlock("span",Je,[e.renderSlot(s.$slots,"append")])):e.createCommentVNode("",!0)],16,qe))}}),Xe=["aria-expanded"],Ye=["aria-activedescendant"],et={name:"LuiSelect",inheritAttrs:!1},tt=e.defineComponent({...et,props:{rounded:{type:[Boolean,String],default:!1},block:{type:Boolean,default:!1},state:{type:[String,Boolean,null],default:null},stateIcon:{type:[Boolean],default:null},options:{type:Array,default:()=>[]},placeholder:{type:String,default:""},size:{type:String,default:"md"},description:{type:[String,null],default:null},modelValue:{type:[Object,String,void 0],default:void 0}},emits:["update:modelValue","change"],setup(t,{emit:l}){const n=t,o=e.useSlots(),r=e.useAttrs(),c=e.ref(null),a=e.ref(null),d=e.ref(null),s=e.ref(!1),f=e.ref(void 0),u=e.reactive({items:[],currentIndex:0,currentId:""}),y=`lui-listbox-button-${D()}`,b=`lui-listbox-wrapper-${D()}`,S=["LuiOption"],I={missing:{modelValue:"Missing field for modelValue, label and value fields are required when modelValue is object",options:"Options missing: should use options prop or LuiOption component as slot"}},{properPosition:z}=J(d);Z(d,()=>$()),e.nextTick(()=>{P(),F()}),e.provide(X,{selectedOption:f,updateSelectedOption:v,focusButton:N}),e.watch(()=>n.modelValue,i=>v(i));function B(i,h,g=null){const w=M=>M>=0&&M<=u.items.length-1,U=M=>{const E=u.items[M];return typeof E!="string"&&((E==null?void 0:E.disabled)===void 0||(E==null?void 0:E.disabled)===!1)};let V=u.currentIndex;if(g!==null?V=g:V=h(V),!w(V))return;for(;!U(V);)if(V=h(V),!w(V))return;u.currentIndex=V;const O=i==null?void 0:i.children[u.currentIndex];u.currentId=O==null?void 0:O.id,e.nextTick(()=>O==null?void 0:O.focus({preventScroll:!0}))}function v(i){f.value=i,l("update:modelValue",i),l("change",i)}function N(){var i;(i=c.value)==null||i.focus()}function $(){s.value=!1}function A(){r.disabled!==void 0&&r.disabled===!0||(s.value=!s.value)}function F(){const i=o.default&&o.default().map(g=>g.type.toString()==="Symbol(Fragment)"?g.children.map(w=>w.props):g.props).flat(),h=[...n.options].concat(i||[]);u.items=h}function P(){var O,M,E;const i=n.modelValue!==void 0&&typeof n.modelValue!="string"&&(((O=n.modelValue)==null?void 0:O.text)===void 0||((M=n.modelValue)==null?void 0:M.value)===void 0),h=n.options.length>0,g=()=>n.options.some(x=>typeof x!="string"&&x.selected);function w(x){n.placeholder===""?v(x):v(n.placeholder)}const U=()=>o.default&&o.default().some(x=>x.type.toString()=="Symbol(Fragment)"?x.children.some(L=>L.props.selected!==void 0&&L.props.selected===!0):x.props.selected!==void 0&&x.props.selected===!0),V=()=>o.default&&o.default().some(x=>x.type.toString()=="Symbol(Fragment)"?x.children.some(L=>L.type.name!==void 0&&S.includes(L.type.name)):x.type.name!==void 0&&S.includes(x.type.name));if(i)throw new Error(I.missing.modelValue);if(n.modelValue!==void 0){v(n.modelValue);return}if(h&&!g()){w(n.options[0]);return}if(!h&&!V())throw new Error(`Options missing: should use options prop or one of the valid slots: ${S}`);if(!h&&!U()){const x=o.default&&o.default()[0];let L;o.default&&(x==null?void 0:x.type.toString())==="Symbol(Fragment)"?L=(E=x==null?void 0:x.children[0])==null?void 0:E.props:L=x==null?void 0:x.props,w(L)}}function m(i){switch(i.code){case"ArrowDown":case"ArrowUp":case"Enter":case"Space":{i.preventDefault(),s.value||A();let h=u.items.findIndex(g=>{var w;return typeof g=="string"?g===f.value:(g==null?void 0:g.text)===((w=f.value)==null?void 0:w.text)});h===-1?B(a.value,g=>g+1,0):B(a.value,g=>g+1,h)}break}}function C(i){switch(i.code){case"ArrowDown":i.preventDefault(),B(a.value,h=>h+1);break;case"ArrowUp":i.preventDefault(),B(a.value,h=>h-1);break;case"Enter":i.preventDefault(),i.stopPropagation(),v(u.items[u.currentIndex]),$(),e.nextTick(()=>N());break;case"Home":i.preventDefault(),B(a.value,h=>h+1,0);break;case"End":i.preventDefault();{const h=u.items.length-1;B(a.value,g=>g-1,h)}break;case"Escape":i.preventDefault(),$(),e.nextTick(()=>N());break;case"Tab":i.preventDefault(),i.stopPropagation();break}}const p=e.computed(()=>{const i={position:"absolute",backgroundColor:"bg-secondary-50 dark:bg-secondary-900",borderWidth:"border",borderColor:"border-secondary-200 dark:border-secondary-700",borderRadius:{"rounded-md":n.rounded===!0,"rounded-2xl":n.rounded==="full"},padding:{"p-1.5":n.size==="xs"||n.size==="sm","p-2":n.size==="md","p-2.5":n.size==="lg"||n.size==="xl"},boxShadow:"shadow-lg",bottom:z.value=="top"?"bottom-full":"",top:z.value=="bottom"?"top-full":"",margin:z.value=="bottom"?"mt-2":"mb-2",space:n.size==="xs"||n.size==="sm"?"space-y-1.5":"space-y-2"};return Object.values({...i})}),j=e.computed(()=>({rounded:n.rounded,block:n.block,state:n.state,stateIcon:n.stateIcon,placeholder:n.placeholder,size:n.size,description:n.description,...r})),K=i=>typeof i=="string"?{text:i}:{...i},_=e.computed(()=>{var i;return typeof f.value=="string"?f.value:(i=f.value)==null?void 0:i.text});return(i,h)=>(e.openBlock(),e.createElementBlock("div",{class:"relative",role:"combobox",ref_key:"selectWrapperRef",ref:d,"aria-haspopup":"listbox","aria-expanded":s.value,"aria-controls":b,tabindex:"-1",onClick:A},[e.createVNode(Q,e.mergeProps({ref_key:"selectRef",ref:c,id:y,value:e.unref(_),readonly:""},e.unref(j),{onKeydown:h[0]||(h[0]=g=>m(g))}),null,16,["value"]),e.withDirectives(e.createElementVNode("ul",{ref_key:"optionsRef",ref:a,id:b,"aria-orientation":"vertical","aria-labelledby":y,role:"listbox",tabindex:"0",class:e.normalizeClass(e.unref(p)),"aria-activedescendant":u.currentId,onKeydown:h[1]||(h[1]=g=>C(g))},[t.placeholder!==""?(e.openBlock(),e.createBlock(T,{key:0,disabled:"",text:t.placeholder},null,8,["text"])):e.createCommentVNode("",!0),t.options.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.options,(g,w)=>(e.openBlock(),e.createBlock(T,e.mergeProps({key:w},K(g)),null,16))),128)):e.createCommentVNode("",!0),i.$slots.default?e.renderSlot(i.$slots,"default",{key:2}):e.createCommentVNode("",!0)],42,Ye),[[e.vShow,s.value]])],8,Xe))}});function lt(t){const l=e.computed(()=>{const o={...W(),width:{"w-8":t.size.value==="xs","w-10":t.size.value==="sm","w-12":t.size.value==="md","w-14":t.size.value==="lg","w-16":t.size.value==="xl"},height:{"h-4":t.size.value==="xs","h-5":t.size.value==="sm","h-6":t.size.value==="md","h-7":t.size.value==="lg","h-8":t.size.value==="xl"},borderRadius:{"rounded-full":t.rounded.value==="full",rounded:t.rounded.value===!0}};return Object.values({...o})}),n=e.computed(()=>{const o={lineHeight:"leading-none",width:{"w-8 before:w-3":t.size.value==="xs","w-10 before:w-4":t.size.value==="sm","w-12 before:w-5":t.size.value==="md","w-14 before:w-6":t.size.value==="lg","w-16 before:w-7":t.size.value==="xl"},height:{"h-4 before:h-3":t.size.value==="xs","h-5 before:h-4":t.size.value==="sm","h-6 before:h-5":t.size.value==="md","h-7 before:h-6":t.size.value==="lg","h-8 before:h-7":t.size.value==="xl"},backgroundColor:"bg-secondary-500 dark:bg-secondary-800 peer-disabled:bg-secondary-100 peer-checked:peer-disabled:bg-success-100 peer-checked:bg-success-500 before:bg-white",borderRadius:{"rounded-full before:rounded-full":t.rounded.value==="full","rounded before:rounded-sm":t.rounded.value===!0},display:"inline-flex",position:"relative before:absolute",top:"before:top-0",bottom:"before:bottom-0",translate:{"before:translate-x-0.5 peer-checked:before:translate-x-[1.125rem]":t.size.value==="xs","before:translate-x-0.5 peer-checked:before:translate-x-[1.375rem]":t.size.value==="sm","before:translate-x-0.5 peer-checked:before:translate-x-[1.625rem]":t.size.value==="md","before:translate-x-0.5 peer-checked:before:translate-x-[1.875rem]":t.size.value==="lg","before:translate-x-0.5 peer-checked:before:translate-x-[2.125rem]":t.size.value==="xl"},margin:"before:my-auto",transitionProperty:"before:transition transition",ringWidth:"peer-focus-visible:ring-2",ringColor:{"peer-focus-visible:ring-primary-500/40":t.state.value===null,"peer-focus-visible:ring-warning-500/40":t.state.value==="warning","peer-focus-visible:ring-danger-500/40":t.state.value===!1,"peer-focus-visible:ring-success-500/40":t.state.value===!0}};return Object.values({...o})});return{inputClasses:l,spanClasses:n}}const nt={class:"inline-block leading-3"},ot={class:"relative"},st=["checked","value"],at={name:"LuiSwitch",inheritAttrs:!1},rt=e.defineComponent({...at,props:{size:{type:String,default:"md"},rounded:{type:[Boolean,String],default:"full"},state:{type:[String,Boolean,null],default:null},description:{type:[String,null],default:null},value:{type:String,default:""},modelValue:{type:[Array,Boolean,void 0],default:void 0}},emits:["update:modelValue"],setup(t,{emit:l}){const n=t,o=e.useAttrs(),{inputClasses:r,spanClasses:c}=lt(e.toRefs(n)),{descriptionClasses:a}=R(e.toRefs(n),o),{handleVModel:d,isInputChecked:s}=H(n,o);function f(u){l("update:modelValue",d(u))}return(u,y)=>(e.openBlock(),e.createElementBlock("div",nt,[e.createElementVNode("div",ot,[e.createElementVNode("input",e.mergeProps({type:"checkbox",class:e.unref(r),checked:e.unref(s),value:t.value,onChange:f},u.$attrs),null,16,st),e.createElementVNode("span",{class:e.normalizeClass(e.unref(c))},null,2)]),t.description?(e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass(e.unref(a))},e.toDisplayString(t.description),3)):e.createCommentVNode("",!0)]))}});function it(t,l){const n=e.useSlots(),o=e.computed(()=>!!(t.stateIcon.value===!0&&t.state.value!==null||n.prepend)),r={position:"absolute",fontSize:{"text-xs":t.size.value==="xs","text-base":t.size.value==="sm","text-xl":t.size.value==="md"||t.size.value==="lg","text-2xl":t.size.value==="xl"}},c=e.computed(()=>{const d={peer:"peer",width:"w-full",textColor:"text-secondary-600 placeholder:text-secondary-400 disabled:placeholder:text-secondary-300 dark:text-secondary-300 dark:placeholder:text-secondary-600 dark:disabled:text-secondary-700",backgroundColor:"bg-secondary-50 disabled:bg-secondary-100 dark:bg-secondary-900 dark:disabled:secondary-800",outlineStyle:"outline-none",borderWidth:"border",borderStyle:"border-solid",cursor:"disabled:cursor-not-allowed",borderColor:{["border-secondary-200 focus:border-primary-500 disabled:border-secondary-200"]:t.state.value===null,["disabled:border-secondary-200 border-warning-500"]:t.state.value==="warning",["disabled:border-secondary-200 border-danger-500"]:t.state.value===!1,["disabled:border-secondary-200 border-success-500"]:t.state.value===!0},ringWidth:l.disabled!==void 0&&l.disabled===!0?"ring-0":t.state.value===null?"focus:ring-4":"ring-4",ringColor:{"focus:ring-primary-500/40":t.state.value===null,"ring-warning-500/40":t.state.value==="warning","ring-danger-500/40":t.state.value===!1,"ring-success-500/40":t.state.value===!0},borderRadius:{"rounded-md":t.rounded.value===!0},fontSize:{"text-xs":t.size.value==="xs","text-sm":t.size.value==="sm","text-base":t.size.value==="md","text-lg":t.size.value==="lg","text-xl":t.size.value==="xl"},padding:o.value?{"py-1 pl-1.5 pr-6":t.size.value==="xs","py-1.5 pl-2 pr-8":t.size.value==="sm","py-2 pl-2.5 pr-10":t.size.value==="md","py-2.5 pl-2.5 pr-10":t.size.value==="lg","py-3.5 pl-3 pr-12":t.size.value==="xl"}:{"py-1 px-1.5":t.size.value==="xs","py-1.5 px-2":t.size.value==="sm","py-2 px-2.5":t.size.value==="md","p-2.5":t.size.value==="lg","py-3.5 px-3":t.size.value==="xl"},resize:{resize:t.resize.value==!0,"resize-none":t.resize.value==!1,"resize-x":t.resize.value=="x","resize-y":t.resize.value=="y"}};return Object.values({...d})}),a=e.computed(()=>{const d={...r,top:t.size.value==="xl"||t.size.value==="lg"?"top-4":"top-3",right:{"right-2":t.size.value==="xs","right-2.5":t.size.value==="sm","right-3":t.size.value==="md"||t.size.value==="lg","right-4":t.size.value==="xl"},textColor:l.disabled!==void 0&&l.disabled===!0?"text-secondary-300":{"text-warning-500":t.state.value==="warning","text-danger-500":t.state.value===!1,"text-success-500":t.state.value===!0}};return Object.values({...d})});return{textareaClasses:c,stateIconClasses:a}}const dt={class:"relative"},ct=["width","height"],ut=[e.createElementVNode("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),e.createElementVNode("path",{d:"M6.455 19L2 22.5V4a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6.455zM4 18.385L5.763 17H20V5H4v13.385zM11 13h2v2h-2v-2zm0-6h2v5h-2V7z"},null,-1)],ft=["width","height"],mt=[e.createElementVNode("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),e.createElementVNode("path",{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm-1-5h2v2h-2v-2zm0-8h2v6h-2V7z"},null,-1)],ht=["width","height"],gt=[e.createElementVNode("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),e.createElementVNode("path",{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm-.997-4L6.76 11.757l1.414-1.414 2.829 2.829 5.656-5.657 1.415 1.414L11.003 16z"},null,-1)],bt=["width","height"],xt=[e.createElementVNode("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),e.createElementVNode("path",{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm4.891-11.477l-8.368 8.368a6.04 6.04 0 0 1-1.414-1.414l8.368-8.368a6.04 6.04 0 0 1 1.414 1.414z"},null,-1)],yt={name:"LuiTextarea",inheritAttrs:!1},zt=e.defineComponent({...yt,props:{size:{type:String,default:"md"},rounded:{type:[Boolean,String],default:"full"},state:{type:[String,Boolean,null],default:null},stateIcon:{type:[Boolean],default:null},description:{type:[String,null],default:null},resize:{type:[Boolean,String],default:!0},block:{type:Boolean,default:!1},modelValue:{type:[String],default:""}},emits:["update:modelValue"],setup(t,{emit:l}){const n=t,o=e.useAttrs(),{descriptionClasses:r}=R(e.toRefs(n),o),{textareaClasses:c,stateIconClasses:a}=it(e.toRefs(n),o);function d(u){l("update:modelValue",u.target.value)}const s=e.computed(()=>n.size==="xs"?"12":n.size==="sm"?"16":n.size==="xl"?"24":"20"),f=e.computed(()=>o.disabled!==void 0&&o.disabled===!0);return(u,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["inline-block leading-3",t.block?"w-full":"w-48"])},[e.createElementVNode("div",dt,[e.createElementVNode("textarea",e.mergeProps(u.$attrs,{class:e.unref(c),onInput:y[0]||(y[0]=b=>d(b))}),null,16),t.stateIcon&&t.state!==null&&!e.unref(f)?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(a))},[t.state==="warning"?(e.openBlock(),e.createElementBlock("svg",{key:0,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e.unref(s),height:e.unref(s),fill:"currentColor"},ut,8,ct)):e.createCommentVNode("",!0),t.state===!1?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e.unref(s),height:e.unref(s),fill:"currentColor"},mt,8,ft)):e.createCommentVNode("",!0),t.state===!0?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e.unref(s),height:e.unref(s),fill:"currentColor"},gt,8,ht)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),t.stateIcon&&e.unref(f)?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(a))},[(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e.unref(s),height:e.unref(s),fill:"currentColor"},xt,8,bt))],2)):e.createCommentVNode("",!0)]),t.description?(e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass([e.unref(r),""])},e.toDisplayString(t.description),3)):e.createCommentVNode("",!0)],2))}});k.LuiAvatar=te,k.LuiBadge=ne,k.LuiButton=q,k.LuiCheckbox=ye,k.LuiInput=Q,k.LuiMenuDropdown=Be,k.LuiMenuItem=$e,k.LuiOption=T,k.LuiRadio=Ge,k.LuiSelect=tt,k.LuiSwitch=rt,k.LuiTextarea=zt,Object.defineProperties(k,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
{
"name": "@lui-ui/lui-vue",
"version": "0.27.7",
"version": "0.27.8",
"scripts": {
"dev": "vite",
"build": "run-p type-check build-only",
"preview": "vite preview",
"test:unit": "vitest --environment jsdom --root src/",
"build-only": "vite build",
"type-check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
"safelist": "npx tailwindcss build",
"build": "vite build",
"preview": "vite preview",
"sb": "start-storybook -p 6006",
"pub": "yarn build && yarn safelist && yarn publish",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook"
},
"dependencies": {},
"peerDependencies": {

@@ -18,18 +23,40 @@ "tailwindcss": "^3.0.8",

"devDependencies": {
"@babel/core": "^7.16.7",
"@storybook/addon-actions": "^6.5.0-alpha.5",
"@storybook/addon-essentials": "^6.5.0-alpha.5",
"@storybook/addon-links": "^6.5.0-alpha.5",
"@storybook/vue3": "^6.5.0-alpha.5",
"@vitejs/plugin-vue": "^2.0.0",
"autoprefixer": "^10.4.0",
"babel-loader": "^8.2.3",
"postcss": "^8.4.5",
"@babel/core": "^7.19.6",
"@rushstack/eslint-patch": "^1.1.4",
"@storybook/addon-actions": "^6.5.13",
"@storybook/addon-essentials": "^6.5.13",
"@storybook/addon-interactions": "^6.5.13",
"@storybook/addon-links": "^6.5.13",
"@storybook/builder-vite": "^0.2.5",
"@storybook/testing-library": "^0.0.13",
"@storybook/vue3": "^6.5.13",
"@types/jsdom": "^20.0.0",
"@types/node": "^16.11.68",
"@vitejs/plugin-vue": "^3.1.2",
"@vue/eslint-config-prettier": "^7.0.0",
"@vue/eslint-config-typescript": "^11.0.0",
"@vue/test-utils": "^2.1.0",
"@vue/tsconfig": "^0.1.3",
"autoprefixer": "^10.4.13",
"babel-loader": "^8.2.5",
"classnames": "^2.3.2",
"eslint": "^8.22.0",
"eslint-plugin-storybook": "^0.6.6",
"eslint-plugin-vue": "^9.3.0",
"gh-pages": "^4.0.0",
"jsdom": "^20.0.1",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.18",
"prettier": "^2.7.1",
"remixicon": "^2.5.0",
"storybook-builder-vite": "^0.1.13",
"storybook-darkmode-vue": "^1.1.8",
"tailwind-safelist-generator": "^1.0.0",
"tailwindcss": "^3.0.8",
"vite": "^2.7.2",
"vue": "^3.2.26",
"vue-loader": "^16.8.3"
"tailwindcss": "^3.2.1",
"typescript": "~4.7.4",
"vite": "^3.1.8",
"vitest": "^0.24.3",
"vue": "^3.2.41",
"vue-docgen-api": "^4.54.2",
"vue-loader": "^16.8.3",
"vue-tsc": "^1.0.11"
},

@@ -53,3 +80,7 @@ "files": [

"keywords": [
"ui"
"ui",
"tailwind",
"lui",
"vue",
"components"
],

@@ -61,3 +92,3 @@ "author": "lui-ui",

},
"homepage": "https://github.com/LUI-UI/lui-vue#readme"
"homepage": "https://LUI-UI.github.io/lui-vue"
}

@@ -1,7 +0,52 @@

# Vue 3 + Vite
# lui-ui
This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
This template should help get you started developing with Vue 3 in Vite.
## Recommended IDE Setup
- [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar)
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
## Type Support for `.vue` Imports in TS
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
1. Disable the built-in TypeScript Extension
1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette
2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
## Customize configuration
See [Vite Configuration Reference](https://vitejs.dev/config/).
## Project Setup
```sh
npm install
```
### Compile and Hot-Reload for Development
```sh
npm run dev
```
### Type-Check, Compile and Minify for Production
```sh
npm run build
```
### Run Unit Tests with [Vitest](https://vitest.dev/)
```sh
npm run test:unit
```
### Lint with [ESLint](https://eslint.org/)
```sh
npm run lint
```

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc