{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "calendar",
  "title": "Calendar",
  "description": "An inline month calendar for picking one day, a range or several days, with event dots under their days, an agenda for the selected day, months that slide in from the side they come from, a month picker, week numbers and full keyboard control.",
  "dependencies": [
    "motion",
    "clsx",
    "tailwind-merge"
  ],
  "files": [
    {
      "path": "registry/new-york/calendar/calendar.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\nimport { motion, AnimatePresence, useReducedMotion } from \"motion/react\";\nimport { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nfunction cn(...inputs: ClassValue[]) {\n  return twMerge(clsx(inputs));\n}\n\nexport interface CalendarRange {\n  from?: Date;\n  to?: Date;\n}\n\nexport interface CalendarEvent {\n  date: Date;\n  title: string;\n  /** Shown before the title in the agenda, e.g. \"09:30\". */\n  time?: string;\n  /** Dot and bar colour. Defaults to the text colour. */\n  color?: string;\n}\n\nexport type CalendarSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface CalendarProps {\n  /** single: one day. range: a start and end day. multiple: any set of days. */\n  mode?: \"single\" | \"range\" | \"multiple\";\n  value?: Date | null;\n  defaultValue?: Date | null;\n  onValueChange?: (value: Date | null) => void;\n  range?: CalendarRange;\n  defaultRange?: CalendarRange;\n  onRangeChange?: (range: CalendarRange) => void;\n  dates?: Date[];\n  defaultDates?: Date[];\n  onDatesChange?: (dates: Date[]) => void;\n  /** The month on show (any day in it). */\n  month?: Date;\n  defaultMonth?: Date;\n  onMonthChange?: (month: Date) => void;\n  /** Dots under their days, and a list of the selected day's events when showAgenda is on. */\n  events?: CalendarEvent[];\n  showAgenda?: boolean;\n  minDate?: Date;\n  maxDate?: Date;\n  isDateDisabled?: (date: Date) => boolean;\n  weekStartsOn?: 0 | 1;\n  locale?: string;\n  showWeekNumbers?: boolean;\n  showOutsideDays?: boolean;\n  /** A \"Today\" button in the header that jumps back to the current month. */\n  showTodayButton?: boolean;\n  size?: CalendarSize;\n  theme?: \"dark\" | \"light\";\n  className?: string;\n}\n\nconst PALETTES = {\n  dark: { text: \"#F5F4F1\", muted: \"rgba(245,244,241,0.5)\", faint: \"rgba(245,244,241,0.26)\", panel: \"#0E0E0E\", border: \"rgba(255,255,255,0.1)\", hover: \"rgba(255,255,255,0.07)\", band: \"rgba(255,255,255,0.09)\", sel: \"#F5F4F1\", selText: \"#0A0A0A\", focus: \"rgba(245,244,241,0.85)\", line: \"rgba(255,255,255,0.08)\" },\n  light: { text: \"#0A0A0A\", muted: \"rgba(10,10,10,0.5)\", faint: \"rgba(10,10,10,0.26)\", panel: \"#FFFFFF\", border: \"rgba(10,10,10,0.12)\", hover: \"rgba(10,10,10,0.05)\", band: \"rgba(10,10,10,0.07)\", sel: \"#0A0A0A\", selText: \"#FFFFFF\", focus: \"rgba(10,10,10,0.85)\", line: \"rgba(10,10,10,0.08)\" },\n};\n\nconst SIZES: Record<CalendarSize, { cell: number; font: number; small: number; pad: number; radius: number }> = {\n  sm: { cell: 34, font: 13, small: 11.5, pad: 12, radius: 14 },\n  md: { cell: 40, font: 14, small: 12, pad: 14, radius: 16 },\n  lg: { cell: 46, font: 15.5, small: 13, pad: 16, radius: 18 },\n};\n\n/* ---------------------------------------------------------------- date helpers (local time) */\n\nconst startOfDay = (d: Date) => new Date(d.getFullYear(), d.getMonth(), d.getDate());\nconst startOfMonth = (d: Date) => new Date(d.getFullYear(), d.getMonth(), 1);\nconst addDays = (d: Date, n: number) => new Date(d.getFullYear(), d.getMonth(), d.getDate() + n);\nconst addMonths = (d: Date, n: number) => new Date(d.getFullYear(), d.getMonth() + n, 1);\nconst key = (d: Date) => `${d.getFullYear()}-${d.getMonth() + 1}-${d.getDate()}`;\nconst same = (a?: Date | null, b?: Date | null) => Boolean(a && b && key(a) === key(b));\nconst cmp = (a: Date, b: Date) => startOfDay(a).getTime() - startOfDay(b).getTime();\nconst startOfWeek = (d: Date, ws: 0 | 1) => addDays(d, -((d.getDay() - ws + 7) % 7));\nfunction isoWeek(d: Date) {\n  const t = new Date(Date.UTC(d.getFullYear(), d.getMonth(), d.getDate()));\n  const day = t.getUTCDay() || 7;\n  t.setUTCDate(t.getUTCDate() + 4 - day);\n  const yearStart = new Date(Date.UTC(t.getUTCFullYear(), 0, 1));\n  return Math.ceil(((t.getTime() - yearStart.getTime()) / 86400000 + 1) / 7);\n}\n\n// \"Today\" only exists on the client (the server's clock and time zone can differ), so it's read\n// through an external store that reports null during server rendering.\nconst noop = () => () => {};\nconst useTodayKey = () => React.useSyncExternalStore(noop, () => key(new Date()), () => null);\n\nexport function Calendar({\n  mode = \"single\",\n  value,\n  defaultValue = null,\n  onValueChange,\n  range,\n  defaultRange = {},\n  onRangeChange,\n  dates,\n  defaultDates = [],\n  onDatesChange,\n  month,\n  defaultMonth,\n  onMonthChange,\n  events = [],\n  showAgenda = false,\n  minDate,\n  maxDate,\n  isDateDisabled,\n  weekStartsOn = 1,\n  locale = \"en-US\",\n  showWeekNumbers = false,\n  showOutsideDays = true,\n  showTodayButton = true,\n  size = \"md\",\n  theme = \"dark\",\n  className,\n}: CalendarProps) {\n  const p = PALETTES[theme];\n  const s = SIZES[size];\n  const uid = React.useId();\n  const reduce = Boolean(useReducedMotion());\n  const todayKey = useTodayKey();\n  const today = React.useMemo(() => {\n    if (!todayKey) return null;\n    const [y, m, d] = todayKey.split(\"-\").map(Number);\n    return new Date(y, m - 1, d);\n  }, [todayKey]);\n\n  const [single, setSingle] = React.useState<Date | null>(defaultValue);\n  const [rng, setRng] = React.useState<CalendarRange>(defaultRange);\n  const [multi, setMulti] = React.useState<Date[]>(defaultDates);\n  const selValue = value !== undefined ? value : single;\n  const selRange = range ?? rng;\n  const selDates = dates ?? multi;\n\n  const [viewState, setViewState] = React.useState<Date | null>(() => {\n    const seed = month ?? defaultMonth ?? selValue ?? selRange.from ?? selDates[0];\n    return seed ? startOfMonth(seed) : null;\n  });\n  const view = month ? startOfMonth(month) : (viewState ?? (today ? startOfMonth(today) : null));\n  const [dir, setDir] = React.useState(0);\n  const [panel, setPanel] = React.useState<\"days\" | \"months\">(\"days\");\n  const [focusKey, setFocusKey] = React.useState<string | null>(null);\n  const [hoverDay, setHoverDay] = React.useState<Date | null>(null);\n  const gridRef = React.useRef<HTMLDivElement>(null);\n  const wantFocus = React.useRef(false);\n\n  const goMonth = (next: Date) => {\n    if (!view) return;\n    const m = startOfMonth(next);\n    setDir(cmp(m, view) > 0 ? 1 : -1);\n    if (!month) setViewState(m);\n    onMonthChange?.(m);\n  };\n\n  const disabled = (d: Date) => Boolean((minDate && cmp(d, minDate) < 0) || (maxDate && cmp(d, maxDate) > 0) || isDateDisabled?.(d));\n\n  const select = (d: Date) => {\n    if (disabled(d)) return;\n    if (mode === \"single\") {\n      const next = same(selValue, d) ? null : d;\n      if (value === undefined) setSingle(next);\n      onValueChange?.(next);\n    } else if (mode === \"range\") {\n      let next: CalendarRange;\n      if (!selRange.from || selRange.to) next = { from: d, to: undefined };\n      else if (cmp(d, selRange.from) < 0) next = { from: d, to: selRange.from };\n      else next = { from: selRange.from, to: d };\n      if (!range) setRng(next);\n      onRangeChange?.(next);\n    } else {\n      const has = selDates.some((x) => same(x, d));\n      const next = has ? selDates.filter((x) => !same(x, d)) : [...selDates, d].sort(cmp);\n      if (!dates) setMulti(next);\n      onDatesChange?.(next);\n    }\n    if (d.getMonth() !== view?.getMonth()) goMonth(d);\n  };\n\n  // Keep keyboard focus on the day it moved to, even after the month changes underneath it.\n  React.useEffect(() => {\n    if (!wantFocus.current || !focusKey) return;\n    wantFocus.current = false;\n    gridRef.current?.querySelector<HTMLButtonElement>(`[data-day=\"${focusKey}\"]`)?.focus();\n  });\n\n  const eventsByDay = React.useMemo(() => {\n    const m = new Map<string, CalendarEvent[]>();\n    events.forEach((e) => m.set(key(e.date), [...(m.get(key(e.date)) ?? []), e]));\n    return m;\n  }, [events]);\n\n  const fmt = React.useMemo(\n    () => ({\n      title: new Intl.DateTimeFormat(locale, { month: \"long\", year: \"numeric\" }),\n      monthShort: new Intl.DateTimeFormat(locale, { month: \"short\" }),\n      weekday: new Intl.DateTimeFormat(locale, { weekday: \"short\" }),\n      label: new Intl.DateTimeFormat(locale, { weekday: \"long\", month: \"long\", day: \"numeric\", year: \"numeric\" }),\n      agenda: new Intl.DateTimeFormat(locale, { weekday: \"long\", day: \"numeric\", month: \"long\" }),\n    }),\n    [locale],\n  );\n\n  const width = s.cell * 7 + (showWeekNumbers ? s.cell * 0.8 : 0) + s.pad * 2;\n  const panelStyle: React.CSSProperties = { width, maxWidth: \"100%\", padding: s.pad, borderRadius: s.radius, background: p.panel, border: `1px solid ${p.border}`, fontFamily: \"Inter, sans-serif\", color: p.text };\n\n  // Nothing to anchor the month on during server rendering: keep the space, fill it on the client.\n  if (!view) return <div className={cn(\"flex flex-col\", className)} style={{ ...panelStyle, height: s.cell * 7 + s.pad * 2 + 44 }} aria-busy=\"true\" />;\n\n  const gridStart = startOfWeek(view, weekStartsOn);\n  const days = Array.from({ length: 42 }, (_, i) => addDays(gridStart, i));\n  const weekdays = Array.from({ length: 7 }, (_, i) => fmt.weekday.format(addDays(new Date(2024, 0, 7 + weekStartsOn), i)).slice(0, 2));\n\n  const focusable = focusKey && days.some((d) => key(d) === focusKey && d.getMonth() === view.getMonth()) ? focusKey : key(selValue && selValue.getMonth() === view.getMonth() ? selValue : today && today.getMonth() === view.getMonth() && today.getFullYear() === view.getFullYear() ? today : view);\n\n  const moveFocus = (from: Date, delta: number, unit: \"day\" | \"month\" = \"day\") => {\n    const next = unit === \"day\" ? addDays(from, delta) : new Date(from.getFullYear(), from.getMonth() + delta, Math.min(from.getDate(), 28));\n    wantFocus.current = true;\n    setFocusKey(key(next));\n    if (next.getMonth() !== view.getMonth() || next.getFullYear() !== view.getFullYear()) goMonth(next);\n  };\n\n  const onKey = (e: React.KeyboardEvent, d: Date) => {\n    const map: Record<string, () => void> = {\n      ArrowLeft: () => moveFocus(d, -1),\n      ArrowRight: () => moveFocus(d, 1),\n      ArrowUp: () => moveFocus(d, -7),\n      ArrowDown: () => moveFocus(d, 7),\n      Home: () => moveFocus(d, -((d.getDay() - weekStartsOn + 7) % 7)),\n      End: () => moveFocus(d, 6 - ((d.getDay() - weekStartsOn + 7) % 7)),\n      PageUp: () => moveFocus(d, -1, \"month\"),\n      PageDown: () => moveFocus(d, 1, \"month\"),\n    };\n    if (map[e.key]) {\n      e.preventDefault();\n      map[e.key]();\n    }\n  };\n\n  const inRange = (d: Date) => {\n    const end = selRange.to ?? (selRange.from && hoverDay ? hoverDay : undefined);\n    if (!selRange.from || !end) return false;\n    const [a, b] = cmp(selRange.from, end) <= 0 ? [selRange.from, end] : [end, selRange.from];\n    return cmp(d, a) >= 0 && cmp(d, b) <= 0;\n  };\n  const isSelected = (d: Date) => (mode === \"single\" ? same(selValue, d) : mode === \"range\" ? same(selRange.from, d) || same(selRange.to, d) : selDates.some((x) => same(x, d)));\n\n  const agendaDay = mode === \"single\" ? selValue : mode === \"range\" ? (selRange.to ?? selRange.from) : selDates[selDates.length - 1];\n  const agenda = agendaDay ? (eventsByDay.get(key(agendaDay)) ?? []) : [];\n\n  const iconBtn = (label: string, onClick: () => void, d: string) => (\n    <button type=\"button\" aria-label={label} onClick={onClick} className=\"flex shrink-0 cursor-pointer items-center justify-center rounded-lg border-none bg-transparent outline-none focus-visible:ring-2\" style={{ width: 30, height: 30, color: p.muted, [\"--tw-ring-color\" as string]: p.focus }} onMouseEnter={(e) => (e.currentTarget.style.background = p.hover)} onMouseLeave={(e) => (e.currentTarget.style.background = \"transparent\")}>\n      <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n        <path d={d} />\n      </svg>\n    </button>\n  );\n\n  // Months slide in from the side they come from (just fade with reduced motion).\n  const shift = reduce ? 0 : 28;\n  const slide = {\n    enter: (d: number) => ({ opacity: 0, x: d * shift }),\n    center: { opacity: 1, x: 0 },\n    exit: (d: number) => ({ opacity: 0, x: d * -shift }),\n  };\n\n  return (\n    <div className={cn(\"flex flex-col overflow-hidden\", className)} style={panelStyle}>\n      {/* Header: month title (opens the month picker), prev / next, Today */}\n      <div className=\"flex items-center\" style={{ gap: 4, marginBottom: 10 }}>\n        <button\n          type=\"button\"\n          onClick={() => setPanel((v) => (v === \"days\" ? \"months\" : \"days\"))}\n          aria-expanded={panel === \"months\"}\n          className=\"flex min-w-0 cursor-pointer items-center rounded-lg border-none bg-transparent font-semibold tracking-[-0.01em] whitespace-nowrap outline-none focus-visible:ring-2\"\n          style={{ gap: 6, height: 30, padding: \"0 8px\", marginLeft: -8, fontSize: s.font + 1, color: p.text, [\"--tw-ring-color\" as string]: p.focus }}\n        >\n          <span aria-live=\"polite\" className=\"truncate\">{panel === \"days\" ? fmt.title.format(view) : view.getFullYear()}</span>\n          <motion.svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke={p.muted} strokeWidth=\"2.2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\" animate={{ rotate: panel === \"months\" ? 180 : 0 }} transition={{ duration: 0.2 }}>\n            <path d=\"m6 9 6 6 6-6\" />\n          </motion.svg>\n        </button>\n        <span className=\"flex-1\" />\n        {showTodayButton && today && (\n          <button\n            type=\"button\"\n            onClick={() => {\n              setPanel(\"days\");\n              goMonth(today);\n            }}\n            className=\"shrink-0 cursor-pointer rounded-lg bg-transparent font-medium outline-none focus-visible:ring-2\"\n            style={{ height: 28, padding: \"0 10px\", marginRight: 4, fontSize: s.small, color: p.text, border: `1px solid ${p.border}`, [\"--tw-ring-color\" as string]: p.focus }}\n          >\n            Today\n          </button>\n        )}\n        {iconBtn(panel === \"days\" ? \"Previous month\" : \"Previous year\", () => goMonth(panel === \"days\" ? addMonths(view, -1) : addMonths(view, -12)), \"m15 6-6 6 6 6\")}\n        {iconBtn(panel === \"days\" ? \"Next month\" : \"Next year\", () => goMonth(panel === \"days\" ? addMonths(view, 1) : addMonths(view, 12)), \"m9 6 6 6-6 6\")}\n      </div>\n\n      <div className=\"relative\" style={{ height: s.cell * 7 }}>\n        <AnimatePresence initial={false} mode=\"popLayout\" custom={dir}>\n          {panel === \"months\" ? (\n            <motion.div key=\"months\" className=\"grid grid-cols-3\" style={{ gap: 6, height: \"100%\" }} initial={{ opacity: 0, scale: 0.97 }} animate={{ opacity: 1, scale: 1 }} exit={{ opacity: 0, scale: 0.97 }} transition={{ duration: 0.18 }}>\n              {Array.from({ length: 12 }, (_, i) => new Date(view.getFullYear(), i, 1)).map((m) => {\n                const on = m.getMonth() === view.getMonth();\n                return (\n                  <button\n                    key={m.getMonth()}\n                    type=\"button\"\n                    onClick={() => {\n                      goMonth(m);\n                      setPanel(\"days\");\n                    }}\n                    className=\"cursor-pointer rounded-xl border-none font-medium outline-none focus-visible:ring-2\"\n                    style={{ fontSize: s.font, background: on ? p.sel : \"transparent\", color: on ? p.selText : p.text, [\"--tw-ring-color\" as string]: p.focus }}\n                    onMouseEnter={(e) => !on && (e.currentTarget.style.background = p.hover)}\n                    onMouseLeave={(e) => !on && (e.currentTarget.style.background = \"transparent\")}\n                  >\n                    {fmt.monthShort.format(m)}\n                  </button>\n                );\n              })}\n            </motion.div>\n          ) : (\n            <motion.div key={key(view)} custom={dir} variants={slide} initial=\"enter\" animate=\"center\" exit=\"exit\" transition={{ duration: reduce ? 0.12 : 0.26, ease: [0.22, 1, 0.36, 1] }} className=\"absolute inset-0\">\n              <div role=\"grid\" aria-label={fmt.title.format(view)} ref={gridRef} onMouseLeave={() => setHoverDay(null)}>\n                <div role=\"row\" className=\"flex\">\n                  {showWeekNumbers && <span aria-hidden=\"true\" style={{ width: s.cell * 0.8 }} />}\n                  {weekdays.map((w) => (\n                    <span key={w} role=\"columnheader\" className=\"flex items-center justify-center font-medium\" style={{ width: s.cell, height: s.cell * 0.8, fontSize: s.small, color: p.muted }}>\n                      {w}\n                    </span>\n                  ))}\n                </div>\n                {Array.from({ length: 6 }, (_, row) => (\n                  <div key={row} role=\"row\" className=\"flex\">\n                    {showWeekNumbers && (\n                      <span aria-hidden=\"true\" className=\"flex items-center justify-center tabular-nums\" style={{ width: s.cell * 0.8, height: s.cell, fontSize: s.small - 1, color: p.faint }}>\n                        {isoWeek(days[row * 7 + (weekStartsOn === 1 ? 0 : 1)])}\n                      </span>\n                    )}\n                    {days.slice(row * 7, row * 7 + 7).map((d, col) => {\n                      const k = key(d);\n                      const outside = d.getMonth() !== view.getMonth();\n                      if (outside && !showOutsideDays) return <span key={k} role=\"gridcell\" style={{ width: s.cell, height: s.cell }} />;\n                      const off = disabled(d);\n                      const sel = isSelected(d);\n                      const band = mode === \"range\" && inRange(d);\n                      const isToday = Boolean(today && same(today, d));\n                      const dayEvents = eventsByDay.get(k) ?? [];\n                      const bandStart = band && (col === 0 || !inRange(addDays(d, -1)));\n                      const bandEnd = band && (col === 6 || !inRange(addDays(d, 1)));\n                      return (\n                        <div key={k} role=\"gridcell\" aria-selected={sel} className=\"relative\" style={{ width: s.cell, height: s.cell }}>\n                          {band && <span aria-hidden=\"true\" className=\"absolute\" style={{ inset: \"3px 0\", background: p.band, borderRadius: `${bandStart ? 999 : 0}px ${bandEnd ? 999 : 0}px ${bandEnd ? 999 : 0}px ${bandStart ? 999 : 0}px` }} />}\n                          <button\n                            type=\"button\"\n                            data-day={k}\n                            tabIndex={k === focusable ? 0 : -1}\n                            disabled={off}\n                            aria-label={`${fmt.label.format(d)}${dayEvents.length ? `, ${dayEvents.length} event${dayEvents.length > 1 ? \"s\" : \"\"}` : \"\"}`}\n                            aria-current={isToday ? \"date\" : undefined}\n                            onClick={() => {\n                              setFocusKey(k);\n                              select(d);\n                            }}\n                            onKeyDown={(e) => onKey(e, d)}\n                            onMouseEnter={() => mode === \"range\" && setHoverDay(d)}\n                            className=\"group absolute inset-[3px] flex cursor-pointer flex-col items-center justify-center rounded-full border-none bg-transparent tabular-nums outline-none focus-visible:ring-2 disabled:cursor-not-allowed\"\n                            style={{ fontSize: s.font, color: sel ? p.selText : outside ? p.faint : p.text, fontWeight: isToday || sel ? 600 : 450, opacity: off ? 0.35 : 1, textDecoration: off ? \"line-through\" : undefined, [\"--tw-ring-color\" as string]: p.focus }}\n                          >\n                            {sel && (\n                              <motion.span\n                                aria-hidden=\"true\"\n                                layoutId={mode === \"single\" ? `${uid}-sel` : undefined}\n                                className=\"absolute inset-0 rounded-full\"\n                                style={{ background: p.sel }}\n                                initial={mode === \"single\" ? false : { scale: 0.6, opacity: 0 }}\n                                animate={{ scale: 1, opacity: 1 }}\n                                transition={reduce ? { duration: 0 } : { type: \"spring\", stiffness: 500, damping: 36 }}\n                              />\n                            )}\n                            {!sel && !off && <span aria-hidden=\"true\" className=\"absolute inset-0 rounded-full opacity-0 transition-opacity duration-150 group-hover:opacity-100\" style={{ background: p.hover }} />}\n                            <span className=\"relative leading-none\">{d.getDate()}</span>\n                            {(isToday || dayEvents.length > 0) && (\n                              <span aria-hidden=\"true\" className=\"relative flex\" style={{ gap: 2, marginTop: 3, height: 4 }}>\n                                {dayEvents.length > 0\n                                  ? dayEvents.slice(0, 3).map((ev, i) => <span key={i} className=\"block rounded-full\" style={{ width: 4, height: 4, background: sel ? p.selText : (ev.color ?? p.muted) }} />)\n                                  : <span className=\"block rounded-full\" style={{ width: 12, height: 2, marginTop: 1, background: sel ? p.selText : p.text }} />}\n                              </span>\n                            )}\n                          </button>\n                        </div>\n                      );\n                    })}\n                  </div>\n                ))}\n              </div>\n            </motion.div>\n          )}\n        </AnimatePresence>\n      </div>\n\n      {showAgenda && (\n        <div style={{ borderTop: `1px solid ${p.line}`, marginTop: 8, paddingTop: 12 }}>\n          <div className=\"font-semibold\" style={{ fontSize: s.small, color: p.muted, marginBottom: 8 }}>\n            {agendaDay ? fmt.agenda.format(agendaDay) : \"Pick a day\"}\n          </div>\n          <AnimatePresence mode=\"wait\" initial={false}>\n            <motion.ul key={agendaDay ? key(agendaDay) : \"none\"} className=\"m-0 flex list-none flex-col p-0\" style={{ gap: 6, minHeight: Math.round((s.font + 7) * 3 + 12) }} initial={{ opacity: 0, y: 4 }} animate={{ opacity: 1, y: 0 }} exit={{ opacity: 0 }} transition={{ duration: 0.12 }}>\n              {agenda.length === 0 ? (\n                <li style={{ fontSize: s.font - 0.5, color: p.faint }}>{agendaDay ? \"Nothing scheduled\" : \"Events for the selected day show here\"}</li>\n              ) : (\n                agenda.map((ev, i) => (\n                  <li key={i} className=\"flex items-center\" style={{ gap: 10, fontSize: s.font - 0.5 }}>\n                    <span aria-hidden=\"true\" className=\"block shrink-0 rounded-full\" style={{ width: 3, height: 18, background: ev.color ?? p.text }} />\n                    {ev.time && (\n                      <span className=\"shrink-0 tabular-nums\" style={{ color: p.muted, width: 42 }}>\n                        {ev.time}\n                      </span>\n                    )}\n                    <span className=\"min-w-0 truncate\">{ev.title}</span>\n                  </li>\n                ))\n              )}\n            </motion.ul>\n          </AnimatePresence>\n        </div>\n      )}\n    </div>\n  );\n}\n\nexport default Calendar;\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:component"
}