@zeo-app/design-system 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,7 @@
1
1
  export interface UserMenuLabels {
2
2
  myAccount: string;
3
3
  logout: string;
4
+ darkMode: string;
4
5
  /** Rótulo acessível do avatar quando não há nome. */
5
6
  user: string;
6
7
  }
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("react"),he=require("react-dom"),be={info:{container:"bg-blue-50 border-blue-200 text-blue-800",icon:"text-blue-500",defaultIcon:"info"},success:{container:"bg-green-50 border-green-200 text-green-800",icon:"text-green-500",defaultIcon:"check_circle"},warning:{container:"bg-yellow-50 border-yellow-200 text-yellow-800",icon:"text-yellow-500",defaultIcon:"warning"},danger:{container:"bg-red-50 border-red-200 text-red-800",icon:"text-red-500",defaultIcon:"error"}};function ge({variant:t="info",title:s,children:n,onClose:r,icon:a,className:o="",...l}){const i=be[t],c=a??i.defaultIcon;return e.jsxs("div",{role:"alert",className:["flex gap-3 p-4 rounded-lg border",i.container,o].filter(Boolean).join(" "),...l,children:[e.jsx("span",{className:`material-symbols-outlined text-[20px] shrink-0 mt-0.5 ${i.icon}`,children:c}),e.jsxs("div",{className:"flex-1 min-w-0",children:[s&&e.jsx("p",{className:"font-semibold text-sm mb-0.5",children:s}),e.jsx("div",{className:"text-sm leading-relaxed",children:n})]}),r&&e.jsx("button",{onClick:r,className:"shrink-0 opacity-70 hover:opacity-100 transition-opacity","aria-label":"Fechar alerta",children:e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]})}const je={xs:"w-6 h-6 text-[10px]",sm:"w-8 h-8 text-xs",md:"w-10 h-10 text-sm",lg:"w-12 h-12 text-base",xl:"w-16 h-16 text-lg"},ve={xs:"w-1.5 h-1.5",sm:"w-2 h-2",md:"w-2.5 h-2.5",lg:"w-3 h-3",xl:"w-3.5 h-3.5"},we={online:"bg-green-500",offline:"bg-gray-400",busy:"bg-red-500",away:"bg-yellow-400"};function ye(t){return t.split(" ").slice(0,2).map(s=>s[0]).join("").toUpperCase()}function Ne(t){const s=["bg-orange-100 text-orange-700","bg-blue-100 text-blue-700","bg-green-100 text-green-700","bg-purple-100 text-purple-700","bg-pink-100 text-pink-700","bg-teal-100 text-teal-700"],n=t.charCodeAt(0)%s.length;return s[n]}function E({src:t,alt:s="",name:n,size:r="md",status:a,className:o="",...l}){return e.jsxs("div",{className:["relative inline-flex shrink-0",o].filter(Boolean).join(" "),...l,children:[e.jsx("div",{className:["rounded-full overflow-hidden flex items-center justify-center font-semibold",je[r],!t&&n?Ne(n):"bg-surface-container"].filter(Boolean).join(" "),children:t?e.jsx("img",{src:t,alt:s||n,className:"w-full h-full object-cover"}):n?ye(n):e.jsx("span",{className:"material-symbols-outlined text-on-surface-variant",style:{fontSize:"60%"},children:"person"})}),a&&e.jsx("span",{className:["absolute bottom-0 right-0 rounded-full border-2 border-white",ve[r],we[a]].filter(Boolean).join(" ")})]})}const ke={default:"bg-surface-container text-on-surface-variant",primary:"bg-orange-100 text-orange-700",success:"bg-green-100 text-green-700",warning:"bg-yellow-100 text-yellow-700",danger:"bg-red-100 text-red-700",info:"bg-blue-100 text-blue-700"},Ce={default:"bg-on-surface-variant",primary:"bg-orange-500",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500",info:"bg-blue-500"},Be={sm:"px-2 py-0.5 text-xs gap-1",md:"px-2.5 py-1 text-xs gap-1.5"};function Le({variant:t="default",size:s="md",dot:n=!1,icon:r,children:a,className:o="",...l}){return e.jsxs("span",{className:["inline-flex items-center font-medium rounded-full",ke[t],Be[s],o].filter(Boolean).join(" "),...l,children:[n&&e.jsx("span",{className:`w-1.5 h-1.5 rounded-full shrink-0 ${Ce[t]}`}),r&&!n&&e.jsx("span",{className:"material-symbols-outlined text-[12px]",children:r}),a]})}function ze({items:t,className:s="",...n}){return e.jsx("nav",{"aria-label":"Breadcrumb",className:s,...n,children:e.jsx("ol",{className:"inline-flex items-center gap-1.5 text-sm flex-wrap",children:t.map((r,a)=>{const o=a===t.length-1;return e.jsxs("li",{className:"flex items-center gap-1.5",children:[a>0&&e.jsx("span",{className:"material-symbols-outlined text-[16px] text-on-surface-variant select-none",children:"chevron_right"}),o?e.jsxs("span",{"aria-current":"page",className:"font-semibold text-on-surface flex items-center gap-1",children:[r.icon&&e.jsx("span",{className:"material-symbols-outlined text-[18px] leading-none",children:r.icon}),r.label]}):e.jsxs("a",{href:r.href??"#",className:"text-on-surface-variant hover:text-zeo-orange transition-colors flex items-center gap-1",children:[r.icon&&e.jsx("span",{className:"material-symbols-outlined text-[18px] leading-none",children:r.icon}),r.label]})]},a)})})})}const Me={primary:"bg-zeo-orange text-white hover:bg-orange-700 active:bg-orange-800 focus:shadow-zeo-focus border-transparent",secondary:"bg-white text-on-surface border-outline-variant hover:bg-surface-container-low active:bg-surface-container focus:shadow-zeo-focus",ghost:"bg-transparent text-on-surface-variant border-transparent hover:bg-surface-container-low active:bg-surface-container focus:shadow-zeo-focus",danger:"bg-error text-on-error border-transparent hover:bg-red-700 active:bg-red-800 focus:shadow-[0_0_0_4px_rgba(186,26,26,0.15)]",success:"bg-tertiary text-on-tertiary border-transparent hover:bg-green-800 active:bg-green-900 focus:shadow-[0_0_0_4px_rgba(0,108,73,0.15)]"},_e={sm:"px-3 py-1.5 text-sm gap-1.5 h-8",md:"px-4 py-2 text-sm gap-2 h-10",lg:"px-5 py-2.5 text-base gap-2 h-11"},R={sm:"text-[16px]",md:"text-[18px]",lg:"text-[20px]"},J=u.forwardRef(({variant:t="primary",size:s="md",loading:n=!1,iconLeft:r,iconRight:a,fullWidth:o=!1,disabled:l,children:i,className:c="",...x},f)=>{const m=l||n;return e.jsxs("button",{ref:f,disabled:m,className:["inline-flex items-center justify-center font-medium rounded border transition-all duration-200 select-none","focus:outline-none","disabled:opacity-50 disabled:cursor-not-allowed",Me[t],_e[s],o?"w-full":"",c].filter(Boolean).join(" "),...x,children:[n?e.jsx("span",{className:`material-symbols-outlined animate-spin ${R[s]}`,children:"progress_activity"}):r&&e.jsx("span",{className:`material-symbols-outlined ${R[s]}`,children:r}),i,!n&&a&&e.jsx("span",{className:`material-symbols-outlined ${R[s]}`,children:a})]})});J.displayName="Button";function Ie({children:t,attached:s=!1,className:n="",...r}){return e.jsx("div",{role:"group",className:["inline-flex",s?"[&>button]:rounded-none [&>button:first-child]:rounded-l [&>button:last-child]:rounded-r [&>button:not(:first-child)]:-ml-px":"gap-2",n].filter(Boolean).join(" "),...r,children:t})}const Ae={elevated:"bg-white shadow-theme-lg border border-surface-container-high",outlined:"bg-white border border-outline-variant",filled:"bg-surface-container-low border border-transparent"},Se={none:"",sm:"p-4",md:"p-5",lg:"p-6"};function Te({variant:t="elevated",padding:s="md",children:n,className:r="",...a}){return e.jsx("div",{className:["rounded-xl overflow-hidden",Ae[t],r].filter(Boolean).join(" "),...a,children:e.jsx("div",{className:Se[s],children:n})})}function $e({title:t,subtitle:s,action:n,icon:r,className:a="",...o}){return e.jsxs("div",{className:["flex items-start justify-between gap-4 pb-4",a].filter(Boolean).join(" "),...o,children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[r&&e.jsx("span",{className:"material-symbols-outlined text-on-surface-variant text-[24px] shrink-0",children:r}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h3",{className:"text-base font-semibold text-on-surface truncate",children:t}),s&&e.jsx("p",{className:"text-sm text-on-surface-variant mt-0.5",children:s})]})]}),n&&e.jsx("div",{className:"shrink-0",children:n})]})}function Re({children:t,className:s="",...n}){return e.jsx("div",{className:["flex items-center justify-end gap-3 pt-4 border-t border-surface-container-high",s].filter(Boolean).join(" "),...n,children:t})}const z=8,O=4;function Ee({trigger:t,items:s,align:n="right",className:r="",...a}){const[o,l]=u.useState(!1),[i,c]=u.useState(null),x=u.useRef(null),f=u.useRef(null),m=u.useCallback(()=>{var B;const d=x.current;if(!d)return;const p=d.getBoundingClientRect(),h=(B=f.current)==null?void 0:B.getBoundingClientRect(),j=(h==null?void 0:h.width)??180,b=(h==null?void 0:h.height)??0,v=window.innerHeight-p.bottom,w=p.top,N=v<b+z&&w>v?p.top-b-O:p.bottom+O,_=n==="right"?p.right-j:p.left,I=window.innerWidth-j-z,A=Math.min(Math.max(_,z),Math.max(I,z));c({top:N,left:A})},[n]);return u.useLayoutEffect(()=>{o&&m()},[o,m]),u.useEffect(()=>{if(!o)return;const d=()=>m();return window.addEventListener("scroll",d,!0),window.addEventListener("resize",d),()=>{window.removeEventListener("scroll",d,!0),window.removeEventListener("resize",d)}},[o,m]),u.useEffect(()=>{const d=p=>{var v,w;const h=p.target,j=(v=x.current)==null?void 0:v.contains(h),b=(w=f.current)==null?void 0:w.contains(h);!j&&!b&&l(!1)};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[]),u.useEffect(()=>{const d=p=>{p.key==="Escape"&&l(!1)};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[]),e.jsxs("div",{ref:x,className:["relative inline-block",r].filter(Boolean).join(" "),...a,children:[e.jsx("div",{onClick:()=>l(d=>!d),children:t}),o&&he.createPortal(e.jsx("div",{ref:f,className:"fixed z-[100] min-w-[180px] bg-white border border-surface-container-high rounded-xl shadow-theme-lg py-1",style:{top:(i==null?void 0:i.top)??0,left:(i==null?void 0:i.left)??0,visibility:i?"visible":"hidden"},role:"menu",children:s.map((d,p)=>e.jsxs("div",{children:[e.jsxs("button",{role:"menuitem",disabled:d.disabled,onClick:()=>{var h;d.disabled||((h=d.onClick)==null||h.call(d),l(!1))},className:["w-full flex items-center gap-3 px-4 py-2.5 text-sm transition-colors text-left",d.danger?"text-error hover:bg-red-50":"text-on-surface hover:bg-surface-container-low",d.disabled?"opacity-40 cursor-not-allowed":"cursor-pointer"].filter(Boolean).join(" "),children:[d.icon&&e.jsx("span",{className:"material-symbols-outlined text-[18px] opacity-70",children:d.icon}),d.label]}),d.dividerAfter&&e.jsx("div",{className:"my-1 border-t border-surface-container-high"})]},p))}),document.body)]})}const P=u.forwardRef(({label:t,hint:s,error:n,options:r,placeholder:a,disabled:o,className:l="",id:i,...c},x)=>{const f=i??(t==null?void 0:t.toLowerCase().replace(/\s+/g,"-"));return e.jsxs("div",{className:"flex flex-col gap-1.5",children:[t&&e.jsx("label",{htmlFor:f,className:"text-sm font-medium text-on-surface",children:t}),e.jsxs("div",{className:"relative",children:[e.jsxs("select",{ref:x,id:f,disabled:o,className:["w-full appearance-none bg-white border rounded px-3 py-2 text-sm pr-9 transition-all duration-200","text-on-surface focus:outline-none focus:border-zeo-orange focus:shadow-zeo-focus",n?"border-error":"border-outline-variant","disabled:bg-surface-container-low disabled:cursor-not-allowed disabled:opacity-60",l].filter(Boolean).join(" "),...c,children:[a&&e.jsx("option",{value:"",disabled:!0,children:a}),r.map(m=>e.jsx("option",{value:m.value,disabled:m.disabled,children:m.label},m.value))]}),e.jsx("span",{className:"material-symbols-outlined absolute right-3 top-1/2 -translate-y-1/2 text-[18px] text-on-surface-variant pointer-events-none",children:"expand_more"})]}),n&&e.jsxs("p",{className:"text-xs text-error flex items-center gap-1",children:[e.jsx("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),n]}),!n&&s&&e.jsx("p",{className:"text-xs text-on-surface-variant",children:s})]})});P.displayName="Select";const X=u.forwardRef(({label:t,hint:s,error:n,disabled:r,className:a="",id:o,rows:l=4,...i},c)=>{const x=o??(t==null?void 0:t.toLowerCase().replace(/\s+/g,"-"));return e.jsxs("div",{className:"flex flex-col gap-1.5",children:[t&&e.jsx("label",{htmlFor:x,className:"text-sm font-medium text-on-surface",children:t}),e.jsx("textarea",{ref:c,id:x,rows:l,disabled:r,className:["w-full bg-white border rounded px-3 py-2 text-sm resize-y transition-all duration-200","text-on-surface placeholder:text-on-surface-variant","focus:outline-none focus:border-zeo-orange focus:shadow-zeo-focus",n?"border-error":"border-outline-variant","disabled:bg-surface-container-low disabled:cursor-not-allowed disabled:opacity-60",a].filter(Boolean).join(" "),...i}),n&&e.jsxs("p",{className:"text-xs text-error flex items-center gap-1",children:[e.jsx("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),n]}),!n&&s&&e.jsx("p",{className:"text-xs text-on-surface-variant",children:s})]})});X.displayName="Textarea";const Fe={square:"rounded-[2px]",rounded:"rounded-[4px]",circle:"rounded-full"},Y=u.forwardRef(({label:t,description:s,error:n,disabled:r,className:a="",id:o,shape:l="square",color:i="#FF6B00",...c},x)=>{const f=o??`checkbox-${t==null?void 0:t.toLowerCase().replace(/\s+/g,"-")}`;return e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("label",{htmlFor:f,className:["flex items-start gap-3 cursor-pointer",r?"opacity-50 cursor-not-allowed":""].filter(Boolean).join(" "),children:[e.jsxs("div",{className:"relative mt-0.5 shrink-0 w-4 h-4",children:[e.jsx("input",{ref:x,type:"checkbox",id:f,disabled:r,className:["absolute inset-0 w-full h-full opacity-0 cursor-pointer peer disabled:cursor-not-allowed",a].filter(Boolean).join(" "),...c}),e.jsx("div",{className:["w-4 h-4 border-2 border-outline-variant transition-colors pointer-events-none","bg-white peer-checked:bg-[var(--cb-color)] peer-checked:border-[var(--cb-color)]","peer-focus-visible:ring-2 peer-focus-visible:ring-[var(--cb-color)]/30 peer-focus-visible:ring-offset-0",Fe[l]].filter(Boolean).join(" "),style:{"--cb-color":i}}),e.jsx("svg",{viewBox:"0 0 12 10",width:"10",height:"8",fill:"none","aria-hidden":"true",className:"absolute inset-0 m-auto pointer-events-none opacity-0 peer-checked:opacity-100 transition-opacity",children:e.jsx("polyline",{points:"1,5 4.5,8.5 11,1.5",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]}),t&&e.jsxs("span",{className:"flex flex-col",children:[e.jsx("span",{className:"text-sm font-medium text-on-surface leading-tight",children:t}),s&&e.jsx("span",{className:"text-xs text-on-surface-variant mt-0.5",children:s})]})]}),n&&e.jsxs("p",{className:"text-xs text-error flex items-center gap-1 ml-7",children:[e.jsx("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),n]})]})});Y.displayName="Checkbox";const ee=u.forwardRef(({label:t,description:s,disabled:n,className:r="",id:a,...o},l)=>{const i=a??`radio-${t==null?void 0:t.toLowerCase().replace(/\s+/g,"-")}`;return e.jsxs("label",{htmlFor:i,className:["flex items-start gap-3 cursor-pointer",n?"opacity-50 cursor-not-allowed":""].filter(Boolean).join(" "),children:[e.jsx("input",{ref:l,type:"radio",id:i,disabled:n,className:["mt-0.5 w-4 h-4 border-outline-variant text-zeo-orange shrink-0","focus:ring-2 focus:ring-zeo-orange/30 focus:ring-offset-0","disabled:cursor-not-allowed",r].filter(Boolean).join(" "),...o}),t&&e.jsxs("span",{className:"flex flex-col",children:[e.jsx("span",{className:"text-sm font-medium text-on-surface leading-tight",children:t}),s&&e.jsx("span",{className:"text-xs text-on-surface-variant mt-0.5",children:s})]})]})});ee.displayName="Radio";const te=u.forwardRef(({label:t,description:s,disabled:n,className:r="",id:a,...o},l)=>{const i=a??`switch-${t==null?void 0:t.toLowerCase().replace(/\s+/g,"-")}`;return e.jsxs("label",{htmlFor:i,className:["flex items-start gap-3 cursor-pointer select-none",n?"opacity-50 cursor-not-allowed":""].filter(Boolean).join(" "),children:[e.jsxs("div",{className:"relative mt-0.5 shrink-0",children:[e.jsx("input",{ref:l,type:"checkbox",id:i,disabled:n,className:"sr-only peer",...o}),e.jsx("div",{className:"w-10 h-6 bg-surface-container-high rounded-full peer-checked:bg-zeo-orange transition-colors duration-200 peer-focus:ring-2 peer-focus:ring-zeo-orange/30"}),e.jsx("div",{className:"absolute top-1 left-1 w-4 h-4 bg-white rounded-full shadow transition-transform duration-200 peer-checked:translate-x-4"})]}),t&&e.jsxs("span",{className:"flex flex-col",children:[e.jsx("span",{className:"text-sm font-medium text-on-surface leading-tight",children:t}),s&&e.jsx("span",{className:"text-xs text-on-surface-variant mt-0.5",children:s})]})]})});te.displayName="Switch";function y({name:t,size:s=20,fill:n=!1,className:r="",style:a,...o}){return e.jsx("span",{...o,className:`material-symbols-outlined leading-none select-none ${r}`.trim(),style:{fontSize:s,fontVariationSettings:`'FILL' ${n?1:0}, 'wght' 300, 'GRAD' 0, 'opsz' 24`,...a},"aria-hidden":"true",children:t})}const se=({size:t=24,className:s})=>e.jsxs("svg",{width:t,height:t,viewBox:"0 0 100 100",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4,className:s,"aria-hidden":"true",children:[e.jsx("path",{d:"M15 65 L40 50 H85 L60 65 Z"}),e.jsx("path",{d:"M15 65 V72 L60 72 V65"}),e.jsx("path",{d:"M60 72 L85 57 V50"}),e.jsx("path",{d:"M25 60 V35 H32 V56"}),e.jsx("path",{d:"M42 45 V20 H49 V41"}),e.jsx("path",{d:"M55 60 V35 H62 V56"}),e.jsx("path",{d:"M72 45 V20 H79 V41"})]}),ne=({size:t=24,className:s})=>e.jsxs("svg",{width:t,height:t,viewBox:"0 0 100 100",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4,className:s,"aria-hidden":"true",children:[e.jsx("ellipse",{cx:"50",cy:"20",rx:"12",ry:"6"}),e.jsx("path",{d:"M38 20 V65 M62 20 V65"}),e.jsx("path",{d:"M50 25 V58"}),e.jsx("path",{d:"M38 65 L25 75 V85 L50 90 L75 85 V75 L62 65 Z"}),e.jsx("path",{d:"M50 75 V90"})]}),re=({size:t=24,className:s})=>e.jsxs("svg",{width:t,height:t,viewBox:"0 0 100 100",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",className:s,"aria-hidden":"true",children:[e.jsx("path",{d:"M48 90 L45 25 L55 25 L52 90 Z",fill:"currentColor",stroke:"none"}),e.jsx("circle",{cx:"50",cy:"20",r:"5",fill:"currentColor",stroke:"none"}),e.jsx("path",{d:"M38 30 A20 20 0 0 0 38 10",stroke:"currentColor",strokeWidth:3}),e.jsx("path",{d:"M30 35 A28 28 0 0 0 30 5",stroke:"currentColor",strokeWidth:3}),e.jsx("path",{d:"M62 30 A20 20 0 0 1 62 10",stroke:"currentColor",strokeWidth:3}),e.jsx("path",{d:"M70 35 A28 28 0 0 1 70 5",stroke:"currentColor",strokeWidth:3})]}),Ve={sm:"px-3 py-1.5 text-sm h-8",md:"px-3 py-2 text-sm h-10",lg:"px-4 py-2.5 text-base h-11"},Z={sm:"text-[16px]",md:"text-[18px]",lg:"text-[20px]"};function He(t,s,n){if(t===""||t===void 0||t===null)return"";const r=Number(t).toFixed(s);return n?`${r} ${n}`:r}const ae=u.forwardRef(({label:t,hint:s,error:n,inputSize:r="md",iconLeft:a,iconRight:o,onIconRightClick:l,disabled:i,className:c="",id:x,unit:f,decimals:m,onValueChange:d,value:p,defaultValue:h,type:j,step:b,inputMode:v,onChange:w,onFocus:C,onBlur:N,..._},I)=>{const A=u.useId(),B=x??(t?t.toLowerCase().replace(/\s+/g,"-"):A),g=f!==void 0,S=m??0,T=g&&p!==void 0,[de,ue]=u.useState(typeof h=="number"?h:""),[K,U]=u.useState(!1),[$,W]=u.useState(""),L=T?p:de,xe=g?K?$:He(L,S,f??""):p,fe=u.useCallback(k=>{g&&(U(!0),W(L===""?"":String(L))),C==null||C(k)},[g,L,C]),me=u.useCallback(k=>{if(g){U(!1);const q=parseFloat($.replace(",",".")),G=isNaN(q)?"":q;T||ue(G),d==null||d(G)}N==null||N(k)},[g,$,T,d,N]),pe=u.useCallback(k=>{g&&W(k.target.value),w==null||w(k)},[g,w]);return e.jsxs("div",{className:"flex flex-col gap-1.5",children:[t&&e.jsx("label",{htmlFor:B,className:"text-sm font-medium text-on-surface",children:t}),e.jsxs("div",{className:"relative flex items-center",children:[a&&e.jsx("span",{className:`material-symbols-outlined absolute left-3 text-on-surface-variant pointer-events-none ${Z[r]}`,children:a}),e.jsx("input",{ref:I,id:B,disabled:i,type:g?K?"number":"text":j,inputMode:g?"decimal":v,value:g?xe:p,defaultValue:g?void 0:h,step:g?b??(S>0?Math.pow(10,-S):1):b,onFocus:fe,onBlur:me,onChange:pe,className:["w-full bg-white border rounded transition-all duration-200","text-on-surface placeholder:text-on-surface-variant","focus:outline-none focus:border-zeo-orange focus:shadow-zeo-focus",n?"border-error focus:border-error focus:shadow-[0_0_0_4px_rgba(186,26,26,0.15)]":"border-outline-variant","disabled:bg-surface-container-low disabled:cursor-not-allowed disabled:opacity-60",g?"[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none":"",Ve[r],a?"pl-9":"",o?"pr-9":"",c].filter(Boolean).join(" "),..._}),o&&e.jsx("span",{className:["material-symbols-outlined absolute right-3 text-on-surface-variant",Z[r],l?"cursor-pointer hover:text-on-surface":"pointer-events-none"].filter(Boolean).join(" "),onClick:l,children:o})]}),n&&e.jsxs("p",{className:"text-xs text-error flex items-center gap-1",children:[e.jsx("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),n]}),!n&&s&&e.jsx("p",{className:"text-xs text-on-surface-variant",children:s})]})});ae.displayName="Input";const De={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-2xl",full:"max-w-[calc(100vw-2rem)]"};function Ke({open:t,onClose:s,size:n="md",children:r}){return u.useEffect(()=>{if(!t)return;const a=o=>{o.key==="Escape"&&s()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[t,s]),t?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4","aria-modal":"true",role:"dialog",children:[e.jsx("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:s,"aria-hidden":"true"}),e.jsx("div",{className:["relative w-full bg-white rounded-2xl shadow-theme-lg z-10 flex flex-col max-h-[90vh]",De[n]].filter(Boolean).join(" "),children:r})]}):null}function Ue({title:t,subtitle:s,onClose:n,className:r="",...a}){return e.jsxs("div",{className:["flex items-start justify-between gap-4 p-6 border-b border-surface-container-high",r].filter(Boolean).join(" "),...a,children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-on-surface",children:t}),s&&e.jsx("p",{className:"text-sm text-on-surface-variant mt-0.5",children:s})]}),n&&e.jsx("button",{onClick:n,className:"p-1 text-on-surface-variant hover:text-on-surface hover:bg-surface-container-low rounded-lg transition-all -mt-1 -mr-1","aria-label":"Fechar modal",children:e.jsx("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]})}function We({children:t,className:s="",...n}){return e.jsx("div",{className:["p-6 overflow-y-auto flex-1",s].filter(Boolean).join(" "),...n,children:t})}function qe({children:t,className:s="",...n}){return e.jsx("div",{className:["flex items-center justify-end gap-3 p-6 border-t border-surface-container-high",s].filter(Boolean).join(" "),...n,children:t})}function Ge(t,s){return s<=7?Array.from({length:s},(n,r)=>r+1):t<=4?[1,2,3,4,5,"...",s]:t>=s-3?[1,"...",s-4,s-3,s-2,s-1,s]:[1,"...",t-1,t,t+1,"...",s]}function Oe({currentPage:t,totalPages:s,totalItems:n,itemsPerPage:r=10,onPageChange:a,variant:o="full",className:l="",...i}){const c=Ge(t,s),x=(t-1)*r+1,f=Math.min(t*r,n??t*r),m="inline-flex items-center justify-center text-sm font-medium rounded transition-all duration-150 focus:outline-none focus:ring-2 focus:ring-zeo-orange/30 disabled:opacity-40 disabled:cursor-not-allowed select-none",d=`${m} w-9 h-9`,p="bg-zeo-orange text-white",h="text-on-surface-variant hover:bg-surface-container-low hover:text-on-surface",j=`${m} px-3 h-9 gap-1.5 border border-surface-container-high text-on-surface-variant hover:bg-surface-container-low hover:text-on-surface`;return e.jsxs("div",{className:["flex items-center justify-between gap-4 flex-wrap",l].filter(Boolean).join(" "),...i,children:[o==="full"&&n!==void 0&&e.jsxs("p",{className:"text-sm text-on-surface-variant",children:["Mostrando ",e.jsxs("strong",{children:[x,"–",f]})," de ",e.jsx("strong",{children:n})," itens"]}),e.jsxs("div",{className:"flex items-center gap-1 ml-auto",children:[e.jsxs("button",{onClick:()=>a(t-1),disabled:t===1,"aria-label":"Página anterior",className:o==="icon"?d+" "+h:j,children:[e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),o==="text"&&"Anterior"]}),c.map((b,v)=>b==="..."?e.jsx("span",{className:"w-9 text-center text-sm text-on-surface-variant select-none",children:"…"},`ellipsis-${v}`):e.jsx("button",{onClick:()=>a(b),"aria-current":t===b?"page":void 0,className:[d,t===b?p:h].join(" "),children:b},b)),e.jsxs("button",{onClick:()=>a(t+1),disabled:t===s,"aria-label":"Próxima página",className:o==="icon"?d+" "+h:j,children:[o==="text"&&"Próxima",e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_forward"})]})]})]})}const Ze={xs:"h-1",sm:"h-1.5",md:"h-2",lg:"h-3"},Qe={primary:"bg-zeo-orange",success:"bg-green-500",warning:"bg-amber-400",danger:"bg-red-500"};function Je({value:t,max:s=100,size:n="md",variant:r="primary",label:a="none",showPercent:o=!0,title:l,className:i="",...c}){const x=Math.min(100,Math.max(0,t/s*100)),f=`${Math.round(x)}%`;return e.jsxs("div",{className:["flex flex-col gap-1.5",i].filter(Boolean).join(" "),...c,children:[(l||a==="outside"&&o)&&e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l&&e.jsx("span",{className:"text-sm font-medium text-on-surface",children:l}),a==="outside"&&o&&e.jsx("span",{className:"text-sm font-semibold text-on-surface",children:f})]}),e.jsx("div",{role:"progressbar","aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":s,className:["relative w-full bg-surface-container-high rounded-full overflow-hidden",Ze[n]].join(" "),children:e.jsx("div",{className:["h-full rounded-full transition-all duration-500 flex items-center justify-end pr-1",Qe[r]].join(" "),style:{width:`${x}%`},children:a==="inside"&&o&&x>=20&&e.jsx("span",{className:"text-[10px] font-bold text-white leading-none",children:f})})})]})}const Q=(t,s)=>typeof t=="function"?t(s):t;function Pe({sidebar:t,navbar:s,children:n,defaultExpanded:r=!1,isExpanded:a,onToggle:o}){const[l,i]=u.useState(r),c=a??l,x=u.useCallback(()=>{a===void 0&&i(m=>!m),o==null||o()},[a,o]),f={isExpanded:c,toggle:x};return e.jsxs("div",{className:"flex h-screen overflow-hidden",children:[Q(t,f),e.jsxs("div",{className:["flex-1 flex flex-col overflow-hidden transition-[margin-left] duration-shell ease-shell",c?"ml-sidebar-expanded":"ml-sidebar-collapsed"].join(" "),children:[Q(s,f),e.jsx("main",{className:"flex-1 overflow-y-auto bg-surface-container",children:n})]})]})}const Xe=({href:t,className:s,children:n})=>e.jsx("a",{href:t,className:s,children:n}),oe="text-[10px] uppercase tracking-widest text-white/30 font-bold";function F({item:t,isActive:s,isExpanded:n,renderLink:r=Xe}){const a=t.disabled||!t.href,o=!n||a&&t.disabledReason,l=e.jsxs("div",{className:["group relative flex items-center gap-3 px-4 py-3 rounded-lg transition-colors duration-150",s?"bg-primary-container/10 text-primary-container border-r-2 border-primary-container":a?"text-white/30 opacity-50 cursor-default":"text-white/55 hover:bg-sidebar-hover hover:text-white cursor-pointer"].join(" "),children:[t.icon,e.jsx("span",{className:["text-sm font-medium whitespace-nowrap overflow-hidden transition-opacity duration-shell",n?"opacity-100":"opacity-0 w-0"].join(" "),children:t.label}),e.jsxs("div",{role:"tooltip",className:["absolute left-full ml-3 px-3 py-2 bg-white text-gray-700 text-sm font-medium","rounded-lg shadow-theme-lg whitespace-nowrap z-[200] pointer-events-none","invisible opacity-0 transition-all duration-150",o&&"group-hover:visible group-hover:opacity-100"].filter(Boolean).join(" "),children:[a&&t.disabledReason?t.disabledReason:t.label,e.jsx("div",{className:"absolute top-1/2 -left-1 -translate-y-1/2 w-2 h-2 bg-white rotate-45"})]})]});return a?e.jsx("div",{children:l}):r({item:t,href:t.href,className:"block no-underline",children:l})}function le({section:t,index:s=0,activeId:n,isExpanded:r,renderLink:a}){return e.jsxs(e.Fragment,{children:[t.label&&e.jsx("div",{className:["overflow-hidden transition-all duration-shell px-3",r?"h-6 opacity-100 mb-1":"h-0 opacity-0",s>0?"mt-4":""].join(" "),children:e.jsx("span",{className:oe,children:t.label})}),t.items.map(o=>e.jsx(F,{item:o,isActive:o.id===n,isExpanded:r,renderLink:a},o.id))]})}function Ye({sections:t,activeId:s,isExpanded:n,logo:r,renderLink:a}){const o=t.filter(c=>c.placement!=="bottom"),l=t.filter(c=>c.placement==="bottom"),i=e.jsx("img",{src:r.src,alt:r.alt??"",className:["flex-shrink-0",n?"h-8 w-auto object-contain":"w-10 h-10 object-cover object-left"].join(" ")});return e.jsxs("aside",{className:["fixed left-0 top-0 h-screen bg-sidebar flex flex-col z-[100]","transition-[width] duration-shell ease-shell","shadow-[40px_0_40px_0_rgba(0,0,0,0.04)]",n?"w-sidebar-expanded":"w-sidebar-collapsed"].join(" "),children:[e.jsx("div",{className:["h-[88px] flex items-center flex-shrink-0",n?"px-6 justify-start":"justify-center"].join(" "),children:r.href?e.jsx("a",{href:r.href,"aria-label":r.alt,className:"flex-shrink-0",children:i}):i}),e.jsx("nav",{className:"flex-1 flex flex-col py-2 px-3 gap-1",children:o.map((c,x)=>e.jsx(le,{section:c,index:x,activeId:s,isExpanded:n,renderLink:a},c.id))}),l.map(c=>e.jsxs("div",{className:"flex-shrink-0 pb-4",children:[c.label&&e.jsx("div",{className:["px-6 mb-2 overflow-hidden transition-all duration-shell",n?"h-7 opacity-100":"h-0 opacity-0"].join(" "),children:e.jsx("span",{className:oe,children:c.label})}),e.jsx("div",{className:"border-t border-white/[0.06] mb-2"}),e.jsx("div",{className:"px-3",children:c.items.map(x=>e.jsx(F,{item:x,isActive:x.id===s,isExpanded:n,renderLink:a},x.id))})]},c.id))]})}function et({onToggleMenu:t,start:s,search:n,actions:r,userMenu:a,toggleMenuLabel:o="Alternar menu"}){return e.jsxs("header",{className:"h-navbar bg-surface-container-lowest border-b border-surface-container-highest flex items-center justify-between px-6 sticky top-0 z-50 flex-shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-4 flex-1 min-w-0",children:[e.jsx("button",{type:"button",onClick:t,"aria-label":o,className:"flex items-center justify-center p-2 rounded-full text-on-secondary-container hover:bg-surface-container-high transition-colors flex-shrink-0",children:e.jsx(y,{name:"menu",size:20})}),s,n]}),(r||a)&&e.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0 ml-4",children:[r,r&&a&&e.jsx("div",{className:"w-px h-6 bg-outline-variant opacity-30 mx-2 flex-shrink-0"}),a]})]})}function tt({module:t,project:s}){return e.jsxs("div",{className:"flex items-baseline gap-2 min-w-0",children:[e.jsx("span",{className:"text-title-md font-bold text-on-surface whitespace-nowrap",children:t}),s&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-on-surface-variant","aria-hidden":"true",children:"/"}),e.jsx("span",{className:"text-body-md text-on-surface-variant truncate",children:s})]})]})}function st({value:t,onChange:s,placeholder:n,shortcutHint:r,focusShortcut:a=!1}){const o=u.useRef(null);return u.useEffect(()=>{if(!a)return;const l=i=>{var c;(i.metaKey||i.ctrlKey)&&i.key==="k"&&(i.preventDefault(),(c=o.current)==null||c.focus())};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[a]),e.jsxs("div",{className:"relative w-full max-w-md",children:[e.jsx(y,{name:"search",size:18,className:"absolute left-3 top-1/2 -translate-y-1/2 text-on-secondary-container pointer-events-none"}),e.jsx("input",{ref:o,value:t,onChange:l=>s(l.target.value),placeholder:n,"aria-label":n,className:["w-full h-9 pl-10 rounded-lg",r?"pr-[90px]":"pr-3","border border-transparent bg-surface-container","text-sm text-on-surface font-sans placeholder:text-on-surface-variant","outline-none transition-all","focus:border-primary-container focus:shadow-zeo-focus focus:bg-surface-container-lowest"].join(" ")}),r&&e.jsx("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-xs text-on-surface-variant bg-surface-container-lowest border border-surface-container-highest rounded px-1 py-px whitespace-nowrap pointer-events-none",children:r})]})}function V({icon:t,label:s,badge:n=!1,className:r="",type:a="button",...o}){return e.jsxs("button",{...o,type:a,"aria-label":s,className:`relative flex items-center justify-center p-2 rounded-full text-on-secondary-container hover:bg-surface-container-high transition-colors ${r}`.trim(),children:[t,n&&e.jsx("span",{className:"absolute top-2 right-2 w-2 h-2 bg-error rounded-full"})]})}function nt({hasUnread:t=!1,count:s=0,onClick:n,label:r="Notificações"}){return e.jsx(V,{icon:e.jsx(y,{name:"notifications",size:20}),label:r,badge:t||s>0,onClick:n})}function H(t,s,n){u.useEffect(()=>{if(!s)return;const r=o=>{o.key==="Escape"&&n()},a=o=>{var l;(l=t.current)!=null&&l.contains(o.target)||n()};return document.addEventListener("keydown",r),document.addEventListener("mousedown",a),()=>{document.removeEventListener("keydown",r),document.removeEventListener("mousedown",a)}},[t,s,n])}const rt={myAccount:"Minha Conta",logout:"Sair",user:"Usuário"};function at({name:t,email:s,shortName:n,profilePicUrl:r,onMyAccount:a,onLogout:o,labels:l}){const i={...rt,...l},[c,x]=u.useState(!1),f=u.useRef(null),m=u.useCallback(()=>x(!1),[]);return H(f,c,m),e.jsxs("div",{ref:f,className:"relative flex items-center",children:[e.jsxs("button",{type:"button",onClick:()=>x(d=>!d),"aria-haspopup":"true","aria-expanded":c,className:"flex items-center gap-2 px-2 py-1 rounded-full border-none bg-transparent cursor-pointer text-on-surface-variant hover:bg-surface-container-low transition-colors",children:[n&&e.jsx("span",{className:"text-sm font-medium text-on-surface",children:n}),e.jsx(E,{src:r,name:t,size:"sm","aria-label":t||i.user}),e.jsx("span",{className:`flex items-center transition-transform duration-200 ${c?"rotate-180":"rotate-0"}`,children:e.jsx(y,{name:"expand_more",size:13})})]}),c&&e.jsxs("div",{role:"menu",className:"absolute right-0 top-[calc(100%+8px)] min-w-[220px] bg-surface-container-lowest border border-surface-container-highest rounded-xl shadow-theme-lg z-[200] overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-3 p-4",children:[e.jsx(E,{src:r,name:t,size:"sm"}),e.jsxs("div",{className:"flex flex-col gap-0.5 min-w-0",children:[e.jsx("span",{className:"text-sm font-bold text-on-surface whitespace-nowrap overflow-hidden text-ellipsis",children:t}),e.jsx("span",{className:"text-xs text-on-surface-variant whitespace-nowrap overflow-hidden text-ellipsis",children:s})]})]}),e.jsx("hr",{className:"m-0 border-t border-surface-container-highest"}),e.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{m(),a()},className:"w-full flex items-center gap-3 px-4 py-2.5 border-none bg-transparent cursor-pointer text-left text-on-surface hover:bg-surface-container-low transition-colors",children:[e.jsx(y,{name:"person",size:15}),e.jsx("span",{className:"text-sm font-medium",children:i.myAccount})]}),e.jsx("hr",{className:"m-0 border-t border-surface-container-highest"}),e.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{m(),o()},className:"w-full flex items-center gap-3 px-4 py-2.5 border-none bg-transparent cursor-pointer text-left text-error hover:bg-error/5 transition-colors",children:[e.jsx(y,{name:"logout",size:15}),e.jsx("span",{className:"text-sm font-medium",children:i.logout})]})]})]})}const ot={help:"Ajuda",documentation:"Documentação",faq:"F.A.Q.",changelog:"Changelog",contactUs:"Contate-nos"};function lt({labels:t,hrefs:s}){const n={...ot,...t},r=u.useRef(null),[a,o]=u.useState(!1),l=u.useCallback(()=>o(!1),[]);return H(r,a,l),e.jsxs("div",{ref:r,className:"relative",children:[e.jsx(V,{icon:e.jsx(y,{name:"help",size:20}),label:n.help,onClick:()=>o(i=>!i),"aria-haspopup":"true","aria-expanded":a}),a&&e.jsxs("div",{role:"menu",className:"absolute right-0 top-[calc(100%+8px)] w-56 bg-surface-container-lowest border border-surface-container-highest rounded-xl shadow-theme-lg py-1 z-[200] overflow-hidden",children:[e.jsx(M,{icon:"description",label:n.documentation,href:s==null?void 0:s.documentation}),e.jsx(M,{icon:"help_outline",label:n.faq,href:s==null?void 0:s.faq}),e.jsx(M,{icon:"assignment",label:n.changelog,href:s==null?void 0:s.changelog}),e.jsx("div",{className:"my-1 border-t border-surface-container-highest"}),e.jsx(M,{icon:"mail",label:n.contactUs,href:s==null?void 0:s.contactUs})]})]})}function M({icon:t,label:s,href:n="#"}){return e.jsxs("a",{href:n,role:"menuitem",className:"flex items-center gap-3 px-4 py-2.5 text-sm font-medium text-on-surface-variant hover:bg-surface-container hover:text-on-surface transition-colors no-underline",children:[e.jsx(y,{name:t,size:18,className:"opacity-70"}),s]})}const it=[{id:"tower",status:"active",iconName:"cell_tower",labelKey:"modules.tower.title"},{id:"antennas",status:"active",iconName:"settings_input_antenna",labelKey:"modules.antennas.title"},{id:"rooftop",status:"active",iconName:"roofing",labelKey:"modules.rooftop.title"},{id:"radier",status:"active",iconName:"layers",IconComponent:se,labelKey:"modules.radier.title"},{id:"caisson_foundation",status:"coming_soon",iconName:"filter_alt",IconComponent:ne,labelKey:"modules.caisson_foundation.title"},{id:"pole",status:"coming_soon",iconName:"fence",IconComponent:re,labelKey:"modules.pole.title"},{id:"dashboards",status:"coming_soon",iconName:"dashboard",labelKey:"modules.dashboards.title"}];function ct(t,s,n){return t.filter(r=>s.includes(r.id)||n.includes(r.id)).map(r=>({module:r,hasAccess:n.includes(r.id)}))}const dt={xs:"w-3 h-3 border",sm:"w-4 h-4 border-2",md:"w-6 h-6 border-2",lg:"w-8 h-8 border-[3px]",xl:"w-12 h-12 border-4"},ut={primary:"border-orange-200 border-t-zeo-orange",secondary:"border-surface-container-high border-t-on-surface-variant",white:"border-white/30 border-t-white"};function xt({size:t="md",variant:s="primary",label:n="Carregando...",className:r="",...a}){return e.jsx("span",{role:"status","aria-label":n,className:["inline-block rounded-full animate-spin",dt[t],ut[s],r].filter(Boolean).join(" "),...a})}function ft({children:t,className:s="",...n}){return e.jsx("div",{className:["overflow-x-auto rounded-xl border border-surface-container-high shadow-sm",s].filter(Boolean).join(" "),...n,children:e.jsx("table",{className:"w-full text-sm",children:t})})}function mt({children:t,className:s="",...n}){return e.jsx("thead",{className:["bg-surface-container-low border-b border-surface-container-high",s].filter(Boolean).join(" "),...n,children:t})}function pt({children:t,className:s="",...n}){return e.jsx("tbody",{className:["bg-white divide-y divide-surface-container-high",s].filter(Boolean).join(" "),...n,children:t})}function ht({selected:t=!1,children:s,className:n="",...r}){return e.jsx("tr",{className:["hover:bg-surface-container-low transition-colors",t?"bg-orange-50/40":"",n].filter(Boolean).join(" "),...r,children:s})}function bt({sortable:t=!1,sorted:s=!1,onSort:n,children:r,className:a="",...o}){return e.jsx("th",{className:["px-4 py-3 text-left text-xs font-semibold text-on-surface-variant uppercase tracking-wide whitespace-nowrap",t?"cursor-pointer hover:text-on-surface select-none":"",a].filter(Boolean).join(" "),onClick:t?n:void 0,...o,children:e.jsxs("span",{className:"inline-flex items-center gap-1",children:[r,t&&e.jsx("span",{className:`material-symbols-outlined text-[14px] ${s?"text-zeo-orange":"opacity-40"}`,children:s==="asc"?"arrow_upward":s==="desc"?"arrow_downward":"unfold_more"})]})})}function gt({muted:t=!1,mono:s=!1,children:n,className:r="",...a}){return e.jsx("td",{className:["px-4 py-3",t?"text-on-surface-variant":"text-on-surface",s?"font-mono text-xs":"",r].filter(Boolean).join(" "),...a,children:n})}const ie=u.createContext(null);function D(){const t=u.useContext(ie);if(!t)throw new Error("Tab must be used inside Tabs");return t}const ce=u.createContext({stretch:!1});function jt({value:t,onChange:s,variant:n="default",children:r}){return e.jsx(ie.Provider,{value:{active:t,onChange:s,variant:n},children:e.jsx("div",{className:n==="vertical"?"flex gap-6":"flex flex-col gap-4",children:r})})}function vt({children:t,className:s="",stretch:n=!1,...r}){const{variant:a}=D(),o={default:n?"flex gap-1 bg-surface-container-low rounded-lg p-1 w-full":"flex gap-1 bg-surface-container-low rounded-lg p-1 w-fit",underline:"flex gap-0 border-b border-surface-container-high w-full",vertical:"flex flex-col gap-1 bg-surface-container-low rounded-lg p-1 w-48 shrink-0 h-fit"}[a];return e.jsx(ce.Provider,{value:{stretch:n},children:e.jsx("div",{role:"tablist",className:[o,s].filter(Boolean).join(" "),...r,children:t})})}function wt({value:t,label:s,icon:n,badge:r,disabled:a=!1}){const{active:o,onChange:l,variant:i}=D(),{stretch:c}=u.useContext(ce),x=o===t,f="inline-flex items-center gap-2 font-medium text-sm transition-all duration-200 select-none focus:outline-none",m="opacity-40 cursor-not-allowed pointer-events-none",d=c&&i!=="vertical"?"flex-1 justify-center":"",p={default:x?"bg-white text-on-surface shadow-sm rounded-md px-4 py-2":"text-on-surface-variant hover:text-on-surface rounded-md px-4 py-2",underline:x?"text-zeo-orange border-b-2 border-zeo-orange px-4 py-2.5 -mb-px":"text-on-surface-variant hover:text-on-surface border-b-2 border-transparent px-4 py-2.5 -mb-px",vertical:x?"bg-white text-on-surface shadow-sm rounded-md px-4 py-2 w-full":"text-on-surface-variant hover:text-on-surface rounded-md px-4 py-2 w-full"}[i];return e.jsxs("button",{role:"tab","aria-selected":x,"aria-disabled":a,disabled:a,onClick:()=>!a&&l(t),className:[f,p,d,a?m:""].filter(Boolean).join(" "),children:[n&&e.jsx("span",{className:"material-symbols-outlined text-[18px]",style:x?{fontVariationSettings:"'FILL' 1"}:void 0,children:n}),s,r!==void 0&&e.jsx("span",{className:`text-[11px] font-semibold px-1.5 py-0.5 rounded-full leading-none ${x?"bg-zeo-orange text-white":"bg-surface-container-high text-on-surface-variant"}`,children:r})]})}function yt({value:t,children:s,className:n="",stretch:r=!1}){const{active:a}=D();return a!==t?null:e.jsx("div",{role:"tabpanel",className:[r?"flex-1":"",n].filter(Boolean).join(" "),children:s})}const Nt={top:{wrapper:"bottom-full left-1/2 -translate-x-1/2 mb-2",arrow:"top-full left-1/2 -translate-x-1/2 border-t-4 border-x-4 border-x-transparent border-b-0"},bottom:{wrapper:"top-full left-1/2 -translate-x-1/2 mt-2",arrow:"bottom-full left-1/2 -translate-x-1/2 border-b-4 border-x-4 border-x-transparent border-t-0"},left:{wrapper:"right-full top-1/2 -translate-y-1/2 mr-2",arrow:"left-full top-1/2 -translate-y-1/2 border-l-4 border-y-4 border-y-transparent border-r-0"},right:{wrapper:"left-full top-1/2 -translate-y-1/2 ml-2",arrow:"right-full top-1/2 -translate-y-1/2 border-r-4 border-y-4 border-y-transparent border-l-0"}},kt={dark:{tooltip:"bg-slate-800 text-white",arrow:"border-t-slate-800 border-r-slate-800 border-b-slate-800 border-l-slate-800"},light:{tooltip:"bg-white text-on-surface border border-surface-container-high shadow-theme-lg",arrow:"border-t-white border-r-white border-b-white border-l-white"}};function Ct({content:t,position:s="top",variant:n="dark",children:r,className:a="",...o}){const l=Nt[s],i=kt[n];return e.jsxs("div",{className:["relative inline-flex group",a].filter(Boolean).join(" "),...o,children:[r,e.jsxs("div",{role:"tooltip",className:["absolute z-50 pointer-events-none","opacity-0 group-hover:opacity-100 transition-opacity duration-150","whitespace-nowrap text-xs font-medium px-2.5 py-1.5 rounded-lg",l.wrapper,i.tooltip].join(" "),children:[t,e.jsx("span",{className:["absolute w-0 h-0",l.arrow,i.arrow].join(" ")})]})]})}exports.Alert=ge;exports.AppNavbar=et;exports.AppShellLayout=Pe;exports.AppSidebar=Ye;exports.Avatar=E;exports.Badge=Le;exports.Breadcrumb=ze;exports.Button=J;exports.ButtonGroup=Ie;exports.Card=Te;exports.CardFooter=Re;exports.CardHeader=$e;exports.Checkbox=Y;exports.Dropdown=Ee;exports.HelpMenu=lt;exports.Icon=y;exports.Input=ae;exports.MODULE_CATALOG=it;exports.Modal=Ke;exports.ModalBody=We;exports.ModalFooter=qe;exports.ModalHeader=Ue;exports.NavbarIconButton=V;exports.NavbarSearch=st;exports.NavbarTitle=tt;exports.NotificationsBell=nt;exports.Pagination=Oe;exports.PosteIcon=re;exports.ProgressBar=Je;exports.RadierIcon=se;exports.Radio=ee;exports.Select=P;exports.SidebarItem=F;exports.SidebarSection=le;exports.Spinner=xt;exports.Switch=te;exports.Tab=wt;exports.TabList=vt;exports.TabPanel=yt;exports.Table=ft;exports.TableBody=pt;exports.TableCell=gt;exports.TableHead=mt;exports.TableHeaderCell=bt;exports.TableRow=ht;exports.Tabs=jt;exports.Textarea=X;exports.Tooltip=Ct;exports.TubulaoIcon=ne;exports.UserMenu=at;exports.resolveModuleAccess=ct;exports.useDismiss=H;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("react"),we=require("react-dom"),w=require("./tokens-B2LtOn7a.cjs"),ve={info:{container:"bg-blue-50 border-blue-200 text-blue-800 dark:bg-info-container dark:border-info/30 dark:text-info",icon:"text-blue-500 dark:text-info",defaultIcon:"info"},success:{container:"bg-green-50 border-green-200 text-green-800 dark:bg-success-container dark:border-success/30 dark:text-success",icon:"text-green-500 dark:text-success",defaultIcon:"check_circle"},warning:{container:"bg-yellow-50 border-yellow-200 text-yellow-800 dark:bg-warning-container dark:border-warning/30 dark:text-warning",icon:"text-yellow-500 dark:text-warning",defaultIcon:"warning"},danger:{container:"bg-red-50 border-red-200 text-red-800 dark:bg-danger-container dark:border-danger/30 dark:text-danger",icon:"text-red-500 dark:text-danger",defaultIcon:"error"}};function ye({variant:t="info",title:r,children:n,onClose:a,icon:s,className:o="",...i}){const l=ve[t],d=s??l.defaultIcon;return e.jsxs("div",{role:"alert",className:["flex gap-3 p-4 rounded-lg border",l.container,o].filter(Boolean).join(" "),...i,children:[e.jsx("span",{className:`material-symbols-outlined text-[20px] shrink-0 mt-0.5 ${l.icon}`,children:d}),e.jsxs("div",{className:"flex-1 min-w-0",children:[r&&e.jsx("p",{className:"font-semibold text-sm mb-0.5",children:r}),e.jsx("div",{className:"text-sm leading-relaxed",children:n})]}),a&&e.jsx("button",{onClick:a,className:"shrink-0 opacity-70 hover:opacity-100 transition-opacity","aria-label":"Fechar alerta",children:e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]})}const Ne={xs:"w-6 h-6 text-[10px]",sm:"w-8 h-8 text-xs",md:"w-10 h-10 text-sm",lg:"w-12 h-12 text-base",xl:"w-16 h-16 text-lg"},ke={xs:"w-1.5 h-1.5",sm:"w-2 h-2",md:"w-2.5 h-2.5",lg:"w-3 h-3",xl:"w-3.5 h-3.5"},Ce={online:"bg-green-500",offline:"bg-gray-400",busy:"bg-red-500",away:"bg-yellow-400"};function Te(t){return t.split(" ").slice(0,2).map(r=>r[0]).join("").toUpperCase()}function Be(t){const r=["bg-orange-100 text-orange-700 dark:bg-zeo-orange/20 dark:text-primary","bg-blue-100 text-blue-700 dark:bg-info-container dark:text-info","bg-green-100 text-green-700 dark:bg-success-container dark:text-success","bg-purple-100 text-purple-700 dark:bg-purple-500/20 dark:text-purple-300","bg-pink-100 text-pink-700 dark:bg-pink-500/20 dark:text-pink-300","bg-teal-100 text-teal-700 dark:bg-teal-500/20 dark:text-teal-300"],n=t.charCodeAt(0)%r.length;return r[n]}function H({src:t,alt:r="",name:n,size:a="md",status:s,className:o="",...i}){return e.jsxs("div",{className:["relative inline-flex shrink-0",o].filter(Boolean).join(" "),...i,children:[e.jsx("div",{className:["rounded-full overflow-hidden flex items-center justify-center font-semibold",Ne[a],!t&&n?Be(n):"bg-surface-container"].filter(Boolean).join(" "),children:t?e.jsx("img",{src:t,alt:r||n,className:"w-full h-full object-cover"}):n?Te(n):e.jsx("span",{className:"material-symbols-outlined text-on-surface-variant",style:{fontSize:"60%"},children:"person"})}),s&&e.jsx("span",{className:["absolute bottom-0 right-0 rounded-full border-2 border-white dark:border-card",ke[a],Ce[s]].filter(Boolean).join(" ")})]})}const Ee={default:"bg-surface-container text-on-surface-variant",primary:"bg-orange-100 text-orange-700 dark:bg-zeo-orange/20 dark:text-primary",success:"bg-green-100 text-green-700 dark:bg-success-container dark:text-success",warning:"bg-yellow-100 text-yellow-700 dark:bg-warning-container dark:text-warning",danger:"bg-red-100 text-red-700 dark:bg-danger-container dark:text-danger",info:"bg-blue-100 text-blue-700 dark:bg-info-container dark:text-info"},Me={default:"bg-on-surface-variant",primary:"bg-orange-500",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500",info:"bg-blue-500"},_e={sm:"px-2 py-0.5 text-xs gap-1",md:"px-2.5 py-1 text-xs gap-1.5"};function Le({variant:t="default",size:r="md",dot:n=!1,icon:a,children:s,className:o="",...i}){return e.jsxs("span",{className:["inline-flex items-center font-medium rounded-full",Ee[t],_e[r],o].filter(Boolean).join(" "),...i,children:[n&&e.jsx("span",{className:`w-1.5 h-1.5 rounded-full shrink-0 ${Me[t]}`}),a&&!n&&e.jsx("span",{className:"material-symbols-outlined text-[12px]",children:a}),s]})}function ze({items:t,className:r="",...n}){return e.jsx("nav",{"aria-label":"Breadcrumb",className:r,...n,children:e.jsx("ol",{className:"inline-flex items-center gap-1.5 text-sm flex-wrap",children:t.map((a,s)=>{const o=s===t.length-1;return e.jsxs("li",{className:"flex items-center gap-1.5",children:[s>0&&e.jsx("span",{className:"material-symbols-outlined text-[16px] text-on-surface-variant select-none",children:"chevron_right"}),o?e.jsxs("span",{"aria-current":"page",className:"font-semibold text-on-surface flex items-center gap-1",children:[a.icon&&e.jsx("span",{className:"material-symbols-outlined text-[18px] leading-none",children:a.icon}),a.label]}):e.jsxs("a",{href:a.href??"#",className:"text-on-surface-variant hover:text-zeo-orange transition-colors flex items-center gap-1",children:[a.icon&&e.jsx("span",{className:"material-symbols-outlined text-[18px] leading-none",children:a.icon}),a.label]})]},s)})})})}const Ie={primary:"bg-zeo-orange text-white hover:bg-orange-700 active:bg-orange-800 focus:shadow-zeo-focus border-transparent",secondary:"bg-surface-container-lowest text-on-surface border-outline-variant hover:bg-surface-container-low active:bg-surface-container focus:shadow-zeo-focus",ghost:"bg-transparent text-on-surface-variant border-transparent hover:bg-surface-container-low active:bg-surface-container focus:shadow-zeo-focus",danger:"bg-[#ba1a1a] text-white border-transparent hover:bg-red-700 active:bg-red-800 focus:shadow-[0_0_0_4px_rgba(186,26,26,0.15)]",success:"bg-[#006c49] text-white border-transparent hover:bg-green-800 active:bg-green-900 focus:shadow-[0_0_0_4px_rgba(0,108,73,0.15)]"},Se={sm:"px-3 py-1.5 text-sm gap-1.5 h-8",md:"px-4 py-2 text-sm gap-2 h-10",lg:"px-5 py-2.5 text-base gap-2 h-11"},$={sm:"text-[16px]",md:"text-[18px]",lg:"text-[20px]"},J=c.forwardRef(({variant:t="primary",size:r="md",loading:n=!1,iconLeft:a,iconRight:s,fullWidth:o=!1,disabled:i,children:l,className:d="",...x},f)=>{const m=i||n;return e.jsxs("button",{ref:f,disabled:m,className:["inline-flex items-center justify-center font-medium rounded border transition-all duration-200 select-none","focus:outline-none","disabled:opacity-50 disabled:cursor-not-allowed",Ie[t],Se[r],o?"w-full":"",d].filter(Boolean).join(" "),...x,children:[n?e.jsx("span",{className:`material-symbols-outlined animate-spin ${$[r]}`,children:"progress_activity"}):a&&e.jsx("span",{className:`material-symbols-outlined ${$[r]}`,children:a}),l,!n&&s&&e.jsx("span",{className:`material-symbols-outlined ${$[r]}`,children:s})]})});J.displayName="Button";function Ae({children:t,attached:r=!1,className:n="",...a}){return e.jsx("div",{role:"group",className:["inline-flex",r?"[&>button]:rounded-none [&>button:first-child]:rounded-l [&>button:last-child]:rounded-r [&>button:not(:first-child)]:-ml-px":"gap-2",n].filter(Boolean).join(" "),...a,children:t})}const Re={elevated:"bg-surface-container-lowest shadow-theme-lg border border-surface-container-high",outlined:"bg-surface-container-lowest border border-outline-variant",filled:"bg-surface-container-low border border-transparent"},$e={none:"",sm:"p-4",md:"p-5",lg:"p-6"};function He({variant:t="elevated",padding:r="md",children:n,className:a="",...s}){return e.jsx("div",{className:["rounded-xl overflow-hidden",Re[t],a].filter(Boolean).join(" "),...s,children:e.jsx("div",{className:$e[r],children:n})})}function Fe({title:t,subtitle:r,action:n,icon:a,className:s="",...o}){return e.jsxs("div",{className:["flex items-start justify-between gap-4 pb-4",s].filter(Boolean).join(" "),...o,children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[a&&e.jsx("span",{className:"material-symbols-outlined text-on-surface-variant text-[24px] shrink-0",children:a}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h3",{className:"text-base font-semibold text-on-surface truncate",children:t}),r&&e.jsx("p",{className:"text-sm text-on-surface-variant mt-0.5",children:r})]})]}),n&&e.jsx("div",{className:"shrink-0",children:n})]})}function De({children:t,className:r="",...n}){return e.jsx("div",{className:["flex items-center justify-end gap-3 pt-4 border-t border-surface-container-high",r].filter(Boolean).join(" "),...n,children:t})}const M=8,Y=4;function Ve({trigger:t,items:r,align:n="right",className:a="",...s}){const[o,i]=c.useState(!1),[l,d]=c.useState(null),x=c.useRef(null),f=c.useRef(null),m=c.useCallback(()=>{var B;const u=x.current;if(!u)return;const p=u.getBoundingClientRect(),h=(B=f.current)==null?void 0:B.getBoundingClientRect(),v=(h==null?void 0:h.width)??180,b=(h==null?void 0:h.height)??0,y=window.innerHeight-p.bottom,N=p.top,k=y<b+M&&N>y?p.top-b-Y:p.bottom+Y,L=n==="right"?p.right-v:p.left,z=window.innerWidth-v-M,I=Math.min(Math.max(L,M),Math.max(z,M));d({top:k,left:I})},[n]);return c.useLayoutEffect(()=>{o&&m()},[o,m]),c.useEffect(()=>{if(!o)return;const u=()=>m();return window.addEventListener("scroll",u,!0),window.addEventListener("resize",u),()=>{window.removeEventListener("scroll",u,!0),window.removeEventListener("resize",u)}},[o,m]),c.useEffect(()=>{const u=p=>{var y,N;const h=p.target,v=(y=x.current)==null?void 0:y.contains(h),b=(N=f.current)==null?void 0:N.contains(h);!v&&!b&&i(!1)};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[]),c.useEffect(()=>{const u=p=>{p.key==="Escape"&&i(!1)};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[]),e.jsxs("div",{ref:x,className:["relative inline-block",a].filter(Boolean).join(" "),...s,children:[e.jsx("div",{onClick:()=>i(u=>!u),children:t}),o&&we.createPortal(e.jsx("div",{ref:f,className:"fixed z-[100] min-w-[180px] bg-surface-container-lowest border border-surface-container-high rounded-xl shadow-theme-lg py-1",style:{top:(l==null?void 0:l.top)??0,left:(l==null?void 0:l.left)??0,visibility:l?"visible":"hidden"},role:"menu",children:r.map((u,p)=>e.jsxs("div",{children:[e.jsxs("button",{role:"menuitem",disabled:u.disabled,onClick:()=>{var h;u.disabled||((h=u.onClick)==null||h.call(u),i(!1))},className:["w-full flex items-center gap-3 px-4 py-2.5 text-sm transition-colors text-left",u.danger?"text-error hover:bg-red-50 dark:hover:bg-error-container":"text-on-surface hover:bg-surface-container-low",u.disabled?"opacity-40 cursor-not-allowed":"cursor-pointer"].filter(Boolean).join(" "),children:[u.icon&&e.jsx("span",{className:"material-symbols-outlined text-[18px] opacity-70",children:u.icon}),u.label]}),u.dividerAfter&&e.jsx("div",{className:"my-1 border-t border-surface-container-high"})]},p))}),document.body)]})}const X=c.forwardRef(({label:t,hint:r,error:n,options:a,placeholder:s,disabled:o,className:i="",id:l,...d},x)=>{const f=l??(t==null?void 0:t.toLowerCase().replace(/\s+/g,"-"));return e.jsxs("div",{className:"flex flex-col gap-1.5",children:[t&&e.jsx("label",{htmlFor:f,className:"text-sm font-medium text-on-surface",children:t}),e.jsxs("div",{className:"relative",children:[e.jsxs("select",{ref:x,id:f,disabled:o,className:["w-full appearance-none bg-page border rounded px-3 py-2 text-sm pr-9 transition-all duration-200","text-on-surface focus:outline-none focus:border-zeo-orange focus:shadow-zeo-focus",n?"border-error":"border-outline-variant","disabled:bg-surface-container-low disabled:cursor-not-allowed disabled:opacity-60",i].filter(Boolean).join(" "),...d,children:[s&&e.jsx("option",{value:"",disabled:!0,children:s}),a.map(m=>e.jsx("option",{value:m.value,disabled:m.disabled,children:m.label},m.value))]}),e.jsx("span",{className:"material-symbols-outlined absolute right-3 top-1/2 -translate-y-1/2 text-[18px] text-on-surface-variant pointer-events-none",children:"expand_more"})]}),n&&e.jsxs("p",{className:"text-xs text-error flex items-center gap-1",children:[e.jsx("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),n]}),!n&&r&&e.jsx("p",{className:"text-xs text-on-surface-variant",children:r})]})});X.displayName="Select";const ee=c.forwardRef(({label:t,hint:r,error:n,disabled:a,className:s="",id:o,rows:i=4,...l},d)=>{const x=o??(t==null?void 0:t.toLowerCase().replace(/\s+/g,"-"));return e.jsxs("div",{className:"flex flex-col gap-1.5",children:[t&&e.jsx("label",{htmlFor:x,className:"text-sm font-medium text-on-surface",children:t}),e.jsx("textarea",{ref:d,id:x,rows:i,disabled:a,className:["w-full bg-page border rounded px-3 py-2 text-sm resize-y transition-all duration-200","text-on-surface placeholder:text-on-surface-variant","focus:outline-none focus:border-zeo-orange focus:shadow-zeo-focus",n?"border-error":"border-outline-variant","disabled:bg-surface-container-low disabled:cursor-not-allowed disabled:opacity-60",s].filter(Boolean).join(" "),...l}),n&&e.jsxs("p",{className:"text-xs text-error flex items-center gap-1",children:[e.jsx("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),n]}),!n&&r&&e.jsx("p",{className:"text-xs text-on-surface-variant",children:r})]})});ee.displayName="Textarea";const Ke={square:"rounded-[2px]",rounded:"rounded-[4px]",circle:"rounded-full"},te=c.forwardRef(({label:t,description:r,error:n,disabled:a,className:s="",id:o,shape:i="square",color:l="#FF6B00",...d},x)=>{const f=o??`checkbox-${t==null?void 0:t.toLowerCase().replace(/\s+/g,"-")}`;return e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("label",{htmlFor:f,className:["flex items-start gap-3 cursor-pointer",a?"opacity-50 cursor-not-allowed":""].filter(Boolean).join(" "),children:[e.jsxs("div",{className:"relative mt-0.5 shrink-0 w-4 h-4",children:[e.jsx("input",{ref:x,type:"checkbox",id:f,disabled:a,className:["absolute inset-0 w-full h-full opacity-0 cursor-pointer peer disabled:cursor-not-allowed",s].filter(Boolean).join(" "),...d}),e.jsx("div",{className:["w-4 h-4 border-2 border-outline-variant transition-colors pointer-events-none","bg-page peer-checked:bg-[var(--cb-color)] peer-checked:border-[var(--cb-color)]","peer-focus-visible:ring-2 peer-focus-visible:ring-[var(--cb-color)]/30 peer-focus-visible:ring-offset-0",Ke[i]].filter(Boolean).join(" "),style:{"--cb-color":l}}),e.jsx("svg",{viewBox:"0 0 12 10",width:"10",height:"8",fill:"none","aria-hidden":"true",className:"absolute inset-0 m-auto pointer-events-none opacity-0 peer-checked:opacity-100 transition-opacity",children:e.jsx("polyline",{points:"1,5 4.5,8.5 11,1.5",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]}),t&&e.jsxs("span",{className:"flex flex-col",children:[e.jsx("span",{className:"text-sm font-medium text-on-surface leading-tight",children:t}),r&&e.jsx("span",{className:"text-xs text-on-surface-variant mt-0.5",children:r})]})]}),n&&e.jsxs("p",{className:"text-xs text-error flex items-center gap-1 ml-7",children:[e.jsx("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),n]})]})});te.displayName="Checkbox";const re=c.forwardRef(({label:t,description:r,disabled:n,className:a="",id:s,...o},i)=>{const l=s??`radio-${t==null?void 0:t.toLowerCase().replace(/\s+/g,"-")}`;return e.jsxs("label",{htmlFor:l,className:["flex items-start gap-3 cursor-pointer",n?"opacity-50 cursor-not-allowed":""].filter(Boolean).join(" "),children:[e.jsx("input",{ref:i,type:"radio",id:l,disabled:n,className:["mt-0.5 w-4 h-4 border-outline-variant text-zeo-orange shrink-0","focus:ring-2 focus:ring-zeo-orange/30 focus:ring-offset-0","disabled:cursor-not-allowed",a].filter(Boolean).join(" "),...o}),t&&e.jsxs("span",{className:"flex flex-col",children:[e.jsx("span",{className:"text-sm font-medium text-on-surface leading-tight",children:t}),r&&e.jsx("span",{className:"text-xs text-on-surface-variant mt-0.5",children:r})]})]})});re.displayName="Radio";const ne=c.forwardRef(({label:t,description:r,disabled:n,className:a="",id:s,...o},i)=>{const l=s??`switch-${t==null?void 0:t.toLowerCase().replace(/\s+/g,"-")}`;return e.jsxs("label",{htmlFor:l,className:["flex items-start gap-3 cursor-pointer select-none",n?"opacity-50 cursor-not-allowed":""].filter(Boolean).join(" "),children:[e.jsxs("div",{className:"relative mt-0.5 shrink-0",children:[e.jsx("input",{ref:i,type:"checkbox",id:l,disabled:n,className:"sr-only peer",...o}),e.jsx("div",{className:"w-10 h-6 bg-surface-container-high rounded-full peer-checked:bg-zeo-orange transition-colors duration-200 peer-focus:ring-2 peer-focus:ring-zeo-orange/30"}),e.jsx("div",{className:"absolute top-1 left-1 w-4 h-4 bg-white rounded-full shadow transition-transform duration-200 peer-checked:translate-x-4"})]}),t&&e.jsxs("span",{className:"flex flex-col",children:[e.jsx("span",{className:"text-sm font-medium text-on-surface leading-tight",children:t}),r&&e.jsx("span",{className:"text-xs text-on-surface-variant mt-0.5",children:r})]})]})});ne.displayName="Switch";function j({name:t,size:r=20,fill:n=!1,className:a="",style:s,...o}){return e.jsx("span",{...o,className:`material-symbols-outlined leading-none select-none ${a}`.trim(),style:{fontSize:r,fontVariationSettings:`'FILL' ${n?1:0}, 'wght' 300, 'GRAD' 0, 'opsz' 24`,...s},"aria-hidden":"true",children:t})}const ae=({size:t=24,className:r})=>e.jsxs("svg",{width:t,height:t,viewBox:"0 0 100 100",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4,className:r,"aria-hidden":"true",children:[e.jsx("path",{d:"M15 65 L40 50 H85 L60 65 Z"}),e.jsx("path",{d:"M15 65 V72 L60 72 V65"}),e.jsx("path",{d:"M60 72 L85 57 V50"}),e.jsx("path",{d:"M25 60 V35 H32 V56"}),e.jsx("path",{d:"M42 45 V20 H49 V41"}),e.jsx("path",{d:"M55 60 V35 H62 V56"}),e.jsx("path",{d:"M72 45 V20 H79 V41"})]}),se=({size:t=24,className:r})=>e.jsxs("svg",{width:t,height:t,viewBox:"0 0 100 100",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4,className:r,"aria-hidden":"true",children:[e.jsx("ellipse",{cx:"50",cy:"20",rx:"12",ry:"6"}),e.jsx("path",{d:"M38 20 V65 M62 20 V65"}),e.jsx("path",{d:"M50 25 V58"}),e.jsx("path",{d:"M38 65 L25 75 V85 L50 90 L75 85 V75 L62 65 Z"}),e.jsx("path",{d:"M50 75 V90"})]}),oe=({size:t=24,className:r})=>e.jsxs("svg",{width:t,height:t,viewBox:"0 0 100 100",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",className:r,"aria-hidden":"true",children:[e.jsx("path",{d:"M48 90 L45 25 L55 25 L52 90 Z",fill:"currentColor",stroke:"none"}),e.jsx("circle",{cx:"50",cy:"20",r:"5",fill:"currentColor",stroke:"none"}),e.jsx("path",{d:"M38 30 A20 20 0 0 0 38 10",stroke:"currentColor",strokeWidth:3}),e.jsx("path",{d:"M30 35 A28 28 0 0 0 30 5",stroke:"currentColor",strokeWidth:3}),e.jsx("path",{d:"M62 30 A20 20 0 0 1 62 10",stroke:"currentColor",strokeWidth:3}),e.jsx("path",{d:"M70 35 A28 28 0 0 1 70 5",stroke:"currentColor",strokeWidth:3})]}),Ue={sm:"px-3 py-1.5 text-sm h-8",md:"px-3 py-2 text-sm h-10",lg:"px-4 py-2.5 text-base h-11"},Z={sm:"text-[16px]",md:"text-[18px]",lg:"text-[20px]"};function Oe(t,r,n){if(t===""||t===void 0||t===null)return"";const a=Number(t).toFixed(r);return n?`${a} ${n}`:a}const ie=c.forwardRef(({label:t,hint:r,error:n,inputSize:a="md",iconLeft:s,iconRight:o,onIconRightClick:i,disabled:l,className:d="",id:x,unit:f,decimals:m,onValueChange:u,value:p,defaultValue:h,type:v,step:b,inputMode:y,onChange:N,onFocus:T,onBlur:k,...L},z)=>{const I=c.useId(),B=x??(t?t.toLowerCase().replace(/\s+/g,"-"):I),g=f!==void 0,S=m??0,A=g&&p!==void 0,[me,pe]=c.useState(typeof h=="number"?h:""),[O,G]=c.useState(!1),[R,q]=c.useState(""),E=A?p:me,he=g?O?R:Oe(E,S,f??""):p,be=c.useCallback(C=>{g&&(G(!0),q(E===""?"":String(E))),T==null||T(C)},[g,E,T]),ge=c.useCallback(C=>{if(g){G(!1);const W=parseFloat(R.replace(",",".")),P=isNaN(W)?"":W;A||pe(P),u==null||u(P)}k==null||k(C)},[g,R,A,u,k]),je=c.useCallback(C=>{g&&q(C.target.value),N==null||N(C)},[g,N]);return e.jsxs("div",{className:"flex flex-col gap-1.5",children:[t&&e.jsx("label",{htmlFor:B,className:"text-sm font-medium text-on-surface",children:t}),e.jsxs("div",{className:"relative flex items-center",children:[s&&e.jsx("span",{className:`material-symbols-outlined absolute left-3 text-on-surface-variant pointer-events-none ${Z[a]}`,children:s}),e.jsx("input",{ref:z,id:B,disabled:l,type:g?O?"number":"text":v,inputMode:g?"decimal":y,value:g?he:p,defaultValue:g?void 0:h,step:g?b??(S>0?Math.pow(10,-S):1):b,onFocus:be,onBlur:ge,onChange:je,className:["w-full bg-page border rounded transition-all duration-200","text-on-surface placeholder:text-on-surface-variant dark:placeholder:text-content-disabled","focus:outline-none focus:border-zeo-orange focus:shadow-zeo-focus",n?"border-error focus:border-error focus:shadow-[0_0_0_4px_rgba(186,26,26,0.15)]":"border-outline-variant","disabled:bg-surface-container-low disabled:cursor-not-allowed disabled:opacity-60",g?"[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none":"",Ue[a],s?"pl-9":"",o?"pr-9":"",d].filter(Boolean).join(" "),...L}),o&&e.jsx("span",{className:["material-symbols-outlined absolute right-3 text-on-surface-variant",Z[a],i?"cursor-pointer hover:text-on-surface":"pointer-events-none"].filter(Boolean).join(" "),onClick:i,children:o})]}),n&&e.jsxs("p",{className:"text-xs text-error flex items-center gap-1",children:[e.jsx("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),n]}),!n&&r&&e.jsx("p",{className:"text-xs text-on-surface-variant",children:r})]})});ie.displayName="Input";const Ge={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-2xl",full:"max-w-[calc(100vw-2rem)]"};function qe({open:t,onClose:r,size:n="md",children:a}){return c.useEffect(()=>{if(!t)return;const s=o=>{o.key==="Escape"&&r()};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[t,r]),t?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4","aria-modal":"true",role:"dialog",children:[e.jsx("div",{className:"absolute inset-0 bg-black/50 dark:bg-scrim/60 backdrop-blur-sm",onClick:r,"aria-hidden":"true"}),e.jsx("div",{className:["relative w-full bg-surface-container-lowest rounded-2xl shadow-theme-lg z-10 flex flex-col max-h-[90vh]",Ge[n]].filter(Boolean).join(" "),children:a})]}):null}function We({title:t,subtitle:r,onClose:n,className:a="",...s}){return e.jsxs("div",{className:["flex items-start justify-between gap-4 p-6 border-b border-surface-container-high",a].filter(Boolean).join(" "),...s,children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-on-surface",children:t}),r&&e.jsx("p",{className:"text-sm text-on-surface-variant mt-0.5",children:r})]}),n&&e.jsx("button",{onClick:n,className:"p-1 text-on-surface-variant hover:text-on-surface hover:bg-surface-container-low rounded-lg transition-all -mt-1 -mr-1","aria-label":"Fechar modal",children:e.jsx("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]})}function Pe({children:t,className:r="",...n}){return e.jsx("div",{className:["p-6 overflow-y-auto flex-1",r].filter(Boolean).join(" "),...n,children:t})}function Ye({children:t,className:r="",...n}){return e.jsx("div",{className:["flex items-center justify-end gap-3 p-6 border-t border-surface-container-high",r].filter(Boolean).join(" "),...n,children:t})}function Ze(t,r){return r<=7?Array.from({length:r},(n,a)=>a+1):t<=4?[1,2,3,4,5,"...",r]:t>=r-3?[1,"...",r-4,r-3,r-2,r-1,r]:[1,"...",t-1,t,t+1,"...",r]}function Qe({currentPage:t,totalPages:r,totalItems:n,itemsPerPage:a=10,onPageChange:s,variant:o="full",className:i="",...l}){const d=Ze(t,r),x=(t-1)*a+1,f=Math.min(t*a,n??t*a),m="inline-flex items-center justify-center text-sm font-medium rounded transition-all duration-150 focus:outline-none focus:ring-2 focus:ring-zeo-orange/30 disabled:opacity-40 disabled:cursor-not-allowed select-none",u=`${m} w-9 h-9`,p="bg-zeo-orange text-white",h="text-on-surface-variant hover:bg-surface-container-low hover:text-on-surface",v=`${m} px-3 h-9 gap-1.5 border border-surface-container-high text-on-surface-variant hover:bg-surface-container-low hover:text-on-surface`;return e.jsxs("div",{className:["flex items-center justify-between gap-4 flex-wrap",i].filter(Boolean).join(" "),...l,children:[o==="full"&&n!==void 0&&e.jsxs("p",{className:"text-sm text-on-surface-variant",children:["Mostrando ",e.jsxs("strong",{children:[x,"–",f]})," de ",e.jsx("strong",{children:n})," itens"]}),e.jsxs("div",{className:"flex items-center gap-1 ml-auto",children:[e.jsxs("button",{onClick:()=>s(t-1),disabled:t===1,"aria-label":"Página anterior",className:o==="icon"?u+" "+h:v,children:[e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),o==="text"&&"Anterior"]}),d.map((b,y)=>b==="..."?e.jsx("span",{className:"w-9 text-center text-sm text-on-surface-variant select-none",children:"…"},`ellipsis-${y}`):e.jsx("button",{onClick:()=>s(b),"aria-current":t===b?"page":void 0,className:[u,t===b?p:h].join(" "),children:b},b)),e.jsxs("button",{onClick:()=>s(t+1),disabled:t===r,"aria-label":"Próxima página",className:o==="icon"?u+" "+h:v,children:[o==="text"&&"Próxima",e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_forward"})]})]})]})}const Je={xs:"h-1",sm:"h-1.5",md:"h-2",lg:"h-3"},Xe={primary:"bg-zeo-orange",success:"bg-green-500",warning:"bg-amber-400",danger:"bg-red-500"};function et({value:t,max:r=100,size:n="md",variant:a="primary",label:s="none",showPercent:o=!0,title:i,className:l="",...d}){const x=Math.min(100,Math.max(0,t/r*100)),f=`${Math.round(x)}%`;return e.jsxs("div",{className:["flex flex-col gap-1.5",l].filter(Boolean).join(" "),...d,children:[(i||s==="outside"&&o)&&e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[i&&e.jsx("span",{className:"text-sm font-medium text-on-surface",children:i}),s==="outside"&&o&&e.jsx("span",{className:"text-sm font-semibold text-on-surface",children:f})]}),e.jsx("div",{role:"progressbar","aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":r,className:["relative w-full bg-surface-container-high rounded-full overflow-hidden",Je[n]].join(" "),children:e.jsx("div",{className:["h-full rounded-full transition-all duration-500 flex items-center justify-end pr-1",Xe[a]].join(" "),style:{width:`${x}%`},children:s==="inside"&&o&&x>=20&&e.jsx("span",{className:"text-[10px] font-bold text-white leading-none",children:f})})})]})}const Q=(t,r)=>typeof t=="function"?t(r):t;function tt({sidebar:t,navbar:r,children:n,defaultExpanded:a=!1,isExpanded:s,onToggle:o}){const[i,l]=c.useState(a),d=s??i,x=c.useCallback(()=>{s===void 0&&l(m=>!m),o==null||o()},[s,o]),f={isExpanded:d,toggle:x};return e.jsxs("div",{className:"flex h-screen overflow-hidden",children:[Q(t,f),e.jsxs("div",{className:["flex-1 flex flex-col overflow-hidden transition-[margin-left] duration-shell ease-shell",d?"ml-sidebar-expanded":"ml-sidebar-collapsed"].join(" "),children:[Q(r,f),e.jsx("main",{className:"flex-1 overflow-y-auto bg-surface-container dark:bg-canvas",children:n})]})]})}const rt=({href:t,className:r,children:n})=>e.jsx("a",{href:t,className:r,children:n}),le="text-[10px] uppercase tracking-widest text-white/30 font-bold";function F({item:t,isActive:r,isExpanded:n,renderLink:a=rt}){const s=t.disabled||!t.href,o=!n||s&&t.disabledReason,i=e.jsxs("div",{className:["group relative flex items-center gap-3 px-4 py-3 rounded-lg transition-colors duration-150",r?"bg-primary-container/10 text-primary-container border-r-2 border-primary-container":s?"text-white/30 opacity-50 cursor-default":"text-white/55 hover:bg-sidebar-hover hover:text-white cursor-pointer"].join(" "),children:[t.icon,e.jsx("span",{className:["text-sm font-medium whitespace-nowrap overflow-hidden transition-opacity duration-shell",n?"opacity-100":"opacity-0 w-0"].join(" "),children:t.label}),e.jsxs("div",{role:"tooltip",className:["absolute left-full ml-3 px-3 py-2 bg-surface-container-lowest text-gray-700 dark:text-content-secondary text-sm font-medium","rounded-lg shadow-theme-lg whitespace-nowrap z-[200] pointer-events-none","invisible opacity-0 transition-all duration-150",o&&"group-hover:visible group-hover:opacity-100"].filter(Boolean).join(" "),children:[s&&t.disabledReason?t.disabledReason:t.label,e.jsx("div",{className:"absolute top-1/2 -left-1 -translate-y-1/2 w-2 h-2 bg-surface-container-lowest rotate-45"})]})]});return s?e.jsx("div",{children:i}):a({item:t,href:t.href,className:"block no-underline",children:i})}function ce({section:t,index:r=0,activeId:n,isExpanded:a,renderLink:s}){return e.jsxs(e.Fragment,{children:[t.label&&e.jsx("div",{className:["overflow-hidden transition-all duration-shell px-3",a?"h-6 opacity-100 mb-1":"h-0 opacity-0",r>0?"mt-4":""].join(" "),children:e.jsx("span",{className:le,children:t.label})}),t.items.map(o=>e.jsx(F,{item:o,isActive:o.id===n,isExpanded:a,renderLink:s},o.id))]})}function nt({sections:t,activeId:r,isExpanded:n,logo:a,renderLink:s}){const o=t.filter(d=>d.placement!=="bottom"),i=t.filter(d=>d.placement==="bottom"),l=e.jsx("img",{src:a.src,alt:a.alt??"",className:["flex-shrink-0",n?"h-8 w-auto object-contain":"w-10 h-10 object-cover object-left"].join(" ")});return e.jsxs("aside",{className:["fixed left-0 top-0 h-screen bg-sidebar flex flex-col z-[100]","transition-[width] duration-shell ease-shell","shadow-[40px_0_40px_0_rgba(0,0,0,0.04)]",n?"w-sidebar-expanded":"w-sidebar-collapsed"].join(" "),children:[e.jsx("div",{className:["h-[88px] flex items-center flex-shrink-0",n?"px-6 justify-start":"justify-center"].join(" "),children:a.href?e.jsx("a",{href:a.href,"aria-label":a.alt,className:"flex-shrink-0",children:l}):l}),e.jsx("nav",{className:"flex-1 flex flex-col py-2 px-3 gap-1",children:o.map((d,x)=>e.jsx(ce,{section:d,index:x,activeId:r,isExpanded:n,renderLink:s},d.id))}),i.map(d=>e.jsxs("div",{className:"flex-shrink-0 pb-4",children:[d.label&&e.jsx("div",{className:["px-6 mb-2 overflow-hidden transition-all duration-shell",n?"h-7 opacity-100":"h-0 opacity-0"].join(" "),children:e.jsx("span",{className:le,children:d.label})}),e.jsx("div",{className:"border-t border-white/[0.06] mb-2"}),e.jsx("div",{className:"px-3",children:d.items.map(x=>e.jsx(F,{item:x,isActive:x.id===r,isExpanded:n,renderLink:s},x.id))})]},d.id))]})}function at({onToggleMenu:t,start:r,search:n,actions:a,userMenu:s,toggleMenuLabel:o="Alternar menu"}){return e.jsxs("header",{className:"h-navbar bg-surface-container-lowest dark:bg-page border-b border-surface-container-highest dark:border-line-section flex items-center justify-between px-6 sticky top-0 z-50 flex-shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-4 flex-1 min-w-0",children:[e.jsx("button",{type:"button",onClick:t,"aria-label":o,className:"flex items-center justify-center p-2 rounded-full text-on-secondary-container hover:bg-surface-container-high transition-colors flex-shrink-0",children:e.jsx(j,{name:"menu",size:20})}),r,n]}),(a||s)&&e.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0 ml-4",children:[a,a&&s&&e.jsx("div",{className:"w-px h-6 bg-outline-variant opacity-30 mx-2 flex-shrink-0"}),s]})]})}function st({module:t,project:r}){return e.jsxs("div",{className:"flex items-baseline gap-2 min-w-0",children:[e.jsx("span",{className:"text-title-md font-bold text-on-surface whitespace-nowrap",children:t}),r&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-on-surface-variant","aria-hidden":"true",children:"/"}),e.jsx("span",{className:"text-body-md text-on-surface-variant truncate",children:r})]})]})}function ot({value:t,onChange:r,placeholder:n,shortcutHint:a,focusShortcut:s=!1}){const o=c.useRef(null);return c.useEffect(()=>{if(!s)return;const i=l=>{var d;(l.metaKey||l.ctrlKey)&&l.key==="k"&&(l.preventDefault(),(d=o.current)==null||d.focus())};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[s]),e.jsxs("div",{className:"relative w-full max-w-md",children:[e.jsx(j,{name:"search",size:18,className:"absolute left-3 top-1/2 -translate-y-1/2 text-on-secondary-container pointer-events-none"}),e.jsx("input",{ref:o,value:t,onChange:i=>r(i.target.value),placeholder:n,"aria-label":n,className:["w-full h-9 pl-10 rounded-lg",a?"pr-[90px]":"pr-3","border border-transparent bg-surface-container","text-sm text-on-surface font-sans placeholder:text-on-surface-variant","outline-none transition-all","focus:border-primary-container focus:shadow-zeo-focus focus:bg-surface-container-lowest"].join(" ")}),a&&e.jsx("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-xs text-on-surface-variant bg-surface-container-lowest border border-surface-container-highest rounded px-1 py-px whitespace-nowrap pointer-events-none",children:a})]})}function D({icon:t,label:r,badge:n=!1,className:a="",type:s="button",...o}){return e.jsxs("button",{...o,type:s,"aria-label":r,className:`relative flex items-center justify-center p-2 rounded-full text-on-secondary-container hover:bg-surface-container-high transition-colors ${a}`.trim(),children:[t,n&&e.jsx("span",{className:"absolute top-2 right-2 w-2 h-2 bg-error rounded-full"})]})}function it({hasUnread:t=!1,count:r=0,onClick:n,label:a="Notificações"}){return e.jsx(D,{icon:e.jsx(j,{name:"notifications",size:20}),label:a,badge:t||r>0,onClick:n})}const de={read:()=>{try{const t=window.localStorage.getItem(w.THEME_STORAGE_KEY);return t==="dark"||t==="light"?t:null}catch{return null}},write:t=>{try{window.localStorage.setItem(w.THEME_STORAGE_KEY,t)}catch{return}}},lt=`try{if(localStorage.getItem('${w.THEME_STORAGE_KEY}')==='dark')document.documentElement.setAttribute('${w.THEME_ATTRIBUTE}','dark')}catch(e){}`;function ue(t,r=document.documentElement){t==="dark"?r.setAttribute(w.THEME_ATTRIBUTE,"dark"):r.removeAttribute(w.THEME_ATTRIBUTE)}const V=c.createContext(null);function ct({children:t,defaultTheme:r="light",storage:n=de}){const[a,s]=c.useState(()=>n.read()??r);c.useEffect(()=>{ue(a)},[a]);const o=c.useCallback(d=>{n.write(d),s(d)},[n]),i=c.useCallback(()=>o(a==="dark"?"light":"dark"),[o,a]),l=c.useMemo(()=>({theme:a,isDark:a==="dark",setTheme:o,toggleTheme:i}),[a,o,i]);return e.jsx(V.Provider,{value:l,children:t})}function dt(){return c.useContext(V)}function ut(){const t=c.useContext(V);if(!t)throw new Error("useTheme precisa estar dentro de um ThemeProvider");return t}function K(t,r,n){c.useEffect(()=>{if(!r)return;const a=o=>{o.key==="Escape"&&n()},s=o=>{var i;(i=t.current)!=null&&i.contains(o.target)||n()};return document.addEventListener("keydown",a),document.addEventListener("mousedown",s),()=>{document.removeEventListener("keydown",a),document.removeEventListener("mousedown",s)}},[t,r,n])}const xt={myAccount:"Minha Conta",logout:"Sair",darkMode:"Modo escuro",user:"Usuário"};function ft({name:t,email:r,shortName:n,profilePicUrl:a,onMyAccount:s,onLogout:o,labels:i}){const l={...xt,...i},[d,x]=c.useState(!1),f=c.useRef(null),m=dt(),u=c.useCallback(()=>x(!1),[]);return K(f,d,u),e.jsxs("div",{ref:f,className:"relative flex items-center",children:[e.jsxs("button",{type:"button",onClick:()=>x(p=>!p),"aria-haspopup":"true","aria-expanded":d,className:"flex items-center gap-2 px-2 py-1 rounded-full border-none bg-transparent cursor-pointer text-on-surface-variant hover:bg-surface-container-low transition-colors",children:[n&&e.jsx("span",{className:"text-sm font-medium text-on-surface",children:n}),e.jsx(H,{src:a,name:t,size:"sm","aria-label":t||l.user}),e.jsx("span",{className:`flex items-center transition-transform duration-200 ${d?"rotate-180":"rotate-0"}`,children:e.jsx(j,{name:"expand_more",size:13})})]}),d&&e.jsxs("div",{role:"menu",className:"absolute right-0 top-[calc(100%+8px)] min-w-[220px] bg-surface-container-lowest border border-surface-container-highest rounded-xl shadow-theme-lg z-[200] overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-3 p-4",children:[e.jsx(H,{src:a,name:t,size:"sm"}),e.jsxs("div",{className:"flex flex-col gap-0.5 min-w-0",children:[e.jsx("span",{className:"text-sm font-bold text-on-surface whitespace-nowrap overflow-hidden text-ellipsis",children:t}),e.jsx("span",{className:"text-xs text-on-surface-variant whitespace-nowrap overflow-hidden text-ellipsis",children:r})]})]}),e.jsx("hr",{className:"m-0 border-t border-surface-container-highest"}),e.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{u(),s()},className:"w-full flex items-center gap-3 px-4 py-2.5 border-none bg-transparent cursor-pointer text-left text-on-surface hover:bg-surface-container-low transition-colors",children:[e.jsx(j,{name:"person",size:15}),e.jsx("span",{className:"text-sm font-medium",children:l.myAccount})]}),m&&e.jsxs("button",{type:"button",role:"menuitemcheckbox","aria-checked":m.isDark,onClick:m.toggleTheme,className:"w-full flex items-center gap-3 px-4 py-2.5 border-none bg-transparent cursor-pointer text-left text-on-surface hover:bg-surface-container-low transition-colors",children:[e.jsx(j,{name:"dark_mode",size:15}),e.jsx("span",{className:"flex-1 text-sm font-medium",children:l.darkMode}),e.jsx("span",{className:`relative w-7 h-4 shrink-0 rounded-full transition-colors duration-150 ${m.isDark?"bg-zeo-orange":"bg-line-strong"}`,children:e.jsx("span",{className:`absolute top-0.5 w-3 h-3 rounded-full bg-white transition-[left] duration-150 ${m.isDark?"left-3.5":"left-0.5"}`})})]}),e.jsx("hr",{className:"m-0 border-t border-surface-container-highest"}),e.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{u(),o()},className:"w-full flex items-center gap-3 px-4 py-2.5 border-none bg-transparent cursor-pointer text-left text-error hover:bg-error/5 transition-colors",children:[e.jsx(j,{name:"logout",size:15}),e.jsx("span",{className:"text-sm font-medium",children:l.logout})]})]})]})}const mt={help:"Ajuda",documentation:"Documentação",faq:"F.A.Q.",changelog:"Changelog",contactUs:"Contate-nos"};function pt({labels:t,hrefs:r}){const n={...mt,...t},a=c.useRef(null),[s,o]=c.useState(!1),i=c.useCallback(()=>o(!1),[]);return K(a,s,i),e.jsxs("div",{ref:a,className:"relative",children:[e.jsx(D,{icon:e.jsx(j,{name:"help",size:20}),label:n.help,onClick:()=>o(l=>!l),"aria-haspopup":"true","aria-expanded":s}),s&&e.jsxs("div",{role:"menu",className:"absolute right-0 top-[calc(100%+8px)] w-56 bg-surface-container-lowest border border-surface-container-highest rounded-xl shadow-theme-lg py-1 z-[200] overflow-hidden",children:[e.jsx(_,{icon:"description",label:n.documentation,href:r==null?void 0:r.documentation}),e.jsx(_,{icon:"help_outline",label:n.faq,href:r==null?void 0:r.faq}),e.jsx(_,{icon:"assignment",label:n.changelog,href:r==null?void 0:r.changelog}),e.jsx("div",{className:"my-1 border-t border-surface-container-highest"}),e.jsx(_,{icon:"mail",label:n.contactUs,href:r==null?void 0:r.contactUs})]})]})}function _({icon:t,label:r,href:n="#"}){return e.jsxs("a",{href:n,role:"menuitem",className:"flex items-center gap-3 px-4 py-2.5 text-sm font-medium text-on-surface-variant hover:bg-surface-container hover:text-on-surface transition-colors no-underline",children:[e.jsx(j,{name:t,size:18,className:"opacity-70"}),r]})}const ht=[{id:"tower",status:"active",iconName:"cell_tower",labelKey:"modules.tower.title"},{id:"antennas",status:"active",iconName:"settings_input_antenna",labelKey:"modules.antennas.title"},{id:"rooftop",status:"active",iconName:"roofing",labelKey:"modules.rooftop.title"},{id:"radier",status:"active",iconName:"layers",IconComponent:ae,labelKey:"modules.radier.title"},{id:"caisson_foundation",status:"coming_soon",iconName:"filter_alt",IconComponent:se,labelKey:"modules.caisson_foundation.title"},{id:"pole",status:"coming_soon",iconName:"fence",IconComponent:oe,labelKey:"modules.pole.title"},{id:"dashboards",status:"coming_soon",iconName:"dashboard",labelKey:"modules.dashboards.title"}];function bt(t,r,n){return t.filter(a=>r.includes(a.id)||n.includes(a.id)).map(a=>({module:a,hasAccess:n.includes(a.id)}))}const gt={xs:"w-3 h-3 border",sm:"w-4 h-4 border-2",md:"w-6 h-6 border-2",lg:"w-8 h-8 border-[3px]",xl:"w-12 h-12 border-4"},jt={primary:"border-orange-200 dark:border-zeo-orange/30 border-t-zeo-orange",secondary:"border-surface-container-high border-t-on-surface-variant",white:"border-white/30 border-t-white"};function wt({size:t="md",variant:r="primary",label:n="Carregando...",className:a="",...s}){return e.jsx("span",{role:"status","aria-label":n,className:["inline-block rounded-full animate-spin",gt[t],jt[r],a].filter(Boolean).join(" "),...s})}function vt({children:t,className:r="",...n}){return e.jsx("div",{className:["overflow-x-auto rounded-xl border border-surface-container-high shadow-sm",r].filter(Boolean).join(" "),...n,children:e.jsx("table",{className:"w-full text-sm",children:t})})}function yt({children:t,className:r="",...n}){return e.jsx("thead",{className:["bg-surface-container-low border-b border-surface-container-high",r].filter(Boolean).join(" "),...n,children:t})}function Nt({children:t,className:r="",...n}){return e.jsx("tbody",{className:["bg-surface-container-lowest divide-y divide-surface-container-high",r].filter(Boolean).join(" "),...n,children:t})}function kt({selected:t=!1,children:r,className:n="",...a}){return e.jsx("tr",{className:["hover:bg-surface-container-low transition-colors",t?"bg-orange-50/40 dark:bg-zeo-orange/[0.12]":"",n].filter(Boolean).join(" "),...a,children:r})}function Ct({sortable:t=!1,sorted:r=!1,onSort:n,children:a,className:s="",...o}){return e.jsx("th",{className:["px-4 py-3 text-left text-xs font-semibold text-on-surface-variant uppercase tracking-wide whitespace-nowrap",t?"cursor-pointer hover:text-on-surface select-none":"",s].filter(Boolean).join(" "),onClick:t?n:void 0,...o,children:e.jsxs("span",{className:"inline-flex items-center gap-1",children:[a,t&&e.jsx("span",{className:`material-symbols-outlined text-[14px] ${r?"text-zeo-orange":"opacity-40"}`,children:r==="asc"?"arrow_upward":r==="desc"?"arrow_downward":"unfold_more"})]})})}function Tt({muted:t=!1,mono:r=!1,children:n,className:a="",...s}){return e.jsx("td",{className:["px-4 py-3",t?"text-on-surface-variant":"text-on-surface",r?"font-mono text-xs":"",a].filter(Boolean).join(" "),...s,children:n})}const xe=c.createContext(null);function U(){const t=c.useContext(xe);if(!t)throw new Error("Tab must be used inside Tabs");return t}const fe=c.createContext({stretch:!1});function Bt({value:t,onChange:r,variant:n="default",children:a}){return e.jsx(xe.Provider,{value:{active:t,onChange:r,variant:n},children:e.jsx("div",{className:n==="vertical"?"flex gap-6":"flex flex-col gap-4",children:a})})}function Et({children:t,className:r="",stretch:n=!1,...a}){const{variant:s}=U(),o={default:n?"flex gap-1 bg-surface-container-low rounded-lg p-1 w-full":"flex gap-1 bg-surface-container-low rounded-lg p-1 w-fit",underline:"flex gap-0 border-b border-surface-container-high w-full",vertical:"flex flex-col gap-1 bg-surface-container-low rounded-lg p-1 w-48 shrink-0 h-fit"}[s];return e.jsx(fe.Provider,{value:{stretch:n},children:e.jsx("div",{role:"tablist",className:[o,r].filter(Boolean).join(" "),...a,children:t})})}function Mt({value:t,label:r,icon:n,badge:a,disabled:s=!1}){const{active:o,onChange:i,variant:l}=U(),{stretch:d}=c.useContext(fe),x=o===t,f="inline-flex items-center gap-2 font-medium text-sm transition-all duration-200 select-none focus:outline-none",m="opacity-40 cursor-not-allowed pointer-events-none",u=d&&l!=="vertical"?"flex-1 justify-center":"",p={default:x?"bg-white dark:bg-chip text-on-surface shadow-sm rounded-md px-4 py-2":"text-on-surface-variant hover:text-on-surface rounded-md px-4 py-2",underline:x?"text-zeo-orange border-b-2 border-zeo-orange px-4 py-2.5 -mb-px":"text-on-surface-variant hover:text-on-surface border-b-2 border-transparent px-4 py-2.5 -mb-px",vertical:x?"bg-white dark:bg-chip text-on-surface shadow-sm rounded-md px-4 py-2 w-full":"text-on-surface-variant hover:text-on-surface rounded-md px-4 py-2 w-full"}[l];return e.jsxs("button",{role:"tab","aria-selected":x,"aria-disabled":s,disabled:s,onClick:()=>!s&&i(t),className:[f,p,u,s?m:""].filter(Boolean).join(" "),children:[n&&e.jsx("span",{className:"material-symbols-outlined text-[18px]",style:x?{fontVariationSettings:"'FILL' 1"}:void 0,children:n}),r,a!==void 0&&e.jsx("span",{className:`text-[11px] font-semibold px-1.5 py-0.5 rounded-full leading-none ${x?"bg-zeo-orange text-white":"bg-surface-container-high text-on-surface-variant"}`,children:a})]})}function _t({value:t,children:r,className:n="",stretch:a=!1}){const{active:s}=U();return s!==t?null:e.jsx("div",{role:"tabpanel",className:[a?"flex-1":"",n].filter(Boolean).join(" "),children:r})}const Lt={top:{wrapper:"bottom-full left-1/2 -translate-x-1/2 mb-2",arrow:"top-full left-1/2 -translate-x-1/2 border-t-4 border-x-4 border-x-transparent border-b-0"},bottom:{wrapper:"top-full left-1/2 -translate-x-1/2 mt-2",arrow:"bottom-full left-1/2 -translate-x-1/2 border-b-4 border-x-4 border-x-transparent border-t-0"},left:{wrapper:"right-full top-1/2 -translate-y-1/2 mr-2",arrow:"left-full top-1/2 -translate-y-1/2 border-l-4 border-y-4 border-y-transparent border-r-0"},right:{wrapper:"left-full top-1/2 -translate-y-1/2 ml-2",arrow:"right-full top-1/2 -translate-y-1/2 border-r-4 border-y-4 border-y-transparent border-l-0"}},zt={dark:{tooltip:"bg-tooltip text-white",arrow:"border-t-tooltip border-r-tooltip border-b-tooltip border-l-tooltip"},light:{tooltip:"bg-surface-container-lowest text-on-surface border border-surface-container-high shadow-theme-lg",arrow:"border-t-surface-container-lowest border-r-surface-container-lowest border-b-surface-container-lowest border-l-surface-container-lowest"}};function It({content:t,position:r="top",variant:n="dark",children:a,className:s="",...o}){const i=Lt[r],l=zt[n];return e.jsxs("div",{className:["relative inline-flex group",s].filter(Boolean).join(" "),...o,children:[a,e.jsxs("div",{role:"tooltip",className:["absolute z-50 pointer-events-none","opacity-0 group-hover:opacity-100 transition-opacity duration-150","whitespace-nowrap text-xs font-medium px-2.5 py-1.5 rounded-lg",i.wrapper,l.tooltip].join(" "),children:[t,e.jsx("span",{className:["absolute w-0 h-0",i.arrow,l.arrow].join(" ")})]})]})}exports.THEME_ATTRIBUTE=w.THEME_ATTRIBUTE;exports.THEME_STORAGE_KEY=w.THEME_STORAGE_KEY;exports.colorTokens=w.colorTokens;exports.shadowTokens=w.shadowTokens;exports.Alert=ye;exports.AppNavbar=at;exports.AppShellLayout=tt;exports.AppSidebar=nt;exports.Avatar=H;exports.Badge=Le;exports.Breadcrumb=ze;exports.Button=J;exports.ButtonGroup=Ae;exports.Card=He;exports.CardFooter=De;exports.CardHeader=Fe;exports.Checkbox=te;exports.Dropdown=Ve;exports.HelpMenu=pt;exports.Icon=j;exports.Input=ie;exports.MODULE_CATALOG=ht;exports.Modal=qe;exports.ModalBody=Pe;exports.ModalFooter=Ye;exports.ModalHeader=We;exports.NavbarIconButton=D;exports.NavbarSearch=ot;exports.NavbarTitle=st;exports.NotificationsBell=it;exports.Pagination=Qe;exports.PosteIcon=oe;exports.ProgressBar=et;exports.RadierIcon=ae;exports.Radio=re;exports.Select=X;exports.SidebarItem=F;exports.SidebarSection=ce;exports.Spinner=wt;exports.Switch=ne;exports.THEME_INIT_SCRIPT=lt;exports.Tab=Mt;exports.TabList=Et;exports.TabPanel=_t;exports.Table=vt;exports.TableBody=Nt;exports.TableCell=Tt;exports.TableHead=yt;exports.TableHeaderCell=Ct;exports.TableRow=kt;exports.Tabs=Bt;exports.Textarea=ee;exports.ThemeProvider=ct;exports.Tooltip=It;exports.TubulaoIcon=se;exports.UserMenu=ft;exports.applyTheme=ue;exports.localStorageThemeStorage=de;exports.resolveModuleAccess=bt;exports.useDismiss=K;exports.useTheme=ut;