@sbkbs/ui 1.0.5 → 1.0.6

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,2 +1,2 @@
1
- (function(f,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("react/jsx-runtime"),require("react"),require("clsx"),require("tailwind-merge")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","clsx","tailwind-merge"],e):(f=typeof globalThis<"u"?globalThis:f||self,e(f.OficiosUI={},f.jsxRuntime,f.React,f.clsx,f.twMerge))})(this,(function(f,e,u,G,Q){"use strict";const b=(...r)=>Q.twMerge(G.clsx(r)),Y=({items:r,defaultOpenId:a})=>{const[t,s]=u.useState(a??null),o=u.useRef(null);return e.jsx("div",{className:"grid gap-2",ref:o,children:r.map(n=>{const i=t===n.id,c=`accordion-trigger-${n.id}`,v=`accordion-panel-${n.id}`;return e.jsxs("div",{className:"overflow-hidden rounded-[var(--border-radius-md)] border border-[var(--border-color)]",children:[e.jsxs("button",{"aria-controls":v,"aria-expanded":i,className:"flex w-full items-center justify-between bg-[var(--bg-secondary)] px-4 py-3 text-left text-sm font-medium text-[var(--text-primary)] hover:bg-[var(--bg-hover)]",id:c,onKeyDown:l=>{var x,p,z,h;if(!o.current)return;const d=Array.from(o.current.querySelectorAll('[id^="accordion-trigger-"]')),m=d.findIndex(N=>N.id===c);m===-1||d.length===0||(l.key==="ArrowDown"?(l.preventDefault(),(x=d[(m+1)%d.length])==null||x.focus()):l.key==="ArrowUp"?(l.preventDefault(),(p=d[(m-1+d.length)%d.length])==null||p.focus()):l.key==="Home"?(l.preventDefault(),(z=d[0])==null||z.focus()):l.key==="End"&&(l.preventDefault(),(h=d[d.length-1])==null||h.focus()))},onClick:()=>s(l=>l===n.id?null:n.id),type:"button",children:[n.title,e.jsx("span",{className:b("transition",i?"rotate-180":""),children:"⌄"})]}),i&&e.jsx("div",{"aria-labelledby":c,className:"bg-[var(--bg-tertiary)] px-4 py-3 text-sm text-[var(--text-secondary)]",id:v,role:"region",children:n.content})]},n.id)})})},I=({items:r,separator:a="/",className:t,...s})=>e.jsx("nav",{"aria-label":"Breadcrumb",className:b("flex items-center",t),...s,children:e.jsx("ol",{className:"flex flex-wrap items-center gap-1 text-sm",children:r.map((o,n)=>{const i=n===r.length-1;return e.jsxs("li",{className:"flex items-center gap-1",children:[n>0&&e.jsx("span",{"aria-hidden":"true",className:"select-none text-[var(--text-muted)]",children:a}),i?e.jsx("span",{"aria-current":"page",className:"font-medium text-[var(--text-primary)]",children:o.label}):o.href?e.jsx("a",{className:"text-[var(--md-primary)] transition hover:underline focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--border-color-focus)]",href:o.href,children:o.label}):e.jsx("span",{className:"text-[var(--text-secondary)]",children:o.label})]},n)})})});I.displayName="Breadcrumb";const D=({label:r,helperText:a,error:t,options:s,value:o,onChange:n,placeholder:i="Selecione ou pesquise...",disabled:c=!1,className:v})=>{const[l,d]=u.useState(""),[m,x]=u.useState(!1),[p,z]=u.useState(-1),h=u.useRef(null),N=u.useRef(null),y=u.useRef(null),M=s.find(g=>g.value===o),k=l?s.filter(g=>g.label.toLowerCase().includes(l.toLowerCase())):s,w=m?l:(M==null?void 0:M.label)??"";u.useEffect(()=>{const g=C=>{h.current&&!h.current.contains(C.target)&&(x(!1),d(""))};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[]);const S=g=>{var C;n==null||n(g.value),d(""),x(!1),(C=N.current)==null||C.blur()},j=g=>{if(!m){(g.key==="ArrowDown"||g.key==="Enter")&&(x(!0),z(0),g.preventDefault());return}g.key==="ArrowDown"?(g.preventDefault(),z(C=>Math.min(C+1,k.length-1))):g.key==="ArrowUp"?(g.preventDefault(),z(C=>Math.max(C-1,0))):g.key==="Enter"?(g.preventDefault(),p>=0&&k[p]&&S(k[p])):g.key==="Escape"&&(x(!1),d(""))},E=`combobox-${Math.random().toString(36).slice(2,9)}`,$=`${E}-list`;return e.jsxs("div",{className:b("flex flex-col gap-[var(--spacing-xs)]",v),ref:h,children:[r&&e.jsx("label",{className:"text-[var(--font-size-sm)] font-[var(--font-weight-semibold)] text-[var(--md-on-surface)]",htmlFor:E,children:r}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{ref:N,"aria-activedescendant":p>=0?`${E}-option-${p}`:void 0,"aria-autocomplete":"list","aria-controls":$,"aria-describedby":t?`${E}-error`:a?`${E}-helper`:void 0,"aria-expanded":m,"aria-invalid":t?!0:void 0,autoComplete:"off",className:b("w-full rounded-[var(--border-radius-md)] border border-[var(--md-outline-variant)] bg-[var(--md-surface)] px-3.5 py-2 text-[var(--font-size-base)] text-[var(--md-on-surface)] outline-none transition placeholder:text-[var(--md-on-surface-variant)] placeholder:opacity-70 focus:border-[var(--border-color-focus)] focus:[box-shadow:0_0_0_0.1875rem_rgba(47,93,140,0.15)] disabled:cursor-not-allowed disabled:opacity-60",t&&"border-[var(--md-error)]"),disabled:c,id:E,placeholder:i,role:"combobox",type:"text",value:w,onChange:g=>{d(g.target.value),x(!0),z(0)},onFocus:()=>x(!0),onKeyDown:j}),e.jsx("span",{"aria-hidden":"true",className:b("pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-[var(--text-muted)] transition",m&&"rotate-180"),children:e.jsx("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:e.jsx("path",{d:"m6 9 6 6 6-6",strokeLinecap:"round",strokeLinejoin:"round"})})}),m&&k.length>0&&e.jsx("ul",{ref:y,className:"absolute z-[var(--z-index-dropdown)] mt-1 max-h-60 w-full overflow-auto rounded-[var(--border-radius-md)] border border-[var(--md-outline-variant)] bg-[var(--md-surface)] py-1 shadow-[var(--shadow-md)]",id:$,role:"listbox",children:k.map((g,C)=>e.jsx("li",{"aria-selected":g.value===o,className:b("cursor-pointer px-3.5 py-2 text-sm transition",C===p?"bg-[var(--md-primary)] text-[var(--md-on-primary)]":g.value===o?"bg-[var(--bg-tertiary)] text-[var(--text-primary)]":"text-[var(--text-primary)] hover:bg-[var(--bg-hover)]"),id:`${E}-option-${C}`,role:"option",onMouseDown:Se=>{Se.preventDefault(),S(g)},onMouseEnter:()=>z(C),children:g.label},g.value))}),m&&k.length===0&&e.jsx("div",{className:"absolute z-[var(--z-index-dropdown)] mt-1 w-full rounded-[var(--border-radius-md)] border border-[var(--md-outline-variant)] bg-[var(--md-surface)] px-3.5 py-3 text-sm text-[var(--text-muted)] shadow-[var(--shadow-md)]",children:"Nenhum resultado encontrado."})]}),t&&e.jsx("span",{className:"text-[var(--font-size-xs)] text-[var(--md-error)]",id:`${E}-error`,role:"alert",children:t}),a&&!t&&e.jsx("span",{className:"text-[var(--font-size-xs)] text-[var(--md-on-surface-variant)]",id:`${E}-helper`,children:a})]})};D.displayName="Combobox";const T=({label:r,helperText:a,error:t,accept:s,multiple:o=!1,maxSizeBytes:n,disabled:i=!1,onChange:c,className:v})=>{const l=u.useRef(null),[d,m]=u.useState(!1),[x,p]=u.useState(null),z=w=>{if(!w)return;const S=Array.from(w);if(n){const j=S.find(E=>E.size>n);if(j){const E=(n/1024/1024).toFixed(0);p(`Arquivo "${j.name}" excede o tamanho máximo de ${E} MB.`);return}}p(null),c==null||c(S)},h=w=>{w.preventDefault(),i||m(!0)},N=()=>m(!1),y=w=>{w.preventDefault(),m(!1),i||z(w.dataTransfer.files)},M=w=>{var S;(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),(S=l.current)==null||S.click())},k=t??x;return e.jsxs("div",{className:b("flex flex-col gap-[var(--spacing-xs)]",v),children:[r&&e.jsx("span",{className:"text-[var(--font-size-sm)] font-[var(--font-weight-semibold)] text-[var(--md-on-surface)]",children:r}),e.jsxs("div",{"aria-disabled":i,className:b("flex cursor-pointer flex-col items-center justify-center gap-2 rounded-[var(--border-radius-lg)] border-2 border-dashed p-8 text-center transition",d?"border-[var(--md-primary)] bg-[var(--md-primary-container)]":"border-[var(--md-outline-variant)] hover:border-[var(--md-primary)] hover:bg-[var(--bg-tertiary)]",k&&"border-[var(--md-error)]",i&&"pointer-events-none cursor-not-allowed opacity-60"),onClick:()=>{var w;return!i&&((w=l.current)==null?void 0:w.click())},onDragLeave:N,onDragOver:h,onDrop:y,onKeyDown:M,role:"button",tabIndex:i?-1:0,children:[e.jsx("svg",{className:"h-8 w-8 text-[var(--md-primary)]",fill:"none",stroke:"currentColor",strokeWidth:"1.5",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5",strokeLinecap:"round",strokeLinejoin:"round"})}),e.jsxs("div",{children:[e.jsxs("p",{className:"text-sm font-medium text-[var(--text-primary)]",children:["Arraste arquivos aqui ou"," ",e.jsx("span",{className:"text-[var(--md-primary)] underline",children:"clique para selecionar"})]}),s&&e.jsxs("p",{className:"mt-0.5 text-xs text-[var(--text-muted)]",children:["Formatos aceitos: ",s]}),n&&e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["Tamanho máximo: ",(n/1024/1024).toFixed(0)," MB"]})]})]}),e.jsx("input",{ref:l,accept:s,className:"sr-only",disabled:i,multiple:o,tabIndex:-1,type:"file",onChange:w=>z(w.target.files)}),k&&e.jsx("span",{className:"text-[var(--font-size-xs)] text-[var(--md-error)]",role:"alert",children:k}),a&&!k&&e.jsx("span",{className:"text-[var(--font-size-xs)] text-[var(--md-on-surface-variant)]",children:a})]})};T.displayName="FileUpload";const A=u.forwardRef(({label:r,error:a,helperText:t,size:s="md",min:o,max:n,step:i=1,onChange:c,className:v,id:l,value:d,defaultValue:m,disabled:x,...p},z)=>{const h=l||`number-input-${Math.random().toString(36).slice(2,9)}`,N=!!a,y={sm:"min-h-8 text-[var(--font-size-sm)]",md:"min-h-10 text-[var(--font-size-base)]",lg:"min-h-12 text-[var(--font-size-lg)]"},M={sm:"h-8 w-7 text-sm",md:"h-10 w-8 text-base",lg:"h-12 w-9 text-lg"},k=d!==void 0?Number(d):void 0,w=()=>{const $=(k??(m!==void 0?Number(m):0))-i;(o===void 0||$>=o)&&(c==null||c($))},S=()=>{const $=(k??(m!==void 0?Number(m):0))+i;(n===void 0||$<=n)&&(c==null||c($))},j=E=>{const $=E.target.value;c==null||c($===""?null:Number($))};return e.jsxs("div",{className:"flex flex-col gap-[var(--spacing-xs)]",children:[r&&e.jsx("label",{className:"text-[var(--font-size-sm)] font-[var(--font-weight-semibold)] text-[var(--md-on-surface)]",htmlFor:h,children:r}),e.jsxs("div",{className:b("inline-flex overflow-hidden rounded-[var(--border-radius-md)] border border-[var(--md-outline-variant)] bg-[var(--md-surface)] transition focus-within:border-[var(--border-color-focus)] focus-within:[box-shadow:0_0_0_0.1875rem_rgba(47,93,140,0.15)]",N&&"border-[var(--md-error)] focus-within:border-[var(--md-error)]",x&&"cursor-not-allowed opacity-60"),children:[e.jsx("button",{"aria-label":"Diminuir",className:b("flex shrink-0 items-center justify-center border-r border-[var(--md-outline-variant)] bg-[var(--bg-tertiary)] text-[var(--text-secondary)] transition hover:bg-[var(--bg-hover)] hover:text-[var(--text-primary)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--border-color-focus)]",M[s]),disabled:x||o!==void 0&&(k??0)<=o,onClick:w,type:"button",children:"−"}),e.jsx("input",{ref:z,"aria-describedby":a?`${h}-error`:t?`${h}-helper`:void 0,"aria-invalid":N?!0:void 0,className:b("w-full min-w-0 bg-transparent px-3 text-center text-[var(--md-on-surface)] outline-none",y[s],v),defaultValue:m,disabled:x,id:h,max:n,min:o,step:i,type:"number",value:d,onChange:j,...p}),e.jsx("button",{"aria-label":"Aumentar",className:b("flex shrink-0 items-center justify-center border-l border-[var(--md-outline-variant)] bg-[var(--bg-tertiary)] text-[var(--text-secondary)] transition hover:bg-[var(--bg-hover)] hover:text-[var(--text-primary)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--border-color-focus)]",M[s]),disabled:x||n!==void 0&&(k??0)>=n,onClick:S,type:"button",children:"+"})]}),a&&e.jsx("span",{className:"text-[var(--font-size-xs)] text-[var(--md-error)]",id:`${h}-error`,role:"alert",children:a}),t&&!a&&e.jsx("span",{className:"text-[var(--font-size-xs)] text-[var(--md-on-surface-variant)]",id:`${h}-helper`,children:t})]})});A.displayName="NumberInput";const F=({items:r,currentStep:a,orientation:t="horizontal",className:s,...o})=>{const n=r.findIndex(v=>v.id===a),i=v=>v<n?"completed":v===n?"active":"pending",c=t==="horizontal";return e.jsx("div",{"aria-label":"Progresso",className:b(c?"flex items-start":"flex flex-col",s),role:"list",...o,children:r.map((v,l)=>{const d=i(l),m=l===r.length-1;return e.jsxs("div",{className:b("flex",c?"flex-1 flex-col items-center":"gap-4"),role:"listitem",children:[e.jsxs("div",{className:b(c?"flex w-full items-center":"flex flex-col items-center"),children:[e.jsx("div",{"aria-current":d==="active"?"step":void 0,className:b("relative z-10 flex h-9 w-9 shrink-0 items-center justify-center rounded-full border-2 text-sm font-semibold transition",d==="completed"&&"border-[var(--md-primary)] bg-[var(--md-primary)] text-[var(--md-on-primary)]",d==="active"&&"border-[var(--md-primary)] bg-[var(--md-surface)] text-[var(--md-primary)]",d==="pending"&&"border-[var(--md-outline-variant)] bg-[var(--md-surface)] text-[var(--text-muted)]"),children:d==="completed"?e.jsx("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",strokeWidth:"2.5",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M20 6 9 17l-5-5",strokeLinecap:"round",strokeLinejoin:"round"})}):l+1}),!m&&e.jsx("div",{className:b("transition",c?"h-0.5 flex-1":"my-1 ml-[1.0625rem] w-0.5 flex-1",l<n?"bg-[var(--md-primary)]":"bg-[var(--md-outline-variant)]"),"aria-hidden":"true"})]}),e.jsxs("div",{className:b("mt-2 text-center",c?"":"mt-0 pb-6 text-left"),children:[e.jsx("p",{className:b("text-sm font-medium leading-tight",d==="active"&&"text-[var(--md-primary)]",d==="completed"&&"text-[var(--text-primary)]",d==="pending"&&"text-[var(--text-muted)]"),children:v.label}),v.description&&e.jsx("p",{className:"mt-0.5 text-xs text-[var(--text-muted)]",children:v.description})]})]},v.id)})})};F.displayName="Stepper";const J=({variant:r="primary",size:a="md",compact:t=!1,fullWidth:s=!1,isLoading:o=!1,leftIcon:n,rightIcon:i,children:c,className:v="",disabled:l,palette:d,style:m,...x})=>{const p="relative inline-flex select-none items-center justify-center overflow-hidden whitespace-nowrap rounded-[var(--border-radius-md)] border border-transparent font-semibold leading-none tracking-[0.01em] transition-[all_var(--transition-base)]",z="focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--md-primary)]",h="disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-60",N=s?"w-full":"",y=d==="off-white"&&r==="primary"?"border-[var(--border-color)]":"",M={xs:t?"min-h-[1.75rem] min-w-[1.75rem] gap-1 px-2 py-1 text-[var(--font-size-xs)]":"min-h-8 min-w-8 gap-1.5 px-3 py-1.5 text-[var(--font-size-xs)]",sm:t?"min-h-8 min-w-8 gap-[0.3125rem] px-2.5 py-1.5 text-[var(--font-size-sm)]":"min-h-9 min-w-9 gap-[0.4375rem] px-3.5 py-2 text-[var(--font-size-sm)]",md:t?"min-h-[2.375rem] min-w-[2.375rem] gap-1.5 px-3 py-2 text-[var(--font-size-base)]":"min-h-11 min-w-11 gap-2 px-4 py-2.5 text-[var(--font-size-base)]",lg:t?"min-h-[2.625rem] min-w-[2.625rem] gap-[0.4375rem] px-3.5 py-[0.5625rem] text-[var(--font-size-lg)]":"min-h-12 min-w-12 gap-[0.5625rem] px-6 py-4 text-[var(--font-size-lg)]",xl:t?"min-h-12 min-w-12 gap-2 px-4 py-3 text-[var(--font-size-xl)]":"min-h-14 min-w-14 gap-2.5 px-8 py-6 text-[var(--font-size-xl)]"},k={primary:"bg-[var(--md-primary)] text-[var(--md-on-primary)] shadow-[var(--shadow-sm)] hover:translate-y-[-0.125rem] hover:bg-[var(--primary-color-hover)] hover:shadow-[var(--shadow-md)]",secondary:"bg-[var(--md-secondary)] text-[var(--md-on-secondary)] shadow-[var(--shadow-sm)] hover:translate-y-[-0.125rem] hover:bg-[var(--secondary-color-light)] hover:shadow-[var(--shadow-md)]",success:"bg-[var(--success-color)] text-white shadow-[var(--shadow-sm)] hover:translate-y-[-0.125rem] hover:bg-[var(--success-color-light)] hover:shadow-[var(--shadow-md)]",error:"bg-[var(--md-error)] text-[var(--md-on-error)] shadow-[var(--shadow-sm)] hover:translate-y-[-0.125rem] hover:bg-[var(--error-color-light)] hover:shadow-[var(--shadow-md)]",warning:"bg-[var(--warning-color)] text-white shadow-[var(--shadow-sm)] hover:translate-y-[-0.125rem] hover:bg-[var(--warning-color-light)] hover:shadow-[var(--shadow-md)]",info:"bg-[var(--info-color)] text-white shadow-[var(--shadow-sm)] hover:translate-y-[-0.125rem] hover:bg-[var(--info-color-light)] hover:shadow-[var(--shadow-md)]",neutral:"bg-[var(--neutral-color)] text-white shadow-[var(--shadow-sm)] hover:translate-y-[-0.125rem] hover:bg-[var(--neutral-color-light)] hover:shadow-[var(--shadow-md)]",ghost:"border-[var(--border-color)] bg-[var(--bg-secondary)] text-[var(--md-on-surface)] shadow-[var(--shadow-xs)] hover:bg-[var(--bg-hover)] hover:text-[var(--md-primary)] hover:border-[var(--border-color-hover)]"},w={xs:t?"h-3 w-3":"h-3.5 w-3.5",sm:t?"h-3.5 w-3.5":"h-4 w-4",md:"h-[1.125rem] w-[1.125rem]",lg:"h-5 w-5",xl:"h-5 w-5"},S={"verde-vibrante":{primary:"var(--brand-verde-vibrante)",hover:"var(--brand-verde-profundo)"},"verde-profundo":{primary:"var(--brand-verde-profundo)",hover:"var(--brand-grafite-azulado)"},"grafite-azulado":{primary:"var(--brand-grafite-azulado)",hover:"var(--brand-cinza-escuro)"},"azul-acinzentado":{primary:"var(--brand-azul-acinzentado)",hover:"var(--brand-grafite-azulado)"},"cinza-medio":{primary:"var(--brand-cinza-medio)",hover:"var(--brand-cinza-escuro)"},"cinza-escuro":{primary:"var(--brand-cinza-escuro)",hover:"var(--brand-preto)"},"off-white":{primary:"var(--brand-off-white)",hover:"var(--brand-branco)",onPrimary:"var(--brand-grafite-azulado)"}},j={};d&&r==="primary"&&(j["--md-primary"]=S[d].primary,j["--primary-color-hover"]=S[d].hover,S[d].onPrimary&&(j["--md-on-primary"]=S[d].onPrimary));const E=b(p,z,h,M[a],k[r],y,N,v);return e.jsxs("button",{className:E,disabled:l||o,style:{...j,...m},...x,children:[o&&e.jsx("span",{"aria-hidden":"true",className:"absolute inline-flex h-[1em] w-[1em] animate-spin items-center justify-center",children:e.jsxs("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10",strokeOpacity:"0.25"}),e.jsx("path",{d:"M12 2 A10 10 0 0 1 22 12",strokeLinecap:"round"})]})}),!o&&n&&e.jsx("span",{className:`mr-1 inline-flex shrink-0 items-center justify-center leading-none ${w[a]}`,children:n}),!o&&e.jsx("span",{className:"btn__content inline-flex items-center justify-center",children:c}),!o&&i&&e.jsx("span",{className:`ml-1 inline-flex shrink-0 items-center justify-center leading-none ${w[a]}`,children:i})]})},X=({title:r,tone:a="info",children:t,className:s,...o})=>{const n={info:"border-[var(--info-color)]/40 bg-[var(--info-color)]/10 text-[var(--text-primary)]",success:"border-[var(--success-color)]/40 bg-[var(--success-color)]/10 text-[var(--text-primary)]",warning:"border-[var(--warning-color)]/40 bg-[var(--warning-color)]/10 text-[var(--text-primary)]",error:"border-[var(--md-error)]/40 bg-[var(--md-error)]/10 text-[var(--text-primary)]"}[a];return e.jsxs("div",{className:b("rounded-[var(--border-radius-md)] border p-4",n,s),role:"alert",...o,children:[r&&e.jsx("p",{className:"mb-1 text-sm font-semibold",children:r}),e.jsx("div",{className:"text-sm leading-relaxed",children:t})]})},Z=({size:r="md",tone:a="neutral",className:t,children:s,...o})=>{const n={neutral:"bg-[var(--bg-tertiary)] text-[var(--text-secondary)]",primary:"bg-[var(--md-primary)] text-[var(--md-on-primary)]",success:"bg-[var(--success-color)] text-white",warning:"bg-[var(--warning-color)] text-white",error:"bg-[var(--md-error)] text-[var(--md-on-error)]",info:"bg-[var(--info-color)] text-white"}[a],i=r==="sm"?"px-2 py-0.5 text-[0.6875rem]":"px-2.5 py-1 text-xs";return e.jsx("span",{className:b("inline-flex items-center rounded-full font-medium leading-none",n,i,t),...o,children:s})},R=({variant:r="default",padding:a="md",hoverable:t=!1,children:s,className:o="",...n})=>{const i="relative overflow-hidden rounded-[var(--border-radius-lg)] transition-[var(--transition-all)]",c={default:"bg-[var(--md-surface)] border border-[var(--md-outline-variant)] shadow-[var(--shadow-sm)]",elevated:"bg-[var(--md-surface)] border border-[var(--md-outline-variant)] shadow-[var(--shadow-lg)]",outlined:"bg-transparent border border-[var(--md-outline-variant)] shadow-none",flat:"bg-[var(--md-surface)] border-0 shadow-none"},v={none:"p-0",sm:"p-[var(--spacing-md)]",md:"p-[var(--spacing-lg)]",lg:"p-[var(--spacing-xl)]",xl:"p-[var(--spacing-2xl)]"},l=t?"hover:shadow-[var(--shadow-md)]":"",d=[i,c[r],v[a],l,o].filter(Boolean).join(" ");return e.jsx("div",{className:d,...n,children:s})},B=u.forwardRef(({label:r,helperText:a,className:t,id:s,...o},n)=>{const i=s||`checkbox-${Math.random().toString(36).slice(2,9)}`;return e.jsxs("label",{className:b("inline-flex cursor-pointer items-start gap-2",t),htmlFor:i,children:[e.jsx("input",{ref:n,className:"mt-0.5 h-4 w-4 rounded border-[var(--md-outline-variant)] bg-[var(--md-surface)] text-[var(--md-primary)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-[var(--border-color-focus)]",id:i,type:"checkbox",...o}),e.jsxs("span",{className:"grid gap-0.5",children:[r&&e.jsx("span",{className:"text-sm text-[var(--text-primary)]",children:r}),a&&e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a})]})]})});B.displayName="Checkbox";const ee=({selected:r=!1,className:a,children:t,...s})=>e.jsx("button",{className:b("inline-flex items-center rounded-full border px-3 py-1.5 text-sm transition",r?"border-[var(--md-primary)] bg-[color:color-mix(in_srgb,var(--md-primary)_16%,transparent)] text-[var(--md-on-surface)]":"border-[var(--border-color)] bg-[var(--bg-secondary)] text-[var(--text-secondary)] hover:bg-[var(--bg-hover)]",a),type:"button",...s,children:t}),re=({orientation:r="horizontal",className:a,...t})=>e.jsx("div",{className:b("bg-[var(--border-color)]",r==="horizontal"?"h-px w-full":"h-full w-px",a),role:"separator",...t}),ae=({icon:r,title:a,description:t,action:s,className:o,...n})=>e.jsxs("div",{className:b("grid justify-items-center gap-3 rounded-[var(--border-radius-lg)] border border-dashed border-[var(--border-color)] bg-[var(--bg-secondary)] p-6 text-center",o),...n,children:[r&&e.jsx("div",{className:"text-[var(--text-muted)]",children:r}),e.jsx("h3",{className:"m-0 text-lg font-semibold text-[var(--text-primary)]",children:a}),t&&e.jsx("p",{className:"m-0 max-w-[30rem] text-sm text-[var(--text-secondary)]",children:t}),s&&e.jsx("div",{className:"mt-1",children:s})]}),te=({poweredByText:r="Powered by",logoSrc:a,logoAlt:t="Logo",logoFallbackText:s,className:o=""})=>{const[n,i]=u.useState(!0);return e.jsx("footer",{className:["relative z-[1] flex w-full shrink-0 items-center justify-center border-t border-[var(--border-color)] bg-[var(--bg-secondary)] px-[var(--spacing-2xl)] py-[var(--spacing-lg)]",o].filter(Boolean).join(" "),children:e.jsxs("div",{className:"flex items-center gap-[var(--spacing-md)]",children:[r&&e.jsx("span",{className:"text-[0.95rem] font-normal text-[var(--text-secondary)]",children:r}),(a||s)&&e.jsxs("div",{className:"flex items-center",children:[a&&n&&e.jsx("img",{alt:t,className:"h-6 w-auto object-contain",onError:c=>{i(!1)},src:a,style:{filter:"brightness(0)"}}),s&&e.jsx("span",{className:"flex items-center text-base font-bold tracking-[0.1em] text-[var(--md-primary)]",style:{display:a&&n?"none":"flex",fontFamily:'"Orbitron", sans-serif'},children:s})]})]})})},P=()=>typeof document>"u"?"light":document.documentElement.getAttribute("data-theme")==="dark"?"dark":"light",oe=({logoSrc:r,logoDarkSrc:a,logoAlt:t="Logo",title:s,subtitle:o,theme:n,onLogoClick:i,rightContent:c,className:v=""})=>{const[l,d]=u.useState(!1),[m,x]=u.useState(()=>n??P()),p=m==="dark"&&a?a:r;u.useEffect(()=>{const N=()=>d(window.scrollY>10);return window.addEventListener("scroll",N,{passive:!0}),()=>window.removeEventListener("scroll",N)},[]),u.useEffect(()=>{if(n){x(n);return}const N=()=>x(P());if(N(),typeof MutationObserver>"u")return;const y=new MutationObserver(N);return y.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>y.disconnect()},[n]);const z=()=>i==null?void 0:i(),h=N=>{N.key==="Enter"&&(i==null||i())};return e.jsxs("header",{className:["fixed inset-x-0 top-0 z-[1000] w-full backdrop-blur-[12px]",v].filter(Boolean).join(" "),children:[e.jsx("div",{className:"h-0.5 w-full bg-[var(--md-primary)]"}),e.jsxs("div",{className:"flex items-center justify-between px-6 py-2 shadow-[var(--shadow-sm)] max-md:flex-col max-md:gap-3 max-md:px-4 max-md:py-3",style:{color:"var(--md-on-surface)",background:`color-mix(in srgb, var(--md-surface) ${l?"14%":"18%"}, transparent)`,borderBottom:`1px solid color-mix(in srgb, var(--md-outline-variant) ${l?"22%":"30%"}, transparent)`},children:[e.jsxs("div",{className:"flex cursor-pointer items-center gap-3 transition-opacity duration-200 ease-in-out hover:opacity-80",onClick:i?z:void 0,onKeyDown:i?h:void 0,role:i?"button":void 0,tabIndex:i?0:void 0,children:[p&&e.jsxs("div",{className:"flex h-16 w-16 shrink-0 items-center justify-center",children:[e.jsx("img",{alt:t,className:"h-full w-full object-contain",onError:N=>{N.target.style.display="none";const y=N.target.nextElementSibling;y&&(y.style.display="block")},src:p}),e.jsxs("svg",{className:"hidden h-full w-full",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[e.jsx("path",{d:"M12 2L2 7l10 5 10-5-10-5z"}),e.jsx("path",{d:"M2 17l10 5 10-5M2 12l10 5 10-5"})]})]}),(s||o)&&e.jsxs("div",{className:"flex flex-col gap-1",children:[s&&e.jsx("h1",{className:"m-0 inline-flex items-baseline text-[1.375rem] font-bold leading-[1.2] tracking-[0.05em] text-[var(--md-on-surface)] max-md:text-xl",style:{fontFamily:"var(--font-logo)"},children:s}),o&&e.jsx("p",{className:"m-0 text-[0.8125rem] font-normal text-[var(--md-on-surface-variant)] max-md:text-xs",children:o})]})]}),c&&e.jsx("div",{className:"flex shrink-0 items-center gap-3 max-md:w-full max-md:flex-wrap max-md:justify-between",children:c})]})]})},q=u.forwardRef(({label:r,error:a,helperText:t,leftIcon:s,rightIcon:o,fullWidth:n=!1,size:i="md",className:c,id:v,...l},d)=>{const m=v||`input-${Math.random().toString(36).substring(2,9)}`,x=!!a,z=b("w-full rounded-[var(--border-radius-md)] border border-[var(--md-outline-variant)] bg-[var(--md-surface)] font-inherit text-[var(--md-on-surface)] outline-none transition-[var(--transition-all)] placeholder:text-[var(--md-on-surface-variant)] placeholder:opacity-70 hover:not-disabled:not-focus:border-[var(--border-color-hover)] focus:border-[var(--border-color-focus)] focus:[box-shadow:0_0_0_0.1875rem_rgba(47,93,140,0.15)] disabled:cursor-not-allowed disabled:bg-[var(--md-surface-container-high)] disabled:opacity-60",x&&"border-[var(--md-error)] focus:border-[var(--md-error)] focus:[box-shadow:0_0_0_0.1875rem_rgba(186,26,26,0.2)]",{sm:"min-h-8 px-[var(--spacing-md)] py-[var(--spacing-sm)] text-[var(--font-size-sm)]",md:"min-h-10 px-[var(--spacing-lg)] py-[var(--spacing-md)] text-[var(--font-size-base)]",lg:"min-h-12 px-[var(--spacing-xl)] py-[var(--spacing-lg)] text-[var(--font-size-lg)]"}[i],s&&"pl-10",o&&"pr-10",c);return e.jsxs("div",{className:b("flex flex-col gap-[var(--spacing-xs)]",n&&"w-full"),children:[r&&e.jsx("label",{className:"text-[var(--font-size-sm)] font-[var(--font-weight-semibold)] text-[var(--md-on-surface)]",htmlFor:m,children:r}),e.jsxs("div",{className:"group relative flex w-full items-center",children:[s&&e.jsx("span",{className:"pointer-events-none absolute left-[var(--spacing-md)] z-[1] flex items-center justify-center text-[var(--md-on-surface-variant)] group-focus-within:text-[var(--md-primary)] [&_svg]:h-[1.125rem] [&_svg]:w-[1.125rem]",children:s}),e.jsx("input",{ref:d,"aria-describedby":a?`${m}-error`:t?`${m}-helper`:void 0,"aria-invalid":x?!0:void 0,className:z,id:m,...l}),o&&e.jsx("span",{className:"pointer-events-none absolute right-[var(--spacing-md)] z-[1] flex items-center justify-center text-[var(--md-on-surface-variant)] group-focus-within:text-[var(--md-primary)] [&_svg]:h-[1.125rem] [&_svg]:w-[1.125rem]",children:o})]}),a&&e.jsx("span",{className:"mt-[var(--spacing-xs)] block text-[var(--font-size-xs)] text-[var(--md-error)]",id:`${m}-error`,role:"alert",children:a}),t&&!a&&e.jsx("span",{className:"mt-[var(--spacing-xs)] block text-[var(--font-size-xs)] text-[var(--md-on-surface-variant)]",id:`${m}-helper`,children:t})]})});q.displayName="Input";const se=({size:r="lg",className:a,...t})=>{const s={sm:"max-w-2xl",md:"max-w-4xl",lg:"max-w-6xl",xl:"max-w-7xl",full:"max-w-none"}[r];return e.jsx("div",{className:b("mx-auto w-full px-4",s,a),...t})},ne=({gap:r="md",className:a,...t})=>{const s={xs:"gap-1",sm:"gap-2",md:"gap-3",lg:"gap-4",xl:"gap-6"}[r];return e.jsx("div",{className:b("flex flex-col",s,a),...t})},le=({cols:r=2,gap:a="md",className:t,...s})=>{const o={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4"}[r],n={xs:"gap-1",sm:"gap-2",md:"gap-3",lg:"gap-4",xl:"gap-6"}[a];return e.jsx("div",{className:b("grid",o,n,t),...s})},ie=({isOpen:r,onClose:a,title:t,subtitle:s,children:o,size:n="md",showCloseButton:i=!0,closeOnOverlayClick:c=!0,className:v=""})=>{const l=u.useRef(null),d=u.useRef(null);if(u.useEffect(()=>(r?(d.current=document.activeElement,document.body.style.overflow="hidden"):document.body.style.overflow="",()=>{document.body.style.overflow="",d.current&&d.current.focus()}),[r]),u.useEffect(()=>{const h=y=>{y.key==="Escape"&&r&&a()},N=y=>{if(y.key!=="Tab"||!l.current||!r)return;const M=l.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(M.length===0){y.preventDefault();return}const k=M[0],w=M[M.length-1],S=document.activeElement;y.shiftKey&&S===k?(y.preventDefault(),w.focus()):!y.shiftKey&&S===w&&(y.preventDefault(),k.focus())};return r&&(document.addEventListener("keydown",h),document.addEventListener("keydown",N),requestAnimationFrame(()=>{var M;const y=((M=l.current)==null?void 0:M.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'))??l.current;y==null||y.focus()})),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keydown",N)}},[r,a]),!r)return null;const m=h=>{c&&h.target===h.currentTarget&&a()},x=h=>{c&&(h.key==="Enter"||h.key===" ")&&h.target===h.currentTarget&&a()},z=["relative z-[var(--z-index-modal)] m-auto flex w-full max-h-[90vh] max-w-full flex-col overflow-hidden rounded-[var(--border-radius-2xl)] border border-[var(--md-outline-variant)] bg-[var(--md-surface)] shadow-[var(--shadow-2xl)]",{sm:"max-w-[25rem]",md:"max-w-[31.25rem]",lg:"max-w-[43.75rem]",xl:"max-w-[56.25rem]",full:"max-h-[90vh] max-w-[90vw]"}[n],v].filter(Boolean).join(" ");return e.jsx("div",{"aria-labelledby":t?"modal-title":void 0,"aria-modal":"true",className:"fixed inset-0 z-[var(--z-index-modal-backdrop)] flex min-h-[100dvh] items-center justify-center overflow-y-auto bg-black/50 p-[var(--spacing-lg)] backdrop-blur-[8px]",onClick:m,onKeyDown:x,role:"dialog",children:e.jsxs("div",{className:z,ref:l,tabIndex:-1,children:[(t||s||i)&&e.jsxs("div",{className:"flex shrink-0 items-start justify-between gap-[var(--spacing-lg)] border-b border-[var(--md-outline-variant)] p-[var(--spacing-2xl)]",children:[(t||s)&&e.jsxs("div",{className:"flex-1",children:[t&&e.jsx("h2",{className:"mb-[var(--spacing-xs)] mt-0 text-[var(--font-size-2xl)] font-[var(--font-weight-semibold)] leading-[var(--line-height-tight)] text-[var(--md-on-surface)]",id:"modal-title",children:t}),s&&e.jsx("p",{className:"m-0 text-[var(--font-size-base)] leading-[var(--line-height-normal)] text-[var(--md-on-surface-variant)]",children:s})]}),i&&e.jsx("button",{"aria-label":"Fechar modal",className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-[var(--border-radius-md)] border-0 bg-[var(--md-surface-container-high)] text-[var(--md-on-surface)] transition-[var(--transition-all)] hover:bg-[color:color-mix(in_srgb,var(--md-error)_15%,var(--md-surface))] hover:text-[var(--md-error)]",onClick:a,type:"button",children:e.jsxs("svg",{fill:"none",className:"h-5 w-5",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[e.jsx("line",{x1:"18",x2:"6",y1:"6",y2:"18"}),e.jsx("line",{x1:"6",x2:"18",y1:"6",y2:"18"})]})})]}),e.jsx("div",{className:"flex min-h-0 flex-1 flex-col overflow-x-hidden overflow-y-auto p-[var(--spacing-2xl)]",children:o})]})})},de=({className:r,...a})=>e.jsx("aside",{className:b("h-full rounded-[var(--border-radius-lg)] border border-[var(--border-color)] bg-[var(--bg-secondary)] p-4",r),...a}),ce=({className:r,...a})=>e.jsx("header",{className:b("flex min-h-14 items-center justify-between border-b border-[var(--border-color)] bg-[var(--bg-secondary)] px-4",r),...a}),ve=({currentPage:r,totalPages:a,onPageChange:t})=>{if(a<=1)return null;const s=Array.from({length:a},(o,n)=>n+1);return e.jsxs("nav",{"aria-label":"Paginação",className:"flex flex-wrap items-center gap-1",children:[e.jsx("button",{className:"rounded-[var(--border-radius-sm)] border border-[var(--border-color)] px-2 py-1 text-sm disabled:opacity-50",disabled:r===1,onClick:()=>t(Math.max(r-1,1)),type:"button",children:"Anterior"}),s.map(o=>e.jsx("button",{className:b("rounded-[var(--border-radius-sm)] border px-2.5 py-1 text-sm",o===r?"border-[var(--md-primary)] bg-[var(--md-primary)] text-[var(--md-on-primary)]":"border-[var(--border-color)] bg-[var(--bg-secondary)] text-[var(--text-secondary)] hover:bg-[var(--bg-hover)]"),onClick:()=>t(o),type:"button",children:o},o)),e.jsx("button",{className:"rounded-[var(--border-radius-sm)] border border-[var(--border-color)] px-2 py-1 text-sm disabled:opacity-50",disabled:r===a,onClick:()=>t(Math.min(r+1,a)),type:"button",children:"Próxima"})]})},me=({as:r="p",size:a="md",weight:t="normal",align:s="left",muted:o=!1,italic:n=!1,children:i,className:c="",...v})=>{const l=r,d={xs:"text-[var(--font-size-xs)] leading-[var(--line-height-normal)]",sm:"text-[var(--font-size-sm)] leading-[var(--line-height-normal)]",md:"text-[var(--font-size-base)] leading-[var(--line-height-relaxed)]",lg:"text-[var(--font-size-lg)] leading-[var(--line-height-loose)]"},m={light:"font-[var(--font-weight-light)]",normal:"font-[var(--font-weight-normal)]",medium:"font-[var(--font-weight-medium)]"},x={left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"},p=["m-0 text-[var(--text-primary)] transition-[var(--transition-colors)]",d[a],m[t],x[s],n?"italic":"not-italic",o?"text-[var(--text-muted)]":"",c].filter(Boolean).join(" ");return e.jsx(l,{className:p,...v,children:i})},fe=({title:r,subtitle:a,actions:t,className:s,...o})=>e.jsx("header",{className:b("grid gap-3 rounded-[var(--border-radius-lg)] border border-[var(--border-color)] bg-[var(--bg-secondary)] p-5 shadow-[var(--shadow-sm)]",s),...o,children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"grid gap-1",children:[e.jsx("h1",{className:"m-0 text-2xl font-bold text-[var(--text-primary)]",children:r}),a&&e.jsx("p",{className:"m-0 text-sm text-[var(--text-secondary)]",children:a})]}),t&&e.jsx("div",{className:"flex items-center gap-2",children:t})]})}),ue=({children:r,content:a,defaultOpen:t=!1})=>{const[s,o]=u.useState(t),n=u.useRef(null),i=u.useRef(null),c=u.useRef(null),v=u.useId();return u.useEffect(()=>{const l=d=>{var m;(m=n.current)!=null&&m.contains(d.target)||o(!1)};return document.addEventListener("mousedown",l),()=>document.removeEventListener("mousedown",l)},[]),u.useEffect(()=>{if(!s||!c.current)return;const l=c.current.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');l==null||l.focus()},[s]),u.useEffect(()=>{const l=d=>{var m;d.key==="Escape"&&(o(!1),(m=i.current)==null||m.focus())};return s&&document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[s]),e.jsxs("div",{className:"relative inline-flex",ref:n,children:[e.jsx("button",{"aria-controls":s?v:void 0,"aria-expanded":s,"aria-haspopup":"dialog",className:"inline-flex",onClick:()=>o(l=>!l),ref:i,type:"button",children:r}),s&&e.jsx("div",{className:b("absolute left-1/2 top-full z-30 mt-2 w-max -translate-x-1/2 rounded-[var(--border-radius-md)] border border-[var(--border-color)] bg-[var(--bg-secondary)] p-3 shadow-[var(--shadow-md)]"),id:v,ref:c,role:"dialog",tabIndex:-1,children:a})]})},K=u.forwardRef(({label:r,helperText:a,className:t,id:s,...o},n)=>{const i=s||`radio-${Math.random().toString(36).slice(2,9)}`;return e.jsxs("label",{className:b("inline-flex cursor-pointer items-start gap-2",t),htmlFor:i,children:[e.jsx("input",{ref:n,className:"mt-0.5 h-4 w-4 border-[var(--md-outline-variant)] bg-[var(--md-surface)] text-[var(--md-primary)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-[var(--border-color-focus)]",id:i,type:"radio",...o}),e.jsxs("span",{className:"grid gap-0.5",children:[r&&e.jsx("span",{className:"text-sm text-[var(--text-primary)]",children:r}),a&&e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a})]})]})});K.displayName="Radio";const be=({title:r,subtitle:a,actions:t,className:s,...o})=>e.jsxs("div",{className:b("flex items-start justify-between gap-4",s),...o,children:[e.jsxs("div",{className:"grid gap-1",children:[e.jsx("h2",{className:"m-0 text-xl font-semibold text-[var(--text-primary)]",children:r}),a&&e.jsx("p",{className:"m-0 text-sm text-[var(--text-secondary)]",children:a})]}),t&&e.jsx("div",{className:"flex shrink-0 items-center gap-2",children:t})]}),L=u.forwardRef(({label:r,helperText:a,error:t,options:s,size:o="md",className:n,id:i,...c},v)=>{const l=i||`select-${Math.random().toString(36).slice(2,9)}`,d={sm:"min-h-8 px-3 py-1.5 text-sm",md:"min-h-10 px-3.5 py-2 text-base",lg:"min-h-12 px-4 py-3 text-lg"}[o];return e.jsxs("div",{className:"grid gap-1",children:[r&&e.jsx("label",{className:"text-[var(--font-size-sm)] font-[var(--font-weight-semibold)] text-[var(--md-on-surface)]",htmlFor:l,children:r}),e.jsx("select",{ref:v,"aria-describedby":t?`${l}-error`:a?`${l}-helper`:void 0,"aria-invalid":t?!0:void 0,className:b("w-full rounded-[var(--border-radius-md)] border border-[var(--md-outline-variant)] bg-[var(--md-surface)] text-[var(--md-on-surface)] outline-none transition focus:border-[var(--border-color-focus)] focus:[box-shadow:0_0_0_0.1875rem_rgba(47,93,140,0.15)] disabled:cursor-not-allowed disabled:opacity-60",t&&"border-[var(--md-error)]",d,n),id:l,...c,children:s.map(m=>e.jsx("option",{value:m.value,children:m.label},m.value))}),t?e.jsx("span",{className:"text-xs text-[var(--md-error)]",id:`${l}-error`,role:"alert",children:t}):a&&e.jsx("span",{className:"text-xs text-[var(--md-on-surface-variant)]",id:`${l}-helper`,children:a})]})});L.displayName="Select";const xe=({circle:r=!1,width:a,height:t,className:s,style:o,...n})=>e.jsx("div",{className:b("animate-pulse bg-[var(--md-surface-container-high)]",r?"rounded-full":"rounded-[var(--border-radius-sm)]",s),style:{width:a,height:t,...o},...n}),he=({as:r="p",size:a="md",weight:t="normal",align:s="left",muted:o=!1,italic:n=!1,children:i,className:c="",...v})=>{const l=r,d={xs:"text-[var(--font-size-xs)]",sm:"text-[var(--font-size-sm)]",md:"text-[var(--font-size-base)]",lg:"text-[var(--font-size-lg)]"},m={normal:"font-[var(--font-weight-normal)]",medium:"font-[var(--font-weight-medium)]",semibold:"font-[var(--font-weight-semibold)]"},x={left:"text-left",center:"text-center",right:"text-right"},p=["m-0 leading-[var(--line-height-normal)] text-[var(--text-secondary)] transition-[var(--transition-colors)]",d[a],m[t],x[s],n?"italic":"not-italic",o?"text-[var(--text-muted)] opacity-80":"",c].filter(Boolean).join(" ");return e.jsx(l,{className:p,...v,children:i})},H=u.forwardRef(({checked:r=!1,onCheckedChange:a,label:t,className:s,...o},n)=>e.jsxs("div",{className:b("inline-flex items-center gap-2",s),children:[e.jsx("button",{ref:n,"aria-checked":r,className:b("relative inline-flex h-6 w-11 items-center rounded-full border transition focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--border-color-focus)]",r?"border-[var(--md-primary)] bg-[var(--md-primary)]":"border-[var(--md-outline)] bg-[var(--md-surface-container-high)]"),onClick:()=>a==null?void 0:a(!r),role:"switch",type:"button",...o,children:e.jsx("span",{className:b("inline-block h-5 w-5 rounded-full bg-[var(--md-surface)] shadow transition",r?"translate-x-5":"translate-x-0.5")})}),t&&e.jsx("span",{className:"text-sm text-[var(--text-primary)]",children:t})]}));H.displayName="Switch";const pe=({className:r,children:a,onRemove:t,...s})=>e.jsxs("span",{className:b("inline-flex items-center gap-1 rounded-[var(--border-radius-sm)] border border-[var(--border-color)] bg-[var(--bg-secondary)] px-2.5 py-1 text-xs text-[var(--text-secondary)]",r),...s,children:[a,t&&e.jsx("button",{"aria-label":"Remover tag",className:"inline-flex h-4 w-4 items-center justify-center rounded-full text-[var(--text-muted)] transition hover:bg-[var(--bg-hover)] hover:text-[var(--text-primary)]",onClick:t,type:"button",children:"×"})]}),ge=({items:r,defaultTabId:a})=>{var c;const[t,s]=u.useState(a??((c=r[0])==null?void 0:c.id)),o=r.find(v=>v.id===t)??r[0],n=Math.max(0,r.findIndex(v=>v.id===(o==null?void 0:o.id))),i=v=>{const l=r[v];if(!l)return;s(l.id);const d=document.getElementById(`tab-${l.id}`);d==null||d.focus()};return e.jsxs("div",{className:"grid gap-3",children:[e.jsx("div",{"aria-orientation":"horizontal",className:"inline-flex flex-wrap gap-1 rounded-[var(--border-radius-md)] bg-[var(--bg-tertiary)] p-1",role:"tablist",children:r.map((v,l)=>e.jsx("button",{"aria-controls":`panel-${v.id}`,"aria-selected":t===v.id,className:b("rounded-[var(--border-radius-sm)] px-3 py-1.5 text-sm transition",t===v.id?"bg-[var(--bg-secondary)] text-[var(--text-primary)] shadow-[var(--shadow-xs)]":"text-[var(--text-secondary)] hover:bg-[var(--bg-hover)]"),id:`tab-${v.id}`,onClick:()=>s(v.id),onKeyDown:d=>{d.key==="ArrowRight"?(d.preventDefault(),i((l+1)%r.length)):d.key==="ArrowLeft"?(d.preventDefault(),i((l-1+r.length)%r.length)):d.key==="Home"?(d.preventDefault(),i(0)):d.key==="End"&&(d.preventDefault(),i(r.length-1))},role:"tab",tabIndex:l===n?0:-1,type:"button",children:v.label},v.id))}),e.jsx("div",{"aria-labelledby":`tab-${(o==null?void 0:o.id)??""}`,className:"rounded-[var(--border-radius-md)] border border-[var(--border-color)] bg-[var(--bg-secondary)] p-4",id:`panel-${(o==null?void 0:o.id)??""}`,role:"tabpanel",children:o==null?void 0:o.content})]})},ye=({className:r,children:a,...t})=>e.jsx("div",{className:"overflow-x-auto rounded-[var(--border-radius-md)] border border-[var(--border-color)]",children:e.jsx("table",{className:b("w-full min-w-[36rem] border-collapse bg-[var(--bg-secondary)] text-left",r),...t,children:a})}),O=u.forwardRef(({label:r,helperText:a,error:t,className:s,id:o,...n},i)=>{const c=o||`textarea-${Math.random().toString(36).slice(2,9)}`;return e.jsxs("div",{className:"grid gap-1",children:[r&&e.jsx("label",{className:"text-[var(--font-size-sm)] font-[var(--font-weight-semibold)] text-[var(--md-on-surface)]",htmlFor:c,children:r}),e.jsx("textarea",{ref:i,"aria-describedby":t?`${c}-error`:a?`${c}-helper`:void 0,"aria-invalid":t?!0:void 0,className:b("min-h-24 w-full rounded-[var(--border-radius-md)] border border-[var(--md-outline-variant)] bg-[var(--md-surface)] px-3.5 py-2 text-[var(--md-on-surface)] outline-none transition placeholder:text-[var(--md-on-surface-variant)] focus:border-[var(--border-color-focus)] focus:[box-shadow:0_0_0_0.1875rem_rgba(47,93,140,0.15)] disabled:cursor-not-allowed disabled:opacity-60",t&&"border-[var(--md-error)] focus:border-[var(--md-error)] focus:[box-shadow:0_0_0_0.1875rem_rgba(186,26,26,0.2)]",s),id:c,...n}),t?e.jsx("span",{className:"text-xs text-[var(--md-error)]",id:`${c}-error`,role:"alert",children:t}):a&&e.jsx("span",{className:"text-xs text-[var(--md-on-surface-variant)]",id:`${c}-helper`,children:a})]})});O.displayName="Textarea";const W=({tone:r="info",title:a,description:t,onDismiss:s,className:o,...n})=>{const i={info:"border-[var(--info-color)]/40",success:"border-[var(--success-color)]/40",warning:"border-[var(--warning-color)]/40",error:"border-[var(--md-error)]/40"}[r],c=r==="error"||r==="warning"?"assertive":"polite",v=r==="error"||r==="warning"?"alert":"status";return e.jsxs("div",{className:b("w-[22rem] rounded-[var(--border-radius-md)] border bg-[var(--bg-secondary)] p-3 shadow-[var(--shadow-lg)]",i,o),"aria-atomic":"true","aria-live":c,onKeyDown:l=>{l.key==="Escape"&&(s==null||s())},role:v,tabIndex:0,...n,children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("p",{className:"m-0 text-sm font-semibold text-[var(--text-primary)]",children:a}),s&&e.jsx("button",{"aria-label":"Fechar notificação",className:"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-[var(--border-radius-sm)] text-[var(--text-secondary)] transition hover:bg-[var(--bg-hover)] hover:text-[var(--text-primary)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--border-color-focus)]",onClick:s,type:"button",children:e.jsx("span",{"aria-hidden":!0,children:"×"})})]}),t&&e.jsx("p",{className:"mt-1 text-sm text-[var(--text-secondary)]",children:t})]})},_=u.createContext(void 0),we=({children:r,durationMs:a=4e3})=>{const[t,s]=u.useState([]),o=u.useRef(new Map),n=u.useCallback(v=>{const l=o.current.get(v);l&&(window.clearTimeout(l),o.current.delete(v)),s(d=>d.filter(m=>m.id!==v))},[]),i=u.useCallback(v=>{const l=v.id??`toast-${Math.random().toString(36).slice(2,9)}`;s(m=>[...m,{...v,id:l}]);const d=window.setTimeout(()=>n(l),a);o.current.set(l,d)},[n,a]);u.useEffect(()=>{const v=o.current;return()=>{v.forEach(l=>window.clearTimeout(l)),v.clear()}},[]);const c=u.useMemo(()=>({toasts:t,pushToast:i,dismissToast:n}),[t,i,n]);return e.jsxs(_.Provider,{value:c,children:[r,e.jsx(U,{})]})},Ne=()=>{const r=u.useContext(_);if(!r)throw new Error("useToast must be used inside ToastProvider");return r},U=()=>{const r=u.useContext(_);return!r||r.toasts.length===0?null:e.jsx("div",{"aria-label":"Notificações",className:"pointer-events-none fixed bottom-4 right-4 z-[1200] grid gap-2",role:"region",children:r.toasts.map(a=>e.jsx(W,{...a,className:"pointer-events-auto",onDismiss:()=>r.dismissToast(a.id)},a.id))})},ze=({as:r="h1",size:a="2xl",weight:t="bold",align:s="left",gradient:o=!1,italic:n=!1,children:i,className:c="",...v})=>{const l=r,d={xs:"text-[var(--font-size-sm)]",sm:"text-[var(--font-size-base)]",md:"text-[var(--font-size-lg)]",lg:"text-[var(--font-size-xl)]",xl:"text-[var(--font-size-2xl)]","2xl":"text-[var(--font-size-3xl)]","3xl":"text-[var(--font-size-4xl)]","4xl":"text-[3rem]"},m={light:"font-[var(--font-weight-light)]",normal:"font-[var(--font-weight-normal)]",medium:"font-[var(--font-weight-medium)]",semibold:"font-[var(--font-weight-semibold)]",bold:"font-[var(--font-weight-bold)]",extrabold:"font-extrabold"},x={left:"text-left",center:"text-center",right:"text-right"},p=o?"bg-[linear-gradient(135deg,var(--text-primary)_0%,var(--primary-color)_50%,var(--secondary-color)_100%)] bg-clip-text text-transparent":"",z=["m-0 leading-[var(--line-height-tight)] text-[var(--text-primary)] transition-[var(--transition-colors)]",d[a],m[t],x[s],n?"italic":"not-italic",p,c].filter(Boolean).join(" ");return e.jsx(l,{className:z,...v,children:i})},ke=({children:r,content:a,side:t="top"})=>{const[s,o]=u.useState(!1),n=u.useId(),i=t==="top"?"bottom-full mb-2 left-1/2 -translate-x-1/2":"top-full mt-2 left-1/2 -translate-x-1/2",c={"aria-describedby":n,onBlur:()=>o(!1),onFocus:()=>o(!0),onKeyDown:l=>{l.key==="Escape"&&o(!1)},onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1)},v=u.isValidElement(r)?e.jsx("span",{className:"inline-flex",...c,children:r}):e.jsx("span",{className:"inline-flex",tabIndex:0,...c,children:r});return e.jsxs("span",{className:"relative inline-flex",children:[v,e.jsx("span",{"aria-hidden":!s,className:b("pointer-events-none absolute z-20 whitespace-nowrap rounded bg-[var(--brand-cinza-escuro)] px-2 py-1 text-xs text-white shadow-[var(--shadow-sm)] transition",s?"opacity-100":"opacity-0",i),id:n,role:"tooltip",children:a})]})},V=u.createContext(void 0),Ee=()=>{const r=u.useContext(V);if(!r)throw new Error("useTheme must be used within a ThemeProvider");return r},Me=({children:r,defaultTheme:a="light"})=>{const[t,s]=u.useState(()=>typeof window>"u"?a:window.localStorage.getItem("theme")||a);u.useEffect(()=>{typeof window>"u"||(window.localStorage.setItem("theme",t),document.documentElement.setAttribute("data-theme",t))},[t]);const o=()=>{s(n=>n==="dark"?"light":"dark")};return e.jsx(V.Provider,{value:{theme:t,toggleTheme:o},children:r})};f.Accordion=Y,f.Alert=X,f.Badge=Z,f.Breadcrumb=I,f.Button=J,f.Card=R,f.Checkbox=B,f.Chip=ee,f.Combobox=D,f.Container=se,f.Divider=re,f.EmptyState=ae,f.FileUpload=T,f.Footer=te,f.Grid=le,f.Header=oe,f.Input=q,f.Modal=ie,f.NumberInput=A,f.PageHeader=fe,f.Pagination=ve,f.Paragraph=me,f.Popover=ue,f.Radio=K,f.SectionHeader=be,f.Select=L,f.Sidebar=de,f.Skeleton=xe,f.Stack=ne,f.Stepper=F,f.Subtitle=he,f.Switch=H,f.Table=ye,f.Tabs=ge,f.Tag=pe,f.Textarea=O,f.ThemeProvider=Me,f.Title=ze,f.Toast=W,f.ToastProvider=we,f.ToastViewport=U,f.Tooltip=ke,f.Topbar=ce,f.useTheme=Ee,f.useToast=Ne,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(b,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("react/jsx-runtime"),require("react"),require("clsx"),require("tailwind-merge")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","clsx","tailwind-merge"],e):(b=typeof globalThis<"u"?globalThis:b||self,e(b.OficiosUI={},b.jsxRuntime,b.React,b.clsx,b.twMerge))})(this,(function(b,e,h,X,Y){"use strict";const m=(...r)=>Y.twMerge(X.clsx(r)),Z=({items:r,defaultOpenId:a})=>{const[t,s]=h.useState(a??null),o=h.useRef(null);return e.jsx("div",{className:"grid gap-2",ref:o,children:r.map(n=>{const i=t===n.id,c=`accordion-trigger-${n.id}`,v=`accordion-panel-${n.id}`;return e.jsxs("div",{className:"overflow-hidden rounded-[var(--border-radius-md)] border border-[var(--border-color)]",children:[e.jsxs("button",{"aria-controls":v,"aria-expanded":i,className:"flex w-full items-center justify-between bg-[var(--bg-secondary)] px-4 py-3 text-left text-sm font-medium text-[var(--text-primary)] hover:bg-[var(--bg-hover)]",id:c,onKeyDown:l=>{var u,p,w,x;if(!o.current)return;const d=Array.from(o.current.querySelectorAll('[id^="accordion-trigger-"]')),f=d.findIndex(k=>k.id===c);f===-1||d.length===0||(l.key==="ArrowDown"?(l.preventDefault(),(u=d[(f+1)%d.length])==null||u.focus()):l.key==="ArrowUp"?(l.preventDefault(),(p=d[(f-1+d.length)%d.length])==null||p.focus()):l.key==="Home"?(l.preventDefault(),(w=d[0])==null||w.focus()):l.key==="End"&&(l.preventDefault(),(x=d[d.length-1])==null||x.focus()))},onClick:()=>s(l=>l===n.id?null:n.id),type:"button",children:[n.title,e.jsx("span",{className:m("transition",i?"rotate-180":""),children:"⌄"})]}),i&&e.jsx("div",{"aria-labelledby":c,className:"bg-[var(--bg-tertiary)] px-4 py-3 text-sm text-[var(--text-secondary)]",id:v,role:"region",children:n.content})]},n.id)})})},D=({items:r,separator:a="/",className:t,...s})=>e.jsx("nav",{"aria-label":"Breadcrumb",className:m("flex items-center",t),...s,children:e.jsx("ol",{className:"flex flex-wrap items-center gap-1 text-sm",children:r.map((o,n)=>{const i=n===r.length-1;return e.jsxs("li",{className:"flex items-center gap-1",children:[n>0&&e.jsx("span",{"aria-hidden":"true",className:"select-none text-[var(--text-muted)]",children:a}),i?e.jsx("span",{"aria-current":"page",className:"font-medium text-[var(--text-primary)]",children:o.label}):o.href?e.jsx("a",{className:"text-[var(--md-primary)] transition hover:underline focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--border-color-focus)]",href:o.href,children:o.label}):e.jsx("span",{className:"text-[var(--text-secondary)]",children:o.label})]},n)})})});D.displayName="Breadcrumb";const _=({label:r,helperText:a,error:t,options:s,value:o,onChange:n,placeholder:i="Selecione ou pesquise...",disabled:c=!1,className:v})=>{const[l,d]=h.useState(""),[f,u]=h.useState(!1),[p,w]=h.useState(-1),x=h.useRef(null),k=h.useRef(null),N=h.useRef(null),S=s.find(g=>g.value===o),z=l?s.filter(g=>g.label.toLowerCase().includes(l.toLowerCase())):s,y=f?l:(S==null?void 0:S.label)??"";h.useEffect(()=>{const g=C=>{x.current&&!x.current.contains(C.target)&&(u(!1),d(""))};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[]);const E=g=>{var C;n==null||n(g.value),d(""),u(!1),(C=k.current)==null||C.blur()},$=g=>{if(!f){(g.key==="ArrowDown"||g.key==="Enter")&&(u(!0),w(0),g.preventDefault());return}g.key==="ArrowDown"?(g.preventDefault(),w(C=>Math.min(C+1,z.length-1))):g.key==="ArrowUp"?(g.preventDefault(),w(C=>Math.max(C-1,0))):g.key==="Enter"?(g.preventDefault(),p>=0&&z[p]&&E(z[p])):g.key==="Escape"&&(u(!1),d(""))},M=`combobox-${Math.random().toString(36).slice(2,9)}`,T=`${M}-list`;return e.jsxs("div",{className:m("flex flex-col gap-[var(--spacing-xs)]",v),ref:x,children:[r&&e.jsx("label",{className:"text-[var(--font-size-sm)] font-[var(--font-weight-semibold)] text-[var(--md-on-surface)]",htmlFor:M,children:r}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{ref:k,"aria-activedescendant":p>=0?`${M}-option-${p}`:void 0,"aria-autocomplete":"list","aria-controls":T,"aria-describedby":t?`${M}-error`:a?`${M}-helper`:void 0,"aria-expanded":f,"aria-invalid":t?!0:void 0,autoComplete:"off",className:m("w-full rounded-[var(--border-radius-md)] border border-[var(--md-outline-variant)] bg-[var(--md-surface)] px-3.5 py-2 text-[var(--font-size-base)] text-[var(--md-on-surface)] outline-none transition placeholder:text-[var(--md-on-surface-variant)] placeholder:opacity-70 focus:border-[var(--border-color-focus)] focus:[box-shadow:0_0_0_0.1875rem_rgba(47,93,140,0.15)] disabled:cursor-not-allowed disabled:opacity-60",t&&"border-[var(--md-error)]"),disabled:c,id:M,placeholder:i,role:"combobox",type:"text",value:y,onChange:g=>{d(g.target.value),u(!0),w(0)},onFocus:()=>u(!0),onKeyDown:$}),e.jsx("span",{"aria-hidden":"true",className:m("pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-[var(--text-muted)] transition",f&&"rotate-180"),children:e.jsx("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:e.jsx("path",{d:"m6 9 6 6 6-6",strokeLinecap:"round",strokeLinejoin:"round"})})}),f&&z.length>0&&e.jsx("ul",{ref:N,className:"absolute z-[var(--z-index-dropdown)] mt-1 max-h-60 w-full overflow-auto rounded-[var(--border-radius-md)] border border-[var(--md-outline-variant)] bg-[var(--md-surface)] py-1 shadow-[var(--shadow-md)]",id:T,role:"listbox",children:z.map((g,C)=>e.jsx("li",{"aria-selected":g.value===o,className:m("cursor-pointer px-3.5 py-2 text-sm transition",C===p?"bg-[var(--md-primary)] text-[var(--md-on-primary)]":g.value===o?"bg-[var(--bg-tertiary)] text-[var(--text-primary)]":"text-[var(--text-primary)] hover:bg-[var(--bg-hover)]"),id:`${M}-option-${C}`,role:"option",onMouseDown:je=>{je.preventDefault(),E(g)},onMouseEnter:()=>w(C),children:g.label},g.value))}),f&&z.length===0&&e.jsx("div",{className:"absolute z-[var(--z-index-dropdown)] mt-1 w-full rounded-[var(--border-radius-md)] border border-[var(--md-outline-variant)] bg-[var(--md-surface)] px-3.5 py-3 text-sm text-[var(--text-muted)] shadow-[var(--shadow-md)]",children:"Nenhum resultado encontrado."})]}),t&&e.jsx("span",{className:"text-[var(--font-size-xs)] text-[var(--md-error)]",id:`${M}-error`,role:"alert",children:t}),a&&!t&&e.jsx("span",{className:"text-[var(--font-size-xs)] text-[var(--md-on-surface-variant)]",id:`${M}-helper`,children:a})]})};_.displayName="Combobox";const I=({label:r,helperText:a,error:t,accept:s,multiple:o=!1,maxSizeBytes:n,disabled:i=!1,onChange:c,className:v})=>{const l=h.useRef(null),[d,f]=h.useState(!1),[u,p]=h.useState(null),w=y=>{if(!y)return;const E=Array.from(y);if(n){const $=E.find(M=>M.size>n);if($){const M=(n/1024/1024).toFixed(0);p(`Arquivo "${$.name}" excede o tamanho máximo de ${M} MB.`);return}}p(null),c==null||c(E)},x=y=>{y.preventDefault(),i||f(!0)},k=()=>f(!1),N=y=>{y.preventDefault(),f(!1),i||w(y.dataTransfer.files)},S=y=>{var E;(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),(E=l.current)==null||E.click())},z=t??u;return e.jsxs("div",{className:m("flex flex-col gap-[var(--spacing-xs)]",v),children:[r&&e.jsx("span",{className:"text-[var(--font-size-sm)] font-[var(--font-weight-semibold)] text-[var(--md-on-surface)]",children:r}),e.jsxs("div",{"aria-disabled":i,className:m("flex cursor-pointer flex-col items-center justify-center gap-2 rounded-[var(--border-radius-lg)] border-2 border-dashed p-8 text-center transition",d?"border-[var(--md-primary)] bg-[var(--md-primary-container)]":"border-[var(--md-outline-variant)] hover:border-[var(--md-primary)] hover:bg-[var(--bg-tertiary)]",z&&"border-[var(--md-error)]",i&&"pointer-events-none cursor-not-allowed opacity-60"),onClick:()=>{var y;return!i&&((y=l.current)==null?void 0:y.click())},onDragLeave:k,onDragOver:x,onDrop:N,onKeyDown:S,role:"button",tabIndex:i?-1:0,children:[e.jsx("svg",{className:"h-8 w-8 text-[var(--md-primary)]",fill:"none",stroke:"currentColor",strokeWidth:"1.5",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5",strokeLinecap:"round",strokeLinejoin:"round"})}),e.jsxs("div",{children:[e.jsxs("p",{className:"text-sm font-medium text-[var(--text-primary)]",children:["Arraste arquivos aqui ou"," ",e.jsx("span",{className:"text-[var(--md-primary)] underline",children:"clique para selecionar"})]}),s&&e.jsxs("p",{className:"mt-0.5 text-xs text-[var(--text-muted)]",children:["Formatos aceitos: ",s]}),n&&e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["Tamanho máximo: ",(n/1024/1024).toFixed(0)," MB"]})]})]}),e.jsx("input",{ref:l,accept:s,className:"sr-only",disabled:i,multiple:o,tabIndex:-1,type:"file",onChange:y=>w(y.target.files)}),z&&e.jsx("span",{className:"text-[var(--font-size-xs)] text-[var(--md-error)]",role:"alert",children:z}),a&&!z&&e.jsx("span",{className:"text-[var(--font-size-xs)] text-[var(--md-on-surface-variant)]",children:a})]})};I.displayName="FileUpload";const A=h.forwardRef(({label:r,error:a,helperText:t,size:s="md",min:o,max:n,step:i=1,onChange:c,className:v,id:l,value:d,defaultValue:f,disabled:u,...p},w)=>{const x=l||`number-input-${Math.random().toString(36).slice(2,9)}`,k=!!a,N={sm:"min-h-8 text-[var(--font-size-sm)]",md:"min-h-10 text-[var(--font-size-base)]",lg:"min-h-12 text-[var(--font-size-lg)]"},S={sm:"h-8 w-7 text-sm",md:"h-10 w-8 text-base",lg:"h-12 w-9 text-lg"},z=d!==void 0?Number(d):void 0,y=()=>{const T=(z??(f!==void 0?Number(f):0))-i;(o===void 0||T>=o)&&(c==null||c(T))},E=()=>{const T=(z??(f!==void 0?Number(f):0))+i;(n===void 0||T<=n)&&(c==null||c(T))},$=M=>{const T=M.target.value;c==null||c(T===""?null:Number(T))};return e.jsxs("div",{className:"flex flex-col gap-[var(--spacing-xs)]",children:[r&&e.jsx("label",{className:"text-[var(--font-size-sm)] font-[var(--font-weight-semibold)] text-[var(--md-on-surface)]",htmlFor:x,children:r}),e.jsxs("div",{className:m("inline-flex overflow-hidden rounded-[var(--border-radius-md)] border border-[var(--md-outline-variant)] bg-[var(--md-surface)] transition focus-within:border-[var(--border-color-focus)] focus-within:[box-shadow:0_0_0_0.1875rem_rgba(47,93,140,0.15)]",k&&"border-[var(--md-error)] focus-within:border-[var(--md-error)]",u&&"cursor-not-allowed opacity-60"),children:[e.jsx("button",{"aria-label":"Diminuir",className:m("flex shrink-0 items-center justify-center border-r border-[var(--md-outline-variant)] bg-[var(--bg-tertiary)] text-[var(--text-secondary)] transition hover:bg-[var(--bg-hover)] hover:text-[var(--text-primary)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--border-color-focus)]",S[s]),disabled:u||o!==void 0&&(z??0)<=o,onClick:y,type:"button",children:"−"}),e.jsx("input",{ref:w,"aria-describedby":a?`${x}-error`:t?`${x}-helper`:void 0,"aria-invalid":k?!0:void 0,className:m("w-full min-w-0 bg-transparent px-3 text-center text-[var(--md-on-surface)] outline-none",N[s],v),defaultValue:f,disabled:u,id:x,max:n,min:o,step:i,type:"number",value:d,onChange:$,...p}),e.jsx("button",{"aria-label":"Aumentar",className:m("flex shrink-0 items-center justify-center border-l border-[var(--md-outline-variant)] bg-[var(--bg-tertiary)] text-[var(--text-secondary)] transition hover:bg-[var(--bg-hover)] hover:text-[var(--text-primary)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--border-color-focus)]",S[s]),disabled:u||n!==void 0&&(z??0)>=n,onClick:E,type:"button",children:"+"})]}),a&&e.jsx("span",{className:"text-[var(--font-size-xs)] text-[var(--md-error)]",id:`${x}-error`,role:"alert",children:a}),t&&!a&&e.jsx("span",{className:"text-[var(--font-size-xs)] text-[var(--md-on-surface-variant)]",id:`${x}-helper`,children:t})]})});A.displayName="NumberInput";const F=({items:r,currentStep:a,orientation:t="horizontal",className:s,...o})=>{const n=r.findIndex(l=>l.id===a),i=t==="horizontal",c=l=>l<n?"completed":l===n?"active":"pending",v=l=>l?"bg-[var(--md-primary)]":"bg-[var(--md-outline-variant)]";return e.jsx("div",{"aria-label":"Progresso",className:m(i?"flex items-start":"flex flex-col",s),role:"list",...o,children:r.map((l,d)=>{const f=c(d),u=d===r.length-1;return e.jsxs("div",{className:m("flex",i?"flex-1 flex-col items-center":"gap-4"),role:"listitem",children:[e.jsxs("div",{className:m(i?"flex w-full items-center":"flex flex-col items-center"),children:[i&&(d===0?e.jsx("div",{className:"flex-1","aria-hidden":"true"}):e.jsx("div",{"aria-hidden":"true",className:m("h-0.5 flex-1 transition",v(d<=n))})),e.jsx("div",{"aria-current":f==="active"?"step":void 0,className:m("relative z-10 flex h-9 w-9 shrink-0 items-center justify-center rounded-full border-2 text-sm font-semibold transition",f==="completed"&&"border-[var(--md-primary)] bg-[var(--md-primary)] text-[var(--md-on-primary)]",f==="active"&&"border-[var(--md-primary)] bg-[var(--md-surface)] text-[var(--md-primary)]",f==="pending"&&"border-[var(--md-outline-variant)] bg-[var(--md-surface)] text-[var(--text-muted)]"),children:f==="completed"?e.jsx("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",strokeWidth:"2.5",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M20 6 9 17l-5-5",strokeLinecap:"round",strokeLinejoin:"round"})}):d+1}),i?u?e.jsx("div",{className:"flex-1","aria-hidden":"true"}):e.jsx("div",{"aria-hidden":"true",className:m("h-0.5 flex-1 transition",v(d<n))}):!u&&e.jsx("div",{"aria-hidden":"true",className:m("my-1 ml-[1.0625rem] w-0.5 flex-1 transition",v(d<n))})]}),e.jsxs("div",{className:m("mt-2 text-center",!i&&"mt-0 pb-6 text-left"),children:[e.jsx("p",{className:m("text-sm font-medium leading-tight",f==="active"&&"text-[var(--md-primary)]",f==="completed"&&"text-[var(--text-primary)]",f==="pending"&&"text-[var(--text-muted)]"),children:l.label}),l.description&&e.jsx("p",{className:"mt-0.5 text-xs text-[var(--text-muted)]",children:l.description})]})]},l.id)})})};F.displayName="Stepper";const R=({variant:r="primary",size:a="md",compact:t=!1,fullWidth:s=!1,isLoading:o=!1,leftIcon:n,rightIcon:i,children:c,className:v="",disabled:l,palette:d,style:f,...u})=>{const p="relative inline-flex select-none items-center justify-center overflow-hidden whitespace-nowrap rounded-[var(--border-radius-md)] border border-transparent font-semibold leading-none tracking-[0.01em] transition-[all_var(--transition-base)]",w="focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--md-primary)]",x="disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-60",k=s?"w-full":"",N=d==="off-white"&&r==="primary"?"border-[var(--border-color)]":"",S={xs:t?"min-h-[1.75rem] min-w-[1.75rem] gap-1 px-2 py-1 text-[var(--font-size-xs)]":"min-h-8 min-w-8 gap-1.5 px-3 py-1.5 text-[var(--font-size-xs)]",sm:t?"min-h-8 min-w-8 gap-[0.3125rem] px-2.5 py-1.5 text-[var(--font-size-sm)]":"min-h-9 min-w-9 gap-[0.4375rem] px-3.5 py-2 text-[var(--font-size-sm)]",md:t?"min-h-[2.375rem] min-w-[2.375rem] gap-1.5 px-3 py-2 text-[var(--font-size-base)]":"min-h-11 min-w-11 gap-2 px-4 py-2.5 text-[var(--font-size-base)]",lg:t?"min-h-[2.625rem] min-w-[2.625rem] gap-[0.4375rem] px-3.5 py-[0.5625rem] text-[var(--font-size-lg)]":"min-h-12 min-w-12 gap-[0.5625rem] px-6 py-4 text-[var(--font-size-lg)]",xl:t?"min-h-12 min-w-12 gap-2 px-4 py-3 text-[var(--font-size-xl)]":"min-h-14 min-w-14 gap-2.5 px-8 py-6 text-[var(--font-size-xl)]"},z={primary:"bg-[var(--md-primary)] text-[var(--md-on-primary)] shadow-[var(--shadow-sm)] hover:translate-y-[-0.125rem] hover:bg-[var(--primary-color-hover)] hover:shadow-[var(--shadow-md)]",secondary:"bg-[var(--md-secondary)] text-[var(--md-on-secondary)] shadow-[var(--shadow-sm)] hover:translate-y-[-0.125rem] hover:bg-[var(--secondary-color-light)] hover:shadow-[var(--shadow-md)]",success:"bg-[var(--success-color)] text-white shadow-[var(--shadow-sm)] hover:translate-y-[-0.125rem] hover:bg-[var(--success-color-light)] hover:shadow-[var(--shadow-md)]",error:"bg-[var(--md-error)] text-[var(--md-on-error)] shadow-[var(--shadow-sm)] hover:translate-y-[-0.125rem] hover:bg-[var(--error-color-light)] hover:shadow-[var(--shadow-md)]",warning:"bg-[var(--warning-color)] text-white shadow-[var(--shadow-sm)] hover:translate-y-[-0.125rem] hover:bg-[var(--warning-color-light)] hover:shadow-[var(--shadow-md)]",info:"bg-[var(--info-color)] text-white shadow-[var(--shadow-sm)] hover:translate-y-[-0.125rem] hover:bg-[var(--info-color-light)] hover:shadow-[var(--shadow-md)]",neutral:"bg-[var(--neutral-color)] text-white shadow-[var(--shadow-sm)] hover:translate-y-[-0.125rem] hover:bg-[var(--neutral-color-light)] hover:shadow-[var(--shadow-md)]",ghost:"border-[var(--border-color)] bg-[var(--bg-secondary)] text-[var(--md-on-surface)] shadow-[var(--shadow-xs)] hover:bg-[var(--bg-hover)] hover:text-[var(--md-primary)] hover:border-[var(--border-color-hover)]"},y={xs:t?"h-3 w-3":"h-3.5 w-3.5",sm:t?"h-3.5 w-3.5":"h-4 w-4",md:"h-[1.125rem] w-[1.125rem]",lg:"h-5 w-5",xl:"h-5 w-5"},E={"verde-vibrante":{primary:"var(--brand-verde-vibrante)",hover:"var(--brand-verde-profundo)"},"verde-profundo":{primary:"var(--brand-verde-profundo)",hover:"var(--brand-grafite-azulado)"},"grafite-azulado":{primary:"var(--brand-grafite-azulado)",hover:"var(--brand-cinza-escuro)"},"azul-acinzentado":{primary:"var(--brand-azul-acinzentado)",hover:"var(--brand-grafite-azulado)"},"cinza-medio":{primary:"var(--brand-cinza-medio)",hover:"var(--brand-cinza-escuro)"},"cinza-escuro":{primary:"var(--brand-cinza-escuro)",hover:"var(--brand-preto)"},"off-white":{primary:"var(--brand-off-white)",hover:"var(--brand-branco)",onPrimary:"var(--brand-grafite-azulado)"}},$={};d&&r==="primary"&&($["--md-primary"]=E[d].primary,$["--primary-color-hover"]=E[d].hover,E[d].onPrimary&&($["--md-on-primary"]=E[d].onPrimary));const M=m(p,w,x,S[a],z[r],N,k,v);return e.jsxs("button",{className:M,disabled:l||o,style:{...$,...f},...u,children:[o&&e.jsx("span",{"aria-hidden":"true",className:"absolute inline-flex h-[1em] w-[1em] animate-spin items-center justify-center",children:e.jsxs("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10",strokeOpacity:"0.25"}),e.jsx("path",{d:"M12 2 A10 10 0 0 1 22 12",strokeLinecap:"round"})]})}),!o&&n&&e.jsx("span",{className:`mr-1 inline-flex shrink-0 items-center justify-center leading-none ${y[a]}`,children:n}),!o&&e.jsx("span",{className:"btn__content inline-flex items-center justify-center",children:c}),!o&&i&&e.jsx("span",{className:`ml-1 inline-flex shrink-0 items-center justify-center leading-none ${y[a]}`,children:i})]})},ee=({title:r,tone:a="info",children:t,className:s,...o})=>{const n={info:"border-[var(--info-color)]/40 bg-[var(--info-color)]/10 text-[var(--text-primary)]",success:"border-[var(--success-color)]/40 bg-[var(--success-color)]/10 text-[var(--text-primary)]",warning:"border-[var(--warning-color)]/40 bg-[var(--warning-color)]/10 text-[var(--text-primary)]",error:"border-[var(--md-error)]/40 bg-[var(--md-error)]/10 text-[var(--text-primary)]"}[a];return e.jsxs("div",{className:m("rounded-[var(--border-radius-md)] border p-4",n,s),role:"alert",...o,children:[r&&e.jsx("p",{className:"mb-1 text-sm font-semibold",children:r}),e.jsx("div",{className:"text-sm leading-relaxed",children:t})]})},re=({size:r="md",tone:a="neutral",className:t,children:s,...o})=>{const n={neutral:"bg-[var(--bg-tertiary)] text-[var(--text-secondary)]",primary:"bg-[var(--md-primary)] text-[var(--md-on-primary)]",success:"bg-[var(--success-color)] text-white",warning:"bg-[var(--warning-color)] text-white",error:"bg-[var(--md-error)] text-[var(--md-on-error)]",info:"bg-[var(--info-color)] text-white"}[a],i=r==="sm"?"px-2 py-0.5 text-[0.6875rem]":"px-2.5 py-1 text-xs";return e.jsx("span",{className:m("inline-flex items-center rounded-full font-medium leading-none",n,i,t),...o,children:s})},ae=({variant:r="default",padding:a="md",hoverable:t=!1,children:s,className:o="",...n})=>{const i="relative overflow-hidden rounded-[var(--border-radius-lg)] transition-[var(--transition-all)]",c={default:"bg-[var(--md-surface)] border border-[var(--md-outline-variant)] shadow-[var(--shadow-sm)]",elevated:"bg-[var(--md-surface)] border border-[var(--md-outline-variant)] shadow-[var(--shadow-lg)]",outlined:"bg-transparent border border-[var(--md-outline-variant)] shadow-none",flat:"bg-[var(--md-surface)] border-0 shadow-none"},v={none:"p-0",sm:"p-[var(--spacing-md)]",md:"p-[var(--spacing-lg)]",lg:"p-[var(--spacing-xl)]",xl:"p-[var(--spacing-2xl)]"},l=t?"hover:shadow-[var(--shadow-md)]":"",d=[i,c[r],v[a],l,o].filter(Boolean).join(" ");return e.jsx("div",{className:d,...n,children:s})},B=h.forwardRef(({label:r,helperText:a,className:t,id:s,...o},n)=>{const i=s||`checkbox-${Math.random().toString(36).slice(2,9)}`;return e.jsxs("label",{className:m("inline-flex cursor-pointer items-start gap-2",t),htmlFor:i,children:[e.jsx("input",{ref:n,className:"mt-0.5 h-4 w-4 rounded border-[var(--md-outline-variant)] bg-[var(--md-surface)] text-[var(--md-primary)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-[var(--border-color-focus)]",id:i,type:"checkbox",...o}),e.jsxs("span",{className:"grid gap-0.5",children:[r&&e.jsx("span",{className:"text-sm text-[var(--text-primary)]",children:r}),a&&e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a})]})]})});B.displayName="Checkbox";const te=({selected:r=!1,className:a,children:t,...s})=>e.jsx("button",{className:m("inline-flex items-center rounded-full border px-3 py-1.5 text-sm transition",r?"border-[var(--md-primary)] bg-[color:color-mix(in_srgb,var(--md-primary)_16%,transparent)] text-[var(--md-on-surface)]":"border-[var(--border-color)] bg-[var(--bg-secondary)] text-[var(--text-secondary)] hover:bg-[var(--bg-hover)]",a),type:"button",...s,children:t}),oe=({orientation:r="horizontal",className:a,...t})=>e.jsx("div",{className:m("bg-[var(--border-color)]",r==="horizontal"?"h-px w-full":"h-full w-px",a),role:"separator",...t}),se=({icon:r,title:a,description:t,action:s,className:o,...n})=>e.jsxs("div",{className:m("grid justify-items-center gap-3 rounded-[var(--border-radius-lg)] border border-dashed border-[var(--border-color)] bg-[var(--bg-secondary)] p-6 text-center",o),...n,children:[r&&e.jsx("div",{className:"text-[var(--text-muted)]",children:r}),e.jsx("h3",{className:"m-0 text-lg font-semibold text-[var(--text-primary)]",children:a}),t&&e.jsx("p",{className:"m-0 max-w-[30rem] text-sm text-[var(--text-secondary)]",children:t}),s&&e.jsx("div",{className:"mt-1",children:s})]}),K=()=>typeof document>"u"?"light":document.documentElement.getAttribute("data-theme")==="dark"?"dark":"light",ne=({color:r,height:a=28,opacity:t=1})=>{const o=Math.round(a*2.098961562306262);return e.jsx("svg",{"aria-label":"SBK",height:a,style:{opacity:t},viewBox:"39.15 180.84 541.7 258.08",width:o,xmlns:"http://www.w3.org/2000/svg",children:e.jsx("g",{transform:"translate(-49, 122)",children:e.jsxs("g",{children:[e.jsxs("g",{children:[e.jsx("path",{d:"m225.13 266.26c-27.48 0-47.67-12.07-50.38-41.01h14.16c0.62 21.44 17.69 29.56 36.85 29.56 18.11 0 39.14-7.91 39.14-29.14 0-16.24-13.12-23.74-32.48-29.99l-11.03-3.53c-24.36-7.71-42.27-16.66-42.27-40.19 0-28.1 24.78-39.97 49.76-39.97 22.9 0 46.64 8.54 47.05 35.18h-13.95c-1.87-18.32-15.82-23.94-32.47-23.94-17.29 0-36.65 7.71-36.65 27.69 0 14.78 11.04 22.28 34.36 29.77l12.49 3.96c24.36 7.7 38.3 15.82 38.93 38.73 0 30.18-26.65 42.88-53.51 42.88z",fill:r,stroke:r,strokeMiterlimit:10,strokeWidth:2}),e.jsx("path",{d:"m351.42 264.39h-41.43v-150.53h41.43c8.53 0 17.9-0.2 26.23 2.09 16.24 4.58 27.48 17.9 27.48 35.18 0 18.74-10.41 29.98-27.9 34.56 20.82 2.71 34.15 15.2 34.15 36.85 0 34.56-31.86 41.85-59.96 41.85zm8.12-138.45h-36.02v56.49h32.06c19.16 0 34.98-8.81 34.98-30.26 0-18.74-14.16-26.23-31.02-26.23zm-1.46 63.19h-34.56v63.18h26.65c21.86 0 46.84-1.45 46.84-29.98 0-24.77-18.11-33.2-38.93-33.2z",fill:r,fillRule:"evenodd",stroke:r,strokeMiterlimit:10,strokeWidth:2}),e.jsx("path",{d:"m443.77 264.39v-150.53h13.53v150.53zm88.07 0l-73.7-81.61 67.03-68.92h18.12l-68.91 67.88 75.99 82.65z",fill:r,stroke:r,strokeMiterlimit:10,strokeWidth:2})]}),e.jsxs("g",{children:[e.jsx("path",{d:"m99.09 118.17l-0.21 57.98-9.73 0.24 0.56-62.81c0.26-29.03 26.91-53.16 56.3-53.26l151.74-0.48c0.62 3.58 0.63 6.35 0.05 9.92l-150.35 0.22c-26.28 0.04-48.26 21.9-48.36 48.19z",fill:r}),e.jsx("path",{d:"m419.9 315.79l0.22-9.33 149.3-0.15c25.73-0.02 48.97-20.27 49.14-45.96l0.4-60.49q4.64-0.28 9.57-0.07l0.32 52.61c0.21 33.16-23.62 63.29-57.93 63.33l-135.88 0.19z",fill:r})]})]})})})},q=({poweredByText:r="Powered by",logoSrc:a,logoAlt:t="SBK",className:s=""})=>{const[o,n]=h.useState(()=>K());h.useEffect(()=>{const c=()=>n(K());if(c(),typeof MutationObserver>"u")return;const v=new MutationObserver(c);return v.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>v.disconnect()},[]);const i=o==="dark";return e.jsx("footer",{className:m("relative z-[1] w-full shrink-0 box-border","flex items-center justify-center","py-5 px-14","border-t border-[var(--border-color)]","bg-[var(--bg-secondary)]",s),children:e.jsxs("div",{className:"flex items-center gap-2.5",children:[r&&e.jsx("span",{className:"font-primary text-xs font-normal text-[var(--text-muted)]",children:r}),a?e.jsx("img",{alt:t,src:a,className:"h-7 w-auto object-contain",style:{opacity:i?.65:.75}}):e.jsx(ne,{color:i?"#ffffff":"#1F3A3A",height:28,opacity:i?.65:.75})]})})};q.displayName="Footer";const P=()=>typeof document>"u"?"light":document.documentElement.getAttribute("data-theme")==="dark"?"dark":"light",le=({height:r=36})=>{const t=Math.round(r*2.098961562306262);return e.jsx("svg",{"aria-label":"SBK",height:r,viewBox:"39.15 180.84 541.7 258.08",width:t,xmlns:"http://www.w3.org/2000/svg",children:e.jsx("g",{transform:"translate(-49, 122)",children:e.jsxs("g",{children:[e.jsxs("g",{children:[e.jsx("path",{d:"m225.13 266.26c-27.48 0-47.67-12.07-50.38-41.01h14.16c0.62 21.44 17.69 29.56 36.85 29.56 18.11 0 39.14-7.91 39.14-29.14 0-16.24-13.12-23.74-32.48-29.99l-11.03-3.53c-24.36-7.71-42.27-16.66-42.27-40.19 0-28.1 24.78-39.97 49.76-39.97 22.9 0 46.64 8.54 47.05 35.18h-13.95c-1.87-18.32-15.82-23.94-32.47-23.94-17.29 0-36.65 7.71-36.65 27.69 0 14.78 11.04 22.28 34.36 29.77l12.49 3.96c24.36 7.7 38.3 15.82 38.93 38.73 0 30.18-26.65 42.88-53.51 42.88z",fill:"#ffffff",stroke:"#ffffff",strokeMiterlimit:10,strokeWidth:2}),e.jsx("path",{d:"m351.42 264.39h-41.43v-150.53h41.43c8.53 0 17.9-0.2 26.23 2.09 16.24 4.58 27.48 17.9 27.48 35.18 0 18.74-10.41 29.98-27.9 34.56 20.82 2.71 34.15 15.2 34.15 36.85 0 34.56-31.86 41.85-59.96 41.85zm8.12-138.45h-36.02v56.49h32.06c19.16 0 34.98-8.81 34.98-30.26 0-18.74-14.16-26.23-31.02-26.23zm-1.46 63.19h-34.56v63.18h26.65c21.86 0 46.84-1.45 46.84-29.98 0-24.77-18.11-33.2-38.93-33.2z",fill:"#ffffff",fillRule:"evenodd",stroke:"#ffffff",strokeMiterlimit:10,strokeWidth:2}),e.jsx("path",{d:"m443.77 264.39v-150.53h13.53v150.53zm88.07 0l-73.7-81.61 67.03-68.92h18.12l-68.91 67.88 75.99 82.65z",fill:"#ffffff",stroke:"#ffffff",strokeMiterlimit:10,strokeWidth:2})]}),e.jsxs("g",{children:[e.jsx("path",{d:"m99.09 118.17l-0.21 57.98-9.73 0.24 0.56-62.81c0.26-29.03 26.91-53.16 56.3-53.26l151.74-0.48c0.62 3.58 0.63 6.35 0.05 9.92l-150.35 0.22c-26.28 0.04-48.26 21.9-48.36 48.19z",fill:"#ffffff"}),e.jsx("path",{d:"m419.9 315.79l0.22-9.33 149.3-0.15c25.73-0.02 48.97-20.27 49.14-45.96l0.4-60.49q4.64-0.28 9.57-0.07l0.32 52.61c0.21 33.16-23.62 63.29-57.93 63.33l-135.88 0.19z",fill:"#ffffff"})]})]})})})},ie=({onClick:r})=>e.jsxs("button",{"aria-label":"Abrir menu",onClick:r,type:"button",className:m("flex flex-col gap-1 shrink-0 bg-transparent border-none p-1.5",r?"cursor-pointer":"cursor-default"),children:[e.jsx("span",{className:"block w-5 h-0.5 bg-sbk-verde-vibrante rounded-[2px]"}),e.jsx("span",{className:"block w-5 h-0.5 bg-sbk-verde-vibrante rounded-[2px]"}),e.jsx("span",{className:"block w-5 h-0.5 bg-sbk-verde-vibrante rounded-[2px]"})]}),L=({logoSrc:r,logoDarkSrc:a,logoAlt:t="SBK",title:s,subtitle:o,theme:n,onLogoClick:i,onMenuClick:c,rightContent:v,showMenuIcon:l=!0,userInitials:d,className:f=""})=>{const[u,p]=h.useState(()=>n??P()),w=u==="dark"&&a?a:r;h.useEffect(()=>{if(n){p(n);return}const k=()=>p(P());if(k(),typeof MutationObserver>"u")return;const N=new MutationObserver(k);return N.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>N.disconnect()},[n]);const x=k=>{k.key==="Enter"&&(i==null||i())};return e.jsxs("header",{className:m("sticky top-0 z-[1000] w-full h-16 shrink-0 box-border","bg-sbk-verde-profundo","flex items-center justify-between","px-14",f),children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[l&&e.jsx(ie,{onClick:c}),e.jsxs("div",{onClick:i,onKeyDown:i?x:void 0,role:i?"button":void 0,className:m("flex items-center gap-2.5 select-none",i?"cursor-pointer":"cursor-default"),tabIndex:i?0:void 0,children:[w?e.jsx("img",{alt:t,onError:k=>{k.target.style.display="none"},src:w,className:"h-9 w-auto object-contain shrink-0"}):e.jsx(le,{height:36}),(s||o)&&e.jsxs("div",{className:"flex flex-col gap-[1px]",children:[s&&e.jsx("span",{className:"font-logo text-[1.125rem] font-semibold text-white leading-[1.2] tracking-[0.02em]",children:s}),o&&e.jsx("span",{className:"font-primary text-[11px] font-normal text-white/45 leading-[1.3]",children:o})]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[v,d&&e.jsx("div",{"aria-label":`Usuário: ${d}`,className:"w-9 h-9 rounded-full bg-sbk-verde-vibrante flex items-center justify-center text-white font-primary font-semibold text-[13px] shrink-0 select-none",children:d})]})]})};L.displayName="Header";const W=h.forwardRef(({label:r,error:a,helperText:t,leftIcon:s,rightIcon:o,fullWidth:n=!1,size:i="md",className:c,id:v,...l},d)=>{const f=v||`input-${Math.random().toString(36).substring(2,9)}`,u=!!a,w=m("w-full rounded-[var(--border-radius-md)] border border-[var(--md-outline-variant)] bg-[var(--md-surface)] font-inherit text-[var(--md-on-surface)] outline-none transition-[var(--transition-all)] placeholder:text-[var(--md-on-surface-variant)] placeholder:opacity-70 hover:not-disabled:not-focus:border-[var(--border-color-hover)] focus:border-[var(--border-color-focus)] focus:[box-shadow:0_0_0_0.1875rem_rgba(47,93,140,0.15)] disabled:cursor-not-allowed disabled:bg-[var(--md-surface-container-high)] disabled:opacity-60",u&&"border-[var(--md-error)] focus:border-[var(--md-error)] focus:[box-shadow:0_0_0_0.1875rem_rgba(186,26,26,0.2)]",{sm:"min-h-8 px-[var(--spacing-md)] py-[var(--spacing-sm)] text-[var(--font-size-sm)]",md:"min-h-10 px-[var(--spacing-lg)] py-[var(--spacing-md)] text-[var(--font-size-base)]",lg:"min-h-12 px-[var(--spacing-xl)] py-[var(--spacing-lg)] text-[var(--font-size-lg)]"}[i],s&&"pl-10",o&&"pr-10",c);return e.jsxs("div",{className:m("flex flex-col gap-[var(--spacing-xs)]",n&&"w-full"),children:[r&&e.jsx("label",{className:"text-[var(--font-size-sm)] font-[var(--font-weight-semibold)] text-[var(--md-on-surface)]",htmlFor:f,children:r}),e.jsxs("div",{className:"group relative flex w-full items-center",children:[s&&e.jsx("span",{className:"pointer-events-none absolute left-[var(--spacing-md)] z-[1] flex items-center justify-center text-[var(--md-on-surface-variant)] group-focus-within:text-[var(--md-primary)] [&_svg]:h-[1.125rem] [&_svg]:w-[1.125rem]",children:s}),e.jsx("input",{ref:d,"aria-describedby":a?`${f}-error`:t?`${f}-helper`:void 0,"aria-invalid":u?!0:void 0,className:w,id:f,...l}),o&&e.jsx("span",{className:"pointer-events-none absolute right-[var(--spacing-md)] z-[1] flex items-center justify-center text-[var(--md-on-surface-variant)] group-focus-within:text-[var(--md-primary)] [&_svg]:h-[1.125rem] [&_svg]:w-[1.125rem]",children:o})]}),a&&e.jsx("span",{className:"mt-[var(--spacing-xs)] block text-[var(--font-size-xs)] text-[var(--md-error)]",id:`${f}-error`,role:"alert",children:a}),t&&!a&&e.jsx("span",{className:"mt-[var(--spacing-xs)] block text-[var(--font-size-xs)] text-[var(--md-on-surface-variant)]",id:`${f}-helper`,children:t})]})});W.displayName="Input";const de=({size:r="lg",className:a,...t})=>{const s={sm:"max-w-2xl",md:"max-w-4xl",lg:"max-w-6xl",xl:"max-w-7xl",full:"max-w-none"}[r];return e.jsx("div",{className:m("mx-auto w-full px-4",s,a),...t})},ce=({gap:r="md",className:a,...t})=>{const s={xs:"gap-1",sm:"gap-2",md:"gap-3",lg:"gap-4",xl:"gap-6"}[r];return e.jsx("div",{className:m("flex flex-col",s,a),...t})},ve=({cols:r=2,gap:a="md",className:t,...s})=>{const o={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4"}[r],n={xs:"gap-1",sm:"gap-2",md:"gap-3",lg:"gap-4",xl:"gap-6"}[a];return e.jsx("div",{className:m("grid",o,n,t),...s})},fe=({isOpen:r,onClose:a,title:t,subtitle:s,children:o,size:n="md",showCloseButton:i=!0,closeOnOverlayClick:c=!0,className:v=""})=>{const l=h.useRef(null),d=h.useRef(null);if(h.useEffect(()=>(r?(d.current=document.activeElement,document.body.style.overflow="hidden"):document.body.style.overflow="",()=>{document.body.style.overflow="",d.current&&d.current.focus()}),[r]),h.useEffect(()=>{const x=N=>{N.key==="Escape"&&r&&a()},k=N=>{if(N.key!=="Tab"||!l.current||!r)return;const S=l.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(S.length===0){N.preventDefault();return}const z=S[0],y=S[S.length-1],E=document.activeElement;N.shiftKey&&E===z?(N.preventDefault(),y.focus()):!N.shiftKey&&E===y&&(N.preventDefault(),z.focus())};return r&&(document.addEventListener("keydown",x),document.addEventListener("keydown",k),requestAnimationFrame(()=>{var S;const N=((S=l.current)==null?void 0:S.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'))??l.current;N==null||N.focus()})),()=>{document.removeEventListener("keydown",x),document.removeEventListener("keydown",k)}},[r,a]),!r)return null;const f=x=>{c&&x.target===x.currentTarget&&a()},u=x=>{c&&(x.key==="Enter"||x.key===" ")&&x.target===x.currentTarget&&a()},w=["relative z-[var(--z-index-modal)] m-auto flex w-full max-h-[90vh] max-w-full flex-col overflow-hidden rounded-[var(--border-radius-2xl)] border border-[var(--md-outline-variant)] bg-[var(--md-surface)] shadow-[var(--shadow-2xl)]",{sm:"max-w-[25rem]",md:"max-w-[31.25rem]",lg:"max-w-[43.75rem]",xl:"max-w-[56.25rem]",full:"max-h-[90vh] max-w-[90vw]"}[n],v].filter(Boolean).join(" ");return e.jsx("div",{"aria-labelledby":t?"modal-title":void 0,"aria-modal":"true",className:"fixed inset-0 z-[var(--z-index-modal-backdrop)] flex min-h-[100dvh] items-center justify-center overflow-y-auto bg-black/50 p-[var(--spacing-lg)] backdrop-blur-[8px]",onClick:f,onKeyDown:u,role:"dialog",children:e.jsxs("div",{className:w,ref:l,tabIndex:-1,children:[(t||s||i)&&e.jsxs("div",{className:"flex shrink-0 items-start justify-between gap-[var(--spacing-lg)] border-b border-[var(--md-outline-variant)] p-[var(--spacing-2xl)]",children:[(t||s)&&e.jsxs("div",{className:"flex-1",children:[t&&e.jsx("h2",{className:"mb-[var(--spacing-xs)] mt-0 text-[var(--font-size-2xl)] font-[var(--font-weight-semibold)] leading-[var(--line-height-tight)] text-[var(--md-on-surface)]",id:"modal-title",children:t}),s&&e.jsx("p",{className:"m-0 text-[var(--font-size-base)] leading-[var(--line-height-normal)] text-[var(--md-on-surface-variant)]",children:s})]}),i&&e.jsx("button",{"aria-label":"Fechar modal",className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-[var(--border-radius-md)] border-0 bg-[var(--md-surface-container-high)] text-[var(--md-on-surface)] transition-[var(--transition-all)] hover:bg-[color:color-mix(in_srgb,var(--md-error)_15%,var(--md-surface))] hover:text-[var(--md-error)]",onClick:a,type:"button",children:e.jsxs("svg",{fill:"none",className:"h-5 w-5",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[e.jsx("line",{x1:"18",x2:"6",y1:"6",y2:"18"}),e.jsx("line",{x1:"6",x2:"18",y1:"6",y2:"18"})]})})]}),e.jsx("div",{className:"flex min-h-0 flex-1 flex-col overflow-x-hidden overflow-y-auto p-[var(--spacing-2xl)]",children:o})]})})},me=({className:r,...a})=>e.jsx("aside",{className:m("h-full rounded-[var(--border-radius-lg)] border border-[var(--border-color)] bg-[var(--bg-secondary)] p-4",r),...a}),be=({className:r,...a})=>e.jsx("header",{className:m("flex min-h-14 items-center justify-between border-b border-[var(--border-color)] bg-[var(--bg-secondary)] px-4",r),...a}),he=({currentPage:r,totalPages:a,onPageChange:t})=>{if(a<=1)return null;const s=Array.from({length:a},(o,n)=>n+1);return e.jsxs("nav",{"aria-label":"Paginação",className:"flex flex-wrap items-center gap-1",children:[e.jsx("button",{className:"rounded-[var(--border-radius-sm)] border border-[var(--border-color)] px-2 py-1 text-sm disabled:opacity-50",disabled:r===1,onClick:()=>t(Math.max(r-1,1)),type:"button",children:"Anterior"}),s.map(o=>e.jsx("button",{className:m("rounded-[var(--border-radius-sm)] border px-2.5 py-1 text-sm",o===r?"border-[var(--md-primary)] bg-[var(--md-primary)] text-[var(--md-on-primary)]":"border-[var(--border-color)] bg-[var(--bg-secondary)] text-[var(--text-secondary)] hover:bg-[var(--bg-hover)]"),onClick:()=>t(o),type:"button",children:o},o)),e.jsx("button",{className:"rounded-[var(--border-radius-sm)] border border-[var(--border-color)] px-2 py-1 text-sm disabled:opacity-50",disabled:r===a,onClick:()=>t(Math.min(r+1,a)),type:"button",children:"Próxima"})]})},ue=({as:r="p",size:a="md",weight:t="normal",align:s="left",muted:o=!1,italic:n=!1,children:i,className:c="",...v})=>{const l=r,d={xs:"text-[var(--font-size-xs)] leading-[var(--line-height-normal)]",sm:"text-[var(--font-size-sm)] leading-[var(--line-height-normal)]",md:"text-[var(--font-size-base)] leading-[var(--line-height-relaxed)]",lg:"text-[var(--font-size-lg)] leading-[var(--line-height-loose)]"},f={light:"font-[var(--font-weight-light)]",normal:"font-[var(--font-weight-normal)]",medium:"font-[var(--font-weight-medium)]"},u={left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"},p=["m-0 text-[var(--text-primary)] transition-[var(--transition-colors)]",d[a],f[t],u[s],n?"italic":"not-italic",o?"text-[var(--text-muted)]":"",c].filter(Boolean).join(" ");return e.jsx(l,{className:p,...v,children:i})},xe=({title:r,subtitle:a,actions:t,className:s,...o})=>e.jsx("header",{className:m("grid gap-3 rounded-[var(--border-radius-lg)] border border-[var(--border-color)] bg-[var(--bg-secondary)] p-5 shadow-[var(--shadow-sm)]",s),...o,children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"grid gap-1",children:[e.jsx("h1",{className:"m-0 text-2xl font-bold text-[var(--text-primary)]",children:r}),a&&e.jsx("p",{className:"m-0 text-sm text-[var(--text-secondary)]",children:a})]}),t&&e.jsx("div",{className:"flex items-center gap-2",children:t})]})}),pe=({children:r,content:a,defaultOpen:t=!1})=>{const[s,o]=h.useState(t),n=h.useRef(null),i=h.useRef(null),c=h.useRef(null),v=h.useId();return h.useEffect(()=>{const l=d=>{var f;(f=n.current)!=null&&f.contains(d.target)||o(!1)};return document.addEventListener("mousedown",l),()=>document.removeEventListener("mousedown",l)},[]),h.useEffect(()=>{if(!s||!c.current)return;const l=c.current.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');l==null||l.focus()},[s]),h.useEffect(()=>{const l=d=>{var f;d.key==="Escape"&&(o(!1),(f=i.current)==null||f.focus())};return s&&document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[s]),e.jsxs("div",{className:"relative inline-flex",ref:n,children:[e.jsx("button",{"aria-controls":s?v:void 0,"aria-expanded":s,"aria-haspopup":"dialog",className:"inline-flex",onClick:()=>o(l=>!l),ref:i,type:"button",children:r}),s&&e.jsx("div",{className:m("absolute left-1/2 top-full z-30 mt-2 w-max -translate-x-1/2 rounded-[var(--border-radius-md)] border border-[var(--border-color)] bg-[var(--bg-secondary)] p-3 shadow-[var(--shadow-md)]"),id:v,ref:c,role:"dialog",tabIndex:-1,children:a})]})},H=h.forwardRef(({label:r,helperText:a,className:t,id:s,...o},n)=>{const i=s||`radio-${Math.random().toString(36).slice(2,9)}`;return e.jsxs("label",{className:m("inline-flex cursor-pointer items-start gap-2",t),htmlFor:i,children:[e.jsx("input",{ref:n,className:"mt-0.5 h-4 w-4 border-[var(--md-outline-variant)] bg-[var(--md-surface)] text-[var(--md-primary)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-[var(--border-color-focus)]",id:i,type:"radio",...o}),e.jsxs("span",{className:"grid gap-0.5",children:[r&&e.jsx("span",{className:"text-sm text-[var(--text-primary)]",children:r}),a&&e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a})]})]})});H.displayName="Radio";const ge=({title:r,subtitle:a,actions:t,className:s,...o})=>e.jsxs("div",{className:m("flex items-start justify-between gap-4",s),...o,children:[e.jsxs("div",{className:"grid gap-1",children:[e.jsx("h2",{className:"m-0 text-xl font-semibold text-[var(--text-primary)]",children:r}),a&&e.jsx("p",{className:"m-0 text-sm text-[var(--text-secondary)]",children:a})]}),t&&e.jsx("div",{className:"flex shrink-0 items-center gap-2",children:t})]}),O=h.forwardRef(({label:r,helperText:a,error:t,options:s,size:o="md",className:n,id:i,...c},v)=>{const l=i||`select-${Math.random().toString(36).slice(2,9)}`,d={sm:"min-h-8 px-3 py-1.5 text-sm",md:"min-h-10 px-3.5 py-2 text-base",lg:"min-h-12 px-4 py-3 text-lg"}[o];return e.jsxs("div",{className:"grid gap-1",children:[r&&e.jsx("label",{className:"text-[var(--font-size-sm)] font-[var(--font-weight-semibold)] text-[var(--md-on-surface)]",htmlFor:l,children:r}),e.jsx("select",{ref:v,"aria-describedby":t?`${l}-error`:a?`${l}-helper`:void 0,"aria-invalid":t?!0:void 0,className:m("w-full rounded-[var(--border-radius-md)] border border-[var(--md-outline-variant)] bg-[var(--md-surface)] text-[var(--md-on-surface)] outline-none transition focus:border-[var(--border-color-focus)] focus:[box-shadow:0_0_0_0.1875rem_rgba(47,93,140,0.15)] disabled:cursor-not-allowed disabled:opacity-60",t&&"border-[var(--md-error)]",d,n),id:l,...c,children:s.map(f=>e.jsx("option",{value:f.value,children:f.label},f.value))}),t?e.jsx("span",{className:"text-xs text-[var(--md-error)]",id:`${l}-error`,role:"alert",children:t}):a&&e.jsx("span",{className:"text-xs text-[var(--md-on-surface-variant)]",id:`${l}-helper`,children:a})]})});O.displayName="Select";const ye=({circle:r=!1,width:a,height:t,className:s,style:o,...n})=>e.jsx("div",{className:m("animate-pulse bg-[var(--md-surface-container-high)]",r?"rounded-full":"rounded-[var(--border-radius-sm)]",s),style:{width:a,height:t,...o},...n}),we=({as:r="p",size:a="md",weight:t="normal",align:s="left",muted:o=!1,italic:n=!1,children:i,className:c="",...v})=>{const l=r,d={xs:"text-[var(--font-size-xs)]",sm:"text-[var(--font-size-sm)]",md:"text-[var(--font-size-base)]",lg:"text-[var(--font-size-lg)]"},f={normal:"font-[var(--font-weight-normal)]",medium:"font-[var(--font-weight-medium)]",semibold:"font-[var(--font-weight-semibold)]"},u={left:"text-left",center:"text-center",right:"text-right"},p=["m-0 leading-[var(--line-height-normal)] text-[var(--text-secondary)] transition-[var(--transition-colors)]",d[a],f[t],u[s],n?"italic":"not-italic",o?"text-[var(--text-muted)] opacity-80":"",c].filter(Boolean).join(" ");return e.jsx(l,{className:p,...v,children:i})},U=h.forwardRef(({checked:r=!1,onCheckedChange:a,label:t,className:s,...o},n)=>e.jsxs("div",{className:m("inline-flex items-center gap-2",s),children:[e.jsx("button",{ref:n,"aria-checked":r,className:m("relative inline-flex h-6 w-11 items-center rounded-full border transition focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--border-color-focus)]",r?"border-[var(--md-primary)] bg-[var(--md-primary)]":"border-[var(--md-outline)] bg-[var(--md-surface-container-high)]"),onClick:()=>a==null?void 0:a(!r),role:"switch",type:"button",...o,children:e.jsx("span",{className:m("inline-block h-5 w-5 rounded-full bg-[var(--md-surface)] shadow transition",r?"translate-x-5":"translate-x-0.5")})}),t&&e.jsx("span",{className:"text-sm text-[var(--text-primary)]",children:t})]}));U.displayName="Switch";const Ne=({className:r,children:a,onRemove:t,...s})=>e.jsxs("span",{className:m("inline-flex items-center gap-1 rounded-[var(--border-radius-sm)] border border-[var(--border-color)] bg-[var(--bg-secondary)] px-2.5 py-1 text-xs text-[var(--text-secondary)]",r),...s,children:[a,t&&e.jsx("button",{"aria-label":"Remover tag",className:"inline-flex h-4 w-4 items-center justify-center rounded-full text-[var(--text-muted)] transition hover:bg-[var(--bg-hover)] hover:text-[var(--text-primary)]",onClick:t,type:"button",children:"×"})]}),ke=({items:r,defaultTabId:a})=>{var c;const[t,s]=h.useState(a??((c=r[0])==null?void 0:c.id)),o=r.find(v=>v.id===t)??r[0],n=Math.max(0,r.findIndex(v=>v.id===(o==null?void 0:o.id))),i=v=>{const l=r[v];if(!l)return;s(l.id);const d=document.getElementById(`tab-${l.id}`);d==null||d.focus()};return e.jsxs("div",{className:"grid gap-3",children:[e.jsx("div",{"aria-orientation":"horizontal",className:"inline-flex flex-wrap gap-1 rounded-[var(--border-radius-md)] bg-[var(--bg-tertiary)] p-1",role:"tablist",children:r.map((v,l)=>e.jsx("button",{"aria-controls":`panel-${v.id}`,"aria-selected":t===v.id,className:m("rounded-[var(--border-radius-sm)] px-3 py-1.5 text-sm transition",t===v.id?"bg-[var(--bg-secondary)] text-[var(--text-primary)] shadow-[var(--shadow-xs)]":"text-[var(--text-secondary)] hover:bg-[var(--bg-hover)]"),id:`tab-${v.id}`,onClick:()=>s(v.id),onKeyDown:d=>{d.key==="ArrowRight"?(d.preventDefault(),i((l+1)%r.length)):d.key==="ArrowLeft"?(d.preventDefault(),i((l-1+r.length)%r.length)):d.key==="Home"?(d.preventDefault(),i(0)):d.key==="End"&&(d.preventDefault(),i(r.length-1))},role:"tab",tabIndex:l===n?0:-1,type:"button",children:v.label},v.id))}),e.jsx("div",{"aria-labelledby":`tab-${(o==null?void 0:o.id)??""}`,className:"rounded-[var(--border-radius-md)] border border-[var(--border-color)] bg-[var(--bg-secondary)] p-4",id:`panel-${(o==null?void 0:o.id)??""}`,role:"tabpanel",children:o==null?void 0:o.content})]})},ze=({className:r,children:a,...t})=>e.jsx("div",{className:"overflow-x-auto rounded-[var(--border-radius-md)] border border-[var(--border-color)]",children:e.jsx("table",{className:m("w-full min-w-[36rem] border-collapse bg-[var(--bg-secondary)] text-left",r),...t,children:a})}),V=h.forwardRef(({label:r,helperText:a,error:t,className:s,id:o,...n},i)=>{const c=o||`textarea-${Math.random().toString(36).slice(2,9)}`;return e.jsxs("div",{className:"grid gap-1",children:[r&&e.jsx("label",{className:"text-[var(--font-size-sm)] font-[var(--font-weight-semibold)] text-[var(--md-on-surface)]",htmlFor:c,children:r}),e.jsx("textarea",{ref:i,"aria-describedby":t?`${c}-error`:a?`${c}-helper`:void 0,"aria-invalid":t?!0:void 0,className:m("min-h-24 w-full rounded-[var(--border-radius-md)] border border-[var(--md-outline-variant)] bg-[var(--md-surface)] px-3.5 py-2 text-[var(--md-on-surface)] outline-none transition placeholder:text-[var(--md-on-surface-variant)] focus:border-[var(--border-color-focus)] focus:[box-shadow:0_0_0_0.1875rem_rgba(47,93,140,0.15)] disabled:cursor-not-allowed disabled:opacity-60",t&&"border-[var(--md-error)] focus:border-[var(--md-error)] focus:[box-shadow:0_0_0_0.1875rem_rgba(186,26,26,0.2)]",s),id:c,...n}),t?e.jsx("span",{className:"text-xs text-[var(--md-error)]",id:`${c}-error`,role:"alert",children:t}):a&&e.jsx("span",{className:"text-xs text-[var(--md-on-surface-variant)]",id:`${c}-helper`,children:a})]})});V.displayName="Textarea";const G=({tone:r="info",title:a,description:t,onDismiss:s,className:o,...n})=>{const i={info:"border-[var(--info-color)]/40",success:"border-[var(--success-color)]/40",warning:"border-[var(--warning-color)]/40",error:"border-[var(--md-error)]/40"}[r],c=r==="error"||r==="warning"?"assertive":"polite",v=r==="error"||r==="warning"?"alert":"status";return e.jsxs("div",{className:m("w-[22rem] rounded-[var(--border-radius-md)] border bg-[var(--bg-secondary)] p-3 shadow-[var(--shadow-lg)]",i,o),"aria-atomic":"true","aria-live":c,onKeyDown:l=>{l.key==="Escape"&&(s==null||s())},role:v,tabIndex:0,...n,children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("p",{className:"m-0 text-sm font-semibold text-[var(--text-primary)]",children:a}),s&&e.jsx("button",{"aria-label":"Fechar notificação",className:"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-[var(--border-radius-sm)] text-[var(--text-secondary)] transition hover:bg-[var(--bg-hover)] hover:text-[var(--text-primary)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--border-color-focus)]",onClick:s,type:"button",children:e.jsx("span",{"aria-hidden":!0,children:"×"})})]}),t&&e.jsx("p",{className:"mt-1 text-sm text-[var(--text-secondary)]",children:t})]})},j=h.createContext(void 0),Me=({children:r,durationMs:a=4e3})=>{const[t,s]=h.useState([]),o=h.useRef(new Map),n=h.useCallback(v=>{const l=o.current.get(v);l&&(window.clearTimeout(l),o.current.delete(v)),s(d=>d.filter(f=>f.id!==v))},[]),i=h.useCallback(v=>{const l=v.id??`toast-${Math.random().toString(36).slice(2,9)}`;s(f=>[...f,{...v,id:l}]);const d=window.setTimeout(()=>n(l),a);o.current.set(l,d)},[n,a]);h.useEffect(()=>{const v=o.current;return()=>{v.forEach(l=>window.clearTimeout(l)),v.clear()}},[]);const c=h.useMemo(()=>({toasts:t,pushToast:i,dismissToast:n}),[t,i,n]);return e.jsxs(j.Provider,{value:c,children:[r,e.jsx(Q,{})]})},Se=()=>{const r=h.useContext(j);if(!r)throw new Error("useToast must be used inside ToastProvider");return r},Q=()=>{const r=h.useContext(j);return!r||r.toasts.length===0?null:e.jsx("div",{"aria-label":"Notificações",className:"pointer-events-none fixed bottom-4 right-4 z-[1200] grid gap-2",role:"region",children:r.toasts.map(a=>e.jsx(G,{...a,className:"pointer-events-auto",onDismiss:()=>r.dismissToast(a.id)},a.id))})},Ee=({as:r="h1",size:a="2xl",weight:t="bold",align:s="left",gradient:o=!1,italic:n=!1,children:i,className:c="",...v})=>{const l=r,d={xs:"text-[var(--font-size-sm)]",sm:"text-[var(--font-size-base)]",md:"text-[var(--font-size-lg)]",lg:"text-[var(--font-size-xl)]",xl:"text-[var(--font-size-2xl)]","2xl":"text-[var(--font-size-3xl)]","3xl":"text-[var(--font-size-4xl)]","4xl":"text-[3rem]"},f={light:"font-[var(--font-weight-light)]",normal:"font-[var(--font-weight-normal)]",medium:"font-[var(--font-weight-medium)]",semibold:"font-[var(--font-weight-semibold)]",bold:"font-[var(--font-weight-bold)]",extrabold:"font-extrabold"},u={left:"text-left",center:"text-center",right:"text-right"},p=o?"bg-[linear-gradient(135deg,var(--text-primary)_0%,var(--primary-color)_50%,var(--secondary-color)_100%)] bg-clip-text text-transparent":"",w=["m-0 leading-[var(--line-height-tight)] text-[var(--text-primary)] transition-[var(--transition-colors)]",d[a],f[t],u[s],n?"italic":"not-italic",p,c].filter(Boolean).join(" ");return e.jsx(l,{className:w,...v,children:i})},Ce=({children:r,content:a,side:t="top"})=>{const[s,o]=h.useState(!1),n=h.useId(),i=t==="top"?"bottom-full mb-2 left-1/2 -translate-x-1/2":"top-full mt-2 left-1/2 -translate-x-1/2",c={"aria-describedby":n,onBlur:()=>o(!1),onFocus:()=>o(!0),onKeyDown:l=>{l.key==="Escape"&&o(!1)},onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1)},v=h.isValidElement(r)?e.jsx("span",{className:"inline-flex",...c,children:r}):e.jsx("span",{className:"inline-flex",tabIndex:0,...c,children:r});return e.jsxs("span",{className:"relative inline-flex",children:[v,e.jsx("span",{"aria-hidden":!s,className:m("pointer-events-none absolute z-20 whitespace-nowrap rounded bg-[var(--brand-cinza-escuro)] px-2 py-1 text-xs text-white shadow-[var(--shadow-sm)] transition",s?"opacity-100":"opacity-0",i),id:n,role:"tooltip",children:a})]})},J=h.createContext(void 0),$e=()=>{const r=h.useContext(J);if(!r)throw new Error("useTheme must be used within a ThemeProvider");return r},Te=({children:r,defaultTheme:a="light"})=>{const[t,s]=h.useState(()=>typeof window>"u"?a:window.localStorage.getItem("theme")||a);h.useEffect(()=>{typeof window>"u"||(window.localStorage.setItem("theme",t),document.documentElement.setAttribute("data-theme",t))},[t]);const o=()=>{s(n=>n==="dark"?"light":"dark")};return e.jsx(J.Provider,{value:{theme:t,toggleTheme:o},children:r})};b.Accordion=Z,b.Alert=ee,b.Badge=re,b.Breadcrumb=D,b.Button=R,b.Card=ae,b.Checkbox=B,b.Chip=te,b.Combobox=_,b.Container=de,b.Divider=oe,b.EmptyState=se,b.FileUpload=I,b.Footer=q,b.Grid=ve,b.Header=L,b.Input=W,b.Modal=fe,b.NumberInput=A,b.PageHeader=xe,b.Pagination=he,b.Paragraph=ue,b.Popover=pe,b.Radio=H,b.SectionHeader=ge,b.Select=O,b.Sidebar=me,b.Skeleton=ye,b.Stack=ce,b.Stepper=F,b.Subtitle=we,b.Switch=U,b.Table=ze,b.Tabs=ke,b.Tag=Ne,b.Textarea=V,b.ThemeProvider=Te,b.Title=Ee,b.Toast=G,b.ToastProvider=Me,b.ToastViewport=Q,b.Tooltip=Ce,b.Topbar=be,b.useTheme=$e,b.useToast=Se,Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})}));
2
2
  //# sourceMappingURL=oficios-ui.umd.cjs.map