@uxuissk/design-system 0.8.8 → 0.8.9

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.
@@ -3736,9 +3736,9 @@ function _r({
3736
3736
  }
3737
3737
  _r.displayName = "SidebarAccountSwitcher";
3738
3738
  const ga = {
3739
- fontFamily: "var(--font-label)",
3740
- fontSize: "var(--text-label)",
3741
- fontWeight: "var(--weight-button)"
3739
+ fontFamily: "var(--font-h4)",
3740
+ fontSize: "var(--text-h4)",
3741
+ fontWeight: "var(--weight-h4)"
3742
3742
  }, va = {
3743
3743
  fontFamily: "var(--font-p)",
3744
3744
  fontSize: "var(--text-p)"
@@ -83,7 +83,7 @@
83
83
  ${a?"opacity-50 pointer-events-none":""}
84
84
  ${f?"border-primary bg-primary/5":"border-border hover:border-primary/40 hover:bg-accent/30"}`,children:[e.jsx("div",{className:"w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center",children:e.jsx(v.Upload,{size:20,className:"text-primary"})}),e.jsxs("div",{className:"text-center",children:[e.jsxs("p",{className:"text-foreground",style:_e,children:[e.jsx("span",{className:"text-primary",children:"Click to upload"})," or drag and drop"]}),e.jsxs("p",{className:"text-muted-foreground",style:tt,children:[l||(r?`Accepted: ${r}`:"Any file type"),t&&` · Max ${ot(t)}`]})]})]}),e.jsx("input",{ref:g,type:"file",className:"hidden",accept:r,multiple:o,onChange:u=>k(u.target.files)}),y.length>0&&e.jsx(at,{files:y,onRemove:$})]})}const ha={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},ua={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"};function ba({images:r,initialIndex:t=0}){const[o,a]=c.useState(!1),[s,n]=c.useState(t),[l,d]=c.useState(1),[i,h]=c.useState(0),b=r[s],x=()=>{n(y=>(y-1+r.length)%r.length),d(1),h(0)},w=()=>{n(y=>(y+1)%r.length),d(1),h(0)},f=()=>d(y=>Math.min(y+.25,3)),p=()=>d(y=>Math.max(y-.25,.5)),g=()=>h(y=>(y+90)%360);return e.jsxs("div",{children:[e.jsx("div",{className:"flex flex-wrap gap-2",children:r.map((y,k)=>e.jsx("button",{onClick:()=>{n(k),a(!0),d(1),h(0)},className:`rounded-[var(--radius-md)] overflow-hidden border-2 transition-all cursor-pointer hover:opacity-80
85
85
  ${s===k&&o?"border-primary":"border-border"}`,children:e.jsx("div",{className:"w-20 h-20 bg-muted flex items-center justify-center overflow-hidden",children:e.jsx("img",{src:y.thumbnail||y.src,alt:y.alt,className:"w-full h-full object-cover",loading:"lazy"})})},k))}),o&&e.jsxs("div",{role:"dialog","aria-modal":"true","aria-label":`Image preview: ${b.alt}`,className:"fixed inset-0 z-[60] bg-foreground/80 flex flex-col",children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-foreground/20",children:[e.jsxs("span",{className:"text-primary-foreground",style:ha,children:[b.alt," (",s+1,"/",r.length,")"]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{onClick:p,"aria-label":"Zoom out",className:"w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] text-primary-foreground/70 hover:text-primary-foreground hover:bg-primary-foreground/10 cursor-pointer",children:e.jsx(v.ZoomOut,{size:16})}),e.jsxs("span",{className:"text-primary-foreground/70 px-2",style:ua,"aria-live":"polite","aria-label":`Zoom level ${Math.round(l*100)}%`,children:[Math.round(l*100),"%"]}),e.jsx("button",{onClick:f,"aria-label":"Zoom in",className:"w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] text-primary-foreground/70 hover:text-primary-foreground hover:bg-primary-foreground/10 cursor-pointer",children:e.jsx(v.ZoomIn,{size:16})}),e.jsx("button",{onClick:g,"aria-label":"Rotate clockwise",className:"w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] text-primary-foreground/70 hover:text-primary-foreground hover:bg-primary-foreground/10 cursor-pointer",children:e.jsx(v.RotateCw,{size:16})}),e.jsx("div",{className:"w-px h-5 bg-primary-foreground/20 mx-1"}),e.jsx("button",{onClick:()=>{a(!1),d(1),h(0)},"aria-label":"Close preview",className:"w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] text-primary-foreground/70 hover:text-primary-foreground hover:bg-primary-foreground/10 cursor-pointer",children:e.jsx(v.X,{size:16})})]})]}),e.jsxs("div",{className:"flex-1 flex items-center justify-center relative overflow-hidden",onClick:y=>{y.target===y.currentTarget&&(a(!1),d(1),h(0))},children:[r.length>1&&e.jsx("button",{onClick:x,"aria-label":"Previous image",className:"absolute left-4 w-10 h-10 rounded-full bg-foreground/30 text-primary-foreground flex items-center justify-center hover:bg-foreground/50 cursor-pointer z-10",children:e.jsx(v.ChevronLeft,{size:20})}),e.jsx("img",{src:b.src,alt:b.alt,className:"max-w-[90%] max-h-[80vh] object-contain transition-transform",style:{transform:`scale(${l}) rotate(${i}deg)`}}),r.length>1&&e.jsx("button",{onClick:w,"aria-label":"Next image",className:"absolute right-4 w-10 h-10 rounded-full bg-foreground/30 text-primary-foreground flex items-center justify-center hover:bg-foreground/50 cursor-pointer z-10",children:e.jsx(v.ChevronRight,{size:20})})]}),r.length>1&&e.jsx("div",{className:"flex items-center justify-center gap-2 py-3 bg-foreground/20",children:r.map((y,k)=>e.jsx("button",{onClick:()=>{n(k),d(1),h(0)},className:`w-12 h-12 rounded-[var(--radius-sm)] overflow-hidden border-2 cursor-pointer transition-all
86
- ${k===s?"border-primary-foreground":"border-transparent opacity-50 hover:opacity-80"}`,children:e.jsx("img",{src:y.thumbnail||y.src,alt:y.alt,className:"w-full h-full object-cover"})},k))})]})]})}const ga={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},pa={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},va={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"};function ma({items:r,parentRect:t}){const o=c.useRef(null),[a,s]=c.useState({top:t.top,left:t.right+4});return c.useEffect(()=>{if(!o.current)return;const l=o.current.getBoundingClientRect();let d=t.top,i=t.right+4;i+l.width>window.innerWidth-8&&(i=t.left-l.width-4),d+l.height>window.innerHeight-8&&(d=window.innerHeight-l.height-8),s({top:d,left:i})},[t]),Ce.createPortal(e.jsx("div",{ref:o,className:"fixed z-[9999] min-w-[200px] rounded-[var(--radius)] border border-border bg-popover shadow-elevation-sm py-1",style:{top:a.top,left:a.left},children:r.map((n,l)=>e.jsx(st,{item:n},l))}),document.body)}function st({item:r}){const[t,o]=c.useState(!1),a=c.useRef(null),s=c.useRef(null);if(r.divider)return e.jsx("div",{className:"my-1 border-t border-border"});if(r.label)return e.jsx("div",{className:"px-3 py-1.5 text-muted-foreground",style:va,children:r.label});const n=r.children&&r.children.length>0,l=()=>{s.current&&clearTimeout(s.current),n&&o(!0)},d=()=>{s.current=setTimeout(()=>o(!1),150)};return e.jsxs("div",{ref:a,className:"relative",onMouseEnter:l,onMouseLeave:d,children:[e.jsxs("button",{onClick:()=>{var i;n||(i=r.onClick)==null||i.call(r)},disabled:r.disabled,className:`w-full flex items-center text-left rounded-[var(--radius-sm)] transition-colors cursor-pointer ${r.destructive?"text-destructive hover:bg-destructive/10":r.disabled?"text-muted-foreground opacity-50 cursor-not-allowed":"text-popover-foreground hover:bg-[var(--Colors--Background--bg-primary_hover)]"}`,style:{padding:"var(--Spacing--Spacing-md) var(--Spacing--Spacing-2xl)",gap:"var(--Spacing--Spacing-lg)",...ga},children:[r.icon&&e.jsx("span",{className:"flex-shrink-0",children:r.icon}),e.jsx("span",{className:"flex-1",children:r.text}),r.shortcut&&e.jsx("span",{className:"text-muted-foreground ml-4",style:pa,children:r.shortcut}),n&&e.jsx(v.ChevronRight,{size:14,className:"text-muted-foreground"})]}),n&&t&&a.current&&e.jsx(ma,{items:r.children,parentRect:a.current.getBoundingClientRect()})]})}function nt({items:r,open:t,onClose:o,triggerRef:a,className:s=""}){const n=c.useRef(null),[l,d]=c.useState({top:0,left:0});return c.useEffect(()=>{if(!t||!a.current)return;const i=a.current.getBoundingClientRect();let h=i.bottom+4,b=i.left;requestAnimationFrame(()=>{if(!n.current)return;const x=n.current.getBoundingClientRect();b+x.width>window.innerWidth-8&&(b=i.right-x.width),h+x.height>window.innerHeight-8&&(h=i.top-x.height-4),d({top:h,left:b})}),d({top:h,left:b})},[t,a]),c.useEffect(()=>{if(!t)return;const i=h=>{var b,x;(b=a.current)!=null&&b.contains(h.target)||(x=n.current)!=null&&x.contains(h.target)||o()};return document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)},[t,o,a]),t?Ce.createPortal(e.jsxs("div",{ref:n,className:`fixed z-[9999] min-w-[200px] rounded-[var(--radius)] border border-border bg-popover shadow-elevation-sm py-1 animate-[fadeIn_0.15s_ease] ${s}`,style:{top:l.top,left:l.left},children:[r.map((i,h)=>e.jsx(st,{item:i},h)),e.jsx("style",{children:"@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }"})]}),document.body):null}nt.displayName="Menu";const lt={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},er={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},xa={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},He={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"};function it({type:r="info",title:t,message:o,closable:a=!0,onClose:s,action:n,avatar:l,time:d,read:i}){const h={info:e.jsx(v.Info,{size:16,className:"text-primary"}),success:e.jsx(v.CheckCircle2,{size:16,className:"text-chart-2"}),warning:e.jsx(v.AlertTriangle,{size:16,className:"text-chart-5"}),error:e.jsx(v.XCircle,{size:16,className:"text-destructive"})},b={info:"border-l-primary",success:"border-l-chart-2",warning:"border-l-chart-5",error:"border-l-destructive"};return e.jsxs("div",{className:`flex gap-3 px-4 py-3 rounded-[var(--radius-md)] border border-border bg-card border-l-[3px] ${b[r]} ${i===!1?"bg-primary/5":""}`,children:[l?e.jsx("div",{className:"w-8 h-8 rounded-full bg-muted flex-shrink-0 flex items-center justify-center overflow-hidden",style:er,children:e.jsx("span",{className:"text-primary",children:l.slice(0,2).toUpperCase()})}):e.jsx("span",{className:"flex-shrink-0 mt-0.5",children:h[r]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("span",{className:"text-foreground",style:er,children:t}),e.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[d&&e.jsx("span",{className:"text-muted-foreground",style:xa,children:d}),i===!1&&e.jsx("span",{className:"w-2 h-2 rounded-full bg-primary"}),a&&s&&e.jsx("button",{onClick:s,className:"text-muted-foreground hover:text-foreground cursor-pointer",children:e.jsx(v.X,{size:14})})]})]}),o&&e.jsx("p",{className:"text-muted-foreground mt-0.5",style:lt,children:o}),n&&e.jsxs("button",{onClick:n.onClick,className:"inline-flex items-center gap-1 text-primary mt-2 hover:underline cursor-pointer",style:He,children:[n.label," ",e.jsx(v.ExternalLink,{size:12})]})]})]})}function ya({items:r,onMarkRead:t,onMarkAllRead:o,onDismiss:a,onClearAll:s}){const[n,l]=c.useState(r),d=t!==void 0||o!==void 0,i=d?r:n,h=i.filter(f=>!f.read).length,b=()=>{o&&o(),d||l(f=>f.map(p=>({...p,read:!0})))},x=f=>{a&&a(f),d||l(p=>p.filter(g=>g.id!==f))},w=f=>{t&&t(f),d||l(p=>p.map(g=>g.id===f?{...g,read:!0}:g))};return e.jsxs("div",{className:"max-w-md rounded-[var(--radius-md)] border border-border bg-card overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-border flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(v.Bell,{size:16,className:"text-foreground"}),e.jsx("span",{className:"text-foreground",style:er,children:"Notifications"}),h>0&&e.jsx("span",{className:"px-1.5 py-0.5 rounded-full bg-primary text-primary-foreground",style:He,children:h})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[h>0&&e.jsx("button",{onClick:b,className:"text-primary cursor-pointer",style:He,children:"Mark all read"}),i.length>0&&s&&e.jsx("button",{onClick:s,className:"text-muted-foreground hover:text-destructive cursor-pointer",style:He,children:"Clear all"})]})]}),e.jsx("div",{className:"divide-y divide-border max-h-[360px] overflow-y-auto",children:i.map(f=>e.jsx("div",{className:`px-3 py-2 ${f.read?"":"bg-primary/5"}`,onClick:()=>!f.read&&w(f.id),children:e.jsx(it,{type:f.type,title:f.title,message:f.message,time:f.time,read:f.read,closable:!!a,onClose:()=>x(f.id)})},f.id))}),i.length===0&&e.jsxs("div",{className:"py-10 text-center text-muted-foreground",children:[e.jsx(v.BellOff,{size:24,className:"mx-auto mb-2 opacity-40"}),e.jsx("span",{style:lt,children:"No notifications"})]})]})}const wa={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"};function Na({trigger:r,children:t,placement:o="bottom",title:a,open:s,onOpenChange:n}){const[l,d]=c.useState(!1),i=s!==void 0?s:l,h=w=>{n==null||n(w),s===void 0&&d(w)},b=c.useRef(null);c.useEffect(()=>{if(!i)return;const w=f=>{b.current&&!b.current.contains(f.target)&&h(!1)};return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[i]);const x={top:"bottom-full left-1/2 -translate-x-1/2 mb-2",bottom:"top-full left-1/2 -translate-x-1/2 mt-2",left:"right-full top-1/2 -translate-y-1/2 mr-2",right:"left-full top-1/2 -translate-y-1/2 ml-2"};return e.jsxs("div",{className:"relative inline-block",ref:b,children:[e.jsx("div",{onClick:()=>h(!i),className:"cursor-pointer",children:r}),i&&e.jsx("div",{className:`absolute z-50 ${x[o]} w-max max-w-xs`,children:e.jsxs("div",{className:"rounded-[var(--radius-md)] border border-border bg-card shadow-elevation-sm overflow-hidden",children:[a&&e.jsxs("div",{className:"px-4 py-2.5 border-b border-border flex items-center justify-between",children:[e.jsx("span",{className:"text-foreground",style:wa,children:a}),e.jsx("button",{onClick:()=>h(!1),className:"text-muted-foreground hover:text-foreground cursor-pointer",children:e.jsx(v.X,{size:14})})]}),e.jsx("div",{className:"px-4 py-3",children:t})]})})]})}const Sa={fontFamily:"var(--font-label)",fontSize:"var(--text-label)"},ka={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"};function dt({value:r,max:t=100,size:o="md",color:a,label:s,showValue:n,indeterminate:l,className:d=""}){const i={sm:"h-1.5",md:"h-2.5",lg:"h-4"},h=l?0:Math.min(100,Math.max(0,(r??0)/t*100));return e.jsxs("div",{className:`w-full ${d}`,children:[(s||n)&&e.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[s&&e.jsx("span",{className:"text-foreground",style:Sa,children:s}),n&&!l&&e.jsxs("span",{className:"text-muted-foreground",style:ka,children:[Math.round(h),"%"]})]}),e.jsx("div",{className:`w-full ${i[o]} rounded-full bg-muted overflow-hidden`,children:l?e.jsx("div",{className:"h-full w-1/3 rounded-full animate-[indeterminate_1.5s_infinite_ease-in-out]",style:{backgroundColor:a??"var(--primary)"}}):e.jsx("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${h}%`,backgroundColor:a??"var(--primary)"}})}),e.jsx("style",{children:"@keyframes indeterminate { 0% { transform: translateX(-100%); } 100% { transform: translateX(400%); } }"})]})}dt.displayName="ProgressBar";const $a={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},za={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"};function Ca({value:r=0,onChange:t,max:o=5,size:a="md",disabled:s,readOnly:n,icon:l="star",showValue:d,label:i}){const[h,b]=c.useState(0),x=a==="sm"?16:a==="lg"?28:20,w=a==="sm"?"gap-0.5":a==="lg"?"gap-1.5":"gap-1",f=l==="heart"?v.Heart:l==="thumb"?v.ThumbsUp:v.Star,p=l==="heart"?"text-destructive":"text-chart-5",g=Array.from({length:o},(y,k)=>k+1);return e.jsxs("div",{className:`inline-flex items-center ${w} ${s?"opacity-50 pointer-events-none":""}`,children:[i&&e.jsx("span",{className:"text-foreground mr-2",style:$a,children:i}),g.map(y=>{const k=y<=(h||r);return e.jsx("button",{type:"button",className:`transition-transform ${n||s?"":"cursor-pointer hover:scale-110"} ${k?p:"text-muted-foreground/40"}`,onMouseEnter:()=>!n&&!s&&b(y),onMouseLeave:()=>b(0),onClick:()=>!n&&!s&&(t==null?void 0:t(y===r?0:y)),disabled:s||n,children:e.jsx(f,{size:x,fill:k?"currentColor":"none"})},y)}),d&&e.jsxs("span",{className:"text-foreground ml-1",style:za,children:[r,"/",o]})]})}const Fa={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"};function rr({children:r,content:t,placement:o="top",className:a=""}){const[s,n]=c.useState(!1),[l,d]=c.useState({top:0,left:0}),i=c.useRef(null),h=()=>{if(!i.current)return;const p=i.current.getBoundingClientRect(),g=8;let y=0,k=0;o==="right"?(y=p.top+p.height/2,k=p.right+g):o==="left"?(y=p.top+p.height/2,k=p.left-g):o==="bottom"?(y=p.bottom+g,k=p.left+p.width/2):(y=p.top-g,k=p.left+p.width/2),d({top:y,left:k})},b=()=>{h(),n(!0)},x=()=>n(!1);c.useEffect(()=>{if(!s)return;const p=()=>h();return window.addEventListener("scroll",p,!0),window.addEventListener("resize",p),()=>{window.removeEventListener("scroll",p,!0),window.removeEventListener("resize",p)}},[s]);const w=o==="right"?{transform:"translateY(-50%)"}:o==="left"?{transform:"translate(-100%, -50%)"}:o==="bottom"?{transform:"translateX(-50%)"}:{transform:"translate(-50%, -100%)"},f=s?e.jsx("div",{style:{position:"fixed",top:l.top,left:l.left,zIndex:9999,pointerEvents:"none",...w},children:e.jsx("div",{className:"px-2.5 py-1.5 rounded-[var(--radius-sm)] bg-foreground text-background whitespace-nowrap shadow-elevation-sm",style:Fa,role:"tooltip",children:t})}):null;return e.jsxs(e.Fragment,{children:[e.jsx("div",{ref:i,className:`relative inline-flex ${a}`,onMouseEnter:b,onMouseLeave:x,onFocus:b,onBlur:x,children:r}),typeof document<"u"&&Ce.createPortal(f,document.body)]})}rr.displayName="Tooltip";const ct={fontFamily:"var(--font-p)",fontSize:"var(--text-p)",fontWeight:"var(--weight-button)",lineHeight:"1"},Wa={fontFamily:"var(--font-p)",fontSize:"var(--text-p)",fontWeight:"var(--weight-p)",lineHeight:"1"},La={fontFamily:"var(--font-p)",fontSize:"var(--text-p)",fontWeight:"var(--weight-p)",lineHeight:"1"};function tr({item:r,size:t=40}){const o=t+"px",a=t>=40?"var(--text-label)":"var(--text-caption)";if(r.avatarUrl)return e.jsx("img",{src:r.avatarUrl,alt:r.name,style:{width:o,height:o,borderRadius:"50%",objectFit:"cover",flexShrink:0}});const s=r.avatarFallback||r.name.charAt(0).toUpperCase();return e.jsx("div",{style:{width:o,height:o,borderRadius:"50%",flexShrink:0,background:"var(--Base_Color--Sky--100, #e0f2fe)",display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"var(--font-label)",fontSize:a,fontWeight:"var(--weight-button)",color:"var(--Base_Color--Sky--600, #1b8bf5)"},children:s})}function or({company:r,branch:t,provider:o,companies:a=[],branches:s=[],providers:n=[],onCompanyChange:l,onBranchChange:d,onProviderChange:i,collapsed:h=!1}){const[b,x]=c.useState(!1),w=c.useRef(null);c.useEffect(()=>{if(!b)return;const y=k=>{w.current&&!w.current.contains(k.target)&&x(!1)};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[b]);const f=r,p=(t==null?void 0:t.name)??(o==null?void 0:o.name),g=y=>{l==null||l(y),x(!1)};return h?e.jsx("button",{onClick:()=>x(!b),title:(f==null?void 0:f.name)??"Switch account",style:{width:40,height:40,borderRadius:"50%",border:"none",background:"rgba(240,249,255,1)",cursor:"pointer",padding:0,display:"flex",alignItems:"center",justifyContent:"center"},children:f?e.jsx(tr,{item:f,size:36}):e.jsx("div",{style:{width:36,height:36,borderRadius:"50%",background:"var(--primary)",display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",fontFamily:"var(--font-label)",fontSize:"var(--text-caption)",fontWeight:"var(--weight-button)"},children:"S"})}):e.jsxs("div",{ref:w,style:{position:"relative",width:"100%"},children:[e.jsxs("button",{onClick:()=>x(!b),style:{width:"100%",background:"rgba(240,249,255,1)",border:"1px solid rgba(217,242,255,1)",borderRadius:"8px",padding:"8px 16px 8px 8px",display:"flex",alignItems:"center",gap:"10px",cursor:"pointer",textAlign:"left",minHeight:"56px"},children:[f?e.jsx(tr,{item:f,size:40}):e.jsx("div",{style:{width:40,height:40,borderRadius:"50%",background:"var(--primary)",display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)",flexShrink:0},children:"S"}),e.jsxs("div",{style:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:"4px"},children:[e.jsx("span",{style:{...ct,color:"var(--foreground, #1f2937)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"block"},children:(f==null?void 0:f.name)??"Select Company"}),p&&e.jsx("span",{style:{...Wa,color:"var(--Base_Color--Sky--500, #32a9ff)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"block"},children:p})]}),e.jsx(v.ChevronUp,{size:16,color:"rgba(50,169,255,1)",style:{flexShrink:0,transition:"transform 0.2s ease",transform:b?"rotate(0deg)":"rotate(180deg)"}})]}),b&&e.jsx("div",{style:{position:"absolute",top:"calc(100% + 4px)",left:0,right:0,zIndex:50,background:"var(--background, #fff)",border:"1px solid var(--border, #e5e7eb)",borderRadius:"8px",boxShadow:"0px 4px 12px 0px rgba(0,0,0,0.08)",overflow:"hidden"},children:e.jsx("div",{style:{maxHeight:"240px",overflowY:"auto"},children:a.map(y=>{const k=(r==null?void 0:r.id)===y.id;return e.jsxs("button",{onClick:()=>g(y),style:{width:"100%",display:"flex",alignItems:"center",gap:"10px",padding:"8px 12px",background:k?"rgba(240,249,255,0.6)":"none",border:"none",cursor:"pointer",textAlign:"left",transition:"background 0.15s",minHeight:"48px"},onMouseEnter:$=>{k||($.currentTarget.style.background="var(--accent, #f3f4f6)")},onMouseLeave:$=>{$.currentTarget.style.background=k?"rgba(240,249,255,0.6)":"none"},children:[e.jsx(tr,{item:y,size:36}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{...ct,color:"var(--foreground, #1f2937)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:y.name}),y.handle&&e.jsx("div",{style:{...La,color:"var(--muted-foreground, #6b7280)",marginTop:"2px"},children:y.handle})]}),k&&e.jsx(v.Check,{size:16,color:"var(--Base_Color--Sky--500, #32a9ff)",style:{flexShrink:0}})]},y.id)})})})]})}or.displayName="SidebarAccountSwitcher";const Ma={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},Da={fontFamily:"var(--font-p)",fontSize:"var(--text-p)"},Aa={fontFamily:"var(--font-label)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},ja={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},Ea={fontFamily:"var(--font-label)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"};function Pe({brand:r,accountSwitcher:t,groups:o,activeItem:a,onNavigate:s,collapsed:n=!1,onCollapsedChange:l,showCollapseToggle:d=!0,version:i,versionDate:h,width:b,className:x=""}){const[w,f]=c.useState(new Set),p=$=>{f(u=>{const m=new Set(u);return m.has($)?m.delete($):m.add($),m})},k=n?"var(--shell-sidebar-collapsed, 64px)":b??"var(--shell-sidebar-width, 240px)";return e.jsxs("div",{className:`bg-sidebar border-r border-sidebar-border flex flex-col flex-shrink-0 h-full ${x}`,style:{width:k,minWidth:k,transition:"width var(--shell-sidebar-transition, 250ms cubic-bezier(0.4,0,0.2,1)), min-width var(--shell-sidebar-transition, 250ms cubic-bezier(0.4,0,0.2,1))",overflow:"visible"},children:[t?e.jsx("div",{className:`${n?"px-2 py-2":"px-3 py-3"} border-b border-sidebar-border flex items-center ${n?"justify-center":""}`,children:e.jsx(or,{...t,collapsed:n})}):r&&e.jsxs("div",{className:`${n?"px-2":"px-4"} py-4 border-b border-sidebar-border flex items-center ${n?"justify-center":"gap-2"}`,children:[r.logo?e.jsx("img",{src:r.logo,alt:r.name,className:"w-8 h-8 rounded-[var(--radius-sm)] flex-shrink-0 object-cover"}):e.jsx("div",{className:"w-8 h-8 rounded-[var(--radius-sm)] bg-primary flex items-center justify-center text-primary-foreground flex-shrink-0",style:Aa,children:r.name.charAt(0).toUpperCase()}),!n&&e.jsx("span",{className:"text-sidebar-foreground truncate",style:Ma,children:r.name})]}),e.jsx("nav",{className:`flex-1 overflow-y-auto py-3 ${n?"px-1.5":"px-2"}`,children:o.map($=>{const u=w.has($.label);return e.jsxs("div",{className:"mb-4",children:[!n&&e.jsxs("button",{onClick:()=>p($.label),className:"w-full flex items-center justify-between px-2 mb-1.5 text-muted-foreground hover:text-foreground transition-colors cursor-pointer",style:ja,children:[e.jsx("span",{children:$.label}),e.jsx(v.ChevronUp,{size:12,style:{transition:"transform 0.2s ease",transform:u?"rotate(180deg)":"rotate(0deg)"}})]}),n&&e.jsx("div",{className:"h-px bg-sidebar-border mx-1 mb-2 mt-1"}),!u&&e.jsx("div",{className:"space-y-0.5",children:$.items.map(m=>{const N=a===m.id,C=e.jsxs("button",{onClick:()=>s==null?void 0:s(m),className:`w-full flex items-center ${n?"justify-center":"gap-2"} ${n?"px-0":"px-2"} py-2 rounded-[var(--radius-md)] transition-colors cursor-pointer ${N?"bg-sidebar-accent text-sidebar-accent-foreground":"text-sidebar-foreground hover:bg-sidebar-accent/50"}`,style:Da,children:[e.jsx("span",{className:`flex-shrink-0 ${N?"text-sidebar-primary":"text-muted-foreground"}`,children:m.icon}),!n&&e.jsx("span",{className:"truncate flex-1 text-left",children:m.label}),m.badge!=null&&!n&&e.jsx("span",{className:"rounded-full bg-primary text-primary-foreground",style:{fontFamily:"var(--font-caption)",fontSize:"var(--text-caption)",fontWeight:"var(--weight-button)",lineHeight:"1",padding:"2px 6px",display:"inline-flex",alignItems:"center",minWidth:"18px",justifyContent:"center"},children:String(m.badge)})]},m.id);return n?e.jsx("div",{className:"w-full flex",children:e.jsx(rr,{content:m.label,placement:"right",className:"flex-1",children:C})},m.id):C})})]},$.label)})}),(d&&l||i)&&e.jsxs("div",{className:`${n?"px-1.5":"px-3"} py-3 border-t border-sidebar-border flex flex-col gap-1`,children:[d&&l&&e.jsxs("button",{onClick:()=>l(!n),className:`w-full flex items-center ${n?"justify-center":"gap-2 px-2"} py-1.5 rounded-[var(--radius-md)] text-muted-foreground hover:text-foreground hover:bg-sidebar-accent/50 cursor-pointer`,style:Ea,title:n?"Expand sidebar":"Collapse sidebar",children:[n?e.jsx(v.PanelLeftOpen,{size:16}):e.jsx(v.PanelLeftClose,{size:16}),!n&&e.jsx("span",{children:"Collapse"})]}),i&&!n&&e.jsxs("div",{className:"px-2 flex items-center gap-1.5 text-muted-foreground/60",style:{fontFamily:"var(--font-label)",fontSize:"var(--text-caption)",fontWeight:"var(--weight-label)"},children:[e.jsx("span",{children:i}),h&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsx("span",{children:h})]})]}),i&&n&&e.jsx("div",{className:"flex justify-center text-muted-foreground/60",style:{fontFamily:"var(--font-label)",fontSize:"var(--text-caption)",fontWeight:"var(--weight-label)"},title:`${i}${h?` · ${h}`:""}`,children:i})]})]})}Pe.displayName="Sidebar";function se({width:r,height:t,variant:o="rectangular",animate:a=!0,className:s}){const n="bg-muted",l=a?"animate-pulse":"",d=o==="circular"?"rounded-full":o==="rounded"?"rounded-[var(--radius-md)]":"rounded-[var(--radius-sm)]";return e.jsx("div",{className:`${n} ${l} ${d} ${s??""}`,style:{width:r??"100%",height:t??(o==="text"?"1em":o==="circular"?40:20)}})}function Ta(){return e.jsxs("div",{className:"rounded-[var(--radius-md)] border border-border bg-card p-4 space-y-4 w-full max-w-sm",children:[e.jsx(se,{variant:"rounded",height:160}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(se,{variant:"text",width:"60%",height:20}),e.jsx(se,{variant:"text",width:"100%",height:14}),e.jsx(se,{variant:"text",width:"80%",height:14})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(se,{variant:"circular",width:36,height:36}),e.jsxs("div",{className:"flex-1 space-y-1.5",children:[e.jsx(se,{variant:"text",width:"40%",height:14}),e.jsx(se,{variant:"text",width:"25%",height:12})]})]})]})}function Ia(){return e.jsxs("div",{className:"rounded-[var(--radius-md)] border border-border bg-card overflow-hidden",children:[e.jsx("div",{className:"px-4 py-3 border-b border-border bg-muted/30 flex gap-4",children:[120,160,100,80].map((r,t)=>e.jsx(se,{variant:"text",width:r,height:14},t))}),[0,1,2,3].map(r=>e.jsxs("div",{className:"px-4 py-3 border-b border-border flex items-center gap-4",children:[e.jsx(se,{variant:"circular",width:28,height:28}),e.jsx(se,{variant:"text",width:100+r*15,height:14}),e.jsx(se,{variant:"text",width:140,height:14,className:"flex-1"}),e.jsx(se,{variant:"rounded",width:60,height:22}),e.jsx(se,{variant:"text",width:80,height:14})]},r))]})}function ar({rows:r=3}){return e.jsx("div",{className:"space-y-3 w-full max-w-md",children:Array.from({length:r}).map((t,o)=>e.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5 rounded-[var(--radius-md)] border border-border bg-card",children:[e.jsx(se,{variant:"circular",width:40,height:40}),e.jsxs("div",{className:"flex-1 space-y-1.5",children:[e.jsx(se,{variant:"text",width:`${60+o*10}%`,height:14}),e.jsx(se,{variant:"text",width:`${40+o*5}%`,height:12})]}),e.jsx(se,{variant:"rounded",width:50,height:24})]},o))})}const Ba={sm:"w-4 h-4 border-2",md:"w-8 h-8 border-[3px]",lg:"w-12 h-12 border-4",xl:"w-16 h-16 border-4"};function ft({size:r="md",color:t,className:o=""}){return e.jsx("div",{className:`${Ba[r]} rounded-full border-muted animate-spin ${o}`,style:{borderTopColor:t??"var(--primary)"},role:"status","aria-label":"Loading"})}ft.displayName="Spinner";const sr={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},ht={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},ut={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},bt={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},_a={sm:{fontFamily:"var(--font-h4)",fontSize:"var(--text-h4)",fontWeight:"var(--weight-h4)"},md:{fontFamily:"var(--font-h2)",fontSize:"var(--text-h2)",fontWeight:"var(--weight-h2)"},lg:{fontFamily:"var(--font-h1)",fontSize:"var(--text-h1)",fontWeight:"var(--weight-h1)"}};function Ha({title:r,value:t,prefix:o,suffix:a,trend:s,trendLabel:n,icon:l,size:d="md",loading:i}){const h=_a[d],b=(s==null?void 0:s.direction)==="up"?"text-chart-2":(s==null?void 0:s.direction)==="down"?"text-destructive":"text-muted-foreground",x=(s==null?void 0:s.direction)==="up"?v.ArrowUpRight:(s==null?void 0:s.direction)==="down"?v.ArrowDownRight:v.Minus;return i?e.jsxs("div",{className:"space-y-2 animate-pulse",children:[e.jsx("div",{className:"h-3 w-20 bg-muted rounded-[var(--radius-sm)]"}),e.jsx("div",{className:"h-8 w-32 bg-muted rounded-[var(--radius-sm)]"}),e.jsx("div",{className:"h-3 w-24 bg-muted rounded-[var(--radius-sm)]"})]}):e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[l&&e.jsx("span",{className:"text-muted-foreground",children:l}),e.jsx("span",{className:"text-muted-foreground",style:sr,children:r})]}),e.jsxs("div",{className:"flex items-baseline gap-1",children:[o&&e.jsx("span",{className:"text-muted-foreground",style:ht,children:o}),e.jsx("span",{className:"text-foreground",style:h,children:typeof t=="number"?t.toLocaleString():t}),a&&e.jsx("span",{className:"text-muted-foreground",style:sr,children:a})]}),s&&e.jsxs("div",{className:`flex items-center gap-1 ${b}`,children:[e.jsx(x,{size:14}),e.jsxs("span",{style:bt,children:[s.value,"%"]}),n&&e.jsx("span",{className:"text-muted-foreground",style:ut,children:n})]})]})}function Pa({title:r,value:t,prefix:o,trend:a,trendLabel:s,icon:n,iconBg:l}){const d=(a==null?void 0:a.direction)==="up"?"text-chart-2":(a==null?void 0:a.direction)==="down"?"text-destructive":"text-muted-foreground",i=(a==null?void 0:a.direction)==="up"?v.ArrowUpRight:(a==null?void 0:a.direction)==="down"?v.ArrowDownRight:v.Minus;return e.jsx("div",{className:"rounded-[var(--radius-md)] border border-border bg-card p-5 overflow-hidden",children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"space-y-1 min-w-0 flex-1",children:[e.jsx("span",{className:"text-muted-foreground",style:sr,children:r}),e.jsxs("div",{className:"flex items-baseline gap-1",children:[o&&e.jsx("span",{className:"text-muted-foreground",style:ht,children:o}),e.jsx("span",{className:"text-foreground",style:{fontFamily:"var(--font-h3)",fontSize:"var(--text-h3)",fontWeight:"var(--weight-h3)"},children:typeof t=="number"?t.toLocaleString():t})]}),a&&e.jsxs("div",{className:`flex items-center gap-1 ${d}`,children:[e.jsx(i,{size:12}),e.jsxs("span",{style:bt,children:[a.value,"%"]}),s&&e.jsx("span",{className:"text-muted-foreground",style:ut,children:s})]})]}),n&&e.jsx("div",{className:`w-10 h-10 rounded-[var(--radius-md)] flex items-center justify-center flex-shrink-0 ${l||"bg-primary/10 text-primary"}`,children:n})]})})}const Oa={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},gt={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},pt={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},vt={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"};function mt({steps:r,current:t,orientation:o="horizontal",onStepClick:a,className:s=""}){return o==="vertical"?e.jsx("div",{className:`flex flex-col ${s}`,children:r.map((n,l)=>{const d=l<t,i=l===t,h=n.disabled;return e.jsxs("div",{className:`flex gap-3 ${h?"opacity-50":""}`,onClick:()=>!h&&(a==null?void 0:a(l)),children:[e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 transition-colors ${h?"cursor-not-allowed":a?"cursor-pointer":""} ${d||i?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground"}`,style:vt,children:d?e.jsx(v.Check,{size:14}):l+1}),l<r.length-1&&e.jsx("div",{className:`w-px flex-1 min-h-[24px] my-1 ${d?"bg-primary":"bg-border"}`})]}),e.jsxs("div",{className:`pb-6 ${l===r.length-1?"pb-0":""}`,children:[e.jsx("span",{className:`block ${i?"text-foreground":"text-muted-foreground"}`,style:i?gt:Oa,children:n.title}),n.description&&e.jsx("span",{className:"text-muted-foreground block",style:pt,children:n.description})]})]},l)})}):e.jsx("div",{className:`flex items-center ${s}`,children:r.map((n,l)=>{const d=l<t,i=l===t;return e.jsxs("div",{className:`flex items-center ${l<r.length-1?"flex-1":""} ${n.disabled?"opacity-50":""}`,children:[e.jsxs("div",{className:"flex flex-col items-center gap-1",onClick:()=>!n.disabled&&(a==null?void 0:a(l)),children:[e.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 transition-colors ${n.disabled?"cursor-not-allowed":a?"cursor-pointer":""} ${d||i?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground"}`,style:vt,children:d?e.jsx(v.Check,{size:14}):l+1}),e.jsx("span",{className:`text-center ${i?"text-foreground":"text-muted-foreground"}`,style:i?gt:pt,children:n.title})]}),l<r.length-1&&e.jsx("div",{className:`flex-1 h-px mx-2 mt-[-20px] ${d?"bg-primary":"bg-border"}`})]},l)})})}mt.displayName="Stepper";const Ya={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},Ga={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},Ua={sm:{track:"w-7 h-4",thumb:"w-3 h-3",on:"translate-x-3"},md:{track:"w-10 h-6",thumb:"w-4.5 h-4.5",on:"translate-x-4.5"},lg:{track:"w-14 h-8",thumb:"w-6.5 h-6.5",on:"translate-x-6"}},Xa={primary:"bg-primary",success:"bg-chart-2",warning:"bg-chart-5",destructive:"bg-destructive"},Ka={sm:{w:12,h:12,on:14},md:{w:18,h:18,on:18},lg:{w:26,h:26,on:24}};function Za({checked:r,onChange:t,label:o,description:a,size:s="md",disabled:n,color:l="primary"}){const d=Ua[s],i=Ka[s];return e.jsxs("label",{className:`inline-flex items-start gap-3 ${n?"opacity-50 pointer-events-none":"cursor-pointer"}`,children:[e.jsx("button",{role:"switch","aria-checked":r,onClick:()=>t(!r),disabled:n,className:`${d.track} rounded-full relative flex-shrink-0 transition-colors cursor-pointer ${r?Xa[l]:"bg-muted"}`,children:e.jsx("span",{className:"rounded-full bg-background shadow-elevation-sm absolute transition-transform",style:{width:i.w,height:i.h,top:"50%",transform:`translateY(-50%) translateX(${r?i.on:2}px)`,left:0}})}),(o||a)&&e.jsxs("div",{children:[o&&e.jsx("span",{className:"text-foreground block",style:Ya,children:o}),a&&e.jsx("span",{className:"text-muted-foreground block",style:Ga,children:a})]})]})}const qa={default:"bg-muted/50 text-foreground border-border",primary:"bg-primary/10 text-primary border-primary/20",success:"bg-chart-2/10 text-chart-2 border-chart-2/20",warning:"bg-chart-5/10 text-chart-5 border-chart-5/20",destructive:"bg-destructive/10 text-destructive border-destructive/20",info:"bg-accent text-accent-foreground border-primary/20"},Ja={sm:"px-1.5 py-0.5",md:"px-2 py-0.5",lg:"px-3 py-1.5"},Qa={sm:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},md:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},lg:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"}};function xt({children:r,color:t="default",size:o="md",icon:a,closable:s,onClose:n,className:l=""}){const d=qa[t],i=Ja[o],h=Qa[o];return e.jsxs("span",{className:`inline-flex items-center gap-1 rounded-full border ${d} ${i} ${l}`,style:h,children:[a&&e.jsx("span",{className:"flex-shrink-0",children:a}),r,s&&e.jsx("button",{className:"hover:opacity-70 cursor-pointer",onClick:n,children:e.jsx(v.X,{size:o==="sm"?10:12})})]})}xt.displayName="Tag";const Va={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},Ra={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},es={default:"bg-card border-border",outline:"bg-transparent border-border",filled:"bg-muted/30 border-transparent"};function yt({tags:r,onChange:t,placeholder:o,disabled:a,maxTags:s,variant:n="default",className:l=""}){const[d,i]=c.useState(""),h=()=>{const x=d.trim();!x||r.includes(x)||s&&r.length>=s||(t([...r,x]),i(""))},b=x=>{t(r.filter(w=>w!==x))};return e.jsxs("div",{className:`flex flex-wrap items-center gap-1.5 px-3 py-2 rounded-[var(--radius)] border ${es[n]} transition-colors focus-within:border-primary ${a?"opacity-50 pointer-events-none":""} ${l}`,children:[r.map(x=>e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-[var(--radius-sm)] bg-primary/10 text-primary",style:Ra,children:[x,e.jsx("button",{className:"hover:text-destructive cursor-pointer",onClick:()=>b(x),children:e.jsx(v.X,{size:12})})]},x)),e.jsx("input",{value:d,onChange:x=>i(x.target.value),onKeyDown:x=>{x.key==="Enter"&&(x.preventDefault(),h()),x.key==="Backspace"&&!d&&r.length&&t(r.slice(0,-1))},placeholder:r.length?"":o,className:"flex-1 min-w-[80px] bg-transparent outline-none text-foreground placeholder:text-muted-foreground",style:Va,disabled:a})]})}yt.displayName="TagInput";const rs={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},wt={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},nr={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"};function ts({items:r,variant:t="default",size:o="md"}){const a=o==="sm"?"w-6 h-6":o==="lg"?"w-10 h-10":"w-8 h-8",s=o==="sm"?12:o==="lg"?18:14,n=l=>l==="completed"?"bg-chart-2 text-primary-foreground":l==="current"?"bg-primary text-primary-foreground":l==="error"?"bg-destructive text-primary-foreground":"bg-muted text-muted-foreground";return t==="compact"?e.jsx("div",{className:"space-y-0",children:r.map((l,d)=>e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("div",{className:`${a} rounded-full flex items-center justify-center flex-shrink-0 ${n(l.status)}`,children:l.icon||(l.status==="completed"?e.jsx(v.CheckCircle2,{size:s}):e.jsx(v.Circle,{size:s}))}),d<r.length-1&&e.jsx("div",{className:"w-0.5 flex-1 min-h-4 bg-border"})]}),e.jsxs("div",{className:"pb-4 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-foreground",style:wt,children:l.title}),l.time&&e.jsx("span",{className:"text-muted-foreground",style:nr,children:l.time})]}),l.description&&e.jsx("p",{className:"text-muted-foreground mt-0.5",style:nr,children:l.description})]})]},d))}):e.jsx("div",{className:"relative",children:r.map((l,d)=>{const i=t==="alternate"&&d%2===1;return e.jsxs("div",{className:`flex gap-4 pb-8 last:pb-0 ${i?"flex-row-reverse":""}`,children:[e.jsxs("div",{className:"flex flex-col items-center flex-shrink-0",children:[e.jsx("div",{className:`${a} rounded-full flex items-center justify-center ${n(l.status)}`,children:l.icon||(l.status==="completed"?e.jsx(v.CheckCircle2,{size:s}):e.jsx(v.Circle,{size:s}))}),d<r.length-1&&e.jsx("div",{className:"w-0.5 flex-1 bg-border mt-1"})]}),e.jsxs("div",{className:`flex-1 min-w-0 ${i?"text-right":""}`,children:[e.jsxs("div",{className:`flex items-center gap-2 ${i?"justify-end":""}`,children:[e.jsx("span",{className:"text-foreground",style:wt,children:l.title}),l.time&&e.jsx("span",{className:"text-muted-foreground",style:nr,children:l.time})]}),l.description&&e.jsx("p",{className:"text-muted-foreground mt-0.5",style:rs,children:l.description}),l.children&&e.jsx("div",{className:"mt-2",children:l.children})]})]},d)})})}const Oe={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},os={fontFamily:"var(--font-h4)",fontSize:"var(--text-h4)",fontWeight:"var(--weight-h4)"};function lr({brand:r,breadcrumbs:t,title:o,actions:a,user:s,height:n="72px",showSearch:l=!1,searchPlaceholder:d="Search... (Ctrl+K)",onSearchClick:i,notificationCount:h,onNotificationClick:b,onMobileMenuClick:x,onSidebarToggle:w,onUserClick:f,onBreadcrumbClick:p,workspaceSwitcher:g,className:y=""}){const k=s!=null&&s.name?s.name.split(" ").map($=>$[0]).join("").slice(0,2).toUpperCase():"";return e.jsxs("div",{className:`bg-card border-b border-border flex items-center px-5 gap-4 ${y}`,style:{height:n},children:[w&&e.jsx("button",{className:"w-9 h-9 flex items-center justify-center rounded-[var(--radius-md)] text-foreground hover:bg-muted/30 transition-colors cursor-pointer",onClick:w,title:"Toggle sidebar",children:e.jsx(v.Menu,{size:18})}),!w&&x&&e.jsx("button",{className:"lg:hidden w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] text-foreground hover:bg-muted/30 transition-colors cursor-pointer",onClick:x,children:e.jsx(v.Menu,{size:16})}),r&&e.jsx(e.Fragment,{children:typeof r.logo=="string"?e.jsx("img",{src:r.logo,alt:r.name,className:"w-8 h-8 rounded-[var(--radius-sm)] flex-shrink-0 object-cover"}):r.logo?e.jsx("div",{className:"w-8 h-8 rounded-[var(--radius-sm)] overflow-hidden flex-shrink-0",children:r.logo}):e.jsx("div",{className:"w-8 h-8 rounded-[var(--radius-sm)] bg-primary flex items-center justify-center text-primary-foreground flex-shrink-0",style:Oe,children:r.name.charAt(0).toUpperCase()})}),g&&e.jsx("div",{className:"flex items-center ml-1",children:g}),o&&e.jsx("span",{className:"text-foreground hidden sm:block truncate",style:os,children:o}),t&&t.length>0&&e.jsx("nav",{className:"hidden sm:flex items-center gap-1.5 text-muted-foreground",style:Oe,children:t.map(($,u)=>e.jsxs(c.Fragment,{children:[u>0&&e.jsx(v.ChevronRight,{size:12}),$.href||p?e.jsx("span",{className:`cursor-pointer ${u===t.length-1?"text-foreground":"hover:text-foreground"}`,onClick:()=>p==null?void 0:p($,u),children:$.label}):e.jsx("span",{className:u===t.length-1?"text-foreground":"",children:$.label})]},u))}),e.jsx("div",{className:"flex-1"}),l&&e.jsxs("div",{className:"hidden md:flex items-center gap-2 px-3 h-8 rounded-[var(--radius)] border border-border bg-muted/20 text-muted-foreground w-56 cursor-pointer hover:border-primary/40 transition-colors",onClick:i,children:[e.jsx(v.Search,{size:14}),e.jsx("span",{style:Oe,children:d})]}),a,b&&e.jsxs("button",{className:"relative w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] text-muted-foreground hover:text-foreground hover:bg-muted/30 transition-colors cursor-pointer",onClick:b,children:[e.jsx(v.Bell,{size:16}),h!==void 0&&h>0&&e.jsx("span",{className:"absolute top-1 right-1 w-2 h-2 rounded-full bg-destructive"})]}),s&&e.jsx("div",{className:"cursor-pointer",onClick:f,children:s.avatar?e.jsx("img",{src:s.avatar,alt:s.name,className:"w-8 h-8 rounded-full object-cover"}):e.jsx("div",{className:"w-8 h-8 rounded-full bg-primary text-primary-foreground flex items-center justify-center",style:Oe,children:k})})]})}lr.displayName="TopNavbar";const as={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},Nt={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},ir={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"};function St({title:r,items:t,selected:o,onToggle:a,search:s,onSearch:n,searchable:l}){return e.jsxs("div",{className:"flex-1 min-w-[180px] rounded-[var(--radius-md)] border border-border bg-card overflow-hidden",children:[e.jsxs("div",{className:"px-3 py-2.5 border-b border-border bg-muted/30 flex items-center justify-between",children:[e.jsx("span",{className:"text-foreground",style:Nt,children:r}),e.jsxs("span",{className:"text-muted-foreground",style:ir,children:[t.length," items"]})]}),l&&e.jsxs("div",{className:"px-3 py-2 border-b border-border flex items-center gap-2",children:[e.jsx(v.Search,{size:12,className:"text-muted-foreground"}),e.jsx("input",{value:s,onChange:d=>n(d.target.value),placeholder:"Search\\u2026",className:"flex-1 bg-transparent outline-none text-foreground placeholder:text-muted-foreground",style:ir})]}),e.jsxs("div",{className:"max-h-[240px] overflow-y-auto py-1",children:[t.length===0&&e.jsx("div",{className:"px-3 py-6 text-center text-muted-foreground",style:ir,children:"No items"}),t.map(d=>e.jsxs("button",{onClick:()=>!d.disabled&&a(d.id),className:`w-full flex items-center gap-2 px-3 py-1.5 transition-colors cursor-pointer
86
+ ${k===s?"border-primary-foreground":"border-transparent opacity-50 hover:opacity-80"}`,children:e.jsx("img",{src:y.thumbnail||y.src,alt:y.alt,className:"w-full h-full object-cover"})},k))})]})]})}const ga={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},pa={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},va={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"};function ma({items:r,parentRect:t}){const o=c.useRef(null),[a,s]=c.useState({top:t.top,left:t.right+4});return c.useEffect(()=>{if(!o.current)return;const l=o.current.getBoundingClientRect();let d=t.top,i=t.right+4;i+l.width>window.innerWidth-8&&(i=t.left-l.width-4),d+l.height>window.innerHeight-8&&(d=window.innerHeight-l.height-8),s({top:d,left:i})},[t]),Ce.createPortal(e.jsx("div",{ref:o,className:"fixed z-[9999] min-w-[200px] rounded-[var(--radius)] border border-border bg-popover shadow-elevation-sm py-1",style:{top:a.top,left:a.left},children:r.map((n,l)=>e.jsx(st,{item:n},l))}),document.body)}function st({item:r}){const[t,o]=c.useState(!1),a=c.useRef(null),s=c.useRef(null);if(r.divider)return e.jsx("div",{className:"my-1 border-t border-border"});if(r.label)return e.jsx("div",{className:"px-3 py-1.5 text-muted-foreground",style:va,children:r.label});const n=r.children&&r.children.length>0,l=()=>{s.current&&clearTimeout(s.current),n&&o(!0)},d=()=>{s.current=setTimeout(()=>o(!1),150)};return e.jsxs("div",{ref:a,className:"relative",onMouseEnter:l,onMouseLeave:d,children:[e.jsxs("button",{onClick:()=>{var i;n||(i=r.onClick)==null||i.call(r)},disabled:r.disabled,className:`w-full flex items-center text-left rounded-[var(--radius-sm)] transition-colors cursor-pointer ${r.destructive?"text-destructive hover:bg-destructive/10":r.disabled?"text-muted-foreground opacity-50 cursor-not-allowed":"text-popover-foreground hover:bg-[var(--Colors--Background--bg-primary_hover)]"}`,style:{padding:"var(--Spacing--Spacing-md) var(--Spacing--Spacing-2xl)",gap:"var(--Spacing--Spacing-lg)",...ga},children:[r.icon&&e.jsx("span",{className:"flex-shrink-0",children:r.icon}),e.jsx("span",{className:"flex-1",children:r.text}),r.shortcut&&e.jsx("span",{className:"text-muted-foreground ml-4",style:pa,children:r.shortcut}),n&&e.jsx(v.ChevronRight,{size:14,className:"text-muted-foreground"})]}),n&&t&&a.current&&e.jsx(ma,{items:r.children,parentRect:a.current.getBoundingClientRect()})]})}function nt({items:r,open:t,onClose:o,triggerRef:a,className:s=""}){const n=c.useRef(null),[l,d]=c.useState({top:0,left:0});return c.useEffect(()=>{if(!t||!a.current)return;const i=a.current.getBoundingClientRect();let h=i.bottom+4,b=i.left;requestAnimationFrame(()=>{if(!n.current)return;const x=n.current.getBoundingClientRect();b+x.width>window.innerWidth-8&&(b=i.right-x.width),h+x.height>window.innerHeight-8&&(h=i.top-x.height-4),d({top:h,left:b})}),d({top:h,left:b})},[t,a]),c.useEffect(()=>{if(!t)return;const i=h=>{var b,x;(b=a.current)!=null&&b.contains(h.target)||(x=n.current)!=null&&x.contains(h.target)||o()};return document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)},[t,o,a]),t?Ce.createPortal(e.jsxs("div",{ref:n,className:`fixed z-[9999] min-w-[200px] rounded-[var(--radius)] border border-border bg-popover shadow-elevation-sm py-1 animate-[fadeIn_0.15s_ease] ${s}`,style:{top:l.top,left:l.left},children:[r.map((i,h)=>e.jsx(st,{item:i},h)),e.jsx("style",{children:"@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }"})]}),document.body):null}nt.displayName="Menu";const lt={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},er={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},xa={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},He={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"};function it({type:r="info",title:t,message:o,closable:a=!0,onClose:s,action:n,avatar:l,time:d,read:i}){const h={info:e.jsx(v.Info,{size:16,className:"text-primary"}),success:e.jsx(v.CheckCircle2,{size:16,className:"text-chart-2"}),warning:e.jsx(v.AlertTriangle,{size:16,className:"text-chart-5"}),error:e.jsx(v.XCircle,{size:16,className:"text-destructive"})},b={info:"border-l-primary",success:"border-l-chart-2",warning:"border-l-chart-5",error:"border-l-destructive"};return e.jsxs("div",{className:`flex gap-3 px-4 py-3 rounded-[var(--radius-md)] border border-border bg-card border-l-[3px] ${b[r]} ${i===!1?"bg-primary/5":""}`,children:[l?e.jsx("div",{className:"w-8 h-8 rounded-full bg-muted flex-shrink-0 flex items-center justify-center overflow-hidden",style:er,children:e.jsx("span",{className:"text-primary",children:l.slice(0,2).toUpperCase()})}):e.jsx("span",{className:"flex-shrink-0 mt-0.5",children:h[r]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("span",{className:"text-foreground",style:er,children:t}),e.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[d&&e.jsx("span",{className:"text-muted-foreground",style:xa,children:d}),i===!1&&e.jsx("span",{className:"w-2 h-2 rounded-full bg-primary"}),a&&s&&e.jsx("button",{onClick:s,className:"text-muted-foreground hover:text-foreground cursor-pointer",children:e.jsx(v.X,{size:14})})]})]}),o&&e.jsx("p",{className:"text-muted-foreground mt-0.5",style:lt,children:o}),n&&e.jsxs("button",{onClick:n.onClick,className:"inline-flex items-center gap-1 text-primary mt-2 hover:underline cursor-pointer",style:He,children:[n.label," ",e.jsx(v.ExternalLink,{size:12})]})]})]})}function ya({items:r,onMarkRead:t,onMarkAllRead:o,onDismiss:a,onClearAll:s}){const[n,l]=c.useState(r),d=t!==void 0||o!==void 0,i=d?r:n,h=i.filter(f=>!f.read).length,b=()=>{o&&o(),d||l(f=>f.map(p=>({...p,read:!0})))},x=f=>{a&&a(f),d||l(p=>p.filter(g=>g.id!==f))},w=f=>{t&&t(f),d||l(p=>p.map(g=>g.id===f?{...g,read:!0}:g))};return e.jsxs("div",{className:"max-w-md rounded-[var(--radius-md)] border border-border bg-card overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-border flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(v.Bell,{size:16,className:"text-foreground"}),e.jsx("span",{className:"text-foreground",style:er,children:"Notifications"}),h>0&&e.jsx("span",{className:"px-1.5 py-0.5 rounded-full bg-primary text-primary-foreground",style:He,children:h})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[h>0&&e.jsx("button",{onClick:b,className:"text-primary cursor-pointer",style:He,children:"Mark all read"}),i.length>0&&s&&e.jsx("button",{onClick:s,className:"text-muted-foreground hover:text-destructive cursor-pointer",style:He,children:"Clear all"})]})]}),e.jsx("div",{className:"divide-y divide-border max-h-[360px] overflow-y-auto",children:i.map(f=>e.jsx("div",{className:`px-3 py-2 ${f.read?"":"bg-primary/5"}`,onClick:()=>!f.read&&w(f.id),children:e.jsx(it,{type:f.type,title:f.title,message:f.message,time:f.time,read:f.read,closable:!!a,onClose:()=>x(f.id)})},f.id))}),i.length===0&&e.jsxs("div",{className:"py-10 text-center text-muted-foreground",children:[e.jsx(v.BellOff,{size:24,className:"mx-auto mb-2 opacity-40"}),e.jsx("span",{style:lt,children:"No notifications"})]})]})}const wa={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"};function Na({trigger:r,children:t,placement:o="bottom",title:a,open:s,onOpenChange:n}){const[l,d]=c.useState(!1),i=s!==void 0?s:l,h=w=>{n==null||n(w),s===void 0&&d(w)},b=c.useRef(null);c.useEffect(()=>{if(!i)return;const w=f=>{b.current&&!b.current.contains(f.target)&&h(!1)};return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[i]);const x={top:"bottom-full left-1/2 -translate-x-1/2 mb-2",bottom:"top-full left-1/2 -translate-x-1/2 mt-2",left:"right-full top-1/2 -translate-y-1/2 mr-2",right:"left-full top-1/2 -translate-y-1/2 ml-2"};return e.jsxs("div",{className:"relative inline-block",ref:b,children:[e.jsx("div",{onClick:()=>h(!i),className:"cursor-pointer",children:r}),i&&e.jsx("div",{className:`absolute z-50 ${x[o]} w-max max-w-xs`,children:e.jsxs("div",{className:"rounded-[var(--radius-md)] border border-border bg-card shadow-elevation-sm overflow-hidden",children:[a&&e.jsxs("div",{className:"px-4 py-2.5 border-b border-border flex items-center justify-between",children:[e.jsx("span",{className:"text-foreground",style:wa,children:a}),e.jsx("button",{onClick:()=>h(!1),className:"text-muted-foreground hover:text-foreground cursor-pointer",children:e.jsx(v.X,{size:14})})]}),e.jsx("div",{className:"px-4 py-3",children:t})]})})]})}const Sa={fontFamily:"var(--font-label)",fontSize:"var(--text-label)"},ka={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"};function dt({value:r,max:t=100,size:o="md",color:a,label:s,showValue:n,indeterminate:l,className:d=""}){const i={sm:"h-1.5",md:"h-2.5",lg:"h-4"},h=l?0:Math.min(100,Math.max(0,(r??0)/t*100));return e.jsxs("div",{className:`w-full ${d}`,children:[(s||n)&&e.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[s&&e.jsx("span",{className:"text-foreground",style:Sa,children:s}),n&&!l&&e.jsxs("span",{className:"text-muted-foreground",style:ka,children:[Math.round(h),"%"]})]}),e.jsx("div",{className:`w-full ${i[o]} rounded-full bg-muted overflow-hidden`,children:l?e.jsx("div",{className:"h-full w-1/3 rounded-full animate-[indeterminate_1.5s_infinite_ease-in-out]",style:{backgroundColor:a??"var(--primary)"}}):e.jsx("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${h}%`,backgroundColor:a??"var(--primary)"}})}),e.jsx("style",{children:"@keyframes indeterminate { 0% { transform: translateX(-100%); } 100% { transform: translateX(400%); } }"})]})}dt.displayName="ProgressBar";const $a={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},za={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"};function Ca({value:r=0,onChange:t,max:o=5,size:a="md",disabled:s,readOnly:n,icon:l="star",showValue:d,label:i}){const[h,b]=c.useState(0),x=a==="sm"?16:a==="lg"?28:20,w=a==="sm"?"gap-0.5":a==="lg"?"gap-1.5":"gap-1",f=l==="heart"?v.Heart:l==="thumb"?v.ThumbsUp:v.Star,p=l==="heart"?"text-destructive":"text-chart-5",g=Array.from({length:o},(y,k)=>k+1);return e.jsxs("div",{className:`inline-flex items-center ${w} ${s?"opacity-50 pointer-events-none":""}`,children:[i&&e.jsx("span",{className:"text-foreground mr-2",style:$a,children:i}),g.map(y=>{const k=y<=(h||r);return e.jsx("button",{type:"button",className:`transition-transform ${n||s?"":"cursor-pointer hover:scale-110"} ${k?p:"text-muted-foreground/40"}`,onMouseEnter:()=>!n&&!s&&b(y),onMouseLeave:()=>b(0),onClick:()=>!n&&!s&&(t==null?void 0:t(y===r?0:y)),disabled:s||n,children:e.jsx(f,{size:x,fill:k?"currentColor":"none"})},y)}),d&&e.jsxs("span",{className:"text-foreground ml-1",style:za,children:[r,"/",o]})]})}const Fa={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"};function rr({children:r,content:t,placement:o="top",className:a=""}){const[s,n]=c.useState(!1),[l,d]=c.useState({top:0,left:0}),i=c.useRef(null),h=()=>{if(!i.current)return;const p=i.current.getBoundingClientRect(),g=8;let y=0,k=0;o==="right"?(y=p.top+p.height/2,k=p.right+g):o==="left"?(y=p.top+p.height/2,k=p.left-g):o==="bottom"?(y=p.bottom+g,k=p.left+p.width/2):(y=p.top-g,k=p.left+p.width/2),d({top:y,left:k})},b=()=>{h(),n(!0)},x=()=>n(!1);c.useEffect(()=>{if(!s)return;const p=()=>h();return window.addEventListener("scroll",p,!0),window.addEventListener("resize",p),()=>{window.removeEventListener("scroll",p,!0),window.removeEventListener("resize",p)}},[s]);const w=o==="right"?{transform:"translateY(-50%)"}:o==="left"?{transform:"translate(-100%, -50%)"}:o==="bottom"?{transform:"translateX(-50%)"}:{transform:"translate(-50%, -100%)"},f=s?e.jsx("div",{style:{position:"fixed",top:l.top,left:l.left,zIndex:9999,pointerEvents:"none",...w},children:e.jsx("div",{className:"px-2.5 py-1.5 rounded-[var(--radius-sm)] bg-foreground text-background whitespace-nowrap shadow-elevation-sm",style:Fa,role:"tooltip",children:t})}):null;return e.jsxs(e.Fragment,{children:[e.jsx("div",{ref:i,className:`relative inline-flex ${a}`,onMouseEnter:b,onMouseLeave:x,onFocus:b,onBlur:x,children:r}),typeof document<"u"&&Ce.createPortal(f,document.body)]})}rr.displayName="Tooltip";const ct={fontFamily:"var(--font-p)",fontSize:"var(--text-p)",fontWeight:"var(--weight-button)",lineHeight:"1"},Wa={fontFamily:"var(--font-p)",fontSize:"var(--text-p)",fontWeight:"var(--weight-p)",lineHeight:"1"},La={fontFamily:"var(--font-p)",fontSize:"var(--text-p)",fontWeight:"var(--weight-p)",lineHeight:"1"};function tr({item:r,size:t=40}){const o=t+"px",a=t>=40?"var(--text-label)":"var(--text-caption)";if(r.avatarUrl)return e.jsx("img",{src:r.avatarUrl,alt:r.name,style:{width:o,height:o,borderRadius:"50%",objectFit:"cover",flexShrink:0}});const s=r.avatarFallback||r.name.charAt(0).toUpperCase();return e.jsx("div",{style:{width:o,height:o,borderRadius:"50%",flexShrink:0,background:"var(--Base_Color--Sky--100, #e0f2fe)",display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"var(--font-label)",fontSize:a,fontWeight:"var(--weight-button)",color:"var(--Base_Color--Sky--600, #1b8bf5)"},children:s})}function or({company:r,branch:t,provider:o,companies:a=[],branches:s=[],providers:n=[],onCompanyChange:l,onBranchChange:d,onProviderChange:i,collapsed:h=!1}){const[b,x]=c.useState(!1),w=c.useRef(null);c.useEffect(()=>{if(!b)return;const y=k=>{w.current&&!w.current.contains(k.target)&&x(!1)};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[b]);const f=r,p=(t==null?void 0:t.name)??(o==null?void 0:o.name),g=y=>{l==null||l(y),x(!1)};return h?e.jsx("button",{onClick:()=>x(!b),title:(f==null?void 0:f.name)??"Switch account",style:{width:40,height:40,borderRadius:"50%",border:"none",background:"rgba(240,249,255,1)",cursor:"pointer",padding:0,display:"flex",alignItems:"center",justifyContent:"center"},children:f?e.jsx(tr,{item:f,size:36}):e.jsx("div",{style:{width:36,height:36,borderRadius:"50%",background:"var(--primary)",display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",fontFamily:"var(--font-label)",fontSize:"var(--text-caption)",fontWeight:"var(--weight-button)"},children:"S"})}):e.jsxs("div",{ref:w,style:{position:"relative",width:"100%"},children:[e.jsxs("button",{onClick:()=>x(!b),style:{width:"100%",background:"rgba(240,249,255,1)",border:"1px solid rgba(217,242,255,1)",borderRadius:"8px",padding:"8px 16px 8px 8px",display:"flex",alignItems:"center",gap:"10px",cursor:"pointer",textAlign:"left",minHeight:"56px"},children:[f?e.jsx(tr,{item:f,size:40}):e.jsx("div",{style:{width:40,height:40,borderRadius:"50%",background:"var(--primary)",display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)",flexShrink:0},children:"S"}),e.jsxs("div",{style:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:"4px"},children:[e.jsx("span",{style:{...ct,color:"var(--foreground, #1f2937)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"block"},children:(f==null?void 0:f.name)??"Select Company"}),p&&e.jsx("span",{style:{...Wa,color:"var(--Base_Color--Sky--500, #32a9ff)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"block"},children:p})]}),e.jsx(v.ChevronUp,{size:16,color:"rgba(50,169,255,1)",style:{flexShrink:0,transition:"transform 0.2s ease",transform:b?"rotate(0deg)":"rotate(180deg)"}})]}),b&&e.jsx("div",{style:{position:"absolute",top:"calc(100% + 4px)",left:0,right:0,zIndex:50,background:"var(--background, #fff)",border:"1px solid var(--border, #e5e7eb)",borderRadius:"8px",boxShadow:"0px 4px 12px 0px rgba(0,0,0,0.08)",overflow:"hidden"},children:e.jsx("div",{style:{maxHeight:"240px",overflowY:"auto"},children:a.map(y=>{const k=(r==null?void 0:r.id)===y.id;return e.jsxs("button",{onClick:()=>g(y),style:{width:"100%",display:"flex",alignItems:"center",gap:"10px",padding:"8px 12px",background:k?"rgba(240,249,255,0.6)":"none",border:"none",cursor:"pointer",textAlign:"left",transition:"background 0.15s",minHeight:"48px"},onMouseEnter:$=>{k||($.currentTarget.style.background="var(--accent, #f3f4f6)")},onMouseLeave:$=>{$.currentTarget.style.background=k?"rgba(240,249,255,0.6)":"none"},children:[e.jsx(tr,{item:y,size:36}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{...ct,color:"var(--foreground, #1f2937)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:y.name}),y.handle&&e.jsx("div",{style:{...La,color:"var(--muted-foreground, #6b7280)",marginTop:"2px"},children:y.handle})]}),k&&e.jsx(v.Check,{size:16,color:"var(--Base_Color--Sky--500, #32a9ff)",style:{flexShrink:0}})]},y.id)})})})]})}or.displayName="SidebarAccountSwitcher";const Ma={fontFamily:"var(--font-h4)",fontSize:"var(--text-h4)",fontWeight:"var(--weight-h4)"},Da={fontFamily:"var(--font-p)",fontSize:"var(--text-p)"},Aa={fontFamily:"var(--font-label)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},ja={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},Ea={fontFamily:"var(--font-label)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"};function Pe({brand:r,accountSwitcher:t,groups:o,activeItem:a,onNavigate:s,collapsed:n=!1,onCollapsedChange:l,showCollapseToggle:d=!0,version:i,versionDate:h,width:b,className:x=""}){const[w,f]=c.useState(new Set),p=$=>{f(u=>{const m=new Set(u);return m.has($)?m.delete($):m.add($),m})},k=n?"var(--shell-sidebar-collapsed, 64px)":b??"var(--shell-sidebar-width, 240px)";return e.jsxs("div",{className:`bg-sidebar border-r border-sidebar-border flex flex-col flex-shrink-0 h-full ${x}`,style:{width:k,minWidth:k,transition:"width var(--shell-sidebar-transition, 250ms cubic-bezier(0.4,0,0.2,1)), min-width var(--shell-sidebar-transition, 250ms cubic-bezier(0.4,0,0.2,1))",overflow:"visible"},children:[t?e.jsx("div",{className:`${n?"px-2 py-2":"px-3 py-3"} border-b border-sidebar-border flex items-center ${n?"justify-center":""}`,children:e.jsx(or,{...t,collapsed:n})}):r&&e.jsxs("div",{className:`${n?"px-2":"px-4"} py-4 border-b border-sidebar-border flex items-center ${n?"justify-center":"gap-2"}`,children:[r.logo?e.jsx("img",{src:r.logo,alt:r.name,className:"w-8 h-8 rounded-[var(--radius-sm)] flex-shrink-0 object-cover"}):e.jsx("div",{className:"w-8 h-8 rounded-[var(--radius-sm)] bg-primary flex items-center justify-center text-primary-foreground flex-shrink-0",style:Aa,children:r.name.charAt(0).toUpperCase()}),!n&&e.jsx("span",{className:"text-sidebar-foreground truncate",style:Ma,children:r.name})]}),e.jsx("nav",{className:`flex-1 overflow-y-auto py-3 ${n?"px-1.5":"px-2"}`,children:o.map($=>{const u=w.has($.label);return e.jsxs("div",{className:"mb-4",children:[!n&&e.jsxs("button",{onClick:()=>p($.label),className:"w-full flex items-center justify-between px-2 mb-1.5 text-muted-foreground hover:text-foreground transition-colors cursor-pointer",style:ja,children:[e.jsx("span",{children:$.label}),e.jsx(v.ChevronUp,{size:12,style:{transition:"transform 0.2s ease",transform:u?"rotate(180deg)":"rotate(0deg)"}})]}),n&&e.jsx("div",{className:"h-px bg-sidebar-border mx-1 mb-2 mt-1"}),!u&&e.jsx("div",{className:"space-y-0.5",children:$.items.map(m=>{const N=a===m.id,C=e.jsxs("button",{onClick:()=>s==null?void 0:s(m),className:`w-full flex items-center ${n?"justify-center":"gap-2"} ${n?"px-0":"px-2"} py-2 rounded-[var(--radius-md)] transition-colors cursor-pointer ${N?"bg-sidebar-accent text-sidebar-accent-foreground":"text-sidebar-foreground hover:bg-sidebar-accent/50"}`,style:Da,children:[e.jsx("span",{className:`flex-shrink-0 ${N?"text-sidebar-primary":"text-muted-foreground"}`,children:m.icon}),!n&&e.jsx("span",{className:"truncate flex-1 text-left",children:m.label}),m.badge!=null&&!n&&e.jsx("span",{className:"rounded-full bg-primary text-primary-foreground",style:{fontFamily:"var(--font-caption)",fontSize:"var(--text-caption)",fontWeight:"var(--weight-button)",lineHeight:"1",padding:"2px 6px",display:"inline-flex",alignItems:"center",minWidth:"18px",justifyContent:"center"},children:String(m.badge)})]},m.id);return n?e.jsx("div",{className:"w-full flex",children:e.jsx(rr,{content:m.label,placement:"right",className:"flex-1",children:C})},m.id):C})})]},$.label)})}),(d&&l||i)&&e.jsxs("div",{className:`${n?"px-1.5":"px-3"} py-3 border-t border-sidebar-border flex flex-col gap-1`,children:[d&&l&&e.jsxs("button",{onClick:()=>l(!n),className:`w-full flex items-center ${n?"justify-center":"gap-2 px-2"} py-1.5 rounded-[var(--radius-md)] text-muted-foreground hover:text-foreground hover:bg-sidebar-accent/50 cursor-pointer`,style:Ea,title:n?"Expand sidebar":"Collapse sidebar",children:[n?e.jsx(v.PanelLeftOpen,{size:16}):e.jsx(v.PanelLeftClose,{size:16}),!n&&e.jsx("span",{children:"Collapse"})]}),i&&!n&&e.jsxs("div",{className:"px-2 flex items-center gap-1.5 text-muted-foreground/60",style:{fontFamily:"var(--font-label)",fontSize:"var(--text-caption)",fontWeight:"var(--weight-label)"},children:[e.jsx("span",{children:i}),h&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsx("span",{children:h})]})]}),i&&n&&e.jsx("div",{className:"flex justify-center text-muted-foreground/60",style:{fontFamily:"var(--font-label)",fontSize:"var(--text-caption)",fontWeight:"var(--weight-label)"},title:`${i}${h?` · ${h}`:""}`,children:i})]})]})}Pe.displayName="Sidebar";function se({width:r,height:t,variant:o="rectangular",animate:a=!0,className:s}){const n="bg-muted",l=a?"animate-pulse":"",d=o==="circular"?"rounded-full":o==="rounded"?"rounded-[var(--radius-md)]":"rounded-[var(--radius-sm)]";return e.jsx("div",{className:`${n} ${l} ${d} ${s??""}`,style:{width:r??"100%",height:t??(o==="text"?"1em":o==="circular"?40:20)}})}function Ta(){return e.jsxs("div",{className:"rounded-[var(--radius-md)] border border-border bg-card p-4 space-y-4 w-full max-w-sm",children:[e.jsx(se,{variant:"rounded",height:160}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(se,{variant:"text",width:"60%",height:20}),e.jsx(se,{variant:"text",width:"100%",height:14}),e.jsx(se,{variant:"text",width:"80%",height:14})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(se,{variant:"circular",width:36,height:36}),e.jsxs("div",{className:"flex-1 space-y-1.5",children:[e.jsx(se,{variant:"text",width:"40%",height:14}),e.jsx(se,{variant:"text",width:"25%",height:12})]})]})]})}function Ia(){return e.jsxs("div",{className:"rounded-[var(--radius-md)] border border-border bg-card overflow-hidden",children:[e.jsx("div",{className:"px-4 py-3 border-b border-border bg-muted/30 flex gap-4",children:[120,160,100,80].map((r,t)=>e.jsx(se,{variant:"text",width:r,height:14},t))}),[0,1,2,3].map(r=>e.jsxs("div",{className:"px-4 py-3 border-b border-border flex items-center gap-4",children:[e.jsx(se,{variant:"circular",width:28,height:28}),e.jsx(se,{variant:"text",width:100+r*15,height:14}),e.jsx(se,{variant:"text",width:140,height:14,className:"flex-1"}),e.jsx(se,{variant:"rounded",width:60,height:22}),e.jsx(se,{variant:"text",width:80,height:14})]},r))]})}function ar({rows:r=3}){return e.jsx("div",{className:"space-y-3 w-full max-w-md",children:Array.from({length:r}).map((t,o)=>e.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5 rounded-[var(--radius-md)] border border-border bg-card",children:[e.jsx(se,{variant:"circular",width:40,height:40}),e.jsxs("div",{className:"flex-1 space-y-1.5",children:[e.jsx(se,{variant:"text",width:`${60+o*10}%`,height:14}),e.jsx(se,{variant:"text",width:`${40+o*5}%`,height:12})]}),e.jsx(se,{variant:"rounded",width:50,height:24})]},o))})}const Ba={sm:"w-4 h-4 border-2",md:"w-8 h-8 border-[3px]",lg:"w-12 h-12 border-4",xl:"w-16 h-16 border-4"};function ft({size:r="md",color:t,className:o=""}){return e.jsx("div",{className:`${Ba[r]} rounded-full border-muted animate-spin ${o}`,style:{borderTopColor:t??"var(--primary)"},role:"status","aria-label":"Loading"})}ft.displayName="Spinner";const sr={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},ht={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},ut={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},bt={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},_a={sm:{fontFamily:"var(--font-h4)",fontSize:"var(--text-h4)",fontWeight:"var(--weight-h4)"},md:{fontFamily:"var(--font-h2)",fontSize:"var(--text-h2)",fontWeight:"var(--weight-h2)"},lg:{fontFamily:"var(--font-h1)",fontSize:"var(--text-h1)",fontWeight:"var(--weight-h1)"}};function Ha({title:r,value:t,prefix:o,suffix:a,trend:s,trendLabel:n,icon:l,size:d="md",loading:i}){const h=_a[d],b=(s==null?void 0:s.direction)==="up"?"text-chart-2":(s==null?void 0:s.direction)==="down"?"text-destructive":"text-muted-foreground",x=(s==null?void 0:s.direction)==="up"?v.ArrowUpRight:(s==null?void 0:s.direction)==="down"?v.ArrowDownRight:v.Minus;return i?e.jsxs("div",{className:"space-y-2 animate-pulse",children:[e.jsx("div",{className:"h-3 w-20 bg-muted rounded-[var(--radius-sm)]"}),e.jsx("div",{className:"h-8 w-32 bg-muted rounded-[var(--radius-sm)]"}),e.jsx("div",{className:"h-3 w-24 bg-muted rounded-[var(--radius-sm)]"})]}):e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[l&&e.jsx("span",{className:"text-muted-foreground",children:l}),e.jsx("span",{className:"text-muted-foreground",style:sr,children:r})]}),e.jsxs("div",{className:"flex items-baseline gap-1",children:[o&&e.jsx("span",{className:"text-muted-foreground",style:ht,children:o}),e.jsx("span",{className:"text-foreground",style:h,children:typeof t=="number"?t.toLocaleString():t}),a&&e.jsx("span",{className:"text-muted-foreground",style:sr,children:a})]}),s&&e.jsxs("div",{className:`flex items-center gap-1 ${b}`,children:[e.jsx(x,{size:14}),e.jsxs("span",{style:bt,children:[s.value,"%"]}),n&&e.jsx("span",{className:"text-muted-foreground",style:ut,children:n})]})]})}function Pa({title:r,value:t,prefix:o,trend:a,trendLabel:s,icon:n,iconBg:l}){const d=(a==null?void 0:a.direction)==="up"?"text-chart-2":(a==null?void 0:a.direction)==="down"?"text-destructive":"text-muted-foreground",i=(a==null?void 0:a.direction)==="up"?v.ArrowUpRight:(a==null?void 0:a.direction)==="down"?v.ArrowDownRight:v.Minus;return e.jsx("div",{className:"rounded-[var(--radius-md)] border border-border bg-card p-5 overflow-hidden",children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"space-y-1 min-w-0 flex-1",children:[e.jsx("span",{className:"text-muted-foreground",style:sr,children:r}),e.jsxs("div",{className:"flex items-baseline gap-1",children:[o&&e.jsx("span",{className:"text-muted-foreground",style:ht,children:o}),e.jsx("span",{className:"text-foreground",style:{fontFamily:"var(--font-h3)",fontSize:"var(--text-h3)",fontWeight:"var(--weight-h3)"},children:typeof t=="number"?t.toLocaleString():t})]}),a&&e.jsxs("div",{className:`flex items-center gap-1 ${d}`,children:[e.jsx(i,{size:12}),e.jsxs("span",{style:bt,children:[a.value,"%"]}),s&&e.jsx("span",{className:"text-muted-foreground",style:ut,children:s})]})]}),n&&e.jsx("div",{className:`w-10 h-10 rounded-[var(--radius-md)] flex items-center justify-center flex-shrink-0 ${l||"bg-primary/10 text-primary"}`,children:n})]})})}const Oa={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},gt={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},pt={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},vt={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"};function mt({steps:r,current:t,orientation:o="horizontal",onStepClick:a,className:s=""}){return o==="vertical"?e.jsx("div",{className:`flex flex-col ${s}`,children:r.map((n,l)=>{const d=l<t,i=l===t,h=n.disabled;return e.jsxs("div",{className:`flex gap-3 ${h?"opacity-50":""}`,onClick:()=>!h&&(a==null?void 0:a(l)),children:[e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 transition-colors ${h?"cursor-not-allowed":a?"cursor-pointer":""} ${d||i?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground"}`,style:vt,children:d?e.jsx(v.Check,{size:14}):l+1}),l<r.length-1&&e.jsx("div",{className:`w-px flex-1 min-h-[24px] my-1 ${d?"bg-primary":"bg-border"}`})]}),e.jsxs("div",{className:`pb-6 ${l===r.length-1?"pb-0":""}`,children:[e.jsx("span",{className:`block ${i?"text-foreground":"text-muted-foreground"}`,style:i?gt:Oa,children:n.title}),n.description&&e.jsx("span",{className:"text-muted-foreground block",style:pt,children:n.description})]})]},l)})}):e.jsx("div",{className:`flex items-center ${s}`,children:r.map((n,l)=>{const d=l<t,i=l===t;return e.jsxs("div",{className:`flex items-center ${l<r.length-1?"flex-1":""} ${n.disabled?"opacity-50":""}`,children:[e.jsxs("div",{className:"flex flex-col items-center gap-1",onClick:()=>!n.disabled&&(a==null?void 0:a(l)),children:[e.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 transition-colors ${n.disabled?"cursor-not-allowed":a?"cursor-pointer":""} ${d||i?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground"}`,style:vt,children:d?e.jsx(v.Check,{size:14}):l+1}),e.jsx("span",{className:`text-center ${i?"text-foreground":"text-muted-foreground"}`,style:i?gt:pt,children:n.title})]}),l<r.length-1&&e.jsx("div",{className:`flex-1 h-px mx-2 mt-[-20px] ${d?"bg-primary":"bg-border"}`})]},l)})})}mt.displayName="Stepper";const Ya={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},Ga={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"},Ua={sm:{track:"w-7 h-4",thumb:"w-3 h-3",on:"translate-x-3"},md:{track:"w-10 h-6",thumb:"w-4.5 h-4.5",on:"translate-x-4.5"},lg:{track:"w-14 h-8",thumb:"w-6.5 h-6.5",on:"translate-x-6"}},Xa={primary:"bg-primary",success:"bg-chart-2",warning:"bg-chart-5",destructive:"bg-destructive"},Ka={sm:{w:12,h:12,on:14},md:{w:18,h:18,on:18},lg:{w:26,h:26,on:24}};function Za({checked:r,onChange:t,label:o,description:a,size:s="md",disabled:n,color:l="primary"}){const d=Ua[s],i=Ka[s];return e.jsxs("label",{className:`inline-flex items-start gap-3 ${n?"opacity-50 pointer-events-none":"cursor-pointer"}`,children:[e.jsx("button",{role:"switch","aria-checked":r,onClick:()=>t(!r),disabled:n,className:`${d.track} rounded-full relative flex-shrink-0 transition-colors cursor-pointer ${r?Xa[l]:"bg-muted"}`,children:e.jsx("span",{className:"rounded-full bg-background shadow-elevation-sm absolute transition-transform",style:{width:i.w,height:i.h,top:"50%",transform:`translateY(-50%) translateX(${r?i.on:2}px)`,left:0}})}),(o||a)&&e.jsxs("div",{children:[o&&e.jsx("span",{className:"text-foreground block",style:Ya,children:o}),a&&e.jsx("span",{className:"text-muted-foreground block",style:Ga,children:a})]})]})}const qa={default:"bg-muted/50 text-foreground border-border",primary:"bg-primary/10 text-primary border-primary/20",success:"bg-chart-2/10 text-chart-2 border-chart-2/20",warning:"bg-chart-5/10 text-chart-5 border-chart-5/20",destructive:"bg-destructive/10 text-destructive border-destructive/20",info:"bg-accent text-accent-foreground border-primary/20"},Ja={sm:"px-1.5 py-0.5",md:"px-2 py-0.5",lg:"px-3 py-1.5"},Qa={sm:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},md:{fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},lg:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"}};function xt({children:r,color:t="default",size:o="md",icon:a,closable:s,onClose:n,className:l=""}){const d=qa[t],i=Ja[o],h=Qa[o];return e.jsxs("span",{className:`inline-flex items-center gap-1 rounded-full border ${d} ${i} ${l}`,style:h,children:[a&&e.jsx("span",{className:"flex-shrink-0",children:a}),r,s&&e.jsx("button",{className:"hover:opacity-70 cursor-pointer",onClick:n,children:e.jsx(v.X,{size:o==="sm"?10:12})})]})}xt.displayName="Tag";const Va={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},Ra={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-button)"},es={default:"bg-card border-border",outline:"bg-transparent border-border",filled:"bg-muted/30 border-transparent"};function yt({tags:r,onChange:t,placeholder:o,disabled:a,maxTags:s,variant:n="default",className:l=""}){const[d,i]=c.useState(""),h=()=>{const x=d.trim();!x||r.includes(x)||s&&r.length>=s||(t([...r,x]),i(""))},b=x=>{t(r.filter(w=>w!==x))};return e.jsxs("div",{className:`flex flex-wrap items-center gap-1.5 px-3 py-2 rounded-[var(--radius)] border ${es[n]} transition-colors focus-within:border-primary ${a?"opacity-50 pointer-events-none":""} ${l}`,children:[r.map(x=>e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-[var(--radius-sm)] bg-primary/10 text-primary",style:Ra,children:[x,e.jsx("button",{className:"hover:text-destructive cursor-pointer",onClick:()=>b(x),children:e.jsx(v.X,{size:12})})]},x)),e.jsx("input",{value:d,onChange:x=>i(x.target.value),onKeyDown:x=>{x.key==="Enter"&&(x.preventDefault(),h()),x.key==="Backspace"&&!d&&r.length&&t(r.slice(0,-1))},placeholder:r.length?"":o,className:"flex-1 min-w-[80px] bg-transparent outline-none text-foreground placeholder:text-muted-foreground",style:Va,disabled:a})]})}yt.displayName="TagInput";const rs={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},wt={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},nr={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"};function ts({items:r,variant:t="default",size:o="md"}){const a=o==="sm"?"w-6 h-6":o==="lg"?"w-10 h-10":"w-8 h-8",s=o==="sm"?12:o==="lg"?18:14,n=l=>l==="completed"?"bg-chart-2 text-primary-foreground":l==="current"?"bg-primary text-primary-foreground":l==="error"?"bg-destructive text-primary-foreground":"bg-muted text-muted-foreground";return t==="compact"?e.jsx("div",{className:"space-y-0",children:r.map((l,d)=>e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("div",{className:`${a} rounded-full flex items-center justify-center flex-shrink-0 ${n(l.status)}`,children:l.icon||(l.status==="completed"?e.jsx(v.CheckCircle2,{size:s}):e.jsx(v.Circle,{size:s}))}),d<r.length-1&&e.jsx("div",{className:"w-0.5 flex-1 min-h-4 bg-border"})]}),e.jsxs("div",{className:"pb-4 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-foreground",style:wt,children:l.title}),l.time&&e.jsx("span",{className:"text-muted-foreground",style:nr,children:l.time})]}),l.description&&e.jsx("p",{className:"text-muted-foreground mt-0.5",style:nr,children:l.description})]})]},d))}):e.jsx("div",{className:"relative",children:r.map((l,d)=>{const i=t==="alternate"&&d%2===1;return e.jsxs("div",{className:`flex gap-4 pb-8 last:pb-0 ${i?"flex-row-reverse":""}`,children:[e.jsxs("div",{className:"flex flex-col items-center flex-shrink-0",children:[e.jsx("div",{className:`${a} rounded-full flex items-center justify-center ${n(l.status)}`,children:l.icon||(l.status==="completed"?e.jsx(v.CheckCircle2,{size:s}):e.jsx(v.Circle,{size:s}))}),d<r.length-1&&e.jsx("div",{className:"w-0.5 flex-1 bg-border mt-1"})]}),e.jsxs("div",{className:`flex-1 min-w-0 ${i?"text-right":""}`,children:[e.jsxs("div",{className:`flex items-center gap-2 ${i?"justify-end":""}`,children:[e.jsx("span",{className:"text-foreground",style:wt,children:l.title}),l.time&&e.jsx("span",{className:"text-muted-foreground",style:nr,children:l.time})]}),l.description&&e.jsx("p",{className:"text-muted-foreground mt-0.5",style:rs,children:l.description}),l.children&&e.jsx("div",{className:"mt-2",children:l.children})]})]},d)})})}const Oe={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},os={fontFamily:"var(--font-h4)",fontSize:"var(--text-h4)",fontWeight:"var(--weight-h4)"};function lr({brand:r,breadcrumbs:t,title:o,actions:a,user:s,height:n="72px",showSearch:l=!1,searchPlaceholder:d="Search... (Ctrl+K)",onSearchClick:i,notificationCount:h,onNotificationClick:b,onMobileMenuClick:x,onSidebarToggle:w,onUserClick:f,onBreadcrumbClick:p,workspaceSwitcher:g,className:y=""}){const k=s!=null&&s.name?s.name.split(" ").map($=>$[0]).join("").slice(0,2).toUpperCase():"";return e.jsxs("div",{className:`bg-card border-b border-border flex items-center px-5 gap-4 ${y}`,style:{height:n},children:[w&&e.jsx("button",{className:"w-9 h-9 flex items-center justify-center rounded-[var(--radius-md)] text-foreground hover:bg-muted/30 transition-colors cursor-pointer",onClick:w,title:"Toggle sidebar",children:e.jsx(v.Menu,{size:18})}),!w&&x&&e.jsx("button",{className:"lg:hidden w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] text-foreground hover:bg-muted/30 transition-colors cursor-pointer",onClick:x,children:e.jsx(v.Menu,{size:16})}),r&&e.jsx(e.Fragment,{children:typeof r.logo=="string"?e.jsx("img",{src:r.logo,alt:r.name,className:"w-8 h-8 rounded-[var(--radius-sm)] flex-shrink-0 object-cover"}):r.logo?e.jsx("div",{className:"w-8 h-8 rounded-[var(--radius-sm)] overflow-hidden flex-shrink-0",children:r.logo}):e.jsx("div",{className:"w-8 h-8 rounded-[var(--radius-sm)] bg-primary flex items-center justify-center text-primary-foreground flex-shrink-0",style:Oe,children:r.name.charAt(0).toUpperCase()})}),g&&e.jsx("div",{className:"flex items-center ml-1",children:g}),o&&e.jsx("span",{className:"text-foreground hidden sm:block truncate",style:os,children:o}),t&&t.length>0&&e.jsx("nav",{className:"hidden sm:flex items-center gap-1.5 text-muted-foreground",style:Oe,children:t.map(($,u)=>e.jsxs(c.Fragment,{children:[u>0&&e.jsx(v.ChevronRight,{size:12}),$.href||p?e.jsx("span",{className:`cursor-pointer ${u===t.length-1?"text-foreground":"hover:text-foreground"}`,onClick:()=>p==null?void 0:p($,u),children:$.label}):e.jsx("span",{className:u===t.length-1?"text-foreground":"",children:$.label})]},u))}),e.jsx("div",{className:"flex-1"}),l&&e.jsxs("div",{className:"hidden md:flex items-center gap-2 px-3 h-8 rounded-[var(--radius)] border border-border bg-muted/20 text-muted-foreground w-56 cursor-pointer hover:border-primary/40 transition-colors",onClick:i,children:[e.jsx(v.Search,{size:14}),e.jsx("span",{style:Oe,children:d})]}),a,b&&e.jsxs("button",{className:"relative w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] text-muted-foreground hover:text-foreground hover:bg-muted/30 transition-colors cursor-pointer",onClick:b,children:[e.jsx(v.Bell,{size:16}),h!==void 0&&h>0&&e.jsx("span",{className:"absolute top-1 right-1 w-2 h-2 rounded-full bg-destructive"})]}),s&&e.jsx("div",{className:"cursor-pointer",onClick:f,children:s.avatar?e.jsx("img",{src:s.avatar,alt:s.name,className:"w-8 h-8 rounded-full object-cover"}):e.jsx("div",{className:"w-8 h-8 rounded-full bg-primary text-primary-foreground flex items-center justify-center",style:Oe,children:k})})]})}lr.displayName="TopNavbar";const as={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"},Nt={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-button)"},ir={fontFamily:"var(--font-button)",fontSize:"var(--text-button)",fontWeight:"var(--weight-label)"};function St({title:r,items:t,selected:o,onToggle:a,search:s,onSearch:n,searchable:l}){return e.jsxs("div",{className:"flex-1 min-w-[180px] rounded-[var(--radius-md)] border border-border bg-card overflow-hidden",children:[e.jsxs("div",{className:"px-3 py-2.5 border-b border-border bg-muted/30 flex items-center justify-between",children:[e.jsx("span",{className:"text-foreground",style:Nt,children:r}),e.jsxs("span",{className:"text-muted-foreground",style:ir,children:[t.length," items"]})]}),l&&e.jsxs("div",{className:"px-3 py-2 border-b border-border flex items-center gap-2",children:[e.jsx(v.Search,{size:12,className:"text-muted-foreground"}),e.jsx("input",{value:s,onChange:d=>n(d.target.value),placeholder:"Search\\u2026",className:"flex-1 bg-transparent outline-none text-foreground placeholder:text-muted-foreground",style:ir})]}),e.jsxs("div",{className:"max-h-[240px] overflow-y-auto py-1",children:[t.length===0&&e.jsx("div",{className:"px-3 py-6 text-center text-muted-foreground",style:ir,children:"No items"}),t.map(d=>e.jsxs("button",{onClick:()=>!d.disabled&&a(d.id),className:`w-full flex items-center gap-2 px-3 py-1.5 transition-colors cursor-pointer
87
87
  ${o.has(d.id)?"bg-primary/10":"hover:bg-accent"}
88
88
  ${d.disabled?"opacity-40 pointer-events-none":""}`,style:as,children:[e.jsx("span",{className:`w-4 h-4 rounded-[var(--radius-sm)] border flex items-center justify-center flex-shrink-0
89
89
  ${o.has(d.id)?"bg-primary border-primary":"border-border"}`,children:o.has(d.id)&&e.jsx("span",{className:"w-2 h-2 rounded-[1px] bg-primary-foreground"})}),e.jsx("span",{className:"text-foreground truncate",children:d.label})]},d.id))]})]})}function ss({sourceTitle:r="Available",targetTitle:t="Selected",items:o,defaultTarget:a=[],searchable:s,value:n,onChange:l,loading:d=!1,error:i}){const[h,b]=c.useState(new Set(a)),x=n!==void 0?new Set(n):h,w=z=>{l&&l(Array.from(z)),n===void 0&&b(z)},[f,p]=c.useState(new Set),[g,y]=c.useState(new Set),[k,$]=c.useState(""),[u,m]=c.useState(""),N=o.filter(z=>!x.has(z.id)),C=o.filter(z=>x.has(z.id)),L=k?N.filter(z=>z.label.toLowerCase().includes(k.toLowerCase())):N,M=u?C.filter(z=>z.label.toLowerCase().includes(u.toLowerCase())):C,W=()=>{const z=new Set(x);f.forEach(E=>z.add(E)),w(z),p(new Set)},D=()=>{const z=new Set(x);g.forEach(E=>z.delete(E)),w(z),y(new Set)},T=()=>{w(new Set(o.filter(z=>!z.disabled).map(z=>z.id))),p(new Set)},A=()=>{w(new Set),y(new Set)},S=(z,E,I)=>{const H=new Set(E);H.has(z)?H.delete(z):H.add(z),I(H)};return i?e.jsx("div",{className:"flex items-center justify-center rounded-[var(--radius-md)] border border-border bg-card px-6 py-10 text-center",children:e.jsx("span",{style:{fontFamily:"var(--font-label)",fontSize:"var(--text-label)",color:"var(--destructive)"},children:i})}):d?e.jsx("div",{className:"flex items-stretch gap-3 flex-wrap opacity-60 pointer-events-none",children:[r,t].map(z=>e.jsxs("div",{className:"flex-1 min-w-[180px] rounded-[var(--radius-md)] border border-border bg-card overflow-hidden",children:[e.jsx("div",{className:"px-3 py-2.5 border-b border-border bg-muted/30",children:e.jsx("span",{style:Nt,children:z})}),e.jsx("div",{className:"p-3 flex flex-col gap-2",children:[1,2,3,4].map(E=>e.jsx("div",{className:"h-8 rounded bg-muted/50 animate-pulse"},E))})]},z))}):e.jsxs("div",{className:"flex items-stretch gap-3 flex-wrap",children:[e.jsx(St,{title:r,items:L,selected:f,onToggle:z=>S(z,f,p),search:k,onSearch:$,searchable:s}),e.jsxs("div",{className:"flex flex-col items-center justify-center gap-1.5 py-4",children:[e.jsx("button",{onClick:T,disabled:N.length===0,className:"w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] border border-border text-muted-foreground hover:text-foreground hover:bg-accent disabled:opacity-30 transition-colors cursor-pointer",children:e.jsx(v.ChevronsRight,{size:14})}),e.jsx("button",{onClick:W,disabled:f.size===0,className:"w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] border border-border text-muted-foreground hover:text-foreground hover:bg-accent disabled:opacity-30 transition-colors cursor-pointer",children:e.jsx(v.ChevronRight,{size:14})}),e.jsx("button",{onClick:D,disabled:g.size===0,className:"w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] border border-border text-muted-foreground hover:text-foreground hover:bg-accent disabled:opacity-30 transition-colors cursor-pointer",children:e.jsx(v.ChevronLeft,{size:14})}),e.jsx("button",{onClick:A,disabled:C.length===0,className:"w-8 h-8 flex items-center justify-center rounded-[var(--radius-md)] border border-border text-muted-foreground hover:text-foreground hover:bg-accent disabled:opacity-30 transition-colors cursor-pointer",children:e.jsx(v.ChevronsLeft,{size:14})})]}),e.jsx(St,{title:t,items:M,selected:g,onToggle:z=>S(z,g,y),search:u,onSearch:m,searchable:s})]})}const dr={fontFamily:"var(--font-label)",fontSize:"var(--text-label)",fontWeight:"var(--weight-label)"};function kt({node:r,level:t,expanded:o,selected:a,onToggle:s,onSelect:n,selectable:l,showLines:d}){const i=r.children&&r.children.length>0,h=o.has(r.id),b=a.has(r.id),x=i?h?e.jsx(v.FolderOpen,{size:14,className:"text-chart-5"}):e.jsx(v.Folder,{size:14,className:"text-chart-5"}):e.jsx(v.File,{size:14,className:"text-muted-foreground"});return e.jsxs("div",{children:[e.jsxs("div",{className:`flex items-center gap-1.5 py-1 px-2 rounded-[var(--radius-sm)] transition-colors
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxuissk/design-system",
3
- "version": "0.8.8",
3
+ "version": "0.8.9",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "workspaces": [