@zeo-app/design-system 0.2.1 → 0.3.1

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.
@@ -8,5 +8,17 @@ export interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
8
8
  iconLeft?: string;
9
9
  iconRight?: string;
10
10
  onIconRightClick?: () => void;
11
+ /**
12
+ * Ativa o modo numérico com unidade (ex: "kg", "%"): aplica máscara de
13
+ * decimais e exibe o sufixo quando o campo não está em foco. Quando
14
+ * definido, `value`/`defaultValue` devem ser `number | ''` e o valor
15
+ * parseado é reportado via `onValueChange` (o `onChange` nativo continua
16
+ * disparando normalmente).
17
+ */
18
+ unit?: string;
19
+ /** Casas decimais exibidas no modo `unit`. Padrão: 0. */
20
+ decimals?: number;
21
+ /** Valor numérico parseado, disparado no blur quando `unit` está definido. */
22
+ onValueChange?: (value: number | '') => void;
11
23
  }
12
24
  export declare const Input: import('react').ForwardRefExoticComponent<InputProps & import('react').RefAttributes<HTMLInputElement>>;
@@ -15,4 +15,3 @@ export * from './Spinner';
15
15
  export * from './Table';
16
16
  export * from './Tabs';
17
17
  export * from './Tooltip';
18
- export * from './UnitInput';
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("react"),ee=require("react-dom"),te={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 re({variant:t="info",title:r,children:s,onClose:n,icon:a,className:o="",...i}){const l=te[t],f=a??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:f}),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:s})]}),n&&e.jsx("button",{onClick:n,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 se={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"},ne={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"},ae={online:"bg-green-500",offline:"bg-gray-400",busy:"bg-red-500",away:"bg-yellow-400"};function oe(t){return t.split(" ").slice(0,2).map(r=>r[0]).join("").toUpperCase()}function le(t){const r=["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"],s=t.charCodeAt(0)%r.length;return r[s]}function ie({src:t,alt:r="",name:s,size:n="md",status:a,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",se[n],!t&&s?le(s):"bg-surface-container"].filter(Boolean).join(" "),children:t?e.jsx("img",{src:t,alt:r||s,className:"w-full h-full object-cover"}):s?oe(s):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",ne[n],ae[a]].filter(Boolean).join(" ")})]})}const ce={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"},de={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"},ue={sm:"px-2 py-0.5 text-xs gap-1",md:"px-2.5 py-1 text-xs gap-1.5"};function xe({variant:t="default",size:r="md",dot:s=!1,icon:n,children:a,className:o="",...i}){return e.jsxs("span",{className:["inline-flex items-center font-medium rounded-full",ce[t],ue[r],o].filter(Boolean).join(" "),...i,children:[s&&e.jsx("span",{className:`w-1.5 h-1.5 rounded-full shrink-0 ${de[t]}`}),n&&!s&&e.jsx("span",{className:"material-symbols-outlined text-[12px]",children:n}),a]})}function fe({items:t,className:r="",...s}){return e.jsx("nav",{"aria-label":"Breadcrumb",className:r,...s,children:e.jsx("ol",{className:"inline-flex items-center gap-1.5 text-sm flex-wrap",children:t.map((n,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:[n.icon&&e.jsx("span",{className:"material-symbols-outlined text-[18px] leading-none",children:n.icon}),n.label]}):e.jsxs("a",{href:n.href??"#",className:"text-on-surface-variant hover:text-zeo-orange transition-colors flex items-center gap-1",children:[n.icon&&e.jsx("span",{className:"material-symbols-outlined text-[18px] leading-none",children:n.icon}),n.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)]"},pe={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]"},A=d.forwardRef(({variant:t="primary",size:r="md",loading:s=!1,iconLeft:n,iconRight:a,fullWidth:o=!1,disabled:i,children:l,className:f="",...u},x)=>{const m=i||s;return e.jsxs("button",{ref:x,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],pe[r],o?"w-full":"",f].filter(Boolean).join(" "),...u,children:[s?e.jsx("span",{className:`material-symbols-outlined animate-spin ${_[r]}`,children:"progress_activity"}):n&&e.jsx("span",{className:`material-symbols-outlined ${_[r]}`,children:n}),l,!s&&a&&e.jsx("span",{className:`material-symbols-outlined ${_[r]}`,children:a})]})});A.displayName="Button";function be({children:t,attached:r=!1,className:s="",...n}){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",s].filter(Boolean).join(" "),...n,children:t})}const he={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"},ge={none:"",sm:"p-4",md:"p-5",lg:"p-6"};function we({variant:t="elevated",padding:r="md",children:s,className:n="",...a}){return e.jsx("div",{className:["rounded-xl overflow-hidden",he[t],n].filter(Boolean).join(" "),...a,children:e.jsx("div",{className:ge[r],children:s})})}function je({title:t,subtitle:r,action:s,icon:n,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:[n&&e.jsx("span",{className:"material-symbols-outlined text-on-surface-variant text-[24px] shrink-0",children:n}),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})]})]}),s&&e.jsx("div",{className:"shrink-0",children:s})]})}function ve({children:t,className:r="",...s}){return e.jsx("div",{className:["flex items-center justify-end gap-3 pt-4 border-t border-surface-container-high",r].filter(Boolean).join(" "),...s,children:t})}const B=8,M=4;function ye({trigger:t,items:r,align:s="right",className:n="",...a}){const[o,i]=d.useState(!1),[l,f]=d.useState(null),u=d.useRef(null),x=d.useRef(null),m=d.useCallback(()=>{var N;const c=u.current;if(!c)return;const p=c.getBoundingClientRect(),b=(N=x.current)==null?void 0:N.getBoundingClientRect(),w=(b==null?void 0:b.width)??180,h=(b==null?void 0:b.height)??0,j=window.innerHeight-p.bottom,g=p.top,C=j<h+B&&g>j?p.top-h-M:p.bottom+M,y=s==="right"?p.right-w:p.left,z=window.innerWidth-w-B,T=Math.min(Math.max(y,B),Math.max(z,B));f({top:C,left:T})},[s]);return d.useLayoutEffect(()=>{o&&m()},[o,m]),d.useEffect(()=>{if(!o)return;const c=()=>m();return window.addEventListener("scroll",c,!0),window.addEventListener("resize",c),()=>{window.removeEventListener("scroll",c,!0),window.removeEventListener("resize",c)}},[o,m]),d.useEffect(()=>{const c=p=>{var j,g;const b=p.target,w=(j=u.current)==null?void 0:j.contains(b),h=(g=x.current)==null?void 0:g.contains(b);!w&&!h&&i(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[]),d.useEffect(()=>{const c=p=>{p.key==="Escape"&&i(!1)};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[]),e.jsxs("div",{ref:u,className:["relative inline-block",n].filter(Boolean).join(" "),...a,children:[e.jsx("div",{onClick:()=>i(c=>!c),children:t}),o&&ee.createPortal(e.jsx("div",{ref:x,className:"fixed z-[100] min-w-[180px] bg-white 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((c,p)=>e.jsxs("div",{children:[e.jsxs("button",{role:"menuitem",disabled:c.disabled,onClick:()=>{var b;c.disabled||((b=c.onClick)==null||b.call(c),i(!1))},className:["w-full flex items-center gap-3 px-4 py-2.5 text-sm transition-colors text-left",c.danger?"text-error hover:bg-red-50":"text-on-surface hover:bg-surface-container-low",c.disabled?"opacity-40 cursor-not-allowed":"cursor-pointer"].filter(Boolean).join(" "),children:[c.icon&&e.jsx("span",{className:"material-symbols-outlined text-[18px] opacity-70",children:c.icon}),c.label]}),c.dividerAfter&&e.jsx("div",{className:"my-1 border-t border-surface-container-high"})]},p))}),document.body)]})}const H=d.forwardRef(({label:t,hint:r,error:s,options:n,placeholder:a,disabled:o,className:i="",id:l,...f},u)=>{const x=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:x,className:"text-sm font-medium text-on-surface",children:t}),e.jsxs("div",{className:"relative",children:[e.jsxs("select",{ref:u,id:x,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",s?"border-error":"border-outline-variant","disabled:bg-surface-container-low disabled:cursor-not-allowed disabled:opacity-60",i].filter(Boolean).join(" "),...f,children:[a&&e.jsx("option",{value:"",disabled:!0,children:a}),n.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"})]}),s&&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"}),s]}),!s&&r&&e.jsx("p",{className:"text-xs text-on-surface-variant",children:r})]})});H.displayName="Select";const q=d.forwardRef(({label:t,hint:r,error:s,disabled:n,className:a="",id:o,rows:i=4,...l},f)=>{const u=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:u,className:"text-sm font-medium text-on-surface",children:t}),e.jsx("textarea",{ref:f,id:u,rows:i,disabled:n,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",s?"border-error":"border-outline-variant","disabled:bg-surface-container-low disabled:cursor-not-allowed disabled:opacity-60",a].filter(Boolean).join(" "),...l}),s&&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"}),s]}),!s&&r&&e.jsx("p",{className:"text-xs text-on-surface-variant",children:r})]})});q.displayName="Textarea";const Ne={square:"rounded-[2px]",rounded:"rounded-[4px]",circle:"rounded-full"},D=d.forwardRef(({label:t,description:r,error:s,disabled:n,className:a="",id:o,shape:i="square",color:l="#FF6B00",...f},u)=>{const x=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:x,className:["flex items-start gap-3 cursor-pointer",n?"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:u,type:"checkbox",id:x,disabled:n,className:["absolute inset-0 w-full h-full opacity-0 cursor-pointer peer disabled:cursor-not-allowed",a].filter(Boolean).join(" "),...f}),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",Ne[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})]})]}),s&&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"}),s]})]})});D.displayName="Checkbox";const G=d.forwardRef(({label:t,description:r,disabled:s,className:n="",id:a,...o},i)=>{const l=a??`radio-${t==null?void 0:t.toLowerCase().replace(/\s+/g,"-")}`;return e.jsxs("label",{htmlFor:l,className:["flex items-start gap-3 cursor-pointer",s?"opacity-50 cursor-not-allowed":""].filter(Boolean).join(" "),children:[e.jsx("input",{ref:i,type:"radio",id:l,disabled:s,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",n].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})]})]})});G.displayName="Radio";const U=d.forwardRef(({label:t,description:r,disabled:s,className:n="",id:a,...o},i)=>{const l=a??`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",s?"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:s,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})]})]})});U.displayName="Switch";const Ce={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"},S={sm:"text-[16px]",md:"text-[18px]",lg:"text-[20px]"},V=d.forwardRef(({label:t,hint:r,error:s,inputSize:n="md",iconLeft:a,iconRight:o,onIconRightClick:i,disabled:l,className:f="",id:u,...x},m)=>{const c=u??(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:c,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 ${S[n]}`,children:a}),e.jsx("input",{ref:m,id:c,disabled:l,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",s?"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",Ce[n],a?"pl-9":"",o?"pr-9":"",f].filter(Boolean).join(" "),...x}),o&&e.jsx("span",{className:["material-symbols-outlined absolute right-3 text-on-surface-variant",S[n],i?"cursor-pointer hover:text-on-surface":"pointer-events-none"].filter(Boolean).join(" "),onClick:i,children:o})]}),s&&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"}),s]}),!s&&r&&e.jsx("p",{className:"text-xs text-on-surface-variant",children:r})]})});V.displayName="Input";const ke={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-2xl",full:"max-w-[calc(100vw-2rem)]"};function Be({open:t,onClose:r,size:s="md",children:n}){return d.useEffect(()=>{if(!t)return;const a=o=>{o.key==="Escape"&&r()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[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 backdrop-blur-sm",onClick:r,"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]",ke[s]].filter(Boolean).join(" "),children:n})]}):null}function ze({title:t,subtitle:r,onClose:s,className:n="",...a}){return e.jsxs("div",{className:["flex items-start justify-between gap-4 p-6 border-b border-surface-container-high",n].filter(Boolean).join(" "),...a,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})]}),s&&e.jsx("button",{onClick:s,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 Te({children:t,className:r="",...s}){return e.jsx("div",{className:["p-6 overflow-y-auto flex-1",r].filter(Boolean).join(" "),...s,children:t})}function $e({children:t,className:r="",...s}){return e.jsx("div",{className:["flex items-center justify-end gap-3 p-6 border-t border-surface-container-high",r].filter(Boolean).join(" "),...s,children:t})}function _e(t,r){return r<=7?Array.from({length:r},(s,n)=>n+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 Ie({currentPage:t,totalPages:r,totalItems:s,itemsPerPage:n=10,onPageChange:a,variant:o="full",className:i="",...l}){const f=_e(t,r),u=(t-1)*n+1,x=Math.min(t*n,s??t*n),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",c=`${m} w-9 h-9`,p="bg-zeo-orange text-white",b="text-on-surface-variant hover:bg-surface-container-low hover:text-on-surface",w=`${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"&&s!==void 0&&e.jsxs("p",{className:"text-sm text-on-surface-variant",children:["Mostrando ",e.jsxs("strong",{children:[u,"–",x]})," de ",e.jsx("strong",{children:s})," 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"?c+" "+b:w,children:[e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),o==="text"&&"Anterior"]}),f.map((h,j)=>h==="..."?e.jsx("span",{className:"w-9 text-center text-sm text-on-surface-variant select-none",children:"…"},`ellipsis-${j}`):e.jsx("button",{onClick:()=>a(h),"aria-current":t===h?"page":void 0,className:[c,t===h?p:b].join(" "),children:h},h)),e.jsxs("button",{onClick:()=>a(t+1),disabled:t===r,"aria-label":"Próxima página",className:o==="icon"?c+" "+b:w,children:[o==="text"&&"Próxima",e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_forward"})]})]})]})}const Le={xs:"h-1",sm:"h-1.5",md:"h-2",lg:"h-3"},Re={primary:"bg-zeo-orange",success:"bg-green-500",warning:"bg-amber-400",danger:"bg-red-500"};function Fe({value:t,max:r=100,size:s="md",variant:n="primary",label:a="none",showPercent:o=!0,title:i,className:l="",...f}){const u=Math.min(100,Math.max(0,t/r*100)),x=`${Math.round(u)}%`;return e.jsxs("div",{className:["flex flex-col gap-1.5",l].filter(Boolean).join(" "),...f,children:[(i||a==="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}),a==="outside"&&o&&e.jsx("span",{className:"text-sm font-semibold text-on-surface",children:x})]}),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",Le[s]].join(" "),children:e.jsx("div",{className:["h-full rounded-full transition-all duration-500 flex items-center justify-end pr-1",Re[n]].join(" "),style:{width:`${u}%`},children:a==="inside"&&o&&u>=20&&e.jsx("span",{className:"text-[10px] font-bold text-white leading-none",children:x})})})]})}const Ee={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"},Me={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 Se({size:t="md",variant:r="primary",label:s="Carregando...",className:n="",...a}){return e.jsx("span",{role:"status","aria-label":s,className:["inline-block rounded-full animate-spin",Ee[t],Me[r],n].filter(Boolean).join(" "),...a})}function Ae({children:t,className:r="",...s}){return e.jsx("div",{className:["overflow-x-auto rounded-xl border border-surface-container-high shadow-sm",r].filter(Boolean).join(" "),...s,children:e.jsx("table",{className:"w-full text-sm",children:t})})}function He({children:t,className:r="",...s}){return e.jsx("thead",{className:["bg-surface-container-low border-b border-surface-container-high",r].filter(Boolean).join(" "),...s,children:t})}function qe({children:t,className:r="",...s}){return e.jsx("tbody",{className:["bg-white divide-y divide-surface-container-high",r].filter(Boolean).join(" "),...s,children:t})}function De({selected:t=!1,children:r,className:s="",...n}){return e.jsx("tr",{className:["hover:bg-surface-container-low transition-colors",t?"bg-orange-50/40":"",s].filter(Boolean).join(" "),...n,children:r})}function Ge({sortable:t=!1,sorted:r=!1,onSort:s,children:n,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?s:void 0,...o,children:e.jsxs("span",{className:"inline-flex items-center gap-1",children:[n,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 Ue({muted:t=!1,mono:r=!1,children:s,className:n="",...a}){return e.jsx("td",{className:["px-4 py-3",t?"text-on-surface-variant":"text-on-surface",r?"font-mono text-xs":"",n].filter(Boolean).join(" "),...a,children:s})}const W=d.createContext(null);function I(){const t=d.useContext(W);if(!t)throw new Error("Tab must be used inside Tabs");return t}const O=d.createContext({stretch:!1});function Ve({value:t,onChange:r,variant:s="default",children:n}){return e.jsx(W.Provider,{value:{active:t,onChange:r,variant:s},children:e.jsx("div",{className:s==="vertical"?"flex gap-6":"flex flex-col gap-4",children:n})})}function We({children:t,className:r="",stretch:s=!1,...n}){const{variant:a}=I(),o={default:s?"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(O.Provider,{value:{stretch:s},children:e.jsx("div",{role:"tablist",className:[o,r].filter(Boolean).join(" "),...n,children:t})})}function Oe({value:t,label:r,icon:s,badge:n,disabled:a=!1}){const{active:o,onChange:i,variant:l}=I(),{stretch:f}=d.useContext(O),u=o===t,x="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",c=f&&l!=="vertical"?"flex-1 justify-center":"",p={default:u?"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:u?"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:u?"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"}[l];return e.jsxs("button",{role:"tab","aria-selected":u,"aria-disabled":a,disabled:a,onClick:()=>!a&&i(t),className:[x,p,c,a?m:""].filter(Boolean).join(" "),children:[s&&e.jsx("span",{className:"material-symbols-outlined text-[18px]",style:u?{fontVariationSettings:"'FILL' 1"}:void 0,children:s}),r,n!==void 0&&e.jsx("span",{className:`text-[11px] font-semibold px-1.5 py-0.5 rounded-full leading-none ${u?"bg-zeo-orange text-white":"bg-surface-container-high text-on-surface-variant"}`,children:n})]})}function Ke({value:t,children:r,className:s="",stretch:n=!1}){const{active:a}=I();return a!==t?null:e.jsx("div",{role:"tabpanel",className:[n?"flex-1":"",s].filter(Boolean).join(" "),children:r})}const Je={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"}},Qe={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 Xe({content:t,position:r="top",variant:s="dark",children:n,className:a="",...o}){const i=Je[r],l=Qe[s];return e.jsxs("div",{className:["relative inline-flex group",a].filter(Boolean).join(" "),...o,children:[n,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(" ")})]})]})}const Ye={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"};function Ze(t,r,s){if(t===""||t===void 0||t===null)return"";const n=Number(t).toFixed(r);return s?`${n} ${s}`:n}const K=d.forwardRef(({label:t,hint:r,error:s,unit:n="",decimals:a=0,value:o,defaultValue:i,onChange:l,disabled:f,placeholder:u,inputSize:x="md",id:m,name:c,min:p,max:b,step:w,required:h,className:j=""},g)=>{const L=d.useId(),C=m??L,y=o!==void 0,[z,T]=d.useState(i!==void 0?i:""),[N,R]=d.useState(!1),[$,F]=d.useState(""),J=d.useRef(null),k=y?o:z,Q=N?$:Ze(k,a,n),X=d.useCallback(()=>{R(!0),F(k===""?"":String(k))},[k]),Y=d.useCallback(()=>{R(!1);const v=parseFloat($.replace(",",".")),E=isNaN(v)?"":v;y||T(E),l==null||l(E)},[$,y,l]),Z=d.useCallback(v=>{F(v.target.value)},[]),P=d.useCallback(v=>{J.current=v,typeof g=="function"?g(v):g&&(g.current=v)},[g]);return e.jsxs("div",{className:"flex flex-col gap-1.5",children:[t&&e.jsx("label",{htmlFor:C,className:"text-sm font-medium text-on-surface",children:t}),e.jsx("input",{ref:P,id:C,name:c,type:N?"number":"text",inputMode:"decimal",value:Q,placeholder:u,disabled:f,required:h,min:p,max:b,step:w??(a>0?Math.pow(10,-a):1),onFocus:X,onBlur:Y,onChange:Z,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",s?"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","[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",Ye[x],j].filter(Boolean).join(" ")}),s&&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"}),s]}),!s&&r&&e.jsx("p",{className:"text-xs text-on-surface-variant",children:r})]})});K.displayName="UnitInput";exports.Alert=re;exports.Avatar=ie;exports.Badge=xe;exports.Breadcrumb=fe;exports.Button=A;exports.ButtonGroup=be;exports.Card=we;exports.CardFooter=ve;exports.CardHeader=je;exports.Checkbox=D;exports.Dropdown=ye;exports.Input=V;exports.Modal=Be;exports.ModalBody=Te;exports.ModalFooter=$e;exports.ModalHeader=ze;exports.Pagination=Ie;exports.ProgressBar=Fe;exports.Radio=G;exports.Select=H;exports.Spinner=Se;exports.Switch=U;exports.Tab=Oe;exports.TabList=We;exports.TabPanel=Ke;exports.Table=Ae;exports.TableBody=qe;exports.TableCell=Ue;exports.TableHead=He;exports.TableHeaderCell=Ge;exports.TableRow=De;exports.Tabs=Ve;exports.Textarea=q;exports.Tooltip=Xe;exports.UnitInput=K;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("react"),ne=require("react-dom"),ae={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 oe({variant:t="info",title:r,children:s,onClose:n,icon:a,className:o="",...c}){const i=ae[t],p=a??i.defaultIcon;return e.jsxs("div",{role:"alert",className:["flex gap-3 p-4 rounded-lg border",i.container,o].filter(Boolean).join(" "),...c,children:[e.jsx("span",{className:`material-symbols-outlined text-[20px] shrink-0 mt-0.5 ${i.icon}`,children:p}),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:s})]}),n&&e.jsx("button",{onClick:n,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 le={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"},ie={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 de(t){return t.split(" ").slice(0,2).map(r=>r[0]).join("").toUpperCase()}function ue(t){const r=["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"],s=t.charCodeAt(0)%r.length;return r[s]}function xe({src:t,alt:r="",name:s,size:n="md",status:a,className:o="",...c}){return e.jsxs("div",{className:["relative inline-flex shrink-0",o].filter(Boolean).join(" "),...c,children:[e.jsx("div",{className:["rounded-full overflow-hidden flex items-center justify-center font-semibold",le[n],!t&&s?ue(s):"bg-surface-container"].filter(Boolean).join(" "),children:t?e.jsx("img",{src:t,alt:r||s,className:"w-full h-full object-cover"}):s?de(s):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",ie[n],ce[a]].filter(Boolean).join(" ")})]})}const fe={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"},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"},pe={sm:"px-2 py-0.5 text-xs gap-1",md:"px-2.5 py-1 text-xs gap-1.5"};function be({variant:t="default",size:r="md",dot:s=!1,icon:n,children:a,className:o="",...c}){return e.jsxs("span",{className:["inline-flex items-center font-medium rounded-full",fe[t],pe[r],o].filter(Boolean).join(" "),...c,children:[s&&e.jsx("span",{className:`w-1.5 h-1.5 rounded-full shrink-0 ${me[t]}`}),n&&!s&&e.jsx("span",{className:"material-symbols-outlined text-[12px]",children:n}),a]})}function he({items:t,className:r="",...s}){return e.jsx("nav",{"aria-label":"Breadcrumb",className:r,...s,children:e.jsx("ol",{className:"inline-flex items-center gap-1.5 text-sm flex-wrap",children:t.map((n,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:[n.icon&&e.jsx("span",{className:"material-symbols-outlined text-[18px] leading-none",children:n.icon}),n.label]}):e.jsxs("a",{href:n.href??"#",className:"text-on-surface-variant hover:text-zeo-orange transition-colors flex items-center gap-1",children:[n.icon&&e.jsx("span",{className:"material-symbols-outlined text-[18px] leading-none",children:n.icon}),n.label]})]},a)})})})}const ge={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)]"},we={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"},E={sm:"text-[16px]",md:"text-[18px]",lg:"text-[20px]"},U=d.forwardRef(({variant:t="primary",size:r="md",loading:s=!1,iconLeft:n,iconRight:a,fullWidth:o=!1,disabled:c,children:i,className:p="",...u},x)=>{const b=c||s;return e.jsxs("button",{ref:x,disabled:b,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",ge[t],we[r],o?"w-full":"",p].filter(Boolean).join(" "),...u,children:[s?e.jsx("span",{className:`material-symbols-outlined animate-spin ${E[r]}`,children:"progress_activity"}):n&&e.jsx("span",{className:`material-symbols-outlined ${E[r]}`,children:n}),i,!s&&a&&e.jsx("span",{className:`material-symbols-outlined ${E[r]}`,children:a})]})});U.displayName="Button";function je({children:t,attached:r=!1,className:s="",...n}){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",s].filter(Boolean).join(" "),...n,children:t})}const ve={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"},ye={none:"",sm:"p-4",md:"p-5",lg:"p-6"};function Ne({variant:t="elevated",padding:r="md",children:s,className:n="",...a}){return e.jsx("div",{className:["rounded-xl overflow-hidden",ve[t],n].filter(Boolean).join(" "),...a,children:e.jsx("div",{className:ye[r],children:s})})}function ke({title:t,subtitle:r,action:s,icon:n,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:[n&&e.jsx("span",{className:"material-symbols-outlined text-on-surface-variant text-[24px] shrink-0",children:n}),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})]})]}),s&&e.jsx("div",{className:"shrink-0",children:s})]})}function Ce({children:t,className:r="",...s}){return e.jsx("div",{className:["flex items-center justify-end gap-3 pt-4 border-t border-surface-container-high",r].filter(Boolean).join(" "),...s,children:t})}const z=8,q=4;function Be({trigger:t,items:r,align:s="right",className:n="",...a}){const[o,c]=d.useState(!1),[i,p]=d.useState(null),u=d.useRef(null),x=d.useRef(null),b=d.useCallback(()=>{var C;const l=u.current;if(!l)return;const f=l.getBoundingClientRect(),m=(C=x.current)==null?void 0:C.getBoundingClientRect(),w=(m==null?void 0:m.width)??180,h=(m==null?void 0:m.height)??0,j=window.innerHeight-f.bottom,v=f.top,y=j<h+z&&v>j?f.top-h-q:f.bottom+q,T=s==="right"?f.right-w:f.left,$=window.innerWidth-w-z,L=Math.min(Math.max(T,z),Math.max($,z));p({top:y,left:L})},[s]);return d.useLayoutEffect(()=>{o&&b()},[o,b]),d.useEffect(()=>{if(!o)return;const l=()=>b();return window.addEventListener("scroll",l,!0),window.addEventListener("resize",l),()=>{window.removeEventListener("scroll",l,!0),window.removeEventListener("resize",l)}},[o,b]),d.useEffect(()=>{const l=f=>{var j,v;const m=f.target,w=(j=u.current)==null?void 0:j.contains(m),h=(v=x.current)==null?void 0:v.contains(m);!w&&!h&&c(!1)};return document.addEventListener("mousedown",l),()=>document.removeEventListener("mousedown",l)},[]),d.useEffect(()=>{const l=f=>{f.key==="Escape"&&c(!1)};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[]),e.jsxs("div",{ref:u,className:["relative inline-block",n].filter(Boolean).join(" "),...a,children:[e.jsx("div",{onClick:()=>c(l=>!l),children:t}),o&&ne.createPortal(e.jsx("div",{ref:x,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:r.map((l,f)=>e.jsxs("div",{children:[e.jsxs("button",{role:"menuitem",disabled:l.disabled,onClick:()=>{var m;l.disabled||((m=l.onClick)==null||m.call(l),c(!1))},className:["w-full flex items-center gap-3 px-4 py-2.5 text-sm transition-colors text-left",l.danger?"text-error hover:bg-red-50":"text-on-surface hover:bg-surface-container-low",l.disabled?"opacity-40 cursor-not-allowed":"cursor-pointer"].filter(Boolean).join(" "),children:[l.icon&&e.jsx("span",{className:"material-symbols-outlined text-[18px] opacity-70",children:l.icon}),l.label]}),l.dividerAfter&&e.jsx("div",{className:"my-1 border-t border-surface-container-high"})]},f))}),document.body)]})}const W=d.forwardRef(({label:t,hint:r,error:s,options:n,placeholder:a,disabled:o,className:c="",id:i,...p},u)=>{const x=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:x,className:"text-sm font-medium text-on-surface",children:t}),e.jsxs("div",{className:"relative",children:[e.jsxs("select",{ref:u,id:x,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",s?"border-error":"border-outline-variant","disabled:bg-surface-container-low disabled:cursor-not-allowed disabled:opacity-60",c].filter(Boolean).join(" "),...p,children:[a&&e.jsx("option",{value:"",disabled:!0,children:a}),n.map(b=>e.jsx("option",{value:b.value,disabled:b.disabled,children:b.label},b.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"})]}),s&&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"}),s]}),!s&&r&&e.jsx("p",{className:"text-xs text-on-surface-variant",children:r})]})});W.displayName="Select";const O=d.forwardRef(({label:t,hint:r,error:s,disabled:n,className:a="",id:o,rows:c=4,...i},p)=>{const u=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:u,className:"text-sm font-medium text-on-surface",children:t}),e.jsx("textarea",{ref:p,id:u,rows:c,disabled:n,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",s?"border-error":"border-outline-variant","disabled:bg-surface-container-low disabled:cursor-not-allowed disabled:opacity-60",a].filter(Boolean).join(" "),...i}),s&&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"}),s]}),!s&&r&&e.jsx("p",{className:"text-xs text-on-surface-variant",children:r})]})});O.displayName="Textarea";const ze={square:"rounded-[2px]",rounded:"rounded-[4px]",circle:"rounded-full"},K=d.forwardRef(({label:t,description:r,error:s,disabled:n,className:a="",id:o,shape:c="square",color:i="#FF6B00",...p},u)=>{const x=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:x,className:["flex items-start gap-3 cursor-pointer",n?"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:u,type:"checkbox",id:x,disabled:n,className:["absolute inset-0 w-full h-full opacity-0 cursor-pointer peer disabled:cursor-not-allowed",a].filter(Boolean).join(" "),...p}),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",ze[c]].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}),r&&e.jsx("span",{className:"text-xs text-on-surface-variant mt-0.5",children:r})]})]}),s&&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"}),s]})]})});K.displayName="Checkbox";const J=d.forwardRef(({label:t,description:r,disabled:s,className:n="",id:a,...o},c)=>{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",s?"opacity-50 cursor-not-allowed":""].filter(Boolean).join(" "),children:[e.jsx("input",{ref:c,type:"radio",id:i,disabled:s,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",n].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})]})]})});J.displayName="Radio";const Q=d.forwardRef(({label:t,description:r,disabled:s,className:n="",id:a,...o},c)=>{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",s?"opacity-50 cursor-not-allowed":""].filter(Boolean).join(" "),children:[e.jsxs("div",{className:"relative mt-0.5 shrink-0",children:[e.jsx("input",{ref:c,type:"checkbox",id:i,disabled:s,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})]})]})});Q.displayName="Switch";const Te={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"},G={sm:"text-[16px]",md:"text-[18px]",lg:"text-[20px]"};function $e(t,r,s){if(t===""||t===void 0||t===null)return"";const n=Number(t).toFixed(r);return s?`${n} ${s}`:n}const V=d.forwardRef(({label:t,hint:r,error:s,inputSize:n="md",iconLeft:a,iconRight:o,onIconRightClick:c,disabled:i,className:p="",id:u,unit:x,decimals:b,onValueChange:l,value:f,defaultValue:m,type:w,step:h,inputMode:j,onChange:v,onFocus:k,onBlur:y,...T},$)=>{const L=d.useId(),C=u??(t?t.toLowerCase().replace(/\s+/g,"-"):L),g=x!==void 0,_=b??0,I=g&&f!==void 0,[Z,P]=d.useState(typeof m=="number"?m:""),[R,F]=d.useState(!1),[M,A]=d.useState(""),B=I?f:Z,ee=g?R?M:$e(B,_,x??""):f,te=d.useCallback(N=>{g&&(F(!0),A(B===""?"":String(B))),k==null||k(N)},[g,B,k]),re=d.useCallback(N=>{if(g){F(!1);const H=parseFloat(M.replace(",",".")),D=isNaN(H)?"":H;I||P(D),l==null||l(D)}y==null||y(N)},[g,M,I,l,y]),se=d.useCallback(N=>{g&&A(N.target.value),v==null||v(N)},[g,v]);return e.jsxs("div",{className:"flex flex-col gap-1.5",children:[t&&e.jsx("label",{htmlFor:C,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 ${G[n]}`,children:a}),e.jsx("input",{ref:$,id:C,disabled:i,type:g?R?"number":"text":w,inputMode:g?"decimal":j,value:g?ee:f,defaultValue:g?void 0:m,step:g?h??(_>0?Math.pow(10,-_):1):h,onFocus:te,onBlur:re,onChange:se,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",s?"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":"",Te[n],a?"pl-9":"",o?"pr-9":"",p].filter(Boolean).join(" "),...T}),o&&e.jsx("span",{className:["material-symbols-outlined absolute right-3 text-on-surface-variant",G[n],c?"cursor-pointer hover:text-on-surface":"pointer-events-none"].filter(Boolean).join(" "),onClick:c,children:o})]}),s&&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"}),s]}),!s&&r&&e.jsx("p",{className:"text-xs text-on-surface-variant",children:r})]})});V.displayName="Input";const Le={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-2xl",full:"max-w-[calc(100vw-2rem)]"};function _e({open:t,onClose:r,size:s="md",children:n}){return d.useEffect(()=>{if(!t)return;const a=o=>{o.key==="Escape"&&r()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[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 backdrop-blur-sm",onClick:r,"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]",Le[s]].filter(Boolean).join(" "),children:n})]}):null}function Ie({title:t,subtitle:r,onClose:s,className:n="",...a}){return e.jsxs("div",{className:["flex items-start justify-between gap-4 p-6 border-b border-surface-container-high",n].filter(Boolean).join(" "),...a,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})]}),s&&e.jsx("button",{onClick:s,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 Me({children:t,className:r="",...s}){return e.jsx("div",{className:["p-6 overflow-y-auto flex-1",r].filter(Boolean).join(" "),...s,children:t})}function Ee({children:t,className:r="",...s}){return e.jsx("div",{className:["flex items-center justify-end gap-3 p-6 border-t border-surface-container-high",r].filter(Boolean).join(" "),...s,children:t})}function Se(t,r){return r<=7?Array.from({length:r},(s,n)=>n+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 Re({currentPage:t,totalPages:r,totalItems:s,itemsPerPage:n=10,onPageChange:a,variant:o="full",className:c="",...i}){const p=Se(t,r),u=(t-1)*n+1,x=Math.min(t*n,s??t*n),b="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",l=`${b} w-9 h-9`,f="bg-zeo-orange text-white",m="text-on-surface-variant hover:bg-surface-container-low hover:text-on-surface",w=`${b} 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",c].filter(Boolean).join(" "),...i,children:[o==="full"&&s!==void 0&&e.jsxs("p",{className:"text-sm text-on-surface-variant",children:["Mostrando ",e.jsxs("strong",{children:[u,"–",x]})," de ",e.jsx("strong",{children:s})," 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"?l+" "+m:w,children:[e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),o==="text"&&"Anterior"]}),p.map((h,j)=>h==="..."?e.jsx("span",{className:"w-9 text-center text-sm text-on-surface-variant select-none",children:"…"},`ellipsis-${j}`):e.jsx("button",{onClick:()=>a(h),"aria-current":t===h?"page":void 0,className:[l,t===h?f:m].join(" "),children:h},h)),e.jsxs("button",{onClick:()=>a(t+1),disabled:t===r,"aria-label":"Próxima página",className:o==="icon"?l+" "+m:w,children:[o==="text"&&"Próxima",e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_forward"})]})]})]})}const Fe={xs:"h-1",sm:"h-1.5",md:"h-2",lg:"h-3"},Ae={primary:"bg-zeo-orange",success:"bg-green-500",warning:"bg-amber-400",danger:"bg-red-500"};function He({value:t,max:r=100,size:s="md",variant:n="primary",label:a="none",showPercent:o=!0,title:c,className:i="",...p}){const u=Math.min(100,Math.max(0,t/r*100)),x=`${Math.round(u)}%`;return e.jsxs("div",{className:["flex flex-col gap-1.5",i].filter(Boolean).join(" "),...p,children:[(c||a==="outside"&&o)&&e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[c&&e.jsx("span",{className:"text-sm font-medium text-on-surface",children:c}),a==="outside"&&o&&e.jsx("span",{className:"text-sm font-semibold text-on-surface",children:x})]}),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",Fe[s]].join(" "),children:e.jsx("div",{className:["h-full rounded-full transition-all duration-500 flex items-center justify-end pr-1",Ae[n]].join(" "),style:{width:`${u}%`},children:a==="inside"&&o&&u>=20&&e.jsx("span",{className:"text-[10px] font-bold text-white leading-none",children:x})})})]})}const De={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"},qe={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 Ge({size:t="md",variant:r="primary",label:s="Carregando...",className:n="",...a}){return e.jsx("span",{role:"status","aria-label":s,className:["inline-block rounded-full animate-spin",De[t],qe[r],n].filter(Boolean).join(" "),...a})}function Ue({children:t,className:r="",...s}){return e.jsx("div",{className:["overflow-x-auto rounded-xl border border-surface-container-high shadow-sm",r].filter(Boolean).join(" "),...s,children:e.jsx("table",{className:"w-full text-sm",children:t})})}function We({children:t,className:r="",...s}){return e.jsx("thead",{className:["bg-surface-container-low border-b border-surface-container-high",r].filter(Boolean).join(" "),...s,children:t})}function Oe({children:t,className:r="",...s}){return e.jsx("tbody",{className:["bg-white divide-y divide-surface-container-high",r].filter(Boolean).join(" "),...s,children:t})}function Ke({selected:t=!1,children:r,className:s="",...n}){return e.jsx("tr",{className:["hover:bg-surface-container-low transition-colors",t?"bg-orange-50/40":"",s].filter(Boolean).join(" "),...n,children:r})}function Je({sortable:t=!1,sorted:r=!1,onSort:s,children:n,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?s:void 0,...o,children:e.jsxs("span",{className:"inline-flex items-center gap-1",children:[n,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 Qe({muted:t=!1,mono:r=!1,children:s,className:n="",...a}){return e.jsx("td",{className:["px-4 py-3",t?"text-on-surface-variant":"text-on-surface",r?"font-mono text-xs":"",n].filter(Boolean).join(" "),...a,children:s})}const X=d.createContext(null);function S(){const t=d.useContext(X);if(!t)throw new Error("Tab must be used inside Tabs");return t}const Y=d.createContext({stretch:!1});function Ve({value:t,onChange:r,variant:s="default",children:n}){return e.jsx(X.Provider,{value:{active:t,onChange:r,variant:s},children:e.jsx("div",{className:s==="vertical"?"flex gap-6":"flex flex-col gap-4",children:n})})}function Xe({children:t,className:r="",stretch:s=!1,...n}){const{variant:a}=S(),o={default:s?"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(Y.Provider,{value:{stretch:s},children:e.jsx("div",{role:"tablist",className:[o,r].filter(Boolean).join(" "),...n,children:t})})}function Ye({value:t,label:r,icon:s,badge:n,disabled:a=!1}){const{active:o,onChange:c,variant:i}=S(),{stretch:p}=d.useContext(Y),u=o===t,x="inline-flex items-center gap-2 font-medium text-sm transition-all duration-200 select-none focus:outline-none",b="opacity-40 cursor-not-allowed pointer-events-none",l=p&&i!=="vertical"?"flex-1 justify-center":"",f={default:u?"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:u?"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:u?"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":u,"aria-disabled":a,disabled:a,onClick:()=>!a&&c(t),className:[x,f,l,a?b:""].filter(Boolean).join(" "),children:[s&&e.jsx("span",{className:"material-symbols-outlined text-[18px]",style:u?{fontVariationSettings:"'FILL' 1"}:void 0,children:s}),r,n!==void 0&&e.jsx("span",{className:`text-[11px] font-semibold px-1.5 py-0.5 rounded-full leading-none ${u?"bg-zeo-orange text-white":"bg-surface-container-high text-on-surface-variant"}`,children:n})]})}function Ze({value:t,children:r,className:s="",stretch:n=!1}){const{active:a}=S();return a!==t?null:e.jsx("div",{role:"tabpanel",className:[n?"flex-1":"",s].filter(Boolean).join(" "),children:r})}const Pe={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"}},et={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 tt({content:t,position:r="top",variant:s="dark",children:n,className:a="",...o}){const c=Pe[r],i=et[s];return e.jsxs("div",{className:["relative inline-flex group",a].filter(Boolean).join(" "),...o,children:[n,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",c.wrapper,i.tooltip].join(" "),children:[t,e.jsx("span",{className:["absolute w-0 h-0",c.arrow,i.arrow].join(" ")})]})]})}exports.Alert=oe;exports.Avatar=xe;exports.Badge=be;exports.Breadcrumb=he;exports.Button=U;exports.ButtonGroup=je;exports.Card=Ne;exports.CardFooter=Ce;exports.CardHeader=ke;exports.Checkbox=K;exports.Dropdown=Be;exports.Input=V;exports.Modal=_e;exports.ModalBody=Me;exports.ModalFooter=Ee;exports.ModalHeader=Ie;exports.Pagination=Re;exports.ProgressBar=He;exports.Radio=J;exports.Select=W;exports.Spinner=Ge;exports.Switch=Q;exports.Tab=Ye;exports.TabList=Xe;exports.TabPanel=Ze;exports.Table=Ue;exports.TableBody=Oe;exports.TableCell=Qe;exports.TableHead=We;exports.TableHeaderCell=Je;exports.TableRow=Ke;exports.Tabs=Ve;exports.Textarea=O;exports.Tooltip=tt;