@contentstudio/ui 0.2.21-rc.18 → 0.2.22-rc.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -5602,7 +5602,7 @@ const aS = {
5602
5602
  default:
5603
5603
  return "cstu-text-sm";
5604
5604
  }
5605
- }), D = h(() => Ae(b.value)), C = h(() => o.error !== void 0 && o.error !== "" || l.value), E = h(() => v.value === "unstyled" || !xe(q.value) && !C.value ? "" : C.value ? "cstu-border-red-500 hover:cstu-border-red-500 focus-within:cstu-border-red-500 focus-within:cstu-ring-1 focus-within:cstu-ring-red-500" : v.value === "default" || v.value === "outline" ? `cstu-border-${q.value}-500 hover:cstu-border-${q.value}-600 focus-within:cstu-border-${q.value}-500 focus-within:cstu-ring-1 focus-within:cstu-ring-${q.value}-500` : ""), Q = h(() => v.value === "unstyled" ? {} : xe(q.value) || C.value ? {} : v.value === "default" || v.value === "outline" ? {
5605
+ }), D = h(() => Ae(b.value)), C = h(() => o.error !== void 0 && o.error !== "" || l.value), E = h(() => v.value === "unstyled" || !xe(q.value) && !C.value ? "" : C.value ? "cstu-border-red-500 hover:cstu-border-red-500 focus-within:cstu-border-red-500 focus-within:cstu-ring-1 focus-within:cstu-ring-red-500" : v.value === "default" || v.value === "outline" ? `hover:cstu-border-${q.value}-600 focus-within:cstu-border-${q.value}-500 focus-within:cstu-ring-1 focus-within:cstu-ring-${q.value}-500` : ""), Q = h(() => v.value === "unstyled" ? {} : xe(q.value) || C.value ? {} : v.value === "default" || v.value === "outline" ? {
5606
5606
  "--border-color": q.value,
5607
5607
  "border-color": "var(--border-color)"
5608
5608
  } : v.value === "filled" ? {
@@ -9,7 +9,7 @@
9
9
  opacity: 0 !important;
10
10
  transition: opacity 0.15s linear;
11
11
  }
12
- `;document.head.appendChild(Tw);const OL=["id"],UL=["id","aria-labelledby"],ZL=e.createElementVNode("span",{tabindex:"0"},null,-1),WL=["aria-label"],GL=["id"],XL=["aria-label"],_L=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"cstu-size-6"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"})],-1),KL=[_L],QL={key:0},JL=e.createElementVNode("span",{tabindex:"0"},null,-1),YL=e.defineComponent({__name:"Modal",props:{id:{type:String,default:()=>`modal-${Date.now()}`},title:{type:String,default:""},modelValue:{type:Boolean,default:!1},size:{type:String,default:"md"},radius:{type:String,default:""},centered:{type:Boolean,default:!0},scrollable:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!1},hideHeader:{type:Boolean,default:!1},hideFooter:{type:Boolean,default:!1},hideHeaderClose:{type:Boolean,default:!1},titleSrOnly:{type:Boolean,default:!1},ariaLabel:{type:String,default:""},content:{type:String,default:""},okTitle:{type:String,default:"OK"},okVariant:{type:String,default:"filled"},okColor:{type:String,default:"primary"},okDisabled:{type:Boolean,default:!1},cancelTitle:{type:String,default:"Cancel"},cancelVariant:{type:String,default:"outline"},cancelColor:{type:String,default:"secondary"},cancelDisabled:{type:Boolean,default:!1},modalClass:{type:String,default:""},dialogClass:{type:String,default:""},contentClass:{type:String,default:""},headerClass:{type:String,default:""},bodyClass:{type:String,default:""},footerClass:{type:String,default:""},ariaLabelledby:{type:String,default:""},teleport:{type:Boolean,default:!0},backdrop:{type:Boolean,default:!0},backdropClass:{type:String,default:""},titleClass:{type:String,default:""},showHeaderDivider:{type:Boolean,default:!1},showFooterDivider:{type:Boolean,default:!1},showDividers:{type:Boolean,default:void 0},closeTitle:{type:String,default:"Close"},busy:{type:Boolean,default:!1},noCloseOnBackdrop:{type:Boolean,default:!1},noCloseOnEsc:{type:Boolean,default:!1},static:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},okOnly:{type:Boolean,default:!1},zIndex:{type:Number,default:1050},disableFocusTrap:{type:Boolean,default:!1},ignoreEnforceFocusSelector:{type:String,default:""},returnFocusOnClose:{type:Boolean,default:!1}},emits:["update:modelValue","show","shown","hide","hidden","ok","cancel","close"],setup(a,{expose:o,emit:c}){const n=a;class r{constructor(g,H={}){Ie(this,"type");Ie(this,"cancelable",!0);Ie(this,"target",null);Ie(this,"vueTarget",null);Ie(this,"defaultPrevented",!1);Ie(this,"componentId","");Ie(this,"trigger","programmatic");this.type=g,Object.assign(this,H)}preventDefault(){this.defaultPrevented=!0}}const l=e.ref(!1),i=e.ref(null),s=e.ref(null),d=e.ref(n.zIndex),u=e.ref(!1),k=e.ref(0),y=e.computed(()=>n.zIndex!==1050?n.zIndex:d.value);function h(){if(n.zIndex!==1050){d.value=n.zIndex;return}const q=document.querySelectorAll(".cstu-modal");let g=1050;q.forEach(H=>{const F=parseInt(window.getComputedStyle(H).zIndex,10);!isNaN(F)&&F>g&&(g=F)}),d.value=g+10}const p=e.computed(()=>n.fullscreen?"":v(n.radius));function v(q){const g={none:"",sm:"cstu-rounded-sm",md:"cstu-rounded-md",lg:"cstu-rounded-lg",xl:"cstu-rounded-xl",full:"cstu-rounded-full"};return g[q||n.size]||g.md}function b(){if(l.value)return;const q=new r("show",{trigger:"programmatic",target:null,vueTarget:null,componentId:n.id});c("show",q),!q.defaultPrevented&&(i.value=document.activeElement,l.value=!0,k.value++,h(),document.body.classList.add("cstu-modal-open"),c("update:modelValue",!0),e.nextTick(()=>{n.disableFocusTrap||A(),c("shown",q)}))}function m(q="programmatic"){if(!l.value)return;const g=new r("hide",{trigger:q,target:null,vueTarget:null,componentId:n.id});c("hide",g),!g.defaultPrevented&&(l.value=!1,u.value=!1,document.body.classList.remove("cstu-modal-open"),c("update:modelValue",!1),e.nextTick(()=>{n.returnFocusOnClose&&D(i.value),c("hidden",g)}))}function w(q){q&&(i.value=typeof q=="string"?document.querySelector(q):q),l.value?m():b()}function f(q){q==="ok"?c("ok"):q==="cancel"&&c("cancel"),m(q)}function L(q){const g=q.target,H=g.closest(".cstu-dropdown-menu"),F=g.tagName&&["input","select","textarea","button"].includes(g.tagName.toLowerCase()),O=g.closest(".cstu-modal-content");H||F||O&&g!==q.currentTarget||!n.noCloseOnBackdrop&&g===q.currentTarget&&m("backdrop")}function C(q){q.key==="Escape"&&l.value&&!n.noCloseOnEsc&&!n.busy&&m("esc")}function A(){e.nextTick(()=>{if(!s.value)return;const q=s.value,g=$(q);g.length>0&&g[0].focus()})}function D(q){if(q&&l.value===!1)try{q.focus()}catch{}}function S(q){if(n.disableFocusTrap||!s.value||!l.value)return;const g=q.target,H=s.value;if(n.ignoreEnforceFocusSelector&&n.ignoreEnforceFocusSelector.trim()!==""){const O=n.ignoreEnforceFocusSelector.split(",").map(R=>R.trim()).filter(R=>R.length>0);for(const R of O)if(g.closest(R))return}const F=!!g.closest(".cstu-modal-content");if(H!==g&&!H.contains(g)&&!F){if(u.value)return;u.value=!0;try{const O=$(H);O.length>0?O[0].focus():H.focus()}finally{setTimeout(()=>{u.value=!1},0)}}}function $(q){return Array.from(q.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'))}return e.watch(()=>n.modelValue,q=>{q!==l.value&&(q?b():m())}),e.watch(()=>n.id,()=>{hw(n.id),uw(n.id,{show:b,hide:m,toggle:w})}),e.onMounted(()=>{uw(n.id,{show:b,hide:m,toggle:w}),document.addEventListener("keydown",C),document.addEventListener("focusin",S),n.modelValue&&(b(),l.value&&e.nextTick(()=>{setTimeout(()=>{const q=document.getElementById(n.id);let g=null;q&&q.parentNode&&(g=q.parentNode.querySelector(".cstu-modal-backdrop")),q&&window.getComputedStyle(q).display==="none"&&(q.style.display="block"),g&&window.getComputedStyle(g).display==="none"&&(g.style.display="block")},50)}))}),e.onBeforeUnmount(()=>{hw(n.id),document.removeEventListener("keydown",C),document.removeEventListener("focusin",S),l.value&&(l.value=!1,c("update:modelValue",!1))}),o({hide:m,show:b,close:f,toggle:w}),(q,g)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body",disabled:n.static||n.teleport===!1},[e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[l.value&&a.backdrop!==!1?(e.openBlock(),e.createElementBlock("div",{key:0,id:`${n.id}-backdrop`,class:e.normalizeClass(["cstu-modal-backdrop",a.backdropClass]),style:e.normalizeStyle({zIndex:e.unref(y)-10})},null,14,OL)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:n.id,class:e.normalizeClass(["cstu-modal",[{"cstu-modal-static":n.static,"cstu-modal-scrollable":n.scrollable},n.modalClass]]),tabindex:"-1",role:"dialog","aria-modal":"true",style:e.normalizeStyle({zIndex:e.unref(y)}),"aria-labelledby":!a.hideHeader&&a.title?`modal-title-${n.id}`:void 0,onClick:L},[e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-dialog",a.dialogClass,{"cstu-modal-fullscreen":a.fullscreen,"cstu-modal-dialog-centered":a.centered&&!a.fullscreen,"cstu-modal-dialog-scrollable":a.scrollable,[`cstu-modal-${a.size}`]:a.size&&!a.fullscreen}]),onClick:g[4]||(g[4]=H=>H.target===H.currentTarget&&H.stopPropagation())},[ZL,e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-content",a.contentClass,{"cstu-modal-content-fullscreen":a.fullscreen},e.unref(p)]),tabindex:"-1",ref_key:"modalElement",ref:s,"aria-label":a.ariaLabel,onClick:g[3]||(g[3]=H=>H.target===H.currentTarget&&H.stopPropagation())},[a.hideHeader?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("header",{key:0,class:e.normalizeClass(["cstu-modal-header",a.headerClass,{"show-divider":a.showHeaderDivider||a.showDividers}])},[e.renderSlot(q.$slots,"modal-header",{},()=>[e.renderSlot(q.$slots,"modal-title",{},()=>[e.createElementVNode("h5",{id:`modal-title-${n.id}`,class:e.normalizeClass([n.titleClass||"cstu-modal-title",{"sr-only":a.titleSrOnly}])},e.toDisplayString(a.title),11,GL)]),a.hideHeaderClose?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,type:"button","aria-label":a.closeTitle,class:"cstu-close cstu-self-baseline",onClick:g[0]||(g[0]=H=>f("headerClose"))},KL,8,XL))])],2)),e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-body",a.bodyClass,{"cstu-modal-body-scrollable":a.scrollable}])},[e.renderSlot(q.$slots,"default",{},()=>[a.content?(e.openBlock(),e.createElementBlock("div",QL,e.toDisplayString(a.content),1)):e.createCommentVNode("",!0)])],2),a.hideFooter?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("footer",{key:1,class:e.normalizeClass(["cstu-modal-footer",a.footerClass,{"show-divider":a.showFooterDivider||a.showDividers}])},[e.renderSlot(q.$slots,"modal-footer",{},()=>[a.okOnly?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(_,{key:0,variant:a.cancelVariant,color:a.cancelColor,disabled:a.cancelDisabled||a.busy,onClick:g[1]||(g[1]=H=>f("cancel"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.cancelTitle),1)]),_:1},8,["variant","color","disabled"])),e.createVNode(_,{variant:a.okVariant,color:a.okColor,disabled:a.okDisabled||a.busy,loading:a.busy,onClick:g[2]||(g[2]=H=>f("ok"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.okTitle),1)]),_:1},8,["variant","color","disabled","loading"])])],2))],10,WL),JL],2)],14,UL)):e.createCommentVNode("",!0)]),_:3})],8,["disabled"]))}});const eI={mounted(a,o){const c=typeof o.value=="string"?o.value:Object.keys(o.modifiers)[0];if(!c){console.warn("v-cstu-modal directive requires a modal ID");return}a.addEventListener("click",()=>{dw.show(c)}),a.tagName!=="BUTTON"&&(a.setAttribute("role","button"),a.addEventListener("keydown",n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),dw.show(c))}),a.hasAttribute("tabindex")||a.setAttribute("tabindex","0"))}},tI={install:a=>{a.directive("cstu-modal",eI)}},aI=["primary","secondary","success","warning","info"];function Dw(a,o=aI){if(!a||!o||o.length===0)return"primary";let c=0;for(let r=0;r<a.length;r+=1)c=a.charCodeAt(r)+((c<<5)-c);const n=Math.abs(c)%o.length;return o[n]}function Fw(a){return!a||typeof a!="string"?"":a.trim().split(" ").slice(0,2).map(o=>o.charAt(0).toUpperCase()).join("")}const oI=["src","alt"],cI=["title"],nI={key:1,"data-avatar-placeholder-icon":"true",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},rI=e.createElementVNode("path",{d:"M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z",fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"},null,-1),lI=[rI],$w=e.defineComponent({__name:"Avatar",props:{size:{default:"md"},radius:{default:"full"},color:{default:"primary"},gradient:null,src:{default:null},alt:null,imageProps:null,children:null,autoContrast:{type:Boolean,default:!0},name:null,allowedInitialsColors:null,variant:{default:"light"},component:{default:"div"},hover:{type:Boolean,default:!1},customClasses:{default:""}},setup(a){const o=a,c=e.ref(!o.src);e.watch(()=>o.src,y=>{c.value=!y},{immediate:!0});const n=y=>y?["primary","secondary","success","warning","danger","info","dark","light","initials"].includes(y):!0,r=e.computed(()=>o.name?Fw(o.name):""),l=e.computed(()=>{const y={sm:"w-5 h-5 text-xs",md:"w-6 h-6 text-xs",lg:"w-[30px] h-[30px] text-sm",xl:"w-[32px] h-[32px] text-sm","2xl":"w-[34px] h-[34px] text-base","3xl":"w-[36px] h-[36px] text-base","4xl":"w-[38px] h-[38px] text-lg","5xl":"w-[52px] h-[52px] text-xl"};return typeof o.size=="string"?y[o.size]||y.md:typeof o.size=="number"?`w-[${o.size}px] h-[${o.size}px]`:y.md}),i=e.computed(()=>re(o.radius)),s=e.computed(()=>{if(o.src&&!c.value||!n(o.color)&&o.color!=="initials")return"";if(o.color==="initials"&&o.name){const v=Dw(o.name,o.allowedInitialsColors||["primary","secondary","success","warning","info"]);return v?U(v,"filled",{}):U("primary","filled",{})}const y=o.variant==="transparent"?"default":o.variant==="gradient"?"filled":o.variant,h=o.color&&o.color!=="initials"?o.color:"primary",p=U(h,y,{});return o.variant==="transparent"?"bg-transparent":p}),d=e.computed(()=>!n(o.color)&&o.color!=="initials"?"":o.variant==="transparent"?"bg-transparent":o.variant==="gradient"&&o.gradient?`bg-gradient-to-r from-${o.gradient.from} to-${o.gradient.to}`:Ex(o.variant)),u=e.computed(()=>{if(o.src&&!c.value||n(o.color)||o.color==="initials")return{};const y={};switch(o.variant){case"filled":y.backgroundColor=o.color,o.autoContrast&&(y.color="white");break;case"light":y.backgroundColor=`${o.color}20`,y.color=o.color;break;case"outline":y.backgroundColor="transparent",y.color=o.color,y.border=`1px solid ${o.color}`;break;case"transparent":y.backgroundColor="transparent",y.color=o.color;break}return y}),k=y=>{var h;if((h=o.imageProps)!=null&&h.onError){o.imageProps.onError(y);return}c.value=!0};return(y,h)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.component||"div"),{class:e.normalizeClass(["avatar",e.unref(l),e.unref(i),!c.value&&a.src?"":e.unref(s),!c.value&&a.src?"":e.unref(d),{"avatar--with-image":!c.value&&a.src},{"hover:opacity-80 transition-opacity":a.hover},a.customClasses]),style:e.normalizeStyle(e.unref(u))},{default:e.withCtx(()=>[!c.value&&a.src?(e.openBlock(),e.createElementBlock("img",e.mergeProps({key:0,class:"avatar__image",src:a.src,alt:a.alt},a.imageProps,{onError:k}),null,16,oI)):(e.openBlock(),e.createElementBlock("span",{key:1,class:"avatar__placeholder",title:a.alt},[e.renderSlot(y.$slots,"default",{},()=>[a.name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(e.unref(r)),1)],64)):(e.openBlock(),e.createElementBlock("svg",nI,lI))])],8,cI))]),_:3},8,["class","style"]))}});const Nw=e.defineComponent({__name:"AvatarGroup",props:{spacing:{default:"sm"},gap:{default:"none"},outlineWidth:{default:"normal"},outlineColor:{default:"white"},outlineOffset:{default:"small"},customClasses:{default:""},max:null,hover:{type:Boolean,default:!1}},setup(a){const o=a,c=e.computed(()=>{if(typeof o.spacing=="number")return`${o.spacing}px`;const u={xs:"-1rem",sm:"-0.75rem",md:"-0.5rem",lg:"-0.25rem",xl:"0"};return u[o.spacing]||u.sm}),n=e.computed(()=>{if(typeof o.gap=="number")return`${o.gap}px`;if(typeof o.gap=="string"&&!isNaN(parseFloat(o.gap)))return o.gap;const u={none:"0",xs:"0.25rem",sm:"0.5rem",md:"0.75rem",lg:"1rem"};return u[o.gap]||u.none}),r=e.computed(()=>{if(typeof o.outlineWidth=="number")return`${o.outlineWidth}px`;if(typeof o.outlineWidth=="string"&&!isNaN(parseFloat(o.outlineWidth)))return o.outlineWidth;const u={none:"0",thin:"1px",normal:"2px",medium:"3px",thick:"4px"};return u[o.outlineWidth]||u.normal}),l=e.computed(()=>{if(typeof o.outlineOffset=="number")return`${o.outlineOffset}px`;if(typeof o.outlineOffset=="string"&&!isNaN(parseFloat(o.outlineOffset)))return o.outlineOffset;const u={none:"0",inset:"-2px",small:"1px",medium:"2px",large:"3px"};return u[o.outlineOffset]||u.small}),i=e.computed(()=>typeof o.outlineColor=="string"&&["primary","secondary","success","danger","warning","info","dark","light"].includes(o.outlineColor)?`outline-${o.outlineColor}`:""),s=e.computed(()=>typeof o.outlineColor=="string"&&["primary","secondary","success","danger","warning","info","dark","light"].includes(o.outlineColor)?"var(--color-"+o.outlineColor+")":o.outlineColor),d=e.computed(()=>({"--avatar-group-spacing":c.value,"--avatar-group-gap":n.value,"--avatar-group-outline-width":r.value,"--avatar-group-outline-color":s.value,"--avatar-group-outline-offset":l.value}));return(u,k)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["avatar-group",a.customClasses,e.unref(i),{"avatar-group--hover":a.hover}]),style:e.normalizeStyle(e.unref(d))},[e.renderSlot(u.$slots,"default")],6))}});$w.Group=Nw;const hx=e.defineComponent({__name:"Tabs",props:{value:{type:String,default:void 0},defaultValue:{type:String,default:"first"},orientation:{type:String,default:"horizontal"},placement:{type:String,default:void 0},variant:{type:String,default:"text"}},emits:["change"],setup(a,{emit:o}){const c=a,n=e.computed(()=>c.placement?c.placement:c.orientation==="horizontal"?"top":"left"),r=e.computed(()=>c.orientation),l=e.computed(()=>c.variant),i=e.ref(c.value!==void 0?c.value:c.defaultValue);e.watch(()=>c.value,d=>{d!==void 0&&(i.value=d)});const s=d=>{c.value!==void 0?o("change",d):i.value=d};return e.provide("activeTab",i),e.provide("setActiveTab",s),e.provide("tabsOrientation",r),e.provide("tabsPlacement",n),(d,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-tabs",`cstu-tabs-${e.unref(r)}`,`cstu-tabs-placement-${e.unref(n)}`,`cstu-tabs-variant-${e.unref(l)}`])},[e.renderSlot(d.$slots,"default")],2))}});const Rw=e.defineComponent({__name:"TabsList",props:{justify:{type:String,default:"flex-start"},divider:{type:Boolean,default:!1},scrollable:{type:Boolean,default:!1}},setup(a){const o=a,c=e.inject("tabsOrientation",e.ref("horizontal")),n=e.inject("tabsPlacement",e.ref("top")),r=e.computed(()=>["tabs-list",`tabs-list-${c.value}`,`tabs-list-placement-${n.value}`,o.divider?"tabs-list-with-divider":"",o.scrollable?"tabs-list-scrollable":""]),l=s=>{if(["space-between","space-around","space-evenly"].includes(s))return s;switch(s){case"flex-start":return"flex-start";case"flex-end":return"flex-end";case"center":return"center";default:return"flex-start"}},i=e.computed(()=>c.value==="horizontal"?{justifyContent:o.justify}:{justifyContent:l(o.justify)});return(s,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(r)),style:e.normalizeStyle(e.unref(i))},[e.renderSlot(s.$slots,"default")],6))}});const Ow=e.defineComponent({__name:"TabsTab",props:{value:{type:String,required:!0},color:{type:String,default:"primary"},variant:{type:String,default:"text"},size:{type:String,default:"md"},radius:{type:String,default:"md"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1}},setup(a){const o=a,c=e.inject("activeTab",e.ref("")),n=e.inject("setActiveTab",()=>{}),r=e.inject("tabsOrientation",e.ref("horizontal")),l=e.inject("tabsPlacement",e.ref("top")),i=e.computed(()=>c.value),s=e.computed(()=>r.value),d=e.computed(()=>l.value),u=e.computed(()=>i.value===o.value),k=e.computed(()=>s.value==="vertical"),y=e.computed(()=>o.fullWidth&&s.value==="horizontal"),h=()=>{!o.disabled&&!o.loading&&n(o.value)};return(p,v)=>(e.openBlock(),e.createBlock(e.unref(_),{class:e.normalizeClass(["tabs-tab",e.unref(u)?"tabs-tab-active":"tabs-tab-inactive",`tabs-tab-${o.variant}`,o.color?`tabs-tab-color-${o.color}`:"",`tabs-tab-orientation-${e.unref(s)}`,`tabs-tab-placement-${e.unref(d)}`,{"tabs-tab-full-width":e.unref(y)}]),disabled:o.disabled,loading:o.loading,color:e.unref(u)?o.color:"light",variant:e.unref(u)?o.variant:"subtle",size:o.size,radius:o.variant==="text"?"none":o.radius,"full-width":e.unref(k),onClick:h},e.createSlots({default:e.withCtx(()=>[e.renderSlot(p.$slots,"default")]),_:2},[p.$slots.leftSection?{name:"leftSection",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"leftSection")]),key:"0"}:void 0,p.$slots.rightSection?{name:"rightSection",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"rightSection")]),key:"1"}:void 0]),1032,["class","disabled","loading","color","variant","size","radius","full-width"]))}});const Uw=e.defineComponent({__name:"TabsPanel",props:{value:{type:String,required:!0},KeepAlive:{type:Boolean,default:!1}},setup(a){const o=a,c=e.inject("activeTab",e.ref("")),n=e.inject("tabsOrientation",e.ref("horizontal")),r=e.inject("tabsPlacement",e.ref("top")),l=e.computed(()=>c.value===o.value),i=e.computed(()=>["tabs-panel",l.value?"tabs-panel-active":"tabs-panel-inactive",`tabs-panel-${n.value}`,`tabs-panel-placement-${r.value}`]);return(s,d)=>a.KeepAlive||e.unref(l)?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(i))},[e.renderSlot(s.$slots,"default")],2)),[[e.vShow,e.unref(l)]]):e.createCommentVNode("",!0)}});hx.List=Rw;hx.Tab=Ow;hx.Panel=Uw;const sI=e.createElementVNode("span",{class:"cstu-sr-only"},"First page",-1),iI=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"cstu-h-4 cstu-w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("polyline",{points:"11 17 6 12 11 7"}),e.createElementVNode("polyline",{points:"18 17 13 12 18 7"})],-1),dI=e.createElementVNode("span",{class:"cstu-sr-only"},"Previous page",-1),uI=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"cstu-h-4 cstu-w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("polyline",{points:"15 18 9 12 15 6"})],-1),hI={key:2,class:"cstu-flex cstu-items-center cstu-gap-2"},yI=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"cstu-h-4 cstu-w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("circle",{cx:"12",cy:"12",r:"1"}),e.createElementVNode("circle",{cx:"19",cy:"12",r:"1"}),e.createElementVNode("circle",{cx:"5",cy:"12",r:"1"})],-1),pI=[yI],kI=e.createElementVNode("span",{class:"cstu-sr-only"},"Next page",-1),mI=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"cstu-h-4 cstu-w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("polyline",{points:"9 18 15 12 9 6"})],-1),fI=e.createElementVNode("span",{class:"cstu-sr-only"},"Last page",-1),vI=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"cstu-h-4 cstu-w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("polyline",{points:"13 17 18 12 13 7"}),e.createElementVNode("polyline",{points:"6 17 11 12 6 7"})],-1),gI=e.defineComponent({__name:"Pagination",props:{modelValue:{default:1},total:null,siblings:{default:1},boundaries:{default:1},variant:{default:"filled"},color:{default:"primary"},size:{default:"md"},disabled:{type:Boolean,default:!1},withControls:{type:Boolean,default:!0},withEdges:{type:Boolean,default:!1},withPages:{type:Boolean,default:!0},class:null},emits:["update:modelValue"],setup(a,{emit:o}){const c=a,n=e.ref(c.modelValue);e.watch(()=>c.modelValue,h=>{n.value=h});const r=e.computed(()=>n.value===1),l=e.computed(()=>n.value===c.total),i=e.computed(()=>{switch(c.size){case"xs":return"cstu-!h-[30px] cstu-!w-[30px] cstu-min-w-[30px] !cstu-p-0";case"sm":return"cstu-!h-[36px] cstu-!w-[36px] cstu-min-w-[36px] !cstu-p-0";case"md":return"cstu-!h-[40px] cstu-!w-[40px] cstu-min-w-[40px] !cstu-p-0";case"lg":return"cstu-!h-[45px] cstu-!w-[45px] cstu-min-w-[45px] !cstu-p-0";case"xl":return"cstu-!h-[50px] cstu-!w-[50px] cstu-min-w-[50px] !cstu-p-0";default:return"cstu-!h-[40px] cstu-!w-[40px] cstu-min-w-[40px] !cstu-p-0"}}),s=e.computed(()=>["cstu-flex cstu-items-center cstu-justify-center",k(c.size)]),d=e.computed(()=>{const h=[],p=c.total;if(c.siblings*2+3+c.boundaries*2>=p)return Array.from({length:p},(C,A)=>A+1);const b=Math.max(n.value-c.siblings,c.boundaries+1),m=Math.min(n.value+c.siblings,p-c.boundaries),w=b>c.boundaries+2,f=m<p-(c.boundaries+1),L=new Set;for(let C=1;C<=c.boundaries;C++)h.push(C),L.add(C);if(w)h.push("dots");else if(!w&&b>c.boundaries)for(let C=c.boundaries+1;C<b;C++)L.has(C)||(h.push(C),L.add(C));for(let C=b;C<=m;C++)L.has(C)||(h.push(C),L.add(C));if(f)h.push("dots");else if(!f&&m<p-c.boundaries)for(let C=m+1;C<p-c.boundaries+1;C++)L.has(C)||(h.push(C),L.add(C));for(let C=p-c.boundaries+1;C<=p;C++)L.has(C)||(h.push(C),L.add(C));return h}),u=h=>{h<1||h>c.total||c.disabled||(n.value=h,o("update:modelValue",h))};function k(h){const p={xs:"cstu-h-6 cstu-w-6 cstu-text-xs",sm:"cstu-h-7 cstu-w-7 cstu-text-sm",md:"cstu-h-8 cstu-w-8 cstu-text-sm",lg:"cstu-h-9 cstu-w-9 cstu-text-base",xl:"cstu-h-10 cstu-w-10 cstu-text-base"};return p[h]||p.md}const y=e.computed(()=>c.variant==="filled"?"subtle":"bordered-transparent");return(h,p)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-flex cstu-items-center cstu-gap-2",[c.class]])},[c.withEdges?(e.openBlock(),e.createBlock(_,{key:0,variant:e.unref(y),color:"light",size:c.size,disabled:e.unref(r)||c.disabled,onClick:p[0]||(p[0]=v=>u(1)),"aria-label":"Go to first page",class:e.normalizeClass(e.unref(i))},{default:e.withCtx(()=>[sI,iI]),_:1},8,["variant","size","disabled","class"])):e.createCommentVNode("",!0),c.withControls?(e.openBlock(),e.createBlock(_,{key:1,variant:e.unref(y),color:"light",size:c.size,disabled:e.unref(r)||c.disabled,onClick:p[1]||(p[1]=v=>u(n.value-1)),"aria-label":"Go to previous page",class:e.normalizeClass(e.unref(i))},{default:e.withCtx(()=>[dI,uI]),_:1},8,["variant","size","disabled","class"])):e.createCommentVNode("",!0),c.withPages?(e.openBlock(),e.createElementBlock("div",hI,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),(v,b)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:b},[v!=="dots"?(e.openBlock(),e.createBlock(_,{key:0,variant:v===n.value?"filled":e.unref(y),color:v===n.value?c.color:"light",size:c.size,disabled:c.disabled,onClick:m=>u(Number(v)),"aria-current":v===n.value?"page":void 0,"aria-label":`Page ${v}`,class:e.normalizeClass(e.unref(i))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(v),1)]),_:2},1032,["variant","color","size","disabled","onClick","aria-current","aria-label","class"])):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["pagination-dots",[e.unref(s),e.unref(i)]])},pI,2))],64))),128))])):e.createCommentVNode("",!0),c.withControls?(e.openBlock(),e.createBlock(_,{key:3,variant:e.unref(y),color:"light",size:c.size,disabled:e.unref(l)||c.disabled,onClick:p[2]||(p[2]=v=>u(n.value+1)),"aria-label":"Go to next page",class:e.normalizeClass(e.unref(i))},{default:e.withCtx(()=>[kI,mI]),_:1},8,["variant","size","disabled","class"])):e.createCommentVNode("",!0),c.withEdges?(e.openBlock(),e.createBlock(_,{key:4,variant:e.unref(y),color:"light",size:c.size,disabled:e.unref(l)||c.disabled,onClick:p[3]||(p[3]=v=>u(c.total)),"aria-label":"Go to last page",class:e.normalizeClass(e.unref(i))},{default:e.withCtx(()=>[fI,vI]),_:1},8,["variant","size","disabled","class"])):e.createCommentVNode("",!0)],2))}}),Qx={mounted(a,o){a._clickOutside=c=>{const n=c.target;if(!(a===n||a.contains(n))){const r=c.target,l=r.tagName&&r.tagName.toLowerCase()==="input",i=r.closest(".cstu-dropdown-menu");!l&&!i&&o.value(c)}},document.addEventListener("click",a._clickOutside,!0),document.addEventListener("touchstart",a._clickOutside,!0)},unmounted(a){a._clickOutside&&(document.removeEventListener("click",a._clickOutside,!0),document.removeEventListener("touchstart",a._clickOutside,!0))}},MI=["id","aria-labelledby","aria-modal","onKeydown"],xI={class:"cstu-popover-inner"},wI=["id"],bI=e.defineComponent({__name:"Popover",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},placement:{default:"bottom"},variant:{default:"shadow"},color:{default:"primary"},size:{default:"md"},radius:{default:"md"},hideHeader:{type:Boolean,default:!1},showCloseIcon:{type:Boolean,default:!0},hideFooter:{type:Boolean,default:!0},closeOnClickOutside:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0},closeOnClick:{type:Boolean,default:!1},title:{default:""},content:{default:""},zIndex:{default:1e3},trigger:{default:"click"},backdrop:{type:[Boolean,String],default:!1},offsetDistance:{default:8},disabled:{type:Boolean,default:!1},popoverClass:{default:""},headerClass:{default:""},bodyClass:{default:""},footerClass:{default:""},trapFocus:{type:Boolean,default:!1},id:{default:()=>`popover-${Date.now()}`},shadow:{default:"md"},width:null},emits:["update:open","open","close"],setup(a,{emit:o}){const c=a,n=e.ref(c.defaultOpen),r=e.ref(null),l=e.ref(null),i=e.ref(null),s=e.ref(null),d=e.ref(c.zIndex);c.open!==void 0&&(n.value=c.open);const u=e.computed(()=>{if(c.placement!=="auto")return c.placement}),k=e.computed(()=>{const M=[F2(c.offsetDistance)];return i.value&&M.push(Hw({element:i})),c.placement==="auto"?M.push(Xx({padding:8})):M.push(N2({fallbackPlacements:["top","bottom","left","right"],padding:8})),M.push($2({padding:8})),M}),{floatingStyles:y,update:h}=R2(r,l,{placement:u,middleware:k,whileElementsMounted:Gx}),p=M=>{c.disabled||(c.trigger==="click"||c.trigger==="manual")&&D()},v=()=>{c.disabled||c.trigger==="hover"&&C()},b=()=>{c.disabled||c.trigger==="hover"&&setTimeout(()=>{A("hover")},100)},m=M=>{c.closeOnClick&&A("popoverClick"),M.stopPropagation()},w=M=>{c.closeOnClickOutside&&n.value&&l.value&&!l.value.contains(M.target)&&r.value&&!r.value.contains(M.target)&&A("clickAway")},f=()=>{c.closeOnClickOutside&&A("backdrop")},L=M=>{c.closeOnEscape&&M.key==="Escape"&&(M.preventDefault(),A("escape"))},C=()=>{c.disabled||n.value||(s.value=document.activeElement,n.value=!0,e.nextTick(()=>{h(),c.trapFocus&&S()}),o("open"),o("update:open",!0))},A=(M="programmatic")=>{n.value&&(n.value=!1,c.trapFocus&&$(s.value),o("close",M),o("update:open",!1))},D=()=>{n.value?A():C()},S=()=>{if(!l.value)return;const M=q(l.value);M.length>0?M[0].focus():l.value.focus()},$=M=>{M&&typeof M.focus=="function"&&M.focus()},q=M=>Array.from(M.querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')).filter(P=>!P.hasAttribute("disabled")&&!P.getAttribute("aria-hidden")),g=M=>{if(!n.value||!c.trapFocus||!l.value)return;const P=M.target;l.value.contains(P)||(M.preventDefault(),S())};e.watch(()=>c.open,M=>{M!==n.value&&(M?C():A())}),e.watch(r,M=>{M&&h()}),e.onMounted(()=>{document.addEventListener("keydown",L),c.trapFocus&&document.addEventListener("focusin",g)}),e.onBeforeUnmount(()=>{document.removeEventListener("keydown",L),c.trapFocus&&document.removeEventListener("focusin",g)});const H=e.computed(()=>[re(c.radius),!c.variant||c.variant==="shadow"?c.shadow?`cstu-shadow-${c.shadow}`:"cstu-shadow-md":"",c.popoverClass]),F=e.computed(()=>{const M=[...H.value.filter(Boolean)];let P=!1;const N=c.color;if(N&&te(N)&&c.variant==="color"){const G=U(N,"filled",{disabled:c.disabled});typeof G=="string"&&G.trim()&&(M.push(...G.split(" ").filter(Boolean)),P=!0)}return P||(M.push("cstu-bg-white"),c.variant==="outline"&&M.push("cstu-border","cstu-border-gray-300"),M.push("cstu-text-gray-700")),M.filter(Boolean).map(G=>typeof G=="string"?G:Object.keys(G).filter(Ve=>G[Ve]).join(" ")).join(" ")}),O=e.computed(()=>{const M={width:typeof c.width=="number"?`${c.width}px`:c.width},P=c.color;if(P&&!te(P)&&c.variant==="color"){M.backgroundColor=P;const N=R(P);M.color=N>128?"#000000":"#FFFFFF"}return{...y.value,...M}});e.computed(()=>{const M={backgroundColor:"white"},P=c.color;return c.variant==="color"&&P?te(P)?(M.borderWidth="1px",M.borderStyle="solid",M.borderColor=`var(--${P}-500)`):M.backgroundColor=P:c.variant==="outline"&&(M.borderWidth="1px",M.borderStyle="solid",M.borderColor="#e2e8f0"),M});function R(M){if(M.startsWith("#"))try{const P=parseInt(M.substring(1,3),16),N=parseInt(M.substring(3,5),16),G=parseInt(M.substring(5,7),16);return(P*299+N*587+G*114)/1e3}catch{return 128}else if(M.startsWith("rgb"))try{const P=M.match(/\d+/g);if(P&&P.length>=3){const N=parseInt(P[0],10),G=parseInt(P[1],10),Ve=parseInt(P[2],10);return(N*299+G*587+Ve*114)/1e3}}catch{return 128}return 128}const ae=e.computed(()=>{const M=c.color,P=!(M&&te(M)),N=c.variant==="outline";return["cstu-popover-header",{xs:"cstu-px-2 cstu-py-1.5",sm:"cstu-px-2.5 cstu-py-1.5",md:"cstu-px-3 cstu-py-2",lg:"cstu-px-3.5 cstu-py-2.5",xl:"cstu-px-4 cstu-py-3"}[c.size||"md"],m2(c.size||"md"),"cstu-flex cstu-items-center cstu-justify-between",N||P?"cstu-border-b cstu-border-gray-200 dark:cstu-border-gray-700":"",c.headerClass].filter(Boolean).join(" ")}),J=e.computed(()=>["cstu-popover-body",{xs:"cstu-p-2",sm:"cstu-p-2.5",md:"cstu-p-3",lg:"cstu-p-3.5",xl:"cstu-p-4"}[c.size||"md"],m2(c.size||"sm"),c.bodyClass].filter(Boolean).join(" ")),W=e.computed(()=>{const M=c.color,P=!(M&&te(M)),N=c.variant==="outline";return["cstu-popover-footer",{xs:"cstu-px-2 cstu-py-1.5",sm:"cstu-px-2.5 cstu-py-1.5",md:"cstu-px-3 cstu-py-2",lg:"cstu-px-3.5 cstu-py-2.5",xl:"cstu-px-4 cstu-py-3"}[c.size||"md"],N||P?"cstu-border-t cstu-border-gray-200 dark:cstu-border-gray-700":"","cstu-flex cstu-justify-end cstu-space-x-2",c.footerClass].filter(Boolean).join(" ")});return(M,P)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{ref_key:"triggerRef",ref:r,class:e.normalizeClass(["cstu-inline-block cstu-popover-trigger",{"cstu-cursor-not-allowed cstu-opacity-70":a.disabled}]),onClick:p,onMouseenter:v,onMouseleave:b},[e.renderSlot(M.$slots,"trigger")],34),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"fade",appear:""},{default:e.withCtx(()=>[n.value&&a.backdrop!==!1?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["cstu-popover-backdrop",{"cstu-bg-black/50":a.backdrop===!0,"cstu-bg-transparent":a.backdrop==="transparent"}]),style:e.normalizeStyle({zIndex:a.zIndex-10}),onClick:f},null,6)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{"enter-active-class":"cstu-transition cstu-ease-out cstu-duration-100","enter-from-class":"cstu-transform cstu-opacity-0 cstu-scale-95","enter-to-class":"cstu-transform cstu-opacity-100 cstu-scale-100","leave-active-class":"cstu-transition cstu-ease-in cstu-duration-75","leave-from-class":"cstu-transform cstu-opacity-100 cstu-scale-100","leave-to-class":"cstu-transform cstu-opacity-0 cstu-scale-95"},{default:e.withCtx(()=>[n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"cstu-popover-container",style:e.normalizeStyle({zIndex:d.value})},[e.withDirectives((e.openBlock(),e.createElementBlock("div",{ref_key:"popoverRef",ref:l,id:c.id,class:e.normalizeClass(e.unref(F)),style:e.normalizeStyle([e.unref(y),e.unref(O)]),role:"dialog","aria-labelledby":c.title?`${c.id}-title`:void 0,"aria-modal":c.trapFocus,tabindex:"-1",onClick:m,onKeydown:e.withKeys(L,["esc"])},[e.createElementVNode("div",xI,[c.hideHeader?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(ae))},[e.renderSlot(M.$slots,"header",{},()=>[e.createElementVNode("h3",{id:`${c.id}-title`,class:e.normalizeClass(["cstu-popover-title cstu-font-medium",e.unref(m2)(c.size||"md")])},e.toDisplayString(c.title),11,wI),c.showCloseIcon?(e.openBlock(),e.createBlock(_,{key:0,icon:"X",variant:"text",size:"xs",color:c.color&&e.unref(te)(c.color)?"white":"gray",class:"cstu-ml-auto","aria-label":"Close popover",onClick:P[0]||(P[0]=e.withModifiers(N=>A("headerClose"),["stop"]))},null,8,["color"])):e.createCommentVNode("",!0)])],2)),e.createElementVNode("div",{class:e.normalizeClass(e.unref(J))},[e.renderSlot(M.$slots,"default",{},()=>[a.content?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(m2)(c.size||"sm"))},e.toDisplayString(a.content),3)):e.createCommentVNode("",!0)])],2),c.hideFooter?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(W))},[e.renderSlot(M.$slots,"footer",{},()=>[e.createVNode(_,{size:"sm",variant:"subtle",onClick:P[1]||(P[1]=N=>A("cancel"))},{default:e.withCtx(()=>[e.createTextVNode(" Close ")]),_:1})])],2))])],46,MI)),[[e.unref(Qx),w]])],4)):e.createCommentVNode("",!0)]),_:3})]))],64))}});const CI=e.defineComponent({__name:"Breadcrumbs",props:{separator:{default:"/"},separatorMargin:{default:"xs"},size:{default:"md"},radius:{default:"md"},color:{default:"primary"},highlightActive:{type:Boolean,default:!0},class:null,separatorClass:null,activeClass:null},setup(a){const o=a,c=e.useSlots(),n=e.computed(()=>!!c.default),r=e.computed(()=>c.default?c.default():[]),l=y=>y===r.value.length-1,i=y=>y?["primary","secondary","success","warning","danger","info","dark","light"].includes(y):!0,s=y=>{if(!l(y)||!o.highlightActive)return"";if(i(o.color)){const h=Ce[o.color];if(h)return`cstu-text-${h.base}-${h.main}`}return""},d=y=>!l(y)||!o.highlightActive?{}:i(o.color)?{}:{color:o.color},u=e.computed(()=>{const y={xs:"text-xs",sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl"};return y[o.size]||y.md}),k=e.computed(()=>{const y={xs:"mx-1",sm:"mx-2",md:"mx-3",lg:"mx-4",xl:"mx-5"};return y[o.separatorMargin]||y.xs});return(y,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-breadcrumbs",o.class])},[e.unref(n)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(e.unref(r),(p,v)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:v},[e.createElementVNode("div",{class:e.normalizeClass(["cstu-breadcrumb-item",e.unref(u),l(v)?"cstu-breadcrumb-active":"cstu-breadcrumb-inactive",l(v)?o.activeClass:"",l(v)&&o.highlightActive?s(v):""]),style:e.normalizeStyle(d(v))},[e.renderSlot(y.$slots,`item-${v}`,{isActive:l(v)},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p)))])],6),l(v)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["cstu-breadcrumb-separator",e.unref(k),o.separatorClass])},[e.renderSlot(y.$slots,"separator",{},()=>[typeof o.separator=="string"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(o.separator),1)],64)):o.separator?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.separator),{key:1})):e.createCommentVNode("",!0)])],2))],64))),128)):e.renderSlot(y.$slots,"default",{key:0})],2))}});const LI={key:0,class:"cstu-flex cstu-justify-between cstu-items-center cstu-mb-1"},II=["for"],SI={key:0,class:"cstu-text-red-500 cstu-ml-1"},zI={key:0,class:"cstu-flex cstu-items-center cstu-justify-center cstu-w-[15px] cstu-h-[15px] cstu-mt-1"},qI=["id","value","placeholder","disabled","required","readonly","rows","maxlength"],BI={key:1,class:"cstu-flex cstu-items-center cstu-justify-center cstu-w-[15px] cstu-h-[15px] cstu-mt-1"},VI=e.defineComponent({__name:"Textarea",props:{id:null,modelValue:null,placeholder:null,disabled:{type:Boolean},readonly:{type:Boolean},label:null,labelProps:null,description:null,descriptionProps:null,error:null,errorProps:null,hasError:{type:Boolean},showBothErrorAndDescription:{type:Boolean},textareaProps:null,size:null,radius:null,variant:null,required:{type:Boolean},withAsterisk:{type:Boolean},rows:null,resize:null,fullWidth:{type:Boolean},color:null,class:null,inputClass:null,maxLength:null},emits:["update:modelValue","focus","blur","change"],setup(a,{expose:o,emit:c}){const n=a,r=`textarea-${Math.random().toString(36).substring(2,11)}`,l=e.ref(null),i=e.computed(()=>n.hasError??!1),s=e.computed(()=>n.disabled??!1),d=e.computed(()=>n.readonly??!1),u=e.computed(()=>n.required??!1),k=e.computed(()=>n.withAsterisk??!1),y=e.computed(()=>n.showBothErrorAndDescription??!1),h=e.computed(()=>n.size??"md"),p=e.computed(()=>n.variant??"default"),v=e.computed(()=>n.radius??"md"),b=e.computed(()=>n.color??"primary"),m=e.computed(()=>n.fullWidth??!1),w=e.computed(()=>n.inputClass??""),f=e.computed(()=>n.rows??3),L=e.computed(()=>n.resize??"none"),C={xs:{inputClass:`cstu-min-h-8 ${m.value?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-xs cstu-font-medium",descriptionSize:"cstu-text-xs"},sm:{inputClass:`cstu-min-h-9 ${m.value?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-sm cstu-font-medium",descriptionSize:"cstu-text-xs"},md:{inputClass:`cstu-min-h-10 ${m.value?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-sm cstu-font-medium",descriptionSize:"cstu-text-sm"},lg:{inputClass:`cstu-min-h-11 ${m.value?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-sm cstu-font-medium",descriptionSize:"cstu-text-sm"},xl:{inputClass:`cstu-min-h-12 ${m.value?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-base cstu-font-medium",descriptionSize:"cstu-text-sm"}},A=e.computed(()=>`${C[h.value].inputClass.split(" ")[0]} cstu-transition-all cstu-duration-300`),D=e.computed(()=>C[h.value].labelSize),S=e.computed(()=>C[h.value].descriptionSize),$=e.computed(()=>{switch(h.value){case"xs":return"cstu-text-xs";case"sm":return"cstu-text-sm";case"md":return"cstu-text-sm";case"lg":return"cstu-text-base";case"xl":return"cstu-text-base";default:return"cstu-text-sm"}}),q=e.computed(()=>re(v.value)),g=e.computed(()=>n.error!==void 0&&n.error!==""||i.value),H=e.computed(()=>p.value==="unstyled"||!te(b.value)&&!g.value?"":g.value?"cstu-border-red-500 hover:cstu-border-red-500 focus-within:cstu-border-red-500 focus-within:cstu-ring-1 focus-within:cstu-ring-red-500":p.value==="default"||p.value==="outline"?`cstu-border-${b.value}-500 hover:cstu-border-${b.value}-600 focus-within:cstu-border-${b.value}-500 focus-within:cstu-ring-1 focus-within:cstu-ring-${b.value}-500`:""),F=e.computed(()=>p.value==="unstyled"?{}:te(b.value)||g.value?{}:p.value==="default"||p.value==="outline"?{"--border-color":b.value,"border-color":"var(--border-color)"}:p.value==="filled"?{"--bg-color":`${b.value}10`,"background-color":"var(--bg-color)"}:p.value==="light"?{"--bg-color":`${b.value}10`,"--text-color":b.value,"background-color":"var(--bg-color)",color:"var(--text-color)"}:p.value==="subtle"?{"--text-color":b.value,color:"var(--text-color)"}:{}),O=e.computed(()=>{const M={default:"cstu-bg-white cstu-border cstu-transition-colors cstu-duration-150 cstu-px-3",filled:"cstu-bg-gray-100 cstu-border cstu-border-transparent cstu-transition-colors cstu-duration-150 cstu-px-3",light:"cstu-border cstu-transition-colors cstu-duration-150 cstu-px-3",outline:"cstu-bg-white cstu-border cstu-transition-colors cstu-duration-150 cstu-px-3",subtle:"cstu-bg-transparent cstu-transition-colors cstu-duration-150 cstu-px-3",unstyled:"cstu-bg-transparent !cstu-border-0"};if(p.value==="unstyled")return[M[p.value]];const P=g.value?"":p.value==="default"||p.value==="outline"?"cstu-border-gray-300/45":"",N=g.value?"cstu-border-red-500":"";return[M[p.value],P,N,g.value?"hover:cstu-border-red-500":"hover:cstu-border-primary-500",g.value?"focus-within:cstu-border-red-500 focus-within:cstu-ring-1 focus-within:cstu-ring-red-500":"focus-within:cstu-border-primary-500 focus-within:cstu-ring-1 focus-within:cstu-ring-primary-500"]}),R=e.ref(!1),ae=M=>{R.value=!0,c("focus",M)},J=M=>{R.value=!1,c("blur",M)},W=M=>{c("change",M)};return o({textarea:l,focus:()=>{var M;return(M=l.value)==null?void 0:M.focus()},blur:()=>{var M;return(M=l.value)==null?void 0:M.blur()},select:()=>{var M;return(M=l.value)==null?void 0:M.select()},setSelectionRange:(M,P)=>{var N;return(N=l.value)==null?void 0:N.setSelectionRange(M,P)},setRangeText:M=>{var P;return(P=l.value)==null?void 0:P.setRangeText(M)},get value(){var M;return(M=l.value)==null?void 0:M.value},set value(M){l.value&&M!==void 0&&(l.value.value=M)}}),(M,P)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-flex cstu-flex-col cstu-transition-all cstu-duration-300",[n.class,e.unref(m)?"cstu-w-full":"cstu-max-w-[20.5rem]"]])},[n.label||M.$slots.label?(e.openBlock(),e.createElementBlock("div",LI,[e.createElementVNode("label",e.mergeProps({for:n.id||r,class:["cstu-flex cstu-items-center",e.unref(D)]},n.labelProps),[e.renderSlot(M.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(n.label)+" ",1),e.unref(k)||e.unref(u)?(e.openBlock(),e.createElementBlock("span",SI,"*")):e.createCommentVNode("",!0)])],16,II),e.renderSlot(M.$slots,"labelIcon")])):e.createCommentVNode("",!0),e.createElementVNode("div",null,[e.createElementVNode("div",{class:e.normalizeClass(["cstu-flex cstu-items-start cstu-gap-2 cstu-py-2",e.unref(A),e.unref(q),e.unref(O),e.unref(H),{"cstu-opacity-50 cstu-pointer-events-none cstu-cursor-not-allowed":e.unref(s)}]),style:e.normalizeStyle(e.unref(F))},[M.$slots.leftSection?(e.openBlock(),e.createElementBlock("div",zI,[e.renderSlot(M.$slots,"leftSection")])):e.createCommentVNode("",!0),e.createElementVNode("textarea",e.mergeProps({ref_key:"textareaRef",ref:l,id:n.id||r,value:n.modelValue,placeholder:n.placeholder,disabled:e.unref(s),required:e.unref(u),readonly:e.unref(d),rows:e.unref(f),maxlength:n.maxLength,class:["cstu-flex-1 cstu-bg-transparent cstu-outline-none cstu-w-full",e.unref($),e.unref(w),{"cstu-text-gray-500":n.modelValue,"cstu-text-red-500":e.unref(g)&&!n.modelValue}],style:{resize:e.unref(L)},onInput:P[0]||(P[0]=N=>M.$emit("update:modelValue",N.target.value)),onFocus:ae,onBlur:J,onChange:W},n.textareaProps),null,16,qI),M.$slots.rightSection?(e.openBlock(),e.createElementBlock("div",BI,[e.renderSlot(M.$slots,"rightSection")])):e.createCommentVNode("",!0)],6)]),n.description&&!e.unref(g)||M.$slots.description&&!e.unref(g)||e.unref(y)&&n.description||e.unref(y)&&M.$slots.description?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:1,class:"cstu-mt-1"},n.descriptionProps),[e.createElementVNode("p",{class:e.normalizeClass(["cstu-text-gray-500",e.unref(S)])},[e.renderSlot(M.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(n.description),1)])],2)],16)):e.createCommentVNode("",!0),e.unref(g)&&n.error||e.unref(g)&&M.$slots.error||e.unref(y)&&n.error||e.unref(y)&&M.$slots.error?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:2,class:"cstu-mt-1"},n.errorProps),[e.createElementVNode("p",{class:e.normalizeClass(["cstu-text-red-500",e.unref(S)])},[e.renderSlot(M.$slots,"error",{},()=>[e.createTextVNode(e.toDisplayString(n.error),1)])],2)],16)):e.createCommentVNode("",!0)],2))}});/**
12
+ `;document.head.appendChild(Tw);const OL=["id"],UL=["id","aria-labelledby"],ZL=e.createElementVNode("span",{tabindex:"0"},null,-1),WL=["aria-label"],GL=["id"],XL=["aria-label"],_L=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"cstu-size-6"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"})],-1),KL=[_L],QL={key:0},JL=e.createElementVNode("span",{tabindex:"0"},null,-1),YL=e.defineComponent({__name:"Modal",props:{id:{type:String,default:()=>`modal-${Date.now()}`},title:{type:String,default:""},modelValue:{type:Boolean,default:!1},size:{type:String,default:"md"},radius:{type:String,default:""},centered:{type:Boolean,default:!0},scrollable:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!1},hideHeader:{type:Boolean,default:!1},hideFooter:{type:Boolean,default:!1},hideHeaderClose:{type:Boolean,default:!1},titleSrOnly:{type:Boolean,default:!1},ariaLabel:{type:String,default:""},content:{type:String,default:""},okTitle:{type:String,default:"OK"},okVariant:{type:String,default:"filled"},okColor:{type:String,default:"primary"},okDisabled:{type:Boolean,default:!1},cancelTitle:{type:String,default:"Cancel"},cancelVariant:{type:String,default:"outline"},cancelColor:{type:String,default:"secondary"},cancelDisabled:{type:Boolean,default:!1},modalClass:{type:String,default:""},dialogClass:{type:String,default:""},contentClass:{type:String,default:""},headerClass:{type:String,default:""},bodyClass:{type:String,default:""},footerClass:{type:String,default:""},ariaLabelledby:{type:String,default:""},teleport:{type:Boolean,default:!0},backdrop:{type:Boolean,default:!0},backdropClass:{type:String,default:""},titleClass:{type:String,default:""},showHeaderDivider:{type:Boolean,default:!1},showFooterDivider:{type:Boolean,default:!1},showDividers:{type:Boolean,default:void 0},closeTitle:{type:String,default:"Close"},busy:{type:Boolean,default:!1},noCloseOnBackdrop:{type:Boolean,default:!1},noCloseOnEsc:{type:Boolean,default:!1},static:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},okOnly:{type:Boolean,default:!1},zIndex:{type:Number,default:1050},disableFocusTrap:{type:Boolean,default:!1},ignoreEnforceFocusSelector:{type:String,default:""},returnFocusOnClose:{type:Boolean,default:!1}},emits:["update:modelValue","show","shown","hide","hidden","ok","cancel","close"],setup(a,{expose:o,emit:c}){const n=a;class r{constructor(g,H={}){Ie(this,"type");Ie(this,"cancelable",!0);Ie(this,"target",null);Ie(this,"vueTarget",null);Ie(this,"defaultPrevented",!1);Ie(this,"componentId","");Ie(this,"trigger","programmatic");this.type=g,Object.assign(this,H)}preventDefault(){this.defaultPrevented=!0}}const l=e.ref(!1),i=e.ref(null),s=e.ref(null),d=e.ref(n.zIndex),u=e.ref(!1),k=e.ref(0),y=e.computed(()=>n.zIndex!==1050?n.zIndex:d.value);function h(){if(n.zIndex!==1050){d.value=n.zIndex;return}const q=document.querySelectorAll(".cstu-modal");let g=1050;q.forEach(H=>{const F=parseInt(window.getComputedStyle(H).zIndex,10);!isNaN(F)&&F>g&&(g=F)}),d.value=g+10}const p=e.computed(()=>n.fullscreen?"":v(n.radius));function v(q){const g={none:"",sm:"cstu-rounded-sm",md:"cstu-rounded-md",lg:"cstu-rounded-lg",xl:"cstu-rounded-xl",full:"cstu-rounded-full"};return g[q||n.size]||g.md}function b(){if(l.value)return;const q=new r("show",{trigger:"programmatic",target:null,vueTarget:null,componentId:n.id});c("show",q),!q.defaultPrevented&&(i.value=document.activeElement,l.value=!0,k.value++,h(),document.body.classList.add("cstu-modal-open"),c("update:modelValue",!0),e.nextTick(()=>{n.disableFocusTrap||A(),c("shown",q)}))}function m(q="programmatic"){if(!l.value)return;const g=new r("hide",{trigger:q,target:null,vueTarget:null,componentId:n.id});c("hide",g),!g.defaultPrevented&&(l.value=!1,u.value=!1,document.body.classList.remove("cstu-modal-open"),c("update:modelValue",!1),e.nextTick(()=>{n.returnFocusOnClose&&D(i.value),c("hidden",g)}))}function w(q){q&&(i.value=typeof q=="string"?document.querySelector(q):q),l.value?m():b()}function f(q){q==="ok"?c("ok"):q==="cancel"&&c("cancel"),m(q)}function L(q){const g=q.target,H=g.closest(".cstu-dropdown-menu"),F=g.tagName&&["input","select","textarea","button"].includes(g.tagName.toLowerCase()),O=g.closest(".cstu-modal-content");H||F||O&&g!==q.currentTarget||!n.noCloseOnBackdrop&&g===q.currentTarget&&m("backdrop")}function C(q){q.key==="Escape"&&l.value&&!n.noCloseOnEsc&&!n.busy&&m("esc")}function A(){e.nextTick(()=>{if(!s.value)return;const q=s.value,g=$(q);g.length>0&&g[0].focus()})}function D(q){if(q&&l.value===!1)try{q.focus()}catch{}}function S(q){if(n.disableFocusTrap||!s.value||!l.value)return;const g=q.target,H=s.value;if(n.ignoreEnforceFocusSelector&&n.ignoreEnforceFocusSelector.trim()!==""){const O=n.ignoreEnforceFocusSelector.split(",").map(R=>R.trim()).filter(R=>R.length>0);for(const R of O)if(g.closest(R))return}const F=!!g.closest(".cstu-modal-content");if(H!==g&&!H.contains(g)&&!F){if(u.value)return;u.value=!0;try{const O=$(H);O.length>0?O[0].focus():H.focus()}finally{setTimeout(()=>{u.value=!1},0)}}}function $(q){return Array.from(q.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'))}return e.watch(()=>n.modelValue,q=>{q!==l.value&&(q?b():m())}),e.watch(()=>n.id,()=>{hw(n.id),uw(n.id,{show:b,hide:m,toggle:w})}),e.onMounted(()=>{uw(n.id,{show:b,hide:m,toggle:w}),document.addEventListener("keydown",C),document.addEventListener("focusin",S),n.modelValue&&(b(),l.value&&e.nextTick(()=>{setTimeout(()=>{const q=document.getElementById(n.id);let g=null;q&&q.parentNode&&(g=q.parentNode.querySelector(".cstu-modal-backdrop")),q&&window.getComputedStyle(q).display==="none"&&(q.style.display="block"),g&&window.getComputedStyle(g).display==="none"&&(g.style.display="block")},50)}))}),e.onBeforeUnmount(()=>{hw(n.id),document.removeEventListener("keydown",C),document.removeEventListener("focusin",S),l.value&&(l.value=!1,c("update:modelValue",!1))}),o({hide:m,show:b,close:f,toggle:w}),(q,g)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body",disabled:n.static||n.teleport===!1},[e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[l.value&&a.backdrop!==!1?(e.openBlock(),e.createElementBlock("div",{key:0,id:`${n.id}-backdrop`,class:e.normalizeClass(["cstu-modal-backdrop",a.backdropClass]),style:e.normalizeStyle({zIndex:e.unref(y)-10})},null,14,OL)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:n.id,class:e.normalizeClass(["cstu-modal",[{"cstu-modal-static":n.static,"cstu-modal-scrollable":n.scrollable},n.modalClass]]),tabindex:"-1",role:"dialog","aria-modal":"true",style:e.normalizeStyle({zIndex:e.unref(y)}),"aria-labelledby":!a.hideHeader&&a.title?`modal-title-${n.id}`:void 0,onClick:L},[e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-dialog",a.dialogClass,{"cstu-modal-fullscreen":a.fullscreen,"cstu-modal-dialog-centered":a.centered&&!a.fullscreen,"cstu-modal-dialog-scrollable":a.scrollable,[`cstu-modal-${a.size}`]:a.size&&!a.fullscreen}]),onClick:g[4]||(g[4]=H=>H.target===H.currentTarget&&H.stopPropagation())},[ZL,e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-content",a.contentClass,{"cstu-modal-content-fullscreen":a.fullscreen},e.unref(p)]),tabindex:"-1",ref_key:"modalElement",ref:s,"aria-label":a.ariaLabel,onClick:g[3]||(g[3]=H=>H.target===H.currentTarget&&H.stopPropagation())},[a.hideHeader?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("header",{key:0,class:e.normalizeClass(["cstu-modal-header",a.headerClass,{"show-divider":a.showHeaderDivider||a.showDividers}])},[e.renderSlot(q.$slots,"modal-header",{},()=>[e.renderSlot(q.$slots,"modal-title",{},()=>[e.createElementVNode("h5",{id:`modal-title-${n.id}`,class:e.normalizeClass([n.titleClass||"cstu-modal-title",{"sr-only":a.titleSrOnly}])},e.toDisplayString(a.title),11,GL)]),a.hideHeaderClose?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,type:"button","aria-label":a.closeTitle,class:"cstu-close cstu-self-baseline",onClick:g[0]||(g[0]=H=>f("headerClose"))},KL,8,XL))])],2)),e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-body",a.bodyClass,{"cstu-modal-body-scrollable":a.scrollable}])},[e.renderSlot(q.$slots,"default",{},()=>[a.content?(e.openBlock(),e.createElementBlock("div",QL,e.toDisplayString(a.content),1)):e.createCommentVNode("",!0)])],2),a.hideFooter?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("footer",{key:1,class:e.normalizeClass(["cstu-modal-footer",a.footerClass,{"show-divider":a.showFooterDivider||a.showDividers}])},[e.renderSlot(q.$slots,"modal-footer",{},()=>[a.okOnly?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(_,{key:0,variant:a.cancelVariant,color:a.cancelColor,disabled:a.cancelDisabled||a.busy,onClick:g[1]||(g[1]=H=>f("cancel"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.cancelTitle),1)]),_:1},8,["variant","color","disabled"])),e.createVNode(_,{variant:a.okVariant,color:a.okColor,disabled:a.okDisabled||a.busy,loading:a.busy,onClick:g[2]||(g[2]=H=>f("ok"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.okTitle),1)]),_:1},8,["variant","color","disabled","loading"])])],2))],10,WL),JL],2)],14,UL)):e.createCommentVNode("",!0)]),_:3})],8,["disabled"]))}});const eI={mounted(a,o){const c=typeof o.value=="string"?o.value:Object.keys(o.modifiers)[0];if(!c){console.warn("v-cstu-modal directive requires a modal ID");return}a.addEventListener("click",()=>{dw.show(c)}),a.tagName!=="BUTTON"&&(a.setAttribute("role","button"),a.addEventListener("keydown",n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),dw.show(c))}),a.hasAttribute("tabindex")||a.setAttribute("tabindex","0"))}},tI={install:a=>{a.directive("cstu-modal",eI)}},aI=["primary","secondary","success","warning","info"];function Dw(a,o=aI){if(!a||!o||o.length===0)return"primary";let c=0;for(let r=0;r<a.length;r+=1)c=a.charCodeAt(r)+((c<<5)-c);const n=Math.abs(c)%o.length;return o[n]}function Fw(a){return!a||typeof a!="string"?"":a.trim().split(" ").slice(0,2).map(o=>o.charAt(0).toUpperCase()).join("")}const oI=["src","alt"],cI=["title"],nI={key:1,"data-avatar-placeholder-icon":"true",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},rI=e.createElementVNode("path",{d:"M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z",fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"},null,-1),lI=[rI],$w=e.defineComponent({__name:"Avatar",props:{size:{default:"md"},radius:{default:"full"},color:{default:"primary"},gradient:null,src:{default:null},alt:null,imageProps:null,children:null,autoContrast:{type:Boolean,default:!0},name:null,allowedInitialsColors:null,variant:{default:"light"},component:{default:"div"},hover:{type:Boolean,default:!1},customClasses:{default:""}},setup(a){const o=a,c=e.ref(!o.src);e.watch(()=>o.src,y=>{c.value=!y},{immediate:!0});const n=y=>y?["primary","secondary","success","warning","danger","info","dark","light","initials"].includes(y):!0,r=e.computed(()=>o.name?Fw(o.name):""),l=e.computed(()=>{const y={sm:"w-5 h-5 text-xs",md:"w-6 h-6 text-xs",lg:"w-[30px] h-[30px] text-sm",xl:"w-[32px] h-[32px] text-sm","2xl":"w-[34px] h-[34px] text-base","3xl":"w-[36px] h-[36px] text-base","4xl":"w-[38px] h-[38px] text-lg","5xl":"w-[52px] h-[52px] text-xl"};return typeof o.size=="string"?y[o.size]||y.md:typeof o.size=="number"?`w-[${o.size}px] h-[${o.size}px]`:y.md}),i=e.computed(()=>re(o.radius)),s=e.computed(()=>{if(o.src&&!c.value||!n(o.color)&&o.color!=="initials")return"";if(o.color==="initials"&&o.name){const v=Dw(o.name,o.allowedInitialsColors||["primary","secondary","success","warning","info"]);return v?U(v,"filled",{}):U("primary","filled",{})}const y=o.variant==="transparent"?"default":o.variant==="gradient"?"filled":o.variant,h=o.color&&o.color!=="initials"?o.color:"primary",p=U(h,y,{});return o.variant==="transparent"?"bg-transparent":p}),d=e.computed(()=>!n(o.color)&&o.color!=="initials"?"":o.variant==="transparent"?"bg-transparent":o.variant==="gradient"&&o.gradient?`bg-gradient-to-r from-${o.gradient.from} to-${o.gradient.to}`:Ex(o.variant)),u=e.computed(()=>{if(o.src&&!c.value||n(o.color)||o.color==="initials")return{};const y={};switch(o.variant){case"filled":y.backgroundColor=o.color,o.autoContrast&&(y.color="white");break;case"light":y.backgroundColor=`${o.color}20`,y.color=o.color;break;case"outline":y.backgroundColor="transparent",y.color=o.color,y.border=`1px solid ${o.color}`;break;case"transparent":y.backgroundColor="transparent",y.color=o.color;break}return y}),k=y=>{var h;if((h=o.imageProps)!=null&&h.onError){o.imageProps.onError(y);return}c.value=!0};return(y,h)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.component||"div"),{class:e.normalizeClass(["avatar",e.unref(l),e.unref(i),!c.value&&a.src?"":e.unref(s),!c.value&&a.src?"":e.unref(d),{"avatar--with-image":!c.value&&a.src},{"hover:opacity-80 transition-opacity":a.hover},a.customClasses]),style:e.normalizeStyle(e.unref(u))},{default:e.withCtx(()=>[!c.value&&a.src?(e.openBlock(),e.createElementBlock("img",e.mergeProps({key:0,class:"avatar__image",src:a.src,alt:a.alt},a.imageProps,{onError:k}),null,16,oI)):(e.openBlock(),e.createElementBlock("span",{key:1,class:"avatar__placeholder",title:a.alt},[e.renderSlot(y.$slots,"default",{},()=>[a.name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(e.unref(r)),1)],64)):(e.openBlock(),e.createElementBlock("svg",nI,lI))])],8,cI))]),_:3},8,["class","style"]))}});const Nw=e.defineComponent({__name:"AvatarGroup",props:{spacing:{default:"sm"},gap:{default:"none"},outlineWidth:{default:"normal"},outlineColor:{default:"white"},outlineOffset:{default:"small"},customClasses:{default:""},max:null,hover:{type:Boolean,default:!1}},setup(a){const o=a,c=e.computed(()=>{if(typeof o.spacing=="number")return`${o.spacing}px`;const u={xs:"-1rem",sm:"-0.75rem",md:"-0.5rem",lg:"-0.25rem",xl:"0"};return u[o.spacing]||u.sm}),n=e.computed(()=>{if(typeof o.gap=="number")return`${o.gap}px`;if(typeof o.gap=="string"&&!isNaN(parseFloat(o.gap)))return o.gap;const u={none:"0",xs:"0.25rem",sm:"0.5rem",md:"0.75rem",lg:"1rem"};return u[o.gap]||u.none}),r=e.computed(()=>{if(typeof o.outlineWidth=="number")return`${o.outlineWidth}px`;if(typeof o.outlineWidth=="string"&&!isNaN(parseFloat(o.outlineWidth)))return o.outlineWidth;const u={none:"0",thin:"1px",normal:"2px",medium:"3px",thick:"4px"};return u[o.outlineWidth]||u.normal}),l=e.computed(()=>{if(typeof o.outlineOffset=="number")return`${o.outlineOffset}px`;if(typeof o.outlineOffset=="string"&&!isNaN(parseFloat(o.outlineOffset)))return o.outlineOffset;const u={none:"0",inset:"-2px",small:"1px",medium:"2px",large:"3px"};return u[o.outlineOffset]||u.small}),i=e.computed(()=>typeof o.outlineColor=="string"&&["primary","secondary","success","danger","warning","info","dark","light"].includes(o.outlineColor)?`outline-${o.outlineColor}`:""),s=e.computed(()=>typeof o.outlineColor=="string"&&["primary","secondary","success","danger","warning","info","dark","light"].includes(o.outlineColor)?"var(--color-"+o.outlineColor+")":o.outlineColor),d=e.computed(()=>({"--avatar-group-spacing":c.value,"--avatar-group-gap":n.value,"--avatar-group-outline-width":r.value,"--avatar-group-outline-color":s.value,"--avatar-group-outline-offset":l.value}));return(u,k)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["avatar-group",a.customClasses,e.unref(i),{"avatar-group--hover":a.hover}]),style:e.normalizeStyle(e.unref(d))},[e.renderSlot(u.$slots,"default")],6))}});$w.Group=Nw;const hx=e.defineComponent({__name:"Tabs",props:{value:{type:String,default:void 0},defaultValue:{type:String,default:"first"},orientation:{type:String,default:"horizontal"},placement:{type:String,default:void 0},variant:{type:String,default:"text"}},emits:["change"],setup(a,{emit:o}){const c=a,n=e.computed(()=>c.placement?c.placement:c.orientation==="horizontal"?"top":"left"),r=e.computed(()=>c.orientation),l=e.computed(()=>c.variant),i=e.ref(c.value!==void 0?c.value:c.defaultValue);e.watch(()=>c.value,d=>{d!==void 0&&(i.value=d)});const s=d=>{c.value!==void 0?o("change",d):i.value=d};return e.provide("activeTab",i),e.provide("setActiveTab",s),e.provide("tabsOrientation",r),e.provide("tabsPlacement",n),(d,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-tabs",`cstu-tabs-${e.unref(r)}`,`cstu-tabs-placement-${e.unref(n)}`,`cstu-tabs-variant-${e.unref(l)}`])},[e.renderSlot(d.$slots,"default")],2))}});const Rw=e.defineComponent({__name:"TabsList",props:{justify:{type:String,default:"flex-start"},divider:{type:Boolean,default:!1},scrollable:{type:Boolean,default:!1}},setup(a){const o=a,c=e.inject("tabsOrientation",e.ref("horizontal")),n=e.inject("tabsPlacement",e.ref("top")),r=e.computed(()=>["tabs-list",`tabs-list-${c.value}`,`tabs-list-placement-${n.value}`,o.divider?"tabs-list-with-divider":"",o.scrollable?"tabs-list-scrollable":""]),l=s=>{if(["space-between","space-around","space-evenly"].includes(s))return s;switch(s){case"flex-start":return"flex-start";case"flex-end":return"flex-end";case"center":return"center";default:return"flex-start"}},i=e.computed(()=>c.value==="horizontal"?{justifyContent:o.justify}:{justifyContent:l(o.justify)});return(s,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(r)),style:e.normalizeStyle(e.unref(i))},[e.renderSlot(s.$slots,"default")],6))}});const Ow=e.defineComponent({__name:"TabsTab",props:{value:{type:String,required:!0},color:{type:String,default:"primary"},variant:{type:String,default:"text"},size:{type:String,default:"md"},radius:{type:String,default:"md"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1}},setup(a){const o=a,c=e.inject("activeTab",e.ref("")),n=e.inject("setActiveTab",()=>{}),r=e.inject("tabsOrientation",e.ref("horizontal")),l=e.inject("tabsPlacement",e.ref("top")),i=e.computed(()=>c.value),s=e.computed(()=>r.value),d=e.computed(()=>l.value),u=e.computed(()=>i.value===o.value),k=e.computed(()=>s.value==="vertical"),y=e.computed(()=>o.fullWidth&&s.value==="horizontal"),h=()=>{!o.disabled&&!o.loading&&n(o.value)};return(p,v)=>(e.openBlock(),e.createBlock(e.unref(_),{class:e.normalizeClass(["tabs-tab",e.unref(u)?"tabs-tab-active":"tabs-tab-inactive",`tabs-tab-${o.variant}`,o.color?`tabs-tab-color-${o.color}`:"",`tabs-tab-orientation-${e.unref(s)}`,`tabs-tab-placement-${e.unref(d)}`,{"tabs-tab-full-width":e.unref(y)}]),disabled:o.disabled,loading:o.loading,color:e.unref(u)?o.color:"light",variant:e.unref(u)?o.variant:"subtle",size:o.size,radius:o.variant==="text"?"none":o.radius,"full-width":e.unref(k),onClick:h},e.createSlots({default:e.withCtx(()=>[e.renderSlot(p.$slots,"default")]),_:2},[p.$slots.leftSection?{name:"leftSection",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"leftSection")]),key:"0"}:void 0,p.$slots.rightSection?{name:"rightSection",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"rightSection")]),key:"1"}:void 0]),1032,["class","disabled","loading","color","variant","size","radius","full-width"]))}});const Uw=e.defineComponent({__name:"TabsPanel",props:{value:{type:String,required:!0},KeepAlive:{type:Boolean,default:!1}},setup(a){const o=a,c=e.inject("activeTab",e.ref("")),n=e.inject("tabsOrientation",e.ref("horizontal")),r=e.inject("tabsPlacement",e.ref("top")),l=e.computed(()=>c.value===o.value),i=e.computed(()=>["tabs-panel",l.value?"tabs-panel-active":"tabs-panel-inactive",`tabs-panel-${n.value}`,`tabs-panel-placement-${r.value}`]);return(s,d)=>a.KeepAlive||e.unref(l)?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(i))},[e.renderSlot(s.$slots,"default")],2)),[[e.vShow,e.unref(l)]]):e.createCommentVNode("",!0)}});hx.List=Rw;hx.Tab=Ow;hx.Panel=Uw;const sI=e.createElementVNode("span",{class:"cstu-sr-only"},"First page",-1),iI=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"cstu-h-4 cstu-w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("polyline",{points:"11 17 6 12 11 7"}),e.createElementVNode("polyline",{points:"18 17 13 12 18 7"})],-1),dI=e.createElementVNode("span",{class:"cstu-sr-only"},"Previous page",-1),uI=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"cstu-h-4 cstu-w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("polyline",{points:"15 18 9 12 15 6"})],-1),hI={key:2,class:"cstu-flex cstu-items-center cstu-gap-2"},yI=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"cstu-h-4 cstu-w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("circle",{cx:"12",cy:"12",r:"1"}),e.createElementVNode("circle",{cx:"19",cy:"12",r:"1"}),e.createElementVNode("circle",{cx:"5",cy:"12",r:"1"})],-1),pI=[yI],kI=e.createElementVNode("span",{class:"cstu-sr-only"},"Next page",-1),mI=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"cstu-h-4 cstu-w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("polyline",{points:"9 18 15 12 9 6"})],-1),fI=e.createElementVNode("span",{class:"cstu-sr-only"},"Last page",-1),vI=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"cstu-h-4 cstu-w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("polyline",{points:"13 17 18 12 13 7"}),e.createElementVNode("polyline",{points:"6 17 11 12 6 7"})],-1),gI=e.defineComponent({__name:"Pagination",props:{modelValue:{default:1},total:null,siblings:{default:1},boundaries:{default:1},variant:{default:"filled"},color:{default:"primary"},size:{default:"md"},disabled:{type:Boolean,default:!1},withControls:{type:Boolean,default:!0},withEdges:{type:Boolean,default:!1},withPages:{type:Boolean,default:!0},class:null},emits:["update:modelValue"],setup(a,{emit:o}){const c=a,n=e.ref(c.modelValue);e.watch(()=>c.modelValue,h=>{n.value=h});const r=e.computed(()=>n.value===1),l=e.computed(()=>n.value===c.total),i=e.computed(()=>{switch(c.size){case"xs":return"cstu-!h-[30px] cstu-!w-[30px] cstu-min-w-[30px] !cstu-p-0";case"sm":return"cstu-!h-[36px] cstu-!w-[36px] cstu-min-w-[36px] !cstu-p-0";case"md":return"cstu-!h-[40px] cstu-!w-[40px] cstu-min-w-[40px] !cstu-p-0";case"lg":return"cstu-!h-[45px] cstu-!w-[45px] cstu-min-w-[45px] !cstu-p-0";case"xl":return"cstu-!h-[50px] cstu-!w-[50px] cstu-min-w-[50px] !cstu-p-0";default:return"cstu-!h-[40px] cstu-!w-[40px] cstu-min-w-[40px] !cstu-p-0"}}),s=e.computed(()=>["cstu-flex cstu-items-center cstu-justify-center",k(c.size)]),d=e.computed(()=>{const h=[],p=c.total;if(c.siblings*2+3+c.boundaries*2>=p)return Array.from({length:p},(C,A)=>A+1);const b=Math.max(n.value-c.siblings,c.boundaries+1),m=Math.min(n.value+c.siblings,p-c.boundaries),w=b>c.boundaries+2,f=m<p-(c.boundaries+1),L=new Set;for(let C=1;C<=c.boundaries;C++)h.push(C),L.add(C);if(w)h.push("dots");else if(!w&&b>c.boundaries)for(let C=c.boundaries+1;C<b;C++)L.has(C)||(h.push(C),L.add(C));for(let C=b;C<=m;C++)L.has(C)||(h.push(C),L.add(C));if(f)h.push("dots");else if(!f&&m<p-c.boundaries)for(let C=m+1;C<p-c.boundaries+1;C++)L.has(C)||(h.push(C),L.add(C));for(let C=p-c.boundaries+1;C<=p;C++)L.has(C)||(h.push(C),L.add(C));return h}),u=h=>{h<1||h>c.total||c.disabled||(n.value=h,o("update:modelValue",h))};function k(h){const p={xs:"cstu-h-6 cstu-w-6 cstu-text-xs",sm:"cstu-h-7 cstu-w-7 cstu-text-sm",md:"cstu-h-8 cstu-w-8 cstu-text-sm",lg:"cstu-h-9 cstu-w-9 cstu-text-base",xl:"cstu-h-10 cstu-w-10 cstu-text-base"};return p[h]||p.md}const y=e.computed(()=>c.variant==="filled"?"subtle":"bordered-transparent");return(h,p)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-flex cstu-items-center cstu-gap-2",[c.class]])},[c.withEdges?(e.openBlock(),e.createBlock(_,{key:0,variant:e.unref(y),color:"light",size:c.size,disabled:e.unref(r)||c.disabled,onClick:p[0]||(p[0]=v=>u(1)),"aria-label":"Go to first page",class:e.normalizeClass(e.unref(i))},{default:e.withCtx(()=>[sI,iI]),_:1},8,["variant","size","disabled","class"])):e.createCommentVNode("",!0),c.withControls?(e.openBlock(),e.createBlock(_,{key:1,variant:e.unref(y),color:"light",size:c.size,disabled:e.unref(r)||c.disabled,onClick:p[1]||(p[1]=v=>u(n.value-1)),"aria-label":"Go to previous page",class:e.normalizeClass(e.unref(i))},{default:e.withCtx(()=>[dI,uI]),_:1},8,["variant","size","disabled","class"])):e.createCommentVNode("",!0),c.withPages?(e.openBlock(),e.createElementBlock("div",hI,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),(v,b)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:b},[v!=="dots"?(e.openBlock(),e.createBlock(_,{key:0,variant:v===n.value?"filled":e.unref(y),color:v===n.value?c.color:"light",size:c.size,disabled:c.disabled,onClick:m=>u(Number(v)),"aria-current":v===n.value?"page":void 0,"aria-label":`Page ${v}`,class:e.normalizeClass(e.unref(i))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(v),1)]),_:2},1032,["variant","color","size","disabled","onClick","aria-current","aria-label","class"])):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["pagination-dots",[e.unref(s),e.unref(i)]])},pI,2))],64))),128))])):e.createCommentVNode("",!0),c.withControls?(e.openBlock(),e.createBlock(_,{key:3,variant:e.unref(y),color:"light",size:c.size,disabled:e.unref(l)||c.disabled,onClick:p[2]||(p[2]=v=>u(n.value+1)),"aria-label":"Go to next page",class:e.normalizeClass(e.unref(i))},{default:e.withCtx(()=>[kI,mI]),_:1},8,["variant","size","disabled","class"])):e.createCommentVNode("",!0),c.withEdges?(e.openBlock(),e.createBlock(_,{key:4,variant:e.unref(y),color:"light",size:c.size,disabled:e.unref(l)||c.disabled,onClick:p[3]||(p[3]=v=>u(c.total)),"aria-label":"Go to last page",class:e.normalizeClass(e.unref(i))},{default:e.withCtx(()=>[fI,vI]),_:1},8,["variant","size","disabled","class"])):e.createCommentVNode("",!0)],2))}}),Qx={mounted(a,o){a._clickOutside=c=>{const n=c.target;if(!(a===n||a.contains(n))){const r=c.target,l=r.tagName&&r.tagName.toLowerCase()==="input",i=r.closest(".cstu-dropdown-menu");!l&&!i&&o.value(c)}},document.addEventListener("click",a._clickOutside,!0),document.addEventListener("touchstart",a._clickOutside,!0)},unmounted(a){a._clickOutside&&(document.removeEventListener("click",a._clickOutside,!0),document.removeEventListener("touchstart",a._clickOutside,!0))}},MI=["id","aria-labelledby","aria-modal","onKeydown"],xI={class:"cstu-popover-inner"},wI=["id"],bI=e.defineComponent({__name:"Popover",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},placement:{default:"bottom"},variant:{default:"shadow"},color:{default:"primary"},size:{default:"md"},radius:{default:"md"},hideHeader:{type:Boolean,default:!1},showCloseIcon:{type:Boolean,default:!0},hideFooter:{type:Boolean,default:!0},closeOnClickOutside:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0},closeOnClick:{type:Boolean,default:!1},title:{default:""},content:{default:""},zIndex:{default:1e3},trigger:{default:"click"},backdrop:{type:[Boolean,String],default:!1},offsetDistance:{default:8},disabled:{type:Boolean,default:!1},popoverClass:{default:""},headerClass:{default:""},bodyClass:{default:""},footerClass:{default:""},trapFocus:{type:Boolean,default:!1},id:{default:()=>`popover-${Date.now()}`},shadow:{default:"md"},width:null},emits:["update:open","open","close"],setup(a,{emit:o}){const c=a,n=e.ref(c.defaultOpen),r=e.ref(null),l=e.ref(null),i=e.ref(null),s=e.ref(null),d=e.ref(c.zIndex);c.open!==void 0&&(n.value=c.open);const u=e.computed(()=>{if(c.placement!=="auto")return c.placement}),k=e.computed(()=>{const M=[F2(c.offsetDistance)];return i.value&&M.push(Hw({element:i})),c.placement==="auto"?M.push(Xx({padding:8})):M.push(N2({fallbackPlacements:["top","bottom","left","right"],padding:8})),M.push($2({padding:8})),M}),{floatingStyles:y,update:h}=R2(r,l,{placement:u,middleware:k,whileElementsMounted:Gx}),p=M=>{c.disabled||(c.trigger==="click"||c.trigger==="manual")&&D()},v=()=>{c.disabled||c.trigger==="hover"&&C()},b=()=>{c.disabled||c.trigger==="hover"&&setTimeout(()=>{A("hover")},100)},m=M=>{c.closeOnClick&&A("popoverClick"),M.stopPropagation()},w=M=>{c.closeOnClickOutside&&n.value&&l.value&&!l.value.contains(M.target)&&r.value&&!r.value.contains(M.target)&&A("clickAway")},f=()=>{c.closeOnClickOutside&&A("backdrop")},L=M=>{c.closeOnEscape&&M.key==="Escape"&&(M.preventDefault(),A("escape"))},C=()=>{c.disabled||n.value||(s.value=document.activeElement,n.value=!0,e.nextTick(()=>{h(),c.trapFocus&&S()}),o("open"),o("update:open",!0))},A=(M="programmatic")=>{n.value&&(n.value=!1,c.trapFocus&&$(s.value),o("close",M),o("update:open",!1))},D=()=>{n.value?A():C()},S=()=>{if(!l.value)return;const M=q(l.value);M.length>0?M[0].focus():l.value.focus()},$=M=>{M&&typeof M.focus=="function"&&M.focus()},q=M=>Array.from(M.querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')).filter(P=>!P.hasAttribute("disabled")&&!P.getAttribute("aria-hidden")),g=M=>{if(!n.value||!c.trapFocus||!l.value)return;const P=M.target;l.value.contains(P)||(M.preventDefault(),S())};e.watch(()=>c.open,M=>{M!==n.value&&(M?C():A())}),e.watch(r,M=>{M&&h()}),e.onMounted(()=>{document.addEventListener("keydown",L),c.trapFocus&&document.addEventListener("focusin",g)}),e.onBeforeUnmount(()=>{document.removeEventListener("keydown",L),c.trapFocus&&document.removeEventListener("focusin",g)});const H=e.computed(()=>[re(c.radius),!c.variant||c.variant==="shadow"?c.shadow?`cstu-shadow-${c.shadow}`:"cstu-shadow-md":"",c.popoverClass]),F=e.computed(()=>{const M=[...H.value.filter(Boolean)];let P=!1;const N=c.color;if(N&&te(N)&&c.variant==="color"){const G=U(N,"filled",{disabled:c.disabled});typeof G=="string"&&G.trim()&&(M.push(...G.split(" ").filter(Boolean)),P=!0)}return P||(M.push("cstu-bg-white"),c.variant==="outline"&&M.push("cstu-border","cstu-border-gray-300"),M.push("cstu-text-gray-700")),M.filter(Boolean).map(G=>typeof G=="string"?G:Object.keys(G).filter(Ve=>G[Ve]).join(" ")).join(" ")}),O=e.computed(()=>{const M={width:typeof c.width=="number"?`${c.width}px`:c.width},P=c.color;if(P&&!te(P)&&c.variant==="color"){M.backgroundColor=P;const N=R(P);M.color=N>128?"#000000":"#FFFFFF"}return{...y.value,...M}});e.computed(()=>{const M={backgroundColor:"white"},P=c.color;return c.variant==="color"&&P?te(P)?(M.borderWidth="1px",M.borderStyle="solid",M.borderColor=`var(--${P}-500)`):M.backgroundColor=P:c.variant==="outline"&&(M.borderWidth="1px",M.borderStyle="solid",M.borderColor="#e2e8f0"),M});function R(M){if(M.startsWith("#"))try{const P=parseInt(M.substring(1,3),16),N=parseInt(M.substring(3,5),16),G=parseInt(M.substring(5,7),16);return(P*299+N*587+G*114)/1e3}catch{return 128}else if(M.startsWith("rgb"))try{const P=M.match(/\d+/g);if(P&&P.length>=3){const N=parseInt(P[0],10),G=parseInt(P[1],10),Ve=parseInt(P[2],10);return(N*299+G*587+Ve*114)/1e3}}catch{return 128}return 128}const ae=e.computed(()=>{const M=c.color,P=!(M&&te(M)),N=c.variant==="outline";return["cstu-popover-header",{xs:"cstu-px-2 cstu-py-1.5",sm:"cstu-px-2.5 cstu-py-1.5",md:"cstu-px-3 cstu-py-2",lg:"cstu-px-3.5 cstu-py-2.5",xl:"cstu-px-4 cstu-py-3"}[c.size||"md"],m2(c.size||"md"),"cstu-flex cstu-items-center cstu-justify-between",N||P?"cstu-border-b cstu-border-gray-200 dark:cstu-border-gray-700":"",c.headerClass].filter(Boolean).join(" ")}),J=e.computed(()=>["cstu-popover-body",{xs:"cstu-p-2",sm:"cstu-p-2.5",md:"cstu-p-3",lg:"cstu-p-3.5",xl:"cstu-p-4"}[c.size||"md"],m2(c.size||"sm"),c.bodyClass].filter(Boolean).join(" ")),W=e.computed(()=>{const M=c.color,P=!(M&&te(M)),N=c.variant==="outline";return["cstu-popover-footer",{xs:"cstu-px-2 cstu-py-1.5",sm:"cstu-px-2.5 cstu-py-1.5",md:"cstu-px-3 cstu-py-2",lg:"cstu-px-3.5 cstu-py-2.5",xl:"cstu-px-4 cstu-py-3"}[c.size||"md"],N||P?"cstu-border-t cstu-border-gray-200 dark:cstu-border-gray-700":"","cstu-flex cstu-justify-end cstu-space-x-2",c.footerClass].filter(Boolean).join(" ")});return(M,P)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{ref_key:"triggerRef",ref:r,class:e.normalizeClass(["cstu-inline-block cstu-popover-trigger",{"cstu-cursor-not-allowed cstu-opacity-70":a.disabled}]),onClick:p,onMouseenter:v,onMouseleave:b},[e.renderSlot(M.$slots,"trigger")],34),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"fade",appear:""},{default:e.withCtx(()=>[n.value&&a.backdrop!==!1?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["cstu-popover-backdrop",{"cstu-bg-black/50":a.backdrop===!0,"cstu-bg-transparent":a.backdrop==="transparent"}]),style:e.normalizeStyle({zIndex:a.zIndex-10}),onClick:f},null,6)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{"enter-active-class":"cstu-transition cstu-ease-out cstu-duration-100","enter-from-class":"cstu-transform cstu-opacity-0 cstu-scale-95","enter-to-class":"cstu-transform cstu-opacity-100 cstu-scale-100","leave-active-class":"cstu-transition cstu-ease-in cstu-duration-75","leave-from-class":"cstu-transform cstu-opacity-100 cstu-scale-100","leave-to-class":"cstu-transform cstu-opacity-0 cstu-scale-95"},{default:e.withCtx(()=>[n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"cstu-popover-container",style:e.normalizeStyle({zIndex:d.value})},[e.withDirectives((e.openBlock(),e.createElementBlock("div",{ref_key:"popoverRef",ref:l,id:c.id,class:e.normalizeClass(e.unref(F)),style:e.normalizeStyle([e.unref(y),e.unref(O)]),role:"dialog","aria-labelledby":c.title?`${c.id}-title`:void 0,"aria-modal":c.trapFocus,tabindex:"-1",onClick:m,onKeydown:e.withKeys(L,["esc"])},[e.createElementVNode("div",xI,[c.hideHeader?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(ae))},[e.renderSlot(M.$slots,"header",{},()=>[e.createElementVNode("h3",{id:`${c.id}-title`,class:e.normalizeClass(["cstu-popover-title cstu-font-medium",e.unref(m2)(c.size||"md")])},e.toDisplayString(c.title),11,wI),c.showCloseIcon?(e.openBlock(),e.createBlock(_,{key:0,icon:"X",variant:"text",size:"xs",color:c.color&&e.unref(te)(c.color)?"white":"gray",class:"cstu-ml-auto","aria-label":"Close popover",onClick:P[0]||(P[0]=e.withModifiers(N=>A("headerClose"),["stop"]))},null,8,["color"])):e.createCommentVNode("",!0)])],2)),e.createElementVNode("div",{class:e.normalizeClass(e.unref(J))},[e.renderSlot(M.$slots,"default",{},()=>[a.content?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(m2)(c.size||"sm"))},e.toDisplayString(a.content),3)):e.createCommentVNode("",!0)])],2),c.hideFooter?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(W))},[e.renderSlot(M.$slots,"footer",{},()=>[e.createVNode(_,{size:"sm",variant:"subtle",onClick:P[1]||(P[1]=N=>A("cancel"))},{default:e.withCtx(()=>[e.createTextVNode(" Close ")]),_:1})])],2))])],46,MI)),[[e.unref(Qx),w]])],4)):e.createCommentVNode("",!0)]),_:3})]))],64))}});const CI=e.defineComponent({__name:"Breadcrumbs",props:{separator:{default:"/"},separatorMargin:{default:"xs"},size:{default:"md"},radius:{default:"md"},color:{default:"primary"},highlightActive:{type:Boolean,default:!0},class:null,separatorClass:null,activeClass:null},setup(a){const o=a,c=e.useSlots(),n=e.computed(()=>!!c.default),r=e.computed(()=>c.default?c.default():[]),l=y=>y===r.value.length-1,i=y=>y?["primary","secondary","success","warning","danger","info","dark","light"].includes(y):!0,s=y=>{if(!l(y)||!o.highlightActive)return"";if(i(o.color)){const h=Ce[o.color];if(h)return`cstu-text-${h.base}-${h.main}`}return""},d=y=>!l(y)||!o.highlightActive?{}:i(o.color)?{}:{color:o.color},u=e.computed(()=>{const y={xs:"text-xs",sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl"};return y[o.size]||y.md}),k=e.computed(()=>{const y={xs:"mx-1",sm:"mx-2",md:"mx-3",lg:"mx-4",xl:"mx-5"};return y[o.separatorMargin]||y.xs});return(y,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-breadcrumbs",o.class])},[e.unref(n)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(e.unref(r),(p,v)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:v},[e.createElementVNode("div",{class:e.normalizeClass(["cstu-breadcrumb-item",e.unref(u),l(v)?"cstu-breadcrumb-active":"cstu-breadcrumb-inactive",l(v)?o.activeClass:"",l(v)&&o.highlightActive?s(v):""]),style:e.normalizeStyle(d(v))},[e.renderSlot(y.$slots,`item-${v}`,{isActive:l(v)},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p)))])],6),l(v)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["cstu-breadcrumb-separator",e.unref(k),o.separatorClass])},[e.renderSlot(y.$slots,"separator",{},()=>[typeof o.separator=="string"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(o.separator),1)],64)):o.separator?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.separator),{key:1})):e.createCommentVNode("",!0)])],2))],64))),128)):e.renderSlot(y.$slots,"default",{key:0})],2))}});const LI={key:0,class:"cstu-flex cstu-justify-between cstu-items-center cstu-mb-1"},II=["for"],SI={key:0,class:"cstu-text-red-500 cstu-ml-1"},zI={key:0,class:"cstu-flex cstu-items-center cstu-justify-center cstu-w-[15px] cstu-h-[15px] cstu-mt-1"},qI=["id","value","placeholder","disabled","required","readonly","rows","maxlength"],BI={key:1,class:"cstu-flex cstu-items-center cstu-justify-center cstu-w-[15px] cstu-h-[15px] cstu-mt-1"},VI=e.defineComponent({__name:"Textarea",props:{id:null,modelValue:null,placeholder:null,disabled:{type:Boolean},readonly:{type:Boolean},label:null,labelProps:null,description:null,descriptionProps:null,error:null,errorProps:null,hasError:{type:Boolean},showBothErrorAndDescription:{type:Boolean},textareaProps:null,size:null,radius:null,variant:null,required:{type:Boolean},withAsterisk:{type:Boolean},rows:null,resize:null,fullWidth:{type:Boolean},color:null,class:null,inputClass:null,maxLength:null},emits:["update:modelValue","focus","blur","change"],setup(a,{expose:o,emit:c}){const n=a,r=`textarea-${Math.random().toString(36).substring(2,11)}`,l=e.ref(null),i=e.computed(()=>n.hasError??!1),s=e.computed(()=>n.disabled??!1),d=e.computed(()=>n.readonly??!1),u=e.computed(()=>n.required??!1),k=e.computed(()=>n.withAsterisk??!1),y=e.computed(()=>n.showBothErrorAndDescription??!1),h=e.computed(()=>n.size??"md"),p=e.computed(()=>n.variant??"default"),v=e.computed(()=>n.radius??"md"),b=e.computed(()=>n.color??"primary"),m=e.computed(()=>n.fullWidth??!1),w=e.computed(()=>n.inputClass??""),f=e.computed(()=>n.rows??3),L=e.computed(()=>n.resize??"none"),C={xs:{inputClass:`cstu-min-h-8 ${m.value?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-xs cstu-font-medium",descriptionSize:"cstu-text-xs"},sm:{inputClass:`cstu-min-h-9 ${m.value?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-sm cstu-font-medium",descriptionSize:"cstu-text-xs"},md:{inputClass:`cstu-min-h-10 ${m.value?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-sm cstu-font-medium",descriptionSize:"cstu-text-sm"},lg:{inputClass:`cstu-min-h-11 ${m.value?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-sm cstu-font-medium",descriptionSize:"cstu-text-sm"},xl:{inputClass:`cstu-min-h-12 ${m.value?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-base cstu-font-medium",descriptionSize:"cstu-text-sm"}},A=e.computed(()=>`${C[h.value].inputClass.split(" ")[0]} cstu-transition-all cstu-duration-300`),D=e.computed(()=>C[h.value].labelSize),S=e.computed(()=>C[h.value].descriptionSize),$=e.computed(()=>{switch(h.value){case"xs":return"cstu-text-xs";case"sm":return"cstu-text-sm";case"md":return"cstu-text-sm";case"lg":return"cstu-text-base";case"xl":return"cstu-text-base";default:return"cstu-text-sm"}}),q=e.computed(()=>re(v.value)),g=e.computed(()=>n.error!==void 0&&n.error!==""||i.value),H=e.computed(()=>p.value==="unstyled"||!te(b.value)&&!g.value?"":g.value?"cstu-border-red-500 hover:cstu-border-red-500 focus-within:cstu-border-red-500 focus-within:cstu-ring-1 focus-within:cstu-ring-red-500":p.value==="default"||p.value==="outline"?`hover:cstu-border-${b.value}-600 focus-within:cstu-border-${b.value}-500 focus-within:cstu-ring-1 focus-within:cstu-ring-${b.value}-500`:""),F=e.computed(()=>p.value==="unstyled"?{}:te(b.value)||g.value?{}:p.value==="default"||p.value==="outline"?{"--border-color":b.value,"border-color":"var(--border-color)"}:p.value==="filled"?{"--bg-color":`${b.value}10`,"background-color":"var(--bg-color)"}:p.value==="light"?{"--bg-color":`${b.value}10`,"--text-color":b.value,"background-color":"var(--bg-color)",color:"var(--text-color)"}:p.value==="subtle"?{"--text-color":b.value,color:"var(--text-color)"}:{}),O=e.computed(()=>{const M={default:"cstu-bg-white cstu-border cstu-transition-colors cstu-duration-150 cstu-px-3",filled:"cstu-bg-gray-100 cstu-border cstu-border-transparent cstu-transition-colors cstu-duration-150 cstu-px-3",light:"cstu-border cstu-transition-colors cstu-duration-150 cstu-px-3",outline:"cstu-bg-white cstu-border cstu-transition-colors cstu-duration-150 cstu-px-3",subtle:"cstu-bg-transparent cstu-transition-colors cstu-duration-150 cstu-px-3",unstyled:"cstu-bg-transparent !cstu-border-0"};if(p.value==="unstyled")return[M[p.value]];const P=g.value?"":p.value==="default"||p.value==="outline"?"cstu-border-gray-300/45":"",N=g.value?"cstu-border-red-500":"";return[M[p.value],P,N,g.value?"hover:cstu-border-red-500":"hover:cstu-border-primary-500",g.value?"focus-within:cstu-border-red-500 focus-within:cstu-ring-1 focus-within:cstu-ring-red-500":"focus-within:cstu-border-primary-500 focus-within:cstu-ring-1 focus-within:cstu-ring-primary-500"]}),R=e.ref(!1),ae=M=>{R.value=!0,c("focus",M)},J=M=>{R.value=!1,c("blur",M)},W=M=>{c("change",M)};return o({textarea:l,focus:()=>{var M;return(M=l.value)==null?void 0:M.focus()},blur:()=>{var M;return(M=l.value)==null?void 0:M.blur()},select:()=>{var M;return(M=l.value)==null?void 0:M.select()},setSelectionRange:(M,P)=>{var N;return(N=l.value)==null?void 0:N.setSelectionRange(M,P)},setRangeText:M=>{var P;return(P=l.value)==null?void 0:P.setRangeText(M)},get value(){var M;return(M=l.value)==null?void 0:M.value},set value(M){l.value&&M!==void 0&&(l.value.value=M)}}),(M,P)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-flex cstu-flex-col cstu-transition-all cstu-duration-300",[n.class,e.unref(m)?"cstu-w-full":"cstu-max-w-[20.5rem]"]])},[n.label||M.$slots.label?(e.openBlock(),e.createElementBlock("div",LI,[e.createElementVNode("label",e.mergeProps({for:n.id||r,class:["cstu-flex cstu-items-center",e.unref(D)]},n.labelProps),[e.renderSlot(M.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(n.label)+" ",1),e.unref(k)||e.unref(u)?(e.openBlock(),e.createElementBlock("span",SI,"*")):e.createCommentVNode("",!0)])],16,II),e.renderSlot(M.$slots,"labelIcon")])):e.createCommentVNode("",!0),e.createElementVNode("div",null,[e.createElementVNode("div",{class:e.normalizeClass(["cstu-flex cstu-items-start cstu-gap-2 cstu-py-2",e.unref(A),e.unref(q),e.unref(O),e.unref(H),{"cstu-opacity-50 cstu-pointer-events-none cstu-cursor-not-allowed":e.unref(s)}]),style:e.normalizeStyle(e.unref(F))},[M.$slots.leftSection?(e.openBlock(),e.createElementBlock("div",zI,[e.renderSlot(M.$slots,"leftSection")])):e.createCommentVNode("",!0),e.createElementVNode("textarea",e.mergeProps({ref_key:"textareaRef",ref:l,id:n.id||r,value:n.modelValue,placeholder:n.placeholder,disabled:e.unref(s),required:e.unref(u),readonly:e.unref(d),rows:e.unref(f),maxlength:n.maxLength,class:["cstu-flex-1 cstu-bg-transparent cstu-outline-none cstu-w-full",e.unref($),e.unref(w),{"cstu-text-gray-500":n.modelValue,"cstu-text-red-500":e.unref(g)&&!n.modelValue}],style:{resize:e.unref(L)},onInput:P[0]||(P[0]=N=>M.$emit("update:modelValue",N.target.value)),onFocus:ae,onBlur:J,onChange:W},n.textareaProps),null,16,qI),M.$slots.rightSection?(e.openBlock(),e.createElementBlock("div",BI,[e.renderSlot(M.$slots,"rightSection")])):e.createCommentVNode("",!0)],6)]),n.description&&!e.unref(g)||M.$slots.description&&!e.unref(g)||e.unref(y)&&n.description||e.unref(y)&&M.$slots.description?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:1,class:"cstu-mt-1"},n.descriptionProps),[e.createElementVNode("p",{class:e.normalizeClass(["cstu-text-gray-500",e.unref(S)])},[e.renderSlot(M.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(n.description),1)])],2)],16)):e.createCommentVNode("",!0),e.unref(g)&&n.error||e.unref(g)&&M.$slots.error||e.unref(y)&&n.error||e.unref(y)&&M.$slots.error?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:2,class:"cstu-mt-1"},n.errorProps),[e.createElementVNode("p",{class:e.normalizeClass(["cstu-text-red-500",e.unref(S)])},[e.renderSlot(M.$slots,"error",{},()=>[e.createTextVNode(e.toDisplayString(n.error),1)])],2)],16)):e.createCommentVNode("",!0)],2))}});/**
13
13
  * @license lucide-vue-next v0.525.0 - ISC
14
14
  *
15
15
  * This source code is licensed under the ISC license.
@@ -1,107 +1 @@
1
- declare type ColorName = 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info' | 'green' | 'yellow' | 'orange' | 'red';
2
-
3
- /**
4
- * Create a theme preset - a predefined theme configuration
5
- */
6
- export declare function createThemePreset(name: string, theme: Partial<ThemeOptions>): ThemePreset;
7
-
8
- /**
9
- * Export configuration as a string that can be written to tailwind.config.js
10
- */
11
- export declare function exportTailwindConfig(theme: ThemeOptions, options?: TailwindConfigOptions): string;
12
-
13
- /**
14
- * Extend the default theme with custom colors
15
- */
16
- export declare function extendTheme(customTheme: Partial<ThemeOptions>): ThemeOptions;
17
-
18
- /**
19
- * Generate complete CSTU color configuration for client-side usage
20
- * Returns static color config matching tailwind.config.js with cstu- prefix
21
- * Usage: cstu-bg-primary-500, cstu-text-danger-600, etc.
22
- */
23
- export declare function generateCstuColorConfig(): Record<string, Record<string, string>>;
24
-
25
- export declare function generatePalette(options: ThemeOptions): Palette;
26
-
27
- /**
28
- * Generate Tailwind safelist patterns for dynamic classes
29
- */
30
- export declare function generateSafelist(palette: Palette): string[];
31
-
32
- /**
33
- * Generate Tailwind color configuration from palette using direct RGB values
34
- */
35
- export declare function generateTailwindColors(palette: Palette): Record<string, Record<string, string>>;
36
-
37
- /**
38
- * Deep merge two theme objects, with the second theme taking precedence
39
- */
40
- export declare function mergeThemes(baseTheme: ThemeOptions, extendTheme: Partial<ThemeOptions>): ThemeOptions;
41
-
42
- /**
43
- * A mapping of color -> shade -> hex string
44
- */
45
- export declare type Palette = Record<ColorName, Record<Shade, string>>;
46
-
47
- export declare type Shade = 50 | 100 | 200 | 250 | 300 | 400 | 450 | 500 | 550 | 575 | 600 | 700 | 800 | 900;
48
-
49
- declare interface TailwindConfigOptions {
50
- content?: string[];
51
- darkMode?: 'media' | 'class';
52
- extendTheme?: Record<string, any>;
53
- plugins?: any[];
54
- }
55
-
56
- export declare interface ThemeOptions {
57
- /** Seed color to generate primary palette. Hex string */
58
- primary?: string;
59
- /** Seed color to generate secondary/gray palette */
60
- secondary?: string;
61
- /** Seed color to generate success palette */
62
- success?: string;
63
- /** Seed color to generate warning palette */
64
- warning?: string;
65
- /** Seed color to generate danger palette */
66
- danger?: string;
67
- /** Seed color to generate info palette */
68
- info?: string;
69
- /** Seed color to generate green palette (legacy) */
70
- green?: string;
71
- /** Seed color to generate yellow palette (legacy) */
72
- yellow?: string;
73
- /** Seed color to generate orange palette (legacy) */
74
- orange?: string;
75
- /** Seed color to generate red palette (legacy) */
76
- red?: string;
77
- }
78
-
79
- /**
80
- * Theme preset interface
81
- */
82
- export declare interface ThemePreset {
83
- name: string;
84
- theme: ThemeOptions;
85
- metadata: {
86
- created: string;
87
- version: string;
88
- description?: string;
89
- author?: string;
90
- };
91
- }
92
-
93
- /**
94
- * Theme validation result
95
- */
96
- export declare interface ThemeValidationResult {
97
- isValid: boolean;
98
- errors: string[];
99
- warnings: string[];
100
- }
101
-
102
- /**
103
- * Validate a theme configuration
104
- */
105
- export declare function validateTheme(theme: Partial<ThemeOptions>): ThemeValidationResult;
106
-
107
1
  export { }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentstudio/ui",
3
- "version": "0.2.21-rc.18",
3
+ "version": "0.2.22-rc.19",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -38,7 +38,7 @@
38
38
  "autoprefixer": "^10.4.14",
39
39
  "postcss": "^8.4.24",
40
40
  "tailwindcss": "^3.4.17",
41
- "typescript": "~5.9.3",
41
+ "typescript": "~6.0.2",
42
42
  "vite": "^4.5.5",
43
43
  "vite-plugin-dts": "^4.3.0",
44
44
  "vue-tsc": "^1.4.2"