@aciole/acyon 0.0.2 → 0.0.3

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/acyon.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("react"),G=require("react-dom");function m(...n){const o=[];for(const t of n)if(t){if(typeof t=="string")o.push(t);else if(Array.isArray(t)){const r=m(...t);r&&o.push(r)}else if(typeof t=="object")for(const r in t)t[r]&&o.push(r)}return o.join(" ")}function en(n){return function(t={}){const r=t.variant??n.defaultVariants?.variant,a=t.size??n.defaultVariants?.size,s=[];if(n.base&&s.push(n.base),r&&n.variants?.[r]&&s.push(n.variants[r]),a&&n.sizes?.[a]&&s.push(n.sizes[a]),n.compound)for(const l of n.compound){const i=l.variant===void 0||l.variant===r,h=l.size===void 0||l.size===a;i&&h&&s.push(l.className)}return t.className&&s.push(t.className),s.filter(Boolean).join(" ")}}const nn=["primary","success","danger","warning","info","neutral"];function O(n){return n?nn.includes(n):!1}function on(n){if(n)return O(n)?n:void 0}function $(n){if(n)return O(n)?n==="neutral"?"var(--border-main)":`var(--color-${n})`:n}function tn(n){if(!n||n==="default")return"var(--text-main)";if(n==="disabled")return"var(--text-muted)";if(n==="subtle")return"var(--text-subtle)";if(n==="muted")return"var(--text-muted)";if(n==="inverse")return"var(--text-inverse)";const o=on(n);return o?`var(--color-${o})`:n}function q({size:n="md",color:o,className:t,label:r="Loading..."}){const a=o?{"--loader-color":$(o)}:{};return e.jsxs("span",{role:"status","aria-label":r,className:m("loader",`loader--${n}`,t),style:a,children:[e.jsx("span",{className:"loader__ring"}),e.jsx("span",{className:"sr-only",children:r})]})}const P=d.forwardRef(({variant:n="solid",size:o="md",loading:t=!1,disabled:r,icon:a,iconRight:s=!1,full:l=!1,color:i="primary",children:h,className:u,style:p,...k},f)=>{const b=r||t,y=O(i)||i==="default"?i:void 0,x=!i||y||i==="default"?void 0:$(i),j=x?{...p,"--btn-base":x,"--btn-bg":x,"--btn-text":"var(--text-inverse)"}:p;return e.jsxs("button",{ref:f,disabled:b,"aria-busy":t,className:m("btn",`btn--${n}`,`btn--${o}`,y&&`btn--color-${y}`,l&&"btn--full",t&&"btn--loading",u),style:j,...k,children:[t&&e.jsx(q,{size:o==="xs"||o==="sm"?"xs":o==="md"?"sm":"md",className:"btn__spinner"}),!t&&a&&!s&&e.jsx("span",{className:"btn__icon btn__icon--left",children:a}),h&&e.jsx("span",{className:"btn__label",children:h}),!t&&a&&s&&e.jsx("span",{className:"btn__icon btn__icon--right",children:a})]})});P.displayName="Button";const A=d.forwardRef(({icon:n,variant:o="solid",size:t="md",loading:r=!1,disabled:a,className:s,style:l,label:i,...h},u)=>e.jsx(P,{ref:u,className:m("icon-btn",`icon-btn--size-${t}`,s),"aria-label":i||(typeof n=="string"?n:"icon-button"),"aria-busy":r,variant:o,size:t,disabled:a||r,style:l,...h,children:r?e.jsx(q,{}):e.jsx("span",{className:"icon-btn__content",children:n})}));A.displayName="IconButton";function Y(n){return n?n.toLowerCase().replace(new RegExp("^\\p{L}","u"),o=>o.toUpperCase()):""}const S=({size:n="md",color:o="default",weight:t="normal",as:r,className:a,children:s,style:l,...i})=>{const h=r||"p",u=O(o)||["default","subtle","muted","inverse"].includes(o)?`text--color-${o}`:void 0;return e.jsx(h,{className:m("text",`text--size-${n}`,u,`text--weight-${t}`,a),style:u?l:{...l,color:tn(o)},...i,children:s})},R=({children:n,direction:o="row",align:t="stretch",justify:r="flex-start",wrap:a="nowrap",gap:s="0",className:l,style:i,as:h,...u})=>{const p=h||"div";return e.jsx(p,{className:m("flex",`flex-direction--${o}`,`flex-align--${t}`,`flex-justify--${r}`,`flex-wrap--${a}`,`flex-gap--${s}`,l),style:i,...u,children:n})},z=({label:n,error:o,hint:t,children:r,full:a=!1,className:s,htmlFor:l})=>e.jsxs(R,{direction:"column",gap:"1",className:m("form-field-root",a&&"form-field--full",s),children:[n&&e.jsx(S,{size:"sm",weight:"medium",as:"label",htmlFor:l,className:"form-field-label",children:Y(n)}),r,o&&e.jsx(S,{as:"span",color:"danger",size:"sm",className:"form-field-message",role:"alert",children:o}),!o&&t&&e.jsx(S,{as:"span",color:"subtle",size:"sm",className:"form-field-message",children:t})]});function ae({size:n=20,width:o,height:t,viewBox:r="0 0 24 24",fill:a="none",stroke:s="currentColor",strokeWidth:l=2,strokeLinecap:i="round",strokeLinejoin:h="round",children:u,...p}){return e.jsx("svg",{width:o??n,height:t??n,viewBox:r,fill:a,stroke:s,strokeWidth:l,strokeLinecap:i,strokeLinejoin:h,"aria-hidden":"true",...p,children:u})}const ie={activity:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",body:'<path d="M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2" />'},"alert-circle":{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",body:`<circle cx="12" cy="12" r="10" />
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("react"),U=require("react-dom");function m(...n){const o=[];for(const t of n)if(t){if(typeof t=="string")o.push(t);else if(Array.isArray(t)){const r=m(...t);r&&o.push(r)}else if(typeof t=="object")for(const r in t)t[r]&&o.push(r)}return o.join(" ")}function on(n){return function(t={}){const r=t.variant??n.defaultVariants?.variant,a=t.size??n.defaultVariants?.size,s=[];if(n.base&&s.push(n.base),r&&n.variants?.[r]&&s.push(n.variants[r]),a&&n.sizes?.[a]&&s.push(n.sizes[a]),n.compound)for(const l of n.compound){const i=l.variant===void 0||l.variant===r,h=l.size===void 0||l.size===a;i&&h&&s.push(l.className)}return t.className&&s.push(t.className),s.filter(Boolean).join(" ")}}const tn=["primary","neutral","success","warning","error"];function G(n){return n?tn.includes(n):!1}function rn(n){if(n)return G(n)?n:void 0}function E(n){if(n)return G(n)?n==="neutral"?"var(--border-main)":n==="error"?"var(--color-danger)":`var(--color-${n})`:n}function sn(n){if(!n||n==="default")return"var(--text-main)";if(n==="disabled")return"var(--text-muted)";if(n==="inverse")return"var(--text-inverse)";const o=rn(n);return o?o==="neutral"?"var(--text-muted)":o==="error"?"var(--color-danger)":`var(--color-${o})`:n}function Y({size:n="medium",color:o,className:t,label:r="Loading..."}){const a=o?{"--loader-color":E(o)}:{};return e.jsxs("span",{role:"status","aria-label":r,className:m("loader",`loader--${n}`,t),style:a,children:[e.jsx("span",{className:"loader__ring"}),e.jsx("span",{className:"sr-only",children:r})]})}const O=d.forwardRef(({variant:n="solid",size:o="medium",loading:t=!1,disabled:r,icon:a,iconRight:s=!1,full:l=!1,color:i="primary",children:h,className:u,style:p,...x},f)=>{const y=r||t,b=G(i)?i:void 0,k=!i||b?void 0:E(i),j=k?{...p,"--btn-base":k,"--btn-bg":k,"--btn-text":"var(--text-inverse)"}:p;return e.jsxs("button",{ref:f,disabled:y,"aria-busy":t,className:m("btn",`btn--${n}`,`btn--${o}`,b&&`btn--color-${b}`,l&&"btn--full",t&&"btn--loading",u),style:j,...x,children:[t&&e.jsx(Y,{size:o==="extraSmall"||o==="small"?"extraSmall":o==="medium"?"small":"medium",className:"btn__spinner"}),!t&&a&&!s&&e.jsx("span",{className:"btn__icon btn__icon--left",children:a}),h&&e.jsx("span",{className:"btn__label",children:h}),!t&&a&&s&&e.jsx("span",{className:"btn__icon btn__icon--right",children:a})]})});O.displayName="Button";const H=d.forwardRef(({icon:n,variant:o="solid",size:t="medium",loading:r=!1,disabled:a,className:s,style:l,label:i,...h},u)=>e.jsx(O,{ref:u,className:m("icon-btn",`icon-btn--size-${t}`,s),"aria-label":i||(typeof n=="string"?n:"icon-button"),"aria-busy":r,variant:o,size:t,disabled:a||r,style:l,...h,children:r?e.jsx(Y,{}):e.jsx("span",{className:"icon-btn__content",children:n})}));H.displayName="IconButton";function X(n){return n?n.toLowerCase().replace(new RegExp("^\\p{L}","u"),o=>o.toUpperCase()):""}const T=({size:n="medium",color:o="default",weight:t="normal",as:r,className:a,children:s,style:l,...i})=>{const h=r||"p",u=G(o)||["default","inverse"].includes(o)?`text--color-${o}`:void 0;return e.jsx(h,{className:m("text",`text--size-${n}`,u,`text--weight-${t}`,a),style:u?l:{...l,color:sn(o)},...i,children:s})},V=({children:n,direction:o="row",align:t="stretch",justify:r="flex-start",wrap:a="nowrap",gap:s="0",className:l,style:i,as:h,...u})=>{const p=h||"div";return e.jsx(p,{className:m("flex",`flex-direction--${o}`,`flex-align--${t}`,`flex-justify--${r}`,`flex-wrap--${a}`,`flex-gap--${s}`,l),style:i,...u,children:n})},D=({label:n,error:o,hint:t,children:r,full:a=!1,className:s,htmlFor:l})=>e.jsxs(V,{direction:"column",gap:"1",className:m("form-field-root",a&&"form-field--full",s),children:[n&&e.jsx(T,{size:"small",weight:"medium",as:"label",htmlFor:l,className:"form-field-label",children:X(n)}),r,o&&e.jsx(T,{as:"span",color:"error",size:"small",className:"form-field-message",role:"alert",children:o}),!o&&t&&e.jsx(T,{as:"span",color:"neutral",size:"small",className:"form-field-message",children:t})]});function ie({size:n=20,width:o,height:t,viewBox:r="0 0 24 24",fill:a="none",stroke:s="currentColor",strokeWidth:l=2,strokeLinecap:i="round",strokeLinejoin:h="round",children:u,...p}){return e.jsx("svg",{width:o??n,height:t??n,viewBox:r,fill:a,stroke:s,strokeWidth:l,strokeLinecap:i,strokeLinejoin:h,"aria-hidden":"true",...p,children:u})}const ce={activity:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",body:'<path d="M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2" />'},"alert-circle":{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",body:`<circle cx="12" cy="12" r="10" />
2
2
  <line x1="12" x2="12" y1="8" y2="12" />
3
3
  <line x1="12" x2="12.01" y1="16" y2="16" />`},"alert-triangle":{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",body:`<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" />
4
4
  <path d="M12 9v4" />
@@ -204,5 +204,5 @@
204
204
  <path d="M2 8.82a15 15 0 0 1 20 0" />
205
205
  <path d="M5 12.859a10 10 0 0 1 14 0" />
206
206
  <path d="M8.5 16.429a5 5 0 0 1 7 0" />`},x:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",body:`<path d="M18 6 6 18" />
207
- <path d="m6 6 12 12" />`},zap:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",body:'<polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2" />'}};function L({name:n,...o}){const t=ie[n];return e.jsx(ae,{viewBox:t.viewBox,fill:t.fill,stroke:t.stroke,strokeWidth:Number(t.strokeWidth),strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin,dangerouslySetInnerHTML:{__html:t.body},...o})}function c(n){return function(t){return e.jsx(L,{name:n,...t})}}const rn=c("activity"),sn=c("alert-circle"),an=c("alert-triangle"),cn=c("align-horizontal"),ln=c("align-justify"),dn=c("app-window"),un=c("arrow-down"),hn=c("arrow-left"),pn=c("arrow-right"),mn=c("arrow-up"),kn=c("badge"),xn=c("battery"),fn=c("bell"),vn=c("bluetooth"),bn=c("book"),yn=c("box"),jn=c("calendar"),gn=c("camera"),Ln=c("check-square"),wn=c("check"),_n=c("chevron-down"),In=c("chevron-left"),Cn=c("chevron-right"),Nn=c("chevron-up"),Mn=c("chevron"),Bn=c("circle-dot"),Sn=c("clock"),Wn=c("close"),Tn=c("cloud"),zn=c("code"),$n=c("component"),An=c("copy"),Dn=c("credit-card"),Hn=c("database"),En=c("download"),Rn=c("edit"),Vn=c("external-link"),Fn=c("eye-off"),Pn=c("eye"),On=c("file-text"),Un=c("file"),Gn=c("filter"),qn=c("folder"),Yn=c("form-input"),Zn=c("ghost"),Xn=c("gift"),Kn=c("git-commit"),Jn=c("github"),Qn=c("grid"),eo=c("grip"),no=c("heading1"),oo=c("heart"),to=c("help-circle"),ro=c("history"),so=c("home"),ao=c("image"),io=c("info"),co=c("lab"),lo=c("laptop"),uo=c("layout-template"),ho=c("layout"),po=c("link"),mo=c("linkedin"),ko=c("list-checks"),xo=c("list-collapse"),fo=c("list-filter"),vo=c("list"),bo=c("loader2"),yo=c("lock"),jo=c("log-in"),go=c("log-out"),Lo=c("mail"),wo=c("map-pin"),_o=c("menu"),Io=c("message-circle"),Co=c("message-square"),No=c("mic"),Mo=c("milestone"),Bo=c("minus"),So=c("monitor"),Wo=c("moon"),To=c("more-horizontal"),zo=c("mouse-pointer"),$o=c("music"),Ao=c("panel-left"),Do=c("panel-top"),Ho=c("panel"),Eo=c("phone"),Ro=c("plus"),Vo=c("rectangle-horizontal"),Fo=c("refresh"),Po=c("rocket"),Oo=c("ruler"),Uo=c("search"),Go=c("server"),qo=c("settings"),Yo=c("share"),Zo=c("shield"),Xo=c("shopping-cart"),Ko=c("sliders-horizontal"),Jo=c("smartphone"),Qo=c("spark"),et=c("sparkles"),nt=c("spinner"),ot=c("square"),tt=c("star"),rt=c("sun"),st=c("table"),at=c("tablet"),it=c("tag"),ct=c("text-cursor"),lt=c("theme-dark"),dt=c("theme-light"),ut=c("toggle-right"),ht=c("trash"),pt=c("type"),mt=c("unlock"),kt=c("upload-cloud"),xt=c("upload"),ft=c("user-circle"),vt=c("user"),bt=c("video"),yt=c("warning"),jt=c("wifi"),gt=c("x"),Lt=c("zap"),Z=d.forwardRef(({label:n,error:o,supportText:t,prefix:r,suffix:a,clearable:s=!1,size:l="md",full:i=!1,className:h,id:u,...p},k)=>{const f=u??(n?`input-${Y(n)}`:void 0),b=d.useRef(null),[,y]=d.useState(0),x=p.value!==void 0,j=String(x?p.value??"":p.defaultValue??b.current?.value??"").length>0,v=w=>{if(b.current=w,typeof k=="function"){k(w);return}k&&(k.current=w)},I=()=>{const w=b.current;if(!w||p.disabled||p.readOnly)return;Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value")?.set?.call(w,""),w.dispatchEvent(new Event("input",{bubbles:!0})),w.dispatchEvent(new Event("change",{bubbles:!0})),y(g=>g+1),w.focus()},C=w=>{p.onInput?.(w),x||y(W=>W+1)},M=s&&j?e.jsx(A,{icon:e.jsx(L,{name:"close",size:12}),"aria-label":"Limpar campo",variant:"ghost",size:"sm",onClick:I,tabIndex:-1,className:"input-field__clear"}):a;return e.jsx(z,{label:n,error:o,hint:t,full:i,htmlFor:f,className:h,children:e.jsxs("div",{className:m("input-field",`input-field--${l}`,o&&"input-field--error",p.disabled&&"input-field--disabled"),children:[r&&e.jsx("span",{className:"input-field__adornment input-field__adornment--prefix",children:r}),e.jsx("input",{ref:v,id:f,className:m("input-field__input",!!r&&"input-field__input--with-prefix",!!M&&"input-field__input--with-suffix"),"aria-invalid":!!o,"aria-describedby":o?`${f}-error`:t?`${f}-supportText`:void 0,...p,onInput:C}),M&&e.jsx("span",{className:"input-field__adornment input-field__adornment--suffix",children:M})]})})});Z.displayName="Input";const ce=d.forwardRef(({label:n,error:o,supportText:t,full:r=!1,resize:a="vertical",className:s,id:l,rows:i=4,style:h,...u},p)=>{const k=l??(n?`textarea-${Y(n)}`:void 0);return e.jsx(z,{label:n,error:o,hint:t,full:r,htmlFor:k,className:s,children:e.jsx("textarea",{ref:p,id:k,rows:i,className:m("textarea",o&&"textarea--error"),"aria-invalid":!!o,"aria-describedby":o?`${k}-error`:t?`${k}-supportText`:void 0,style:{resize:a,...h??{}},...u})})});ce.displayName="TextArea";const le=d.forwardRef(({onSearch:n,loading:o=!1,onChange:t,...r},a)=>{const s=l=>{t?.(l),n?.(l.target.value)};return e.jsx(Z,{ref:a,type:"search",clearable:!0,prefix:o?e.jsx(q,{size:"xs"}):e.jsx(L,{name:"search",size:16}),onChange:s,...r})});le.displayName="Search";const wt=["Dom","Seg","Ter","Qua","Qui","Sex","Sab"];function J(n){if(!n)return null;const[o,t,r]=n.split("-").map(Number);return!o||!t||!r?null:new Date(o,t-1,r)}function _t(n){if(!n)return"";const o=String(n.getDate()).padStart(2,"0"),t=String(n.getMonth()+1).padStart(2,"0"),r=n.getFullYear();return`${o}/${t}/${r}`}function re(n){if(!n)return"";const o=String(n.getDate()).padStart(2,"0"),t=String(n.getMonth()+1).padStart(2,"0");return`${n.getFullYear()}-${t}-${o}`}function It(n,o){return!n||!o?!1:n.getFullYear()===o.getFullYear()&&n.getMonth()===o.getMonth()&&n.getDate()===o.getDate()}function Ct(n){const o=new Date(n.getFullYear(),n.getMonth(),1),t=new Date(n.getFullYear(),n.getMonth()+1,0),r=o.getDay(),a=t.getDate(),s=[];for(let i=r-1;i>=0;i-=1){const h=new Date(o);h.setDate(o.getDate()-(i+1)),s.push({date:h,outside:!0})}for(let i=1;i<=a;i+=1)s.push({date:new Date(n.getFullYear(),n.getMonth(),i),outside:!1});const l=s.length<=35?35:42;for(;s.length<l;){const i=s[s.length-1]?.date??t,h=new Date(i);h.setDate(i.getDate()+1),s.push({date:h,outside:!0})}return s}const de=d.forwardRef(({label:n,error:o,supportText:t,full:r=!1,className:a,id:s,value:l,defaultValue:i,onChange:h,placeholder:u="dd/mm/aaaa",disabled:p,size:k,prefix:f,suffix:b,clearable:y,...x},j)=>{const v=s??(n?`datepicker-${Y(n)}`:void 0),I=d.useRef(null),C=d.useMemo(()=>re(new Date),[]),M=d.useMemo(()=>J(l??i??C),[i,C,l]),[w,W]=d.useState(i??C),[g,B]=d.useState(!1),D=J(l??w),[F,H]=d.useState(M??new Date),K=l!==void 0;d.useEffect(()=>{const N=J(l??w);N&&H(N)},[w,l]),d.useEffect(()=>{if(!g)return;const N=E=>{I.current&&!I.current.contains(E.target)&&B(!1)};return document.addEventListener("mousedown",N),()=>document.removeEventListener("mousedown",N)},[g]);const _=N=>{K||W(N);const E={target:{value:N,id:v,name:x.name},currentTarget:{value:N,id:v,name:x.name}};h?.(E)},T=N=>{const E=re(N);_(E),H(N)},Ze=()=>{_("")},Xe=()=>{B(!1)},Ke=F.toLocaleDateString("pt-BR",{month:"long",year:"numeric"}),Je=Ct(F);return e.jsx(z,{label:n,error:o,hint:t,full:r,htmlFor:v,className:a,children:e.jsxs("div",{ref:I,className:"date-picker",children:[e.jsxs("div",{className:m("date-picker__field",g&&"date-picker__field--open",o&&"date-picker__field--error",p&&"date-picker__field--disabled"),children:[e.jsx("input",{...x,ref:j,id:v,type:"text",value:_t(D),placeholder:u,readOnly:!0,disabled:p,className:"date-picker__input",onClick:()=>!p&&B(!0)}),e.jsx("button",{type:"button",className:"date-picker__toggle",onClick:()=>!p&&B(N=>!N),"aria-label":"Abrir calendario",disabled:p,children:e.jsx(L,{name:"calendar",size:18})})]}),g?e.jsxs("div",{className:"date-picker__popover",role:"dialog","aria-modal":"false",children:[e.jsxs("div",{className:"date-picker__header",children:[e.jsx("button",{type:"button",className:"date-picker__nav",onClick:()=>H(N=>new Date(N.getFullYear(),N.getMonth()-1,1)),"aria-label":"Mes anterior",children:e.jsx(L,{name:"chevron-left",size:16})}),e.jsx("span",{className:"date-picker__month",children:Ke}),e.jsx("button",{type:"button",className:"date-picker__nav",onClick:()=>H(N=>new Date(N.getFullYear(),N.getMonth()+1,1)),"aria-label":"Proximo mes",children:e.jsx(L,{name:"chevron-right",size:16})})]}),e.jsx("div",{className:"date-picker__weekdays",children:wt.map(N=>e.jsx("span",{className:"date-picker__weekday",children:N},N))}),e.jsx("div",{className:"date-picker__grid",children:Je.map(({date:N,outside:E})=>{const Qe=It(N,D);return e.jsx("button",{type:"button",className:m("date-picker__day",E&&"date-picker__day--outside",Qe&&"date-picker__day--selected"),onClick:()=>T(N),children:N.getDate()},N.toISOString())})}),e.jsxs("div",{className:"date-picker__footer",children:[e.jsx(P,{variant:"ghost",onClick:Ze,children:"Limpar"}),e.jsx(P,{onClick:Xe,children:"Concluido"})]})]}):null]})})});de.displayName="DatePicker";const ue=d.forwardRef(({options:n,value:o,defaultValue:t,onChange:r,label:a,error:s,supportText:l,size:i="md",placeholder:h="Select...",full:u=!1,disabled:p=!1,searchable:k=!1,searchPlaceholder:f="Search...",className:b,...y},x)=>{const j=d.useId(),v=d.useRef(null),I=d.useRef(null),[C,M]=d.useState(!1),[w,W]=d.useState(""),[g,B]=d.useState(t??""),D=o??g;d.useEffect(()=>{if(!C){W("");return}k&&I.current?.focus()},[C,k]),d.useEffect(()=>{const _=T=>{v.current&&!v.current.contains(T.target)&&M(!1)};return document.addEventListener("mousedown",_),()=>document.removeEventListener("mousedown",_)},[]);const F=n.find(_=>_.value===D),H=d.useMemo(()=>!k||!w?n:n.filter(_=>(_.searchValue??(typeof _.label=="string"?_.label:_.value)).toLowerCase().includes(w.toLowerCase())),[n,k,w]),K=(_,T)=>{T||(o===void 0&&B(_),r?.(_),M(!1))};return e.jsx(z,{label:a,error:s,hint:l,full:u,className:b,htmlFor:j,children:e.jsxs("div",{ref:v,className:m("select",u&&"select--full"),children:[e.jsxs("div",{ref:x,id:j,role:"combobox","aria-expanded":C,"aria-controls":`${j}-listbox`,"aria-haspopup":"listbox",tabIndex:p?-1:0,className:m("select__trigger",`select__trigger--${i}`,C&&"select__trigger--open",s&&"select__trigger--error",p&&"select__trigger--disabled"),onClick:()=>!p&&M(_=>!_),onKeyDown:_=>{p||((_.key==="Enter"||_.key===" ")&&(_.preventDefault(),M(T=>!T)),_.key==="Escape"&&M(!1))},...y,children:[e.jsx("span",{className:m("select__value",!F&&"select__value--placeholder"),children:F?.label??h}),e.jsx("span",{className:"select__icon",children:e.jsx(L,{name:"chevron-down",size:16})})]}),C&&e.jsxs("div",{className:"select__menu",children:[k&&e.jsxs("div",{className:"select__search",children:[e.jsx("span",{className:"select__search-icon",children:e.jsx(L,{name:"search",size:14})}),e.jsx("input",{ref:I,className:"select__search-input",value:w,placeholder:f,onChange:_=>W(_.target.value)})]}),e.jsx("ul",{id:`${j}-listbox`,className:"select__list",role:"listbox",children:H.length>0?H.map(_=>{const T=_.value===D;return e.jsxs("li",{role:"option","aria-selected":T,className:m("select__option",T&&"select__option--selected",_.disabled&&"select__option--disabled"),onClick:()=>K(_.value,_.disabled),children:[e.jsx("span",{children:_.label}),T&&e.jsx("span",{className:"select__option-check",children:e.jsx(L,{name:"check",size:14})})]},_.value)}):e.jsx("li",{className:"select__empty",children:"No results found"})})]})]})})});ue.displayName="Select";const he=d.forwardRef(({options:n,value:o,defaultValue:t=[],onChange:r,label:a,error:s,supportText:l,placeholder:i="Select options...",full:h=!1,disabled:u=!1,className:p,...k},f)=>{const b=d.useId(),y=d.useRef(null),[x,j]=d.useState(!1),[v,I]=d.useState(t),C=o??v;d.useEffect(()=>{const g=B=>{y.current&&!y.current.contains(B.target)&&j(!1)};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[]);const M=d.useMemo(()=>n.filter(g=>C.includes(g.value)),[n,C]),w=g=>{o===void 0&&I(g),r?.(g)},W=(g,B)=>{if(!B){if(C.includes(g)){w(C.filter(D=>D!==g));return}w([...C,g])}};return e.jsx(z,{label:a,error:s,hint:l,full:h,className:p,htmlFor:b,children:e.jsxs("div",{ref:y,className:m("multiselect",h&&"multiselect--full"),children:[e.jsxs("div",{ref:f,id:b,role:"combobox","aria-expanded":x,"aria-controls":`${b}-listbox`,"aria-haspopup":"listbox",tabIndex:u?-1:0,className:m("multiselect__trigger",x&&"multiselect__trigger--open",s&&"multiselect__trigger--error",u&&"multiselect__trigger--disabled"),onClick:()=>!u&&j(g=>!g),onKeyDown:g=>{u||((g.key==="Enter"||g.key===" ")&&(g.preventDefault(),j(B=>!B)),g.key==="Escape"&&j(!1))},...k,children:[e.jsx("div",{className:"multiselect__values",children:M.length>0?M.map(g=>e.jsxs("span",{className:"multiselect__tag",children:[e.jsx("span",{className:"multiselect__tag-label",children:g.label}),e.jsx("button",{type:"button",className:"multiselect__tag-remove",onClick:B=>{B.stopPropagation(),W(g.value)},"aria-label":`Remove ${g.label}`,children:e.jsx(L,{name:"close",size:12})})]},g.value)):e.jsx("span",{className:"multiselect__placeholder",children:i})}),e.jsx("span",{className:"multiselect__icon",children:e.jsx(L,{name:"chevron-down",size:16})})]}),x&&e.jsx("ul",{id:`${b}-listbox`,className:"multiselect__menu",role:"listbox","aria-multiselectable":"true",children:n.length>0?n.map(g=>{const B=C.includes(g.value);return e.jsxs("li",{role:"option","aria-selected":B,className:m("multiselect__option",B&&"multiselect__option--selected",g.disabled&&"multiselect__option--disabled"),onClick:()=>W(g.value,g.disabled),children:[e.jsx("span",{className:"multiselect__checkbox",children:B?e.jsx(L,{name:"check",size:12}):null}),e.jsx("span",{children:g.label})]},g.value)}):e.jsx("li",{className:"multiselect__empty",children:"No options available"})})]})})});he.displayName="MultiSelect";function Nt(n,o){typeof n=="function"?n(o):n&&(n.current=o)}const pe=d.forwardRef(({label:n,indeterminate:o=!1,supportText:t,className:r,id:a,disabled:s,color:l="primary",style:i,...h},u)=>{const p=d.useId(),k=a??`checkbox-${p}`,f=d.useRef(null);d.useEffect(()=>{f.current&&(f.current.indeterminate=o)},[o]);const b=y=>{f.current=y,Nt(u,y)};return e.jsx(z,{hint:t,full:!0,className:r,htmlFor:k,children:e.jsxs("label",{className:m("checkbox",s&&"checkbox--disabled"),style:{"--checkbox-color":$(l),...i??{}},children:[e.jsxs("span",{className:"checkbox__control",children:[e.jsx("input",{ref:b,id:k,type:"checkbox",className:"checkbox__input",disabled:s,"aria-checked":o?"mixed":void 0,...h}),e.jsx("span",{className:"checkbox__box","aria-hidden":"true",children:e.jsx("span",{className:"checkbox__icon",children:o?e.jsx(L,{name:"minus"}):e.jsx(L,{name:"check"})})})]}),n&&e.jsx("span",{className:"checkbox__label",children:n})]})})});pe.displayName="Checkbox";const me=d.forwardRef(({label:n,description:o,className:t,disabled:r,error:a,style:s,color:l="primary",id:i,...h},u)=>{const p=d.useId(),k=i??`radio-${p}`;return e.jsx(z,{full:!0,className:t,htmlFor:k,children:e.jsxs("label",{className:m("radio",r&&"radio--disabled",a&&"radio--error"),style:{"--radio-color":$(l),...s??{}},children:[e.jsxs("span",{className:"radio__input-container",children:[e.jsx("input",{ref:u,id:k,type:"radio",className:"radio__input",disabled:r,...h}),e.jsx("span",{className:"radio__control",children:e.jsx("span",{className:"radio__dot"})})]}),(n||o)&&e.jsxs("span",{className:"radio__content",children:[n&&e.jsx("span",{className:"radio__label",children:n}),o&&e.jsx("span",{className:"radio__description",children:o})]})]})})});me.displayName="Radio";const Mt=({value:n,defaultValue:o,onChange:t,min:r=0,max:a=100,label:s,supportText:l,className:i,id:h,...u})=>{const p=d.useId(),k=h??`slider-${p}`,[f,b]=d.useState(Number(n??o??0)),y=n!==void 0?Number(n):f,x=(y-Number(r))/(Number(a)-Number(r))*100;return e.jsx(z,{label:s,hint:l,full:!0,className:i,htmlFor:k,children:e.jsxs("div",{className:"slider",children:[e.jsx("div",{className:"slider__track",children:e.jsx("div",{className:"slider__fill",style:{width:`${x}%`}})}),e.jsx("input",{id:k,type:"range",min:r,max:a,value:y,onChange:j=>{const v=Number(j.target.value);n===void 0&&b(v),t?.(j)},className:"slider__input",...u}),e.jsx("div",{className:"slider__value",children:y})]})})},Bt=({onFileSelect:n,accept:o,multiple:t=!1,disabled:r=!1,maxSize:a,title:s="Drag and drop a file or click to upload",description:l="Supported files depend on the accept property.",className:i,...h})=>{const u=d.useRef(null),[p,k]=d.useState(!1),[f,b]=d.useState([]),[y,x]=d.useState(null),j=v=>{x(null);let I=v;a&&v.filter(w=>w.size>a).length>0&&(x(`Some files exceed ${Math.round(a/1024/1024)}MB.`),I=v.filter(w=>w.size<=a)),!t&&I.length>1&&(I=[I[0]]);const C=t?[...f,...I]:I;b(C),n?.(C)};return e.jsxs("div",{className:m("file-upload",i),...h,children:[e.jsxs("div",{className:m("file-upload__dropzone",p&&"file-upload__dropzone--dragging",r&&"file-upload__dropzone--disabled",y&&"file-upload__dropzone--error"),onDragEnter:v=>{v.preventDefault(),r||k(!0)},onDragOver:v=>{v.preventDefault(),r||k(!0)},onDragLeave:v=>{v.preventDefault(),k(!1)},onDrop:v=>{v.preventDefault(),k(!1),r||j(Array.from(v.dataTransfer.files))},onClick:()=>!r&&u.current?.click(),children:[e.jsx("input",{ref:u,type:"file",className:"file-upload__input",onChange:v=>v.target.files&&j(Array.from(v.target.files)),accept:o,multiple:t,disabled:r}),e.jsxs("div",{className:"file-upload__content",children:[e.jsx("div",{className:"file-upload__icon",children:e.jsx(L,{name:"upload",size:20})}),e.jsx(S,{weight:"medium",children:s}),e.jsx(S,{size:"sm",color:"subtle",children:l})]})]}),y&&e.jsx(S,{size:"sm",color:"danger",children:y}),f.length>0&&e.jsx("ul",{className:"file-upload__list",children:f.map((v,I)=>e.jsxs("li",{className:"file-upload__item",children:[e.jsx("span",{className:"file-upload__file-name",children:v.name}),e.jsx("button",{type:"button",className:"file-upload__remove",onClick:()=>{const C=f.filter((M,w)=>w!==I);b(C),n?.(C)},children:e.jsx(L,{name:"close",size:14})})]},`${v.name}-${I}`))})]})};function V(n,o){const t=d.forwardRef(({weight:r="bold",className:a,children:s,...l},i)=>d.createElement(n,{ref:i,className:m("heading",o,`heading--weight-${r}`,a),...l},s));return t.displayName=n.charAt(0).toUpperCase()+n.slice(1),t}const ke=V("h1","heading--h1"),Q=V("h2","heading--h2"),St=V("h3","heading--h3"),xe=V("h4","heading--h4"),fe=V("h5","heading--h5"),Wt=V("h6","heading--h6");function Tt({padding:n="md",variant:o="default",as:t,children:r,className:a,...s}){const l=t||"div";return e.jsx(l,{className:m("card",`card--${o}`,`card--pad-${n}`,a),...s,children:r})}function zt({title:n,description:o,icon:t,action:r,children:a,className:s,...l}){return e.jsxs("div",{className:m("card-header",s),...l,children:[e.jsxs("div",{className:"card-header__content",children:[(n||t)&&e.jsxs("div",{className:"card-header__title-wrapper",children:[t&&e.jsx("span",{className:"card-header__icon",children:t}),n&&e.jsx(fe,{weight:"semibold",children:n})]}),o&&e.jsx(S,{size:"sm",color:"subtle",children:o}),a]}),r&&e.jsx("div",{className:"card-header__action",children:r})]})}function $t({children:n,className:o,...t}){return e.jsx("div",{className:m("card-body",o),...t,children:n})}function At({children:n,className:o,...t}){return e.jsx("div",{className:m("card-footer",o),...t,children:n})}const Dt=d.forwardRef(function({as:o,padding:t="0",rounded:r="none",shadow:a="none",surface:s="default",border:l=!1,className:i,children:h,...u},p){const k=o||"div";return e.jsx(k,{ref:p,className:m("box",`box-padding--${t}`,`box-rounded--${r}`,`box-shadow--${a}`,`box-surface--${s}`,l&&"box--border",i),...u,children:h})}),Ht=({children:n,columns:o=1,gap:t="4",className:r,style:a,as:s,...l})=>{const i=s||"div";return e.jsx(i,{className:m("grid",`grid-cols--${o}`,`grid-gap--${t}`,r),style:a,...l,children:n})},Et=({children:n,size:o="lg",className:t,style:r})=>e.jsx("div",{className:m("container",`container--${o}`,t),style:r,children:n}),Rt=({size:n="1rem",axis:o="vertical",style:t})=>{const r=o==="horizontal"?n:1,a=o==="vertical"?n:1;return e.jsx("span",{style:{display:"block",width:r,minWidth:r,height:a,minHeight:a,...t},"aria-hidden":"true"})};function Vt({orientation:n="horizontal",label:o,className:t,...r}){return e.jsx("div",{role:"separator","aria-orientation":n,className:m("divider",`divider--${n}`,o&&"divider--labeled",t),...r,children:o&&n==="horizontal"&&e.jsx("span",{className:"divider__label",children:o})})}const ve=d.createContext({variant:"default"});function Ft({children:n,variant:o="default",className:t,...r}){return e.jsx(ve.Provider,{value:{variant:o},children:e.jsx("div",{className:m("list",`list--${o}`,t),role:"list",...r,children:n})})}function Pt({children:n,description:o,startContent:t,endContent:r,active:a=!1,disabled:s=!1,className:l,onClick:i,...h}){const{variant:u}=d.useContext(ve),p=u==="checklist"&&!t?e.jsx(L,{name:"check",size:16}):t;return e.jsxs("div",{className:m("list-item",a&&"list-item--active",i&&!s&&"list-item--clickable",s&&"list-item--disabled",l),role:"listitem",tabIndex:s?-1:i?0:void 0,onClick:s?void 0:i,...h,children:[p&&e.jsx("div",{className:"list-item__start",children:p}),e.jsxs("div",{className:"list-item__content",children:[e.jsx(S,{as:"span",weight:"medium",className:"list-item__title",children:n}),o&&e.jsx(S,{as:"span",size:"sm",color:"subtle",className:"list-item__description",children:o})]}),r&&e.jsx("div",{className:"list-item__end",children:r})]})}const be=Object.assign(Ft,{Item:Pt});be.displayName="List";function Ot(n,o){const t=Array.isArray(o)?o:o?[o]:[],[r,a]=d.useState(t);return{openItems:r,toggle:l=>{a(i=>{const h=i.includes(l);return n==="single"?h?[]:[l]:h?i.filter(u=>u!==l):[...i,l]})}}}const ye=({title:n,children:o,isOpen:t=!1,onToggle:r,id:a,className:s,...l})=>e.jsxs("div",{className:m("accordion-item",t&&"accordion-item--open",s),...l,children:[e.jsxs("button",{className:"accordion-item__trigger",onClick:r,"aria-expanded":t,"aria-controls":`accordion-content-${a}`,id:`accordion-trigger-${a}`,type:"button",children:[e.jsx("span",{className:"accordion-item__title",children:n}),e.jsx("span",{className:"accordion-item__icon",children:e.jsx(L,{name:"chevron-down",size:16})})]}),e.jsx("div",{className:"accordion-item__content",id:`accordion-content-${a}`,role:"region","aria-labelledby":`accordion-trigger-${a}`,hidden:!t,children:e.jsx("div",{className:"accordion-item__content-inner",children:o})})]}),je=({children:n,type:o="single",defaultValue:t,className:r,...a})=>{const{openItems:s,toggle:l}=Ot(o,t);return e.jsx("div",{className:m("accordion",r),...a,children:d.Children.map(n,(i,h)=>{if(!d.isValidElement(i))return i;const u=i.props.id??`accordion-item-${h}`;return d.cloneElement(i,{id:u,isOpen:s.includes(u),onToggle:()=>l(u)})})})};je.Item=ye;const ge=({size:n="sm",weight:o="medium",block:t=!1,children:r,className:a,...s})=>e.jsx("code",{className:m("code",`code--${n}`,`code--${o}`,t&&"code--block",a),...s,children:r});ge.displayName="Code";const X=({color:n="primary",underline:o=!1,active:t,as:r,className:a,children:s,href:l,to:i,style:h,...u})=>{const p=typeof window<"u"?window.location.pathname:"",k=i??l,f=r||"a",b=j=>{const v=j.split("?")[0].split("#")[0];return v.endsWith("/")&&v!=="/"?v.slice(0,-1):v},y=k&&p?b(p)===b(k):!1,x=t??y;return e.jsx(f,{className:m("link",o&&"link--underline",x&&"link--active",a),style:{"--link-color":$(n),...h??{}},href:k,"aria-current":x?"page":void 0,...u,children:s})};X.displayName="Link";const Le=d.forwardRef(({children:n,variant:o="soft",color:t="primary",size:r="md",className:a,...s},l)=>{const i=O(t)?t:void 0;return e.jsx("span",{ref:l,className:m("badge",`badge--${o}`,i&&`badge--${i}`,`badge--${r}`,a),style:i?void 0:{"--badge-color":$(t)},...s,children:n})});Le.displayName="Badge";function Ut({children:n,variant:o="soft",size:t="md",color:r="primary",leftIcon:a,rightIcon:s,closable:l,onRemove:i,className:h,style:u,...p}){const k=l||!!i;return e.jsxs("span",{className:m("tag",`tag--variant-${o}`,`tag--size-${t}`,h),style:{"--tag-color":$(r),...u??{}},...p,children:[a&&e.jsx("span",{className:"tag__icon",children:a}),e.jsx("span",{className:"tag__label",children:n}),s&&e.jsx("span",{className:"tag__icon",children:s}),k&&e.jsx("button",{type:"button",className:"tag__remove",onClick:i,"aria-label":"Remove tag",children:"x"})]})}const ee=d.forwardRef(({src:n,name:o,size:t="md",status:r,className:a,...s},l)=>{const i=h=>{if(!h)return"";const u=h.split(" ");return u.length===1?u[0].substring(0,2):(u[0][0]+u[u.length-1][0]).toUpperCase()};return e.jsxs("div",{ref:l,className:m("avatar",`avatar--${t}`,a),...s,children:[n?e.jsx("img",{src:n,alt:o,className:"avatar-image"}):e.jsx("span",{className:"avatar-initials",children:i(o)}),r&&e.jsx("span",{className:m("avatar-status",`avatar-status--${r}`)})]})});ee.displayName="Avatar";const ne=({width:n,height:o,circle:t=!1,radius:r,animated:a=!0,className:s,style:l,...i})=>{const h={width:typeof n=="number"?`${n}px`:n,height:typeof o=="number"?`${o}px`:o,borderRadius:t?"50%":typeof r=="number"?`${r}px`:r,...l};return e.jsx("div",{className:m("skeleton",t&&"skeleton--circle",a&&"skeleton--animated",s),style:h,...i})};ne.displayName="Skeleton";const Gt=({src:n,alt:o,objectFit:t="cover",radius:r="md",className:a,style:s,fallback:l,...i})=>{const[h,u]=d.useState(!1),[p,k]=d.useState(!1);return p&&l?e.jsx(e.Fragment,{children:l}):e.jsxs("div",{className:m("image-wrapper",a),style:s,children:[!h&&!p&&e.jsx(ne,{className:m("image-skeleton",`image-radius--${r}`),style:{width:"100%",height:"100%"}}),e.jsx("img",{src:n,alt:o,className:m("image",`image-fit--${t}`,`image-radius--${r}`,h&&"image--loaded"),onLoad:()=>u(!0),onError:()=>k(!0),...i})]})},we=d.forwardRef(({label:n,size:o="md",className:t,disabled:r,...a},s)=>e.jsxs("label",{className:m("switch-wrapper",`switch--${o}`,r&&"switch-wrapper--disabled",t),children:[e.jsx("input",{type:"checkbox",className:"switch-input",disabled:r,ref:s,...a}),e.jsx("span",{className:"switch-track",children:e.jsx("span",{className:"switch-thumb"})}),n&&e.jsx("span",{className:"switch-label",children:n})]}));we.displayName="Switch";const _e=({currentPage:n,totalPages:o,onPageChange:t,showControls:r=!0,className:a,...s})=>{const l=d.useMemo(()=>{const i=[],h=Math.max(1,n-1),u=Math.min(o,n+1);h>1&&(i.push(1),h>2&&i.push("dots-start"));for(let p=h;p<=u;p+=1)i.push(p);return u<o&&(u<o-1&&i.push("dots-end"),i.push(o)),i},[n,o]);return e.jsxs("nav",{className:m("pagination",a),"aria-label":"Pagination",...s,children:[r&&e.jsx("button",{type:"button",className:m("pagination__item",n===1&&"pagination__item--disabled"),onClick:()=>t(n-1),disabled:n===1,"aria-label":"Previous page",children:e.jsx(L,{name:"chevron-left",size:16})}),l.map((i,h)=>{if(typeof i=="string")return e.jsx("span",{className:"pagination__dots",children:"..."},`${i}-${h}`);const u=i===n;return e.jsx("button",{type:"button",className:m("pagination__item",u&&"pagination__item--active"),onClick:()=>!u&&t(i),"aria-current":u?"page":void 0,children:i},i)}),r&&e.jsx("button",{type:"button",className:m("pagination__item",n===o&&"pagination__item--disabled"),onClick:()=>t(n+1),disabled:n===o,"aria-label":"Next page",children:e.jsx(L,{name:"chevron-right",size:16})})]})};_e.displayName="Pagination";const qt=({icon:n,title:o,description:t,action:r,className:a,...s})=>e.jsxs("div",{className:m("empty-state",a),...s,children:[n&&e.jsx("div",{className:"empty-state__icon",children:n}),e.jsx(xe,{children:o}),t&&e.jsx(S,{color:"subtle",children:t}),r&&e.jsx("div",{className:"empty-state__action",children:r})]}),Ie=({open:n,onClose:o,title:t,description:r,children:a,footer:s,size:l="md",closeOnOverlayClick:i=!0,className:h})=>{const[u,p]=d.useState(!1);return d.useEffect(()=>{if(!n)return;const k=f=>{f.key==="Escape"&&o()};return document.addEventListener("keydown",k),document.body.style.overflow="hidden",p(!0),()=>{document.removeEventListener("keydown",k),document.body.style.overflow=""}},[n,o]),!n||!u?null:G.createPortal(e.jsx("div",{className:"modal-overlay",onClick:i?o:void 0,children:e.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":t?"modal-title":void 0,"aria-describedby":r?"modal-description":void 0,tabIndex:-1,className:m("modal",`modal--${l}`,h),onClick:k=>k.stopPropagation(),children:[(t||r)&&e.jsxs("div",{className:"modal-header",children:[e.jsxs("div",{children:[t&&e.jsx(Q,{id:"modal-title",className:"modal-title",children:t}),r&&e.jsx("p",{id:"modal-description",className:"modal-description",children:r})]}),e.jsx(A,{icon:e.jsx(L,{name:"close",size:16}),"aria-label":"Close modal",variant:"ghost",color:"default",size:"sm",onClick:o})]}),a&&e.jsx("div",{className:"modal-body",children:a}),s&&e.jsx("div",{className:"modal-footer",children:s})]})}),document.body)};Ie.displayName="Modal";const Ce=({isOpen:n,onClose:o,title:t,placement:r="right",children:a,footer:s,size:l="md",className:i,closeOnOverlayClick:h=!0})=>{const[u,p]=d.useState(!1);return d.useEffect(()=>(p(!0),n?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[n]),u?G.createPortal(e.jsxs(e.Fragment,{children:[n&&e.jsx("div",{className:"drawer-overlay",onClick:h?o:void 0}),e.jsxs("div",{className:m("drawer",`drawer--${r}`,`drawer--size-${l}`,n&&"drawer--open",i),role:"dialog","aria-modal":"true","aria-hidden":!n,children:[e.jsxs("div",{className:"drawer-header",children:[t?e.jsx(Q,{className:"drawer-title",children:t}):e.jsx("span",{}),e.jsx(A,{icon:e.jsx(L,{name:"close",size:16}),variant:"ghost",size:"sm",onClick:o,"aria-label":"Fechar painel"})]}),e.jsx("div",{className:"drawer-body",children:a}),s&&e.jsx("div",{className:"drawer-footer",children:s})]})]}),document.body):null};Ce.displayName="Drawer";function Yt({content:n,placement:o="top",children:t,delay:r=300}){const a=d.useId(),s=d.useRef(null),l=d.useRef(),[i,h]=d.useState(!1),[u,p]=d.useState({top:0,left:0}),k=d.useCallback(()=>{if(!s.current)return;const x=s.current.getBoundingClientRect(),j=10;if(o==="top"){p({top:x.top+window.scrollY-j,left:x.left+x.width/2+window.scrollX});return}if(o==="bottom"){p({top:x.bottom+window.scrollY+j,left:x.left+x.width/2+window.scrollX});return}if(o==="left"){p({top:x.top+x.height/2+window.scrollY,left:x.left+window.scrollX-j});return}p({top:x.top+x.height/2+window.scrollY,left:x.right+window.scrollX+j})},[o]),f=d.useCallback(()=>{l.current=window.setTimeout(()=>{k(),h(!0)},r)},[r,k]),b=d.useCallback(()=>{window.clearTimeout(l.current),h(!1)},[]);d.useEffect(()=>{if(!i)return;const x=()=>k();return window.addEventListener("scroll",x,!0),window.addEventListener("resize",x),()=>{window.removeEventListener("scroll",x,!0),window.removeEventListener("resize",x)}},[i,k]);const y=d.cloneElement(t,{ref:s,onMouseEnter:x=>{t.props.onMouseEnter?.(x),f()},onMouseLeave:x=>{t.props.onMouseLeave?.(x),b()},onFocus:x=>{t.props.onFocus?.(x),f()},onBlur:x=>{t.props.onBlur?.(x),b()},"aria-describedby":i?a:t.props["aria-describedby"]});return e.jsxs(e.Fragment,{children:[y,i&&G.createPortal(e.jsx("div",{id:a,className:m("tooltip",`tooltip--${o}`),style:{top:u.top,left:u.left},role:"tooltip",children:n}),document.body)]})}const Ne=d.createContext(null),se={success:e.jsx(L,{name:"check",size:16}),warning:e.jsx(L,{name:"warning",size:16}),danger:e.jsx(L,{name:"close",size:16}),primary:e.jsx(L,{name:"info",size:16})};function Zt({toast:n,onDismiss:o}){const[t,r]=d.useState(!1),a=d.useCallback(()=>{r(!0),setTimeout(()=>o(n.id),250)},[n.id,o]);d.useEffect(()=>{const i=setTimeout(a,n.duration??4e3);return()=>clearTimeout(i)},[a,n.duration]);const s=n.color??"primary",l=se[s]||se.primary;return e.jsxs("div",{className:m("toast",`toast--${s}`,t&&"toast--exiting"),children:[e.jsx("span",{className:"toast-icon",children:l}),e.jsxs("div",{className:"toast-content",children:[e.jsx("p",{className:"toast-title",children:n.title}),n.description&&e.jsx("p",{className:"toast-description",children:n.description})]}),e.jsx(A,{icon:e.jsx(L,{name:"close",size:14}),"aria-label":"Dismiss notification",variant:"ghost",size:"sm",onClick:a,className:"toast-close"})]})}const Me=({children:n,position:o="top-right",maxToasts:t=5})=>{const[r,a]=d.useState(!1),[s,l]=d.useState([]);d.useEffect(()=>{a(!0)},[]);const i=d.useCallback(u=>{const p=`toast-${Date.now()}-${Math.random().toString(36).slice(2)}`;l(k=>[...k.slice(-(t-1)),{...u,id:p}])},[t]),h=d.useCallback(u=>{l(p=>p.filter(k=>k.id!==u))},[]);return e.jsxs(Ne.Provider,{value:{toast:i,dismiss:h},children:[n,r&&G.createPortal(e.jsx("div",{className:m("toast-container",`toast-container--${o}`),children:s.map(u=>e.jsx(Zt,{toast:u,onDismiss:h},u.id))}),document.body)]})};function Xt(){const n=d.useContext(Ne);if(!n)throw new Error("useToast must be used inside <ToastProvider>");return n}const Be=({striped:n=!1,hover:o=!0,compact:t=!1,stickyHeader:r=!1,className:a,containerClassName:s,children:l,...i})=>e.jsx("div",{className:m("table-container",r&&"table-container--sticky-header",s),children:e.jsx("table",{className:m("table",n&&"table--striped",o&&"table--hover",t&&"table--compact",a),...i,children:l})}),Se=n=>e.jsx("thead",{...n}),We=n=>e.jsx("tbody",{...n}),Te=n=>e.jsx("tr",{...n}),ze=n=>e.jsx("th",{...n}),$e=n=>e.jsx("td",{...n});Be.displayName="Table";Se.displayName="Thead";We.displayName="Tbody";Te.displayName="Tr";ze.displayName="Th";$e.displayName="Td";const Ae=d.createContext({collapsed:!1,toggleCollapsed:()=>{},searchTerm:"",setSearchTerm:()=>{},enableSearch:!1,searchPlaceholder:"Buscar item"});function oe(){return d.useContext(Ae)}function U(n){return typeof n=="string"||typeof n=="number"?String(n):Array.isArray(n)?n.map(U).join(" "):d.isValidElement(n)?U(n.props.children):""}function De(n){let o=0;return d.Children.forEach(n,t=>{if(d.isValidElement(t)){if(t.type===te){o+=1;return}o+=De(t.props.children)}}),o}function He(n){for(const o of d.Children.toArray(n)){if(!d.isValidElement(o))continue;if(o.type===te)return o;const t=He(o.props.children);if(t)return t}return null}function Kt({collapsed:n,defaultCollapsed:o=!1,onToggle:t,className:r,children:a,searchThreshold:s=12,searchPlaceholder:l="Buscar item",...i}){const[h,u]=d.useState(o),[p,k]=d.useState(""),f=n!==void 0,b=f?n:h,x=d.useMemo(()=>De(a),[a])>s&&!b,j=d.Children.toArray(a),v=j.findIndex(M=>d.isValidElement(M)&&M.type===Ee),I=()=>{const M=!b;f||u(M),t?.(M)},C=d.useMemo(()=>({collapsed:b,toggleCollapsed:I,searchTerm:p,setSearchTerm:k,enableSearch:x,searchPlaceholder:l}),[b,p,x,l]);return e.jsx(Ae.Provider,{value:C,children:e.jsxs("aside",{className:m("sidebar",b&&"sidebar--collapsed",r),...i,children:[v===-1?a:j.slice(0,v),v===-1?null:j.slice(v)]})})}function Jt({icon:n,logo:o,collapsible:t=!0,className:r,children:a,onClick:s,...l}){const{collapsed:i,toggleCollapsed:h,enableSearch:u,searchTerm:p,setSearchTerm:k,searchPlaceholder:f}=oe(),b=y=>{t&&h(),s?.(y)};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:m("sidebar__header",r),onClick:b,...l,children:[e.jsx("div",{className:"sidebar__header-icon",children:n??e.jsx(L,{name:"menu"})}),!i&&e.jsx("div",{className:"sidebar__header-content",children:o??a})]}),u?e.jsx("div",{className:"sidebar__search sidebar__search--header",children:e.jsx(Z,{value:p,onChange:y=>k(y.target.value),placeholder:f,prefix:e.jsx(L,{name:"search",size:16}),size:"sm",full:!0})}):null]})}function te({icon:n,active:o=!1,as:t,className:r,children:a,searchText:s,...l}){const{collapsed:i,searchTerm:h}=oe(),u=t||"button",p=(s??U(a)).trim().toLocaleLowerCase(),k=h.trim().toLocaleLowerCase();return!k||p.includes(k)?e.jsxs(u,{className:m("sidebar__item",o&&"sidebar__item--active",r),...l,children:[n?e.jsx("span",{className:"sidebar__item-icon",children:n}):null,!i&&e.jsx("span",{className:"sidebar__item-label",children:a})]}):null}function Qt({title:n,leftIcon:o,defaultOpen:t=!0,open:r,onOpenChange:a,collapsible:s=!0,className:l,children:i,...h}){const{collapsed:u,searchTerm:p}=oe(),[k,f]=d.useState(t),b=r!==void 0,y=b?r:k,x=p.trim().toLocaleLowerCase(),j=U(i).toLocaleLowerCase(),v=!x||j.includes(x),I=!!(x&&v),C=u?!1:I||y,M=He(i);if(!v)return null;const w=W=>{if(u){const B=M?.props?.onClick;typeof B=="function"&&B(W);return}if(!s||I)return;const g=!y;b||f(g),a?.(g)};return e.jsxs("div",{className:m("sidebar__group",C&&"sidebar__group--open",l),...h,children:[e.jsxs("button",{type:"button",className:"sidebar__group-trigger",onClick:w,"aria-expanded":C,disabled:!s||I,children:[o?e.jsx("span",{className:"sidebar__group-left-icon",children:o}):null,u?null:e.jsx("span",{className:"sidebar__group-title",children:n}),e.jsx("span",{className:"sidebar__group-icon",children:e.jsx(L,{name:"chevron-down",size:16})})]}),C?e.jsx("div",{className:"sidebar__group-content",children:i}):null]})}function Ee({className:n,children:o,...t}){return e.jsx("div",{className:m("sidebar__footer",n),...t,children:o})}const Re=Object.assign(Kt,{Header:Jt,Item:te,Group:Qt,Footer:Ee});Re.displayName="Sidebar";const Ve=d.createContext(void 0),Fe=()=>{const n=d.useContext(Ve);if(!n)throw new Error("useTheme must be used within a ThemeProvider");return n},er=({children:n,defaultTheme:o="dark",storageKey:t="theme",toastPosition:r,toastMaxToasts:a})=>{const[s,l]=d.useState(()=>localStorage.getItem(t)||o);d.useEffect(()=>{const u=window.document.documentElement;u.classList.remove("theme-light","theme-dark"),u.classList.add(`theme-${s}`),u.setAttribute("data-theme",s),localStorage.setItem(t,s)},[s,t]);const i=()=>{l(u=>u==="light"?"dark":"light")},h=u=>{l(u)};return e.jsx(Ve.Provider,{value:{theme:s,toggleTheme:i,setTheme:h},children:e.jsx(Me,{position:r,maxToasts:a,children:n})})},Pe=({logo:n,navItems:o=[],navPosition:t="center",extraContent:r,themeToggle:a=!1,sticky:s=!1,className:l,children:i,contentInside:h=!1,...u})=>{const{theme:p,toggleTheme:k}=Fe(),f=typeof window<"u"?window.location.pathname:"",b=x=>{const j=x.split("?")[0].split("#")[0];return j.endsWith("/")&&j!=="/"?j.slice(0,-1):j},y=()=>e.jsx(R,{as:"nav",align:"center",gap:"5",className:"topbar__nav",children:o.map((x,j)=>{const v=x.to??x.href,I=x.active??(v?b(v)===b(f):!1);return v?e.jsx(X,{href:v,className:m("topbar__nav-item",I&&"topbar__nav-item--active"),active:I,onClick:x.onClick,children:x.label},`${x.label??"link"}-${j}`):e.jsx("button",{type:"button",className:m("topbar__nav-item",I&&"topbar__nav-item--active"),onClick:x.onClick,children:x.label},`${x.label??"button"}-${j}`)})});return e.jsxs(R,{as:"header",align:"center",justify:"space-between",className:m("topbar",s&&"topbar--sticky",t==="right"&&"topbar--nav-right",h&&"topbar--with-children",l),...u,children:[e.jsx(R,{align:"center",gap:"4",className:"topbar__left",children:n&&e.jsx("div",{className:"topbar__logo",children:n})}),t==="center"&&o.length>0&&e.jsx(R,{align:"center",justify:"center",className:"topbar__center",children:y()}),h&&i&&e.jsx("div",{className:"topbar__content",children:i}),e.jsxs(R,{align:"center",gap:"4",className:"topbar__right",children:[t==="right"&&o.length>0&&y(),r,a&&e.jsx(A,{icon:p==="dark"?e.jsx(L,{name:"sun",size:16}):e.jsx(L,{name:"moon",size:16}),variant:"ghost",size:"sm",label:"Toggle theme",onClick:k})]}),!h&&i&&e.jsx("div",{className:"topbar__children",children:i})]})};Pe.displayName="TopBar";const nr=({title:n,description:o,showBack:t=!1,onBack:r,width:a,action:s,className:l,...i})=>e.jsxs("div",{className:m("page-header",l),...i,children:[e.jsxs("div",{className:"page-header__left",children:[t&&e.jsx(A,{variant:"ghost",size:"sm",icon:e.jsx(L,{name:"chevron-left",size:16}),onClick:r,label:"Back"}),e.jsxs("div",{className:"page-header__content",children:[e.jsx(ke,{weight:"bold",children:n}),o&&e.jsx(S,{color:"subtle",style:{width:`${a||"100%"}`},children:o})]})]}),s&&e.jsx("div",{className:"page-header__right",children:s})]}),Oe=({items:n,separator:o="/",className:t})=>e.jsx("nav",{className:m("breadcrumb",t),"aria-label":"Breadcrumb",children:e.jsx("ol",{className:"breadcrumb-list",children:n.map((r,a)=>{const s=a===n.length-1;return e.jsxs("li",{className:"breadcrumb-item",children:[r.href&&!s?e.jsxs(X,{href:r.href,color:"neutral",className:"breadcrumb-link",children:[r.icon&&e.jsx("span",{className:"breadcrumb-icon",children:r.icon}),r.label]}):e.jsxs("span",{className:m("breadcrumb-link",s&&"breadcrumb-current"),"aria-current":s?"page":void 0,children:[r.icon&&e.jsx("span",{className:"breadcrumb-icon",children:r.icon}),r.label]}),!s&&e.jsx("span",{className:"breadcrumb-separator",children:o})]},a)})})});Oe.displayName="Breadcrumb";const Ue=({value:n,max:o=100,size:t="md",color:r,animated:a=!1,showValue:s=!1,label:l,className:i,style:h,...u})=>{const p=Math.min(100,Math.max(0,n/o*100));return e.jsxs("div",{className:m("progress-wrapper",i),style:{"--progress-color":$(r),...h??{}},...u,children:[(l||s)&&e.jsxs("div",{className:"progress-label",children:[l&&e.jsx("span",{children:l}),s&&e.jsxs("span",{className:"progress-value",children:[Math.round(p),"%"]})]}),e.jsx("div",{className:m("progress",`progress--${t}`,a&&"progress--animated"),role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":o,children:e.jsx("div",{className:"progress-bar",style:{width:`${p}%`}})})]})};Ue.displayName="Progress";const Ge=({tabs:n,defaultValue:o,value:t,onChange:r,className:a,variant:s="default",size:l="md"})=>{const[i,h]=d.useState(o??n[0]?.value??""),u=t??i,p=f=>{t===void 0&&h(f),r?.(f)},k=n.find(f=>f.value===u);return e.jsxs("div",{className:m("tabs",`tabs--${s}`,`tabs--${l}`,a),children:[e.jsx("div",{className:"tabs-list",role:"tablist",children:n.map(f=>{const b=u===f.value,y=m("tabs-trigger",b&&"tabs-trigger--active");return f.href?e.jsx("a",{role:"tab",href:f.href,"aria-selected":b,className:y,onClick:x=>{f.disabled?x.preventDefault():p(f.value)},children:f.label},f.value):e.jsx("button",{role:"tab",type:"button",disabled:f.disabled,"aria-selected":b,className:y,onClick:()=>p(f.value),children:f.label},f.value)})}),e.jsx("div",{role:"tabpanel",className:"tabs-panel",tabIndex:0,children:k?.content})]})};Ge.displayName="Tabs";const qe=({title:n,description:o,date:t,icon:r,src:a,name:s})=>e.jsxs("div",{className:m("timeline-item",!r&&!a&&!s&&"timeline-item--dot"),children:[e.jsxs("div",{className:"timeline-item__aside",children:[e.jsx("div",{className:"timeline-item__marker",children:a||s?e.jsx(ee,{src:a,name:s,size:"sm"}):r?e.jsx("div",{className:"timeline-item__icon",children:r}):e.jsx("div",{className:"timeline-item__dot"})}),e.jsx("div",{className:"timeline-item__line"})]}),e.jsxs("div",{className:"timeline-item__content",children:[e.jsxs("div",{className:"timeline-item__header",children:[e.jsx(S,{weight:"medium",children:n}),t&&e.jsx(S,{size:"sm",color:"subtle",children:t})]}),o&&e.jsx("div",{className:"timeline-item__description",children:e.jsx(S,{color:"subtle",children:o})})]})]}),Ye=({children:n,className:o,...t})=>e.jsx("div",{className:m("timeline",o),...t,children:n});Ye.displayName="Timeline";qe.displayName="TimelineItem";exports.Accordion=je;exports.AccordionItem=ye;exports.ActivityIcon=rn;exports.AlertCircleIcon=sn;exports.AlertTriangleIcon=an;exports.AlignHorizontalIcon=cn;exports.AlignJustifyIcon=ln;exports.AppWindowIcon=dn;exports.ArrowDownIcon=un;exports.ArrowLeftIcon=hn;exports.ArrowRightIcon=pn;exports.ArrowUpIcon=mn;exports.Avatar=ee;exports.Badge=Le;exports.BadgeIcon=kn;exports.BatteryIcon=xn;exports.BellIcon=fn;exports.BluetoothIcon=vn;exports.BookIcon=bn;exports.Box=Dt;exports.BoxIcon=yn;exports.Breadcrumb=Oe;exports.Button=P;exports.CalendarIcon=jn;exports.CameraIcon=gn;exports.Card=Tt;exports.CardBody=$t;exports.CardFooter=At;exports.CardHeader=zt;exports.CheckIcon=wn;exports.CheckSquareIcon=Ln;exports.Checkbox=pe;exports.ChevronDownIcon=_n;exports.ChevronIcon=Mn;exports.ChevronLeftIcon=In;exports.ChevronRightIcon=Cn;exports.ChevronUpIcon=Nn;exports.CircleDotIcon=Bn;exports.ClockIcon=Sn;exports.CloseIcon=Wn;exports.CloudIcon=Tn;exports.Code=ge;exports.CodeIcon=zn;exports.ComponentIcon=$n;exports.Container=Et;exports.CopyIcon=An;exports.CreditCardIcon=Dn;exports.DatabaseIcon=Hn;exports.DatePicker=de;exports.Divider=Vt;exports.DownloadIcon=En;exports.Drawer=Ce;exports.EditIcon=Rn;exports.EmptyState=qt;exports.ExternalLinkIcon=Vn;exports.EyeIcon=Pn;exports.EyeOffIcon=Fn;exports.FileIcon=Un;exports.FileTextIcon=On;exports.FileUpload=Bt;exports.FilterIcon=Gn;exports.Flex=R;exports.FolderIcon=qn;exports.FormField=z;exports.FormInputIcon=Yn;exports.GhostIcon=Zn;exports.GiftIcon=Xn;exports.GitCommitIcon=Kn;exports.GithubIcon=Jn;exports.Grid=Ht;exports.GridIcon=Qn;exports.GripIcon=eo;exports.Heading=ke;exports.Heading1Icon=no;exports.Heading2=Q;exports.Heading3=St;exports.Heading4=xe;exports.Heading5=fe;exports.Heading6=Wt;exports.HeartIcon=oo;exports.HelpCircleIcon=to;exports.HistoryIcon=ro;exports.HomeIcon=so;exports.Icon=L;exports.IconBase=ae;exports.IconButton=A;exports.Image=Gt;exports.ImageIcon=ao;exports.InfoIcon=io;exports.Input=Z;exports.LabIcon=co;exports.LaptopIcon=lo;exports.LayoutIcon=ho;exports.LayoutTemplateIcon=uo;exports.Link=X;exports.LinkIcon=po;exports.LinkedinIcon=mo;exports.List=be;exports.ListChecksIcon=ko;exports.ListCollapseIcon=xo;exports.ListFilterIcon=fo;exports.ListIcon=vo;exports.Loader=q;exports.Loader2Icon=bo;exports.LockIcon=yo;exports.LogInIcon=jo;exports.LogOutIcon=go;exports.MailIcon=Lo;exports.MapPinIcon=wo;exports.MenuIcon=_o;exports.MessageCircleIcon=Io;exports.MessageSquareIcon=Co;exports.MicIcon=No;exports.MilestoneIcon=Mo;exports.MinusIcon=Bo;exports.Modal=Ie;exports.MonitorIcon=So;exports.MoonIcon=Wo;exports.MoreHorizontalIcon=To;exports.MousePointerIcon=zo;exports.MultiSelect=he;exports.MusicIcon=$o;exports.PageHeader=nr;exports.Pagination=_e;exports.PanelIcon=Ho;exports.PanelLeftIcon=Ao;exports.PanelTopIcon=Do;exports.PhoneIcon=Eo;exports.PlusIcon=Ro;exports.Progress=Ue;exports.Radio=me;exports.RectangleHorizontalIcon=Vo;exports.RefreshIcon=Fo;exports.RocketIcon=Po;exports.RulerIcon=Oo;exports.Search=le;exports.SearchIcon=Uo;exports.Select=ue;exports.ServerIcon=Go;exports.SettingsIcon=qo;exports.ShareIcon=Yo;exports.ShieldIcon=Zo;exports.ShoppingCartIcon=Xo;exports.Sidebar=Re;exports.Skeleton=ne;exports.Slider=Mt;exports.SlidersHorizontalIcon=Ko;exports.SmartphoneIcon=Jo;exports.Spacer=Rt;exports.SparkIcon=Qo;exports.SparklesIcon=et;exports.SpinnerIcon=nt;exports.SquareIcon=ot;exports.StarIcon=tt;exports.SunIcon=rt;exports.Switch=we;exports.Table=Be;exports.TableIcon=st;exports.TabletIcon=at;exports.Tabs=Ge;exports.Tag=Ut;exports.TagIcon=it;exports.Tbody=We;exports.Td=$e;exports.Text=S;exports.TextArea=ce;exports.TextCursorIcon=ct;exports.Th=ze;exports.Thead=Se;exports.ThemeDarkIcon=lt;exports.ThemeLightIcon=dt;exports.ThemeProvider=er;exports.Timeline=Ye;exports.TimelineItem=qe;exports.ToastProvider=Me;exports.ToggleRightIcon=ut;exports.Tooltip=Yt;exports.TopBar=Pe;exports.Tr=Te;exports.TrashIcon=ht;exports.TypeIcon=pt;exports.UnlockIcon=mt;exports.UploadCloudIcon=kt;exports.UploadIcon=xt;exports.UserCircleIcon=ft;exports.UserIcon=vt;exports.VideoIcon=bt;exports.WarningIcon=yt;exports.WifiIcon=jt;exports.XIcon=gt;exports.ZapIcon=Lt;exports.classNames=m;exports.createVariants=en;exports.iconRegistry=ie;exports.useTheme=Fe;exports.useToast=Xt;
207
+ <path d="m6 6 12 12" />`},zap:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",body:'<polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2" />'}};function _({name:n,...o}){const t=ce[n];return e.jsx(ie,{viewBox:t.viewBox,fill:t.fill,stroke:t.stroke,strokeWidth:Number(t.strokeWidth),strokeLinecap:t.strokeLinecap,strokeLinejoin:t.strokeLinejoin,dangerouslySetInnerHTML:{__html:t.body},...o})}function c(n){return function(t){return e.jsx(_,{name:n,...t})}}const an=c("activity"),cn=c("alert-circle"),ln=c("alert-triangle"),dn=c("align-horizontal"),un=c("align-justify"),hn=c("app-window"),pn=c("arrow-down"),mn=c("arrow-left"),xn=c("arrow-right"),kn=c("arrow-up"),fn=c("badge"),vn=c("battery"),yn=c("bell"),bn=c("bluetooth"),jn=c("book"),gn=c("box"),wn=c("calendar"),Ln=c("camera"),_n=c("check-square"),In=c("check"),Cn=c("chevron-down"),Nn=c("chevron-left"),Mn=c("chevron-right"),Bn=c("chevron-up"),Sn=c("chevron"),Wn=c("circle-dot"),Tn=c("clock"),zn=c("close"),$n=c("cloud"),Dn=c("code"),An=c("component"),En=c("copy"),Hn=c("credit-card"),Rn=c("database"),Vn=c("download"),Fn=c("edit"),Pn=c("external-link"),On=c("eye-off"),Un=c("eye"),Gn=c("file-text"),qn=c("file"),Yn=c("filter"),Xn=c("folder"),Zn=c("form-input"),Kn=c("ghost"),Jn=c("gift"),Qn=c("git-commit"),eo=c("github"),no=c("grid"),oo=c("grip"),to=c("heading1"),ro=c("heart"),so=c("help-circle"),ao=c("history"),io=c("home"),co=c("image"),lo=c("info"),uo=c("lab"),ho=c("laptop"),po=c("layout-template"),mo=c("layout"),xo=c("link"),ko=c("linkedin"),fo=c("list-checks"),vo=c("list-collapse"),yo=c("list-filter"),bo=c("list"),jo=c("loader2"),go=c("lock"),wo=c("log-in"),Lo=c("log-out"),_o=c("mail"),Io=c("map-pin"),Co=c("menu"),No=c("message-circle"),Mo=c("message-square"),Bo=c("mic"),So=c("milestone"),Wo=c("minus"),To=c("monitor"),zo=c("moon"),$o=c("more-horizontal"),Do=c("mouse-pointer"),Ao=c("music"),Eo=c("panel-left"),Ho=c("panel-top"),Ro=c("panel"),Vo=c("phone"),Fo=c("plus"),Po=c("rectangle-horizontal"),Oo=c("refresh"),Uo=c("rocket"),Go=c("ruler"),qo=c("search"),Yo=c("server"),Xo=c("settings"),Zo=c("share"),Ko=c("shield"),Jo=c("shopping-cart"),Qo=c("sliders-horizontal"),et=c("smartphone"),nt=c("spark"),ot=c("sparkles"),tt=c("spinner"),rt=c("square"),st=c("star"),at=c("sun"),it=c("table"),ct=c("tablet"),lt=c("tag"),dt=c("text-cursor"),ut=c("theme-dark"),ht=c("theme-light"),pt=c("toggle-right"),mt=c("trash"),xt=c("type"),kt=c("unlock"),ft=c("upload-cloud"),vt=c("upload"),yt=c("user-circle"),bt=c("user"),jt=c("video"),gt=c("warning"),wt=c("wifi"),Lt=c("x"),_t=c("zap"),Z=d.forwardRef(({label:n,error:o,hint:t,prefix:r,suffix:a,clearable:s=!1,size:l="medium",full:i=!1,className:h,id:u,...p},x)=>{const f=u??(n?`input-${X(n)}`:void 0),y=d.useRef(null),[,b]=d.useState(0),k=p.value!==void 0,j=String(k?p.value??"":p.defaultValue??y.current?.value??"").length>0,v=L=>{if(y.current=L,typeof x=="function"){x(L);return}x&&(x.current=L)},C=()=>{const L=y.current;if(!L||p.disabled||p.readOnly)return;Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value")?.set?.call(L,""),L.dispatchEvent(new Event("input",{bubbles:!0})),L.dispatchEvent(new Event("change",{bubbles:!0})),b(g=>g+1),L.focus()},w=L=>{p.onInput?.(L),k||b(W=>W+1)},M=s&&j?e.jsx(H,{icon:e.jsx(_,{name:"close",size:12}),"aria-label":"Limpar campo",variant:"ghost",size:"small",onClick:C,tabIndex:-1,className:"input-field__clear"}):a;return e.jsx(D,{label:n,error:o,hint:t,full:i,htmlFor:f,className:h,children:e.jsxs("div",{className:m("input-field",`input-field--${l}`,o&&"input-field--error",p.disabled&&"input-field--disabled"),children:[r&&e.jsx("span",{className:"input-field__adornment input-field__adornment--prefix",children:r}),e.jsx("input",{ref:v,id:f,className:m("input-field__input",!!r&&"input-field__input--with-prefix",!!M&&"input-field__input--with-suffix"),"aria-invalid":!!o,"aria-describedby":o?`${f}-error`:t?`${f}-hint`:void 0,...p,onInput:w}),M&&e.jsx("span",{className:"input-field__adornment input-field__adornment--suffix",children:M})]})})});Z.displayName="Input";const le=d.forwardRef(({label:n,error:o,hint:t,full:r=!1,resize:a="vertical",className:s,id:l,rows:i=4,style:h,...u},p)=>{const x=l??(n?`textarea-${X(n)}`:void 0);return e.jsx(D,{label:n,error:o,hint:t,full:r,htmlFor:x,className:s,children:e.jsx("textarea",{ref:p,id:x,rows:i,className:m("textarea",o&&"textarea--error"),"aria-invalid":!!o,"aria-describedby":o?`${x}-error`:t?`${x}-hint`:void 0,style:{resize:a,...h??{}},...u})})});le.displayName="TextArea";const de=d.forwardRef(({onSearch:n,loading:o=!1,onChange:t,...r},a)=>{const s=l=>{t?.(l),n?.(l.target.value)};return e.jsx(Z,{ref:a,type:"search",clearable:!0,prefix:o?e.jsx(Y,{size:"extraSmall"}):e.jsx(_,{name:"search",size:16}),onChange:s,...r})});de.displayName="Search";const It=["Dom","Seg","Ter","Qua","Qui","Sex","Sab"];function J(n){if(!n)return null;const[o,t,r]=n.split("-").map(Number);return!o||!t||!r?null:new Date(o,t-1,r)}function Ct(n){if(!n)return"";const o=String(n.getDate()).padStart(2,"0"),t=String(n.getMonth()+1).padStart(2,"0"),r=n.getFullYear();return`${o}/${t}/${r}`}function se(n){if(!n)return"";const o=String(n.getDate()).padStart(2,"0"),t=String(n.getMonth()+1).padStart(2,"0");return`${n.getFullYear()}-${t}-${o}`}function Nt(n,o){return!n||!o?!1:n.getFullYear()===o.getFullYear()&&n.getMonth()===o.getMonth()&&n.getDate()===o.getDate()}function Mt(n){const o=new Date(n.getFullYear(),n.getMonth(),1),t=new Date(n.getFullYear(),n.getMonth()+1,0),r=o.getDay(),a=t.getDate(),s=[];for(let i=r-1;i>=0;i-=1){const h=new Date(o);h.setDate(o.getDate()-(i+1)),s.push({date:h,outside:!0})}for(let i=1;i<=a;i+=1)s.push({date:new Date(n.getFullYear(),n.getMonth(),i),outside:!1});const l=s.length<=35?35:42;for(;s.length<l;){const i=s[s.length-1]?.date??t,h=new Date(i);h.setDate(i.getDate()+1),s.push({date:h,outside:!0})}return s}const ue=d.forwardRef(({label:n,error:o,hint:t,full:r=!1,className:a,id:s,value:l,defaultValue:i,onChange:h,placeholder:u="dd/mm/aaaa",disabled:p,size:x,prefix:f,suffix:y,clearable:b,...k},j)=>{const v=s??(n?`datepicker-${X(n)}`:void 0),C=d.useRef(null),w=d.useMemo(()=>se(new Date),[]),M=d.useMemo(()=>J(l??i??w),[i,w,l]),[L,W]=d.useState(i??w),[g,S]=d.useState(!1),I=J(l??L),[A,$]=d.useState(M??new Date),F=l!==void 0;d.useEffect(()=>{const B=J(l??L);B&&$(B)},[L,l]),d.useEffect(()=>{if(!g)return;const B=R=>{C.current&&!C.current.contains(R.target)&&S(!1)};return document.addEventListener("mousedown",B),()=>document.removeEventListener("mousedown",B)},[g]);const N=B=>{F||W(B);const R={target:{value:B,id:v,name:k.name},currentTarget:{value:B,id:v,name:k.name}};h?.(R)},z=B=>{const R=se(B);N(R),$(B)},Ke=()=>{N("")},Je=()=>{S(!1)},Qe=A.toLocaleDateString("pt-BR",{month:"long",year:"numeric"}),en=Mt(A);return e.jsx(D,{label:n,error:o,hint:t,full:r,htmlFor:v,className:a,children:e.jsxs("div",{ref:C,className:"date-picker",children:[e.jsxs("div",{className:m("date-picker__field",g&&"date-picker__field--open",o&&"date-picker__field--error",p&&"date-picker__field--disabled"),children:[e.jsx("input",{...k,ref:j,id:v,type:"text",value:Ct(I),placeholder:u,readOnly:!0,disabled:p,className:"date-picker__input",onClick:()=>!p&&S(!0)}),e.jsx("button",{type:"button",className:"date-picker__toggle",onClick:()=>!p&&S(B=>!B),"aria-label":"Abrir calendario",disabled:p,children:e.jsx(_,{name:"calendar",size:18})})]}),g?e.jsxs("div",{className:"date-picker__popover",role:"dialog","aria-modal":"false",children:[e.jsxs("div",{className:"date-picker__header",children:[e.jsx("button",{type:"button",className:"date-picker__nav",onClick:()=>$(B=>new Date(B.getFullYear(),B.getMonth()-1,1)),"aria-label":"Mes anterior",children:e.jsx(_,{name:"chevron-left",size:16})}),e.jsx("span",{className:"date-picker__month",children:Qe}),e.jsx("button",{type:"button",className:"date-picker__nav",onClick:()=>$(B=>new Date(B.getFullYear(),B.getMonth()+1,1)),"aria-label":"Proximo mes",children:e.jsx(_,{name:"chevron-right",size:16})})]}),e.jsx("div",{className:"date-picker__weekdays",children:It.map(B=>e.jsx("span",{className:"date-picker__weekday",children:B},B))}),e.jsx("div",{className:"date-picker__grid",children:en.map(({date:B,outside:R})=>{const nn=Nt(B,I);return e.jsx("button",{type:"button",className:m("date-picker__day",R&&"date-picker__day--outside",nn&&"date-picker__day--selected"),onClick:()=>z(B),children:B.getDate()},B.toISOString())})}),e.jsxs("div",{className:"date-picker__footer",children:[e.jsx(O,{variant:"ghost",onClick:Ke,children:"Limpar"}),e.jsx(O,{onClick:Je,children:"Concluido"})]})]}):null]})})});ue.displayName="DatePicker";const he=d.forwardRef(({options:n,value:o,defaultValue:t,onChange:r,label:a,error:s,supportText:l,size:i="medium",placeholder:h="Select...",full:u=!1,disabled:p=!1,searchable:x=!1,searchPlaceholder:f="Search...",className:y,...b},k)=>{const j=d.useId(),v=d.useRef(null),C=d.useRef(null),[w,M]=d.useState(!1),[L,W]=d.useState(""),[g,S]=d.useState(t??""),I=o??g;d.useEffect(()=>{if(!w){W("");return}x&&C.current?.focus()},[w,x]),d.useEffect(()=>{const N=z=>{v.current&&!v.current.contains(z.target)&&M(!1)};return document.addEventListener("mousedown",N),()=>document.removeEventListener("mousedown",N)},[]);const A=n.find(N=>N.value===I),$=d.useMemo(()=>!x||!L?n:n.filter(N=>(N.searchValue??(typeof N.label=="string"?N.label:N.value)).toLowerCase().includes(L.toLowerCase())),[n,x,L]),F=(N,z)=>{z||(o===void 0&&S(N),r?.(N),M(!1))};return e.jsx(D,{label:a,error:s,hint:l,full:u,className:y,htmlFor:j,children:e.jsxs("div",{ref:v,className:m("select",u&&"select--full"),children:[e.jsxs("div",{ref:k,id:j,role:"combobox","aria-expanded":w,"aria-controls":`${j}-listbox`,"aria-haspopup":"listbox",tabIndex:p?-1:0,className:m("select__trigger",`select__trigger--${i}`,w&&"select__trigger--open",s&&"select__trigger--error",p&&"select__trigger--disabled"),onClick:()=>!p&&M(N=>!N),onKeyDown:N=>{p||((N.key==="Enter"||N.key===" ")&&(N.preventDefault(),M(z=>!z)),N.key==="Escape"&&M(!1))},...b,children:[e.jsx("span",{className:m("select__value",!A&&"select__value--placeholder"),children:A?.label??h}),e.jsx("span",{className:"select__icon",children:e.jsx(_,{name:"chevron-down",size:16})})]}),w&&e.jsxs("div",{className:"select__menu",children:[x&&e.jsxs("div",{className:"select__search",children:[e.jsx("span",{className:"select__search-icon",children:e.jsx(_,{name:"search",size:14})}),e.jsx("input",{ref:C,className:"select__search-input",value:L,placeholder:f,onChange:N=>W(N.target.value)})]}),e.jsx("ul",{id:`${j}-listbox`,className:"select__list",role:"listbox",children:$.length>0?$.map(N=>{const z=N.value===I;return e.jsxs("li",{role:"option","aria-selected":z,className:m("select__option",z&&"select__option--selected",N.disabled&&"select__option--disabled"),onClick:()=>F(N.value,N.disabled),children:[e.jsx("span",{children:N.label}),z&&e.jsx("span",{className:"select__option-check",children:e.jsx(_,{name:"check",size:14})})]},N.value)}):e.jsx("li",{className:"select__empty",children:"No results found"})})]})]})})});he.displayName="Select";const pe=d.forwardRef(({options:n,value:o,defaultValue:t=[],onChange:r,label:a,error:s,supportText:l,placeholder:i="Select options...",full:h=!1,disabled:u=!1,className:p,...x},f)=>{const y=d.useId(),b=d.useRef(null),[k,j]=d.useState(!1),[v,C]=d.useState(t),w=o??v;d.useEffect(()=>{const g=S=>{b.current&&!b.current.contains(S.target)&&j(!1)};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[]);const M=d.useMemo(()=>n.filter(g=>w.includes(g.value)),[n,w]),L=g=>{o===void 0&&C(g),r?.(g)},W=(g,S)=>{if(!S){if(w.includes(g)){L(w.filter(I=>I!==g));return}L([...w,g])}};return e.jsx(D,{label:a,error:s,hint:l,full:h,className:p,htmlFor:y,children:e.jsxs("div",{ref:b,className:m("multiselect",h&&"multiselect--full"),children:[e.jsxs("div",{ref:f,id:y,role:"combobox","aria-expanded":k,"aria-controls":`${y}-listbox`,"aria-haspopup":"listbox",tabIndex:u?-1:0,className:m("multiselect__trigger",k&&"multiselect__trigger--open",s&&"multiselect__trigger--error",u&&"multiselect__trigger--disabled"),onClick:()=>!u&&j(g=>!g),onKeyDown:g=>{u||((g.key==="Enter"||g.key===" ")&&(g.preventDefault(),j(S=>!S)),g.key==="Escape"&&j(!1))},...x,children:[e.jsx("div",{className:"multiselect__values",children:M.length>0?M.map(g=>e.jsxs("span",{className:"multiselect__tag",children:[e.jsx("span",{className:"multiselect__tag-label",children:g.label}),e.jsx("button",{type:"button",className:"multiselect__tag-remove",onClick:S=>{S.stopPropagation(),W(g.value)},"aria-label":`Remove ${g.label}`,children:e.jsx(_,{name:"close",size:12})})]},g.value)):e.jsx("span",{className:"multiselect__placeholder",children:i})}),e.jsx("span",{className:"multiselect__icon",children:e.jsx(_,{name:"chevron-down",size:16})})]}),k&&e.jsx("ul",{id:`${y}-listbox`,className:"multiselect__menu",role:"listbox","aria-multiselectable":"true",children:n.length>0?n.map(g=>{const S=w.includes(g.value);return e.jsxs("li",{role:"option","aria-selected":S,className:m("multiselect__option",S&&"multiselect__option--selected",g.disabled&&"multiselect__option--disabled"),onClick:()=>W(g.value,g.disabled),children:[e.jsx("span",{className:"multiselect__checkbox",children:S?e.jsx(_,{name:"check",size:12}):null}),e.jsx("span",{children:g.label})]},g.value)}):e.jsx("li",{className:"multiselect__empty",children:"No options available"})})]})})});pe.displayName="MultiSelect";const me=d.createContext(null);function Bt(n,o){if(n){if(typeof n=="function"){n(o);return}n.current=o}}function St(n,o,t,r){const a=o.startsWith("bottom")?n.bottom+t:n.top-t,s=o.endsWith("end")?n.right:n.left;return{top:a,left:s,minWidth:r?n.width:void 0,transform:o==="bottom-end"?"translateX(-100%)":o==="top-start"?"translateY(-100%)":o==="top-end"?"translate(-100%, -100%)":void 0}}function Wt({children:n,content:o,open:t,defaultOpen:r=!1,onOpenChange:a,placement:s="bottom-start",offset:l=8,disabled:i=!1,matchTriggerWidth:h=!1,closeOnClickOutside:u=!0,className:p,...x}){const f=d.useId(),y=d.useRef(null),b=d.useRef(null),[k,j]=d.useState(r),[v,C]=d.useState({top:0,left:0}),w=t??k,M=d.useCallback(I=>{t===void 0&&j(I),a?.(I)},[a,t]),L=d.useCallback(()=>M(!1),[M]),W=d.useCallback(()=>{if(!y.current)return;const I=y.current.getBoundingClientRect();C(St(I,s,l,h))},[h,l,s]);d.useEffect(()=>{if(!w)return;W();const I=()=>W();return window.addEventListener("resize",I),window.addEventListener("scroll",I,!0),()=>{window.removeEventListener("resize",I),window.removeEventListener("scroll",I,!0)}},[w,W]),d.useEffect(()=>{if(!w)return;const I=$=>{const F=$.target;y.current?.contains(F)||b.current?.contains(F)||u&&L()},A=$=>{$.key==="Escape"&&(L(),y.current?.focus())};return document.addEventListener("mousedown",I),document.addEventListener("keydown",A),()=>{document.removeEventListener("mousedown",I),document.removeEventListener("keydown",A)}},[L,u,w]);const g=d.useMemo(()=>({close:L}),[L]),S=d.cloneElement(n,{ref:I=>{y.current=I,Bt(n.ref,I)},"aria-expanded":w,"aria-haspopup":"menu","aria-controls":w?f:void 0,onClick:I=>{n.props.onClick?.(I),!I.defaultPrevented&&!i&&M(!w)},onKeyDown:I=>{n.props.onKeyDown?.(I),!(i||I.defaultPrevented)&&((I.key==="Enter"||I.key===" ")&&(I.preventDefault(),M(!w)),I.key==="ArrowDown"&&(I.preventDefault(),M(!0)))}});return e.jsxs(e.Fragment,{children:[S,w&&U.createPortal(e.jsx(me.Provider,{value:g,children:e.jsx("div",{id:f,ref:b,className:m("dropdown__menu",p),style:{top:v.top,left:v.left,minWidth:v.minWidth,transform:v.transform},role:"menu",...x,children:e.jsx("div",{className:"dropdown__content",children:o})})}),document.body)]})}function Tt({children:n,className:o,inset:t=!1,destructive:r=!1,keepOpen:a=!1,leftContent:s,rightContent:l,onClick:i,onSelect:h,...u}){const p=d.useContext(me);return e.jsxs("button",{type:"button",className:m("dropdown__item",t&&"dropdown__item--inset",r&&"dropdown__item--destructive",o),role:"menuitem",onClick:x=>{i?.(x),!x.defaultPrevented&&(h?.(),a||p?.close())},...u,children:[e.jsxs("span",{className:"dropdown__item-label",children:[s&&e.jsx("span",{className:"dropdown__item-left",children:s}),e.jsx("span",{children:n})]}),l&&e.jsx("span",{className:"dropdown__item-right",children:l})]})}const xe=Object.assign(Wt,{Item:Tt});xe.displayName="Dropdown";function zt(n,o){typeof n=="function"?n(o):n&&(n.current=o)}const ke=d.forwardRef(({label:n,indeterminate:o=!1,supportText:t,className:r,id:a,disabled:s,color:l="primary",style:i,...h},u)=>{const p=d.useId(),x=a??`checkbox-${p}`,f=d.useRef(null);d.useEffect(()=>{f.current&&(f.current.indeterminate=o)},[o]);const y=b=>{f.current=b,zt(u,b)};return e.jsx(D,{hint:t,full:!0,className:r,htmlFor:x,children:e.jsxs("label",{className:m("checkbox",s&&"checkbox--disabled"),style:{"--checkbox-color":E(l),...i??{}},children:[e.jsxs("span",{className:"checkbox__control",children:[e.jsx("input",{ref:y,id:x,type:"checkbox",className:"checkbox__input",disabled:s,"aria-checked":o?"mixed":void 0,...h}),e.jsx("span",{className:"checkbox__box","aria-hidden":"true",children:e.jsx("span",{className:"checkbox__icon",children:o?e.jsx(_,{name:"minus"}):e.jsx(_,{name:"check"})})})]}),n&&e.jsx("span",{className:"checkbox__label",children:n})]})})});ke.displayName="Checkbox";const fe=d.forwardRef(({label:n,description:o,className:t,disabled:r,error:a,style:s,color:l="primary",id:i,...h},u)=>{const p=d.useId(),x=i??`radio-${p}`;return e.jsx(D,{full:!0,className:t,htmlFor:x,children:e.jsxs("label",{className:m("radio",r&&"radio--disabled",a&&"radio--error"),style:{"--radio-color":E(l),...s??{}},children:[e.jsxs("span",{className:"radio__input-container",children:[e.jsx("input",{ref:u,id:x,type:"radio",className:"radio__input",disabled:r,...h}),e.jsx("span",{className:"radio__control",children:e.jsx("span",{className:"radio__dot"})})]}),(n||o)&&e.jsxs("span",{className:"radio__content",children:[n&&e.jsx("span",{className:"radio__label",children:n}),o&&e.jsx("span",{className:"radio__description",children:o})]})]})})});fe.displayName="Radio";const $t=({value:n,defaultValue:o,onChange:t,min:r=0,max:a=100,label:s,supportText:l,className:i,id:h,...u})=>{const p=d.useId(),x=h??`slider-${p}`,[f,y]=d.useState(Number(n??o??0)),b=n!==void 0?Number(n):f,k=(b-Number(r))/(Number(a)-Number(r))*100;return e.jsx(D,{label:s,hint:l,full:!0,className:i,htmlFor:x,children:e.jsxs("div",{className:"slider",children:[e.jsx("div",{className:"slider__track",children:e.jsx("div",{className:"slider__fill",style:{width:`${k}%`}})}),e.jsx("input",{id:x,type:"range",min:r,max:a,value:b,onChange:j=>{const v=Number(j.target.value);n===void 0&&y(v),t?.(j)},className:"slider__input",...u}),e.jsx("div",{className:"slider__value",children:b})]})})},Dt=({onFileSelect:n,accept:o,multiple:t=!1,disabled:r=!1,maxSize:a,title:s="Drag and drop a file or click to upload",description:l="Supported files depend on the accept property.",className:i,...h})=>{const u=d.useRef(null),[p,x]=d.useState(!1),[f,y]=d.useState([]),[b,k]=d.useState(null),j=v=>{k(null);let C=v;a&&v.filter(L=>L.size>a).length>0&&(k(`Some files exceed ${Math.round(a/1024/1024)}MB.`),C=v.filter(L=>L.size<=a)),!t&&C.length>1&&(C=[C[0]]);const w=t?[...f,...C]:C;y(w),n?.(w)};return e.jsxs("div",{className:m("file-upload",i),...h,children:[e.jsxs("div",{className:m("file-upload__dropzone",p&&"file-upload__dropzone--dragging",r&&"file-upload__dropzone--disabled",b&&"file-upload__dropzone--error"),onDragEnter:v=>{v.preventDefault(),r||x(!0)},onDragOver:v=>{v.preventDefault(),r||x(!0)},onDragLeave:v=>{v.preventDefault(),x(!1)},onDrop:v=>{v.preventDefault(),x(!1),r||j(Array.from(v.dataTransfer.files))},onClick:()=>!r&&u.current?.click(),children:[e.jsx("input",{ref:u,type:"file",className:"file-upload__input",onChange:v=>v.target.files&&j(Array.from(v.target.files)),accept:o,multiple:t,disabled:r}),e.jsxs("div",{className:"file-upload__content",children:[e.jsx("div",{className:"file-upload__icon",children:e.jsx(_,{name:"upload",size:20})}),e.jsx(T,{weight:"medium",children:s}),e.jsx(T,{size:"small",color:"neutral",children:l})]})]}),b&&e.jsx(T,{size:"small",color:"error",children:b}),f.length>0&&e.jsx("ul",{className:"file-upload__list",children:f.map((v,C)=>e.jsxs("li",{className:"file-upload__item",children:[e.jsx("span",{className:"file-upload__file-name",children:v.name}),e.jsx("button",{type:"button",className:"file-upload__remove",onClick:()=>{const w=f.filter((M,L)=>L!==C);y(w),n?.(w)},children:e.jsx(_,{name:"close",size:14})})]},`${v.name}-${C}`))})]})};function P(n,o){const t=d.forwardRef(({weight:r="bold",className:a,children:s,...l},i)=>d.createElement(n,{ref:i,className:m("heading",o,`heading--weight-${r}`,a),...l},s));return t.displayName=n.charAt(0).toUpperCase()+n.slice(1),t}const ve=P("h1","heading--h1"),Q=P("h2","heading--h2"),At=P("h3","heading--h3"),ye=P("h4","heading--h4"),ee=P("h5","heading--h5"),Et=P("h6","heading--h6");function Ht({padding:n="md",variant:o="default",as:t,children:r,className:a,...s}){const l=t||"div";return e.jsx(l,{className:m("card",`card--${o}`,`card--pad-${n}`,a),...s,children:r})}function Rt({title:n,description:o,icon:t,action:r,children:a,className:s,...l}){return e.jsxs("div",{className:m("card-header",s),...l,children:[e.jsxs("div",{className:"card-header__content",children:[(n||t)&&e.jsxs("div",{className:"card-header__title-wrapper",children:[t&&e.jsx("span",{className:"card-header__icon",children:t}),n&&e.jsx(ee,{weight:"semibold",children:n})]}),o&&e.jsx(T,{size:"small",color:"neutral",children:o}),a]}),r&&e.jsx("div",{className:"card-header__action",children:r})]})}function Vt({children:n,className:o,...t}){return e.jsx("div",{className:m("card-body",o),...t,children:n})}function Ft({children:n,className:o,...t}){return e.jsx("div",{className:m("card-footer",o),...t,children:n})}const Pt=d.forwardRef(function({as:o,padding:t="0",rounded:r="none",shadow:a="none",surface:s="default",border:l=!1,className:i,children:h,...u},p){const x=o||"div";return e.jsx(x,{ref:p,className:m("box",`box-padding--${t}`,`box-rounded--${r}`,`box-shadow--${a}`,`box-surface--${s}`,l&&"box--border",i),...u,children:h})}),Ot=({children:n,columns:o=1,gap:t="4",className:r,style:a,as:s,...l})=>{const i=s||"div";return e.jsx(i,{className:m("grid",`grid-cols--${o}`,`grid-gap--${t}`,r),style:a,...l,children:n})},Ut=({children:n,size:o="large",className:t,style:r})=>e.jsx("div",{className:m("container",`container--${o}`,t),style:r,children:n}),Gt=({size:n="1rem",axis:o="vertical",style:t})=>{const r=o==="horizontal"?n:1,a=o==="vertical"?n:1;return e.jsx("span",{style:{display:"block",width:r,minWidth:r,height:a,minHeight:a,...t},"aria-hidden":"true"})};function qt({orientation:n="horizontal",label:o,className:t,...r}){return e.jsx("div",{role:"separator","aria-orientation":n,className:m("divider",`divider--${n}`,o&&"divider--labeled",t),...r,children:o&&n==="horizontal"&&e.jsx("span",{className:"divider__label",children:o})})}const be=d.createContext({variant:"default"});function Yt({children:n,variant:o="default",className:t,...r}){return e.jsx(be.Provider,{value:{variant:o},children:e.jsx("div",{className:m("list",`list--${o}`,t),role:"list",...r,children:n})})}function Xt({children:n,description:o,startContent:t,endContent:r,active:a=!1,disabled:s=!1,className:l,onClick:i,...h}){const{variant:u}=d.useContext(be),p=u==="checklist"&&!t?e.jsx(_,{name:"check",size:16}):t;return e.jsxs("div",{className:m("list-item",a&&"list-item--active",i&&!s&&"list-item--clickable",s&&"list-item--disabled",l),role:"listitem",tabIndex:s?-1:i?0:void 0,onClick:s?void 0:i,...h,children:[p&&e.jsx("div",{className:"list-item__start",children:p}),e.jsxs("div",{className:"list-item__content",children:[e.jsx(T,{as:"span",weight:"medium",className:"list-item__title",children:n}),o&&e.jsx(T,{as:"span",size:"small",color:"neutral",className:"list-item__description",children:o})]}),r&&e.jsx("div",{className:"list-item__end",children:r})]})}const je=Object.assign(Yt,{Item:Xt});je.displayName="List";function Zt(n,o){const t=Array.isArray(o)?o:o?[o]:[],[r,a]=d.useState(t);return{openItems:r,toggle:l=>{a(i=>{const h=i.includes(l);return n==="single"?h?[]:[l]:h?i.filter(u=>u!==l):[...i,l]})}}}const ge=({title:n,children:o,isOpen:t=!1,onToggle:r,id:a,className:s,...l})=>e.jsxs("div",{className:m("accordion-item",t&&"accordion-item--open",s),...l,children:[e.jsxs("button",{className:"accordion-item__trigger",onClick:r,"aria-expanded":t,"aria-controls":`accordion-content-${a}`,id:`accordion-trigger-${a}`,type:"button",children:[e.jsx("span",{className:"accordion-item__title",children:n}),e.jsx("span",{className:"accordion-item__icon",children:e.jsx(_,{name:"chevron-down",size:16})})]}),e.jsx("div",{className:"accordion-item__content",id:`accordion-content-${a}`,role:"region","aria-labelledby":`accordion-trigger-${a}`,hidden:!t,children:e.jsx("div",{className:"accordion-item__content-inner",children:o})})]}),we=({children:n,type:o="single",defaultValue:t,className:r,...a})=>{const{openItems:s,toggle:l}=Zt(o,t);return e.jsx("div",{className:m("accordion",r),...a,children:d.Children.map(n,(i,h)=>{if(!d.isValidElement(i))return i;const u=i.props.id??`accordion-item-${h}`;return d.cloneElement(i,{id:u,isOpen:s.includes(u),onToggle:()=>l(u)})})})};we.Item=ge;const Le=({size:n="small",weight:o="medium",block:t=!1,children:r,className:a,...s})=>e.jsx("code",{className:m("code",`code--${n}`,`code--${o}`,t&&"code--block",a),...s,children:r});Le.displayName="Code";const K=({color:n="primary",underline:o=!1,active:t,as:r,className:a,children:s,href:l,to:i,style:h,...u})=>{const p=typeof window<"u"?window.location.pathname:"",x=i??l,f=r||"a",y=j=>{const v=j.split("?")[0].split("#")[0];return v.endsWith("/")&&v!=="/"?v.slice(0,-1):v},b=x&&p?y(p)===y(x):!1,k=t??b;return e.jsx(f,{className:m("link",o&&"link--underline",k&&"link--active",a),style:{"--link-color":E(n),...h??{}},href:x,"aria-current":k?"page":void 0,...u,children:s})};K.displayName="Link";const _e=d.forwardRef(({children:n,variant:o="soft",color:t="primary",size:r="medium",className:a,...s},l)=>{const i=G(t)?t:void 0;return e.jsx("span",{ref:l,className:m("badge",`badge--${o}`,i&&`badge--${i}`,`badge--${r}`,a),style:i?void 0:{"--badge-color":E(t)},...s,children:n})});_e.displayName="Badge";const Kt=({variant:n="primary",title:o,icon:t,action:r,children:a,className:s,...l})=>e.jsxs("div",{className:m("alert",`alert--${n}`,s),role:"alert",...l,children:[t&&e.jsx("div",{className:"alert__icon",children:t}),e.jsxs("div",{className:"alert__content",children:[o&&e.jsx(ee,{className:"alert__title",children:o}),a&&e.jsx(T,{size:"small",className:"alert__description",children:a})]}),r&&e.jsx("div",{className:"alert__action",children:r})]});function Jt({children:n,variant:o="soft",size:t="medium",color:r="primary",leftIcon:a,rightIcon:s,closable:l,onRemove:i,className:h,style:u,...p}){const x=l||!!i;return e.jsxs("span",{className:m("tag",`tag--variant-${o}`,`tag--size-${t}`,h),style:{"--tag-color":E(r),...u??{}},...p,children:[a&&e.jsx("span",{className:"tag__icon",children:a}),e.jsx("span",{className:"tag__label",children:n}),s&&e.jsx("span",{className:"tag__icon",children:s}),x&&e.jsx("button",{type:"button",className:"tag__remove",onClick:i,"aria-label":"Remove tag",children:"x"})]})}const ne=d.forwardRef(({src:n,name:o,size:t="medium",status:r,className:a,...s},l)=>{const i=h=>{if(!h)return"";const u=h.split(" ");return u.length===1?u[0].substring(0,2):(u[0][0]+u[u.length-1][0]).toUpperCase()};return e.jsxs("div",{ref:l,className:m("avatar",`avatar--${t}`,a),...s,children:[n?e.jsx("img",{src:n,alt:o,className:"avatar-image"}):e.jsx("span",{className:"avatar-initials",children:i(o)}),r&&e.jsx("span",{className:m("avatar-status",`avatar-status--${r}`)})]})});ne.displayName="Avatar";const oe=({width:n,height:o,animated:t=!0,rounded:r=!1})=>{const a={width:typeof n=="number"?`${n}px`:n,height:typeof o=="number"?`${o}px`:o,borderRadius:r?"9999px":"var(--radius-md)"};return e.jsx("div",{className:m("skeleton",t&&"skeleton--animated",r&&"skeleton--rounded"),style:a})};oe.displayName="Skeleton";const Qt=({src:n,alt:o,objectFit:t="cover",radius:r="medium",className:a,style:s,fallback:l,...i})=>{const[h,u]=d.useState(!1),[p,x]=d.useState(!1);return p&&l?e.jsx(e.Fragment,{children:l}):e.jsxs("div",{className:m("image-wrapper",a),style:s,children:[!h&&!p&&e.jsx("div",{className:m("image-skeleton",`image-radius--${r}`),children:e.jsx(oe,{width:"100%",height:"100%"})}),e.jsx("img",{src:n,alt:o,className:m("image",`image-fit--${t}`,`image-radius--${r}`,h&&"image--loaded"),onLoad:()=>u(!0),onError:()=>x(!0),...i})]})},Ie=d.forwardRef(({label:n,size:o="medium",className:t,disabled:r,...a},s)=>e.jsxs("label",{className:m("switch-wrapper",`switch--${o}`,r&&"switch-wrapper--disabled",t),children:[e.jsx("input",{type:"checkbox",className:"switch-input",disabled:r,ref:s,...a}),e.jsx("span",{className:"switch-track",children:e.jsx("span",{className:"switch-thumb"})}),n&&e.jsx("span",{className:"switch-label",children:n})]}));Ie.displayName="Switch";const Ce=({currentPage:n,totalPages:o,onPageChange:t,showControls:r=!0,className:a,...s})=>{const l=d.useMemo(()=>{const i=[],h=Math.max(1,n-1),u=Math.min(o,n+1);h>1&&(i.push(1),h>2&&i.push("dots-start"));for(let p=h;p<=u;p+=1)i.push(p);return u<o&&(u<o-1&&i.push("dots-end"),i.push(o)),i},[n,o]);return e.jsxs("nav",{className:m("pagination",a),"aria-label":"Pagination",...s,children:[r&&e.jsx("button",{type:"button",className:m("pagination__item",n===1&&"pagination__item--disabled"),onClick:()=>t(n-1),disabled:n===1,"aria-label":"Previous page",children:e.jsx(_,{name:"chevron-left",size:16})}),l.map((i,h)=>{if(typeof i=="string")return e.jsx("span",{className:"pagination__dots",children:"..."},`${i}-${h}`);const u=i===n;return e.jsx("button",{type:"button",className:m("pagination__item",u&&"pagination__item--active"),onClick:()=>!u&&t(i),"aria-current":u?"page":void 0,children:i},i)}),r&&e.jsx("button",{type:"button",className:m("pagination__item",n===o&&"pagination__item--disabled"),onClick:()=>t(n+1),disabled:n===o,"aria-label":"Next page",children:e.jsx(_,{name:"chevron-right",size:16})})]})};Ce.displayName="Pagination";const er=({icon:n,title:o,description:t,action:r,className:a,...s})=>e.jsxs("div",{className:m("empty-state",a),...s,children:[n&&e.jsx("div",{className:"empty-state__icon",children:n}),e.jsx(ye,{children:o}),t&&e.jsx(T,{color:"neutral",children:t}),r&&e.jsx("div",{className:"empty-state__action",children:r})]}),Ne=({open:n,onClose:o,title:t,description:r,children:a,footer:s,size:l="medium",closeOnOverlayClick:i=!0,className:h})=>{const[u,p]=d.useState(!1);return d.useEffect(()=>{if(!n)return;const x=f=>{f.key==="Escape"&&o()};return document.addEventListener("keydown",x),document.body.style.overflow="hidden",p(!0),()=>{document.removeEventListener("keydown",x),document.body.style.overflow=""}},[n,o]),!n||!u?null:U.createPortal(e.jsx("div",{className:"modal-overlay",onClick:i?o:void 0,children:e.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":t?"modal-title":void 0,"aria-describedby":r?"modal-description":void 0,tabIndex:-1,className:m("modal",`modal--${l}`,h),onClick:x=>x.stopPropagation(),children:[(t||r)&&e.jsxs("div",{className:"modal-header",children:[e.jsxs("div",{children:[t&&e.jsx(Q,{id:"modal-title",className:"modal-title",children:t}),r&&e.jsx("p",{id:"modal-description",className:"modal-description",children:r})]}),e.jsx(H,{icon:e.jsx(_,{name:"close",size:16}),"aria-label":"Close modal",variant:"ghost",color:"neutral",size:"small",onClick:o})]}),a&&e.jsx("div",{className:"modal-body",children:a}),s&&e.jsx("div",{className:"modal-footer",children:s})]})}),document.body)};Ne.displayName="Modal";const Me=({isOpen:n,onClose:o,title:t,placement:r="right",children:a,footer:s,size:l="medium",className:i,closeOnOverlayClick:h=!0})=>{const[u,p]=d.useState(!1);return d.useEffect(()=>(p(!0),n?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[n]),u?U.createPortal(e.jsxs(e.Fragment,{children:[n&&e.jsx("div",{className:"drawer-overlay",onClick:h?o:void 0}),e.jsxs("div",{className:m("drawer",`drawer--${r}`,`drawer--size-${l}`,n&&"drawer--open",i),role:"dialog","aria-modal":"true","aria-hidden":!n,children:[e.jsxs("div",{className:"drawer-header",children:[t?e.jsx(Q,{className:"drawer-title",children:t}):e.jsx("span",{}),e.jsx(H,{icon:e.jsx(_,{name:"close",size:16}),variant:"ghost",size:"small",onClick:o,"aria-label":"Fechar painel"})]}),e.jsx("div",{className:"drawer-body",children:a}),s&&e.jsx("div",{className:"drawer-footer",children:s})]})]}),document.body):null};Me.displayName="Drawer";function nr({content:n,placement:o="top",children:t,delay:r=300}){const a=d.useId(),s=d.useRef(null),l=d.useRef(),[i,h]=d.useState(!1),[u,p]=d.useState({top:0,left:0}),x=d.useCallback(()=>{if(!s.current)return;const k=s.current.getBoundingClientRect(),j=10;if(o==="top"){p({top:k.top+window.scrollY-j,left:k.left+k.width/2+window.scrollX});return}if(o==="bottom"){p({top:k.bottom+window.scrollY+j,left:k.left+k.width/2+window.scrollX});return}if(o==="left"){p({top:k.top+k.height/2+window.scrollY,left:k.left+window.scrollX-j});return}p({top:k.top+k.height/2+window.scrollY,left:k.right+window.scrollX+j})},[o]),f=d.useCallback(()=>{l.current=window.setTimeout(()=>{x(),h(!0)},r)},[r,x]),y=d.useCallback(()=>{window.clearTimeout(l.current),h(!1)},[]);d.useEffect(()=>{if(!i)return;const k=()=>x();return window.addEventListener("scroll",k,!0),window.addEventListener("resize",k),()=>{window.removeEventListener("scroll",k,!0),window.removeEventListener("resize",k)}},[i,x]);const b=d.cloneElement(t,{ref:s,onMouseEnter:k=>{t.props.onMouseEnter?.(k),f()},onMouseLeave:k=>{t.props.onMouseLeave?.(k),y()},onFocus:k=>{t.props.onFocus?.(k),f()},onBlur:k=>{t.props.onBlur?.(k),y()},"aria-describedby":i?a:t.props["aria-describedby"]});return e.jsxs(e.Fragment,{children:[b,i&&U.createPortal(e.jsx("div",{id:a,className:m("tooltip",`tooltip--${o}`),style:{top:u.top,left:u.left},role:"tooltip",children:n}),document.body)]})}const Be=d.createContext(null),ae={success:e.jsx(_,{name:"check",size:16}),warning:e.jsx(_,{name:"warning",size:16}),error:e.jsx(_,{name:"close",size:16}),neutral:e.jsx(_,{name:"info",size:16}),primary:e.jsx(_,{name:"info",size:16})};function or({toast:n,onDismiss:o}){const[t,r]=d.useState(!1),a=d.useCallback(()=>{r(!0),setTimeout(()=>o(n.id),250)},[n.id,o]);d.useEffect(()=>{const i=setTimeout(a,n.duration??4e3);return()=>clearTimeout(i)},[a,n.duration]);const s=n.color??"primary",l=ae[s]||ae.primary;return e.jsxs("div",{className:m("toast",`toast--${s}`,t&&"toast--exiting"),children:[e.jsx("span",{className:"toast-icon",children:l}),e.jsxs("div",{className:"toast-content",children:[e.jsx("p",{className:"toast-title",children:n.title}),n.description&&e.jsx("p",{className:"toast-description",children:n.description})]}),e.jsx(H,{icon:e.jsx(_,{name:"close",size:14}),"aria-label":"Dismiss notification",variant:"ghost",size:"small",onClick:a,className:"toast-close"})]})}const Se=({children:n,position:o="top-right",maxToasts:t=5})=>{const[r,a]=d.useState(!1),[s,l]=d.useState([]);d.useEffect(()=>{a(!0)},[]);const i=d.useCallback(u=>{const p=`toast-${Date.now()}-${Math.random().toString(36).slice(2)}`;l(x=>[...x.slice(-(t-1)),{...u,id:p}])},[t]),h=d.useCallback(u=>{l(p=>p.filter(x=>x.id!==u))},[]);return e.jsxs(Be.Provider,{value:{toast:i,dismiss:h},children:[n,r&&U.createPortal(e.jsx("div",{className:m("toast-container",`toast-container--${o}`),children:s.map(u=>e.jsx(or,{toast:u,onDismiss:h},u.id))}),document.body)]})};function tr(){const n=d.useContext(Be);if(!n)throw new Error("useToast must be used inside <ToastProvider>");return n}const We=({striped:n=!1,hover:o=!0,compact:t=!1,stickyHeader:r=!1,className:a,containerClassName:s,children:l,...i})=>e.jsx("div",{className:m("table-container",r&&"table-container--sticky-header",s),children:e.jsx("table",{className:m("table",n&&"table--striped",o&&"table--hover",t&&"table--compact",a),...i,children:l})}),Te=n=>e.jsx("thead",{...n}),ze=n=>e.jsx("tbody",{...n}),$e=n=>e.jsx("tr",{...n}),De=n=>e.jsx("th",{...n}),Ae=n=>e.jsx("td",{...n});We.displayName="Table";Te.displayName="Thead";ze.displayName="Tbody";$e.displayName="Tr";De.displayName="Th";Ae.displayName="Td";const Ee=d.createContext({collapsed:!1,toggleCollapsed:()=>{},searchTerm:"",setSearchTerm:()=>{},enableSearch:!1,searchPlaceholder:"Buscar item"});function te(){return d.useContext(Ee)}function q(n){return typeof n=="string"||typeof n=="number"?String(n):Array.isArray(n)?n.map(q).join(" "):d.isValidElement(n)?q(n.props.children):""}function He(n){let o=0;return d.Children.forEach(n,t=>{if(d.isValidElement(t)){if(t.type===re){o+=1;return}o+=He(t.props.children)}}),o}function Re(n){for(const o of d.Children.toArray(n)){if(!d.isValidElement(o))continue;if(o.type===re)return o;const t=Re(o.props.children);if(t)return t}return null}function rr({collapsed:n,defaultCollapsed:o=!1,onToggle:t,className:r,children:a,searchThreshold:s=12,searchPlaceholder:l="Buscar item",...i}){const[h,u]=d.useState(o),[p,x]=d.useState(""),f=n!==void 0,y=f?n:h,k=d.useMemo(()=>He(a),[a])>s&&!y,j=d.Children.toArray(a),v=j.findIndex(M=>d.isValidElement(M)&&M.type===Ve),C=()=>{const M=!y;f||u(M),t?.(M)},w=d.useMemo(()=>({collapsed:y,toggleCollapsed:C,searchTerm:p,setSearchTerm:x,enableSearch:k,searchPlaceholder:l}),[y,p,k,l]);return e.jsx(Ee.Provider,{value:w,children:e.jsxs("aside",{className:m("sidebar",y&&"sidebar--collapsed",r),...i,children:[v===-1?a:j.slice(0,v),v===-1?null:j.slice(v)]})})}function sr({icon:n,logo:o,collapsible:t=!0,className:r,children:a,onClick:s,...l}){const{collapsed:i,toggleCollapsed:h,enableSearch:u,searchTerm:p,setSearchTerm:x,searchPlaceholder:f}=te(),y=b=>{t&&h(),s?.(b)};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:m("sidebar__header",r),onClick:y,...l,children:[e.jsx("div",{className:"sidebar__header-icon",children:n??e.jsx(_,{name:"menu"})}),!i&&e.jsx("div",{className:"sidebar__header-content",children:o??a})]}),u?e.jsx("div",{className:"sidebar__search sidebar__search--header",children:e.jsx(Z,{value:p,onChange:b=>x(b.target.value),placeholder:f,prefix:e.jsx(_,{name:"search",size:16}),size:"small",full:!0})}):null]})}function re({icon:n,active:o=!1,as:t,className:r,children:a,searchText:s,...l}){const{collapsed:i,searchTerm:h}=te(),u=t||"button",p=(s??q(a)).trim().toLocaleLowerCase(),x=h.trim().toLocaleLowerCase();return!x||p.includes(x)?e.jsxs(u,{className:m("sidebar__item",o&&"sidebar__item--active",r),...l,children:[n?e.jsx("span",{className:"sidebar__item-icon",children:n}):null,!i&&e.jsx("span",{className:"sidebar__item-label",children:a})]}):null}function ar({title:n,leftIcon:o,defaultOpen:t=!0,open:r,onOpenChange:a,collapsible:s=!0,className:l,children:i,...h}){const{collapsed:u,searchTerm:p}=te(),[x,f]=d.useState(t),y=r!==void 0,b=y?r:x,k=p.trim().toLocaleLowerCase(),j=q(i).toLocaleLowerCase(),v=!k||j.includes(k),C=!!(k&&v),w=u?!1:C||b,M=Re(i);if(!v)return null;const L=W=>{if(u){const S=M?.props?.onClick;typeof S=="function"&&S(W);return}if(!s||C)return;const g=!b;y||f(g),a?.(g)};return e.jsxs("div",{className:m("sidebar__group",w&&"sidebar__group--open",l),...h,children:[e.jsxs("button",{type:"button",className:"sidebar__group-trigger",onClick:L,"aria-expanded":w,disabled:!s||C,children:[o?e.jsx("span",{className:"sidebar__group-left-icon",children:o}):null,u?null:e.jsx("span",{className:"sidebar__group-title",children:n}),e.jsx("span",{className:"sidebar__group-icon",children:e.jsx(_,{name:"chevron-down",size:16})})]}),w?e.jsx("div",{className:"sidebar__group-content",children:i}):null]})}function Ve({className:n,children:o,...t}){return e.jsx("div",{className:m("sidebar__footer",n),...t,children:o})}const Fe=Object.assign(rr,{Header:sr,Item:re,Group:ar,Footer:Ve});Fe.displayName="Sidebar";const Pe=d.createContext(void 0),Oe=()=>{const n=d.useContext(Pe);if(!n)throw new Error("useTheme must be used within a ThemeProvider");return n},ir=({children:n,defaultTheme:o="dark",storageKey:t="theme",toastPosition:r,toastMaxToasts:a})=>{const[s,l]=d.useState(()=>localStorage.getItem(t)||o);d.useEffect(()=>{const u=window.document.documentElement;u.classList.remove("theme-light","theme-dark"),u.classList.add(`theme-${s}`),u.setAttribute("data-theme",s),localStorage.setItem(t,s)},[s,t]);const i=()=>{l(u=>u==="light"?"dark":"light")},h=u=>{l(u)};return e.jsx(Pe.Provider,{value:{theme:s,toggleTheme:i,setTheme:h},children:e.jsx(Se,{position:r,maxToasts:a,children:n})})},Ue=({logo:n,navItems:o=[],navPosition:t="center",extraContent:r,themeToggle:a=!1,sticky:s=!1,className:l,children:i,contentInside:h=!1,...u})=>{const{theme:p,toggleTheme:x}=Oe(),f=typeof window<"u"?window.location.pathname:"",y=k=>{const j=k.split("?")[0].split("#")[0];return j.endsWith("/")&&j!=="/"?j.slice(0,-1):j},b=()=>e.jsx(V,{as:"nav",align:"center",gap:"5",className:"topbar__nav",children:o.map((k,j)=>{const v=k.to??k.href,C=k.active??(v?y(v)===y(f):!1);return v?e.jsx(K,{href:v,className:m("topbar__nav-item",C&&"topbar__nav-item--active"),active:C,onClick:k.onClick,children:k.label},`${k.label??"link"}-${j}`):e.jsx("button",{type:"button",className:m("topbar__nav-item",C&&"topbar__nav-item--active"),onClick:k.onClick,children:k.label},`${k.label??"button"}-${j}`)})});return e.jsxs(V,{as:"header",align:"center",justify:"space-between",className:m("topbar",s&&"topbar--sticky",t==="right"&&"topbar--nav-right",h&&"topbar--with-children",l),...u,children:[e.jsx(V,{align:"center",gap:"4",className:"topbar__left",children:n&&e.jsx("div",{className:"topbar__logo",children:n})}),t==="center"&&o.length>0&&e.jsx(V,{align:"center",justify:"center",className:"topbar__center",children:b()}),h&&i&&e.jsx("div",{className:"topbar__content",children:i}),e.jsxs(V,{align:"center",gap:"4",className:"topbar__right",children:[t==="right"&&o.length>0&&b(),r,a&&e.jsx(H,{icon:p==="dark"?e.jsx(_,{name:"sun",size:16}):e.jsx(_,{name:"moon",size:16}),variant:"ghost",size:"small",label:"Toggle theme",onClick:x})]}),!h&&i&&e.jsx("div",{className:"topbar__children",children:i})]})};Ue.displayName="TopBar";const cr=({title:n,description:o,showBack:t=!1,onBack:r,width:a,action:s,className:l,...i})=>e.jsxs("div",{className:m("page-header",l),...i,children:[e.jsxs("div",{className:"page-header__left",children:[t&&e.jsx(H,{variant:"ghost",size:"small",icon:e.jsx(_,{name:"chevron-left",size:16}),onClick:r,label:"Back"}),e.jsxs("div",{className:"page-header__content",children:[e.jsx(ve,{weight:"bold",children:n}),o&&e.jsx(T,{color:"neutral",style:{width:`${a||"100%"}`},children:o})]})]}),s&&e.jsx("div",{className:"page-header__right",children:s})]}),Ge=({items:n,separator:o="/",className:t})=>e.jsx("nav",{className:m("breadcrumb",t),"aria-label":"Breadcrumb",children:e.jsx("ol",{className:"breadcrumb-list",children:n.map((r,a)=>{const s=a===n.length-1;return e.jsxs("li",{className:"breadcrumb-item",children:[r.href&&!s?e.jsxs(K,{href:r.href,color:"neutral",className:"breadcrumb-link",children:[r.icon&&e.jsx("span",{className:"breadcrumb-icon",children:r.icon}),r.label]}):e.jsxs("span",{className:m("breadcrumb-link",s&&"breadcrumb-current"),"aria-current":s?"page":void 0,children:[r.icon&&e.jsx("span",{className:"breadcrumb-icon",children:r.icon}),r.label]}),!s&&e.jsx("span",{className:"breadcrumb-separator",children:o})]},a)})})});Ge.displayName="Breadcrumb";const qe=({value:n,max:o=100,size:t="medium",color:r,animated:a=!1,showValue:s=!1,label:l,className:i,style:h,...u})=>{const p=Math.min(100,Math.max(0,n/o*100));return e.jsxs("div",{className:m("progress-wrapper",i),style:{"--progress-color":E(r),...h??{}},...u,children:[(l||s)&&e.jsxs("div",{className:"progress-label",children:[l&&e.jsx("span",{children:l}),s&&e.jsxs("span",{className:"progress-value",children:[Math.round(p),"%"]})]}),e.jsx("div",{className:m("progress",`progress--${t}`,a&&"progress--animated"),role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":o,children:e.jsx("div",{className:"progress-bar",style:{width:`${p}%`}})})]})};qe.displayName="Progress";const Ye=({tabs:n,defaultValue:o,value:t,onChange:r,className:a,variant:s="default",size:l="medium"})=>{const[i,h]=d.useState(o??n[0]?.value??""),u=t??i,p=f=>{t===void 0&&h(f),r?.(f)},x=n.find(f=>f.value===u);return e.jsxs("div",{className:m("tabs",`tabs--${s}`,`tabs--${l}`,a),children:[e.jsx("div",{className:"tabs-list",role:"tablist",children:n.map(f=>{const y=u===f.value,b=m("tabs-trigger",y&&"tabs-trigger--active");return f.href?e.jsx("a",{role:"tab",href:f.href,"aria-selected":y,className:b,onClick:k=>{f.disabled?k.preventDefault():p(f.value)},children:f.label},f.value):e.jsx("button",{role:"tab",type:"button",disabled:f.disabled,"aria-selected":y,className:b,onClick:()=>p(f.value),children:f.label},f.value)})}),e.jsx("div",{role:"tabpanel",className:"tabs-panel",tabIndex:0,children:x?.content})]})};Ye.displayName="Tabs";const Xe=({title:n,description:o,date:t,icon:r,src:a,name:s})=>e.jsxs("div",{className:m("timeline-item",!r&&!a&&!s&&"timeline-item--dot"),children:[e.jsxs("div",{className:"timeline-item__aside",children:[e.jsx("div",{className:"timeline-item__marker",children:a||s?e.jsx(ne,{src:a,name:s,size:"small"}):r?e.jsx("div",{className:"timeline-item__icon",children:r}):e.jsx("div",{className:"timeline-item__dot"})}),e.jsx("div",{className:"timeline-item__line"})]}),e.jsxs("div",{className:"timeline-item__content",children:[e.jsxs("div",{className:"timeline-item__header",children:[e.jsx(T,{weight:"medium",children:n}),t&&e.jsx(T,{size:"small",color:"neutral",children:t})]}),o&&e.jsx("div",{className:"timeline-item__description",children:e.jsx(T,{color:"neutral",children:o})})]})]}),Ze=({children:n,className:o,...t})=>e.jsx("div",{className:m("timeline",o),...t,children:n});Ze.displayName="Timeline";Xe.displayName="TimelineItem";exports.Accordion=we;exports.AccordionItem=ge;exports.ActivityIcon=an;exports.Alert=Kt;exports.AlertCircleIcon=cn;exports.AlertTriangleIcon=ln;exports.AlignHorizontalIcon=dn;exports.AlignJustifyIcon=un;exports.AppWindowIcon=hn;exports.ArrowDownIcon=pn;exports.ArrowLeftIcon=mn;exports.ArrowRightIcon=xn;exports.ArrowUpIcon=kn;exports.Avatar=ne;exports.Badge=_e;exports.BadgeIcon=fn;exports.BatteryIcon=vn;exports.BellIcon=yn;exports.BluetoothIcon=bn;exports.BookIcon=jn;exports.Box=Pt;exports.BoxIcon=gn;exports.Breadcrumb=Ge;exports.Button=O;exports.CalendarIcon=wn;exports.CameraIcon=Ln;exports.Card=Ht;exports.CardBody=Vt;exports.CardFooter=Ft;exports.CardHeader=Rt;exports.CheckIcon=In;exports.CheckSquareIcon=_n;exports.Checkbox=ke;exports.ChevronDownIcon=Cn;exports.ChevronIcon=Sn;exports.ChevronLeftIcon=Nn;exports.ChevronRightIcon=Mn;exports.ChevronUpIcon=Bn;exports.CircleDotIcon=Wn;exports.ClockIcon=Tn;exports.CloseIcon=zn;exports.CloudIcon=$n;exports.Code=Le;exports.CodeIcon=Dn;exports.ComponentIcon=An;exports.Container=Ut;exports.CopyIcon=En;exports.CreditCardIcon=Hn;exports.DatabaseIcon=Rn;exports.DatePicker=ue;exports.Divider=qt;exports.DownloadIcon=Vn;exports.Drawer=Me;exports.Dropdown=xe;exports.EditIcon=Fn;exports.EmptyState=er;exports.ExternalLinkIcon=Pn;exports.EyeIcon=Un;exports.EyeOffIcon=On;exports.FileIcon=qn;exports.FileTextIcon=Gn;exports.FileUpload=Dt;exports.FilterIcon=Yn;exports.Flex=V;exports.FolderIcon=Xn;exports.FormField=D;exports.FormInputIcon=Zn;exports.GhostIcon=Kn;exports.GiftIcon=Jn;exports.GitCommitIcon=Qn;exports.GithubIcon=eo;exports.Grid=Ot;exports.GridIcon=no;exports.GripIcon=oo;exports.Heading=ve;exports.Heading1Icon=to;exports.Heading2=Q;exports.Heading3=At;exports.Heading4=ye;exports.Heading5=ee;exports.Heading6=Et;exports.HeartIcon=ro;exports.HelpCircleIcon=so;exports.HistoryIcon=ao;exports.HomeIcon=io;exports.Icon=_;exports.IconBase=ie;exports.IconButton=H;exports.Image=Qt;exports.ImageIcon=co;exports.InfoIcon=lo;exports.Input=Z;exports.LabIcon=uo;exports.LaptopIcon=ho;exports.LayoutIcon=mo;exports.LayoutTemplateIcon=po;exports.Link=K;exports.LinkIcon=xo;exports.LinkedinIcon=ko;exports.List=je;exports.ListChecksIcon=fo;exports.ListCollapseIcon=vo;exports.ListFilterIcon=yo;exports.ListIcon=bo;exports.Loader=Y;exports.Loader2Icon=jo;exports.LockIcon=go;exports.LogInIcon=wo;exports.LogOutIcon=Lo;exports.MailIcon=_o;exports.MapPinIcon=Io;exports.MenuIcon=Co;exports.MessageCircleIcon=No;exports.MessageSquareIcon=Mo;exports.MicIcon=Bo;exports.MilestoneIcon=So;exports.MinusIcon=Wo;exports.Modal=Ne;exports.MonitorIcon=To;exports.MoonIcon=zo;exports.MoreHorizontalIcon=$o;exports.MousePointerIcon=Do;exports.MultiSelect=pe;exports.MusicIcon=Ao;exports.PageHeader=cr;exports.Pagination=Ce;exports.PanelIcon=Ro;exports.PanelLeftIcon=Eo;exports.PanelTopIcon=Ho;exports.PhoneIcon=Vo;exports.PlusIcon=Fo;exports.Progress=qe;exports.Radio=fe;exports.RectangleHorizontalIcon=Po;exports.RefreshIcon=Oo;exports.RocketIcon=Uo;exports.RulerIcon=Go;exports.Search=de;exports.SearchIcon=qo;exports.Select=he;exports.ServerIcon=Yo;exports.SettingsIcon=Xo;exports.ShareIcon=Zo;exports.ShieldIcon=Ko;exports.ShoppingCartIcon=Jo;exports.Sidebar=Fe;exports.Skeleton=oe;exports.Slider=$t;exports.SlidersHorizontalIcon=Qo;exports.SmartphoneIcon=et;exports.Spacer=Gt;exports.SparkIcon=nt;exports.SparklesIcon=ot;exports.SpinnerIcon=tt;exports.SquareIcon=rt;exports.StarIcon=st;exports.SunIcon=at;exports.Switch=Ie;exports.Table=We;exports.TableIcon=it;exports.TabletIcon=ct;exports.Tabs=Ye;exports.Tag=Jt;exports.TagIcon=lt;exports.Tbody=ze;exports.Td=Ae;exports.Text=T;exports.TextArea=le;exports.TextCursorIcon=dt;exports.Th=De;exports.Thead=Te;exports.ThemeDarkIcon=ut;exports.ThemeLightIcon=ht;exports.ThemeProvider=ir;exports.Timeline=Ze;exports.TimelineItem=Xe;exports.ToastProvider=Se;exports.ToggleRightIcon=pt;exports.Tooltip=nr;exports.TopBar=Ue;exports.Tr=$e;exports.TrashIcon=mt;exports.TypeIcon=xt;exports.UnlockIcon=kt;exports.UploadCloudIcon=ft;exports.UploadIcon=vt;exports.UserCircleIcon=yt;exports.UserIcon=bt;exports.VideoIcon=jt;exports.WarningIcon=gt;exports.WifiIcon=wt;exports.XIcon=Lt;exports.ZapIcon=_t;exports.classNames=m;exports.createVariants=on;exports.iconRegistry=ce;exports.useTheme=Oe;exports.useToast=tr;
208
208
  //# sourceMappingURL=acyon.cjs.js.map