@innosolutions/inno-calendar 1.0.21 → 1.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/{agenda-dropdown-D8rfvI3Q.js → agenda-dropdown-CXEm80us.js} +665 -661
  2. package/dist/agenda-dropdown-CXEm80us.js.map +1 -0
  3. package/dist/agenda-dropdown-DscR56sP.cjs +2 -0
  4. package/dist/agenda-dropdown-DscR56sP.cjs.map +1 -0
  5. package/dist/agenda-view-CVYk83hH.cjs +11 -0
  6. package/dist/{agenda-view-BotvTTEB.cjs.map → agenda-view-CVYk83hH.cjs.map} +1 -1
  7. package/dist/{agenda-view-CRI1J_KB.js → agenda-view-DM01Fpvr.js} +795 -733
  8. package/dist/{agenda-view-CRI1J_KB.js.map → agenda-view-DM01Fpvr.js.map} +1 -1
  9. package/dist/components/index.cjs +1 -1
  10. package/dist/components/index.mjs +2 -2
  11. package/dist/components/inno-calendar.d.ts +7 -1
  12. package/dist/components/inno-calendar.d.ts.map +1 -1
  13. package/dist/components/views/month-view.d.ts +7 -1
  14. package/dist/components/views/month-view.d.ts.map +1 -1
  15. package/dist/components/views/timeline-view.d.ts +1 -1
  16. package/dist/components/views/timeline-view.d.ts.map +1 -1
  17. package/dist/index.cjs +1 -1
  18. package/dist/index.mjs +3 -3
  19. package/dist/presets/index.cjs +1 -1
  20. package/dist/presets/index.mjs +1 -1
  21. package/dist/{tailwind-calendar-CQBD-ljO.cjs → tailwind-calendar-BvdxZ56F.cjs} +2 -2
  22. package/dist/{tailwind-calendar-CQBD-ljO.cjs.map → tailwind-calendar-BvdxZ56F.cjs.map} +1 -1
  23. package/dist/{tailwind-calendar-Y9dn5uKm.js → tailwind-calendar-DtZENWzv.js} +2 -2
  24. package/dist/{tailwind-calendar-Y9dn5uKm.js.map → tailwind-calendar-DtZENWzv.js.map} +1 -1
  25. package/package.json +1 -1
  26. package/dist/agenda-dropdown-D8rfvI3Q.js.map +0 -1
  27. package/dist/agenda-dropdown-oY4qocpp.cjs +0 -2
  28. package/dist/agenda-dropdown-oY4qocpp.cjs.map +0 -1
  29. package/dist/agenda-view-BotvTTEB.cjs +0 -11
@@ -0,0 +1,11 @@
1
+ "use strict";const e=require("react/jsx-runtime"),u=require("./index-D2U2F80P.cjs"),a=require("react"),Ue=require("@radix-ui/react-dropdown-menu"),N=require("./slot-selection-context-B_YLI-x7.cjs"),Ke=require("@radix-ui/react-popover"),Ye=require("@radix-ui/react-tooltip");function be(t){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(s,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return s.default=t,Object.freeze(s)}const U=be(a),P=be(Ue),oe=be(Ke),ce=be(Ye),Te=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,ze=u.clsx,Re=(t,s)=>n=>{var r;if(s?.variants==null)return ze(t,n?.class,n?.className);const{variants:i,defaultVariants:h}=s,l=Object.keys(i).map(x=>{const m=n?.[x],y=h?.[x];if(m===null)return null;const c=Te(m)||Te(y);return i[x][c]}),g=n&&Object.entries(n).reduce((x,m)=>{let[y,c]=m;return c===void 0||(x[y]=c),x},{}),D=s==null||(r=s.compoundVariants)===null||r===void 0?void 0:r.reduce((x,m)=>{let{class:y,className:c,...j}=m;return Object.entries(j).every(k=>{let[b,z]=k;return Array.isArray(z)?z.includes({...h,...g}[b]):{...h,...g}[b]===z})?[...x,y,c]:x},[]);return ze(t,l,D,n?.class,n?.className)},Ae=Re("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input active:!bg-zinc-100 hover:!bg-zinc-50 active:bg-white !bg-white hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),se=a.forwardRef(({className:t,variant:s,size:n,loading:r,disabled:i,children:h,...l},g)=>e.jsxs("button",{className:u.cn(Ae({variant:s,size:n,className:t})),ref:g,disabled:i||r,...l,children:[r&&e.jsxs("svg",{className:"animate-spin -ml-1 mr-2 size-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),h]}));se.displayName="Button";const Pe=(...t)=>t.filter((s,n,r)=>!!s&&s.trim()!==""&&r.indexOf(s)===n).join(" ").trim();const Ge=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const Xe=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(s,n,r)=>r?r.toUpperCase():n.toLowerCase());const Le=t=>{const s=Xe(t);return s.charAt(0).toUpperCase()+s.slice(1)};var Je={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Ze=t=>{for(const s in t)if(s.startsWith("aria-")||s==="role"||s==="title")return!0;return!1};const Qe=a.forwardRef(({color:t="currentColor",size:s=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:h,iconNode:l,...g},D)=>a.createElement("svg",{ref:D,...Je,width:s,height:s,stroke:t,strokeWidth:r?Number(n)*24/Number(s):n,className:Pe("lucide",i),...!h&&!Ze(g)&&{"aria-hidden":"true"},...g},[...l.map(([x,m])=>a.createElement(x,m)),...Array.isArray(h)?h:[h]]));const Ne=(t,s)=>{const n=a.forwardRef(({className:r,...i},h)=>a.createElement(Qe,{ref:h,iconNode:s,className:Pe(`lucide-${Ge(Le(t))}`,`lucide-${t}`,r),...i}));return n.displayName=Le(t),n};const et=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],tt=Ne("check",et);const st=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],nt=Ne("chevron-right",st);const rt=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ot=Ne("circle",rt),we=P.Root,ve=P.Trigger,at=U.forwardRef(({className:t,inset:s,children:n,...r},i)=>e.jsxs(P.SubTrigger,{ref:i,className:u.cn("flex cursor-default select-none items-center rounded-lg px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",s&&"pl-8",t),...r,children:[n,e.jsx(nt,{className:"ml-auto h-4 w-4"})]}));at.displayName=P.SubTrigger.displayName;const it=U.forwardRef(({className:t,...s},n)=>e.jsx(P.SubContent,{ref:n,className:u.cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...s}));it.displayName=P.SubContent.displayName;const he=U.forwardRef(({className:t,sideOffset:s=4,...n},r)=>e.jsx(P.Portal,{children:e.jsx(P.Content,{ref:r,sideOffset:s,className:u.cn("z-50 rounded-xl border bg-popover p-1 text-popover-foreground shadow-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...n})}));he.displayName=P.Content.displayName;const fe=U.forwardRef(({className:t,inset:s,...n},r)=>e.jsx(P.Item,{ref:r,className:u.cn("relative flex cursor-pointer select-none items-center rounded-lg px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s&&"pl-8",t),...n}));fe.displayName=P.Item.displayName;const lt=U.forwardRef(({className:t,children:s,checked:n=!1,...r},i)=>e.jsxs(P.CheckboxItem,{ref:i,className:u.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:n,...r,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(P.ItemIndicator,{children:e.jsx(tt,{className:"h-4 w-4"})})}),s]}));lt.displayName=P.CheckboxItem.displayName;const ct=U.forwardRef(({className:t,children:s,...n},r)=>e.jsxs(P.RadioItem,{ref:r,className:u.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...n,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(P.ItemIndicator,{children:e.jsx(ot,{className:"h-2 w-2 fill-current"})})}),s]}));ct.displayName=P.RadioItem.displayName;const dt=U.forwardRef(({className:t,inset:s,...n},r)=>e.jsx(P.Label,{ref:r,className:u.cn("px-2 py-1.5 text-sm font-semibold",s&&"pl-8",t),...n}));dt.displayName=P.Label.displayName;const ut=U.forwardRef(({className:t,...s},n)=>e.jsx(P.Separator,{ref:n,className:u.cn("-mx-1 my-1 h-px bg-muted",t),...s}));ut.displayName=P.Separator.displayName;const Z=oe.Root,Q=oe.Trigger,xt=oe.Anchor,Y=U.forwardRef(({className:t,align:s="center",sideOffset:n=4,...r},i)=>e.jsx(oe.Portal,{children:e.jsx(oe.Content,{ref:i,align:s,sideOffset:n,className:u.cn("z-50 w-72 rounded-xl border bg-white text-popover-foreground outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...r})}));Y.displayName=oe.Content.displayName;const mt=["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"];function Ie({onClick:t,className:s}){const n=new Date;return e.jsxs("button",{type:"button",className:u.cn("flex size-11 sm:size-14 flex-col items-start overflow-hidden rounded-lg border shrink-0","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring","hover:bg-accent/50 transition-colors",s),onClick:t,children:[e.jsx("p",{className:"flex h-4 sm:h-6 w-full items-center justify-center bg-primary text-center text-[10px] sm:text-xs font-semibold text-primary-foreground",children:mt[n.getMonth()]}),e.jsx("p",{className:"flex w-full flex-1 items-center justify-center text-sm sm:text-lg font-bold",children:n.getDate()})]})}const ht=Re("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Oe({className:t,variant:s,...n}){return e.jsx("div",{className:u.cn(ht({variant:s}),t),...n})}function ft({className:t}){return e.jsx("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"m15 18-6-6 6-6"})})}function pt({className:t}){return e.jsx("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"m9 18 6-6-6-6"})})}const gt=["January","February","March","April","May","June","July","August","September","October","November","December"];function Be({date:t,view:s,events:n=[],onNavigatePrev:r,onNavigateNext:i,weekStartsOn:h=1,showEventCount:l=!0,className:g}){const D=gt[t.getMonth()],x=t.getFullYear(),m=l?N.getEventsCountInView(n,t,s,h):0,y=N.getRangeText(t,s);return e.jsxs("div",{className:u.cn("min-w-0 flex-1",g),children:[e.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-2 flex-wrap",children:[e.jsxs("span",{className:"text-base sm:text-lg font-semibold truncate",children:[D," ",x]}),l&&e.jsx(Oe,{variant:"outline",className:"px-1 sm:px-1.5 text-[10px] sm:text-xs shrink-0",children:m})]}),e.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-2",children:[e.jsx(se,{variant:"outline",size:"icon",className:"size-5 sm:size-6 [&_svg]:size-3 sm:[&_svg]:size-4",onClick:r,children:e.jsx(ft,{})}),e.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground truncate",children:y}),e.jsx(se,{variant:"outline",size:"icon",className:"size-5 sm:size-6 [&_svg]:size-3 sm:[&_svg]:size-4",onClick:i,children:e.jsx(pt,{})})]})]})}function bt({className:t}){return e.jsxs("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M8 2v4"}),e.jsx("path",{d:"M16 2v4"}),e.jsx("rect",{width:"18",height:"18",x:"3",y:"4",rx:"2"}),e.jsx("path",{d:"M3 10h18"}),e.jsx("path",{d:"M8 14h.01"}),e.jsx("path",{d:"M12 14h.01"}),e.jsx("path",{d:"M16 14h.01"}),e.jsx("path",{d:"M8 18h.01"}),e.jsx("path",{d:"M12 18h.01"}),e.jsx("path",{d:"M16 18h.01"})]})}function me({className:t}){return e.jsxs("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),e.jsx("path",{d:"M9 8h7"}),e.jsx("path",{d:"M8 12h6"}),e.jsx("path",{d:"M11 16h5"})]})}function We({className:t}){return e.jsx("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"m6 9 6 6 6-6"})})}function yt({className:t}){return e.jsxs("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),e.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}function Ee({className:t}){return e.jsxs("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M5 12h14"}),e.jsx("path",{d:"M12 5v14"})]})}function jt({className:t}){return e.jsxs("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{width:"7",height:"7",x:"3",y:"3",rx:"1"}),e.jsx("rect",{width:"7",height:"7",x:"3",y:"14",rx:"1"}),e.jsx("path",{d:"M14 4h7"}),e.jsx("path",{d:"M14 9h7"}),e.jsx("path",{d:"M14 15h7"}),e.jsx("path",{d:"M14 20h7"})]})}function wt({className:t}){return e.jsxs("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),e.jsx("path",{d:"M12 3v18"})]})}function vt({className:t}){return e.jsxs("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),e.jsx("path",{d:"M3 12h18"}),e.jsx("path",{d:"M12 3v18"})]})}function Nt({className:t}){return e.jsxs("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),e.jsx("path",{d:"M3 9h18"}),e.jsx("path",{d:"M3 15h18"}),e.jsx("path",{d:"M9 3v18"}),e.jsx("path",{d:"M15 3v18"})]})}const kt=[{value:"day",label:"Day",icon:jt},{value:"week",label:"Week",icon:wt},{value:"month",label:"Month",icon:vt},{value:"year",label:"Year",icon:Nt}],_e=[{value:"timeline-day",label:"1 Day",icon:me},{value:"timeline-3day",label:"3 Days",icon:me},{value:"timeline-week",label:"7 Days",icon:me}];function Dt({currentDate:t,view:s,events:n=[],onNavigateToday:r,onNavigatePrev:i,onNavigateNext:h,onNavigate:l,onViewChange:g,onAddEvent:D,availableViews:x=["day","week","month","agenda"],showTimelineViews:m=!1,timelineViews:y,settingsContent:c,showSettings:j=!1,filterContent:k,actions:b,className:z,weekStartsOn:L=1,labels:S={}}){const C=a.useMemo(()=>({today:"Today",addEvent:"Add Event",calendarView:"Calendar View",resourceView:"Resource View",...S}),[S]),$=()=>{r?.(),l?.("today")},f=()=>{i?.(),l?.("prev")},T=()=>{h?.(),l?.("next")},w=["day","week","month","year","agenda"].includes(s),W=s.startsWith("timeline-")||s.startsWith("resource-"),I=kt.filter(d=>x.includes(d.value)),O=w?I.find(d=>d.value===s):null,p=W?_e.find(d=>d.value===s):null;return e.jsxs("div",{className:u.cn("flex flex-col w-full gap-3 mb-2",z),children:[e.jsxs("div",{className:"flex lg:flex-row flex-col w-full justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 min-w-0",children:[e.jsx(Ie,{onClick:$}),e.jsx(Be,{date:t,view:s,events:n,onNavigatePrev:f,onNavigateNext:T,weekStartsOn:L})]}),D&&e.jsx(se,{size:"icon",className:"shrink-0 lg:hidden",onClick:D,children:e.jsx(Ee,{className:"size-4"})})]}),e.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-2 overflow-x-auto pb-1 -mb-1 scrollbar-none",children:[g&&I.length>0&&e.jsxs(we,{children:[e.jsxs(ve,{className:u.cn("inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors","h-10 px-2 sm:px-3 gap-1 sm:gap-1.5 shrink-0",w?"bg-primary text-primary-foreground hover:bg-primary/90":"border border-input bg-background hover:bg-accent hover:text-accent-foreground"),children:[e.jsx(bt,{className:"size-4"}),e.jsx("span",{className:"text-xs sm:text-sm font-medium",children:O?.label??C.calendarView}),e.jsx(We,{className:"size-3 opacity-60"})]}),e.jsx(he,{align:"start",className:"min-w-[120px]",children:I.map(d=>{const H=d.icon;return e.jsxs(fe,{onClick:()=>g(d.value),className:u.cn("gap-2",s===d.value&&"bg-accent"),children:[e.jsx(H,{className:"size-4"}),e.jsx("span",{children:d.label})]},d.value)})})]}),m&&g&&e.jsxs(we,{children:[e.jsxs(ve,{className:u.cn("inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors","h-10 px-2 sm:px-3 gap-1 sm:gap-1.5 shrink-0",W?"bg-primary text-primary-foreground hover:bg-primary/90":"border border-input bg-white hover:bg-zinc-50 hover:text-accent-foreground"),children:[e.jsx(me,{className:"size-4"}),e.jsx("span",{className:"text-xs sm:text-sm font-medium",children:p?.label??C.resourceView}),e.jsx(We,{className:"size-3 opacity-60"})]}),e.jsx(he,{align:"start",className:"min-w-[120px]",children:_e.map(d=>{const H=d.icon;return e.jsxs(fe,{onClick:()=>g(d.value),className:u.cn("gap-2",s===d.value&&"bg-accent"),children:[e.jsx(H,{className:"size-4"}),e.jsx("span",{children:d.label})]},d.value)})})]}),j&&c&&e.jsxs(Z,{children:[e.jsx(Q,{asChild:!0,children:e.jsx(se,{variant:"outline",size:"icon",className:"min-w-10 min-h-10 shrink-0 mx-0",children:e.jsx(yt,{className:"size-4 sm:size-5"})})}),e.jsx(Y,{className:"w-auto min-w-80 p-0",align:"end",sideOffset:8,children:e.jsx("div",{className:"max-h-[70vh] overflow-y-auto p-4 space-y-6",children:c})})]}),b,D&&e.jsxs(se,{className:"hidden lg:flex shrink-0 max-h-10",onClick:D,children:[e.jsx(Ee,{className:"size-4"}),C.addEvent]})]})]}),k&&e.jsx("div",{className:"flex items-center gap-2 overflow-x-auto pb-1 -mb-1 scrollbar-none",children:k})]})}const Ct=ce.Provider,ee=ce.Root,te=ce.Trigger,J=U.forwardRef(({className:t,sideOffset:s=4,...n},r)=>e.jsx(ce.Content,{ref:r,sideOffset:s,className:u.cn("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...n}));J.displayName=ce.Content.displayName;function ae(t){return{blue:{bg:"bg-blue-50 dark:bg-blue-950/30",text:"text-blue-700 dark:text-blue-300",dot:"bg-blue-500",dotFill:"fill-blue-600 dark:fill-blue-500",border:"border-blue-400 dark:border-blue-600"},green:{bg:"bg-green-50 dark:bg-green-950/30",text:"text-green-700 dark:text-green-300",dot:"bg-green-500",dotFill:"fill-green-600 dark:fill-green-500",border:"border-green-400 dark:border-green-600"},red:{bg:"bg-red-50 dark:bg-red-950/30",text:"text-red-700 dark:text-red-300",dot:"bg-red-500",dotFill:"fill-red-600 dark:fill-red-500",border:"border-red-400 dark:border-red-600"},yellow:{bg:"bg-yellow-50 dark:bg-yellow-950/30",text:"text-yellow-700 dark:text-yellow-300",dot:"bg-yellow-500",dotFill:"fill-yellow-600 dark:fill-yellow-500",border:"border-yellow-400 dark:border-yellow-600"},purple:{bg:"bg-purple-50 dark:bg-purple-950/30",text:"text-purple-700 dark:text-purple-300",dot:"bg-purple-500",dotFill:"fill-purple-600 dark:fill-purple-500",border:"border-purple-400 dark:border-purple-600"},orange:{bg:"bg-orange-50 dark:bg-orange-950/30",text:"text-orange-700 dark:text-orange-300",dot:"bg-orange-500",dotFill:"fill-orange-600 dark:fill-orange-500",border:"border-orange-400 dark:border-orange-600"},pink:{bg:"bg-pink-50 dark:bg-pink-950/30",text:"text-pink-700 dark:text-pink-300",dot:"bg-pink-500",dotFill:"fill-pink-600 dark:fill-pink-500",border:"border-pink-400 dark:border-pink-600"},teal:{bg:"bg-teal-50 dark:bg-teal-950/30",text:"text-teal-700 dark:text-teal-300",dot:"bg-teal-500",dotFill:"fill-teal-600 dark:fill-teal-500",border:"border-teal-400 dark:border-teal-600"},gray:{bg:"bg-gray-50 dark:bg-gray-950/30",text:"text-gray-700 dark:text-gray-300",dot:"bg-gray-500",dotFill:"fill-gray-600 dark:fill-gray-500",border:"border-gray-400 dark:border-gray-600"},indigo:{bg:"bg-indigo-50 dark:bg-indigo-950/30",text:"text-indigo-700 dark:text-indigo-300",dot:"bg-indigo-500",dotFill:"fill-indigo-600 dark:fill-indigo-500",border:"border-indigo-400 dark:border-indigo-600"}}[t??"blue"]}function pe(t){return t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1})}function X(t,s){return`${pe(t)} - ${pe(s)}`}function ke(t){const s=new Date(t);return s.setHours(0,0,0,0),s}function ge({event:t,variant:s="full",badgeVariant:n="colored",onClick:r,className:i,showTime:h=!0,showDescription:l=!1,showParticipants:g=!1,style:D,disablePopover:x=!1,renderPopover:m,enableDrag:y=!1}){const c=ae(t.color),[j,k]=a.useState(!1),[b,z]=a.useState(!1),L=N.useOptionalDragDrop(),S=t.endDate<ke(new Date),C=t.isCanceled??!1,$=y&&L&&!C&&!S,f=C?e.jsx(St,{className:"h-3 w-3 text-zinc-800 dark:text-zinc-200"}):t.meetingTookPlace?e.jsx(Mt,{className:u.cn("h-3 w-3",c.text)}):null,T=a.useCallback(()=>{b||(x&&r?r(t):x||k(!0))},[b,x,r,t]),w=a.useCallback(()=>{k(!1)},[]),W=a.useCallback(p=>{$&&(p.dataTransfer.effectAllowed="move",p.dataTransfer.setData("text/plain",t.id),z(!0),L?.startDrag?.(t))},[$,t,L]),I=a.useCallback(()=>{z(!1),L?.isDragging&&L.endDrag?.()},[L]);if(s==="dot"){const p=e.jsx("button",{type:"button",onClick:T,className:u.cn("size-2 rounded-full cursor-pointer transition-opacity",S?"bg-gray-400":c.dot,t.isCanceled&&"opacity-50",i),style:D,"aria-label":t.title});return x?e.jsxs(ee,{children:[e.jsx(te,{asChild:!0,children:p}),e.jsx(J,{children:e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsx("div",{className:"font-medium",children:t.title}),e.jsx("div",{className:"text-xs opacity-80",children:X(t.startDate,t.endDate)})]})})]}):e.jsxs(Z,{open:j,onOpenChange:k,children:[e.jsx(Q,{asChild:!0,children:e.jsxs(ee,{children:[e.jsx(te,{asChild:!0,children:p}),e.jsx(J,{children:e.jsx("div",{className:"font-medium",children:t.title})})]})}),e.jsx(Y,{className:"w-80",children:m?m({event:t,onClose:w}):e.jsx(le,{event:t,onClose:w})})]})}if(s==="compact"){const p=e.jsxs("div",{role:"button",tabIndex:0,draggable:!!$,onDragStart:W,onDragEnd:I,onClick:x?T:void 0,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),T())},className:u.cn("group flex w-full relative items-center shadow-[0_0_1px_rgba(0,0,0,0.3)] gap-0 rounded px-1.5 py-1 text-left text-xs transition-colors hover:opacity-80",$?"cursor-grab active:cursor-grabbing":"cursor-pointer",b&&"opacity-50",C||S?"bg-zinc-100 dark:bg-zinc-800 text-zinc-500 dark:text-zinc-400 line-through":[n==="colored"&&[c.bg,c.text],n==="mixed"&&[c.bg,c.text],n==="dot"&&"bg-muted/50"],i),style:D,children:[["dot","mixed"].includes(n)&&!S&&e.jsx("svg",{width:"8",height:"8",viewBox:"0 0 8 8",className:"event-dot absolute -top-1 -left-1 shrink-0","aria-hidden":"true",focusable:"false",children:e.jsx("circle",{cx:"4",cy:"4",r:"4",className:c.dotFill})}),e.jsx("span",{className:"flex-1 min-w-0 overflow-hidden",children:e.jsxs("span",{className:"",children:[e.jsx("span",{className:"relative block overflow-hidden whitespace-nowrap text-xs leading-tight",style:{maskImage:"linear-gradient(to right, transparent 0, black 8px, black calc(100% - 8px), transparent 100%)",WebkitMaskImage:"linear-gradient(to right, transparent 0, black 8px, black calc(100% - 8px), transparent 100%)"},children:e.jsxs("span",{className:"inline-flex event-marquee",children:[e.jsx("span",{className:"shrink-0 px-1",children:t.title}),e.jsx("span",{className:"shrink-0 px-1",children:"•"}),e.jsx("span",{"aria-hidden":"true",className:"shrink-0 px-1",children:t.title}),e.jsx("span",{"aria-hidden":"true",className:"shrink-0 px-1",children:"•"})]})}),e.jsx("div",{className:u.cn("w-fit mt-0.5 text-[10px] px-1 py-0.5 border border-dashed rounded-full font-medium",S?"border-zinc-400 dark:border-zinc-600":c.border),children:X(t.startDate,t.endDate)})]})}),e.jsx("div",{className:"flex gap-0.5",children:f})]});return x?e.jsxs(ee,{children:[e.jsx(te,{asChild:!0,children:p}),e.jsx(J,{children:e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsx("div",{className:"font-medium",children:t.title}),e.jsx("div",{className:"text-xs text-muted-foreground tabular-nums",children:X(t.startDate,t.endDate)})]})})]}):e.jsxs(Z,{open:j,onOpenChange:k,children:[e.jsx(Q,{asChild:!0,children:p}),e.jsx(Y,{className:"w-80",children:m?m({event:t,onClose:w}):e.jsx(le,{event:t,onClose:w})})]})}const O=e.jsxs("button",{type:"button",onClick:T,className:u.cn("group relative flex w-full flex-col gap-1 rounded-md border px-2 py-1.5 text-left transition-all hover:shadow-md","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",C||S?"bg-zinc-100 dark:bg-zinc-800 border-zinc-300 dark:border-zinc-700 text-zinc-500 dark:text-zinc-400 line-through":[n==="colored"&&[c.bg,c.border,c.text],n==="mixed"&&[c.bg,c.border,c.text],n==="dot"&&"bg-muted/50 border-border"],i),style:D,children:[e.jsxs("div",{className:"flex items-start justify-between gap-1",children:[e.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[["dot","mixed"].includes(n)&&!S&&!C&&e.jsx("svg",{width:"8",height:"8",viewBox:"0 0 8 8",className:"event-dot shrink-0","aria-hidden":"true",focusable:"false",children:e.jsx("circle",{cx:"4",cy:"4",r:"4",className:c.dotFill})}),e.jsx("span",{className:u.cn("text-sm font-medium truncate",!S&&!C&&n!=="dot"&&c.text,C&&"line-through"),children:t.title})]}),f]}),h&&e.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[e.jsx(He,{className:"h-3 w-3 shrink-0"}),e.jsx("span",{children:X(t.startDate,t.endDate)})]}),l&&t.description&&e.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:t.description}),g&&t.participants&&t.participants.length>0&&e.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[e.jsx(Tt,{className:"h-3 w-3 shrink-0"}),e.jsx("span",{className:"truncate",children:t.participants.map(p=>p.name).join(", ")})]}),t.scheduleTypeName&&e.jsx("span",{className:u.cn("mt-1 inline-flex self-start rounded-full px-2 py-0.5 text-[10px] font-medium",S?"bg-zinc-200 dark:bg-zinc-700 text-zinc-500 dark:text-zinc-400":[c.bg,c.text]),children:t.scheduleTypeName})]});return x?e.jsxs(ee,{children:[e.jsx(te,{asChild:!0,children:O}),e.jsx(J,{children:e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsx("div",{className:"font-medium",children:t.title}),e.jsx("div",{className:"text-xs text-muted-foreground tabular-nums",children:X(t.startDate,t.endDate)})]})})]}):e.jsxs(Z,{open:j,onOpenChange:k,children:[e.jsx(Q,{asChild:!0,children:O}),e.jsx(Y,{className:"w-80",children:m?m({event:t,onClose:w}):e.jsx(le,{event:t,onClose:w})})]})}function He({className:t}){return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("polyline",{points:"12 6 12 12 16 14"})]})}function Mt({className:t}){return e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,children:e.jsx("path",{d:"M20 6 9 17l-5-5"})})}function St({className:t}){return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,children:[e.jsx("path",{d:"M18 6 6 18"}),e.jsx("path",{d:"m6 6 12 12"})]})}function Tt({className:t}){return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,children:[e.jsx("path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"}),e.jsx("circle",{cx:"9",cy:"7",r:"4"}),e.jsx("path",{d:"M22 21v-2a4 4 0 0 0-3-3.87"}),e.jsx("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]})}function le({event:t,onClose:s}){const n=ae(t.color),r=t.isCanceled??!1;return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:u.cn("size-4 rounded shrink-0 mt-0.5",n.dot)}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:u.cn("font-semibold text-lg",r&&"line-through opacity-50"),children:t.title}),e.jsxs("div",{className:"flex items-center gap-1 text-sm text-muted-foreground mt-1",children:[e.jsx(He,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"tabular-nums",children:X(t.startDate,t.endDate)})]})]})]}),t.description&&e.jsx("p",{className:"text-sm text-muted-foreground",children:t.description}),e.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[t.isAllDay&&e.jsx("span",{className:"text-xs bg-muted px-2 py-0.5 rounded-full font-medium",children:"All day"}),t.isRecurring&&e.jsx("span",{className:"text-xs bg-muted px-2 py-0.5 rounded-full font-medium",children:"Recurring"}),r&&e.jsx("span",{className:"text-xs bg-red-100 dark:bg-red-950/30 text-red-700 dark:text-red-300 px-2 py-0.5 rounded-full font-medium",children:"Canceled"})]}),e.jsx("div",{className:"flex justify-end pt-2 border-t",children:e.jsx("button",{type:"button",onClick:s,className:"text-xs text-muted-foreground hover:text-foreground px-3 py-1.5 rounded-md hover:bg-muted transition-colors",children:"Close"})})]})}function De({event:t,position:s,hourHeight:n=96,badgeVariant:r="colored",onClick:i,className:h,disablePopover:l=!1,renderPopover:g,enableDrag:D=!0}){const x=ae(t.color),[m,y]=a.useState(!1),[c,j]=a.useState(!1),k=N.useOptionalDragDrop(),b=(t.endDate.getTime()-t.startDate.getTime())/(1e3*60),z=b/60*n-8,L=t.endDate<ke(new Date),S=t.isCanceled??!1,C=D&&k&&!S&&!L,$=b<35,f=b>25,T=r==="dot",w=a.useCallback(()=>{c||(l&&i?i(t):l||y(!0))},[c,l,i,t]),W=a.useCallback(()=>{y(!1)},[]),I=a.useCallback(_=>{if(!C)return;_.dataTransfer.effectAllowed="move",_.dataTransfer.setData("text/plain",t.id);const v=_.currentTarget,o=v.getBoundingClientRect();_.dataTransfer.setDragImage(v,_.clientX-o.left,_.clientY-o.top),j(!0),k?.startDrag?.(t)},[C,t,k]),O=a.useCallback(()=>{j(!1),k?.isDragging&&k.endDrag?.()},[k]),p=a.useCallback(_=>{(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),w())},[w]),d=e.jsxs("div",{role:"button",tabIndex:0,draggable:!!C,onDragStart:I,onDragEnd:O,onKeyDown:p,onClick:c?void 0:w,className:u.cn("group flex w-full select-none flex-col gap-0.5 overflow-hidden rounded-md border px-2 py-1.5 text-xs text-left","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring","transition-opacity",C?"cursor-grab active:cursor-grabbing":"cursor-pointer",c&&"opacity-50",S||L?"bg-zinc-100 dark:bg-zinc-800 border-zinc-300 dark:border-zinc-700 text-zinc-500 dark:text-zinc-400 line-through":[!T&&[x.bg,x.border,x.text],T&&"bg-neutral-50 dark:bg-neutral-900 border-neutral-200 dark:border-neutral-700"],$&&"py-0 justify-center",h),style:{height:`${Math.max(z,20)}px`},children:[e.jsxs("div",{className:"flex items-start gap-1.5 min-w-0",children:[["mixed","dot"].includes(r)&&!L&&!S&&e.jsx("svg",{width:"8",height:"8",viewBox:"0 0 8 8",className:"event-dot shrink-0","aria-hidden":"true",focusable:"false",children:e.jsx("circle",{cx:"4",cy:"4",r:"4",className:x.dotFill})}),e.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:e.jsx("p",{className:u.cn("font-semibold whitespace-nowrap",!L&&!S&&T&&"text-foreground"),children:t.title})})]}),f&&e.jsxs("p",{className:u.cn("text-[11px] tabular-nums",T?"text-muted-foreground":"opacity-90"),children:[pe(t.startDate)," - ",pe(t.endDate)]})]}),H=e.jsx(J,{children:e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsx("div",{className:"font-medium",children:t.title}),e.jsx("div",{className:"text-xs text-muted-foreground tabular-nums",children:X(t.startDate,t.endDate)})]})});return l?e.jsx("div",{className:"absolute p-0.5",style:{top:`${s.top}px`,left:`${s.left}%`,width:s.minWidth?`max(${s.minWidth}px, ${s.width}%)`:`${s.width}%`,minWidth:s.minWidth?`${s.minWidth}px`:void 0},children:e.jsxs(ee,{children:[e.jsx(te,{asChild:!0,children:d}),H]})}):e.jsx("div",{className:"absolute p-0.5",style:{top:`${s.top}px`,left:`${s.left}%`,width:s.minWidth?`max(${s.minWidth}px, ${s.width}%)`:`${s.width}%`,minWidth:s.minWidth?`${s.minWidth}px`:void 0},children:e.jsxs(Z,{open:m,onOpenChange:y,children:[e.jsx(Q,{asChild:!0,children:d}),e.jsx(Y,{className:"w-80",children:g?g({event:t,onClose:W}):e.jsx(le,{event:t,onClose:W})})]})})}function zt({event:t,spanDays:s,isStart:n,isEnd:r,onClick:i,className:h,disablePopover:l=!1,renderPopover:g}){const D=ae(t.color),[x,m]=a.useState(!1),y=t.endDate<ke(new Date),c=t.isCanceled??!1,j=a.useCallback(()=>{l&&i?i(t):l||m(!0)},[l,i,t]),k=a.useCallback(()=>{m(!1)},[]),b=e.jsx("button",{type:"button",onClick:j,className:u.cn("flex h-5 items-center px-1.5 text-xs font-medium transition-opacity hover:opacity-80",c||y?"bg-zinc-200 dark:bg-zinc-700 text-zinc-500 dark:text-zinc-400 line-through":[D.dot,"text-white"],n&&"rounded-l",r&&"rounded-r",!n&&"border-l-0",!r&&"border-r-0",h),style:{width:`${s*100}%`},children:n&&e.jsx("span",{className:"truncate",children:t.title})}),z=e.jsx(J,{children:e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsx("div",{className:"font-medium",children:t.title}),e.jsx("div",{className:"text-xs text-muted-foreground tabular-nums",children:X(t.startDate,t.endDate)})]})});return l?e.jsxs(ee,{children:[e.jsx(te,{asChild:!0,children:b}),z]}):e.jsxs(Z,{open:x,onOpenChange:m,children:[e.jsx(Q,{asChild:!0,children:b}),e.jsx(Y,{className:"w-80",children:g?g({event:t,onClose:k}):e.jsx(le,{event:t,onClose:k})})]})}if(typeof window<"u"&&!document.getElementById("inno-calendar-event-marquee-style")){const t=document.createElement("style");t.id="inno-calendar-event-marquee-style",t.innerHTML=`
2
+ @keyframes event-marquee {
3
+ 0% { transform: translateX(0); }
4
+ 100% { transform: translateX(-50%); }
5
+ }
6
+ .event-marquee {
7
+ animation: event-marquee 28s linear infinite;
8
+ will-change: transform;
9
+ }
10
+ `,document.head.appendChild(t)}function Ce({events:t,date:s,onEventClick:n,className:r}){return t.length===0?null:e.jsxs("div",{className:u.cn("border-b bg-muted/20 px-2 py-1.5 space-y-1","sm:px-4 sm:py-2",r),children:[e.jsx("span",{className:"text-[10px] font-medium text-muted-foreground sm:text-xs",children:"All day / Multi-day"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:t.map(i=>{const h=ae(i.color),l=N.isSameDay(i.startDate,s),g=N.isSameDay(i.endDate,s);return e.jsxs("button",{type:"button",onClick:()=>n?.(i),className:u.cn("inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium transition-opacity hover:opacity-80","sm:px-2 sm:py-1 sm:text-xs",h.bg,h.text,i.isCanceled&&"opacity-60 line-through"),children:[l&&"→ ",e.jsx("span",{className:"truncate max-w-24 sm:max-w-32",children:i.title}),g&&" →"]},i.id)})})]})}const Lt=5;function Ve({slot:t,onSelectionStart:s,onSelectionMove:n,onSelectionEnd:r,isSelected:i=!1,isSelecting:h=!1,disabled:l=!1,ariaLabel:g,children:D,className:x,height:m,style:y,dataAttributes:c}){const j=a.useRef(null),k=a.useRef(!1),b=a.useRef(!1),z=a.useRef(null),[L,S]=a.useState(!1),C=N.useOptionalDragDrop(),$=a.useCallback(d=>{l||d.button!==0&&d.pointerType==="mouse"||(d.preventDefault(),j.current={x:d.clientX,y:d.clientY},k.current=!1,b.current=!0,s?.(t))},[l,t,s]),f=a.useCallback(d=>{if(!(j.current&&b.current&&!l))return;const H=d.clientX-j.current.x,_=d.clientY-j.current.y;Math.sqrt(H*H+_*_)>=Lt&&(k.current=!0)},[l]),T=a.useCallback(d=>{l||(d.buttons>0||h)&&n?.(t)},[l,h,t,n]),w=a.useCallback(()=>{l||(r?.(),j.current=null,k.current=!1,b.current=!1)},[l,r]),W=a.useCallback(d=>{if(!C?.isDragging||l)return;d.preventDefault(),d.dataTransfer.dropEffect="move",S(!0);const H=new Date,_=t.hour??H.getHours(),v=t.minute??(H.getMinutes()>=30?30:0);C.updateDragPreview?.(t.date,_,v)},[C,l,t]),I=a.useCallback(()=>{S(!1)},[]),O=a.useCallback(d=>{d.preventDefault(),S(!1),!(!C?.isDragging||l)&&C.endDrag?.()},[C,l]);a.useEffect(()=>{const d=()=>{b.current&&(b.current=!1,j.current=null,k.current=!1)};return window.addEventListener("pointerup",d),window.addEventListener("pointercancel",d),()=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",d)}},[]);const p=a.useCallback(d=>{l||(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),s?.(t),r?.())},[l,t,s,r]);return e.jsx("button",{ref:z,type:"button","aria-label":g,"aria-disabled":l,"aria-pressed":i,disabled:l,onPointerDown:$,onPointerMove:f,onPointerUp:w,onPointerEnter:T,onKeyDown:p,onDragOver:W,onDragLeave:I,onDrop:O,className:u.cn("select-none touch-none cursor-pointer transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",!(h||l)&&"hover:bg-accent/50",i&&"bg-zinc-50",L&&"bg-primary/20 ring-2 ring-primary ring-inset",l&&"cursor-not-allowed opacity-50",x),style:{height:m,...y},...c,children:D})}function Me({slot:t,date:s,hour:n,minute:r,ariaLabel:i,...h}){const l=t??{date:s,hour:n??0,minute:r??0},g=i??`Add event at ${(l.hour??0).toString().padStart(2,"0")}:${(l.minute??0).toString().padStart(2,"0")} on ${l.date.toLocaleDateString()}`;return e.jsx(Ve,{slot:l,ariaLabel:g,...h})}function Fe({slot:t,date:s,ariaLabel:n,...r}){const i=t??{date:s},h=n??`Select ${i.date.toLocaleDateString()}`;return e.jsx(Ve,{slot:i,ariaLabel:h,...r})}const ie=96,ye=72,je=80;function Wt({events:t,date:s,visibleHours:n={startHour:0,endHour:24},workingHours:r,slotDuration:i=30,badgeVariant:h="colored",onEventClick:l,onSlotSelect:g,className:D,renderEvent:x,renderPopover:m}){const y=60/i,c=100/y,j=a.useMemo(()=>{const v=[];for(let o=0;o<y;o++)v.push(o*i);return v},[y,i]),k=a.useMemo(()=>N.getEventsForDay(t,s),[t,s]),{singleDay:b,multiDay:z}=a.useMemo(()=>N.separateEventsByDuration(k),[k]),L=a.useMemo(()=>{const v=N.calculateOverlappingPositions(b,s,n,ie),o=new Map;for(const M of v)o.set(M.event.id,M.position);return o},[b,s,n]),S=a.useMemo(()=>N.getVisibleHoursArray(n),[n]),C=new Date,$=N.isToday(s),f=a.useMemo(()=>{if(!$)return 0;const v=C.getHours()+C.getMinutes()/60;return v<n.startHour||v>n.endHour?-1:(v-n.startHour)*ie},[$,n,C]),T=a.useRef(null);a.useLayoutEffect(()=>{const v=T.current;if(!v)return;const o=()=>{const M=s.getDay(),E=r?.[M];let R;E?.enabled&&E.from>0?R=Math.max(E.from-1,n.startHour):R=Math.max(7,n.startHour);const A=(R-n.startHour)*ie;v.scrollTo({top:A,behavior:"instant"})};requestAnimationFrame(()=>{requestAnimationFrame(o)})},[s,r,n]);const w=N.useOptionalSlotSelection(),W=a.useCallback(v=>{w?.startSelection(v)},[w]),I=a.useCallback(v=>{w?.updateSelection(v)},[w]),O=a.useCallback(()=>{w?.endSelection()},[w]),p=a.useCallback(v=>{l?.(v)},[l]),d=s.toLocaleDateString([],{weekday:"short"}),H=s.getDate(),_=N.isToday(s);return e.jsxs("div",{className:u.cn("flex flex-col h-full",D),children:[e.jsx("div",{className:"flex items-center gap-3 border-b px-4 py-3",children:e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("span",{className:u.cn("text-[11px] font-medium uppercase tracking-wide",_?"text-primary":"text-muted-foreground"),children:d}),e.jsx("span",{className:u.cn("flex items-center justify-center rounded-full mt-0.5","size-12 text-3xl font-normal",_?"bg-primary text-primary-foreground":"text-foreground"),children:H})]})}),z.length>0&&e.jsx(Ce,{events:z,date:s,onEventClick:p}),e.jsx("div",{ref:T,className:"flex-1 overflow-auto",children:e.jsxs("div",{className:"relative min-h-full",children:[S.map((v,o)=>{const E=!N.isWorkingHour(s,v,r);return e.jsxs("div",{className:u.cn("relative flex",E&&"bg-calendar-disabled-hour"),style:{height:ie},children:[e.jsx("div",{className:"relative flex-shrink-0 border-r border-border/50 bg-zinc-50 dark:bg-zinc-900",style:{width:ye},children:e.jsx("div",{className:"absolute -top-2.5 right-1 sm:right-2 flex h-5 items-center",children:o!==0&&e.jsx("span",{className:"text-[10px] sm:text-xs text-muted-foreground",children:N.formatHourLabel(v)})})}),e.jsxs("div",{className:"relative flex-1",children:[$&&!E&&e.jsx("div",{className:"absolute inset-0 bg-primary/5"}),o!==0&&e.jsx("div",{className:"pointer-events-none absolute inset-x-0 top-0 border-b border-border/50"}),j.slice(1).map(R=>e.jsx("div",{className:"pointer-events-none absolute inset-x-0 border-b border-dashed border-border/30",style:{top:`${R/60*100}%`}},R)),j.map((R,A)=>{const F={date:s,hour:v,minute:R};return e.jsx(Me,{slot:F,onSelectionStart:W,onSelectionMove:I,onSelectionEnd:O,isSelected:w?.isSlotSelected(F)??!1,isSelecting:w?.isSelecting??!1,disabled:E,className:"absolute inset-x-0",style:{top:`${A*c}%`,height:`${c}%`},ariaLabel:`Add event at ${N.formatHourLabel(v)}:${String(R).padStart(2,"0")}`},R)})]})]},v)}),e.jsx("div",{className:"absolute top-0 bottom-0 right-0 pointer-events-none",style:{left:ye},children:b.map(v=>{const o=L.get(v.id);if(!o)return null;const M=`calc(${o.width}% - 2px)`,E=`max(${je}px, ${M})`;return x?e.jsx("div",{className:"absolute pointer-events-auto p-0.5",style:{top:`${o.top}px`,left:`${o.left}%`,width:E,minWidth:`${je}px`},children:x({event:v,position:o})},v.id):e.jsx(De,{event:v,position:{top:o.top,left:o.left,width:o.width,minWidth:je},hourHeight:ie,badgeVariant:h,onClick:l,disablePopover:!!l&&!m,renderPopover:m,className:"pointer-events-auto"},v.id)})}),$&&f>=0&&e.jsxs("div",{className:"absolute left-0 right-0 z-20 flex items-center pointer-events-none",style:{top:f,left:ye},children:[e.jsx("div",{className:"h-2.5 w-2.5 -ml-1 rounded-full bg-red-500"}),e.jsx("div",{className:"flex-1 h-0.5 bg-red-500"})]})]})})]})}const re=96,de=56,$e=72,K=120,ue=100,Et=3;function _t({events:t,date:s,weekStartsOn:n=1,visibleHours:r={startHour:0,endHour:24},workingHours:i,slotDuration:h=30,badgeVariant:l="colored",onEventClick:g,onSlotSelect:D,onDayClick:x,className:m,renderEvent:y,renderPopover:c}){const j=60/h,k=100/j,b=a.useMemo(()=>{const o=[];for(let M=0;M<j;M++)o.push(M*h);return o},[j,h]),z=a.useMemo(()=>N.getWeekDays(s,n),[s,n]),L=a.useMemo(()=>N.getVisibleHoursArray(r),[r]),S=a.useMemo(()=>{const o=new Map;for(const M of z){const E=M.toDateString(),R=N.getEventsForDay(t,M),{singleDay:A,multiDay:F}=N.separateEventsByDuration(R),V=N.calculateOverlappingPositions(A,M,r,re),B=new Map;let ne=1;for(const q of V)if(B.set(q.event.id,q.position),q.position.width>0){const G=Math.round(100/q.position.width);ne=Math.max(ne,G)}o.set(E,{singleDay:A,multiDay:F,positions:B,maxOverlapping:ne})}return o},[z,t,r]),C=a.useMemo(()=>{const o=new Map;for(const{multiDay:M}of S.values())for(const E of M)o.set(E.id,E);return Array.from(o.values())},[S]),$=new Date,f=z.findIndex(o=>N.isToday(o)),T=a.useMemo(()=>{if(f<0)return-1;const o=$.getHours()+$.getMinutes()/60;return o<r.startHour||o>r.endHour?-1:(o-r.startHour)*re},[f,r,$]),w=a.useRef(null);a.useLayoutEffect(()=>{const o=w.current;if(!o)return;const M=()=>{const R=new Date().getDay();let A=i?.[R];if(!A?.enabled||A.from===0){const B=i?.[1];B?.enabled&&(A=B)}let F;A?.enabled&&A.from>0?F=Math.max(A.from-1,r.startHour):F=Math.max(7,r.startHour);const V=(F-r.startHour)*re;o.scrollTo({top:V,behavior:"instant"})};requestAnimationFrame(()=>{requestAnimationFrame(M)})},[s,i,r]);const W=N.useOptionalSlotSelection(),I=a.useCallback(o=>{W?.startSelection(o)},[W]),O=a.useCallback(o=>{W?.updateSelection(o)},[W]),p=a.useCallback(()=>{W?.endSelection()},[W]),d=a.useCallback(o=>{g?.(o)},[g]),H=de+7*K,_=a.useMemo(()=>{const o=[];for(const M of z){const E=M.toDateString(),A=S.get(E)?.maxOverlapping??1;A>Et?o.push(Math.max(K,A*ue)):o.push(K)}return o},[z,S]),v=de+_.reduce((o,M)=>o+M,0);return e.jsxs("div",{className:u.cn("ic-week-view flex flex-col h-full",m),children:[C.length>0&&e.jsx(Ce,{events:C,date:N.startOfWeek(s,n),onEventClick:d}),e.jsx("div",{ref:w,className:"ic-week-scroll-container flex-1",children:e.jsxs("div",{style:{minWidth:Math.max(H,v)},children:[e.jsx("div",{className:"ic-week-header sticky top-0 z-20 border-b bg-background",children:e.jsxs("div",{className:"flex",children:[e.jsx("div",{className:"flex-shrink-0 flex items-end justify-center pb-2 text-[10px] text-muted-foreground/70",style:{width:de,height:$e},children:e.jsxs("span",{className:"hidden sm:inline",children:["GMT",(()=>{const o=new Date().getTimezoneOffset(),M=Math.abs(Math.floor(o/60)),E=o<=0?"+":"-";return M>0?`${E}${String(M).padStart(2,"0")}`:""})()]})}),z.map((o,M)=>{const E=N.isToday(o),R=_[M]??K,A=R>K;return e.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center border-r last:border-r-0 py-2",style:{height:$e,minWidth:A?R:K},children:[e.jsx("span",{className:u.cn("text-[11px] font-medium uppercase tracking-wide",E?"text-primary":"text-muted-foreground"),children:o.toLocaleDateString([],{weekday:"short"})}),e.jsx("button",{type:"button",onClick:()=>x?.(o),className:u.cn("flex items-center justify-center rounded-full transition-colors mt-0.5","size-10 text-2xl font-normal",E?"bg-primary text-primary-foreground":"text-foreground hover:bg-muted"),children:o.getDate()})]},o.toDateString())})]})}),e.jsxs("div",{className:"relative flex",children:[e.jsx("div",{className:"ic-hour-column sticky left-0 z-10 bg-zinc-50 dark:bg-zinc-900 border-r",style:{width:de},children:L.map((o,M)=>e.jsx("div",{className:"relative",style:{height:re},children:e.jsx("div",{className:"absolute -top-2.5 right-1 sm:right-2 flex h-5 items-center",children:M!==0&&e.jsx("span",{className:"text-[10px] sm:text-xs text-muted-foreground",children:N.formatHourLabel(o)})})},o))}),e.jsx("div",{className:"ic-week-grid relative flex-1",children:e.jsx("div",{className:"flex divide-x",children:z.map((o,M)=>{const E=o.toDateString(),R=S.get(E),A=_[M]??K,F=A>K;return e.jsxs("div",{className:"ic-day-column relative flex-1",style:{minWidth:F?A:K},children:[L.map((V,B)=>{const q=!N.isWorkingHour(o,V,i);return e.jsxs("div",{className:u.cn("relative",q&&"bg-calendar-disabled-hour",N.isToday(o)&&!q&&"bg-primary/5"),style:{height:re},children:[B!==0&&e.jsx("div",{className:"pointer-events-none absolute inset-x-0 top-0 border-b border-border/50"}),b.slice(1).map(G=>e.jsx("div",{className:"pointer-events-none absolute inset-x-0 border-b border-dashed border-border/30",style:{top:`${G/60*100}%`}},G)),b.map((G,qe)=>{const Se={date:o,hour:V,minute:G};return e.jsx(Me,{slot:Se,onSelectionStart:I,onSelectionMove:O,onSelectionEnd:p,isSelected:W?.isSlotSelected(Se)??!1,isSelecting:W?.isSelecting??!1,disabled:q,className:"absolute inset-x-0",style:{top:`${qe*k}%`,height:`${k}%`},ariaLabel:`Add event on ${o.toLocaleDateString()} at ${N.formatHourLabel(V)}:${String(G).padStart(2,"0")}`},G)})]},V)}),R?.singleDay.map(V=>{const B=R.positions.get(V.id);if(!B)return null;const ne=`calc(${B.width}% - 2px)`,q=`max(${ue}px, ${ne})`;return y?e.jsx("div",{className:"absolute pointer-events-auto p-0.5",style:{top:`${B.top}px`,left:`${B.left}%`,width:q,minWidth:`${ue}px`},children:y({event:V,position:B})},V.id):e.jsx(De,{event:V,position:{top:B.top,left:B.left,width:B.width,minWidth:ue},hourHeight:re,badgeVariant:l,onClick:g,disablePopover:!!g&&!c,renderPopover:c,className:"pointer-events-auto"},V.id)}),M===f&&T>=0&&e.jsxs("div",{className:"absolute left-0 right-0 z-20 flex items-center pointer-events-none",style:{top:T},children:[e.jsx("div",{className:"h-2 w-2 -ml-1 rounded-full bg-red-500"}),e.jsx("div",{className:"flex-1 h-0.5 bg-red-500"})]})]},o.toDateString())})})})]})]})})]})}const $t=[{full:"Monday",short:"Mon",tiny:"M"},{full:"Tuesday",short:"Tue",tiny:"T"},{full:"Wednesday",short:"Wed",tiny:"W"},{full:"Thursday",short:"Thu",tiny:"T"},{full:"Friday",short:"Fri",tiny:"F"},{full:"Saturday",short:"Sat",tiny:"S"},{full:"Sunday",short:"Sun",tiny:"S"}],Rt=[{full:"Sunday",short:"Sun",tiny:"S"},{full:"Monday",short:"Mon",tiny:"M"},{full:"Tuesday",short:"Tue",tiny:"T"},{full:"Wednesday",short:"Wed",tiny:"W"},{full:"Thursday",short:"Thu",tiny:"T"},{full:"Friday",short:"Fri",tiny:"F"},{full:"Saturday",short:"Sat",tiny:"S"}],xe=3;function At({events:t,date:s,weekStartsOn:n=1,badgeVariant:r="colored",onEventClick:i,onSlotSelect:h,onDayClick:l,className:g,renderEvent:D,renderPopover:x,showMoreEventsInPopover:m=!1}){const[y,c]=a.useState(null),j=a.useMemo(()=>N.generateMonthGrid(s,n),[s,n]),k=a.useMemo(()=>{const f=new Map;for(const T of j){const w=T.date.toDateString(),W=N.getEventsForDay(t,T.date);W.sort((I,O)=>I.startDate.getTime()-O.startDate.getTime()),f.set(w,W)}return f},[j,t]),b=N.useOptionalSlotSelection(),z=a.useCallback(f=>{b?.startSelection(f)},[b]),L=a.useCallback(f=>{b?.updateSelection(f)},[b]),S=a.useCallback(()=>{b?.endSelection()},[b]),C=a.useCallback(f=>{l?.(f)},[l]),$=n===0?Rt:$t;return e.jsx("div",{className:u.cn("flex flex-col h-full overflow-hidden",g),children:e.jsx("div",{className:"flex flex-col flex-1 overflow-auto",children:e.jsxs("div",{className:"flex flex-col flex-1 min-w-[560px] sm:min-w-0",children:[e.jsx("div",{className:"grid grid-cols-7 border-b !sticky !top-0 bg-background z-10",children:$.map((f,T)=>e.jsxs("div",{className:u.cn("py-2 sm:py-2.5 text-center text-[11px] uppercase font-medium tracking-wide text-muted-foreground",T>=5&&"text-muted-foreground/70"),children:[e.jsx("span",{className:"sm:hidden",children:f.short}),e.jsx("span",{className:"hidden sm:inline",children:f.short})]},f.full))}),e.jsx("div",{className:"grid grid-cols-7 auto-rows-min",children:j.map(f=>{const T=f.date.toDateString(),w=k.get(T)||[],W=N.isToday(f.date),I=f.date.getDay()===0||f.date.getDay()===6,O=w.length>xe;return e.jsxs(Fe,{date:f.date,onSelectionStart:z,onSelectionMove:L,onSelectionEnd:S,isSelected:b?.isSlotSelected({date:f.date})??!1,isSelecting:b?.isSelecting??!1,className:u.cn("relative flex flex-col border-r border-b text-left min-h-[80px] sm:min-h-[100px] overflow-hidden","[&:nth-child(7n)]:border-r-0",!f.isCurrentMonth&&"bg-muted/20",I&&f.isCurrentMonth&&"bg-muted/10"),ariaLabel:`${f.date.toLocaleDateString()} - ${w.length} events. Click to create event, double-click to view day.`,children:[e.jsx("div",{className:u.cn("flex items-center justify-center p-1",!f.isCurrentMonth&&"text-muted-foreground/40"),children:e.jsx("button",{type:"button",onClick:p=>{p.stopPropagation(),C(f.date)},className:u.cn("flex items-center justify-center rounded-full transition-colors","size-7 text-sm font-normal",W?"bg-primary text-primary-foreground":"hover:bg-muted"),children:f.date.getDate()})}),e.jsxs("div",{className:"flex-1 overflow-hidden px-2 pt-1 pb-1 space-y-1",children:[w.slice(0,xe).map(p=>e.jsx("div",{onPointerDown:d=>{d.stopPropagation()},children:D?D({event:p,variant:"compact"}):e.jsx(ge,{event:p,variant:"compact",badgeVariant:r,onClick:i,disablePopover:!!i&&!x,renderPopover:x,showTime:!1,enableDrag:!0})},p.id)),O&&(m?e.jsxs(Z,{open:y===T,onOpenChange:p=>c(p?T:null),children:[e.jsx(Q,{asChild:!0,children:e.jsxs("button",{type:"button",onPointerDown:p=>p.stopPropagation(),onClick:p=>{p.stopPropagation(),c(T)},className:"w-full text-left text-xs text-muted-foreground hover:text-foreground hover:underline px-1.5 cursor-pointer",children:["+",w.length-xe," more"]})}),e.jsxs(Y,{align:"start",side:"right",sideOffset:8,className:"w-72 max-h-80 overflow-y-auto p-2",onPointerDown:p=>p.stopPropagation(),children:[e.jsxs("div",{className:"flex items-center justify-between mb-2 pb-2 border-b",children:[e.jsx("span",{className:"text-sm font-medium",children:f.date.toLocaleDateString(void 0,{weekday:"short",month:"short",day:"numeric"})}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:[w.length," events"]})]}),e.jsx("div",{className:"space-y-1.5",children:w.map(p=>e.jsx("div",{children:D?D({event:p,variant:"compact"}):e.jsx(ge,{event:p,variant:"compact",badgeVariant:r,onClick:d=>{c(null),i?.(d)},disablePopover:!!i&&!x,renderPopover:x,showTime:!0})},p.id))})]})]}):e.jsxs("div",{onPointerDown:p=>{p.stopPropagation(),C(f.date)},className:"w-full text-left text-xs text-muted-foreground hover:text-foreground hover:underline px-1.5 cursor-pointer",children:["+",w.length-xe," more"]}))]})]},T)})})]})})})}function Pt({events:t,date:s,daysAhead:n=60,badgeVariant:r="colored",onEventClick:i,className:h,renderEvent:l,renderPopover:g}){const D=a.useMemo(()=>{const m=new Date(s);m.setHours(0,0,0,0);const y=new Date(m);return y.setDate(y.getDate()+n),t.filter(c=>c.endDate>=m&&c.startDate<=y)},[t,n,s]),x=a.useMemo(()=>{const m=N.groupEventsByDate(D),y=[];for(const[c,j]of m)y.push({date:new Date(c),dateKey:c,events:j});return y.sort((c,j)=>c.date.getTime()-j.date.getTime()),y},[D]);return x.length===0?e.jsx("div",{className:u.cn("flex flex-col items-center justify-center h-full py-12",h),children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-muted-foreground",children:"No events found"}),e.jsx("p",{className:"text-sm text-muted-foreground/70",children:"No events scheduled for this period"})]})}):e.jsxs("div",{className:u.cn("flex flex-col h-full overflow-auto",h),children:[e.jsx("div",{className:"sticky top-0 z-10 bg-background border-b px-4 py-3",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h2",{className:"text-lg font-medium",children:"Schedule"}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:[D.length," event",D.length!==1?"s":""]})]})}),e.jsx("div",{className:"flex-1",children:x.map(({date:m,dateKey:y,events:c})=>{const j=N.isToday(m),k=m.toLocaleDateString([],{weekday:"short"}),b=m.getDate(),z=m.toLocaleDateString([],{month:"short"});return e.jsxs("div",{className:"",children:[e.jsx("div",{className:u.cn("sticky top-[52px] z-10 bg-background px-4 py-3 border-b"),children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"flex flex-col items-center min-w-[40px]",children:[e.jsx("span",{className:u.cn("text-[11px] font-medium uppercase tracking-wide",j?"text-primary":"text-muted-foreground"),children:k}),e.jsx("span",{className:u.cn("flex items-center justify-center rounded-full mt-0.5","size-10 text-xl font-normal",j?"bg-primary text-primary-foreground":"text-foreground"),children:b})]}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:[z," ",m.getFullYear()]})]})}),e.jsx("div",{className:"px-4 py-3 space-y-2 border-b last:border-b-0",children:c.map(L=>l?e.jsx("div",{children:l({event:L,variant:"full"})},L.id):e.jsx(ge,{event:L,variant:"full",badgeVariant:r,onClick:i,disablePopover:!!i&&!g,renderPopover:g,showTime:!0,showDescription:!0,showParticipants:!0},L.id))})]},y)})})]})}exports.AgendaView=Pt;exports.Badge=Oe;exports.Button=se;exports.CalendarHeader=Dt;exports.DateNavigator=Be;exports.DaySlot=Fe;exports.DayView=Wt;exports.DropdownMenu=we;exports.DropdownMenuContent=he;exports.DropdownMenuItem=fe;exports.DropdownMenuTrigger=ve;exports.EventBlock=De;exports.EventCard=ge;exports.MonthView=At;exports.MultiDayBanner=Ce;exports.MultiDayEventBar=zt;exports.Popover=Z;exports.PopoverAnchor=xt;exports.PopoverContent=Y;exports.PopoverTrigger=Q;exports.TimeSlot=Me;exports.TodayButton=Ie;exports.Tooltip=ee;exports.TooltipContent=J;exports.TooltipProvider=Ct;exports.TooltipTrigger=te;exports.WeekView=_t;exports.buttonVariants=Ae;exports.getEventColorClasses=ae;
11
+ //# sourceMappingURL=agenda-view-CVYk83hH.cjs.map