{"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/components/calendar.cjs","../../src/components/calendar.tsx"],"names":[],"mappings":"AAAA,qFAAY;AACZ,YAAY;AACZ;AACE;AACA;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACA;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B;AACA;ACPA,uCAAA,CAAA;AACA,4CAAA,CAAA;AAJA,2CAAkE;AAClE,kDAA0B;AA6EoB,+CAAA;AAzD9C,SAAS,QAAA,CAAS;AAAA,EAChB,SAAA;AAAA,EACA,UAAA;AAAA,EACA,gBAAA,EAAkB,IAAA;AAAA,EAClB,GAAG;AACL,CAAA,EAAkB;AAChB,EAAA,uBACE,6BAAA;AAAA,IAAC,yBAAA;AAAA,IAAA;AAAA,MACC,eAAA;AAAA,MACA,SAAA,EAAW,kCAAA,KAAG,EAAO,SAAS,CAAA;AAAA,MAC9B,UAAA,EAAY;AAAA,QACV,MAAA,EAAQ,mEAAA;AAAA,QACR,KAAA,EAAO,6CAAA;AAAA,QACP,GAAA,EAAK,qEAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAOL,eAAA,EAAiB,kCAAA;AAAA,UACf,8CAAA,EAAiB,OAAA,EAAS,SAAA,EAAW,IAAA,EAAM,UAAU,CAAC,CAAA;AAAA,UACtD;AAAA,QACF,CAAA;AAAA,QACA,WAAA,EAAa,kCAAA;AAAA,UACX,8CAAA,EAAiB,OAAA,EAAS,SAAA,EAAW,IAAA,EAAM,UAAU,CAAC,CAAA;AAAA,UACtD;AAAA,QACF,CAAA;AAAA,QACA,aAAA,EAAe,sCAAA;AAAA,QACf,aAAA,EAAe,+BAAA;AAAA,QACf,UAAA,EAAY,oCAAA;AAAA,QACZ,QAAA,EAAU,EAAA;AAAA,QACV,OAAA,EAAS,kFAAA;AAAA,QACT,IAAA,EAAM,EAAA;AAAA,QACN,GAAA,EAAK,sCAAA;AAAA;AAAA;AAAA,QAGL,UAAA,EAAY,kCAAA;AAAA,UACV,8CAAA,EAAiB,OAAA,EAAS,aAAA,EAAe,IAAA,EAAM,UAAU,CAAC,CAAA;AAAA,UAC1D;AAAA,QACF,CAAA;AAAA,QACA,QAAA,EACE,4FAAA;AAAA,QACF,KAAA,EAAO,8EAAA;AAAA,QACP,OAAA,EAAS,sDAAA;AAAA;AAAA;AAAA;AAAA,QAIT,QAAA,EACE,yGAAA;AAAA,QACF,MAAA,EAAQ,WAAA;AAAA,QACR,GAAG;AAAA,MACL,CAAA;AAAA,MACA,UAAA,EAAY;AAAA;AAAA,QAEV,OAAA,EAAS,CAAC,EAAE,WAAA,EAAa,SAAA,EAAW,iBAAiB,CAAA,EAAA,GAAM;AACzD,UAAA,MAAM,IAAA,EAAM,kCAAA,SAAG,EAAW,gBAAgB,CAAA;AAC1C,UAAA,GAAA,CAAI,YAAA,IAAgB,OAAA,EAAS,uBAAO,6BAAA,yBAAC,EAAA,EAAa,SAAA,EAAW,IAAA,CAAK,CAAA;AAClE,UAAA,GAAA,CAAI,YAAA,IAAgB,IAAA,EAAM,uBAAO,6BAAA,sBAAC,EAAA,EAAU,SAAA,EAAW,IAAA,CAAK,CAAA;AAC5D,UAAA,GAAA,CAAI,YAAA,IAAgB,MAAA,EAAQ,uBAAO,6BAAA,wBAAC,EAAA,EAAY,SAAA,EAAW,IAAA,CAAK,CAAA;AAChE,UAAA,uBAAO,6BAAA,wBAAC,EAAA,EAAY,SAAA,EAAW,IAAA,CAAK,CAAA;AAAA,QACtC;AAAA,MACF,CAAA;AAAA,MACC,GAAG;AAAA,IAAA;AAAA,EACN,CAAA;AAEJ;AACA,QAAA,CAAS,YAAA,EAAc,UAAA;ADLvB;AACE;AACF,4BAAC","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/components/calendar.cjs","sourcesContent":[null,"\"use client\"\n\nimport * as React from \"react\"\nimport { ChevronDown, ChevronLeft, ChevronRight, ChevronUp } from \"lucide-react\"\nimport { DayPicker } from \"react-day-picker\"\n\nimport { cn } from \"../utils/cn\"\nimport { buttonVariants } from \"./ui/button\"\n\nexport type CalendarProps = React.ComponentProps<typeof DayPicker>\n\n/**\n * ODS-styled DayPicker wrapper.\n *\n * IMPORTANT: the installed react-day-picker is **v9** — the classNames keys\n * below are the v9 vocabulary (`weekdays`/`weekday`/`week`/`day`/`day_button`/\n * `selected`/`disabled`/…). The previous v8 shadcn map (`head_row`, `cell`,\n * `day_selected`, …) was silently IGNORED by v9, which shipped default\n * browser-table chrome: misaligned weekday headers, no disabled styling,\n * wrapping rows on mobile. Do not reintroduce v8 keys.\n *\n * Day-cell display stays `table-cell` (only the inner `day_button` is\n * flex) — converting `<td>`s to inline-flex is what made rows wrap.\n */\nfunction Calendar({\n  className,\n  classNames,\n  showOutsideDays = true,\n  ...props\n}: CalendarProps) {\n  return (\n    <DayPicker\n      showOutsideDays={showOutsideDays}\n      className={cn(\"p-3\", className)}\n      classNames={{\n        months: \"relative flex flex-col md:flex-row gap-[var(--spacing-system-mf)]\",\n        month: \"flex flex-col gap-[var(--spacing-system-s)]\",\n        nav: \"absolute inset-x-0 top-0 z-10 flex h-8 items-center justify-between\",\n        // size 'icon-sm' = the lib's fixed 32px icon button (no md: growth —\n        // the DEFAULT size carries `md:h-12`, which tailwind-merge does NOT\n        // drop for a plain `h-8` override and the nav ballooned on desktop).\n        // Boundary-month nav state arrives as BOTH native `disabled` and\n        // `aria-disabled` depending on the react-day-picker code path — style\n        // both (the same pairing buttonSurfaceClasses uses).\n        button_previous: cn(\n          buttonVariants({ variant: \"outline\", size: \"icon-sm\" }),\n          \"bg-transparent opacity-60 hover:opacity-100 disabled:opacity-25 aria-disabled:opacity-25 aria-disabled:pointer-events-none\"\n        ),\n        button_next: cn(\n          buttonVariants({ variant: \"outline\", size: \"icon-sm\" }),\n          \"bg-transparent opacity-60 hover:opacity-100 disabled:opacity-25 aria-disabled:opacity-25 aria-disabled:pointer-events-none\"\n        ),\n        month_caption: \"flex h-8 items-center justify-center\",\n        caption_label: \"text-h6 text-ods-text-primary\",\n        month_grid: \"border-separate border-spacing-y-1\",\n        weekdays: \"\",\n        weekday: \"h-9 w-9 p-0 text-center align-middle text-h6 font-normal text-ods-text-secondary\",\n        week: \"\",\n        day: \"h-9 w-9 p-0 text-center align-middle\",\n        // 'icon-sm' again: a size MUST be passed or the default's `md:h-12` +\n        // `text-h3` leak through and inflate day cells on desktop.\n        day_button: cn(\n          buttonVariants({ variant: \"transparent\", size: \"icon-sm\" }),\n          \"h-9 w-9 rounded-md p-0 text-h6 font-normal text-ods-text-primary\"\n        ),\n        selected:\n          \"[&>button]:bg-ods-accent [&>button]:text-ods-text-on-accent [&>button]:hover:bg-ods-accent\",\n        today: \"[&>button]:text-ods-accent [&[aria-selected]>button]:text-ods-text-on-accent\",\n        outside: \"[&>button]:text-ods-text-muted [&>button]:opacity-50\",\n        // `cursor-not-allowed` on the CELL, not the button: the day button is a\n        // core `Button`, whose disabled state carries `pointer-events-none`, so\n        // a cursor set on it never applies — the pointer is over the cell.\n        disabled:\n          \"cursor-not-allowed [&>button]:text-ods-text-muted [&>button]:opacity-40 [&>button]:hover:bg-transparent\",\n        hidden: \"invisible\",\n        ...classNames,\n      }}\n      components={{\n        // v9 passes 'up'/'down' for dropdown captions too — branch all four.\n        Chevron: ({ orientation, className: chevronClassName }) => {\n          const cls = cn(\"h-4 w-4\", chevronClassName)\n          if (orientation === \"right\") return <ChevronRight className={cls} />\n          if (orientation === \"up\") return <ChevronUp className={cls} />\n          if (orientation === \"down\") return <ChevronDown className={cls} />\n          return <ChevronLeft className={cls} />\n        },\n      }}\n      {...props}\n    />\n  )\n}\nCalendar.displayName = \"Calendar\"\n\nexport { Calendar }\n"]}