bonsaif-ui 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +59 -0
  3. package/dist/bonsaif-ui.js +3331 -0
  4. package/dist/bonsaif-ui.umd.cjs +1 -0
  5. package/dist/components/BonsaifButton/BonsaifButton.d.ts +7 -0
  6. package/dist/components/BonsaifButton/BonsaifButton.d.ts.map +1 -0
  7. package/dist/components/BonsaifButton/index.d.ts +3 -0
  8. package/dist/components/BonsaifButton/index.d.ts.map +1 -0
  9. package/dist/components/index.d.ts +16 -0
  10. package/dist/components/index.d.ts.map +1 -0
  11. package/dist/components/layout/AuthShell.d.ts +33 -0
  12. package/dist/components/layout/AuthShell.d.ts.map +1 -0
  13. package/dist/components/layout/GlobalScrollbars.d.ts +2 -0
  14. package/dist/components/layout/GlobalScrollbars.d.ts.map +1 -0
  15. package/dist/components/layout/PageHeader.d.ts +29 -0
  16. package/dist/components/layout/PageHeader.d.ts.map +1 -0
  17. package/dist/components/layout/PageSearchInput.d.ts +9 -0
  18. package/dist/components/layout/PageSearchInput.d.ts.map +1 -0
  19. package/dist/components/layout/PrimeAuthRouteShell.d.ts +9 -0
  20. package/dist/components/layout/PrimeAuthRouteShell.d.ts.map +1 -0
  21. package/dist/components/messaging/PrimeSuiteChatFrame.d.ts +2 -0
  22. package/dist/components/messaging/PrimeSuiteChatFrame.d.ts.map +1 -0
  23. package/dist/components/microservices/MicroserviceFrame.d.ts +8 -0
  24. package/dist/components/microservices/MicroserviceFrame.d.ts.map +1 -0
  25. package/dist/components/notifications/PrimeAuthToaster.d.ts +2 -0
  26. package/dist/components/notifications/PrimeAuthToaster.d.ts.map +1 -0
  27. package/dist/components/ui/Button.d.ts +15 -0
  28. package/dist/components/ui/Button.d.ts.map +1 -0
  29. package/dist/components/ui/CalendarPicker.d.ts +9 -0
  30. package/dist/components/ui/CalendarPicker.d.ts.map +1 -0
  31. package/dist/components/ui/CompactFilters.d.ts +27 -0
  32. package/dist/components/ui/CompactFilters.d.ts.map +1 -0
  33. package/dist/components/ui/ConfirmDialog.d.ts +12 -0
  34. package/dist/components/ui/ConfirmDialog.d.ts.map +1 -0
  35. package/dist/components/ui/DataTable.d.ts +87 -0
  36. package/dist/components/ui/DataTable.d.ts.map +1 -0
  37. package/dist/components/ui/DateRangePicker.d.ts +17 -0
  38. package/dist/components/ui/DateRangePicker.d.ts.map +1 -0
  39. package/dist/components/ui/Drawer.d.ts +26 -0
  40. package/dist/components/ui/Drawer.d.ts.map +1 -0
  41. package/dist/components/ui/InputField.d.ts +13 -0
  42. package/dist/components/ui/InputField.d.ts.map +1 -0
  43. package/dist/components/ui/LoadingState.d.ts +11 -0
  44. package/dist/components/ui/LoadingState.d.ts.map +1 -0
  45. package/dist/components/ui/Modal.d.ts +29 -0
  46. package/dist/components/ui/Modal.d.ts.map +1 -0
  47. package/dist/components/ui/MouseTooltip.d.ts +12 -0
  48. package/dist/components/ui/MouseTooltip.d.ts.map +1 -0
  49. package/dist/components/ui/SearchableSelect.d.ts +25 -0
  50. package/dist/components/ui/SearchableSelect.d.ts.map +1 -0
  51. package/dist/components/ui/TextInput.d.ts +5 -0
  52. package/dist/components/ui/TextInput.d.ts.map +1 -0
  53. package/dist/components/ui/Toggle.d.ts +9 -0
  54. package/dist/components/ui/Toggle.d.ts.map +1 -0
  55. package/dist/components/ui/index.d.ts +18 -0
  56. package/dist/components/ui/index.d.ts.map +1 -0
  57. package/dist/components/users/UserAvatar.d.ts +12 -0
  58. package/dist/components/users/UserAvatar.d.ts.map +1 -0
  59. package/dist/index.d.ts +5 -0
  60. package/dist/index.d.ts.map +1 -0
  61. package/dist/lib/cn.d.ts +2 -0
  62. package/dist/lib/cn.d.ts.map +1 -0
  63. package/dist/styles.css +9 -0
  64. package/package.json +82 -0
@@ -0,0 +1 @@
1
+ (function(N,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("react/jsx-runtime"),require("react"),require("react-icons/hi2"),require("overlayscrollbars"),require("react-dom"),require("react-icons/md"),require("overlayscrollbars-react"),require("react-day-picker"),require("react-day-picker/dist/style.css"),require("react-icons/fi"),require("sonner")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-icons/hi2","overlayscrollbars","react-dom","react-icons/md","overlayscrollbars-react","react-day-picker","react-day-picker/dist/style.css","react-icons/fi","sonner"],e):(N=typeof globalThis<"u"?globalThis:N||self,e(N.BonsaifUI={},N.jsxRuntime,N.React,N.ReactIconsHi2,N.OverlayScrollbarsGlobal,N.ReactDOM,N.ReactIconsMd,N.OverlayScrollbarsReact,N.ReactDayPicker,N.ReactDayPickerStyles,N.ReactIconsFi,N.Sonner))})(this,(function(N,e,i,m,De,he,ct,Be,Ae,Nr,dt,ut){"use strict";function Oe(...t){return t.filter(Boolean).join(" ")}function ft({variant:t="primary",className:r,type:a="button",children:n,...l}){return e.jsx("button",{className:Oe("bonsaif-ui-button",`bonsaif-ui-button--${t}`,r),type:a,...l,children:n})}function ze(t){if(t!==void 0)return typeof t=="number"?`${t}px`:t}const pt="inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap leading-none font-medium transition-all duration-150 focus:outline-none disabled:opacity-50 rounded-lg",ht={primary:"border border-[var(--border)] text-[var(--text-main)] hover:border-[var(--border)] hover:bg-[var(--bg-input)] active:scale-[0.98] transition-colors",secondary:"border border-[var(--border)] text-[var(--text-main)] hover:border-[var(--border)] hover:bg-[var(--bg-input)] active:scale-[0.98] transition-colors",danger:"border border-[var(--border)] text-[var(--danger)] hover:border-[var(--danger)] hover:bg-[var(--danger-bg)] active:scale-[0.98] transition-colors",ghost:"text-[var(--text-secondary)] hover:opacity-70",icon:"h-9 w-9 text-[var(--text-muted)] hover:text-[var(--primary)] hover:bg-primary/5"},bt={sm:"h-9 px-3.5 text-xs",md:"h-11 px-4 text-sm",lg:"h-12 px-5 text-sm font-semibold"},mt={primary:{background:"var(--bg-card)"},secondary:{background:"var(--bg-card)"},danger:{background:"var(--bg-card)"},ghost:{},icon:{}};function ee({variant:t="primary",size:r="md",loading:a=!1,icon:n,height:l,padding:u,children:f,className:p="",disabled:c,style:d,...w}){const M=t==="icon";return e.jsxs("button",{...w,"data-variant":t,"data-size":r,"data-icon":M?"true":void 0,disabled:c||a,className:`${pt} ${ht[t]} ${M?"":bt[r]} ${p}`,style:{...mt[t],height:ze(l),padding:ze(u),...d},children:[a?e.jsx("span",{className:"h-3.5 w-3.5 animate-spin rounded-full border-2 border-current border-t-transparent"}):n,f]})}const Ie=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],gt=["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],vt=["Do","Lu","Ma","Mi","Ju","Vi","Sá"],ye=6;function we(t,r,a){return`${t}-${String(r).padStart(2,"0")}-${String(a).padStart(2,"0")}`}function xt(){const t=new Date;return we(t.getFullYear(),t.getMonth()+1,t.getDate())}function Pe(t){const[r,a,n]=t.split("-").map(Number);return{year:r,month:a,day:n}}function yt(t){if(!t)return"Seleccionar fecha";const{year:r,month:a,day:n}=Pe(t);return!r||!a||!n?"Seleccionar fecha":`${String(n).padStart(2,"0")} ${Ie[a-1]} ${r}`}function wt({value:t,onChange:r,minDate:a,displayMode:n="inline"}){const l=xt(),f=Pe(t||l),p=n==="popover",[c,d]=i.useState(!1),w=i.useRef(null),[M,k]=i.useState({horizontal:"left",vertical:"bottom"}),[b,v]=i.useState(f.year),[g,S]=i.useState(f.month),[L,V]=i.useState("days"),Y=16,[C,$]=i.useState(0),H=b-7+C,D=Array.from({length:Y},(o,x)=>H+x);i.useEffect(()=>{if(!p||!c||!w.current)return;const o=w.current.getBoundingClientRect(),x=8,O=280,U=340,W=o.left+O>window.innerWidth-x,Z=o.right-O>=x,R=o.bottom+8+U>window.innerHeight-x,ne=o.top-8-U>=x;k({horizontal:W&&Z?"right":"left",vertical:R&&ne?"top":"bottom"})},[p,c]),i.useEffect(()=>{if(!p||!c)return;function o(O){w.current&&(w.current.contains(O.target)||d(!1))}function x(O){O.key==="Escape"&&d(!1)}return document.addEventListener("mousedown",o),document.addEventListener("keydown",x),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("keydown",x)}},[p,c]);function F(){g===1?(v(o=>o-1),S(12)):S(o=>o-1)}function I(){g===12?(v(o=>o+1),S(1)):S(o=>o+1)}const T=new Date(b,g-1,1).getDay(),A=new Date(b,g,0).getDate(),X=[...Array(T).fill(null),...Array.from({length:A},(o,x)=>x+1)];for(;X.length<ye*7;)X.push(null);const z=X.slice(0,ye*7);function G(o){const x=we(b,g,o);a&&x<a||(r(x),p&&d(!1))}const j={background:"none",border:"none",cursor:"pointer",color:"var(--text-muted)",padding:4,borderRadius:6,display:"flex",alignItems:"center"},q=e.jsxs("div",{style:{background:"var(--bg-input)",border:"1px solid var(--border)",borderRadius:10,overflow:"hidden",userSelect:"none",width:280},children:[e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 12px",borderBottom:"1px solid var(--border)"},children:L==="days"?e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",onClick:F,style:j,title:"Mes anterior",children:e.jsx(m.HiChevronLeft,{size:16})}),e.jsxs("button",{type:"button",onClick:()=>{V("years"),$(0)},style:{background:"none",border:"none",cursor:"pointer",display:"flex",alignItems:"center",gap:4,fontSize:13,fontWeight:700,color:"var(--text-main)",borderRadius:6,padding:"2px 6px"},children:[Ie[g-1]," ",b,e.jsx(m.HiChevronDown,{size:13,style:{color:"var(--text-muted)"}})]}),e.jsx("button",{type:"button",onClick:I,style:j,title:"Mes siguiente",children:e.jsx(m.HiChevronRight,{size:16})})]}):e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",onClick:()=>$(o=>o-Y),style:j,children:e.jsx(m.HiChevronLeft,{size:16})}),e.jsxs("button",{type:"button",onClick:()=>V("days"),style:{background:"none",border:"none",cursor:"pointer",fontSize:13,fontWeight:700,color:"var(--text-main)",borderRadius:6,padding:"2px 6px"},children:[D[0]," – ",D[D.length-1]]}),e.jsx("button",{type:"button",onClick:()=>$(o=>o+Y),style:j,children:e.jsx(m.HiChevronRight,{size:16})})]})}),L==="years"&&e.jsxs("div",{style:{padding:"8px 10px 10px"},children:[e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4,1fr)",gap:3,marginBottom:8},children:gt.map((o,x)=>{const O=x+1===g;return e.jsx("button",{type:"button",onClick:()=>S(x+1),style:{border:"none",cursor:"pointer",borderRadius:6,fontSize:11,fontWeight:O?700:400,padding:"4px 0",background:O?"var(--primary)":"transparent",color:O?"var(--primary-fg, #ffffff)":"var(--text-secondary)"},children:o},o)})}),e.jsx("div",{style:{height:1,background:"var(--border)",marginBottom:8}}),e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4,1fr)",gap:3},children:D.map(o=>{const x=o===b;return e.jsx("button",{type:"button",onClick:()=>{v(o),V("days")},style:{border:"none",cursor:"pointer",borderRadius:6,fontSize:12,fontWeight:x?700:400,padding:"6px 0",background:x?"var(--primary)":"transparent",color:x?"var(--primary-fg, #ffffff)":"var(--text-main)",outline:o===new Date().getFullYear()&&!x?"2px solid var(--primary)":"none",outlineOffset:"-2px"},children:o},o)})})]}),L==="days"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(7,1fr)",padding:"6px 8px 0"},children:vt.map(o=>e.jsx("div",{style:{textAlign:"center",fontSize:10,fontWeight:700,color:"var(--text-muted)",padding:"2px 0",textTransform:"uppercase"},children:o},o))}),e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(7,1fr)",gridTemplateRows:`repeat(${ye},1fr)`,padding:"4px 8px 10px",gap:2},children:z.map((o,x)=>{if(o===null)return e.jsx("div",{style:{aspectRatio:"1"}},x);const O=we(b,g,o),U=O===t,W=O===l,Z=!!(a&&O<a);return e.jsx("button",{type:"button",onClick:()=>!Z&&G(o),style:{width:"100%",aspectRatio:"1",borderRadius:6,border:"none",cursor:Z?"not-allowed":"pointer",fontSize:12,fontWeight:U||W?700:400,background:U?"var(--primary)":"transparent",color:U?"var(--primary-fg, #ffffff)":Z?"var(--text-muted)":"var(--text-main)",opacity:Z?.4:1,outline:W&&!U?"2px solid var(--primary)":"none",outlineOffset:"-2px"},children:o},x)})})]})]});return p?e.jsxs("div",{ref:w,className:"relative w-full",children:[e.jsxs("button",{type:"button",onClick:()=>d(o=>!o),className:"flex h-11 w-full items-center justify-between gap-2 rounded-lg px-3 py-0 text-sm transition-all duration-150 focus:outline-none",style:{background:"var(--bg-input)",border:`1px solid ${c?"var(--primary)":"var(--border)"}`,color:"var(--text-main)",boxShadow:c?"0 0 0 3px rgba(59,130,246,0.12)":"none"},children:[e.jsxs("span",{className:"inline-flex items-center gap-2 min-w-0",children:[e.jsx(m.HiCalendarDays,{className:"w-4 h-4 text-[var(--text-muted)]"}),e.jsx("span",{className:"truncate",children:yt(t)})]}),e.jsx(m.HiChevronDown,{className:`w-4 h-4 text-[var(--text-muted)] transition-transform ${c?"rotate-180":""}`})]}),c&&e.jsx("div",{className:"absolute z-50",style:{...M.horizontal==="left"?{left:0}:{right:0},...M.vertical==="bottom"?{top:"calc(100% + 8px)"}:{bottom:"calc(100% + 8px)"}},children:q})]}):q}function Fe(t){if(t!==void 0)return typeof t=="number"?`${t}px`:t}function ke({value:t,onChange:r,options:a,placeholder:n="Seleccionar…",emptyLabel:l,disabled:u=!1,className:f="",style:p,height:c=44,padding:d="0 12px",searchable:w=!0,minOptionsForSearch:M=6}){const[k,b]=i.useState(!1),[v,g]=i.useState(""),[S,L]=i.useState(-1),[V,Y]=i.useState(!1),[C,$]=i.useState({}),H=i.useRef(null),D=i.useRef(null),F=i.useRef(null),I=i.useRef(null),T=w&&a.length>=M,A=a.find(o=>o.value===t)??null,X=T&&v.trim()?a.filter(o=>{var x;return o.label.toLowerCase().includes(v.toLowerCase())||((x=o.sublabel)==null?void 0:x.toLowerCase().includes(v.toLowerCase()))}):a,z=i.useCallback(()=>{const o=H.current;if(!o)return;const x=o.getBoundingClientRect(),O=T?272:212,U=window.innerHeight-x.bottom,W=U<O&&x.top>U;$({position:"fixed",left:x.left,top:W?void 0:x.bottom+4,bottom:W?window.innerHeight-x.top+4:void 0,width:x.width,zIndex:9999})},[T]);i.useEffect(()=>Y(!0),[]),i.useEffect(()=>{if(!k)return;function o(x){var U,W;const O=x.target;!((U=H.current)!=null&&U.contains(O))&&!((W=D.current)!=null&&W.contains(O))&&(b(!1),g(""))}return document.addEventListener("mousedown",o),()=>document.removeEventListener("mousedown",o)},[k]),i.useEffect(()=>{k&&(L(-1),z(),T&&setTimeout(()=>{var o;return(o=F.current)==null?void 0:o.focus()},0))},[k,T,z]),i.useEffect(()=>{if(k)return window.addEventListener("resize",z),window.addEventListener("scroll",z,!0),()=>{window.removeEventListener("resize",z),window.removeEventListener("scroll",z,!0)}},[k,z]),i.useEffect(()=>{if(S<0||!I.current)return;const o=I.current.children[S];o==null||o.scrollIntoView({block:"nearest"})},[S]);const G=i.useCallback(o=>{r(o),b(!1),g("")},[r]);function j(o){if(!k){(o.key==="Enter"||o.key===" "||o.key==="ArrowDown")&&(o.preventDefault(),b(!0));return}o.key==="Escape"?(o.preventDefault(),b(!1),g("")):o.key==="ArrowDown"?(o.preventDefault(),L(x=>Math.min(x+1,X.length-1))):o.key==="ArrowUp"?(o.preventDefault(),L(x=>Math.max(x-1,l?-1:0))):o.key==="Enter"&&(o.preventDefault(),S===-1&&l?G(""):X[S]&&G(X[S].value))}const q=e.jsxs("div",{ref:D,className:"rounded-xl shadow-xl overflow-hidden",style:{...C,background:"var(--bg-card)",border:"1px solid var(--border)"},children:[T&&e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2",style:{borderBottom:"1px solid var(--border)"},children:[e.jsx(m.HiMagnifyingGlass,{className:"w-3.5 h-3.5 flex-shrink-0",style:{color:"var(--text-muted)"}}),e.jsx("input",{ref:F,value:v,onChange:o=>{g(o.target.value),L(-1)},placeholder:"Buscar…",className:"min-w-0 flex-1 text-sm bg-transparent outline-none",style:{color:"var(--text-main)"}}),v&&e.jsx("button",{type:"button",onMouseDown:o=>{o.preventDefault(),g("")},children:e.jsx(m.HiXMark,{className:"w-3.5 h-3.5",style:{color:"var(--text-muted)"}})})]}),e.jsxs("ul",{ref:I,role:"listbox",className:"overflow-y-auto",style:{maxHeight:T?220:180,scrollbarWidth:"thin",scrollbarColor:"var(--border) transparent",overscrollBehavior:"contain"},children:[l&&e.jsx("li",{role:"option","aria-selected":t==="",onMouseDown:o=>{o.preventDefault(),G("")},onMouseEnter:()=>L(-1),className:"flex items-center gap-2 px-3 py-2 cursor-pointer text-sm transition-colors",style:{background:S===-1?"var(--bg-hover)":"transparent",color:"var(--text-muted)",fontStyle:"italic"},children:l}),X.map((o,x)=>{const U=x===S,W=o.value===t;return e.jsxs("li",{role:"option","aria-selected":W,onMouseDown:Z=>{Z.preventDefault(),o.disabled||G(o.value)},onMouseEnter:()=>!o.disabled&&L(x),className:"flex items-center gap-2 px-3 py-2 cursor-pointer text-sm transition-colors",style:{background:U?"var(--bg-hover)":W?"color-mix(in srgb, var(--primary) 6%, transparent)":"transparent",color:o.disabled?"var(--text-muted)":"var(--text-main)",cursor:o.disabled?"not-allowed":"pointer",boxShadow:W?"inset 2px 0 0 var(--primary)":void 0},children:[o.color&&e.jsx("span",{className:"flex-shrink-0 w-2.5 h-2.5 rounded-full",style:{background:o.color}}),e.jsxs("span",{className:"min-w-0 flex flex-1 items-baseline gap-1 overflow-hidden",children:[e.jsx("span",{className:"truncate",children:o.label}),o.sublabel&&e.jsx("span",{className:"min-w-0 flex-shrink truncate",style:{color:"var(--text-muted)",fontSize:12},children:o.sublabel})]}),o.badge&&e.jsx("span",{className:"text-xs flex-shrink-0",style:{color:"var(--text-muted)"},children:o.badge})]},o.value)}),X.length===0&&e.jsx("li",{className:"px-3 py-4 text-sm text-center",style:{color:"var(--text-muted)"},children:"Sin resultados"})]})]});return e.jsxs("div",{ref:H,className:`relative ${f||"w-full"}`,style:p,onKeyDown:j,children:[e.jsxs("button",{type:"button",disabled:u,onClick:()=>!u&&b(o=>!o),className:"flex w-full items-center gap-2 rounded-lg text-left text-sm transition-colors focus:outline-none",style:{height:Fe(c),padding:Fe(d),background:"var(--bg-input)",color:A?"var(--text-main)":"var(--text-muted)",border:k?"1px solid var(--primary)":"1px solid var(--border)",opacity:u?.5:1,cursor:u?"not-allowed":"pointer"},"aria-haspopup":"listbox","aria-expanded":k,children:[(A==null?void 0:A.color)&&e.jsx("span",{className:"flex-shrink-0 w-2.5 h-2.5 rounded-full",style:{background:A.color}}),e.jsx("span",{className:"min-w-0 flex flex-1 items-baseline gap-1 overflow-hidden",children:A?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"truncate",children:A.label}),A.sublabel&&e.jsx("span",{className:"min-w-0 flex-shrink truncate",style:{color:"var(--text-muted)",fontSize:12},children:A.sublabel})]}):e.jsx("span",{className:"truncate",children:n})}),A&&l?e.jsx("span",{role:"button",tabIndex:-1,onMouseDown:o=>{o.preventDefault(),o.stopPropagation(),G("")},className:"flex-shrink-0 rounded-full p-0.5 transition-colors hover:bg-black/10",style:{color:"var(--text-muted)"},children:e.jsx(m.HiXMark,{className:"w-3 h-3"})}):e.jsx(m.HiChevronDown,{className:"flex-shrink-0 w-4 h-4 transition-transform",style:{color:"var(--text-muted)",transform:k?"rotate(180deg)":"rotate(0deg)"}})]}),k&&V&&he.createPortal(q,document.body)]})}function be(t){if(t!==void 0)return typeof t=="number"?`${t}px`:t}function kt({value:t,onChange:r,placeholder:a="Buscar...",className:n="",height:l=44,padding:u="0 12px 0 34px",iconLeft:f=12}){return e.jsxs("div",{className:`relative ${n}`,children:[e.jsx(m.HiMagnifyingGlass,{className:"absolute top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-[var(--text-muted)] pointer-events-none",style:{left:be(f)}}),e.jsx("input",{type:"text",value:t,onChange:p=>r(p.target.value),placeholder:a,className:"w-full rounded-lg border border-[var(--border)] [background:var(--bg-card)] text-sm text-[var(--text-main)] placeholder:text-[var(--text-muted)] outline-none transition-[border-color,box-shadow] focus:border-primary focus:ring-2 focus:ring-primary/20",style:{height:be(l),padding:be(u)}})]})}function Nt({value:t,onChange:r,options:a,placeholder:n,icon:l,className:u="",height:f=44,padding:p,iconLeft:c=12,searchable:d=!0}){const w=l?a.map((M,k)=>k===0&&!M.color?{...M,sublabel:M.sublabel??void 0}:M):a;return e.jsxs("div",{className:`relative ${u}`,children:[l&&e.jsx("span",{className:"pointer-events-none absolute top-1/2 z-10 -translate-y-1/2 text-[var(--text-muted)]",style:{left:be(c)},children:l}),e.jsx(ke,{value:t,onChange:r,options:w,placeholder:n,searchable:d,minOptionsForSearch:5,height:f,padding:p??(l?"0 12px 0 34px":"0 12px"),className:"[&>button]:text-sm [&>button]:[background:var(--bg-card)]"})]})}const St={sm:"24rem",md:"28rem",lg:"32rem",xl:"40rem","2xl":"48rem","4xl":"56rem","5xl":"64rem"},me=180;function We({open:t,onClose:r,title:a,subtitle:n,leadingIcon:l,headerActions:u,footer:f,children:p,size:c="md",maxWidth:d,zIndex:w=1e3,closeOnBackdrop:M=!0,closeOnEscape:k=!0,showCloseButton:b=!0,placement:v="center",bodyClassName:g="px-6 py-5",panelClassName:S="",backdropClassName:L="bg-black/50 backdrop-blur-sm",contentClassName:V="p-4",ariaLabel:Y,frameless:C=!1}){const[$,H]=i.useState(!1),[D,F]=i.useState(!1),I=i.useRef(null);if(i.useEffect(()=>(t?(I.current&&clearTimeout(I.current),H(!0),requestAnimationFrame(()=>requestAnimationFrame(()=>F(!0)))):(F(!1),I.current=setTimeout(()=>H(!1),me+40)),()=>{I.current&&clearTimeout(I.current)}),[t]),i.useEffect(()=>{if(t)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[t]),i.useEffect(()=>{if(!t||!k)return;const j=q=>{q.key==="Escape"&&r()};return window.addEventListener("keydown",j),()=>window.removeEventListener("keydown",j)},[k,r,t]),!$)return null;const T=a||n||l||u||b,A=d??St[c],X=v==="bottom-mobile"?"items-end sm:items-center justify-center p-0 sm:p-4":"items-center justify-center",z=v==="bottom-mobile"?"rounded-t-2xl sm:rounded-2xl":"rounded-2xl",G=D?"translateY(0) scale(1)":v==="bottom-mobile"?"translateY(16px) scale(0.98)":"translateY(10px) scale(0.96)";return he.createPortal(e.jsxs("div",{role:"dialog","aria-modal":"true","aria-label":Y??a,className:`fixed inset-0 flex ${X} ${V}`,style:{zIndex:w},children:[e.jsx("div",{className:`absolute inset-0 ${L}`,onClick:M?r:void 0,style:{opacity:D?1:0,transition:`opacity ${me}ms ease`}}),e.jsxs("div",{className:`relative z-10 flex max-h-[92dvh] w-full flex-col overflow-hidden ${C?"shadow-none":"shadow-2xl"} ${z} ${S}`,style:{maxWidth:A,background:C?"transparent":"var(--bg-card)",border:C?"none":"1px solid var(--border)",opacity:D?1:0,transform:G,transition:`opacity ${me}ms ease, transform ${me}ms ease`},onClick:j=>j.stopPropagation(),children:[T&&e.jsxs("div",{className:"flex flex-shrink-0 items-center justify-between gap-3 px-6 py-4",style:{borderBottom:"1px solid var(--border)"},children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[l&&e.jsx("div",{className:"flex-shrink-0",children:l}),(a||n)&&e.jsxs("div",{className:"min-w-0",children:[a&&e.jsx("h2",{className:"truncate text-base font-semibold",style:{color:"var(--text-main)"},children:a}),n&&e.jsx("p",{className:"truncate text-xs",style:{color:"var(--text-muted)"},children:n})]})]}),e.jsxs("div",{className:"flex flex-shrink-0 items-center gap-2",children:[u,b&&e.jsx(ee,{variant:"icon",onClick:r,title:"Cerrar",children:e.jsx(m.HiXMark,{className:"h-5 w-5"})})]})]}),e.jsx("div",{className:`min-h-0 flex-1 overflow-y-auto ${g}`,children:p}),f&&e.jsx("div",{className:"flex flex-shrink-0 justify-end gap-2 px-6 py-4",style:{borderTop:"1px solid var(--border)"},children:f})]})]}),document.body)}const Ct={danger:{iconBg:"rgba(239,68,68,0.12)",iconColor:"var(--danger)",btnBg:"var(--danger)",btnColor:"#fff"},warning:{iconBg:"rgba(245,158,11,0.12)",iconColor:"var(--warning)",btnBg:"var(--warning)",btnColor:"#fff"},primary:{iconBg:"rgba(59,130,246,0.12)",iconColor:"var(--primary)",btnBg:"var(--primary)",btnColor:"#fff"}};function Et({open:t,title:r,description:a,confirmLabel:n="Confirmar",cancelLabel:l="Cancelar",variant:u="danger",onConfirm:f,onCancel:p}){const c=Ct[u];return e.jsxs(We,{open:t,onClose:p,size:"sm",zIndex:9998,showCloseButton:!1,bodyClassName:"p-6",panelClassName:"px-1",ariaLabel:r,children:[e.jsx(ee,{variant:"icon",onClick:p,className:"absolute right-3 top-3 h-7 w-7 hover:opacity-70",style:{color:"var(--text-muted)"},"aria-label":"Cancelar",children:e.jsx(m.HiXMark,{className:"h-4 w-4"})}),e.jsx("div",{className:"mb-4 flex h-11 w-11 items-center justify-center rounded-xl",style:{background:c.iconBg},children:e.jsx(m.HiExclamationTriangle,{className:"h-5 w-5",style:{color:c.iconColor}})}),e.jsx("h2",{className:"mb-1 text-base font-semibold",style:{color:"var(--text-main)"},children:r}),a&&e.jsx("p",{className:"text-sm",style:{color:"var(--text-muted)"},children:a}),e.jsxs("div",{className:"mt-6 flex gap-2",children:[e.jsx(ee,{variant:"secondary",onClick:p,className:"flex-1",style:{background:"var(--bg-input)"},children:l}),e.jsx(ee,{variant:"danger",onClick:f,className:"flex-1",style:{background:c.btnBg,color:c.btnColor,borderColor:"transparent"},children:n})]})]})}function Mt(t){var n;const r=Array.from(t.querySelectorAll("*")).filter(l=>{var u;return l.scrollWidth>l.clientWidth&&!!((u=l.textContent)!=null&&u.trim())&&l.tagName.toLowerCase()!=="svg"&&!l.closest("svg")});return(t.scrollWidth>t.clientWidth||r.length>0)&&(((n=r[0])==null?void 0:n.textContent)??t.textContent??"").trim()||null}function _e({children:t,content:r,onlyWhenOverflow:a=!1,className:n="",style:l,as:u="div"}){const f=i.useRef(null),p=i.useRef(null),[c,d]=i.useState(null),[w,M]=i.useState("");i.useEffect(()=>{const v=f.current;v&&(v.querySelectorAll("[title]").forEach(g=>{const S=g.getAttribute("title");S&&(g.getAttribute("aria-label")||g.setAttribute("aria-label",S),g.removeAttribute("title"))}),v.querySelectorAll("svg title").forEach(g=>g.remove()))}),i.useLayoutEffect(()=>{if(!c)return;const v=p.current;if(!v)return;const g=12,S=14,L=v.getBoundingClientRect(),V=window.innerWidth-L.width-g,Y=window.innerHeight-L.height-g;let C=c.mouseX+S,$=c.mouseY+S;C>V&&(C=c.mouseX-L.width-S),$>Y&&($=c.mouseY-L.height-S),C=Math.min(Math.max(g,C),Math.max(g,V)),$=Math.min(Math.max(g,$),Math.max(g,Y)),(Math.abs(C-c.x)>.5||Math.abs($-c.y)>.5)&&d(H=>H&&{...H,x:C,y:$})},[c]);const k=(v,g)=>{const S=f.current;if(S){if(a){const L=Mt(S);if(!L)return;M(L)}!a&&!r||d({mouseX:v,mouseY:g,x:v+14,y:g+14})}},b=a?w:r;return e.jsxs(e.Fragment,{children:[e.jsx(u,{ref:v=>{f.current=v},className:n,style:l,onMouseEnter:v=>k(v.clientX,v.clientY),onMouseMove:v=>{c&&k(v.clientX,v.clientY)},onMouseLeave:()=>d(null),children:t}),c&&b?he.createPortal(e.jsx("div",{ref:p,role:"tooltip",style:{position:"fixed",top:c.y,left:c.x,zIndex:9999,background:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:6,padding:"5px 10px",fontSize:12,color:"var(--text-main)",boxShadow:"0 4px 16px rgba(0,0,0,0.35)",pointerEvents:"none",maxWidth:"min(420px, calc(100vw - 24px))",whiteSpace:"normal",lineHeight:1.6,overflowWrap:"anywhere"},children:b}),document.body):null]})}const $t="[&_button]:h-7 [&_button]:min-h-0 [&_button]:gap-1 [&_button]:px-2 [&_button]:text-xs [&_button_svg]:h-3.5 [&_button_svg]:w-3.5 [&_button[data-icon=true]]:w-7 [&_button[data-icon=true]]:px-0";function de(t){if(!t)return 150;const r=parseInt(t,10);return isNaN(r)||r<=0?150:r}function ae(t,r){const a=t.minWidth??80,n=t.maxWidth??1/0;return Math.min(n,Math.max(a,r))}function Ht(t,r){if(r<=7)return Array.from({length:r},(n,l)=>l+1);const a=[1];t>3&&a.push("...");for(let n=Math.max(2,t-1);n<=Math.min(r-1,t+1);n++)a.push(n);return t<r-2&&a.push("..."),a.push(r),a}function je({children:t,className:r="",style:a}){return e.jsx(_e,{onlyWhenOverflow:!0,className:r,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"100%",...a},children:t})}function Lt({columns:t,data:r,getRowId:a,loading:n=!1,skeletonRows:l=8,emptyIcon:u,emptyText:f="Sin resultados",onRowClick:p,selected:c,onToggleOne:d,onToggleAll:w,highlightSelected:M=!0,rowClassName:k,stickyHeader:b=!0,pageSize:v=25,pageSizeOptions:g=[25,50,100],pageSizeSelectWidth:S=62,pageSizeSelectHeight:L=30,pageSizeSelectPadding:V="0 7px",totalRows:Y,page:C,onPageChange:$,onPageSizeChange:H,storageKey:D,stickyFirstColumn:F=!1,bottomOffset:I=0,compact:T=!0,restrictHeight:A=!0}){const X=t.map(s=>s.key).join(","),[z,G]=i.useState(!D),j=i.useRef(null),q=i.useRef(!D),o=(s,h)=>50+(s*17+h*13+7)%40,x=i.useRef(null),[O,U]=i.useState(void 0),[W,Z]=i.useState(!1);i.useEffect(()=>{const h=v!==!1?32:0,y=12;function E(){if(Z(window.innerWidth<640),!x.current)return;const B=x.current.getBoundingClientRect().top;U(Math.max(120,window.innerHeight-B-h-y-I))}return E(),window.addEventListener("resize",E),()=>window.removeEventListener("resize",E)},[n,v,I]);const[R,ne]=i.useState(()=>t.map(s=>s.key)),[ie,ge]=i.useState(()=>Object.fromEntries(t.map(s=>[s.key,ae(s,de(s.width))])));i.useEffect(()=>{const s=t.map(y=>y.key);if(!D){ne(s),q.current=!1,G(!0);return}let h=!1;return q.current=!1,G(!1),fetch(`/api/user/preferences/datatables?key=${encodeURIComponent(D)}`,{cache:"no-store"}).then(y=>y.ok?y.json():null).then(y=>{var it,lt;if(h)return;const E=(it=y==null?void 0:y.settings)==null?void 0:it.columnOrder,B=Array.isArray(E)?E.filter(K=>s.includes(K)):[],J=s.filter(K=>!B.includes(K)),P=B.length>0?[...B,...J]:s,ce=Object.fromEntries(t.map(K=>[K.key,ae(K,de(K.width))])),_=((lt=y==null?void 0:y.settings)==null?void 0:lt.columnWidths)??{},st=Object.fromEntries(t.map(K=>[K.key,ae(K,_[K.key]??ce[K.key])]));ne(P),ge(st),j.current=JSON.stringify({columnOrder:P,columnWidths:st}),q.current=!0}).catch(()=>{if(!h){ne(s);const y=Object.fromEntries(t.map(E=>[E.key,ae(E,de(E.width))]));ge(y),j.current=JSON.stringify({columnOrder:s,columnWidths:y}),q.current=!0}}).finally(()=>{h||G(!0)}),()=>{h=!0}},[D,X,t]),i.useEffect(()=>{if(!D||!z||!q.current)return;const s={columnOrder:R,columnWidths:ie},h=JSON.stringify(s);if(h===j.current)return;const y=window.setTimeout(()=>{fetch("/api/user/preferences/datatables",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:D,settings:s})}).then(E=>{E.ok&&(j.current=h)}).catch(()=>{})},300);return()=>window.clearTimeout(y)},[R,ie,D,z]),i.useEffect(()=>{ne(s=>{const h=t.map(B=>B.key),y=s.filter(B=>h.includes(B)),E=h.filter(B=>!y.includes(B));return[...y,...E]})},[X,t]);const fe=R.map(s=>t.find(h=>h.key===s)).filter(s=>!!s);i.useEffect(()=>{ge(s=>{const h=Object.fromEntries(t.map(y=>[y.key,ae(y,de(y.width))]));return Object.fromEntries(t.map(y=>[y.key,ae(y,s[y.key]??h[y.key])]))})},[X,t]);const ve=i.useRef(null);i.useEffect(()=>{function s(y){const E=ve.current;if(!E)return;const B=y.clientX-E.startX,J=t.find(P=>P.key===E.colKey);J&&ge(P=>({...P,[E.colKey]:ae(J,E.startWidth+B)}))}function h(){ve.current&&(ve.current=null,document.body.style.cursor="",document.body.style.userSelect="")}return document.addEventListener("pointermove",s),document.addEventListener("pointerup",h),()=>{document.removeEventListener("pointermove",s),document.removeEventListener("pointerup",h)}},[t]);const xe=i.useRef(null),[tt,Ee]=i.useState(null);function lr(s,h){xe.current=s,h.dataTransfer.effectAllowed="move"}function cr(s,h){h.preventDefault(),h.dataTransfer.dropEffect="move",tt!==s&&Ee(s)}function dr(s,h){h.preventDefault();const y=xe.current;y!==null&&y!==s&&ne(E=>{const B=[...E],[J]=B.splice(y,1);return B.splice(s,0,J),B}),xe.current=null,Ee(null)}function ur(){xe.current=null,Ee(null)}const[re,fr]=i.useState(null);function pr(s){s.sortKey&&fr(h=>(h==null?void 0:h.key)===s.key?{key:s.key,dir:h.dir==="asc"?"desc":"asc"}:{key:s.key,dir:"asc"})}const[hr,Me]=i.useState(1),[rt,br]=i.useState(v===!1?0:v);i.useEffect(()=>{Me(1)},[r]);const le=!!($&&H),oe=v!==!1,Q=le?C??1:hr,se=le||oe?rt:r.length,te=!!c&&!!d&&!!w,$e=te?40:0,mr=te&&r.length>0&&c.size===r.length,gr=te&&c.size>0&&c.size<r.length,He=i.useMemo(()=>{if(!re)return r;const s=t.find(h=>h.key===re.key&&h.sortKey);return s!=null&&s.sortKey?[...r].sort((h,y)=>{const E=h[s.sortKey],B=y[s.sortKey],J=E===B?0:E==null?1:B==null||E<B?-1:1;return re.dir==="asc"?J:-J}):r},[r,re,t]),vr=i.useMemo(()=>{if(le||!oe)return He;const s=(Q-1)*se;return He.slice(s,s+se)},[He,le,oe,Q,se]),pe=Y??r.length,Le=oe?Math.max(1,Math.ceil(pe/se)):1,xr=oe?(Q-1)*se+1:1,yr=oe?Math.min(Q*se,pe):pe;function Te(s){const h=Math.max(1,Math.min(s,Le));le?$(h):Me(h)}function wr(s){br(s),le?(H(s),$(1)):Me(1),H&&H(s)}const at=s=>s==="center"?"text-center":s==="right"?"text-right":"text-left",kr="color-mix(in srgb, var(--primary) 6%, var(--bg-card))",nt=()=>e.jsxs("tr",{style:{background:"color-mix(in srgb, var(--bg-input) 72%, transparent)"},children:[te&&e.jsx("th",{className:`${T?"px-2 py-1.5":"px-3 py-2.5"} w-10`,style:F?{position:"sticky",left:0,zIndex:12,background:"color-mix(in srgb, var(--bg-input) 72%, transparent)",backdropFilter:"blur(14px)",WebkitBackdropFilter:"blur(14px)",boxShadow:"inset 0 -2px 0 var(--border)",borderRight:"1px solid var(--border)"}:{borderBottom:"2px solid var(--border)",borderRight:"1px solid var(--border)"},children:e.jsx("input",{type:"checkbox",checked:mr,ref:s=>{s&&(s.indeterminate=gr)},onChange:w,className:"rounded cursor-pointer accent-[var(--primary)]"})}),fe.map((s,h)=>{const y=(re==null?void 0:re.key)===s.key,E=!!s.sortKey,B=F&&!W&&h===0,J=tt===h,ce=(ie[s.key]??de(s.width))<120;return e.jsxs("th",{className:`group select-none ${ce?"text-left":at(s.align)}`,style:{...B?{position:"sticky",left:$e,zIndex:12,background:"color-mix(in srgb, var(--bg-input) 72%, transparent)",backdropFilter:"blur(14px)",WebkitBackdropFilter:"blur(14px)",boxShadow:"3px 0 6px -2px rgba(0,0,0,0.12), inset 0 -2px 0 var(--border)",borderRight:"1px solid var(--border)"}:{position:"relative",borderBottom:"2px solid var(--border)",borderRight:"1px solid var(--border)"},color:y?"var(--primary)":"var(--text-muted)",whiteSpace:"nowrap",transition:"color 0.15s",borderLeft:J?"2px solid var(--primary)":"2px solid transparent",cursor:E?"pointer":"default",padding:T?"5px 24px 5px 6px":"7px 28px 7px 6px"},onDragOver:_=>cr(h,_),onDrop:_=>dr(h,_),onClick:E?()=>pr(s):void 0,children:[e.jsx("span",{draggable:!0,onDragStart:_=>{_.stopPropagation(),lr(h,_)},onDragEnd:_=>{_.stopPropagation(),ur()},onClick:_=>_.stopPropagation(),title:"Arrastrar para reordenar",className:"inline-flex items-center mr-1 opacity-0 group-hover:opacity-40 transition-opacity",style:{cursor:"grab",color:"var(--text-muted)",verticalAlign:"middle"},children:e.jsx(ct.MdDragIndicator,{size:15})}),e.jsx(je,{className:"inline-block max-w-full align-middle",style:{width:"calc(100% - 22px)",textAlign:ce?"left":s.align==="center"?"center":s.align==="right"?"right":"left"},children:e.jsxs("span",{className:`inline-flex max-w-full items-center gap-1 font-semibold uppercase tracking-wider ${T?"text-[11px]":"text-xs"}`,children:[e.jsx("span",{className:"min-w-0 truncate",children:s.header}),E&&e.jsx("span",{className:"flex-shrink-0 opacity-60",children:y?re.dir==="asc"?e.jsx(m.HiChevronUp,{className:"w-3 h-3"}):e.jsx(m.HiChevronDown,{className:"w-3 h-3"}):e.jsx(m.HiChevronUpDown,{className:"w-3 h-3 opacity-40"})})]})}),e.jsx("span",{role:"separator","aria-orientation":"vertical",title:"Arrastrar para redimensionar",onPointerDown:_=>{_.preventDefault(),_.stopPropagation(),ve.current={colKey:s.key,startX:_.clientX,startWidth:ie[s.key]??150},document.body.style.cursor="col-resize",document.body.style.userSelect="none"},onClick:_=>_.stopPropagation(),className:"absolute right-0 top-0 h-full flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",style:{width:12,cursor:"col-resize",zIndex:3},children:e.jsx("span",{style:{width:3,height:"40%",borderRadius:2,background:"var(--primary)",display:"block"}})})]},s.key)})]}),ot=()=>{if(!oe||n)return null;const s=Ht(Q,Le);return e.jsxs("div",{className:`flex items-center justify-between gap-2 rounded-b-xl border-t text-xs select-none ${T?"px-2 py-0.5":"px-3 py-1"}`,style:{borderColor:"var(--border)",background:"var(--bg-input)"},children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx("span",{style:{color:"var(--text-muted)"},children:pe===0?"0 filas":`${xr}–${yr} de ${pe}`}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{style:{color:"var(--text-muted)"},children:"Filas:"}),e.jsx(ke,{value:String(se),onChange:h=>wr(Number(h)),options:g.map(h=>({value:String(h),label:String(h)})),placeholder:"Filas",searchable:!1,height:L,padding:V,className:"shrink-0 [&>button]:rounded-md [&>button]:text-xs [&_svg]:h-3.5 [&_svg]:w-3.5",style:{width:S}})]})]}),e.jsxs("div",{className:"flex items-center gap-0.5",children:[e.jsx("button",{disabled:Q<=1,onClick:()=>Te(Q-1),className:"rounded p-0.5 transition-colors disabled:opacity-30",style:{color:"var(--text-muted)",background:"transparent"},children:e.jsx(m.HiChevronLeft,{className:"h-3.5 w-3.5"})}),s.map((h,y)=>h==="..."?e.jsx("span",{className:"px-1",style:{color:"var(--text-muted)"},children:"…"},`e${y}`):e.jsx("button",{onClick:()=>Te(h),className:"h-5 w-5 rounded text-[11px] font-medium transition-colors",style:{background:h===Q?"var(--primary)":"transparent",color:h===Q?"var(--primary-fg)":"var(--text-muted)"},children:h},h)),e.jsx("button",{disabled:Q>=Le,onClick:()=>Te(Q+1),className:"rounded p-0.5 transition-colors disabled:opacity-30",style:{color:"var(--text-muted)",background:"transparent"},children:e.jsx(m.HiChevronRight,{className:"h-3.5 w-3.5"})})]})]})};return n&&r.length===0?e.jsxs("div",{className:"w-full flex flex-col rounded-xl overflow-visible",style:{border:"1px solid var(--border)"},children:[e.jsx("div",{ref:x,className:"overflow-hidden rounded-t-xl",children:e.jsx(Be.OverlayScrollbarsComponent,{options:{scrollbars:{autoHide:"leave",autoHideDelay:200}},className:"w-full",style:{maxHeight:A?O:void 0},defer:!0,children:e.jsxs("table",{className:"text-sm",style:{tableLayout:"fixed",width:"100%",minWidth:"max-content",borderCollapse:"separate",borderSpacing:0},children:[e.jsxs("colgroup",{children:[te&&e.jsx("col",{style:{width:40}}),fe.map(s=>e.jsx("col",{style:{width:ie[s.key]??150}},s.key))]}),e.jsx("thead",{style:b?{position:"sticky",top:0,zIndex:10,backdropFilter:"blur(14px)",WebkitBackdropFilter:"blur(14px)"}:void 0,children:nt()}),e.jsx("tbody",{children:Array.from({length:l}).map((s,h)=>e.jsxs("tr",{children:[te&&e.jsx("td",{className:`${T?"px-2 py-1.5":"px-3 py-2"} w-10`,style:{borderBottom:"1px solid var(--border)",borderRight:"1px solid var(--border)"}}),fe.map((y,E)=>{const B=F&&!W&&E===0;return e.jsx("td",{className:T?"px-2 py-1.5":"px-3 py-2",style:B?{position:"sticky",left:$e,zIndex:1,background:"color-mix(in srgb, var(--bg-card) 72%, transparent)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",boxShadow:"3px 0 6px -2px rgba(0,0,0,0.12), inset 0 -1px 0 var(--border)",borderRight:"1px solid var(--border)"}:{borderBottom:"1px solid var(--border)",borderRight:"1px solid var(--border)"},children:e.jsx("div",{className:"h-3.5 rounded-full animate-pulse",style:{background:"var(--border)",width:`${o(h,E)}%`,minWidth:32}})},y.key)})]},h))})]})})}),ot()]}):!n&&r.length===0?e.jsxs("div",{className:"py-20 flex flex-col items-center gap-3",children:[u&&e.jsx("div",{style:{color:"var(--text-muted)",opacity:.5},children:u}),e.jsx("p",{className:"text-sm",style:{color:"var(--text-muted)"},children:f})]}):e.jsxs("div",{className:"w-full flex flex-col rounded-xl overflow-visible",style:{border:"1px solid var(--border)"},children:[e.jsx("div",{ref:x,className:"overflow-hidden rounded-t-xl",children:e.jsx(Be.OverlayScrollbarsComponent,{options:{scrollbars:{autoHide:"leave",autoHideDelay:200}},className:"w-full",style:{maxHeight:A?O:void 0},defer:!0,children:e.jsxs("table",{className:"text-sm",style:{tableLayout:"fixed",width:"100%",minWidth:"max-content",borderCollapse:"separate",borderSpacing:0},children:[e.jsxs("colgroup",{children:[te&&e.jsx("col",{style:{width:40}}),fe.map(s=>e.jsx("col",{style:{width:ie[s.key]??150}},s.key))]}),e.jsx("thead",{style:b?{position:"sticky",top:0,zIndex:10,backdropFilter:"blur(14px)",WebkitBackdropFilter:"blur(14px)"}:void 0,children:nt()}),e.jsx("tbody",{children:vr.map((s,h)=>{const y=a(s),E=te&&c.has(y),B=!!p,J=E&&M?"color-mix(in srgb, var(--primary) 8%, var(--bg-card))":h%2===1?"color-mix(in srgb, var(--bg-input) 50%, var(--bg-card))":"var(--bg-card)";return e.jsxs("tr",{onClick:B?()=>p(s):void 0,className:`transition-colors ${B?"cursor-pointer":""} ${k?k(s):""}`,style:{"--dt-row-bg":J,"--dt-sticky-bg":J,background:"var(--dt-row-bg)"},onMouseEnter:P=>{E||(P.currentTarget.style.setProperty("--dt-row-bg","var(--bg-hover)"),P.currentTarget.style.setProperty("--dt-sticky-bg",kr))},onMouseLeave:P=>{P.currentTarget.style.setProperty("--dt-row-bg",J),P.currentTarget.style.setProperty("--dt-sticky-bg",J)},children:[te&&e.jsx("td",{className:`${T?"px-2 py-1.5":"px-3 py-2"} w-10`,style:F?{position:"sticky",left:0,zIndex:3,background:"var(--dt-sticky-bg)",boxShadow:"inset 0 -1px 0 var(--border)"}:{borderBottom:"1px solid var(--border)",borderRight:"1px solid var(--border)"},onClick:P=>{P.stopPropagation(),d(y)},children:e.jsx("input",{type:"checkbox",checked:E,onClick:P=>P.stopPropagation(),onChange:()=>d(y),className:"rounded cursor-pointer accent-[var(--primary)]"})}),fe.map((P,ce)=>{const _=F&&!W&&ce===0;return e.jsx("td",{className:`${T?"px-2 py-1.5":"px-3 py-2"} ${$t} ${at(P.align)} ${P.className??""}`,style:{overflow:"hidden",whiteSpace:"nowrap",..._?{position:"sticky",left:$e,zIndex:3,background:"var(--dt-sticky-bg)",boxShadow:"3px 0 6px -2px rgba(0,0,0,0.12), inset 0 -1px 0 var(--border)",borderRight:"1px solid var(--border)"}:{borderBottom:"1px solid var(--border)",borderRight:"1px solid var(--border)"}},children:e.jsx(je,{children:P.cell(s)})},P.key)})]},y)})})]})})}),ot()]})}function ue(t){return t?new Date(`${t}T12:00:00`):void 0}function Ue(t){return t.toISOString().slice(0,10)}function Tt({calendarMonth:t,displayIndex:r}){const{previousMonth:a,nextMonth:n,goToMonth:l,months:u,labels:f,formatters:p}=Ae.useDayPicker(),c=!!a&&r===0,d=!!n&&r===u.length-1;return e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:8,width:"100%",color:"var(--text-main)",marginBottom:6},children:[e.jsx("span",{style:{fontWeight:700},children:p.formatCaption(t.date)}),e.jsx("button",{type:"button","aria-label":f.labelPrevious(a),onClick:()=>a&&l(a),disabled:!c,style:{height:28,width:28,borderRadius:8,border:"1px solid var(--border)",background:"var(--bg-card)",display:"inline-flex",alignItems:"center",justifyContent:"center",color:"var(--text-main)",opacity:c?1:.45,cursor:c?"pointer":"not-allowed"},children:e.jsx(m.HiChevronLeft,{size:16})}),e.jsx("button",{type:"button","aria-label":f.labelNext(n),onClick:()=>n&&l(n),disabled:!d,style:{height:28,width:28,borderRadius:8,border:"1px solid var(--border)",background:"var(--bg-card)",display:"inline-flex",alignItems:"center",justifyContent:"center",color:"var(--text-main)",opacity:d?1:.45,cursor:d?"pointer":"not-allowed"},children:e.jsx(m.HiChevronRight,{size:16})})]})}function Dt(t){return t.charAt(0).toUpperCase()+t.slice(1)}function Bt({startDate:t,endDate:r,onChange:a,minDate:n,viewMonth:l,numberOfMonths:u=1,showSummary:f=!0,startLabel:p="Inicio",endLabel:c="Regreso"}){const d={from:ue(t),to:ue(r)},w=ue(n),[M,k]=i.useState(ue(l||t));return i.useEffect(()=>{k(ue(l||t))},[l,t]),e.jsxs("div",{children:[e.jsx("div",{style:{borderRadius:10,overflow:"hidden",border:"1px solid var(--border)",background:"var(--bg-input)",display:"flex",justifyContent:"center",padding:"10px 8px"},children:e.jsx(Ae.DayPicker,{mode:"range",selected:d,month:M,onMonthChange:k,onSelect:b=>{const v=b!=null&&b.from?Ue(b.from):t,g=b!=null&&b.to?Ue(b.to):"";a({startDate:v,endDate:g})},numberOfMonths:u,hideNavigation:!0,disabled:w?{before:w}:void 0,showOutsideDays:!1,components:{MonthCaption:Tt},className:"text-sm",classNames:{root:"w-full",months:"flex gap-3 justify-center",month:"space-y-2",month_caption:"flex items-center justify-between px-1",caption_label:"capitalize",nav:"flex items-center gap-1",button_previous:"h-8 w-8 inline-flex items-center justify-center rounded-md transition-colors",button_next:"h-8 w-8 inline-flex items-center justify-center rounded-md transition-colors",month_grid:"w-full border-collapse",weekdays:"grid grid-cols-7 gap-1 mb-1",weekday:"text-[11px] font-semibold text-center",week:"grid grid-cols-7 gap-1",day:"h-9 w-9 p-0 flex items-center justify-center",day_button:"h-9 w-9 rounded-md text-sm font-medium transition-colors outline-none",selected:"font-semibold",range_start:"font-semibold",range_middle:"font-medium",range_end:"font-semibold",today:"font-bold",disabled:"opacity-40 cursor-not-allowed",hidden:"invisible"},styles:{month_caption:{color:"var(--text-main)",marginBottom:6,display:"flex",alignItems:"center",justifyContent:"space-between"},caption_label:{color:"var(--text-main)",fontWeight:700},nav:{position:"static",display:"flex",alignItems:"center",gap:6},weekday:{color:"var(--text-muted)",textTransform:"lowercase"},button_previous:{height:32,width:32,background:"var(--bg-card)",color:"var(--text-main)",border:"1px solid var(--border)"},button_next:{height:32,width:32,background:"var(--bg-card)",color:"var(--text-main)",border:"1px solid var(--border)"},day_button:{color:"var(--text-main)",borderRadius:8},chevron:{fill:"var(--text-main)"},today:{border:"1px solid color-mix(in srgb, var(--primary) 35%, transparent)"},disabled:{color:"var(--text-muted)"}},modifiersStyles:{selected:{background:"var(--primary)",color:"var(--primary-fg, #ffffff)"},range_start:{background:"var(--primary)",color:"var(--primary-fg, #ffffff)"},range_end:{background:"var(--primary)",color:"var(--primary-fg, #ffffff)"},range_middle:{background:"color-mix(in srgb, var(--primary) 20%, transparent)",color:"var(--text-main)"}},formatters:{formatCaption:b=>Dt(new Intl.DateTimeFormat("es-MX",{month:"long",year:"numeric"}).format(b)),formatWeekdayName:b=>new Intl.DateTimeFormat("es-MX",{weekday:"short"}).format(b)},labels:{labelMonthDropdown:()=>"Mes",labelYearDropdown:()=>"Año"}})}),f&&t&&e.jsxs("div",{style:{marginTop:8,fontSize:12,color:"var(--text-muted)",display:"flex",gap:8,flexWrap:"wrap"},children:[e.jsxs("span",{children:[p,":"," ",e.jsx("strong",{style:{color:"var(--text-main)"},children:t})]}),r&&e.jsxs("span",{children:[c,":"," ",e.jsx("strong",{style:{color:"var(--text-main)"},children:r})]})]})]})}function At({open:t,onClose:r,title:a,subtitle:n,leadingIcon:l,confirmLabel:u="Guardar",onConfirm:f,loading:p=!1,confirmDisabled:c=!1,headerActions:d,bodyClassName:w="flex-1 overflow-y-auto px-6 py-5",width:M=440,children:k}){const[b,v]=i.useState(!1);return i.useEffect(()=>{v(!0)},[]),i.useEffect(()=>(document.body.style.overflow=t?"hidden":"",()=>{document.body.style.overflow=""}),[t]),i.useEffect(()=>{if(!t)return;const g=S=>{S.key==="Escape"&&r()};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[t,r]),b?he.createPortal(e.jsxs("div",{"aria-hidden":!t,className:`fixed inset-0 z-[1000] flex transition-opacity duration-300 ${t?"opacity-100":"opacity-0 pointer-events-none"}`,children:[e.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:r}),e.jsxs("div",{className:`absolute inset-y-0 right-0 flex flex-col shadow-2xl transition-transform duration-300 ${t?"translate-x-0":"translate-x-full"}`,style:{width:`min(100vw, ${M}px)`,background:"var(--bg-card)",borderLeft:"1px solid var(--border)"},children:[e.jsxs("div",{className:"flex items-center justify-between px-6 py-4 flex-shrink-0",style:{borderBottom:"1px solid var(--border)"},children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx(ee,{variant:"icon",onClick:r,title:"Cerrar",children:e.jsx(m.HiXMark,{className:"w-5 h-5"})}),l&&e.jsx("div",{className:"flex-shrink-0",children:l}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h3",{className:"text-base font-semibold truncate",style:{color:"var(--text-main)"},children:a}),n&&e.jsx("p",{className:"text-xs truncate",style:{color:"var(--text-muted)"},children:n})]})]}),(d||f)&&e.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[d,f&&e.jsxs(e.Fragment,{children:[e.jsx(ee,{variant:"secondary",size:"sm",onClick:r,style:{background:"var(--bg-input)"},children:"Cancelar"}),e.jsx(ee,{variant:"primary",size:"sm",icon:e.jsx(dt.FiSave,{className:"w-4 h-4"}),onClick:f,loading:p,disabled:c,title:u})]})]})]}),e.jsx("div",{"data-drawer-scroll":"true",className:w,children:k})]})]}),document.body):null}function Ne({className:t="",...r}){return e.jsx("input",{...r,className:`h-11 rounded-lg border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-sm text-[var(--text-main)] outline-none placeholder:text-[var(--text-muted)] transition-colors focus:border-[var(--primary)] ${t}`})}function Ot({label:t,containerClassName:r="",helperText:a,error:n,labelAction:l,floatingLabel:u=!1,showPasswordToggle:f=!0,className:p="",required:c,...d}){const[w,M]=i.useState(()=>!!d.autoFocus),[k,b]=i.useState(!1),v=d.type==="password"&&f,g=v&&k?"text":d.type,S=d.value!==void 0?String(d.value).length>0:d.defaultValue!==void 0&&String(d.defaultValue).length>0,L=w||S,V={top:L?8:15,color:w?"var(--primary)":"var(--text-muted)",fontSize:L?11:14,fontWeight:L?600:400,textTransform:L?"uppercase":"none"},Y=$=>{var H;M(!0),(H=d.onFocus)==null||H.call(d,$)},C=$=>{var H;M(!1),(H=d.onBlur)==null||H.call(d,$)};return u?e.jsxs("label",{className:`flex flex-col gap-2 ${r}`,children:[e.jsxs("span",{className:"relative block",children:[e.jsx(Ne,{...d,type:g,required:c,placeholder:" ","aria-invalid":!!n||d["aria-invalid"],"data-has-value":S?"true":void 0,className:`h-12 w-full pt-5 ${v?"pr-10":""} ${p}`,onFocus:Y,onBlur:C}),e.jsxs("span",{className:"pointer-events-none absolute left-3 transition-all duration-150",style:V,children:[t,c&&e.jsx("span",{className:"ml-1 text-[var(--danger)]",children:"*"})]}),l&&e.jsx("span",{className:"absolute right-2 transition-all duration-150",style:{top:L?8:15},children:l}),v&&e.jsx("button",{type:"button","aria-label":k?"Ocultar contraseña":"Mostrar contraseña",className:"absolute right-3 top-1/2 -translate-y-1/2 transition-colors",style:{color:"var(--text-muted)"},tabIndex:-1,onClick:()=>b($=>!$),children:k?e.jsx(m.HiEyeSlash,{className:"h-[18px] w-[18px]"}):e.jsx(m.HiEye,{className:"h-[18px] w-[18px]"})})]}),n?e.jsx("span",{className:"text-xs font-medium normal-case text-[var(--danger)]",children:n}):a?e.jsx("span",{className:"text-xs font-medium normal-case text-[var(--text-muted)]",children:a}):null]}):e.jsxs("label",{className:`flex flex-col gap-2 ${r}`,children:[e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-semibold uppercase text-[var(--text-muted)]",children:[e.jsx("span",{children:t}),c&&e.jsx("span",{className:"text-[var(--danger)]",children:"*"}),l&&e.jsx("span",{className:"ml-auto normal-case",children:l})]}),e.jsx(Ne,{...d,required:c,"aria-invalid":!!n||d["aria-invalid"],className:p}),n?e.jsx("span",{className:"text-xs font-medium normal-case text-[var(--danger)]",children:n}):a?e.jsx("span",{className:"text-xs font-medium normal-case text-[var(--text-muted)]",children:a}):null]})}function zt({variant:t="page",title:r="Cargando...",rows:a=6,children:n}){return t==="table"?e.jsx(qe,{rows:a}):t==="sections"?e.jsx(It,{rows:a}):t==="cards"?e.jsx(Pt,{rows:a}):e.jsx("div",{className:"flex min-h-[240px] items-center justify-center rounded-lg border border-[var(--border)] bg-[var(--bg-card)] p-6",children:e.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[e.jsx("div",{className:"h-9 w-9 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--primary)]"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-[var(--text-main)]",children:r}),n&&e.jsx("div",{className:"mt-1 text-xs text-[var(--text-muted)]",children:n})]})]})})}function It({rows:t}){return e.jsx("div",{className:"space-y-4",children:Array.from({length:Math.max(2,Math.min(t,4))}).map((r,a)=>e.jsxs("section",{className:"overflow-hidden rounded-lg border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-[var(--border)] px-3 py-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"h-4 w-4 animate-pulse rounded bg-[var(--bg-input)]"}),e.jsx("div",{className:"h-4 w-32 animate-pulse rounded bg-[var(--bg-input)]"}),e.jsx("div",{className:"h-5 w-20 animate-pulse rounded-full bg-[var(--bg-input)]"})]}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx("div",{className:"h-8 w-8 animate-pulse rounded-md bg-[var(--bg-input)]"}),e.jsx("div",{className:"h-8 w-8 animate-pulse rounded-md bg-[var(--bg-input)]"})]})]}),e.jsx(qe,{rows:a===0?t:Math.max(3,t-2),compact:!0})]},a))})}function Pt({rows:t}){return e.jsx("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-3",children:Array.from({length:t}).map((r,a)=>e.jsxs("div",{className:"rounded-lg border border-[var(--border)] bg-[var(--bg-card)] p-4",children:[e.jsx("div",{className:"h-4 w-2/3 animate-pulse rounded bg-[var(--bg-input)]"}),e.jsx("div",{className:"mt-3 h-3 w-full animate-pulse rounded bg-[var(--bg-input)]"}),e.jsx("div",{className:"mt-2 h-3 w-4/5 animate-pulse rounded bg-[var(--bg-input)]"})]},a))})}function qe({rows:t,compact:r=!1}){const a=r?5:6;return e.jsxs("div",{className:"overflow-hidden rounded-lg border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsx("div",{className:"grid border-b border-[var(--border)]",style:{gridTemplateColumns:`repeat(${a}, minmax(0, 1fr))`},children:Array.from({length:a}).map((n,l)=>e.jsx("div",{className:"px-3 py-3",children:e.jsx("div",{className:"h-3 w-2/3 animate-pulse rounded bg-[var(--bg-input)]"})},l))}),Array.from({length:t}).map((n,l)=>e.jsx("div",{className:"grid border-b border-[var(--border)] last:border-b-0",style:{gridTemplateColumns:`repeat(${a}, minmax(0, 1fr))`},children:Array.from({length:a}).map((u,f)=>e.jsx("div",{className:"px-3 py-3",children:e.jsx("div",{className:"h-3.5 animate-pulse rounded-full bg-[var(--bg-input)]",style:{width:`${52+(l*13+f*11)%36}%`}})},f))},l))]})}const Ft={xs:{width:28,height:16,thumb:12,padding:2},sm:{width:36,height:20,thumb:16,padding:2}};function Wt({checked:t,disabled:r,onCheckedChange:a,size:n="sm",className:l="",...u}){const f=Ft[n],p=t?f.width-f.thumb-f.padding*2:0;return e.jsx("button",{...u,type:"button",role:"switch","aria-checked":t,disabled:r,onClick:()=>!r&&a(!t),className:`relative inline-flex shrink-0 items-center rounded-full transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--primary)]/50 disabled:cursor-not-allowed disabled:opacity-50 ${l}`,style:{width:f.width,height:f.height,background:t?"color-mix(in srgb, var(--primary) 85%, transparent)":"var(--bg-input)",border:t?"1px solid color-mix(in srgb, var(--primary) 55%, transparent)":"1px solid var(--border)"},children:e.jsx("span",{className:"absolute inline-block rounded-full transition-transform",style:{width:f.thumb,height:f.thumb,left:f.padding,top:"50%",transform:`translate(${p}px, -50%)`,background:t?"var(--primary-fg)":"var(--text-muted)"}})})}const Ye=[".sidebar-scroll","[data-overlay-scroll='true']"].join(",");function _t(t){if(!(t instanceof HTMLElement)||t.dataset.overlayScroll==="false"||t.closest("[data-overlayscrollbars]")||t.matches("textarea,input,select,[contenteditable='true']"))return!1;const r=window.getComputedStyle(t);return!(![r.overflow,r.overflowX,r.overflowY].join(" ").match(/auto|scroll/)||t.clientWidth===0&&t.clientHeight===0)}function Xe(t){return t.classList.contains("sidebar-scroll")}function Ge(t){Xe(t)&&t.querySelectorAll(".os-scrollbar-horizontal").forEach(r=>{r.style.display="none",r.style.height="0",r.style.pointerEvents="none"})}function Ve(){return i.useEffect(()=>{const t=new WeakMap;let r=0;const a=()=>{r=0,document.querySelectorAll(Ye).forEach(u=>{if(!_t(u))return;if(De.OverlayScrollbars(u)){Ge(u);return}const p=De.OverlayScrollbars(u,{overflow:Xe(u)?{x:"hidden",y:"scroll"}:void 0,scrollbars:{autoHide:"leave",autoHideDelay:180}});Ge(u),t.set(u,p)})},n=()=>{r||(r=window.requestAnimationFrame(a))};a();const l=new MutationObserver(n);return l.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class","data-overlay-scroll"]}),window.addEventListener("resize",n),()=>{r&&window.cancelAnimationFrame(r),l.disconnect(),window.removeEventListener("resize",n),document.querySelectorAll(Ye).forEach(u=>{var f;u instanceof HTMLElement&&((f=t.get(u))==null||f.destroy())})}},[]),null}const jt={xs:{wh:"w-5 h-5",text:"text-[8px]"},sm:{wh:"w-7 h-7",text:"text-[11px]"},md:{wh:"w-9 h-9",text:"text-sm"},lg:{wh:"w-12 h-12",text:"text-base"},xl:{wh:"w-16 h-16",text:"text-xl"}},Je=["bg-emerald-600","bg-teal-600","bg-lime-600","bg-cyan-700","bg-slate-600"];function Ze(t){return typeof t=="string"?t.trim():""}function Ut(t){return Je[[...t].reduce((r,a)=>r+a.charCodeAt(0),0)%Je.length]}function Ke({userId:t,username:r,name:a,size:n="md",className:l="",style:u}){const{wh:f,text:p}=jt[n],c=Ze(a)||Ze(r)||"Usuario";return e.jsx("span",{className:`${f} ${Ut(c)} ${p} rounded-full flex items-center justify-center font-black text-white uppercase flex-shrink-0 ${l}`,style:u,children:c[0]})}function qt({href:t,className:r,children:a}){return e.jsx("a",{href:t,className:r,children:a})}function Yt(t){return t.reduce((r,a)=>{const n=a.section??"Principal";return r[n]=[...r[n]??[],a],r},{})}function Qe({children:t,navItems:r=[],currentPath:a=typeof window>"u"?"/":window.location.pathname,user:n,appName:l="Bonsaif",appLogo:u,header:f,footer:p,onLogout:c,LinkComponent:d=qt}){const[w,M]=i.useState(!1),k=Yt(r);return e.jsxs("div",{className:"min-h-screen bg-[var(--bg-main)] text-[var(--text-main)]",children:[e.jsx(Ve,{}),e.jsx("button",{type:"button","aria-label":"Abrir navegación",className:"fixed left-3 top-3 z-50 inline-flex h-9 w-9 items-center justify-center rounded-md border border-white/10 bg-black/70 text-white lg:hidden",onClick:()=>M(!0),children:e.jsx(m.HiBars3,{className:"h-5 w-5"})}),w&&e.jsx("button",{type:"button","aria-label":"Cerrar navegación",className:"fixed inset-0 z-40 bg-black/45 lg:hidden",onClick:()=>M(!1)}),e.jsxs("aside",{className:`fixed inset-y-0 left-0 z-50 flex w-72 flex-col bg-[#071716] text-white shadow-2xl transition-transform duration-200 lg:translate-x-0 ${w?"translate-x-0":"-translate-x-full"}`,children:[e.jsxs("div",{className:"flex h-16 items-center gap-3 border-b border-white/10 px-4",children:[e.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-white/10 text-white",children:u??e.jsx(m.HiHome,{className:"h-5 w-5"})}),e.jsx("div",{className:"min-w-0 flex-1 truncate text-sm font-semibold",children:l}),e.jsx("button",{type:"button","aria-label":"Cerrar navegación",className:"inline-flex h-8 w-8 items-center justify-center rounded-md text-white/70 hover:bg-white/10 lg:hidden",onClick:()=>M(!1),children:e.jsx(m.HiXMark,{className:"h-5 w-5"})})]}),e.jsx("nav",{className:"sidebar-scroll min-h-0 flex-1 overflow-y-auto px-3 py-4","data-overlay-scroll":"true",children:Object.entries(k).map(([b,v])=>e.jsxs("div",{className:"mb-5",children:[e.jsxs("div",{className:"mb-2 flex items-center gap-2 px-2 text-[11px] font-semibold uppercase tracking-wide text-white/35",children:[e.jsx(m.HiChevronDown,{className:"h-3.5 w-3.5"}),b]}),e.jsx("div",{className:"space-y-1",children:v.map(g=>{const S=a===g.href||a.startsWith(`${g.href}/`);return e.jsxs(d,{href:g.href,className:`flex min-w-0 items-center gap-2 rounded-md px-2 py-2 text-sm transition-colors ${S?"bg-white/10 text-white":"text-white/55 hover:bg-white/[0.06] hover:text-white/85"}`,children:[e.jsx("span",{className:"flex h-5 w-5 flex-shrink-0 items-center justify-center",children:g.icon??e.jsx(m.HiHome,{className:"h-4 w-4"})}),e.jsx("span",{className:"truncate",children:g.label})]},g.href)})})]},b))}),e.jsxs("div",{className:"border-t border-white/10 p-3",children:[n&&e.jsxs("div",{className:"mb-3 flex min-w-0 items-center gap-3 rounded-lg bg-white/[0.04] p-2",children:[e.jsx(Ke,{name:n.initials??n.name??n.email??"Usuario",size:"md"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"truncate text-sm font-medium text-white",children:n.name??"Usuario"}),n.email&&e.jsx("div",{className:"truncate text-xs text-white/45",children:n.email})]})]}),c&&e.jsxs(ee,{variant:"ghost",className:"w-full justify-start text-white hover:bg-white/10",onClick:c,children:[e.jsx(m.HiArrowRightOnRectangle,{className:"h-4 w-4"})," Salir"]}),p]})]}),e.jsxs("div",{className:"min-h-screen lg:pl-72",children:[f,e.jsx("main",{className:"min-h-screen",children:t})]})]})}const Xt={dashboard:"Dashboard",tickets:"Tickets",teams:"Equipos",projects:"Proyectos",clients:"Clientes",surveys:"Encuestas",profile:"Perfil",settings:"Configuración",notifications:"Notificaciones",changelog:"Historial",admin:"Inicio",users:"Usuarios",roles:"Roles",menus:"Menús",guards:"Guardias",vacations:"Vacaciones",audit:"Auditoría",positions:"Puestos",ranks:"Rangos","email-inbox":"Buzones","security-incidents":"Incidentes","guard-schedule":"Guardias"},Se={dashboard:e.jsx(m.HiChartBar,{className:"h-5 w-5"}),tickets:e.jsx(m.HiTicket,{className:"h-5 w-5"}),teams:e.jsx(m.HiUsers,{className:"h-5 w-5"}),projects:e.jsx(m.HiRectangleGroup,{className:"h-5 w-5"}),clients:e.jsx(m.HiBuildingOffice2,{className:"h-5 w-5"}),surveys:e.jsx(m.HiClipboardDocumentList,{className:"h-5 w-5"}),profile:e.jsx(m.HiUser,{className:"h-5 w-5"}),settings:e.jsx(m.HiCog6Tooth,{className:"h-5 w-5"}),notifications:e.jsx(m.HiBell,{className:"h-5 w-5"}),changelog:e.jsx(m.HiDocumentText,{className:"h-5 w-5"}),admin:e.jsx(m.HiShieldCheck,{className:"h-5 w-5"}),users:e.jsx(m.HiUsers,{className:"h-5 w-5"}),roles:e.jsx(m.HiShieldCheck,{className:"h-5 w-5"}),menus:e.jsx(m.HiCog6Tooth,{className:"h-5 w-5"}),guards:e.jsx(m.HiCalendarDays,{className:"h-5 w-5"}),vacations:e.jsx(m.HiCalendarDays,{className:"h-5 w-5"}),audit:e.jsx(m.HiListBullet,{className:"h-5 w-5"}),positions:e.jsx(m.HiBriefcase,{className:"h-5 w-5"}),ranks:e.jsx(m.HiListBullet,{className:"h-5 w-5"}),"email-inbox":e.jsx(m.HiInbox,{className:"h-5 w-5"}),"security-incidents":e.jsx(m.HiShieldCheck,{className:"h-5 w-5"})};function Gt({href:t,className:r,style:a,children:n}){return e.jsx("a",{href:t,className:r,style:a,children:n})}function Vt(t){return t.split("-").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" ")}function Jt(t){return/^\d+$/.test(t)||/^[a-f0-9]{8,}$/i.test(t)}function Zt(t){const r=t.split("/").filter(Boolean);if(r.length===0||r.length===1&&r[0]==="dashboard")return[];const a=decodeURIComponent(r[r.length-1]),n=r.length>1?decodeURIComponent(r[r.length-2]):void 0,l=Jt(a)&&n?n:a,u=Xt[l]??Vt(l);return[{label:"Inicio",href:"/"},{label:u}]}function Ce(t){return(t==null?void 0:t.querySelector(":scope > .os-viewport"))??(t==null?void 0:t.querySelector(":scope > [data-overlayscrollbars-viewport]"))}function Kt(t){const r=t.split("/").filter(Boolean),a=r[r.length-1];if(!a)return e.jsx(m.HiHome,{className:"h-5 w-5"});if(Se[a])return Se[a];const n=r.length>1?r[r.length-2]:"";return Se[n]??e.jsx(m.HiHome,{className:"h-5 w-5"})}function Qt({title:t,subtitle:r,action:a,meta:n,icon:l,className:u="",contentClassName:f="",breadcrumbs:p,currentPath:c=typeof window>"u"?"/":window.location.pathname,showBreadcrumbs:d=!0,contained:w=!1,LinkComponent:M=Gt}){const k=i.useRef(null),[b,v]=i.useState(!1),[g,S]=i.useState(null),L=p??Zt(c),V=l??Kt(c),Y=d&&L.length>1;return i.useEffect(()=>{if(w){v(!1);return}let C=null,$=0,H=0;const D=()=>{const T=k.current,A=document.querySelector("[data-app-scroll='true']");return(T==null?void 0:T.closest(".os-viewport"))??(T==null?void 0:T.closest("[data-overlayscrollbars-viewport]"))??Ce(A)??A??window},F=()=>{const T=C&&C!==window?C.scrollTop:window.scrollY;v(A=>A?T>24:T>72)},I=()=>{C==null||C.removeEventListener("scroll",F),C=D(),C.addEventListener("scroll",F,{passive:!0}),F()};return I(),$=window.requestAnimationFrame(I),H=window.setTimeout(I,120),()=>{window.cancelAnimationFrame($),window.clearTimeout(H),C==null||C.removeEventListener("scroll",F)}},[w]),i.useEffect(()=>{if(w){S(null);return}let C=0;const $=[],H=()=>{const z=k.current,G=z==null?void 0:z.parentElement,j=document.querySelector("[data-app-scroll='true']"),q=Ce(j)??j;if(!z||!G||!q){S(null);return}const o=G.getBoundingClientRect(),x=window.getComputedStyle(G),O=q.getBoundingClientRect(),U=q instanceof HTMLElement&&q.clientWidth>0?q.clientWidth:O.width,W=o.left+parseFloat(x.paddingLeft||"0"),Z={marginLeft:Math.round(O.left-W),width:Math.round(U)};S(R=>R&&R.marginLeft===Z.marginLeft&&R.width===Z.width?R:Z)},D=()=>{window.cancelAnimationFrame(C),C=window.requestAnimationFrame(H)};D(),window.addEventListener("resize",D);const F=new ResizeObserver(D),I=k.current,T=I==null?void 0:I.parentElement,A=document.querySelector("[data-app-scroll='true']"),X=Ce(A)??A;return[T,A,X].forEach(z=>{z&&F.observe(z)}),$.push(window.setTimeout(D,120)),$.push(window.setTimeout(D,280)),()=>{window.cancelAnimationFrame(C),window.removeEventListener("resize",D),F.disconnect(),$.forEach(z=>window.clearTimeout(z))}},[w]),e.jsx("div",{ref:k,"data-page-header":"true","data-compact":b?"true":"false",className:`sticky top-0 z-30 overflow-visible py-0 transition-[background-color,box-shadow,border-color] duration-300 ease-out ${w?"mb-0 flex-shrink-0":"mb-6 sm:mb-1"} ${u}`,style:{...g?{marginLeft:g.marginLeft,width:g.width}:null,background:w?"var(--bg-card)":b?"var(--bg-main)":"color-mix(in srgb, var(--bg-main) 44%, transparent)",backdropFilter:"saturate(1.2) blur(14px)",WebkitBackdropFilter:"saturate(1.2) blur(14px)",borderBottom:w||b?"1px solid var(--border)":"1px solid transparent",boxShadow:b?"0 10px 28px rgba(12, 54, 53, 0.12)":"none"},children:e.jsxs("div",{className:`flex flex-wrap items-center justify-between px-4 pt-0.5 transition-[gap,min-height,padding] duration-300 ease-out ${b?"min-h-10 gap-2 sm:min-h-11 sm:gap-3":"min-h-11 gap-3 sm:min-h-12 sm:gap-4"} ${f}`,children:[e.jsxs("div",{className:`min-w-0 flex flex-1 flex-col justify-center transition-[gap,transform] duration-300 ease-out ${b?"gap-1":"gap-1.5 sm:gap-2"}`,children:[Y&&e.jsx("nav",{"aria-label":"Breadcrumb",className:"min-w-0 flex-shrink-0 transition-[opacity,transform] duration-300 ease-out",children:e.jsx("ol",{className:`flex flex-wrap items-center gap-1.5 leading-none transition-[font-size,line-height] duration-300 ease-out ${b?"text-[10px] sm:text-[11px]":"text-[11px] sm:text-xs"}`,children:L.map((C,$)=>{const H=$===L.length-1;return e.jsxs("li",{className:"flex min-w-0 items-center gap-1.5",children:[$>0&&e.jsx(m.HiChevronRight,{className:"h-3.5 w-3.5 transition-[color,transform] duration-300 ease-out",style:{color:"var(--text-muted)"}}),C.href&&!H?e.jsx(M,{href:C.href,className:"truncate transition-colors duration-300 hover:underline",style:{color:"var(--text-muted)"},children:C.label}):e.jsx("span",{"aria-current":H?"page":void 0,className:H?"truncate font-semibold":"truncate",style:{color:H?"var(--text-main)":"var(--text-muted)"},children:C.label})]},`${C.label}-${$}`)})})}),e.jsxs("div",{className:`flex min-w-0 items-center transition-[gap,transform] duration-300 ease-out ${b?"gap-2":"gap-2.5 sm:gap-3"}`,children:[e.jsx("span",{className:`flex-shrink-0 transition-[color,transform,opacity] duration-300 ease-out ${b?"scale-90 opacity-80":"scale-100 opacity-100"}`,style:{color:Y?"var(--text-secondary)":"var(--text-muted)"},children:V}),e.jsxs("div",{className:`flex min-w-0 flex-1 flex-wrap items-center transition-[gap] duration-300 ease-out ${b?"gap-x-2 gap-y-1":"gap-x-3 gap-y-2"}`,children:[e.jsxs("div",{className:"min-w-0 flex-shrink transition-[transform] duration-300 ease-out",children:[e.jsx("h1",{className:`truncate font-bold tracking-tight transition-[font-size,line-height,color] duration-300 ease-out ${b?"text-lg sm:text-xl":"text-xl sm:text-2xl"}`,style:{color:"var(--text-main)"},children:t}),r&&e.jsx("p",{"aria-hidden":b,className:`overflow-hidden text-sm transition-[max-height,opacity,transform,margin] duration-300 ease-out ${b?"mt-0 max-h-0 -translate-y-1 opacity-0":"mt-0.5 max-h-6 translate-y-0 opacity-100 sm:mt-1"}`,style:{color:"var(--text-muted)"},children:r})]}),n&&e.jsx("div",{className:`page-header-meta flex min-w-0 flex-1 basis-full items-center overflow-visible transition-[gap,opacity,transform] duration-300 ease-out sm:basis-auto ${b?"translate-y-0 gap-1.5 opacity-95":"gap-2 opacity-100"}`,children:n})]})]})]}),a&&e.jsx("div",{className:`page-header-actions flex flex-shrink-0 items-center self-center overflow-visible transition-[gap,min-height,opacity,transform] duration-300 ease-out ${b?"min-h-10 gap-1.5 opacity-95":"min-h-11 gap-2 opacity-100"}`,children:a})]})})}function Rt({value:t,onChange:r,placeholder:a,className:n=""}){const l=i.useRef(null),[u,f]=i.useState(!1),p=u||t.trim().length>0,c=()=>{var d;f(!0),(d=l.current)==null||d.focus()};return e.jsxs("div",{className:`relative flex-shrink-0 overflow-visible transition-[width] duration-200 ease-out ${p?n||"w-full":"w-28"}`,onMouseDown:d=>{p||(d.preventDefault(),c())},children:[e.jsx(m.HiMagnifyingGlass,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 pointer-events-none transition-colors duration-200",style:{color:"var(--text-muted)"}}),e.jsx("input",{ref:l,type:"text","aria-label":a,value:t,onChange:d=>r(d.target.value),placeholder:p?a:"Buscar",className:`h-11 w-full rounded-lg py-0 text-sm placeholder:text-[var(--text-muted)] focus:outline-none transition-all duration-150 ${p?"pl-9 pr-9":"cursor-pointer pl-9 pr-3"}`,style:{background:"var(--bg-card)",border:"1px solid var(--border)",color:"var(--text-main)"},onFocus:d=>{f(!0),d.currentTarget.style.borderColor="var(--primary)",d.currentTarget.style.boxShadow="0 0 0 3px rgba(59,130,246,0.12)"},onBlur:d=>{f(!1),d.currentTarget.style.borderColor="var(--border)",d.currentTarget.style.boxShadow="none"}}),t&&e.jsx("button",{type:"button",onClick:()=>r(""),className:"absolute right-2 top-1/2 flex !h-6 !w-6 -translate-y-1/2 items-center justify-center rounded-full !p-0 leading-none transition-colors hover:bg-black/5",style:{color:"var(--text-muted)"},"aria-label":"Limpiar búsqueda",children:e.jsx(m.HiXMark,{className:"h-3.5 w-3.5 flex-shrink-0"})})]})}function er({children:t,currentPath:r=typeof window>"u"?"/":window.location.pathname,publicRoutes:a=["/","/login","/reset-password"],...n}){return a.includes(r)?e.jsx(e.Fragment,{children:t}):e.jsx(Qe,{currentPath:r,...n,children:t})}function Re(){if(typeof window>"u")return"system";const t=localStorage.getItem("theme");return t==="light"||t==="dark"?t:t==="system"?"system":document.documentElement.classList.contains("dark")?"dark":"light"}function tr(t,r,a){try{const n=new URL(t),l=n.searchParams.get("callbackUrl");if(l){const u=new URL(l,n.origin);return u.searchParams.set("theme",r),a&&(u.searchParams.set("primeAuthOrigin",window.location.origin),u.searchParams.set("primeAuthProjectKey",a)),n.searchParams.set("callbackUrl",`${u.pathname}${u.search}${u.hash}`),n.toString()}return n.searchParams.set("theme",r),a&&(n.searchParams.set("primeAuthOrigin",window.location.origin),n.searchParams.set("primeAuthProjectKey",a)),n.toString()}catch{return t}}function rr({name:t,src:r,projectKey:a}){const[n,l]=i.useState(()=>Re()),u=i.useRef(null);i.useEffect(()=>{const c=new MutationObserver(()=>l(Re()));return c.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>c.disconnect()},[]);const f=i.useMemo(()=>tr(r,n,a),[a,r,n]),p=i.useMemo(()=>{try{return new URL(f).origin}catch{return""}},[f]);return i.useEffect(()=>{if(!a)return;const c=a;function d(w){var b,v,g;if(w.source!==((b=u.current)==null?void 0:b.contentWindow)||p&&w.origin!==p)return;if(((v=w.data)==null?void 0:v.type)==="prime-microservice:overlay"){window.dispatchEvent(new CustomEvent("prime-auth:microservice-overlay",{detail:{active:!!w.data.active}}));return}if(((g=w.data)==null?void 0:g.type)!=="prime-microservice:navigation")return;const M=w.data.path;if(!M||!M.startsWith("/")||M.startsWith("//"))return;const k=`/apps/${encodeURIComponent(c)}${M}`;`${window.location.pathname}${window.location.search}${window.location.hash}`!==k&&(window.history.replaceState(window.history.state,"",k),window.dispatchEvent(new CustomEvent("prime-auth:microservice-navigation")))}return window.addEventListener("message",d),()=>{window.removeEventListener("message",d),window.dispatchEvent(new CustomEvent("prime-auth:microservice-overlay",{detail:{active:!1}}))}},[p,a]),e.jsx("div",{className:"flex h-full min-h-screen flex-col bg-[var(--bg-main)]",children:e.jsx("iframe",{ref:u,src:f,title:t,className:"min-h-0 flex-1 border-0 bg-[var(--bg-main)]",allow:"clipboard-write",sandbox:"allow-downloads allow-forms allow-modals allow-popups allow-same-origin allow-scripts",referrerPolicy:"strict-origin-when-cross-origin"})})}function ar(){const[t,r]=i.useState(""),[a,n]=i.useState(!1),[l,u]=i.useState({width:96,height:96});return i.useEffect(()=>{let f=!1;return fetch("/api/microservices/prime-suite/chat-url",{cache:"no-store"}).then(p=>p.ok?p.json():null).then(p=>{!f&&(p!=null&&p.src)&&r(p.src)}).catch(()=>{}),()=>{f=!0}},[]),i.useEffect(()=>{const f=p=>{var d;if(((d=p.data)==null?void 0:d.type)!=="prime-suite-chat:state")return;const c=!!p.data.active;n(c),u({width:et(p.data.width,96,720),height:et(p.data.height,96,560)})};return window.addEventListener("message",f),()=>window.removeEventListener("message",f)},[]),t?e.jsx("iframe",{title:"Chat Bonsaif",src:t,allow:"clipboard-write",className:"fixed bottom-0 right-0 z-[70] border-0 bg-transparent transition-[width,height] duration-200",style:{width:a?`min(${l.width}px, 100vw)`:96,height:a?`min(${l.height}px, 100vh)`:96,background:"transparent",backgroundColor:"transparent",colorScheme:"normal"}}):null}function et(t,r,a){const n=typeof t=="number"&&Number.isFinite(t)?t:r;return Math.max(r,Math.min(a,Math.ceil(n)))}function nr(t){const r=document.documentElement,a=new MutationObserver(t);a.observe(r,{attributes:!0,attributeFilter:["class"]});const n=window.matchMedia("(prefers-color-scheme: dark)");return n.addEventListener("change",t),()=>{a.disconnect(),n.removeEventListener("change",t)}}function or(){const t=localStorage.getItem("theme")||"system",r=window.matchMedia("(prefers-color-scheme: dark)").matches;return document.documentElement.classList.contains("dark")||t==="dark"||t==="system"&&r?"dark":"light"}function sr(){return"light"}function ir(){const t=i.useSyncExternalStore(nr,or,sr);return e.jsx(ut.Toaster,{position:"bottom-center",theme:t,richColors:!0,closeButton:!0})}N.AuthShell=Qe,N.BonsaifButton=ft,N.Button=ee,N.CalendarPicker=wt,N.CompactFilterSelect=Nt,N.CompactSearchInput=kt,N.ConfirmDialog=Et,N.DataTable=Lt,N.DateRangePicker=Bt,N.Drawer=At,N.GlobalScrollbars=Ve,N.InputField=Ot,N.LoadingState=zt,N.MicroserviceFrame=rr,N.Modal=We,N.MouseTooltip=_e,N.PageHeader=Qt,N.PageSearchInput=Rt,N.PrimeAuthRouteShell=er,N.PrimeAuthToaster=ir,N.PrimeSuiteChatFrame=ar,N.SearchableSelect=ke,N.TextInput=Ne,N.Toggle=Wt,N.UserAvatar=Ke,N.cn=Oe,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})}));
@@ -0,0 +1,7 @@
1
+ import { ButtonHTMLAttributes, ReactNode } from 'react';
2
+ export interface BonsaifButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
3
+ variant?: "primary" | "secondary";
4
+ children: ReactNode;
5
+ }
6
+ export declare function BonsaifButton({ variant, className, type, children, ...props }: BonsaifButtonProps): import("react/jsx-runtime").JSX.Element;
7
+ //# sourceMappingURL=BonsaifButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BonsaifButton.d.ts","sourceRoot":"","sources":["../../../src/components/BonsaifButton/BonsaifButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG7D,MAAM,WAAW,kBAAmB,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IACjF,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IAClC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,aAAa,CAAC,EAC5B,OAAmB,EACnB,SAAS,EACT,IAAe,EACf,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,kBAAkB,2CAUpB"}
@@ -0,0 +1,3 @@
1
+ export { BonsaifButton } from './BonsaifButton';
2
+ export type { BonsaifButtonProps } from './BonsaifButton';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/BonsaifButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,16 @@
1
+ export { BonsaifButton } from './BonsaifButton';
2
+ export type { BonsaifButtonProps } from './BonsaifButton';
3
+ export * from './ui';
4
+ export { default as AuthShell } from './layout/AuthShell';
5
+ export type { AuthShellNavItem, AuthShellProps, AuthShellUser } from './layout/AuthShell';
6
+ export { default as GlobalScrollbars } from './layout/GlobalScrollbars';
7
+ export { default as PageHeader } from './layout/PageHeader';
8
+ export type { BreadcrumbItem, PageHeaderProps } from './layout/PageHeader';
9
+ export { default as PageSearchInput } from './layout/PageSearchInput';
10
+ export { default as PrimeAuthRouteShell } from './layout/PrimeAuthRouteShell';
11
+ export type { PrimeAuthRouteShellProps } from './layout/PrimeAuthRouteShell';
12
+ export { default as MicroserviceFrame } from './microservices/MicroserviceFrame';
13
+ export { default as PrimeSuiteChatFrame } from './messaging/PrimeSuiteChatFrame';
14
+ export { default as PrimeAuthToaster } from './notifications/PrimeAuthToaster';
15
+ export { default as UserAvatar } from './users/UserAvatar';
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,cAAc,MAAM,CAAC;AACrB,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC1D,YAAY,EAAE,gBAAgB,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC1F,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC5D,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAC9E,YAAY,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { ComponentType, ReactNode } from 'react';
2
+ type AuthShellLinkProps = {
3
+ href: string;
4
+ className?: string;
5
+ children: ReactNode;
6
+ };
7
+ export type AuthShellLinkComponent = ComponentType<AuthShellLinkProps>;
8
+ export interface AuthShellNavItem {
9
+ href: string;
10
+ label: string;
11
+ section?: string;
12
+ icon?: ReactNode;
13
+ }
14
+ export interface AuthShellUser {
15
+ name?: string | null;
16
+ email?: string | null;
17
+ initials?: string | null;
18
+ }
19
+ export interface AuthShellProps {
20
+ children: ReactNode;
21
+ navItems?: AuthShellNavItem[];
22
+ currentPath?: string;
23
+ user?: AuthShellUser | null;
24
+ appName?: string;
25
+ appLogo?: ReactNode;
26
+ header?: ReactNode;
27
+ footer?: ReactNode;
28
+ onLogout?: () => void;
29
+ LinkComponent?: AuthShellLinkComponent;
30
+ }
31
+ export default function AuthShell({ children, navItems, currentPath, user, appName, appLogo, header, footer, onLogout, LinkComponent, }: AuthShellProps): import("react/jsx-runtime").JSX.Element;
32
+ export {};
33
+ //# sourceMappingURL=AuthShell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthShell.d.ts","sourceRoot":"","sources":["../../../src/components/layout/AuthShell.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAYrE,KAAK,kBAAkB,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,aAAa,CAAC,kBAAkB,CAAC,CAAC;AAEvE,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,aAAa,CAAC,EAAE,sBAAsB,CAAC;CACxC;AAkBD,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,QAAQ,EACR,QAAa,EACb,WAA4E,EAC5E,IAAI,EACJ,OAAmB,EACnB,OAAO,EACP,MAAM,EACN,MAAM,EACN,QAAQ,EACR,aAA2B,GAC5B,EAAE,cAAc,2CA+GhB"}
@@ -0,0 +1,2 @@
1
+ export default function GlobalScrollbars(): null;
2
+ //# sourceMappingURL=GlobalScrollbars.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GlobalScrollbars.d.ts","sourceRoot":"","sources":["../../../src/components/layout/GlobalScrollbars.tsx"],"names":[],"mappings":"AAOA,OAAO,yCAAyC,CAAC;AA6CjD,MAAM,CAAC,OAAO,UAAU,gBAAgB,SA2DvC"}
@@ -0,0 +1,29 @@
1
+ import { ComponentType, CSSProperties, ReactNode } from 'react';
2
+ export interface BreadcrumbItem {
3
+ label: string;
4
+ href?: string;
5
+ }
6
+ type PageHeaderLinkProps = {
7
+ href: string;
8
+ className?: string;
9
+ style?: CSSProperties;
10
+ children: ReactNode;
11
+ };
12
+ export type PageHeaderLinkComponent = ComponentType<PageHeaderLinkProps>;
13
+ export interface PageHeaderProps {
14
+ title: string;
15
+ subtitle?: string;
16
+ action?: ReactNode;
17
+ meta?: ReactNode;
18
+ icon?: ReactNode;
19
+ className?: string;
20
+ contentClassName?: string;
21
+ breadcrumbs?: BreadcrumbItem[];
22
+ currentPath?: string;
23
+ showBreadcrumbs?: boolean;
24
+ contained?: boolean;
25
+ LinkComponent?: PageHeaderLinkComponent;
26
+ }
27
+ export default function PageHeader({ title, subtitle, action, meta, icon, className, contentClassName, breadcrumbs, currentPath, showBreadcrumbs, contained, LinkComponent, }: PageHeaderProps): import("react/jsx-runtime").JSX.Element;
28
+ export {};
29
+ //# sourceMappingURL=PageHeader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PageHeader.d.ts","sourceRoot":"","sources":["../../../src/components/layout/PageHeader.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAqBf,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,KAAK,mBAAmB,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,aAAa,CAAC,mBAAmB,CAAC,CAAC;AAEzE,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,cAAc,EAAE,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,uBAAuB,CAAC;CACzC;AAiHD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,KAAK,EACL,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,SAAc,EACd,gBAAqB,EACrB,WAAW,EACX,WAA4E,EAC5E,eAAsB,EACtB,SAAiB,EACjB,aAA2B,GAC5B,EAAE,eAAe,2CAiRjB"}
@@ -0,0 +1,9 @@
1
+ interface PageSearchInputProps {
2
+ value: string;
3
+ onChange: (value: string) => void;
4
+ placeholder: string;
5
+ className?: string;
6
+ }
7
+ export default function PageSearchInput({ value, onChange, placeholder, className, }: PageSearchInputProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=PageSearchInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PageSearchInput.d.ts","sourceRoot":"","sources":["../../../src/components/layout/PageSearchInput.tsx"],"names":[],"mappings":"AAKA,UAAU,oBAAoB;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACtC,KAAK,EACL,QAAQ,EACR,WAAW,EACX,SAAc,GACf,EAAE,oBAAoB,2CAiEtB"}
@@ -0,0 +1,9 @@
1
+ import { ReactNode } from 'react';
2
+ import { AuthShellProps } from './AuthShell';
3
+ export interface PrimeAuthRouteShellProps extends Omit<AuthShellProps, "children"> {
4
+ children: ReactNode;
5
+ currentPath?: string;
6
+ publicRoutes?: string[];
7
+ }
8
+ export default function PrimeAuthRouteShell({ children, currentPath, publicRoutes, ...shellProps }: PrimeAuthRouteShellProps): import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=PrimeAuthRouteShell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PrimeAuthRouteShell.d.ts","sourceRoot":"","sources":["../../../src/components/layout/PrimeAuthRouteShell.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAkB,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7D,MAAM,WAAW,wBAAyB,SAAQ,IAAI,CACpD,cAAc,EACd,UAAU,CACX;IACC,QAAQ,EAAE,SAAS,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAC1C,QAAQ,EACR,WAA4E,EAC5E,YAAiD,EACjD,GAAG,UAAU,EACd,EAAE,wBAAwB,2CAO1B"}
@@ -0,0 +1,2 @@
1
+ export default function PrimeSuiteChatFrame(): import("react/jsx-runtime").JSX.Element | null;
2
+ //# sourceMappingURL=PrimeSuiteChatFrame.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PrimeSuiteChatFrame.d.ts","sourceRoot":"","sources":["../../../src/components/messaging/PrimeSuiteChatFrame.tsx"],"names":[],"mappings":"AAWA,MAAM,CAAC,OAAO,UAAU,mBAAmB,mDAkD1C"}
@@ -0,0 +1,8 @@
1
+ type MicroserviceFrameProps = {
2
+ name: string;
3
+ src: string;
4
+ projectKey?: string;
5
+ };
6
+ export default function MicroserviceFrame({ name, src, projectKey, }: MicroserviceFrameProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=MicroserviceFrame.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MicroserviceFrame.d.ts","sourceRoot":"","sources":["../../../src/components/microservices/MicroserviceFrame.tsx"],"names":[],"mappings":"AAIA,KAAK,sBAAsB,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAkDF,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,IAAI,EACJ,GAAG,EACH,UAAU,GACX,EAAE,sBAAsB,2CAsFxB"}
@@ -0,0 +1,2 @@
1
+ export default function PrimeAuthToaster(): import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=PrimeAuthToaster.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PrimeAuthToaster.d.ts","sourceRoot":"","sources":["../../../src/components/notifications/PrimeAuthToaster.tsx"],"names":[],"mappings":"AAqCA,MAAM,CAAC,OAAO,UAAU,gBAAgB,4CAUvC"}
@@ -0,0 +1,15 @@
1
+ import { ButtonHTMLAttributes, ReactNode } from 'react';
2
+ type ButtonVariant = "primary" | "secondary" | "danger" | "ghost" | "icon";
3
+ type ButtonSize = "sm" | "md" | "lg";
4
+ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
5
+ variant?: ButtonVariant;
6
+ size?: ButtonSize;
7
+ loading?: boolean;
8
+ icon?: ReactNode;
9
+ height?: number | string;
10
+ padding?: number | string;
11
+ children?: ReactNode;
12
+ }
13
+ export default function Button({ variant, size, loading, icon, height, padding, children, className, disabled, style, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
14
+ export {};
15
+ //# sourceMappingURL=Button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Button.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAExD,KAAK,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAC3E,KAAK,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAErC,UAAU,WAAY,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IACnE,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAmCD,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAC7B,OAAmB,EACnB,IAAW,EACX,OAAe,EACf,IAAI,EACJ,MAAM,EACN,OAAO,EACP,QAAQ,EACR,SAAc,EACd,QAAQ,EACR,KAAK,EACL,GAAG,KAAK,EACT,EAAE,WAAW,2CA0Bb"}
@@ -0,0 +1,9 @@
1
+ interface CalendarPickerProps {
2
+ value: string;
3
+ onChange: (value: string) => void;
4
+ minDate?: string;
5
+ displayMode?: "inline" | "popover";
6
+ }
7
+ export default function CalendarPicker({ value, onChange, minDate, displayMode, }: CalendarPickerProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=CalendarPicker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CalendarPicker.d.ts","sourceRoot":"","sources":["../../../src/components/ui/CalendarPicker.tsx"],"names":[],"mappings":"AAUA,UAAU,mBAAmB;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;CACpC;AA8DD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,KAAK,EACL,QAAQ,EACR,OAAO,EACP,WAAsB,GACvB,EAAE,mBAAmB,2CAwarB"}
@@ -0,0 +1,27 @@
1
+ import { ReactNode } from 'react';
2
+ import { SelectOption } from './SearchableSelect';
3
+ interface CompactSearchInputProps {
4
+ value: string;
5
+ onChange: (value: string) => void;
6
+ placeholder?: string;
7
+ className?: string;
8
+ height?: number | string;
9
+ padding?: number | string;
10
+ iconLeft?: number | string;
11
+ }
12
+ export declare function CompactSearchInput({ value, onChange, placeholder, className, height, padding, iconLeft, }: CompactSearchInputProps): import("react/jsx-runtime").JSX.Element;
13
+ interface CompactFilterSelectProps {
14
+ value: string;
15
+ onChange: (value: string) => void;
16
+ options: SelectOption[];
17
+ placeholder: string;
18
+ icon?: ReactNode;
19
+ className?: string;
20
+ height?: number | string;
21
+ padding?: number | string;
22
+ iconLeft?: number | string;
23
+ searchable?: boolean;
24
+ }
25
+ export declare function CompactFilterSelect({ value, onChange, options, placeholder, icon, className, height, padding, iconLeft, searchable, }: CompactFilterSelectProps): import("react/jsx-runtime").JSX.Element;
26
+ export type { SelectOption };
27
+ //# sourceMappingURL=CompactFilters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CompactFilters.d.ts","sourceRoot":"","sources":["../../../src/components/ui/CompactFilters.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAyB,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAOzE,UAAU,uBAAuB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC5B;AAED,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,QAAQ,EACR,WAAyB,EACzB,SAAc,EACd,MAAW,EACX,OAAyB,EACzB,QAAa,GACd,EAAE,uBAAuB,2CAiBzB;AAED,UAAU,wBAAwB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,QAAQ,EACR,OAAO,EACP,WAAW,EACX,IAAI,EACJ,SAAc,EACd,MAAW,EACX,OAAO,EACP,QAAa,EACb,UAAiB,GAClB,EAAE,wBAAwB,2CAgC1B;AAED,YAAY,EAAE,YAAY,EAAE,CAAC"}
@@ -0,0 +1,12 @@
1
+ export interface ConfirmDialogProps {
2
+ open: boolean;
3
+ title: string;
4
+ description?: string;
5
+ confirmLabel?: string;
6
+ cancelLabel?: string;
7
+ variant?: "danger" | "warning" | "primary";
8
+ onConfirm: () => void;
9
+ onCancel: () => void;
10
+ }
11
+ export default function ConfirmDialog({ open, title, description, confirmLabel, cancelLabel, variant, onConfirm, onCancel, }: ConfirmDialogProps): import("react/jsx-runtime").JSX.Element;
12
+ //# sourceMappingURL=ConfirmDialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConfirmDialog.d.ts","sourceRoot":"","sources":["../../../src/components/ui/ConfirmDialog.tsx"],"names":[],"mappings":"AAMA,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;IAC3C,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAuBD,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,IAAI,EACJ,KAAK,EACL,WAAW,EACX,YAA0B,EAC1B,WAAwB,EACxB,OAAkB,EAClB,SAAS,EACT,QAAQ,GACT,EAAE,kBAAkB,2CAwEpB"}
@@ -0,0 +1,87 @@
1
+ import { default as React } from 'react';
2
+ export interface Column<T> {
3
+ /** Unique key for this column */
4
+ key: string;
5
+ /** Column header label */
6
+ header: React.ReactNode;
7
+ /** Render cell content for a row */
8
+ cell: (row: T) => React.ReactNode;
9
+ /** Optional field name on T to enable client-side sorting */
10
+ sortKey?: keyof T;
11
+ /** Text alignment (default: left) */
12
+ align?: "left" | "center" | "right";
13
+ /** CSS width value (e.g. "120px", "10%") */
14
+ width?: string;
15
+ /** Minimum resize width in px (prevents column from becoming too narrow) */
16
+ minWidth?: number;
17
+ /** Maximum resize width in px (prevents column from growing too wide) */
18
+ maxWidth?: number;
19
+ /** Extra className for <td> */
20
+ className?: string;
21
+ }
22
+ export interface DataTableProps<T> {
23
+ /** Column definitions */
24
+ columns: Column<T>[];
25
+ /** Data rows */
26
+ data: T[];
27
+ /** Extract a unique key from each row */
28
+ getRowId: (row: T) => string;
29
+ /** Show loading skeleton */
30
+ loading?: boolean;
31
+ /** Number of skeleton rows (default 8) */
32
+ skeletonRows?: number;
33
+ /** Empty-state icon node */
34
+ emptyIcon?: React.ReactNode;
35
+ /** Empty-state message (default "Sin resultados") */
36
+ emptyText?: string;
37
+ /** Navigate/open on row click */
38
+ onRowClick?: (row: T) => void;
39
+ /** Bulk-selection: set of selected row ids */
40
+ selected?: Set<string>;
41
+ /** Bulk-selection: toggle one row */
42
+ onToggleOne?: (id: string) => void;
43
+ /** Bulk-selection: toggle all visible rows */
44
+ onToggleAll?: () => void;
45
+ /** Highlight selected rows */
46
+ highlightSelected?: boolean;
47
+ /** Extra <tbody> row class */
48
+ rowClassName?: (row: T) => string;
49
+ /** Sticky header (default true) */
50
+ stickyHeader?: boolean;
51
+ /** Built-in pagination. Set to false to disable. */
52
+ pageSize?: number | false;
53
+ /** Available page-size options shown in the selector */
54
+ pageSizeOptions?: number[];
55
+ /** Width of the page-size selector. Default 62px so selected values fit without extra padding. */
56
+ pageSizeSelectWidth?: number | string;
57
+ /** Height of the page-size selector. */
58
+ pageSizeSelectHeight?: number | string;
59
+ /** Padding of the page-size selector trigger. */
60
+ pageSizeSelectPadding?: number | string;
61
+ /** Total row count for server-side pagination (omit for client-side) */
62
+ totalRows?: number;
63
+ /** Controlled page (1-based) for server-side pagination */
64
+ page?: number;
65
+ /** Called when page changes (server-side pagination) */
66
+ onPageChange?: (page: number) => void;
67
+ /** Called when page size changes (server-side pagination) */
68
+ onPageSizeChange?: (size: number) => void;
69
+ /**
70
+ * User preference key to persist column widths and column order.
71
+ * Use a unique key per table instance.
72
+ */
73
+ storageKey?: string;
74
+ /** Pin the first data column so it stays visible on horizontal scroll */
75
+ stickyFirstColumn?: boolean;
76
+ /**
77
+ * Extra pixels to subtract from the bottom when calculating table max-height.
78
+ * Use this to avoid overlap with fixed elements like chat widgets (e.g. 80).
79
+ */
80
+ bottomOffset?: number;
81
+ /** Compact density mode for tighter spacing (default true) */
82
+ compact?: boolean;
83
+ /** Restrict table body height to viewport space (default true). */
84
+ restrictHeight?: boolean;
85
+ }
86
+ export default function DataTable<T>({ columns, data, getRowId, loading, skeletonRows, emptyIcon, emptyText, onRowClick, selected, onToggleOne, onToggleAll, highlightSelected, rowClassName, stickyHeader, pageSize: pageSizeProp, pageSizeOptions, pageSizeSelectWidth, pageSizeSelectHeight, pageSizeSelectPadding, totalRows, page: controlledPage, onPageChange, onPageSizeChange, storageKey, stickyFirstColumn, bottomOffset, compact, restrictHeight, }: DataTableProps<T>): import("react/jsx-runtime").JSX.Element;
87
+ //# sourceMappingURL=DataTable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../../src/components/ui/DataTable.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAY3D,OAAO,yCAAyC,CAAC;AAIjD,MAAM,WAAW,MAAM,CAAC,CAAC;IACvB,iCAAiC;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,0BAA0B;IAC1B,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,oCAAoC;IACpC,IAAI,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;IAClC,6DAA6D;IAC7D,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;IAClB,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+BAA+B;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID,MAAM,WAAW,cAAc,CAAC,CAAC;IAC/B,yBAAyB;IACzB,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,gBAAgB;IAChB,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,yCAAyC;IACzC,QAAQ,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,CAAC;IAC7B,4BAA4B;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0CAA0C;IAC1C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4BAA4B;IAC5B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iCAAiC;IACjC,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC;IAC9B,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACvB,qCAAqC;IACrC,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,8BAA8B;IAC9B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,8BAA8B;IAC9B,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,CAAC;IAClC,mCAAmC;IACnC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC1B,wDAAwD;IACxD,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,kGAAkG;IAClG,mBAAmB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtC,wCAAwC;IACxC,oBAAoB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvC,iDAAiD;IACjD,qBAAqB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxC,wEAAwE;IACxE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2DAA2D;IAC3D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,6DAA6D;IAC7D,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yEAAyE;IACzE,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8DAA8D;IAC9D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,mEAAmE;IACnE,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AA2ED,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,CAAC,EAAE,EACnC,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,OAAe,EACf,YAAgB,EAChB,SAAS,EACT,SAA4B,EAC5B,UAAU,EACV,QAAQ,EACR,WAAW,EACX,WAAW,EACX,iBAAwB,EACxB,YAAY,EACZ,YAAmB,EACnB,QAAQ,EAAE,YAAiB,EAC3B,eAA+B,EAC/B,mBAAwB,EACxB,oBAAyB,EACzB,qBAA+B,EAC/B,SAAS,EACT,IAAI,EAAE,cAAc,EACpB,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,iBAAyB,EACzB,YAAgB,EAChB,OAAc,EACd,cAAqB,GACtB,EAAE,cAAc,CAAC,CAAC,CAAC,2CAk4BnB"}
@@ -0,0 +1,17 @@
1
+ interface DateRangePickerProps {
2
+ startDate: string;
3
+ endDate?: string;
4
+ onChange: (range: {
5
+ startDate: string;
6
+ endDate: string;
7
+ }) => void;
8
+ minDate?: string;
9
+ viewMonth?: string;
10
+ numberOfMonths?: number;
11
+ showSummary?: boolean;
12
+ startLabel?: string;
13
+ endLabel?: string;
14
+ }
15
+ export default function DateRangePicker({ startDate, endDate, onChange, minDate, viewMonth, numberOfMonths, showSummary, startLabel, endLabel, }: DateRangePickerProps): import("react/jsx-runtime").JSX.Element;
16
+ export {};
17
+ //# sourceMappingURL=DateRangePicker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DateRangePicker.d.ts","sourceRoot":"","sources":["../../../src/components/ui/DateRangePicker.tsx"],"names":[],"mappings":"AAKA,OAAO,iCAAiC,CAAC;AAGzC,UAAU,oBAAoB;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,CAAC,KAAK,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAClE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAyFD,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACtC,SAAS,EACT,OAAO,EACP,QAAQ,EACR,OAAO,EACP,SAAS,EACT,cAAkB,EAClB,WAAkB,EAClB,UAAqB,EACrB,QAAoB,GACrB,EAAE,oBAAoB,2CAuLtB"}