@ugurdemirel/landcraft 0.1.17 → 0.1.18

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 (63) hide show
  1. package/README.md +2 -3
  2. package/dist/cjs/components/Badge.cjs +1 -1
  3. package/dist/cjs/components/Badge.cjs.map +1 -1
  4. package/dist/cjs/components/Button.cjs +1 -1
  5. package/dist/cjs/components/Button.cjs.map +1 -1
  6. package/dist/cjs/components/CTA/variants/Inverse.cjs +1 -2
  7. package/dist/cjs/components/CTA/variants/Inverse.cjs.map +1 -1
  8. package/dist/cjs/components/CTA/variants/Panel.cjs +1 -2
  9. package/dist/cjs/components/CTA/variants/Panel.cjs.map +1 -1
  10. package/dist/cjs/components/Features/FeatureCard.cjs +1 -1
  11. package/dist/cjs/components/Features/FeatureCard.cjs.map +1 -1
  12. package/dist/cjs/components/Hero/variants/Statement.cjs +1 -2
  13. package/dist/cjs/components/Hero/variants/Statement.cjs.map +1 -1
  14. package/dist/cjs/components/MegaMenu/MegaMenu.cjs +1 -1
  15. package/dist/cjs/components/MegaMenu/MegaMenu.cjs.map +1 -1
  16. package/dist/cjs/components/Pricing/parts.cjs +1 -2
  17. package/dist/cjs/components/Pricing/parts.cjs.map +1 -1
  18. package/dist/cjs/components/Pricing/variants/Bento.cjs +1 -1
  19. package/dist/cjs/components/Pricing/variants/Bento.cjs.map +1 -1
  20. package/dist/cjs/components/Pricing/variants/Cards.cjs +1 -1
  21. package/dist/cjs/components/Pricing/variants/Cards.cjs.map +1 -1
  22. package/dist/cjs/components/Testimonials/TestimonialCard.cjs +1 -1
  23. package/dist/cjs/components/Testimonials/TestimonialCard.cjs.map +1 -1
  24. package/dist/cjs/components/Testimonials/variants/Carousel.cjs +1 -1
  25. package/dist/cjs/components/Testimonials/variants/Carousel.cjs.map +1 -1
  26. package/dist/cjs/index.cjs +1 -1
  27. package/dist/es/components/Badge.js +21 -17
  28. package/dist/es/components/Badge.js.map +1 -1
  29. package/dist/es/components/Button.js +29 -29
  30. package/dist/es/components/Button.js.map +1 -1
  31. package/dist/es/components/CTA/variants/Inverse.js +37 -42
  32. package/dist/es/components/CTA/variants/Inverse.js.map +1 -1
  33. package/dist/es/components/CTA/variants/Panel.js +51 -56
  34. package/dist/es/components/CTA/variants/Panel.js.map +1 -1
  35. package/dist/es/components/Features/FeatureCard.js +13 -14
  36. package/dist/es/components/Features/FeatureCard.js.map +1 -1
  37. package/dist/es/components/Hero/variants/Statement.js +37 -42
  38. package/dist/es/components/Hero/variants/Statement.js.map +1 -1
  39. package/dist/es/components/MegaMenu/MegaMenu.js +27 -28
  40. package/dist/es/components/MegaMenu/MegaMenu.js.map +1 -1
  41. package/dist/es/components/Pricing/parts.js +33 -34
  42. package/dist/es/components/Pricing/parts.js.map +1 -1
  43. package/dist/es/components/Pricing/variants/Bento.js +16 -17
  44. package/dist/es/components/Pricing/variants/Bento.js.map +1 -1
  45. package/dist/es/components/Pricing/variants/Cards.js +10 -11
  46. package/dist/es/components/Pricing/variants/Cards.js.map +1 -1
  47. package/dist/es/components/Testimonials/TestimonialCard.js +10 -11
  48. package/dist/es/components/Testimonials/TestimonialCard.js.map +1 -1
  49. package/dist/es/components/Testimonials/variants/Carousel.js +10 -11
  50. package/dist/es/components/Testimonials/variants/Carousel.js.map +1 -1
  51. package/dist/es/index.js +89 -93
  52. package/dist/es/index.js.map +1 -1
  53. package/dist/index.d.ts +0 -33
  54. package/dist/styles.css +0 -3
  55. package/package.json +1 -1
  56. package/dist/cjs/utils/contrast.cjs +0 -2
  57. package/dist/cjs/utils/contrast.cjs.map +0 -1
  58. package/dist/cjs/utils/useTokenForeground.cjs +0 -3
  59. package/dist/cjs/utils/useTokenForeground.cjs.map +0 -1
  60. package/dist/es/utils/contrast.js +0 -48
  61. package/dist/es/utils/contrast.js.map +0 -1
  62. package/dist/es/utils/useTokenForeground.js +0 -28
  63. package/dist/es/utils/useTokenForeground.js.map +0 -1
package/README.md CHANGED
@@ -157,9 +157,8 @@ dark-mode variants.
157
157
  1. **Paired tokens.** Every surface color ships with a matching `--color-on-*` value;
158
158
  themes change together.
159
159
  2. **Dynamic surfaces.** Gradient CTA panels, statement heroes and `customColor` use
160
- the WCAG relative-luminance formula at runtime (`getContrastText` /
161
- `useTokenForeground`). When a dark palette lightens the primary, text flips dark
162
- automatically.
160
+ the CSS `contrast-color()` function to pick the most readable text color. When a
161
+ dark palette lightens the primary, text flips dark automatically.
163
162
 
164
163
  ### Icons
165
164
 
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),f=require("react"),s=require("../utils/cn.cjs"),p=require("../utils/contrast.cjs"),x="inline-flex items-center rounded-full font-medium tracking-tight transition-colors duration-200",m={sm:"px-2.5 py-0.5 text-xs gap-1",md:"px-3 py-1 text-[13px] gap-1.5"},y={solid:"bg-primary text-on-primary",soft:"bg-primary-soft text-primary",outline:"text-muted-foreground ring-1 ring-inset ring-border",dot:"text-foreground ring-1 ring-inset ring-border bg-surface"},a=f.forwardRef(({className:o,variant:t="soft",size:d="md",icon:n,customColor:e,style:i,children:c,...g},l)=>{const u=e?{...i,backgroundColor:e,color:p.getContrastText(e,"#111111","#ffffff")}:i;return r.jsxs("span",{ref:l,style:u,className:s.cn(x,m[d],e?void 0:y[t],o),...g,children:[t==="dot"?r.jsx("span",{"aria-hidden":!0,className:s.cn("h-1.5 w-1.5 shrink-0 rounded-full",e?"currentColor":"bg-primary"),style:e?{backgroundColor:e}:void 0}):null,n?r.jsx("span",{className:"shrink-0 opacity-70",children:n}):null,c]})});a.displayName="Badge";exports.Badge=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),p=require("react"),s=require("../utils/cn.cjs"),x="inline-flex items-center rounded-full font-medium tracking-tight transition-colors duration-200",b={sm:"px-2.5 py-0.5 text-xs gap-1",md:"px-3 py-1 text-[13px] gap-1.5"},m={solid:"bg-primary text-on-primary",soft:"bg-primary-soft text-primary",outline:"text-muted-foreground ring-1 ring-inset ring-border",dot:"text-foreground ring-1 ring-inset ring-border bg-surface"},a=p.forwardRef(({className:o,variant:n="soft",size:d="md",icon:t,customColor:r,style:i,children:c,...l},g)=>{const u=r?{...i,"--lc-bg":r,backgroundColor:"var(--lc-bg)",color:"contrast-color(var(--lc-bg))"}:i;return e.jsxs("span",{ref:g,style:u,className:s.cn(x,b[d],r?void 0:m[n],o),...l,children:[n==="dot"?e.jsx("span",{"aria-hidden":!0,className:s.cn("h-1.5 w-1.5 shrink-0 rounded-full",r?"currentColor":"bg-primary"),style:r?{backgroundColor:r}:void 0}):null,t?e.jsx("span",{className:"shrink-0 opacity-70",children:t}):null,c]})});a.displayName="Badge";exports.Badge=a;
2
2
  //# sourceMappingURL=Badge.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.cjs","sources":["../../../src/components/Badge.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport { cn } from \"../utils/cn\";\nimport { getContrastText } from \"../utils/contrast\";\n\nexport type BadgeVariant = \"solid\" | \"soft\" | \"outline\" | \"dot\";\nexport type BadgeSize = \"sm\" | \"md\";\n\nexport interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {\n variant?: BadgeVariant;\n size?: BadgeSize;\n icon?: ReactNode;\n /** Paints the chip with an arbitrary CSS color; text color is computed for contrast. */\n customColor?: string;\n}\n\nconst base =\n \"inline-flex items-center rounded-full font-medium tracking-tight transition-colors duration-200\";\n\nconst sizes: Record<BadgeSize, string> = {\n sm: \"px-2.5 py-0.5 text-xs gap-1\",\n md: \"px-3 py-1 text-[13px] gap-1.5\",\n};\n\nconst variants: Record<BadgeVariant, string> = {\n solid: \"bg-primary text-on-primary\",\n soft: \"bg-primary-soft text-primary\",\n outline: \"text-muted-foreground ring-1 ring-inset ring-border\",\n dot: \"text-foreground ring-1 ring-inset ring-border bg-surface\",\n};\n\nexport const Badge = forwardRef<HTMLSpanElement, BadgeProps>(\n (\n { className, variant = \"soft\", size = \"md\", icon, customColor, style, children, ...props },\n ref,\n ) => {\n const customStyle = customColor\n ? { ...style, backgroundColor: customColor, color: getContrastText(customColor, \"#111111\", \"#ffffff\") }\n : style;\n\n return (\n <span\n ref={ref}\n style={customStyle}\n className={cn(\n base,\n sizes[size],\n customColor ? undefined : variants[variant],\n className,\n )}\n {...props}\n >\n {variant === \"dot\" ? (\n <span\n aria-hidden\n className={cn(\n \"h-1.5 w-1.5 shrink-0 rounded-full\",\n customColor ? \"currentColor\" : \"bg-primary\",\n )}\n style={customColor ? { backgroundColor: customColor } : undefined}\n />\n ) : null}\n {icon ? <span className=\"shrink-0 opacity-70\">{icon}</span> : null}\n {children}\n </span>\n );\n },\n);\nBadge.displayName = \"Badge\";"],"names":["base","sizes","variants","Badge","forwardRef","className","variant","size","icon","customColor","style","children","props","ref","customStyle","getContrastText","jsxs","cn","jsx"],"mappings":"wMAeMA,EACJ,kGAEIC,EAAmC,CACvC,GAAI,8BACJ,GAAI,+BACN,EAEMC,EAAyC,CAC7C,MAAO,6BACP,KAAM,+BACN,QAAS,sDACT,IAAK,0DACP,EAEaC,EAAQC,EAAAA,WACnB,CACE,CAAE,UAAAC,EAAW,QAAAC,EAAU,OAAQ,KAAAC,EAAO,KAAM,KAAAC,EAAM,YAAAC,EAAa,MAAAC,EAAO,SAAAC,EAAU,GAAGC,CAAA,EACnFC,IACG,CACH,MAAMC,EAAcL,EAChB,CAAE,GAAGC,EAAO,gBAAiBD,EAAa,MAAOM,EAAAA,gBAAgBN,EAAa,UAAW,SAAS,GAClGC,EAEJ,OACEM,EAAAA,KAAC,OAAA,CACC,IAAAH,EACA,MAAOC,EACP,UAAWG,EAAAA,GACTjB,EACAC,EAAMM,CAAI,EACVE,EAAc,OAAYP,EAASI,CAAO,EAC1CD,CAAA,EAED,GAAGO,EAEH,SAAA,CAAAN,IAAY,MACXY,EAAAA,IAAC,OAAA,CACC,cAAW,GACX,UAAWD,EAAAA,GACT,oCACAR,EAAc,eAAiB,YAAA,EAEjC,MAAOA,EAAc,CAAE,gBAAiBA,GAAgB,MAAA,CAAA,EAExD,KACHD,EAAOU,EAAAA,IAAC,OAAA,CAAK,UAAU,sBAAuB,WAAK,EAAU,KAC7DP,CAAA,CAAA,CAAA,CAGP,CACF,EACAR,EAAM,YAAc"}
1
+ {"version":3,"file":"Badge.cjs","sources":["../../../src/components/Badge.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type HTMLAttributes, type ReactNode } from \"react\";\nimport { cn } from \"../utils/cn\";\n\nexport type BadgeVariant = \"solid\" | \"soft\" | \"outline\" | \"dot\";\nexport type BadgeSize = \"sm\" | \"md\";\n\nexport interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {\n variant?: BadgeVariant;\n size?: BadgeSize;\n icon?: ReactNode;\n /** Paints the chip with an arbitrary CSS color; text color is computed for contrast. */\n customColor?: string;\n}\n\nconst base =\n \"inline-flex items-center rounded-full font-medium tracking-tight transition-colors duration-200\";\n\nconst sizes: Record<BadgeSize, string> = {\n sm: \"px-2.5 py-0.5 text-xs gap-1\",\n md: \"px-3 py-1 text-[13px] gap-1.5\",\n};\n\nconst variants: Record<BadgeVariant, string> = {\n solid: \"bg-primary text-on-primary\",\n soft: \"bg-primary-soft text-primary\",\n outline: \"text-muted-foreground ring-1 ring-inset ring-border\",\n dot: \"text-foreground ring-1 ring-inset ring-border bg-surface\",\n};\n\nexport const Badge = forwardRef<HTMLSpanElement, BadgeProps>(\n (\n { className, variant = \"soft\", size = \"md\", icon, customColor, style, children, ...props },\n ref,\n ) => {\n const customStyle = customColor\n ? ({\n ...style,\n \"--lc-bg\": customColor,\n backgroundColor: \"var(--lc-bg)\",\n color: \"contrast-color(var(--lc-bg))\",\n } as CSSProperties)\n : style;\n\n return (\n <span\n ref={ref}\n style={customStyle}\n className={cn(\n base,\n sizes[size],\n customColor ? undefined : variants[variant],\n className,\n )}\n {...props}\n >\n {variant === \"dot\" ? (\n <span\n aria-hidden\n className={cn(\n \"h-1.5 w-1.5 shrink-0 rounded-full\",\n customColor ? \"currentColor\" : \"bg-primary\",\n )}\n style={customColor ? { backgroundColor: customColor } : undefined}\n />\n ) : null}\n {icon ? <span className=\"shrink-0 opacity-70\">{icon}</span> : null}\n {children}\n </span>\n );\n },\n);\nBadge.displayName = \"Badge\";"],"names":["base","sizes","variants","Badge","forwardRef","className","variant","size","icon","customColor","style","children","props","ref","customStyle","jsxs","cn","jsx"],"mappings":"qKAcMA,EACJ,kGAEIC,EAAmC,CACvC,GAAI,8BACJ,GAAI,+BACN,EAEMC,EAAyC,CAC7C,MAAO,6BACP,KAAM,+BACN,QAAS,sDACT,IAAK,0DACP,EAEaC,EAAQC,EAAAA,WACnB,CACE,CAAE,UAAAC,EAAW,QAAAC,EAAU,OAAQ,KAAAC,EAAO,KAAM,KAAAC,EAAM,YAAAC,EAAa,MAAAC,EAAO,SAAAC,EAAU,GAAGC,CAAA,EACnFC,IACG,CACH,MAAMC,EAAcL,EACf,CACC,GAAGC,EACH,UAAWD,EACX,gBAAiB,eACjB,MAAO,8BAAA,EAETC,EAEJ,OACEK,EAAAA,KAAC,OAAA,CACC,IAAAF,EACA,MAAOC,EACP,UAAWE,EAAAA,GACThB,EACAC,EAAMM,CAAI,EACVE,EAAc,OAAYP,EAASI,CAAO,EAC1CD,CAAA,EAED,GAAGO,EAEH,SAAA,CAAAN,IAAY,MACXW,EAAAA,IAAC,OAAA,CACC,cAAW,GACX,UAAWD,EAAAA,GACT,oCACAP,EAAc,eAAiB,YAAA,EAEjC,MAAOA,EAAc,CAAE,gBAAiBA,GAAgB,MAAA,CAAA,EAExD,KACHD,EAAOS,EAAAA,IAAC,OAAA,CAAK,UAAU,sBAAuB,WAAK,EAAU,KAC7DN,CAAA,CAAA,CAAA,CAGP,CACF,EACAR,EAAM,YAAc"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),v=require("react"),o=require("../utils/cn.cjs"),y=require("../utils/contrast.cjs"),k=require("./Slot.cjs"),j={primary:"bg-primary text-on-primary hover:bg-primary-hover",dark:"bg-secondary text-on-secondary hover:bg-secondary-hover",outline:"border border-border bg-transparent text-foreground hover:border-foreground/30 hover:bg-surface",ghost:"text-foreground hover:bg-surface",link:"px-0 h-auto text-primary hover:text-primary-hover"},q={sm:"h-9 px-4 text-[13px] gap-1.5",md:"h-11 px-5 text-sm gap-2",lg:"h-12 px-7 text-[15px] gap-2"},N="group inline-flex select-none items-center justify-center rounded-lg font-medium tracking-tight transition-[background-color,border-color,color,box-shadow] duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 cursor-pointer",b=v.forwardRef(({className:p,variant:n="primary",size:x="md",iconLeft:s,iconRight:i,customColor:e,fullWidth:f,asChild:h,style:a,type:m="button",children:c,...u},l)=>{const d=e?{...a,backgroundColor:e,color:y.getContrastText(e)}:a,t=n==="link",g=o.cn(N,q[x],e?"hover:brightness-95":j[n],t&&"underline-offset-4 hover:underline",f&&"w-full",p);return h?r.jsx(k.Slot,{ref:l,style:d,className:g,...u,children:c}):r.jsxs("button",{ref:l,type:m,style:d,className:g,...u,children:[s?r.jsx("span",{className:o.cn("shrink-0",!t&&"opacity-70"),children:s}):null,c,i?r.jsx("span",{className:o.cn("shrink-0 transition-transform duration-200",!t&&"opacity-70 group-hover:translate-x-0.5"),children:i}):null]})});b.displayName="Button";exports.Button=b;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),v=require("react"),t=require("../utils/cn.cjs"),y=require("./Slot.cjs"),k={primary:"bg-primary text-on-primary hover:bg-primary-hover",dark:"bg-secondary text-on-secondary hover:bg-secondary-hover",outline:"border border-border bg-transparent text-foreground hover:border-foreground/30 hover:bg-surface",ghost:"text-foreground hover:bg-surface",link:"px-0 h-auto text-primary hover:text-primary-hover"},j={sm:"h-9 px-4 text-[13px] gap-1.5",md:"h-11 px-5 text-sm gap-2",lg:"h-12 px-7 text-[15px] gap-2"},N="group inline-flex select-none items-center justify-center rounded-lg font-medium tracking-tight transition-[background-color,border-color,color,box-shadow] duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 cursor-pointer",b=v.forwardRef(({className:p,variant:n="primary",size:f="md",iconLeft:s,iconRight:i,customColor:e,fullWidth:h,asChild:x,style:a,type:m="button",children:c,...l},u)=>{const d=e?{...a,"--lc-bg":e,backgroundColor:"var(--lc-bg)",color:"contrast-color(var(--lc-bg))"}:a,o=n==="link",g=t.cn(N,j[f],e?"hover:brightness-95":k[n],o&&"underline-offset-4 hover:underline",h&&"w-full",p);return x?r.jsx(y.Slot,{ref:u,style:d,className:g,...l,children:c}):r.jsxs("button",{ref:u,type:m,style:d,className:g,...l,children:[s?r.jsx("span",{className:t.cn("shrink-0",!o&&"opacity-70"),children:s}):null,c,i?r.jsx("span",{className:t.cn("shrink-0 transition-transform duration-200",!o&&"opacity-70 group-hover:translate-x-0.5"),children:i}):null]})});b.displayName="Button";exports.Button=b;
2
2
  //# sourceMappingURL=Button.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.cjs","sources":["../../../src/components/Button.tsx"],"sourcesContent":["import { forwardRef, type ButtonHTMLAttributes, type CSSProperties, type ReactNode } from \"react\";\nimport { cn } from \"../utils/cn\";\nimport { getContrastText } from \"../utils/contrast\";\nimport { Slot } from \"./Slot\";\n\nexport type ButtonVariant = \"primary\" | \"dark\" | \"outline\" | \"ghost\" | \"link\";\nexport type ButtonSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: ButtonVariant;\n size?: ButtonSize;\n iconLeft?: ReactNode;\n iconRight?: ReactNode;\n /** Paints the button with an arbitrary CSS color; text color is computed for contrast. */\n customColor?: string;\n fullWidth?: boolean;\n /**\n * When `true`, the button styling is applied to a single child element\n * instead of a `<button>`. Use it to render a framework router `<Link>`\n * (Next.js, Remix, React Router…). `iconLeft` / `iconRight` are ignored;\n * pass icons inside the child instead.\n */\n asChild?: boolean;\n}\n\nconst variants: Record<ButtonVariant, string> = {\n primary: \"bg-primary text-on-primary hover:bg-primary-hover\",\n dark: \"bg-secondary text-on-secondary hover:bg-secondary-hover\",\n outline:\n \"border border-border bg-transparent text-foreground hover:border-foreground/30 hover:bg-surface\",\n ghost: \"text-foreground hover:bg-surface\",\n link: \"px-0 h-auto text-primary hover:text-primary-hover\",\n};\n\nconst sizes: Record<ButtonSize, string> = {\n sm: \"h-9 px-4 text-[13px] gap-1.5\",\n md: \"h-11 px-5 text-sm gap-2\",\n lg: \"h-12 px-7 text-[15px] gap-2\",\n};\n\nconst base =\n \"group inline-flex select-none items-center justify-center rounded-lg font-medium tracking-tight transition-[background-color,border-color,color,box-shadow] duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 cursor-pointer\";\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant = \"primary\",\n size = \"md\",\n iconLeft,\n iconRight,\n customColor,\n fullWidth,\n asChild,\n style,\n type = \"button\",\n children,\n ...props\n },\n ref,\n ) => {\n const customStyle: CSSProperties | undefined = customColor\n ? {\n ...style,\n backgroundColor: customColor,\n color: getContrastText(customColor),\n }\n : style;\n\n const isLink = variant === \"link\";\n\n const classes = cn(\n base,\n sizes[size],\n customColor ? \"hover:brightness-95\" : variants[variant],\n isLink && \"underline-offset-4 hover:underline\",\n fullWidth && \"w-full\",\n className,\n );\n\n if (asChild) {\n return (\n <Slot ref={ref} style={customStyle} className={classes} {...props}>\n {children}\n </Slot>\n );\n }\n\n return (\n <button\n ref={ref}\n type={type}\n style={customStyle}\n className={classes}\n {...props}\n >\n {iconLeft ? <span className={cn(\"shrink-0\", !isLink && \"opacity-70\")}>{iconLeft}</span> : null}\n {children}\n {iconRight ? (\n <span\n className={cn(\n \"shrink-0 transition-transform duration-200\",\n !isLink && \"opacity-70 group-hover:translate-x-0.5\",\n )}\n >\n {iconRight}\n </span>\n ) : null}\n </button>\n );\n },\n);\nButton.displayName = \"Button\";"],"names":["variants","sizes","base","Button","forwardRef","className","variant","size","iconLeft","iconRight","customColor","fullWidth","asChild","style","type","children","props","ref","customStyle","getContrastText","isLink","classes","cn","jsx","Slot","jsxs"],"mappings":"gOAyBMA,EAA0C,CAC9C,QAAS,oDACT,KAAM,0DACN,QACE,kGACF,MAAO,mCACP,KAAM,mDACR,EAEMC,EAAoC,CACxC,GAAI,+BACJ,GAAI,0BACJ,GAAI,6BACN,EAEMC,EACJ,oXAEWC,EAASC,EAAAA,WACpB,CACE,CACE,UAAAC,EACA,QAAAC,EAAU,UACV,KAAAC,EAAO,KACP,SAAAC,EACA,UAAAC,EACA,YAAAC,EACA,UAAAC,EACA,QAAAC,EACA,MAAAC,EACA,KAAAC,EAAO,SACP,SAAAC,EACA,GAAGC,CAAA,EAELC,IACG,CACH,MAAMC,EAAyCR,EAC3C,CACE,GAAGG,EACH,gBAAiBH,EACjB,MAAOS,EAAAA,gBAAgBT,CAAW,CAAA,EAEpCG,EAEEO,EAASd,IAAY,OAErBe,EAAUC,EAAAA,GACdpB,EACAD,EAAMM,CAAI,EACVG,EAAc,sBAAwBV,EAASM,CAAO,EACtDc,GAAU,qCACVT,GAAa,SACbN,CAAA,EAGF,OAAIO,EAEAW,MAACC,EAAAA,MAAK,IAAAP,EAAU,MAAOC,EAAa,UAAWG,EAAU,GAAGL,EACzD,SAAAD,CAAA,CACH,EAKFU,EAAAA,KAAC,SAAA,CACC,IAAAR,EACA,KAAAH,EACA,MAAOI,EACP,UAAWG,EACV,GAAGL,EAEH,SAAA,CAAAR,EAAWe,EAAAA,IAAC,OAAA,CAAK,UAAWD,EAAAA,GAAG,WAAY,CAACF,GAAU,YAAY,EAAI,SAAAZ,CAAA,CAAS,EAAU,KACzFO,EACAN,EACCc,EAAAA,IAAC,OAAA,CACC,UAAWD,EAAAA,GACT,6CACA,CAACF,GAAU,wCAAA,EAGZ,SAAAX,CAAA,CAAA,EAED,IAAA,CAAA,CAAA,CAGV,CACF,EACAN,EAAO,YAAc"}
1
+ {"version":3,"file":"Button.cjs","sources":["../../../src/components/Button.tsx"],"sourcesContent":["import { forwardRef, type ButtonHTMLAttributes, type CSSProperties, type ReactNode } from \"react\";\nimport { cn } from \"../utils/cn\";\nimport { Slot } from \"./Slot\";\n\nexport type ButtonVariant = \"primary\" | \"dark\" | \"outline\" | \"ghost\" | \"link\";\nexport type ButtonSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: ButtonVariant;\n size?: ButtonSize;\n iconLeft?: ReactNode;\n iconRight?: ReactNode;\n /** Paints the button with an arbitrary CSS color; text color is computed for contrast. */\n customColor?: string;\n fullWidth?: boolean;\n /**\n * When `true`, the button styling is applied to a single child element\n * instead of a `<button>`. Use it to render a framework router `<Link>`\n * (Next.js, Remix, React Router…). `iconLeft` / `iconRight` are ignored;\n * pass icons inside the child instead.\n */\n asChild?: boolean;\n}\n\nconst variants: Record<ButtonVariant, string> = {\n primary: \"bg-primary text-on-primary hover:bg-primary-hover\",\n dark: \"bg-secondary text-on-secondary hover:bg-secondary-hover\",\n outline:\n \"border border-border bg-transparent text-foreground hover:border-foreground/30 hover:bg-surface\",\n ghost: \"text-foreground hover:bg-surface\",\n link: \"px-0 h-auto text-primary hover:text-primary-hover\",\n};\n\nconst sizes: Record<ButtonSize, string> = {\n sm: \"h-9 px-4 text-[13px] gap-1.5\",\n md: \"h-11 px-5 text-sm gap-2\",\n lg: \"h-12 px-7 text-[15px] gap-2\",\n};\n\nconst base =\n \"group inline-flex select-none items-center justify-center rounded-lg font-medium tracking-tight transition-[background-color,border-color,color,box-shadow] duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 cursor-pointer\";\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant = \"primary\",\n size = \"md\",\n iconLeft,\n iconRight,\n customColor,\n fullWidth,\n asChild,\n style,\n type = \"button\",\n children,\n ...props\n },\n ref,\n ) => {\n const customStyle: CSSProperties | undefined = customColor\n ? ({\n ...style,\n \"--lc-bg\": customColor,\n backgroundColor: \"var(--lc-bg)\",\n color: \"contrast-color(var(--lc-bg))\",\n } as CSSProperties)\n : style;\n\n const isLink = variant === \"link\";\n\n const classes = cn(\n base,\n sizes[size],\n customColor ? \"hover:brightness-95\" : variants[variant],\n isLink && \"underline-offset-4 hover:underline\",\n fullWidth && \"w-full\",\n className,\n );\n\n if (asChild) {\n return (\n <Slot ref={ref} style={customStyle} className={classes} {...props}>\n {children}\n </Slot>\n );\n }\n\n return (\n <button\n ref={ref}\n type={type}\n style={customStyle}\n className={classes}\n {...props}\n >\n {iconLeft ? <span className={cn(\"shrink-0\", !isLink && \"opacity-70\")}>{iconLeft}</span> : null}\n {children}\n {iconRight ? (\n <span\n className={cn(\n \"shrink-0 transition-transform duration-200\",\n !isLink && \"opacity-70 group-hover:translate-x-0.5\",\n )}\n >\n {iconRight}\n </span>\n ) : null}\n </button>\n );\n },\n);\nButton.displayName = \"Button\";"],"names":["variants","sizes","base","Button","forwardRef","className","variant","size","iconLeft","iconRight","customColor","fullWidth","asChild","style","type","children","props","ref","customStyle","isLink","classes","cn","jsx","Slot","jsxs"],"mappings":"6LAwBMA,EAA0C,CAC9C,QAAS,oDACT,KAAM,0DACN,QACE,kGACF,MAAO,mCACP,KAAM,mDACR,EAEMC,EAAoC,CACxC,GAAI,+BACJ,GAAI,0BACJ,GAAI,6BACN,EAEMC,EACJ,oXAEWC,EAASC,EAAAA,WACpB,CACE,CACE,UAAAC,EACA,QAAAC,EAAU,UACV,KAAAC,EAAO,KACP,SAAAC,EACA,UAAAC,EACA,YAAAC,EACA,UAAAC,EACA,QAAAC,EACA,MAAAC,EACA,KAAAC,EAAO,SACP,SAAAC,EACA,GAAGC,CAAA,EAELC,IACG,CACH,MAAMC,EAAyCR,EAC1C,CACC,GAAGG,EACH,UAAWH,EACX,gBAAiB,eACjB,MAAO,8BAAA,EAETG,EAEEM,EAASb,IAAY,OAErBc,EAAUC,EAAAA,GACdnB,EACAD,EAAMM,CAAI,EACVG,EAAc,sBAAwBV,EAASM,CAAO,EACtDa,GAAU,qCACVR,GAAa,SACbN,CAAA,EAGF,OAAIO,EAEAU,MAACC,EAAAA,MAAK,IAAAN,EAAU,MAAOC,EAAa,UAAWE,EAAU,GAAGJ,EACzD,SAAAD,CAAA,CACH,EAKFS,EAAAA,KAAC,SAAA,CACC,IAAAP,EACA,KAAAH,EACA,MAAOI,EACP,UAAWE,EACV,GAAGJ,EAEH,SAAA,CAAAR,EAAWc,EAAAA,IAAC,OAAA,CAAK,UAAWD,EAAAA,GAAG,WAAY,CAACF,GAAU,YAAY,EAAI,SAAAX,CAAA,CAAS,EAAU,KACzFO,EACAN,EACCa,EAAAA,IAAC,OAAA,CACC,UAAWD,EAAAA,GACT,6CACA,CAACF,GAAU,wCAAA,EAGZ,SAAAV,CAAA,CAAA,EAED,IAAA,CAAA,CAAA,CAGV,CACF,EACAN,EAAO,YAAc"}
@@ -1,3 +1,2 @@
1
- "use client";
2
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("react"),t=require("../../../utils/cn.cjs"),p=require("../../Container.cjs"),v=require("../../../utils/useTokenForeground.cjs"),y=require("../parts.cjs"),n=u.forwardRef(({className:l,title:o,description:s,action:c,secondaryAction:a,align:r="left",id:i,...d},x)=>{const m=v.useTokenForeground("--color-secondary");return e.jsx("section",{ref:x,id:i,className:t.cn("w-full py-6 pb-20",l),...d,children:e.jsx(p.Container,{children:e.jsxs("div",{className:"relative overflow-hidden rounded-[1.75rem] px-7 py-16 sm:px-16 sm:py-20",style:{backgroundColor:"rgb(var(--color-secondary))",color:m},children:[e.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 grain opacity-[0.09] mix-blend-overlay"}),e.jsxs("div",{className:t.cn("relative flex flex-col items-start gap-10",r==="center"&&"items-center text-center","lg:flex-row lg:items-end lg:justify-between"),children:[e.jsxs("div",{className:t.cn("max-w-3xl",r==="center"&&"mx-auto"),children:[e.jsx("h2",{className:"font-display text-balance text-4xl font-semibold leading-[1.02] tracking-[-0.03em] sm:text-6xl",children:o}),s?e.jsx("p",{className:t.cn("mt-5 max-w-xl text-pretty text-base leading-7 sm:text-lg",r==="center"&&"mx-auto"),children:s}):null]}),e.jsx(y.CTAActions,{action:c,secondaryAction:a,align:r})]})]})})})});n.displayName="CTAInverse";exports.CTAInverse=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("react"),r=require("../../../utils/cn.cjs"),u=require("../../Container.cjs"),v=require("../parts.cjs"),n=m.forwardRef(({className:l,title:a,description:s,action:c,secondaryAction:o,align:t="left",id:i,...x},d)=>e.jsx("section",{ref:d,id:i,className:r.cn("w-full py-6 pb-20",l),...x,children:e.jsx(u.Container,{children:e.jsxs("div",{className:"relative overflow-hidden rounded-[1.75rem] px-7 py-16 sm:px-16 sm:py-20",style:{backgroundColor:"rgb(var(--color-secondary))",color:"contrast-color(rgb(var(--color-secondary)))"},children:[e.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 grain opacity-[0.09] mix-blend-overlay"}),e.jsxs("div",{className:r.cn("relative flex flex-col items-start gap-10",t==="center"&&"items-center text-center","lg:flex-row lg:items-end lg:justify-between"),children:[e.jsxs("div",{className:r.cn("max-w-3xl",t==="center"&&"mx-auto"),children:[e.jsx("h2",{className:"font-display text-balance text-4xl font-semibold leading-[1.02] tracking-[-0.03em] sm:text-6xl",children:a}),s?e.jsx("p",{className:r.cn("mt-5 max-w-xl text-pretty text-base leading-7 sm:text-lg",t==="center"&&"mx-auto"),children:s}):null]}),e.jsx(v.CTAActions,{action:c,secondaryAction:o,align:t})]})]})})}));n.displayName="CTAInverse";exports.CTAInverse=n;
3
2
  //# sourceMappingURL=Inverse.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Inverse.cjs","sources":["../../../../../src/components/CTA/variants/Inverse.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"../../../utils/cn\";\nimport { Container } from \"../../Container\";\nimport { useTokenForeground } from \"../../../utils/useTokenForeground\";\nimport { CTAActions } from \"../parts\";\nimport type { CTAProps } from \"../types\";\n\n/** inverse — ink panel with a wide left-aligned split. */\nexport const CTAInverse = forwardRef<HTMLElement, CTAProps>(\n ({ className, title, description, action, secondaryAction, align = \"left\", id, ...props }, ref) => {\n const fg = useTokenForeground(\"--color-secondary\");\n\n return (\n <section ref={ref} id={id} className={cn(\"w-full py-6 pb-20\", className)} {...props}>\n <Container>\n <div\n className=\"relative overflow-hidden rounded-[1.75rem] px-7 py-16 sm:px-16 sm:py-20\"\n style={{\n backgroundColor: \"rgb(var(--color-secondary))\",\n color: fg,\n }}\n >\n <div aria-hidden className=\"pointer-events-none absolute inset-0 grain opacity-[0.09] mix-blend-overlay\" />\n <div\n className={cn(\n \"relative flex flex-col items-start gap-10\",\n align === \"center\" && \"items-center text-center\",\n \"lg:flex-row lg:items-end lg:justify-between\",\n )}\n >\n <div className={cn(\"max-w-3xl\", align === \"center\" && \"mx-auto\")}>\n <h2 className=\"font-display text-balance text-4xl font-semibold leading-[1.02] tracking-[-0.03em] sm:text-6xl\">\n {title}\n </h2>\n {description ? (\n <p className={cn(\"mt-5 max-w-xl text-pretty text-base leading-7 sm:text-lg\", align === \"center\" && \"mx-auto\")}>\n {description}\n </p>\n ) : null}\n </div>\n <CTAActions action={action} secondaryAction={secondaryAction} align={align} />\n </div>\n </div>\n </Container>\n </section>\n );\n },\n);\nCTAInverse.displayName = \"CTAInverse\";"],"names":["CTAInverse","forwardRef","className","title","description","action","secondaryAction","align","id","props","ref","fg","useTokenForeground","jsx","cn","Container","jsxs","CTAActions"],"mappings":"yRASaA,EAAaC,EAAAA,WACxB,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAO,YAAAC,EAAa,OAAAC,EAAQ,gBAAAC,EAAiB,MAAAC,EAAQ,OAAQ,GAAAC,EAAI,GAAGC,CAAA,EAASC,IAAQ,CACjG,MAAMC,EAAKC,EAAAA,mBAAmB,mBAAmB,EAEjD,OACEC,EAAAA,IAAC,UAAA,CAAQ,IAAAH,EAAU,GAAAF,EAAQ,UAAWM,KAAG,oBAAqBZ,CAAS,EAAI,GAAGO,EAC5E,SAAAI,EAAAA,IAACE,EAAAA,UAAA,CACC,SAAAC,EAAAA,KAAC,MAAA,CACC,UAAU,0EACV,MAAO,CACL,gBAAiB,8BACjB,MAAOL,CAAA,EAGT,SAAA,CAAAE,EAAAA,IAAC,MAAA,CAAI,cAAW,GAAC,UAAU,8EAA8E,EACzGG,EAAAA,KAAC,MAAA,CACC,UAAWF,EAAAA,GACT,4CACAP,IAAU,UAAY,2BACtB,6CAAA,EAGF,SAAA,CAAAS,OAAC,OAAI,UAAWF,EAAAA,GAAG,YAAaP,IAAU,UAAY,SAAS,EAC7D,SAAA,CAAAM,EAAAA,IAAC,KAAA,CAAG,UAAU,iGACX,SAAAV,EACH,EACCC,EACCS,EAAAA,IAAC,IAAA,CAAE,UAAWC,EAAAA,GAAG,2DAA4DP,IAAU,UAAY,SAAS,EACzG,SAAAH,CAAA,CACH,EACE,IAAA,EACN,EACAS,EAAAA,IAACI,EAAAA,WAAA,CAAW,OAAAZ,EAAgB,gBAAAC,EAAkC,MAAAC,CAAA,CAAc,CAAA,CAAA,CAAA,CAC9E,CAAA,CAAA,EAEJ,CAAA,CACF,CAEJ,CACF,EACAP,EAAW,YAAc"}
1
+ {"version":3,"file":"Inverse.cjs","sources":["../../../../../src/components/CTA/variants/Inverse.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport { cn } from \"../../../utils/cn\";\nimport { Container } from \"../../Container\";\nimport { CTAActions } from \"../parts\";\nimport type { CTAProps } from \"../types\";\n\n/** inverse — ink panel with a wide left-aligned split. */\nexport const CTAInverse = forwardRef<HTMLElement, CTAProps>(\n ({ className, title, description, action, secondaryAction, align = \"left\", id, ...props }, ref) => {\n return (\n <section ref={ref} id={id} className={cn(\"w-full py-6 pb-20\", className)} {...props}>\n <Container>\n <div\n className=\"relative overflow-hidden rounded-[1.75rem] px-7 py-16 sm:px-16 sm:py-20\"\n style={{\n backgroundColor: \"rgb(var(--color-secondary))\",\n color: \"contrast-color(rgb(var(--color-secondary)))\",\n }}\n >\n <div aria-hidden className=\"pointer-events-none absolute inset-0 grain opacity-[0.09] mix-blend-overlay\" />\n <div\n className={cn(\n \"relative flex flex-col items-start gap-10\",\n align === \"center\" && \"items-center text-center\",\n \"lg:flex-row lg:items-end lg:justify-between\",\n )}\n >\n <div className={cn(\"max-w-3xl\", align === \"center\" && \"mx-auto\")}>\n <h2 className=\"font-display text-balance text-4xl font-semibold leading-[1.02] tracking-[-0.03em] sm:text-6xl\">\n {title}\n </h2>\n {description ? (\n <p className={cn(\"mt-5 max-w-xl text-pretty text-base leading-7 sm:text-lg\", align === \"center\" && \"mx-auto\")}>\n {description}\n </p>\n ) : null}\n </div>\n <CTAActions action={action} secondaryAction={secondaryAction} align={align} />\n </div>\n </div>\n </Container>\n </section>\n );\n },\n);\nCTAInverse.displayName = \"CTAInverse\";"],"names":["CTAInverse","forwardRef","className","title","description","action","secondaryAction","align","id","props","ref","jsx","cn","Container","jsxs","CTAActions"],"mappings":"sOAOaA,EAAaC,EAAAA,WACxB,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAO,YAAAC,EAAa,OAAAC,EAAQ,gBAAAC,EAAiB,MAAAC,EAAQ,OAAQ,GAAAC,EAAI,GAAGC,CAAA,EAASC,IAEvFC,EAAAA,IAAC,UAAA,CAAQ,IAAAD,EAAU,GAAAF,EAAQ,UAAWI,KAAG,oBAAqBV,CAAS,EAAI,GAAGO,EAC5E,SAAAE,EAAAA,IAACE,EAAAA,UAAA,CACC,SAAAC,EAAAA,KAAC,MAAA,CACC,UAAU,0EACV,MAAO,CACL,gBAAiB,8BACjB,MAAO,6CAAA,EAGT,SAAA,CAAAH,EAAAA,IAAC,MAAA,CAAI,cAAW,GAAC,UAAU,8EAA8E,EACzGG,EAAAA,KAAC,MAAA,CACC,UAAWF,EAAAA,GACT,4CACAL,IAAU,UAAY,2BACtB,6CAAA,EAGF,SAAA,CAAAO,OAAC,OAAI,UAAWF,EAAAA,GAAG,YAAaL,IAAU,UAAY,SAAS,EAC7D,SAAA,CAAAI,EAAAA,IAAC,KAAA,CAAG,UAAU,iGACX,SAAAR,EACH,EACCC,EACCO,EAAAA,IAAC,IAAA,CAAE,UAAWC,EAAAA,GAAG,2DAA4DL,IAAU,UAAY,SAAS,EACzG,SAAAH,CAAA,CACH,EACE,IAAA,EACN,EACAO,EAAAA,IAACI,EAAAA,WAAA,CAAW,OAAAV,EAAgB,gBAAAC,EAAkC,MAAAC,CAAA,CAAc,CAAA,CAAA,CAAA,CAC9E,CAAA,CAAA,EAEJ,CAAA,CACF,CAGN,EACAP,EAAW,YAAc"}
@@ -1,3 +1,2 @@
1
- "use client";
2
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("react"),t=require("../../../utils/cn.cjs"),p=require("../../Container.cjs"),v=require("../../../utils/useTokenForeground.cjs"),y=require("../parts.cjs"),n=u.forwardRef(({className:s,title:l,description:a,action:o,secondaryAction:c,align:r="left",id:i,...d},x)=>{const m=v.useTokenForeground("--color-primary");return e.jsx("section",{ref:x,id:i,className:t.cn("w-full py-6 pb-20",s),...d,children:e.jsx(p.Container,{children:e.jsxs("div",{className:"relative overflow-hidden rounded-[1.75rem] px-7 py-14 sm:px-14 sm:py-20",style:{background:"radial-gradient(120% 160% at 0% 0%, rgb(var(--color-primary)), rgb(var(--color-primary-hover)) 55%, rgb(var(--color-primary) / 0.85))",color:m},children:[e.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 grain opacity-[0.07] mix-blend-overlay"}),e.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute -right-24 -top-24 h-72 w-72 rounded-full",style:{background:"rgb(var(--color-accent))",opacity:.35,filter:"blur(60px)"}}),e.jsxs("div",{className:t.cn("relative flex flex-col gap-9",r==="center"?"items-center text-center":"items-start"),children:[e.jsxs("div",{className:t.cn("max-w-2xl",r==="center"&&"mx-auto"),children:[e.jsx("h2",{className:"font-display text-balance text-3xl font-semibold leading-[1.06] tracking-[-0.02em] sm:text-5xl",children:l}),a?e.jsx("p",{className:t.cn("mt-4 text-pretty text-base leading-7 sm:text-lg",r==="center"&&"mx-auto max-w-xl"),children:a}):null]}),e.jsx(y.CTAActions,{action:o,secondaryAction:c,align:r})]})]})})})});n.displayName="CTAPanel";exports.CTAPanel=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("react"),t=require("../../../utils/cn.cjs"),u=require("../../Container.cjs"),p=require("../parts.cjs"),n=m.forwardRef(({className:s,title:l,description:a,action:c,secondaryAction:o,align:r="left",id:i,...d},x)=>e.jsx("section",{ref:x,id:i,className:t.cn("w-full py-6 pb-20",s),...d,children:e.jsx(u.Container,{children:e.jsxs("div",{className:"relative overflow-hidden rounded-[1.75rem] px-7 py-14 sm:px-14 sm:py-20",style:{background:"radial-gradient(120% 160% at 0% 0%, rgb(var(--color-primary)), rgb(var(--color-primary-hover)) 55%, rgb(var(--color-primary) / 0.85))",color:"contrast-color(rgb(var(--color-primary)))"},children:[e.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 grain opacity-[0.07] mix-blend-overlay"}),e.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute -right-24 -top-24 h-72 w-72 rounded-full",style:{background:"rgb(var(--color-accent))",opacity:.35,filter:"blur(60px)"}}),e.jsxs("div",{className:t.cn("relative flex flex-col gap-9",r==="center"?"items-center text-center":"items-start"),children:[e.jsxs("div",{className:t.cn("max-w-2xl",r==="center"&&"mx-auto"),children:[e.jsx("h2",{className:"font-display text-balance text-3xl font-semibold leading-[1.06] tracking-[-0.02em] sm:text-5xl",children:l}),a?e.jsx("p",{className:t.cn("mt-4 text-pretty text-base leading-7 sm:text-lg",r==="center"&&"mx-auto max-w-xl"),children:a}):null]}),e.jsx(p.CTAActions,{action:c,secondaryAction:o,align:r})]})]})})}));n.displayName="CTAPanel";exports.CTAPanel=n;
3
2
  //# sourceMappingURL=Panel.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Panel.cjs","sources":["../../../../../src/components/CTA/variants/Panel.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"../../../utils/cn\";\nimport { Container } from \"../../Container\";\nimport { useTokenForeground } from \"../../../utils/useTokenForeground\";\nimport { CTAActions } from \"../parts\";\nimport type { CTAProps } from \"../types\";\n\n/** panel — brand gradient panel, rounded corners. */\nexport const CTAPanel = forwardRef<HTMLElement, CTAProps>(\n ({ className, title, description, action, secondaryAction, align = \"left\", id, ...props }, ref) => {\n const fg = useTokenForeground(\"--color-primary\");\n\n return (\n <section ref={ref} id={id} className={cn(\"w-full py-6 pb-20\", className)} {...props}>\n <Container>\n <div\n className=\"relative overflow-hidden rounded-[1.75rem] px-7 py-14 sm:px-14 sm:py-20\"\n style={{\n background:\n \"radial-gradient(120% 160% at 0% 0%, rgb(var(--color-primary)), rgb(var(--color-primary-hover)) 55%, rgb(var(--color-primary) / 0.85))\",\n color: fg,\n }}\n >\n <div aria-hidden className=\"pointer-events-none absolute inset-0 grain opacity-[0.07] mix-blend-overlay\" />\n <div\n aria-hidden\n className=\"pointer-events-none absolute -right-24 -top-24 h-72 w-72 rounded-full\"\n style={{ background: \"rgb(var(--color-accent))\", opacity: 0.35, filter: \"blur(60px)\" }}\n />\n <div\n className={cn(\n \"relative flex flex-col gap-9\",\n align === \"center\" ? \"items-center text-center\" : \"items-start\",\n )}\n >\n <div className={cn(\"max-w-2xl\", align === \"center\" && \"mx-auto\")}>\n <h2 className=\"font-display text-balance text-3xl font-semibold leading-[1.06] tracking-[-0.02em] sm:text-5xl\">\n {title}\n </h2>\n {description ? (\n <p\n className={cn(\n \"mt-4 text-pretty text-base leading-7 sm:text-lg\",\n align === \"center\" && \"mx-auto max-w-xl\",\n )}\n >\n {description}\n </p>\n ) : null}\n </div>\n <CTAActions action={action} secondaryAction={secondaryAction} align={align} />\n </div>\n </div>\n </Container>\n </section>\n );\n },\n);\nCTAPanel.displayName = \"CTAPanel\";"],"names":["CTAPanel","forwardRef","className","title","description","action","secondaryAction","align","id","props","ref","fg","useTokenForeground","jsx","cn","Container","jsxs","CTAActions"],"mappings":"yRASaA,EAAWC,EAAAA,WACtB,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAO,YAAAC,EAAa,OAAAC,EAAQ,gBAAAC,EAAiB,MAAAC,EAAQ,OAAQ,GAAAC,EAAI,GAAGC,CAAA,EAASC,IAAQ,CACjG,MAAMC,EAAKC,EAAAA,mBAAmB,iBAAiB,EAE/C,OACEC,EAAAA,IAAC,UAAA,CAAQ,IAAAH,EAAU,GAAAF,EAAQ,UAAWM,KAAG,oBAAqBZ,CAAS,EAAI,GAAGO,EAC5E,SAAAI,EAAAA,IAACE,EAAAA,UAAA,CACC,SAAAC,EAAAA,KAAC,MAAA,CACC,UAAU,0EACV,MAAO,CACL,WACE,wIACF,MAAOL,CAAA,EAGT,SAAA,CAAAE,EAAAA,IAAC,MAAA,CAAI,cAAW,GAAC,UAAU,8EAA8E,EACzGA,EAAAA,IAAC,MAAA,CACC,cAAW,GACX,UAAU,wEACV,MAAO,CAAE,WAAY,2BAA4B,QAAS,IAAM,OAAQ,YAAA,CAAa,CAAA,EAEvFG,EAAAA,KAAC,MAAA,CACC,UAAWF,EAAAA,GACT,+BACAP,IAAU,SAAW,2BAA6B,aAAA,EAGpD,SAAA,CAAAS,OAAC,OAAI,UAAWF,EAAAA,GAAG,YAAaP,IAAU,UAAY,SAAS,EAC7D,SAAA,CAAAM,EAAAA,IAAC,KAAA,CAAG,UAAU,iGACX,SAAAV,EACH,EACCC,EACCS,EAAAA,IAAC,IAAA,CACC,UAAWC,EAAAA,GACT,kDACAP,IAAU,UAAY,kBAAA,EAGvB,SAAAH,CAAA,CAAA,EAED,IAAA,EACN,EACAS,EAAAA,IAACI,EAAAA,WAAA,CAAW,OAAAZ,EAAgB,gBAAAC,EAAkC,MAAAC,CAAA,CAAc,CAAA,CAAA,CAAA,CAC9E,CAAA,CAAA,EAEJ,CAAA,CACF,CAEJ,CACF,EACAP,EAAS,YAAc"}
1
+ {"version":3,"file":"Panel.cjs","sources":["../../../../../src/components/CTA/variants/Panel.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport { cn } from \"../../../utils/cn\";\nimport { Container } from \"../../Container\";\nimport { CTAActions } from \"../parts\";\nimport type { CTAProps } from \"../types\";\n\n/** panel — brand gradient panel, rounded corners. */\nexport const CTAPanel = forwardRef<HTMLElement, CTAProps>(\n ({ className, title, description, action, secondaryAction, align = \"left\", id, ...props }, ref) => {\n return (\n <section ref={ref} id={id} className={cn(\"w-full py-6 pb-20\", className)} {...props}>\n <Container>\n <div\n className=\"relative overflow-hidden rounded-[1.75rem] px-7 py-14 sm:px-14 sm:py-20\"\n style={{\n background:\n \"radial-gradient(120% 160% at 0% 0%, rgb(var(--color-primary)), rgb(var(--color-primary-hover)) 55%, rgb(var(--color-primary) / 0.85))\",\n color: \"contrast-color(rgb(var(--color-primary)))\",\n }}\n >\n <div aria-hidden className=\"pointer-events-none absolute inset-0 grain opacity-[0.07] mix-blend-overlay\" />\n <div\n aria-hidden\n className=\"pointer-events-none absolute -right-24 -top-24 h-72 w-72 rounded-full\"\n style={{ background: \"rgb(var(--color-accent))\", opacity: 0.35, filter: \"blur(60px)\" }}\n />\n <div\n className={cn(\n \"relative flex flex-col gap-9\",\n align === \"center\" ? \"items-center text-center\" : \"items-start\",\n )}\n >\n <div className={cn(\"max-w-2xl\", align === \"center\" && \"mx-auto\")}>\n <h2 className=\"font-display text-balance text-3xl font-semibold leading-[1.06] tracking-[-0.02em] sm:text-5xl\">\n {title}\n </h2>\n {description ? (\n <p\n className={cn(\n \"mt-4 text-pretty text-base leading-7 sm:text-lg\",\n align === \"center\" && \"mx-auto max-w-xl\",\n )}\n >\n {description}\n </p>\n ) : null}\n </div>\n <CTAActions action={action} secondaryAction={secondaryAction} align={align} />\n </div>\n </div>\n </Container>\n </section>\n );\n },\n);\nCTAPanel.displayName = \"CTAPanel\";"],"names":["CTAPanel","forwardRef","className","title","description","action","secondaryAction","align","id","props","ref","jsx","cn","Container","jsxs","CTAActions"],"mappings":"sOAOaA,EAAWC,EAAAA,WACtB,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAO,YAAAC,EAAa,OAAAC,EAAQ,gBAAAC,EAAiB,MAAAC,EAAQ,OAAQ,GAAAC,EAAI,GAAGC,CAAA,EAASC,IAEvFC,EAAAA,IAAC,UAAA,CAAQ,IAAAD,EAAU,GAAAF,EAAQ,UAAWI,KAAG,oBAAqBV,CAAS,EAAI,GAAGO,EAC5E,SAAAE,EAAAA,IAACE,EAAAA,UAAA,CACC,SAAAC,EAAAA,KAAC,MAAA,CACC,UAAU,0EACV,MAAO,CACL,WACE,wIACF,MAAO,2CAAA,EAGT,SAAA,CAAAH,EAAAA,IAAC,MAAA,CAAI,cAAW,GAAC,UAAU,8EAA8E,EACzGA,EAAAA,IAAC,MAAA,CACC,cAAW,GACX,UAAU,wEACV,MAAO,CAAE,WAAY,2BAA4B,QAAS,IAAM,OAAQ,YAAA,CAAa,CAAA,EAEvFG,EAAAA,KAAC,MAAA,CACC,UAAWF,EAAAA,GACT,+BACAL,IAAU,SAAW,2BAA6B,aAAA,EAGpD,SAAA,CAAAO,OAAC,OAAI,UAAWF,EAAAA,GAAG,YAAaL,IAAU,UAAY,SAAS,EAC7D,SAAA,CAAAI,EAAAA,IAAC,KAAA,CAAG,UAAU,iGACX,SAAAR,EACH,EACCC,EACCO,EAAAA,IAAC,IAAA,CACC,UAAWC,EAAAA,GACT,kDACAL,IAAU,UAAY,kBAAA,EAGvB,SAAAH,CAAA,CAAA,EAED,IAAA,EACN,EACAO,EAAAA,IAACI,EAAAA,WAAA,CAAW,OAAAV,EAAgB,gBAAAC,EAAkC,MAAAC,CAAA,CAAc,CAAA,CAAA,CAAA,CAC9E,CAAA,CAAA,EAEJ,CAAA,CACF,CAGN,EACAP,EAAS,YAAc"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),f=require("react"),t=require("../../utils/cn.cjs"),x=require("../../utils/contrast.cjs"),s=f.forwardRef(({className:d,icon:o,title:a,description:l,accent:e,large:n=!1,...i},u)=>{const c=e?{backgroundColor:e,color:x.getContrastText(e,"#111111","#ffffff")}:void 0;return r.jsxs("div",{ref:u,className:t.cn("group relative flex h-full flex-col rounded-xl border border-border bg-surface p-7 transition-colors duration-200 hover:border-foreground/15",d),...i,children:[o?r.jsx("div",{className:t.cn("mb-5 inline-flex h-10 w-10 items-center justify-center rounded-lg text-[1.05rem]",!e&&"bg-primary-soft text-primary"),style:c,children:o}):null,r.jsx("h3",{className:t.cn("font-display font-semibold tracking-tight text-foreground",n?"text-2xl":"text-lg"),children:a}),l?r.jsx("p",{className:t.cn("mt-2.5 text-pretty leading-relaxed text-muted-foreground",n?"text-[15px]":"text-sm"),children:l}):null]})});s.displayName="FeatureCard";exports.FeatureCard=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),x=require("react"),t=require("../../utils/cn.cjs"),s=x.forwardRef(({className:d,icon:o,title:a,description:l,accent:e,large:n=!1,...i},u)=>{const c=e?{backgroundColor:e,color:`contrast-color(${e})`}:void 0;return r.jsxs("div",{ref:u,className:t.cn("group relative flex h-full flex-col rounded-xl border border-border bg-surface p-7 transition-colors duration-200 hover:border-foreground/15",d),...i,children:[o?r.jsx("div",{className:t.cn("mb-5 inline-flex h-10 w-10 items-center justify-center rounded-lg text-[1.05rem]",!e&&"bg-primary-soft text-primary"),style:c,children:o}):null,r.jsx("h3",{className:t.cn("font-display font-semibold tracking-tight text-foreground",n?"text-2xl":"text-lg"),children:a}),l?r.jsx("p",{className:t.cn("mt-2.5 text-pretty leading-relaxed text-muted-foreground",n?"text-[15px]":"text-sm"),children:l}):null]})});s.displayName="FeatureCard";exports.FeatureCard=s;
2
2
  //# sourceMappingURL=FeatureCard.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"FeatureCard.cjs","sources":["../../../../src/components/Features/FeatureCard.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { getContrastText } from \"../../utils/contrast\";\nimport type { FeatureCardProps } from \"./types\";\n\nexport const FeatureCard = forwardRef<HTMLDivElement, FeatureCardProps>(\n ({ className, icon, title, description, accent, large = false, ...props }, ref) => {\n const chipStyle = accent\n ? { backgroundColor: accent, color: getContrastText(accent, \"#111111\", \"#ffffff\") }\n : undefined;\n\n return (\n <div\n ref={ref}\n className={cn(\n \"group relative flex h-full flex-col rounded-xl border border-border bg-surface p-7 transition-colors duration-200 hover:border-foreground/15\",\n className,\n )}\n {...props}\n >\n {icon ? (\n <div\n className={cn(\n \"mb-5 inline-flex h-10 w-10 items-center justify-center rounded-lg text-[1.05rem]\",\n !accent && \"bg-primary-soft text-primary\",\n )}\n style={chipStyle}\n >\n {icon}\n </div>\n ) : null}\n <h3 className={cn(\"font-display font-semibold tracking-tight text-foreground\", large ? \"text-2xl\" : \"text-lg\")}>\n {title}\n </h3>\n {description ? (\n <p className={cn(\"mt-2.5 text-pretty leading-relaxed text-muted-foreground\", large ? \"text-[15px]\" : \"text-sm\")}>\n {description}\n </p>\n ) : null}\n </div>\n );\n },\n);\nFeatureCard.displayName = \"FeatureCard\";"],"names":["FeatureCard","forwardRef","className","icon","title","description","accent","large","props","ref","chipStyle","getContrastText","jsxs","cn","jsx"],"mappings":"8MAKaA,EAAcC,EAAAA,WACzB,CAAC,CAAE,UAAAC,EAAW,KAAAC,EAAM,MAAAC,EAAO,YAAAC,EAAa,OAAAC,EAAQ,MAAAC,EAAQ,GAAO,GAAGC,CAAA,EAASC,IAAQ,CACjF,MAAMC,EAAYJ,EACd,CAAE,gBAAiBA,EAAQ,MAAOK,EAAAA,gBAAgBL,EAAQ,UAAW,SAAS,CAAA,EAC9E,OAEJ,OACEM,EAAAA,KAAC,MAAA,CACC,IAAAH,EACA,UAAWI,EAAAA,GACT,+IACAX,CAAA,EAED,GAAGM,EAEH,SAAA,CAAAL,EACCW,EAAAA,IAAC,MAAA,CACC,UAAWD,EAAAA,GACT,mFACA,CAACP,GAAU,8BAAA,EAEb,MAAOI,EAEN,SAAAP,CAAA,CAAA,EAED,KACJW,EAAAA,IAAC,MAAG,UAAWD,EAAAA,GAAG,4DAA6DN,EAAQ,WAAa,SAAS,EAC1G,SAAAH,CAAA,CACH,EACCC,EACCS,EAAAA,IAAC,IAAA,CAAE,UAAWD,EAAAA,GAAG,2DAA4DN,EAAQ,cAAgB,SAAS,EAC3G,SAAAF,CAAA,CACH,EACE,IAAA,CAAA,CAAA,CAGV,CACF,EACAL,EAAY,YAAc"}
1
+ {"version":3,"file":"FeatureCard.cjs","sources":["../../../../src/components/Features/FeatureCard.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport type { FeatureCardProps } from \"./types\";\n\nexport const FeatureCard = forwardRef<HTMLDivElement, FeatureCardProps>(\n ({ className, icon, title, description, accent, large = false, ...props }, ref) => {\n const chipStyle = accent\n ? { backgroundColor: accent, color: `contrast-color(${accent})` }\n : undefined;\n\n return (\n <div\n ref={ref}\n className={cn(\n \"group relative flex h-full flex-col rounded-xl border border-border bg-surface p-7 transition-colors duration-200 hover:border-foreground/15\",\n className,\n )}\n {...props}\n >\n {icon ? (\n <div\n className={cn(\n \"mb-5 inline-flex h-10 w-10 items-center justify-center rounded-lg text-[1.05rem]\",\n !accent && \"bg-primary-soft text-primary\",\n )}\n style={chipStyle}\n >\n {icon}\n </div>\n ) : null}\n <h3 className={cn(\"font-display font-semibold tracking-tight text-foreground\", large ? \"text-2xl\" : \"text-lg\")}>\n {title}\n </h3>\n {description ? (\n <p className={cn(\"mt-2.5 text-pretty leading-relaxed text-muted-foreground\", large ? \"text-[15px]\" : \"text-sm\")}>\n {description}\n </p>\n ) : null}\n </div>\n );\n },\n);\nFeatureCard.displayName = \"FeatureCard\";"],"names":["FeatureCard","forwardRef","className","icon","title","description","accent","large","props","ref","chipStyle","jsxs","cn","jsx"],"mappings":"wKAIaA,EAAcC,EAAAA,WACzB,CAAC,CAAE,UAAAC,EAAW,KAAAC,EAAM,MAAAC,EAAO,YAAAC,EAAa,OAAAC,EAAQ,MAAAC,EAAQ,GAAO,GAAGC,CAAA,EAASC,IAAQ,CACjF,MAAMC,EAAYJ,EACd,CAAE,gBAAiBA,EAAQ,MAAO,kBAAkBA,CAAM,GAAA,EAC1D,OAEJ,OACEK,EAAAA,KAAC,MAAA,CACC,IAAAF,EACA,UAAWG,EAAAA,GACT,+IACAV,CAAA,EAED,GAAGM,EAEH,SAAA,CAAAL,EACCU,EAAAA,IAAC,MAAA,CACC,UAAWD,EAAAA,GACT,mFACA,CAACN,GAAU,8BAAA,EAEb,MAAOI,EAEN,SAAAP,CAAA,CAAA,EAED,KACJU,EAAAA,IAAC,MAAG,UAAWD,EAAAA,GAAG,4DAA6DL,EAAQ,WAAa,SAAS,EAC1G,SAAAH,CAAA,CACH,EACCC,EACCQ,EAAAA,IAAC,IAAA,CAAE,UAAWD,EAAAA,GAAG,2DAA4DL,EAAQ,cAAgB,SAAS,EAC3G,SAAAF,CAAA,CACH,EACE,IAAA,CAAA,CAAA,CAGV,CACF,EACAL,EAAY,YAAc"}
@@ -1,3 +1,2 @@
1
- "use client";
2
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),g=require("react"),o=require("../../../utils/cn.cjs"),y=require("../../../utils/useTokenForeground.cjs"),i=require("../parts.cjs"),c=g.forwardRef(({className:x,title:d,description:l,primaryAction:n,secondaryAction:r,media:h,meta:a,id:m,...u},p)=>{const t=y.useTokenForeground("--color-secondary");return e.jsxs("section",{ref:p,id:m,className:o.cn("relative w-full overflow-hidden bg-secondary",x),style:{color:t},...u,children:[e.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 grain opacity-[0.07] mix-blend-overlay"}),e.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-x-0 top-0 h-px bg-white/10"}),e.jsxs("div",{className:o.cn(i.heroContainer,"pt-28 pb-24 text-center sm:pt-36 sm:pb-32"),children:[e.jsx("h1",{className:"max-w-5xl font-display text-[2.9rem] font-semibold leading-[1.02] tracking-[-0.04em] text-balance sm:text-7xl lg:text-8xl",style:{color:t},children:d}),l?e.jsx("p",{className:"mx-auto mt-8 max-w-xl text-pretty leading-relaxed sm:text-lg",style:{color:t,opacity:.72},children:l}):null,n||r?e.jsx("div",{className:"mt-11 justify-center",children:e.jsx(i.HeroActions,{primaryAction:n,secondaryAction:r})}):null,a?e.jsx("ul",{className:"mt-16 flex flex-wrap items-center justify-center gap-x-10 gap-y-3",children:a.map(s=>e.jsxs("li",{className:"flex items-center gap-2 text-sm font-medium",style:{color:t,opacity:.72},children:[s.icon?e.jsx("span",{children:s.icon}):null,s.label]},s.label))}):null]})]})});c.displayName="HeroStatement";exports.HeroStatement=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),p=require("react"),o=require("../../../utils/cn.cjs"),n=require("../parts.cjs"),c=p.forwardRef(({className:i,title:x,description:r,primaryAction:l,secondaryAction:s,media:y,meta:a,id:d,...m},u)=>e.jsxs("section",{ref:u,id:d,className:o.cn("relative w-full overflow-hidden bg-secondary",i),style:{color:"contrast-color(rgb(var(--color-secondary)))"},...m,children:[e.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 grain opacity-[0.07] mix-blend-overlay"}),e.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-x-0 top-0 h-px bg-white/10"}),e.jsxs("div",{className:o.cn(n.heroContainer,"pt-28 pb-24 text-center sm:pt-36 sm:pb-32"),children:[e.jsx("h1",{className:"max-w-5xl font-display text-[2.9rem] font-semibold leading-[1.02] tracking-[-0.04em] text-balance sm:text-7xl lg:text-8xl",style:{color:"contrast-color(rgb(var(--color-secondary)))"},children:x}),r?e.jsx("p",{className:"mx-auto mt-8 max-w-xl text-pretty leading-relaxed sm:text-lg",style:{color:"contrast-color(rgb(var(--color-secondary)))",opacity:.72},children:r}):null,l||s?e.jsx("div",{className:"mt-11 justify-center",children:e.jsx(n.HeroActions,{primaryAction:l,secondaryAction:s})}):null,a?e.jsx("ul",{className:"mt-16 flex flex-wrap items-center justify-center gap-x-10 gap-y-3",children:a.map(t=>e.jsxs("li",{className:"flex items-center gap-2 text-sm font-medium",style:{color:"contrast-color(rgb(var(--color-secondary)))",opacity:.72},children:[t.icon?e.jsx("span",{children:t.icon}):null,t.label]},t.label))}):null]})]}));c.displayName="HeroStatement";exports.HeroStatement=c;
3
2
  //# sourceMappingURL=Statement.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Statement.cjs","sources":["../../../../../src/components/Hero/variants/Statement.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"../../../utils/cn\";\nimport { useTokenForeground } from \"../../../utils/useTokenForeground\";\nimport { HeroActions, heroContainer } from \"../parts\";\nimport type { HeroProps } from \"../types\";\n\n/** Statement — full-bleed ink band. No eyebrow, pure message. */\nexport const HeroStatement = forwardRef<HTMLElement, HeroProps>(\n (\n { className, title, description, primaryAction, secondaryAction, media, meta, id, ...props },\n ref,\n ) => {\n // Statement paints its own background from --color-secondary, so the\n // readable text color must be derived from THAT token, not the brand.\n const fg = useTokenForeground(\"--color-secondary\");\n\n return (\n <section\n ref={ref}\n id={id}\n className={cn(\"relative w-full overflow-hidden bg-secondary\", className)}\n style={{ color: fg }}\n {...props}\n >\n <div aria-hidden className=\"pointer-events-none absolute inset-0 grain opacity-[0.07] mix-blend-overlay\" />\n <div aria-hidden className=\"pointer-events-none absolute inset-x-0 top-0 h-px bg-white/10\" />\n <div className={cn(heroContainer, \"pt-28 pb-24 text-center sm:pt-36 sm:pb-32\")}>\n <h1\n className=\"max-w-5xl font-display text-[2.9rem] font-semibold leading-[1.02] tracking-[-0.04em] text-balance sm:text-7xl lg:text-8xl\"\n style={{ color: fg }}\n >\n {title}\n </h1>\n {description ? (\n <p className=\"mx-auto mt-8 max-w-xl text-pretty leading-relaxed sm:text-lg\" style={{ color: fg, opacity: 0.72 }}>\n {description}\n </p>\n ) : null}\n {primaryAction || secondaryAction ? (\n <div className=\"mt-11 justify-center\">\n <HeroActions primaryAction={primaryAction} secondaryAction={secondaryAction} />\n </div>\n ) : null}\n {meta ? (\n <ul className=\"mt-16 flex flex-wrap items-center justify-center gap-x-10 gap-y-3\">\n {meta.map((m) => (\n <li key={m.label} className=\"flex items-center gap-2 text-sm font-medium\" style={{ color: fg, opacity: 0.72 }}>\n {m.icon ? <span>{m.icon}</span> : null}\n {m.label}\n </li>\n ))}\n </ul>\n ) : null}\n </div>\n </section>\n );\n },\n);\nHeroStatement.displayName = \"HeroStatement\";"],"names":["HeroStatement","forwardRef","className","title","description","primaryAction","secondaryAction","media","meta","id","props","ref","fg","useTokenForeground","jsxs","cn","jsx","heroContainer","HeroActions","m"],"mappings":"wPAQaA,EAAgBC,EAAAA,WAC3B,CACE,CAAE,UAAAC,EAAW,MAAAC,EAAO,YAAAC,EAAa,cA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/Statement.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport { cn } from \"../../../utils/cn\";\nimport { HeroActions, heroContainer } from \"../parts\";\nimport type { HeroProps } from \"../types\";\n\n/** Statement — full-bleed ink band. No eyebrow, pure message. */\nexport const HeroStatement = forwardRef<HTMLElement, HeroProps>(\n (\n { className, title, description, primaryAction, secondaryAction, media, meta, id, ...props },\n ref,\n ) => {\n // Statement paints its own background from --color-secondary, so the\n // readable text color is derived from THAT token via contrast-color().\n return (\n <section\n ref={ref}\n id={id}\n className={cn(\"relative w-full overflow-hidden bg-secondary\", className)}\n style={{ color: \"contrast-color(rgb(var(--color-secondary)))\" }}\n {...props}\n >\n <div aria-hidden className=\"pointer-events-none absolute inset-0 grain opacity-[0.07] mix-blend-overlay\" />\n <div aria-hidden className=\"pointer-events-none absolute inset-x-0 top-0 h-px bg-white/10\" />\n <div className={cn(heroContainer, \"pt-28 pb-24 text-center sm:pt-36 sm:pb-32\")}>\n <h1\n className=\"max-w-5xl font-display text-[2.9rem] font-semibold leading-[1.02] tracking-[-0.04em] text-balance sm:text-7xl lg:text-8xl\"\n style={{ color: \"contrast-color(rgb(var(--color-secondary)))\" }}\n >\n {title}\n </h1>\n {description ? (\n <p className=\"mx-auto mt-8 max-w-xl text-pretty leading-relaxed sm:text-lg\" style={{ color: \"contrast-color(rgb(var(--color-secondary)))\", opacity: 0.72 }}>\n {description}\n </p>\n ) : null}\n {primaryAction || secondaryAction ? (\n <div className=\"mt-11 justify-center\">\n <HeroActions primaryAction={primaryAction} secondaryAction={secondaryAction} />\n </div>\n ) : null}\n {meta ? (\n <ul className=\"mt-16 flex flex-wrap items-center justify-center gap-x-10 gap-y-3\">\n {meta.map((m) => (\n <li key={m.label} className=\"flex items-center gap-2 text-sm font-medium\" style={{ color: \"contrast-color(rgb(var(--color-secondary)))\", opacity: 0.72 }}>\n {m.icon ? <span>{m.icon}</span> : null}\n {m.label}\n </li>\n ))}\n </ul>\n ) : null}\n </div>\n </section>\n );\n },\n);\nHeroStatement.displayName = \"HeroStatement\";"],"names":["HeroStatement","forwardRef","className","title","description","primaryAction","secondaryAction","media","meta","id","props","ref","jsxs","cn","jsx","heroContainer","HeroActions","m"],"mappings":"qMAMaA,EAAgBC,EAAAA,WAC3B,CACE,CAAE,UAAAC,EAAW,MAAAC,EAAO,YAAAC,EAAa,cAAAC,EAAe,gBAAAC,EAAiB,MAAAC,EAAO,KAAAC,EAAM,GAAAC,EAAI,GAAGC,CAAA,EACrFC,IAKEC,EAAAA,KAAC,UAAA,CACC,IAAAD,EACA,GAAAF,EACA,UAAWI,EAAAA,GAAG,+CAAgDX,CAAS,EACvE,MAAO,CAAE,MAAO,6CAAA,EACf,GAAGQ,EAEJ,SAAA,CAAAI,EAAAA,IAAC,MAAA,CAAI,cAAW,GAAC,UAAU,8EAA8E,EACzGA,EAAAA,IAAC,MAAA,CAAI,cAAW,GAAC,UAAU,gEAAgE,SAC1F,MAAA,CAAI,UAAWD,EAAAA,GAAGE,gBAAe,2CAA2C,EAC3E,SAAA,CAAAD,EAAAA,IAAC,KAAA,CACC,UAAU,4HACV,MAAO,CAAE,MAAO,6CAAA,EAEf,SAAAX,CAAA,CAAA,EAEFC,EACCU,EAAAA,IAAC,IAAA,CAAE,UAAU,+DAA+D,MAAO,CAAE,MAAO,8CAA+C,QAAS,GAAA,EACjJ,WACH,EACE,KACHT,GAAiBC,EAChBQ,EAAAA,IAAC,MAAA,CAAI,UAAU,uBACb,SAAAA,EAAAA,IAACE,EAAAA,YAAA,CAAY,cAAAX,EAA8B,gBAAAC,CAAA,CAAkC,CAAA,CAC/E,EACE,KACHE,EACCM,EAAAA,IAAC,KAAA,CAAG,UAAU,oEACX,SAAAN,EAAK,IAAKS,UACR,KAAA,CAAiB,UAAU,8CAA8C,MAAO,CAAE,MAAO,8CAA+C,QAAS,KAC/I,SAAA,CAAAA,EAAE,KAAOH,EAAAA,IAAC,OAAA,CAAM,SAAAG,EAAE,KAAK,EAAU,KACjCA,EAAE,KAAA,CAAA,EAFIA,EAAE,KAGX,CACD,CAAA,CACH,EACE,IAAA,CAAA,CACN,CAAA,CAAA,CAAA,CAIR,EACAjB,EAAc,YAAc"}
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("react"),s=require("../../utils/cn.cjs"),J=require("../../utils/contrast.cjs"),x=require("../../icons.cjs"),B="text-on-secondary",b="text-foreground",Q={classic:{shell:"border-b border-border bg-background/85 backdrop-blur-md supports-[backdrop-filter]:bg-background/75",bar:"mx-auto max-w-6xl px-5 sm:px-8",header:"px-0",trigger:"text-muted-foreground hover:text-foreground hover:bg-surface",triggerOpen:"bg-surface text-foreground",badge:"bg-primary-soft text-primary",panel:"border-border bg-surface shadow-raised",columnTitle:"text-muted-foreground/70",columnLink:"hover:bg-surface-strong",linkDescription:"text-muted-foreground",mobilePanel:"border-t border-border bg-background",mobileButton:`${b} hover:bg-surface`,mobileLink:"text-muted-foreground hover:bg-surface hover:text-foreground",brandText:b,brandDot:"bg-foreground"},floating:{shell:"px-0",bar:"mx-auto mt-3 max-w-5xl rounded-xl border border-border bg-surface/90 px-5 shadow-soft backdrop-blur-md supports-[backdrop-filter]:bg-surface/70",header:"px-3 sm:px-6",trigger:"text-muted-foreground hover:text-foreground hover:bg-surface",triggerOpen:"bg-surface text-foreground",badge:"bg-primary-soft text-primary",panel:"border-border bg-surface shadow-raised",columnTitle:"text-muted-foreground/70",columnLink:"hover:bg-surface-strong",linkDescription:"text-muted-foreground",mobilePanel:"mx-3 mb-3 max-w-5xl overflow-hidden rounded-b-xl border border-border bg-surface",mobileButton:`${b} hover:bg-surface`,mobileLink:"text-muted-foreground hover:bg-surface hover:text-foreground",brandText:b,brandDot:"bg-foreground"},inverse:{shell:"border-b border-white/10 bg-[#101010]/85 backdrop-blur-md",bar:"mx-auto max-w-6xl px-5 sm:px-8",header:"px-0",trigger:"text-on-secondary/60 hover:text-on-secondary hover:bg-white/10",triggerOpen:"bg-white/10 text-on-secondary",badge:"bg-white/15 text-on-secondary",panel:"border-white/10 bg-[#161616]",columnTitle:"text-on-secondary/45",columnLink:"hover:bg-white/10",linkDescription:"text-on-secondary/50",mobilePanel:"border-t border-white/10 bg-[#101010]",mobileButton:`${B} hover:bg-white/10`,mobileLink:"text-on-secondary/70 hover:bg-white/10 hover:text-on-secondary",brandText:B,brandDot:"bg-on-secondary"}},$=({className:q,variant:w="classic",brand:p,logo:E,logoSrc:k,logoAlt:_,logoClassName:I,brandHref:S="#",items:g,actions:m,cta:h,languageSwitcher:f,sticky:z=!0,LinkComponent:A,onKeyDown:v,...F})=>{const R=u.useId(),d=A??"a",[M,i]=u.useState(null),[c,j]=u.useState(!1),[y,C]=u.useState(null),o=Q[w],X=()=>i(null),N=()=>{i(null),j(!1),C(null)},L=r=>`${R}-panel-${r}`,T=E??(k?e.jsx("img",{src:k,alt:_??(typeof p=="string"?p:"Logo"),className:s.cn("h-7 w-auto",I)}):null),G=T?e.jsx("span",{className:"flex items-center",children:T}):e.jsxs("span",{className:s.cn("flex items-center gap-2 font-display text-[17px] font-bold tracking-tight",o.brandText),children:[e.jsx("span",{"aria-hidden":!0,className:s.cn("inline-block h-2.5 w-2.5 rounded-sm",o.brandDot)}),p]}),O=s.cn("flex items-center gap-1.5 rounded-md px-3 py-2 text-sm font-medium transition-colors duration-150",o.trigger),D=r=>{var l;return e.jsx("div",{className:s.cn("grid gap-x-10 gap-y-8 sm:grid-cols-2",r.featured?"":"lg:grid-cols-3"),children:(l=r.columns)==null?void 0:l.map((n,t)=>e.jsxs("div",{children:[n.title?e.jsx("h4",{className:s.cn("text-xs font-semibold uppercase tracking-[0.14em]",o.columnTitle),children:n.title}):null,e.jsx("ul",{className:s.cn(n.title&&"mt-3","space-y-0.5"),children:n.links.map(a=>e.jsx("li",{children:e.jsxs(d,{href:a.href,onClick:N,target:a.external?"_blank":void 0,rel:a.external?"noopener noreferrer":void 0,className:s.cn("-mx-2 block rounded-md px-2 py-2 transition-colors duration-150",o.columnLink),children:[e.jsx("span",{className:"block text-sm font-medium text-foreground",children:a.label}),a.description?e.jsx("span",{className:s.cn("mt-0.5 block text-[13px] leading-snug",o.linkDescription),children:a.description}):null]})},a.href))})]},n.title??t))})},P=(r,l=!1)=>{const n=r.featured;if(!n)return null;const t=n.accent?{backgroundColor:n.accent,color:J.getContrastText(n.accent)}:void 0;return e.jsxs(d,{href:n.href,onClick:N,target:n.external?"_blank":void 0,rel:n.external?"noopener noreferrer":void 0,className:s.cn("group relative block overflow-hidden rounded-lg p-6 transition-transform duration-150 hover:-translate-y-0.5",l&&"mt-8",!n.accent&&"bg-primary text-on-primary"),style:t,children:[e.jsxs("div",{className:"flex h-full flex-col justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"font-display text-base font-semibold tracking-tight",children:n.title}),n.description?e.jsx("p",{className:"mt-1.5 text-[13px] leading-relaxed opacity-80",children:n.description}):null]}),n.cta?e.jsxs("span",{className:"text-sm font-semibold underline decoration-1 underline-offset-4",children:[n.cta," →"]}):null]}),e.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute -right-8 -top-8 h-28 w-28 rounded-full opacity-20 blur-2xl bg-black/40"})]})},H=r=>{r.key==="Escape"&&N(),v==null||v(r)};return e.jsxs("header",{className:s.cn("relative w-full transition-colors duration-200",z&&"sticky top-0 z-50",o.shell,o.header,q),onKeyDown:H,...F,children:[e.jsxs("nav",{className:s.cn("relative flex h-16 w-full items-center justify-between gap-4 transition-colors duration-200",o.bar),onMouseLeave:X,"aria-label":"Mega menu",children:[e.jsx(d,{href:S,className:"shrink-0",children:G}),e.jsx("ul",{className:"hidden items-center gap-1 lg:flex",children:g.map((r,l)=>{var a;const n=!!((a=r.columns)!=null&&a.length||r.featured),t=M===l;return e.jsx("li",{className:"relative",children:n?e.jsxs("button",{type:"button","aria-haspopup":"true","aria-expanded":t,"aria-controls":L(l),onClick:()=>i(t?null:l),onMouseEnter:()=>i(l),className:s.cn(O,t&&o.triggerOpen),children:[e.jsxs("span",{className:"flex items-center gap-1.5",children:[r.label,r.badge?e.jsx("span",{className:s.cn("rounded-full px-1.5 py-0.5 text-[10px] font-semibold tracking-wide",o.badge),children:r.badge}):null]}),e.jsx(x.ChevronDown,{className:s.cn("h-4 w-4 shrink-0 transition-transform duration-150",t&&"rotate-180")})]}):e.jsxs(d,{href:r.href??"#",target:r.external?"_blank":void 0,rel:r.external?"noopener noreferrer":void 0,className:O,children:[r.label,r.badge?e.jsx("span",{className:s.cn("rounded-full px-1.5 py-0.5 text-[10px] font-semibold tracking-wide",o.badge),children:r.badge}):null]})},r.label)})}),e.jsxs("div",{className:"hidden items-center gap-3 lg:flex",children:[f,m,h]}),e.jsx("button",{type:"button","aria-label":c?"Close menu":"Open menu","aria-expanded":c,onClick:()=>j(r=>!r),className:s.cn("inline-flex h-10 w-10 shrink-0 cursor-pointer items-center justify-center rounded-md lg:hidden","transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",o.mobileButton),children:c?e.jsx(x.X,{className:"h-5 w-5"}):e.jsx(x.Menu,{className:"h-5 w-5"})})]}),g.map((r,l)=>{var t;if(!((t=r.columns)!=null&&t.length)&&!r.featured)return null;const n=M===l;return e.jsx("div",{id:L(l),role:"region","aria-label":`${r.label} menu`,onMouseEnter:()=>i(l),className:s.cn("absolute top-full z-50 pt-2 transition-all duration-150",w==="floating"?"inset-x-0 mx-auto w-full max-w-5xl":"inset-x-0",n?"visible translate-y-0 opacity-100":"pointer-events-none invisible -translate-y-1 opacity-0"),children:e.jsxs("div",{className:s.cn("overflow-hidden rounded-xl border p-6 md:p-8",o.panel,r.featured?"lg:grid lg:grid-cols-[minmax(0,1fr)_auto] lg:gap-12":""),children:[D(r),r.featured&&e.jsx("div",{className:s.cn("mt-8 max-w-sm lg:mt-0 lg:w-64"),children:P(r)})]})},r.label)}),e.jsx("div",{className:s.cn("grid transition-[grid-template-rows,opacity] duration-200 lg:hidden",c?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0",o.mobilePanel),children:e.jsx("div",{className:"min-h-0 overflow-hidden",children:e.jsxs("ul",{className:"flex flex-col py-4",children:[f?e.jsx("li",{className:"px-5 pb-4",children:f}):null,g.map((r,l)=>{var n;return(n=r.columns)!=null&&n.length||r.featured?e.jsxs("li",{className:"px-5",children:[e.jsxs("button",{type:"button","aria-expanded":y===l,onClick:()=>C(t=>t===l?null:l),className:s.cn("flex w-full items-center justify-between rounded-md px-2 py-2.5 text-sm font-medium transition-colors duration-150",o.mobileButton),children:[e.jsxs("span",{className:"flex items-center gap-2",children:[r.label,r.badge?e.jsx("span",{className:s.cn("rounded-full px-1.5 py-0.5 text-[10px] font-semibold tracking-wide",o.badge),children:r.badge}):null]}),e.jsx(x.ChevronDown,{className:s.cn("h-4 w-4 shrink-0 transition-transform duration-150",y===l&&"rotate-180")})]}),e.jsx("div",{className:s.cn("grid transition-[grid-template-rows,opacity] duration-200",y===l?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"),children:e.jsx("div",{className:"min-h-0 overflow-hidden",children:e.jsxs("div",{className:"py-2 pl-1",children:[D(r),r.featured?e.jsx("div",{className:"max-w-sm",children:P(r,!0)}):null]})})})]},r.label):e.jsx("li",{className:"px-5",children:e.jsx(d,{href:r.href??"#",target:r.external?"_blank":void 0,rel:r.external?"noopener noreferrer":void 0,onClick:()=>j(!1),className:s.cn("block rounded-md px-2 py-2.5 text-sm font-medium transition-colors duration-150",o.mobileLink),children:r.label})},r.label)}),h?e.jsx("li",{className:"px-8 pb-2 pt-3",children:h}):m?e.jsx("li",{className:"mt-3 flex flex-wrap gap-3 px-8 pb-2",children:m}):null]})})})]})};$.displayName="MegaMenu";exports.MegaMenu=$;
2
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("react"),s=require("../../utils/cn.cjs"),x=require("../../icons.cjs"),$="text-on-secondary",b="text-foreground",J={classic:{shell:"border-b border-border bg-background/85 backdrop-blur-md supports-[backdrop-filter]:bg-background/75",bar:"mx-auto max-w-6xl px-5 sm:px-8",header:"px-0",trigger:"text-muted-foreground hover:text-foreground hover:bg-surface",triggerOpen:"bg-surface text-foreground",badge:"bg-primary-soft text-primary",panel:"border-border bg-surface shadow-raised",columnTitle:"text-muted-foreground/70",columnLink:"hover:bg-surface-strong",linkDescription:"text-muted-foreground",mobilePanel:"border-t border-border bg-background",mobileButton:`${b} hover:bg-surface`,mobileLink:"text-muted-foreground hover:bg-surface hover:text-foreground",brandText:b,brandDot:"bg-foreground"},floating:{shell:"px-0",bar:"mx-auto mt-3 max-w-5xl rounded-xl border border-border bg-surface/90 px-5 shadow-soft backdrop-blur-md supports-[backdrop-filter]:bg-surface/70",header:"px-3 sm:px-6",trigger:"text-muted-foreground hover:text-foreground hover:bg-surface",triggerOpen:"bg-surface text-foreground",badge:"bg-primary-soft text-primary",panel:"border-border bg-surface shadow-raised",columnTitle:"text-muted-foreground/70",columnLink:"hover:bg-surface-strong",linkDescription:"text-muted-foreground",mobilePanel:"mx-3 mb-3 max-w-5xl overflow-hidden rounded-b-xl border border-border bg-surface",mobileButton:`${b} hover:bg-surface`,mobileLink:"text-muted-foreground hover:bg-surface hover:text-foreground",brandText:b,brandDot:"bg-foreground"},inverse:{shell:"border-b border-white/10 bg-[#101010]/85 backdrop-blur-md",bar:"mx-auto max-w-6xl px-5 sm:px-8",header:"px-0",trigger:"text-on-secondary/60 hover:text-on-secondary hover:bg-white/10",triggerOpen:"bg-white/10 text-on-secondary",badge:"bg-white/15 text-on-secondary",panel:"border-white/10 bg-[#161616]",columnTitle:"text-on-secondary/45",columnLink:"hover:bg-white/10",linkDescription:"text-on-secondary/50",mobilePanel:"border-t border-white/10 bg-[#101010]",mobileButton:`${$} hover:bg-white/10`,mobileLink:"text-on-secondary/70 hover:bg-white/10 hover:text-on-secondary",brandText:$,brandDot:"bg-on-secondary"}},B=({className:E,variant:w="classic",brand:p,logo:_,logoSrc:k,logoAlt:q,logoClassName:I,brandHref:S="#",items:g,actions:m,cta:h,languageSwitcher:f,sticky:z=!0,LinkComponent:A,onKeyDown:v,...F})=>{const R=u.useId(),d=A??"a",[M,i]=u.useState(null),[c,j]=u.useState(!1),[y,C]=u.useState(null),o=J[w],X=()=>i(null),N=()=>{i(null),j(!1),C(null)},L=r=>`${R}-panel-${r}`,O=_??(k?e.jsx("img",{src:k,alt:q??(typeof p=="string"?p:"Logo"),className:s.cn("h-7 w-auto",I)}):null),G=O?e.jsx("span",{className:"flex items-center",children:O}):e.jsxs("span",{className:s.cn("flex items-center gap-2 font-display text-[17px] font-bold tracking-tight",o.brandText),children:[e.jsx("span",{"aria-hidden":!0,className:s.cn("inline-block h-2.5 w-2.5 rounded-sm",o.brandDot)}),p]}),T=s.cn("flex items-center gap-1.5 rounded-md px-3 py-2 text-sm font-medium transition-colors duration-150",o.trigger),D=r=>{var l;return e.jsx("div",{className:s.cn("grid gap-x-10 gap-y-8 sm:grid-cols-2",r.featured?"":"lg:grid-cols-3"),children:(l=r.columns)==null?void 0:l.map((n,a)=>e.jsxs("div",{children:[n.title?e.jsx("h4",{className:s.cn("text-xs font-semibold uppercase tracking-[0.14em]",o.columnTitle),children:n.title}):null,e.jsx("ul",{className:s.cn(n.title&&"mt-3","space-y-0.5"),children:n.links.map(t=>e.jsx("li",{children:e.jsxs(d,{href:t.href,onClick:N,target:t.external?"_blank":void 0,rel:t.external?"noopener noreferrer":void 0,className:s.cn("-mx-2 block rounded-md px-2 py-2 transition-colors duration-150",o.columnLink),children:[e.jsx("span",{className:"block text-sm font-medium text-foreground",children:t.label}),t.description?e.jsx("span",{className:s.cn("mt-0.5 block text-[13px] leading-snug",o.linkDescription),children:t.description}):null]})},t.href))})]},n.title??a))})},P=(r,l=!1)=>{const n=r.featured;if(!n)return null;const a=n.accent?{backgroundColor:n.accent,color:`contrast-color(${n.accent})`}:void 0;return e.jsxs(d,{href:n.href,onClick:N,target:n.external?"_blank":void 0,rel:n.external?"noopener noreferrer":void 0,className:s.cn("group relative block overflow-hidden rounded-lg p-6 transition-transform duration-150 hover:-translate-y-0.5",l&&"mt-8",!n.accent&&"bg-primary text-on-primary"),style:a,children:[e.jsxs("div",{className:"flex h-full flex-col justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"font-display text-base font-semibold tracking-tight",children:n.title}),n.description?e.jsx("p",{className:"mt-1.5 text-[13px] leading-relaxed opacity-80",children:n.description}):null]}),n.cta?e.jsxs("span",{className:"text-sm font-semibold underline decoration-1 underline-offset-4",children:[n.cta," →"]}):null]}),e.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute -right-8 -top-8 h-28 w-28 rounded-full opacity-20 blur-2xl bg-black/40"})]})},H=r=>{r.key==="Escape"&&N(),v==null||v(r)};return e.jsxs("header",{className:s.cn("relative w-full transition-colors duration-200",z&&"sticky top-0 z-50",o.shell,o.header,E),onKeyDown:H,...F,children:[e.jsxs("nav",{className:s.cn("relative flex h-16 w-full items-center justify-between gap-4 transition-colors duration-200",o.bar),onMouseLeave:X,"aria-label":"Mega menu",children:[e.jsx(d,{href:S,className:"shrink-0",children:G}),e.jsx("ul",{className:"hidden items-center gap-1 lg:flex",children:g.map((r,l)=>{var t;const n=!!((t=r.columns)!=null&&t.length||r.featured),a=M===l;return e.jsx("li",{className:"relative",children:n?e.jsxs("button",{type:"button","aria-haspopup":"true","aria-expanded":a,"aria-controls":L(l),onClick:()=>i(a?null:l),onMouseEnter:()=>i(l),className:s.cn(T,a&&o.triggerOpen),children:[e.jsxs("span",{className:"flex items-center gap-1.5",children:[r.label,r.badge?e.jsx("span",{className:s.cn("rounded-full px-1.5 py-0.5 text-[10px] font-semibold tracking-wide",o.badge),children:r.badge}):null]}),e.jsx(x.ChevronDown,{className:s.cn("h-4 w-4 shrink-0 transition-transform duration-150",a&&"rotate-180")})]}):e.jsxs(d,{href:r.href??"#",target:r.external?"_blank":void 0,rel:r.external?"noopener noreferrer":void 0,className:T,children:[r.label,r.badge?e.jsx("span",{className:s.cn("rounded-full px-1.5 py-0.5 text-[10px] font-semibold tracking-wide",o.badge),children:r.badge}):null]})},r.label)})}),e.jsxs("div",{className:"hidden items-center gap-3 lg:flex",children:[f,m,h]}),e.jsx("button",{type:"button","aria-label":c?"Close menu":"Open menu","aria-expanded":c,onClick:()=>j(r=>!r),className:s.cn("inline-flex h-10 w-10 shrink-0 cursor-pointer items-center justify-center rounded-md lg:hidden","transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",o.mobileButton),children:c?e.jsx(x.X,{className:"h-5 w-5"}):e.jsx(x.Menu,{className:"h-5 w-5"})})]}),g.map((r,l)=>{var a;if(!((a=r.columns)!=null&&a.length)&&!r.featured)return null;const n=M===l;return e.jsx("div",{id:L(l),role:"region","aria-label":`${r.label} menu`,onMouseEnter:()=>i(l),className:s.cn("absolute top-full z-50 pt-2 transition-all duration-150",w==="floating"?"inset-x-0 mx-auto w-full max-w-5xl":"inset-x-0",n?"visible translate-y-0 opacity-100":"pointer-events-none invisible -translate-y-1 opacity-0"),children:e.jsxs("div",{className:s.cn("overflow-hidden rounded-xl border p-6 md:p-8",o.panel,r.featured?"lg:grid lg:grid-cols-[minmax(0,1fr)_auto] lg:gap-12":""),children:[D(r),r.featured&&e.jsx("div",{className:s.cn("mt-8 max-w-sm lg:mt-0 lg:w-64"),children:P(r)})]})},r.label)}),e.jsx("div",{className:s.cn("grid transition-[grid-template-rows,opacity] duration-200 lg:hidden",c?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0",o.mobilePanel),children:e.jsx("div",{className:"min-h-0 overflow-hidden",children:e.jsxs("ul",{className:"flex flex-col py-4",children:[f?e.jsx("li",{className:"px-5 pb-4",children:f}):null,g.map((r,l)=>{var n;return(n=r.columns)!=null&&n.length||r.featured?e.jsxs("li",{className:"px-5",children:[e.jsxs("button",{type:"button","aria-expanded":y===l,onClick:()=>C(a=>a===l?null:l),className:s.cn("flex w-full items-center justify-between rounded-md px-2 py-2.5 text-sm font-medium transition-colors duration-150",o.mobileButton),children:[e.jsxs("span",{className:"flex items-center gap-2",children:[r.label,r.badge?e.jsx("span",{className:s.cn("rounded-full px-1.5 py-0.5 text-[10px] font-semibold tracking-wide",o.badge),children:r.badge}):null]}),e.jsx(x.ChevronDown,{className:s.cn("h-4 w-4 shrink-0 transition-transform duration-150",y===l&&"rotate-180")})]}),e.jsx("div",{className:s.cn("grid transition-[grid-template-rows,opacity] duration-200",y===l?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"),children:e.jsx("div",{className:"min-h-0 overflow-hidden",children:e.jsxs("div",{className:"py-2 pl-1",children:[D(r),r.featured?e.jsx("div",{className:"max-w-sm",children:P(r,!0)}):null]})})})]},r.label):e.jsx("li",{className:"px-5",children:e.jsx(d,{href:r.href??"#",target:r.external?"_blank":void 0,rel:r.external?"noopener noreferrer":void 0,onClick:()=>j(!1),className:s.cn("block rounded-md px-2 py-2.5 text-sm font-medium transition-colors duration-150",o.mobileLink),children:r.label})},r.label)}),h?e.jsx("li",{className:"px-8 pb-2 pt-3",children:h}):m?e.jsx("li",{className:"mt-3 flex flex-wrap gap-3 px-8 pb-2",children:m}):null]})})})]})};B.displayName="MegaMenu";exports.MegaMenu=B;
3
3
  //# sourceMappingURL=MegaMenu.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"MegaMenu.cjs","sources":["../../../../src/components/MegaMenu/MegaMenu.tsx"],"sourcesContent":["\"use client\";\nimport { useId, useState } from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { getContrastText } from \"../../utils/contrast\";\nimport { ChevronDown, Menu, X } from \"../../icons\";\nimport type { MegaMenuProps, MegaMenuVariant, MegaMenuItem } from \"./types\";\n\ninterface MegaMenuStyle {\n shell: string;\n bar: string;\n header: string;\n trigger: string;\n triggerOpen: string;\n badge: string;\n panel: string;\n columnTitle: string;\n columnLink: string;\n linkDescription: string;\n mobilePanel: string;\n mobileButton: string;\n mobileLink: string;\n brandText: string;\n brandDot: string;\n}\n\nconst inverse = \"text-on-secondary\";\nconst light = \"text-foreground\";\n\nconst styles: Record<MegaMenuVariant, MegaMenuStyle> = {\n classic: {\n shell: \"border-b border-border bg-background/85 backdrop-blur-md supports-[backdrop-filter]:bg-background/75\",\n bar: \"mx-auto max-w-6xl px-5 sm:px-8\",\n header: \"px-0\",\n trigger: \"text-muted-foreground hover:text-foreground hover:bg-surface\",\n triggerOpen: \"bg-surface text-foreground\",\n badge: \"bg-primary-soft text-primary\",\n panel: \"border-border bg-surface shadow-raised\",\n columnTitle: \"text-muted-foreground/70\",\n columnLink: \"hover:bg-surface-strong\",\n linkDescription: \"text-muted-foreground\",\n mobilePanel: \"border-t border-border bg-background\",\n mobileButton: `${light} hover:bg-surface`,\n mobileLink: \"text-muted-foreground hover:bg-surface hover:text-foreground\",\n brandText: light,\n brandDot: \"bg-foreground\",\n },\n floating: {\n shell: \"px-0\",\n bar: \"mx-auto mt-3 max-w-5xl rounded-xl border border-border bg-surface/90 px-5 shadow-soft backdrop-blur-md supports-[backdrop-filter]:bg-surface/70\",\n header: \"px-3 sm:px-6\",\n trigger: \"text-muted-foreground hover:text-foreground hover:bg-surface\",\n triggerOpen: \"bg-surface text-foreground\",\n badge: \"bg-primary-soft text-primary\",\n panel: \"border-border bg-surface shadow-raised\",\n columnTitle: \"text-muted-foreground/70\",\n columnLink: \"hover:bg-surface-strong\",\n linkDescription: \"text-muted-foreground\",\n mobilePanel: \"mx-3 mb-3 max-w-5xl overflow-hidden rounded-b-xl border border-border bg-surface\",\n mobileButton: `${light} hover:bg-surface`,\n mobileLink: \"text-muted-foreground hover:bg-surface hover:text-foreground\",\n brandText: light,\n brandDot: \"bg-foreground\",\n },\n inverse: {\n shell: \"border-b border-white/10 bg-[#101010]/85 backdrop-blur-md\",\n bar: \"mx-auto max-w-6xl px-5 sm:px-8\",\n header: \"px-0\",\n trigger: \"text-on-secondary/60 hover:text-on-secondary hover:bg-white/10\",\n triggerOpen: \"bg-white/10 text-on-secondary\",\n badge: \"bg-white/15 text-on-secondary\",\n panel: \"border-white/10 bg-[#161616]\",\n columnTitle: \"text-on-secondary/45\",\n columnLink: \"hover:bg-white/10\",\n linkDescription: \"text-on-secondary/50\",\n mobilePanel: \"border-t border-white/10 bg-[#101010]\",\n mobileButton: `${inverse} hover:bg-white/10`,\n mobileLink: \"text-on-secondary/70 hover:bg-white/10 hover:text-on-secondary\",\n brandText: inverse,\n brandDot: \"bg-on-secondary\",\n },\n};\n\nexport const MegaMenu = ({\n className,\n variant = \"classic\",\n brand,\n logo,\n logoSrc,\n logoAlt,\n logoClassName,\n brandHref = \"#\",\n items,\n actions,\n cta,\n languageSwitcher,\n sticky = true,\n LinkComponent,\n onKeyDown,\n ...props\n}: MegaMenuProps) => {\n const ids = useId();\n const Link = LinkComponent ?? \"a\";\n const [openIndex, setOpenIndex] = useState<number | null>(null);\n const [mobileOpen, setMobileOpen] = useState(false);\n const [mobileExpanded, setMobileExpanded] = useState<number | null>(null);\n const s = styles[variant];\n\n const closePanels = () => setOpenIndex(null);\n const closeAll = () => {\n setOpenIndex(null);\n setMobileOpen(false);\n setMobileExpanded(null);\n };\n\n const panelId = (i: number) => `${ids}-panel-${i}`;\n\n const logoNode =\n logo ??\n (logoSrc ? (\n <img\n src={logoSrc}\n alt={logoAlt ?? (typeof brand === \"string\" ? brand : \"Logo\")}\n className={cn(\"h-7 w-auto\", logoClassName)}\n />\n ) : null);\n\n const brandNode = logoNode ? (\n <span className=\"flex items-center\">{logoNode}</span>\n ) : (\n <span className={cn(\"flex items-center gap-2 font-display text-[17px] font-bold tracking-tight\", s.brandText)}>\n <span aria-hidden className={cn(\"inline-block h-2.5 w-2.5 rounded-sm\", s.brandDot)} />\n {brand}\n </span>\n );\n\n const triggerClasses = cn(\n \"flex items-center gap-1.5 rounded-md px-3 py-2 text-sm font-medium transition-colors duration-150\",\n s.trigger,\n );\n\n const renderColumns = (item: MegaMenuItem) => (\n <div\n className={cn(\n \"grid gap-x-10 gap-y-8 sm:grid-cols-2\",\n item.featured ? \"\" : \"lg:grid-cols-3\",\n )}\n >\n {item.columns?.map((column, ci) => (\n <div key={column.title ?? ci}>\n {column.title ? (\n <h4\n className={cn(\n \"text-xs font-semibold uppercase tracking-[0.14em]\",\n s.columnTitle,\n )}\n >\n {column.title}\n </h4>\n ) : null}\n <ul className={cn(column.title && \"mt-3\", \"space-y-0.5\")}>\n {column.links.map((link) => (\n <li key={link.href}>\n <Link\n href={link.href}\n onClick={closeAll}\n target={link.external ? \"_blank\" : undefined}\n rel={link.external ? \"noopener noreferrer\" : undefined}\n className={cn(\n \"-mx-2 block rounded-md px-2 py-2 transition-colors duration-150\",\n s.columnLink,\n )}\n >\n <span className=\"block text-sm font-medium text-foreground\">\n {link.label}\n </span>\n {link.description ? (\n <span\n className={cn(\n \"mt-0.5 block text-[13px] leading-snug\",\n s.linkDescription,\n )}\n >\n {link.description}\n </span>\n ) : null}\n </Link>\n </li>\n ))}\n </ul>\n </div>\n ))}\n </div>\n );\n\n const renderFeatured = (item: MegaMenuItem, mobile = false) => {\n const featured = item.featured;\n if (!featured) return null;\n const featuredStyle = featured.accent\n ? { backgroundColor: featured.accent, color: getContrastText(featured.accent) }\n : undefined;\n\n return (\n <Link\n href={featured.href}\n onClick={closeAll}\n target={featured.external ? \"_blank\" : undefined}\n rel={featured.external ? \"noopener noreferrer\" : undefined}\n className={cn(\n \"group relative block overflow-hidden rounded-lg p-6 transition-transform duration-150 hover:-translate-y-0.5\",\n mobile && \"mt-8\",\n !featured.accent && \"bg-primary text-on-primary\",\n )}\n style={featuredStyle}\n >\n <div className=\"flex h-full flex-col justify-between gap-4\">\n <div>\n <h4 className=\"font-display text-base font-semibold tracking-tight\">\n {featured.title}\n </h4>\n {featured.description ? (\n <p className=\"mt-1.5 text-[13px] leading-relaxed opacity-80\">\n {featured.description}\n </p>\n ) : null}\n </div>\n {featured.cta ? (\n <span className=\"text-sm font-semibold underline decoration-1 underline-offset-4\">\n {featured.cta} →\n </span>\n ) : null}\n </div>\n <div\n aria-hidden\n className=\"pointer-events-none absolute -right-8 -top-8 h-28 w-28 rounded-full opacity-20 blur-2xl bg-black/40\"\n />\n </Link>\n );\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLElement>) => {\n if (event.key === \"Escape\") {\n closeAll();\n }\n onKeyDown?.(event);\n };\n\n return (\n <header\n className={cn(\n \"relative w-full transition-colors duration-200\",\n sticky && \"sticky top-0 z-50\",\n s.shell,\n s.header,\n className,\n )}\n onKeyDown={handleKeyDown}\n {...props}\n >\n <nav className={cn(\"relative flex h-16 w-full items-center justify-between gap-4 transition-colors duration-200\", s.bar)} onMouseLeave={closePanels} aria-label=\"Mega menu\">\n <Link href={brandHref} className=\"shrink-0\">\n {brandNode}\n </Link>\n\n <ul className=\"hidden items-center gap-1 lg:flex\">\n {items.map((item, i) => {\n const hasPanel = Boolean(item.columns?.length || item.featured);\n const open = openIndex === i;\n return (\n <li key={item.label} className=\"relative\">\n {hasPanel ? (\n <button\n type=\"button\"\n aria-haspopup=\"true\"\n aria-expanded={open}\n aria-controls={panelId(i)}\n onClick={() => setOpenIndex(open ? null : i)}\n onMouseEnter={() => setOpenIndex(i)}\n className={cn(triggerClasses, open && s.triggerOpen)}\n >\n <span className=\"flex items-center gap-1.5\">\n {item.label}\n {item.badge ? (\n <span\n className={cn(\n \"rounded-full px-1.5 py-0.5 text-[10px] font-semibold tracking-wide\",\n s.badge,\n )}\n >\n {item.badge}\n </span>\n ) : null}\n </span>\n <ChevronDown\n className={cn(\n \"h-4 w-4 shrink-0 transition-transform duration-150\",\n open && \"rotate-180\",\n )}\n />\n </button>\n ) : (\n <Link href={item.href ?? \"#\"} target={item.external ? \"_blank\" : undefined} rel={item.external ? \"noopener noreferrer\" : undefined} className={triggerClasses}>\n {item.label}\n {item.badge ? (\n <span className={cn(\"rounded-full px-1.5 py-0.5 text-[10px] font-semibold tracking-wide\", s.badge)}>\n {item.badge}\n </span>\n ) : null}\n </Link>\n )}\n </li>\n );\n })}\n </ul>\n\n <div className=\"hidden items-center gap-3 lg:flex\">\n {languageSwitcher}\n {actions}\n {cta}\n </div>\n\n <button\n type=\"button\"\n aria-label={mobileOpen ? \"Close menu\" : \"Open menu\"}\n aria-expanded={mobileOpen}\n onClick={() => setMobileOpen((o) => !o)}\n className={cn(\n \"inline-flex h-10 w-10 shrink-0 cursor-pointer items-center justify-center rounded-md lg:hidden\",\n \"transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\",\n s.mobileButton,\n )}\n >\n {mobileOpen ? <X className=\"h-5 w-5\" /> : <Menu className=\"h-5 w-5\" />}\n </button>\n </nav>\n\n {items.map((item, i) => {\n if (!item.columns?.length && !item.featured) return null;\n const open = openIndex === i;\n return (\n <div\n key={item.label}\n id={panelId(i)}\n role=\"region\"\n aria-label={`${item.label} menu`}\n onMouseEnter={() => setOpenIndex(i)}\n className={cn(\n \"absolute top-full z-50 pt-2 transition-all duration-150\",\n variant === \"floating\" ? \"inset-x-0 mx-auto w-full max-w-5xl\" : \"inset-x-0\",\n open\n ? \"visible translate-y-0 opacity-100\"\n : \"pointer-events-none invisible -translate-y-1 opacity-0\",\n )}\n >\n <div\n className={cn(\n \"overflow-hidden rounded-xl border p-6 md:p-8\",\n s.panel,\n item.featured ? \"lg:grid lg:grid-cols-[minmax(0,1fr)_auto] lg:gap-12\" : \"\",\n )}\n >\n {renderColumns(item)}\n {item.featured && (\n <div className={cn(\"mt-8 max-w-sm lg:mt-0 lg:w-64\")}>\n {renderFeatured(item)}\n </div>\n )}\n </div>\n </div>\n );\n })}\n\n <div\n className={cn(\n \"grid transition-[grid-template-rows,opacity] duration-200 lg:hidden\",\n mobileOpen ? \"grid-rows-[1fr] opacity-100\" : \"grid-rows-[0fr] opacity-0\",\n s.mobilePanel,\n )}\n >\n <div className=\"min-h-0 overflow-hidden\">\n <ul className=\"flex flex-col py-4\">\n {languageSwitcher ? (\n <li className=\"px-5 pb-4\">{languageSwitcher}</li>\n ) : null}\n {items.map((item, i) =>\n item.columns?.length || item.featured ? (\n <li key={item.label} className=\"px-5\">\n <button\n type=\"button\"\n aria-expanded={mobileExpanded === i}\n onClick={() =>\n setMobileExpanded((prev) => (prev === i ? null : i))\n }\n className={cn(\n \"flex w-full items-center justify-between rounded-md px-2 py-2.5 text-sm font-medium transition-colors duration-150\",\n s.mobileButton,\n )}\n >\n <span className=\"flex items-center gap-2\">\n {item.label}\n {item.badge ? (\n <span className={cn(\"rounded-full px-1.5 py-0.5 text-[10px] font-semibold tracking-wide\", s.badge)}>\n {item.badge}\n </span>\n ) : null}\n </span>\n <ChevronDown\n className={cn(\n \"h-4 w-4 shrink-0 transition-transform duration-150\",\n mobileExpanded === i && \"rotate-180\",\n )}\n />\n </button>\n <div\n className={cn(\n \"grid transition-[grid-template-rows,opacity] duration-200\",\n mobileExpanded === i\n ? \"grid-rows-[1fr] opacity-100\"\n : \"grid-rows-[0fr] opacity-0\",\n )}\n >\n <div className=\"min-h-0 overflow-hidden\">\n <div className=\"py-2 pl-1\">\n {renderColumns(item)}\n {item.featured ? (\n <div className=\"max-w-sm\">{renderFeatured(item, true)}</div>\n ) : null}\n </div>\n </div>\n </div>\n </li>\n ) : (\n <li key={item.label} className=\"px-5\">\n <Link\n href={item.href ?? \"#\"}\n target={item.external ? \"_blank\" : undefined}\n rel={item.external ? \"noopener noreferrer\" : undefined}\n onClick={() => setMobileOpen(false)}\n className={cn(\n \"block rounded-md px-2 py-2.5 text-sm font-medium transition-colors duration-150\",\n s.mobileLink,\n )}\n >\n {item.label}\n </Link>\n </li>\n ),\n )}\n {cta ? (\n <li className=\"px-8 pb-2 pt-3\">{cta}</li>\n ) : actions ? (\n <li className=\"mt-3 flex flex-wrap gap-3 px-8 pb-2\">{actions}</li>\n ) : null}\n </ul>\n </div>\n </div>\n </header>\n );\n};\nMegaMenu.displayName = \"MegaMenu\";"],"names":["inverse","light","styles","MegaMenu","className","variant","brand","logo","logoSrc","logoAlt","logoClassName","brandHref","items","actions","cta","languageSwitcher","sticky","LinkComponent","onKeyDown","props","ids","useId","Link","openIndex","setOpenIndex","useState","mobileOpen","setMobileOpen","mobileExpanded","setMobileExpanded","s","closePanels","closeAll","panelId","i","logoNode","jsx","cn","brandNode","jsxs","triggerClasses","renderColumns","item","column","ci","link","renderFeatured","mobile","featured","featuredStyle","getContrastText","handleKeyDown","event","hasPanel","_a","open","ChevronDown","o","X","Menu","prev"],"mappings":"2OAyBMA,EAAU,oBACVC,EAAQ,kBAERC,EAAiD,CACrD,QAAS,CACP,MAAO,uGACP,IAAK,iCACL,OAAQ,OACR,QAAS,+DACT,YAAa,6BACb,MAAO,+BACP,MAAO,yCACP,YAAa,2BACb,WAAY,0BACZ,gBAAiB,wBACjB,YAAa,uCACb,aAAc,GAAGD,CAAK,oBACtB,WAAY,+DACZ,UAAWA,EACX,SAAU,eAAA,EAEZ,SAAU,CACR,MAAO,OACP,IAAK,kJACL,OAAQ,eACR,QAAS,+DACT,YAAa,6BACb,MAAO,+BACP,MAAO,yCACP,YAAa,2BACb,WAAY,0BACZ,gBAAiB,wBACjB,YAAa,mFACb,aAAc,GAAGA,CAAK,oBACtB,WAAY,+DACZ,UAAWA,EACX,SAAU,eAAA,EAEZ,QAAS,CACP,MAAO,4DACP,IAAK,iCACL,OAAQ,OACR,QAAS,iEACT,YAAa,gCACb,MAAO,gCACP,MAAO,+BACP,YAAa,uBACb,WAAY,oBACZ,gBAAiB,uBACjB,YAAa,wCACb,aAAc,GAAGD,CAAO,qBACxB,WAAY,iEACZ,UAAWA,EACX,SAAU,iBAAA,CAEd,EAEaG,EAAW,CAAC,CACvB,UAAAC,EACA,QAAAC,EAAU,UACV,MAAAC,EACA,KAAAC,EACA,QAAAC,EACA,QAAAC,EACA,cAAAC,EACA,UAAAC,EAAY,IACZ,MAAAC,EACA,QAAAC,EACA,IAAAC,EACA,iBAAAC,EACA,OAAAC,EAAS,GACT,cAAAC,EACA,UAAAC,EACA,GAAGC,CACL,I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AT,IAAmBM,EACf,8BACA,2BAAA,EAGN,eAAC,MAAA,CAAI,UAAU,0BACb,SAAAK,EAAAA,KAAC,MAAA,CAAI,UAAU,YACZ,SAAA,CAAAE,EAAcC,CAAI,EAClBA,EAAK,SACJN,MAAC,MAAA,CAAI,UAAU,WAAY,SAAAU,EAAeJ,EAAM,EAAI,CAAA,CAAE,EACpD,IAAA,CAAA,CACN,CAAA,CACF,CAAA,CAAA,CACF,GA3COA,EAAK,KA4Cd,EAEAN,EAAAA,IAAC,KAAA,CAAoB,UAAU,OAC7B,SAAAA,EAAAA,IAACd,EAAA,CACC,KAAMoB,EAAK,MAAQ,IACnB,OAAQA,EAAK,SAAW,SAAW,OACnC,IAAKA,EAAK,SAAW,sBAAwB,OAC7C,QAAS,IAAMf,EAAc,EAAK,EAClC,UAAWU,EAAAA,GACT,kFACAP,EAAE,UAAA,EAGH,SAAAY,EAAK,KAAA,CAAA,CACR,EAZOA,EAAK,KAad,EAAA,EAGH5B,EACCsB,EAAAA,IAAC,KAAA,CAAG,UAAU,iBAAkB,SAAAtB,CAAA,CAAI,EAClCD,EACFuB,EAAAA,IAAC,KAAA,CAAG,UAAU,sCAAuC,WAAQ,EAC3D,IAAA,CAAA,CACN,CAAA,CACF,CAAA,CAAA,CACF,CAAA,CAAA,CAGN,EACAjC,EAAS,YAAc"}
1
+ {"version":3,"file":"MegaMenu.cjs","sources":["../../../../src/components/MegaMenu/MegaMenu.tsx"],"sourcesContent":["\"use client\";\nimport { useId, useState } from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { ChevronDown, Menu, X } from \"../../icons\";\nimport type { MegaMenuProps, MegaMenuVariant, MegaMenuItem } from \"./types\";\n\ninterface MegaMenuStyle {\n shell: string;\n bar: string;\n header: string;\n trigger: string;\n triggerOpen: string;\n badge: string;\n panel: string;\n columnTitle: string;\n columnLink: string;\n linkDescription: string;\n mobilePanel: string;\n mobileButton: string;\n mobileLink: string;\n brandText: string;\n brandDot: string;\n}\n\nconst inverse = \"text-on-secondary\";\nconst light = \"text-foreground\";\n\nconst styles: Record<MegaMenuVariant, MegaMenuStyle> = {\n classic: {\n shell: \"border-b border-border bg-background/85 backdrop-blur-md supports-[backdrop-filter]:bg-background/75\",\n bar: \"mx-auto max-w-6xl px-5 sm:px-8\",\n header: \"px-0\",\n trigger: \"text-muted-foreground hover:text-foreground hover:bg-surface\",\n triggerOpen: \"bg-surface text-foreground\",\n badge: \"bg-primary-soft text-primary\",\n panel: \"border-border bg-surface shadow-raised\",\n columnTitle: \"text-muted-foreground/70\",\n columnLink: \"hover:bg-surface-strong\",\n linkDescription: \"text-muted-foreground\",\n mobilePanel: \"border-t border-border bg-background\",\n mobileButton: `${light} hover:bg-surface`,\n mobileLink: \"text-muted-foreground hover:bg-surface hover:text-foreground\",\n brandText: light,\n brandDot: \"bg-foreground\",\n },\n floating: {\n shell: \"px-0\",\n bar: \"mx-auto mt-3 max-w-5xl rounded-xl border border-border bg-surface/90 px-5 shadow-soft backdrop-blur-md supports-[backdrop-filter]:bg-surface/70\",\n header: \"px-3 sm:px-6\",\n trigger: \"text-muted-foreground hover:text-foreground hover:bg-surface\",\n triggerOpen: \"bg-surface text-foreground\",\n badge: \"bg-primary-soft text-primary\",\n panel: \"border-border bg-surface shadow-raised\",\n columnTitle: \"text-muted-foreground/70\",\n columnLink: \"hover:bg-surface-strong\",\n linkDescription: \"text-muted-foreground\",\n mobilePanel: \"mx-3 mb-3 max-w-5xl overflow-hidden rounded-b-xl border border-border bg-surface\",\n mobileButton: `${light} hover:bg-surface`,\n mobileLink: \"text-muted-foreground hover:bg-surface hover:text-foreground\",\n brandText: light,\n brandDot: \"bg-foreground\",\n },\n inverse: {\n shell: \"border-b border-white/10 bg-[#101010]/85 backdrop-blur-md\",\n bar: \"mx-auto max-w-6xl px-5 sm:px-8\",\n header: \"px-0\",\n trigger: \"text-on-secondary/60 hover:text-on-secondary hover:bg-white/10\",\n triggerOpen: \"bg-white/10 text-on-secondary\",\n badge: \"bg-white/15 text-on-secondary\",\n panel: \"border-white/10 bg-[#161616]\",\n columnTitle: \"text-on-secondary/45\",\n columnLink: \"hover:bg-white/10\",\n linkDescription: \"text-on-secondary/50\",\n mobilePanel: \"border-t border-white/10 bg-[#101010]\",\n mobileButton: `${inverse} hover:bg-white/10`,\n mobileLink: \"text-on-secondary/70 hover:bg-white/10 hover:text-on-secondary\",\n brandText: inverse,\n brandDot: \"bg-on-secondary\",\n },\n};\n\nexport const MegaMenu = ({\n className,\n variant = \"classic\",\n brand,\n logo,\n logoSrc,\n logoAlt,\n logoClassName,\n brandHref = \"#\",\n items,\n actions,\n cta,\n languageSwitcher,\n sticky = true,\n LinkComponent,\n onKeyDown,\n ...props\n}: MegaMenuProps) => {\n const ids = useId();\n const Link = LinkComponent ?? \"a\";\n const [openIndex, setOpenIndex] = useState<number | null>(null);\n const [mobileOpen, setMobileOpen] = useState(false);\n const [mobileExpanded, setMobileExpanded] = useState<number | null>(null);\n const s = styles[variant];\n\n const closePanels = () => setOpenIndex(null);\n const closeAll = () => {\n setOpenIndex(null);\n setMobileOpen(false);\n setMobileExpanded(null);\n };\n\n const panelId = (i: number) => `${ids}-panel-${i}`;\n\n const logoNode =\n logo ??\n (logoSrc ? (\n <img\n src={logoSrc}\n alt={logoAlt ?? (typeof brand === \"string\" ? brand : \"Logo\")}\n className={cn(\"h-7 w-auto\", logoClassName)}\n />\n ) : null);\n\n const brandNode = logoNode ? (\n <span className=\"flex items-center\">{logoNode}</span>\n ) : (\n <span className={cn(\"flex items-center gap-2 font-display text-[17px] font-bold tracking-tight\", s.brandText)}>\n <span aria-hidden className={cn(\"inline-block h-2.5 w-2.5 rounded-sm\", s.brandDot)} />\n {brand}\n </span>\n );\n\n const triggerClasses = cn(\n \"flex items-center gap-1.5 rounded-md px-3 py-2 text-sm font-medium transition-colors duration-150\",\n s.trigger,\n );\n\n const renderColumns = (item: MegaMenuItem) => (\n <div\n className={cn(\n \"grid gap-x-10 gap-y-8 sm:grid-cols-2\",\n item.featured ? \"\" : \"lg:grid-cols-3\",\n )}\n >\n {item.columns?.map((column, ci) => (\n <div key={column.title ?? ci}>\n {column.title ? (\n <h4\n className={cn(\n \"text-xs font-semibold uppercase tracking-[0.14em]\",\n s.columnTitle,\n )}\n >\n {column.title}\n </h4>\n ) : null}\n <ul className={cn(column.title && \"mt-3\", \"space-y-0.5\")}>\n {column.links.map((link) => (\n <li key={link.href}>\n <Link\n href={link.href}\n onClick={closeAll}\n target={link.external ? \"_blank\" : undefined}\n rel={link.external ? \"noopener noreferrer\" : undefined}\n className={cn(\n \"-mx-2 block rounded-md px-2 py-2 transition-colors duration-150\",\n s.columnLink,\n )}\n >\n <span className=\"block text-sm font-medium text-foreground\">\n {link.label}\n </span>\n {link.description ? (\n <span\n className={cn(\n \"mt-0.5 block text-[13px] leading-snug\",\n s.linkDescription,\n )}\n >\n {link.description}\n </span>\n ) : null}\n </Link>\n </li>\n ))}\n </ul>\n </div>\n ))}\n </div>\n );\n\n const renderFeatured = (item: MegaMenuItem, mobile = false) => {\n const featured = item.featured;\n if (!featured) return null;\n const featuredStyle = featured.accent\n ? { backgroundColor: featured.accent, color: `contrast-color(${featured.accent})` }\n : undefined;\n\n return (\n <Link\n href={featured.href}\n onClick={closeAll}\n target={featured.external ? \"_blank\" : undefined}\n rel={featured.external ? \"noopener noreferrer\" : undefined}\n className={cn(\n \"group relative block overflow-hidden rounded-lg p-6 transition-transform duration-150 hover:-translate-y-0.5\",\n mobile && \"mt-8\",\n !featured.accent && \"bg-primary text-on-primary\",\n )}\n style={featuredStyle}\n >\n <div className=\"flex h-full flex-col justify-between gap-4\">\n <div>\n <h4 className=\"font-display text-base font-semibold tracking-tight\">\n {featured.title}\n </h4>\n {featured.description ? (\n <p className=\"mt-1.5 text-[13px] leading-relaxed opacity-80\">\n {featured.description}\n </p>\n ) : null}\n </div>\n {featured.cta ? (\n <span className=\"text-sm font-semibold underline decoration-1 underline-offset-4\">\n {featured.cta} →\n </span>\n ) : null}\n </div>\n <div\n aria-hidden\n className=\"pointer-events-none absolute -right-8 -top-8 h-28 w-28 rounded-full opacity-20 blur-2xl bg-black/40\"\n />\n </Link>\n );\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLElement>) => {\n if (event.key === \"Escape\") {\n closeAll();\n }\n onKeyDown?.(event);\n };\n\n return (\n <header\n className={cn(\n \"relative w-full transition-colors duration-200\",\n sticky && \"sticky top-0 z-50\",\n s.shell,\n s.header,\n className,\n )}\n onKeyDown={handleKeyDown}\n {...props}\n >\n <nav className={cn(\"relative flex h-16 w-full items-center justify-between gap-4 transition-colors duration-200\", s.bar)} onMouseLeave={closePanels} aria-label=\"Mega menu\">\n <Link href={brandHref} className=\"shrink-0\">\n {brandNode}\n </Link>\n\n <ul className=\"hidden items-center gap-1 lg:flex\">\n {items.map((item, i) => {\n const hasPanel = Boolean(item.columns?.length || item.featured);\n const open = openIndex === i;\n return (\n <li key={item.label} className=\"relative\">\n {hasPanel ? (\n <button\n type=\"button\"\n aria-haspopup=\"true\"\n aria-expanded={open}\n aria-controls={panelId(i)}\n onClick={() => setOpenIndex(open ? null : i)}\n onMouseEnter={() => setOpenIndex(i)}\n className={cn(triggerClasses, open && s.triggerOpen)}\n >\n <span className=\"flex items-center gap-1.5\">\n {item.label}\n {item.badge ? (\n <span\n className={cn(\n \"rounded-full px-1.5 py-0.5 text-[10px] font-semibold tracking-wide\",\n s.badge,\n )}\n >\n {item.badge}\n </span>\n ) : null}\n </span>\n <ChevronDown\n className={cn(\n \"h-4 w-4 shrink-0 transition-transform duration-150\",\n open && \"rotate-180\",\n )}\n />\n </button>\n ) : (\n <Link href={item.href ?? \"#\"} target={item.external ? \"_blank\" : undefined} rel={item.external ? \"noopener noreferrer\" : undefined} className={triggerClasses}>\n {item.label}\n {item.badge ? (\n <span className={cn(\"rounded-full px-1.5 py-0.5 text-[10px] font-semibold tracking-wide\", s.badge)}>\n {item.badge}\n </span>\n ) : null}\n </Link>\n )}\n </li>\n );\n })}\n </ul>\n\n <div className=\"hidden items-center gap-3 lg:flex\">\n {languageSwitcher}\n {actions}\n {cta}\n </div>\n\n <button\n type=\"button\"\n aria-label={mobileOpen ? \"Close menu\" : \"Open menu\"}\n aria-expanded={mobileOpen}\n onClick={() => setMobileOpen((o) => !o)}\n className={cn(\n \"inline-flex h-10 w-10 shrink-0 cursor-pointer items-center justify-center rounded-md lg:hidden\",\n \"transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\",\n s.mobileButton,\n )}\n >\n {mobileOpen ? <X className=\"h-5 w-5\" /> : <Menu className=\"h-5 w-5\" />}\n </button>\n </nav>\n\n {items.map((item, i) => {\n if (!item.columns?.length && !item.featured) return null;\n const open = openIndex === i;\n return (\n <div\n key={item.label}\n id={panelId(i)}\n role=\"region\"\n aria-label={`${item.label} menu`}\n onMouseEnter={() => setOpenIndex(i)}\n className={cn(\n \"absolute top-full z-50 pt-2 transition-all duration-150\",\n variant === \"floating\" ? \"inset-x-0 mx-auto w-full max-w-5xl\" : \"inset-x-0\",\n open\n ? \"visible translate-y-0 opacity-100\"\n : \"pointer-events-none invisible -translate-y-1 opacity-0\",\n )}\n >\n <div\n className={cn(\n \"overflow-hidden rounded-xl border p-6 md:p-8\",\n s.panel,\n item.featured ? \"lg:grid lg:grid-cols-[minmax(0,1fr)_auto] lg:gap-12\" : \"\",\n )}\n >\n {renderColumns(item)}\n {item.featured && (\n <div className={cn(\"mt-8 max-w-sm lg:mt-0 lg:w-64\")}>\n {renderFeatured(item)}\n </div>\n )}\n </div>\n </div>\n );\n })}\n\n <div\n className={cn(\n \"grid transition-[grid-template-rows,opacity] duration-200 lg:hidden\",\n mobileOpen ? \"grid-rows-[1fr] opacity-100\" : \"grid-rows-[0fr] opacity-0\",\n s.mobilePanel,\n )}\n >\n <div className=\"min-h-0 overflow-hidden\">\n <ul className=\"flex flex-col py-4\">\n {languageSwitcher ? (\n <li className=\"px-5 pb-4\">{languageSwitcher}</li>\n ) : null}\n {items.map((item, i) =>\n item.columns?.length || item.featured ? (\n <li key={item.label} className=\"px-5\">\n <button\n type=\"button\"\n aria-expanded={mobileExpanded === i}\n onClick={() =>\n setMobileExpanded((prev) => (prev === i ? null : i))\n }\n className={cn(\n \"flex w-full items-center justify-between rounded-md px-2 py-2.5 text-sm font-medium transition-colors duration-150\",\n s.mobileButton,\n )}\n >\n <span className=\"flex items-center gap-2\">\n {item.label}\n {item.badge ? (\n <span className={cn(\"rounded-full px-1.5 py-0.5 text-[10px] font-semibold tracking-wide\", s.badge)}>\n {item.badge}\n </span>\n ) : null}\n </span>\n <ChevronDown\n className={cn(\n \"h-4 w-4 shrink-0 transition-transform duration-150\",\n mobileExpanded === i && \"rotate-180\",\n )}\n />\n </button>\n <div\n className={cn(\n \"grid transition-[grid-template-rows,opacity] duration-200\",\n mobileExpanded === i\n ? \"grid-rows-[1fr] opacity-100\"\n : \"grid-rows-[0fr] opacity-0\",\n )}\n >\n <div className=\"min-h-0 overflow-hidden\">\n <div className=\"py-2 pl-1\">\n {renderColumns(item)}\n {item.featured ? (\n <div className=\"max-w-sm\">{renderFeatured(item, true)}</div>\n ) : null}\n </div>\n </div>\n </div>\n </li>\n ) : (\n <li key={item.label} className=\"px-5\">\n <Link\n href={item.href ?? \"#\"}\n target={item.external ? \"_blank\" : undefined}\n rel={item.external ? \"noopener noreferrer\" : undefined}\n onClick={() => setMobileOpen(false)}\n className={cn(\n \"block rounded-md px-2 py-2.5 text-sm font-medium transition-colors duration-150\",\n s.mobileLink,\n )}\n >\n {item.label}\n </Link>\n </li>\n ),\n )}\n {cta ? (\n <li className=\"px-8 pb-2 pt-3\">{cta}</li>\n ) : actions ? (\n <li className=\"mt-3 flex flex-wrap gap-3 px-8 pb-2\">{actions}</li>\n ) : null}\n </ul>\n </div>\n </div>\n </header>\n );\n};\nMegaMenu.displayName = \"MegaMenu\";"],"names":["inverse","light","styles","MegaMenu","className","variant","brand","logo","logoSrc","logoAlt","logoClassName","brandHref","items","actions","cta","languageSwitcher","sticky","LinkComponent","onKeyDown","props","ids","useId","Link","openIndex","setOpenIndex","useState","mobileOpen","setMobileOpen","mobileExpanded","setMobileExpanded","s","closePanels","closeAll","panelId","i","logoNode","jsx","cn","brandNode","jsxs","triggerClasses","renderColumns","item","column","ci","link","renderFeatured","mobile","featured","featuredStyle","handleKeyDown","event","hasPanel","_a","open","ChevronDown","o","X","Menu","prev"],"mappings":"qMAwBMA,EAAU,oBACVC,EAAQ,kBAERC,EAAiD,CACrD,QAAS,CACP,MAAO,uGACP,IAAK,iCACL,OAAQ,OACR,QAAS,+DACT,YAAa,6BACb,MAAO,+BACP,MAAO,yCACP,YAAa,2BACb,WAAY,0BACZ,gBAAiB,wBACjB,YAAa,uCACb,aAAc,GAAGD,CAAK,oBACtB,WAAY,+DACZ,UAAWA,EACX,SAAU,eAAA,EAEZ,SAAU,CACR,MAAO,OACP,IAAK,kJACL,OAAQ,eACR,QAAS,+DACT,YAAa,6BACb,MAAO,+BACP,MAAO,yCACP,YAAa,2BACb,WAAY,0BACZ,gBAAiB,wBACjB,YAAa,mFACb,aAAc,GAAGA,CAAK,oBACtB,WAAY,+DACZ,UAAWA,EACX,SAAU,eAAA,EAEZ,QAAS,CACP,MAAO,4DACP,IAAK,iCACL,OAAQ,OACR,QAAS,iEACT,YAAa,gCACb,MAAO,gCACP,MAAO,+BACP,YAAa,uBACb,WAAY,oBACZ,gBAAiB,uBACjB,YAAa,wCACb,aAAc,GAAGD,CAAO,qBACxB,WAAY,iEACZ,UAAWA,EACX,SAAU,iBAAA,CAEd,EAEaG,EAAW,CAAC,CACvB,UAAAC,EACA,QAAAC,EAAU,UACV,MAAAC,EACA,KAAAC,EACA,QAAAC,EACA,QAAAC,EACA,cAAAC,EACA,UAAAC,EAAY,IACZ,MAAAC,EACA,QAAAC,EACA,IAAAC,EACA,iBAAAC,EACA,OAAAC,EAAS,GACT,cAAAC,EACA,UAAAC,EACA,GAAGC,CACL,IAAqB,CACnB,MAAMC,EAAMC,EAAAA,MAAA,EACNC,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,SAAAK,EAAAA,KAAC,MAAA,CAAI,UAAU,YACZ,SAAA,CAAAE,EAAcC,CAAI,EAClBA,EAAK,SACJN,MAAC,MAAA,CAAI,UAAU,WAAY,SAAAU,EAAeJ,EAAM,EAAI,CAAA,CAAE,EACpD,IAAA,CAAA,CACN,CAAA,CACF,CAAA,CAAA,CACF,GA3COA,EAAK,KA4Cd,EAEAN,EAAAA,IAAC,KAAA,CAAoB,UAAU,OAC7B,SAAAA,EAAAA,IAACd,EAAA,CACC,KAAMoB,EAAK,MAAQ,IACnB,OAAQA,EAAK,SAAW,SAAW,OACnC,IAAKA,EAAK,SAAW,sBAAwB,OAC7C,QAAS,IAAMf,EAAc,EAAK,EAClC,UAAWU,EAAAA,GACT,kFACAP,EAAE,UAAA,EAGH,SAAAY,EAAK,KAAA,CAAA,CACR,EAZOA,EAAK,KAad,EAAA,EAGH5B,EACCsB,EAAAA,IAAC,KAAA,CAAG,UAAU,iBAAkB,SAAAtB,CAAA,CAAI,EAClCD,EACFuB,EAAAA,IAAC,KAAA,CAAG,UAAU,sCAAuC,WAAQ,EAC3D,IAAA,CAAA,CACN,CAAA,CACF,CAAA,CAAA,CACF,CAAA,CAAA,CAGN,EACAjC,EAAS,YAAc"}
@@ -1,3 +1,2 @@
1
- "use client";
2
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),t=require("../../utils/cn.cjs"),l=require("../../utils/contrast.cjs"),a=require("../../utils/useTokenForeground.cjs"),u=require("../../icons.cjs");function m({value:e,billing:n,dim:r}){return e===null?o.jsx("span",{children:"Custom"}):o.jsxs(o.Fragment,{children:[o.jsxs("span",{className:"text-[2.6rem] font-semibold tracking-tight sm:text-[3rem]",children:["$",e]}),o.jsxs("span",{className:t.cn("text-sm font-normal",r&&"opacity-60"),children:["/",n==="monthly"?"mo":"yr"]})]})}function f({billing:e,onChange:n,dark:r,yearlyBadge:s}){const i=a.useTokenForeground("--color-accent","#0f172a");return o.jsxs("div",{className:"mb-10 flex items-center justify-center gap-4",children:[o.jsx("span",{className:t.cn("text-sm font-medium transition-colors",e==="monthly"?r?"text-white":"text-foreground":"text-muted-foreground"),children:"Monthly"}),o.jsx("button",{type:"button",role:"switch","aria-checked":e==="yearly","aria-label":"Billing period",onClick:()=>n(e==="monthly"?"yearly":"monthly"),className:t.cn("relative inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full transition-colors duration-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",e==="yearly"?"bg-primary":"bg-border"),children:o.jsx("span",{className:t.cn("inline-block h-4 w-4 transform rounded-full bg-white shadow transition-transform duration-200",e==="yearly"?"translate-x-6":"translate-x-1")})}),o.jsxs("span",{className:t.cn("flex items-center gap-2 text-sm font-medium transition-colors",e==="yearly"?r?"text-white":"text-foreground":"text-muted-foreground"),children:["Yearly",s?o.jsx("span",{className:"rounded-full bg-accent px-2 py-0.5 text-xs font-semibold",style:{color:i},children:s}):null]})]})}function d({plan:e,billing:n,onSelect:r,dark:s}){const i=e.highlighted&&!e.customColor,c=e.customColor?l.getContrastText(e.customColor,"#111111","#ffffff"):void 0;return o.jsxs("button",{type:"button",onClick:()=>r==null?void 0:r(e,n),className:t.cn("inline-flex h-11 cursor-pointer items-center justify-center gap-2 rounded-lg px-5 text-sm font-semibold transition-colors duration-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",i||e.customColor?"hover:brightness-95":s?"bg-white text-black hover:bg-white/90":"border border-border text-foreground hover:bg-surface"),style:e.customColor?{backgroundColor:e.customColor,color:c}:i?{backgroundColor:"rgb(var(--color-primary))",color:"rgb(var(--color-on-primary))"}:void 0,children:[e.cta||"Start",o.jsx(u.ArrowRight,{className:"h-4 w-4 opacity-60"})]})}exports.BillingToggle=f;exports.PlanButton=d;exports.PriceValue=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("../../utils/cn.cjs"),c=require("../../icons.cjs");function l({value:r,billing:s,dim:o}){return r===null?e.jsx("span",{children:"Custom"}):e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"text-[2.6rem] font-semibold tracking-tight sm:text-[3rem]",children:["$",r]}),e.jsxs("span",{className:t.cn("text-sm font-normal",o&&"opacity-60"),children:["/",s==="monthly"?"mo":"yr"]})]})}function a({billing:r,onChange:s,dark:o,yearlyBadge:n}){return e.jsxs("div",{className:"mb-10 flex items-center justify-center gap-4",children:[e.jsx("span",{className:t.cn("text-sm font-medium transition-colors",r==="monthly"?o?"text-white":"text-foreground":"text-muted-foreground"),children:"Monthly"}),e.jsx("button",{type:"button",role:"switch","aria-checked":r==="yearly","aria-label":"Billing period",onClick:()=>s(r==="monthly"?"yearly":"monthly"),className:t.cn("relative inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full transition-colors duration-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",r==="yearly"?"bg-primary":"bg-border"),children:e.jsx("span",{className:t.cn("inline-block h-4 w-4 transform rounded-full bg-white shadow transition-transform duration-200",r==="yearly"?"translate-x-6":"translate-x-1")})}),e.jsxs("span",{className:t.cn("flex items-center gap-2 text-sm font-medium transition-colors",r==="yearly"?o?"text-white":"text-foreground":"text-muted-foreground"),children:["Yearly",n?e.jsx("span",{className:"rounded-full bg-accent px-2 py-0.5 text-xs font-semibold",style:{color:"contrast-color(rgb(var(--color-accent)))"},children:n}):null]})]})}function u({plan:r,billing:s,onSelect:o,dark:n}){const i=r.highlighted&&!r.customColor;return e.jsxs("button",{type:"button",onClick:()=>o==null?void 0:o(r,s),className:t.cn("inline-flex h-11 cursor-pointer items-center justify-center gap-2 rounded-lg px-5 text-sm font-semibold transition-colors duration-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",i||r.customColor?"hover:brightness-95":n?"bg-white text-black hover:bg-white/90":"border border-border text-foreground hover:bg-surface"),style:r.customColor?{backgroundColor:r.customColor,color:`contrast-color(${r.customColor})`}:i?{backgroundColor:"rgb(var(--color-primary))",color:"rgb(var(--color-on-primary))"}:void 0,children:[r.cta||"Start",e.jsx(c.ArrowRight,{className:"h-4 w-4 opacity-60"})]})}exports.BillingToggle=a;exports.PlanButton=u;exports.PriceValue=l;
3
2
  //# sourceMappingURL=parts.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"parts.cjs","sources":["../../../../src/components/Pricing/parts.tsx"],"sourcesContent":["\"use client\";\nimport { cn } from \"../../utils/cn\";\nimport { getContrastText } from \"../../utils/contrast\";\nimport { useTokenForeground } from \"../../utils/useTokenForeground\";\nimport { ArrowRight } from \"../../icons\";\nimport type { Plan } from \"./types\";\n\nexport function PriceValue({\n value,\n billing,\n dim,\n}: {\n value: number | null;\n billing: \"monthly\" | \"yearly\";\n /** False when rendered on a colored background where opacity would kill contrast. */\n dim?: boolean;\n}) {\n if (value === null) {\n return <span>Custom</span>;\n }\n return (\n <>\n <span className=\"text-[2.6rem] font-semibold tracking-tight sm:text-[3rem]\">${value}</span>\n <span className={cn(\"text-sm font-normal\", dim && \"opacity-60\")}>\n /{billing === \"monthly\" ? \"mo\" : \"yr\"}\n </span>\n </>\n );\n}\n\nexport function BillingToggle({\n billing,\n onChange,\n dark,\n yearlyBadge,\n}: {\n billing: \"monthly\" | \"yearly\";\n onChange: (b: \"monthly\" | \"yearly\") => void;\n dark?: boolean;\n yearlyBadge?: string;\n}) {\n // The accent token is a background color, but its shipped \"on-accent\"\n // pairing isn't guaranteed to be contrast-safe (e.g. white on amber).\n // Derive the badge text color from the actual accent value instead. When\n // the token can't be read yet (SSR/prerender/jsdom/first paint), fall back\n // to the contrast-correct color for the default emerald accent — white on\n // emerald-600 only reaches ~3.8:1 and fails WCAG AA for small text.\n const accentText = useTokenForeground(\"--color-accent\", \"#0f172a\");\n return (\n <div className=\"mb-10 flex items-center justify-center gap-4\">\n <span\n className={cn(\n \"text-sm font-medium transition-colors\",\n billing === \"monthly\" ? (dark ? \"text-white\" : \"text-foreground\") : \"text-muted-foreground\",\n )}\n >\n Monthly\n </span>\n <button\n type=\"button\"\n role=\"switch\"\n aria-checked={billing === \"yearly\"}\n aria-label=\"Billing period\"\n onClick={() => onChange(billing === \"monthly\" ? \"yearly\" : \"monthly\")}\n className={cn(\n \"relative inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full transition-colors duration-200\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background\",\n billing === \"yearly\" ? \"bg-primary\" : \"bg-border\",\n )}\n >\n <span\n className={cn(\n \"inline-block h-4 w-4 transform rounded-full bg-white shadow transition-transform duration-200\",\n billing === \"yearly\" ? \"translate-x-6\" : \"translate-x-1\",\n )}\n />\n </button>\n <span\n className={cn(\n \"flex items-center gap-2 text-sm font-medium transition-colors\",\n billing === \"yearly\" ? (dark ? \"text-white\" : \"text-foreground\") : \"text-muted-foreground\",\n )}\n >\n Yearly\n {yearlyBadge ? (\n <span\n className=\"rounded-full bg-accent px-2 py-0.5 text-xs font-semibold\"\n style={{ color: accentText }}\n >\n {yearlyBadge}\n </span>\n ) : null}\n </span>\n </div>\n );\n}\n\nexport function PlanButton({\n plan,\n billing,\n onSelect,\n dark,\n}: {\n plan: Plan;\n billing: \"monthly\" | \"yearly\";\n onSelect?: (plan: Plan, billing: \"monthly\" | \"yearly\") => void;\n dark?: boolean;\n}) {\n const isHighlighted = plan.highlighted && !plan.customColor;\n const fg = plan.customColor ? getContrastText(plan.customColor, \"#111111\", \"#ffffff\") : undefined;\n return (\n <button\n type=\"button\"\n onClick={() => onSelect?.(plan, billing)}\n className={cn(\n \"inline-flex h-11 cursor-pointer items-center justify-center gap-2 rounded-lg px-5 text-sm font-semibold transition-colors duration-200\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n isHighlighted || plan.customColor\n ? \"hover:brightness-95\"\n : dark\n ? \"bg-white text-black hover:bg-white/90\"\n : \"border border-border text-foreground hover:bg-surface\",\n )}\n style={\n plan.customColor\n ? { backgroundColor: plan.customColor, color: fg }\n : isHighlighted\n ? {\n backgroundColor: \"rgb(var(--color-primary))\",\n color: \"rgb(var(--color-on-primary))\",\n }\n : undefined\n }\n >\n {plan.cta || \"Start\"}\n <ArrowRight className=\"h-4 w-4 opacity-60\" />\n </button>\n );\n}"],"names":["PriceValue","value","billing","dim","jsx","jsxs","Fragment","cn","BillingToggle","onChange","dark","yearlyBadge","accentText","useTokenForeground","PlanButton","plan","onSelect","isHighlighted","fg","getContrastText","ArrowRight"],"mappings":"wQAOO,SAASA,EAAW,CACzB,MAAAC,EACA,QAAAC,EACA,IAAAC,CACF,EAKG,CACD,OAAIF,IAAU,KACLG,EAAAA,IAAC,QAAK,SAAA,QAAA,CAAM,EAGnBC,EAAAA,KAAAC,WAAA,CACE,SAAA,CAAAD,EAAAA,KAAC,OAAA,CAAK,UAAU,4DAA4D,SAAA,CAAA,IAAEJ,CAAA,EAAM,SACnF,OAAA,CAAK,UAAWM,EAAAA,GAAG,sBAAuBJ,GAAO,YAAY,EAAG,SAAA,CAAA,IAC7DD,IAAY,UAAY,KAAO,IAAA,CAAA,CACnC,CAAA,EACF,CAEJ,CAEO,SAASM,EAAc,CAC5B,QAAAN,EACA,SAAAO,EACA,KAAAC,EACA,YAAAC,CACF,EAKG,CAOD,MAAMC,EAAaC,EAAAA,mBAAmB,iBAAkB,SAAS,EACjE,OACER,EAAAA,KAAC,MAAA,CAAI,UAAU,+CACb,SAAA,CAAAD,EAAAA,IAAC,OAAA,CACC,UAAWG,EAAAA,GACT,wCACAL,IAAY,UAAaQ,EAAO,aAAe,kBAAqB,uBAAA,EAEvE,SAAA,SAAA,CAAA,EAGDN,EAAAA,IAAC,SAAA,CACC,KAAK,SACL,KAAK,SACL,eAAcF,IAAY,SAC1B,aAAW,iBACX,QAAS,IAAMO,EAASP,IAAY,UAAY,SAAW,SAAS,EACpE,UAAWK,EAAAA,GACT,iHACA,2IACAL,IAAY,SAAW,aAAe,WAAA,EAGxC,SAAAE,EAAAA,IAAC,OAAA,CACC,UAAWG,EAAAA,GACT,gGACAL,IAAY,SAAW,gBAAkB,eAAA,CAC3C,CAAA,CACF,CAAA,EAEFG,EAAAA,KAAC,OAAA,CACC,UAAWE,EAAAA,GACT,gEACAL,IAAY,SAAYQ,EAAO,aAAe,kBAAqB,uBAAA,EAEtE,SAAA,CAAA,SAEEC,EACCP,EAAAA,IAAC,OAAA,CACC,UAAU,2DACV,MAAO,CAAE,MAAOQ,CAAA,EAEf,SAAAD,CAAA,CAAA,EAED,IAAA,CAAA,CAAA,CACN,EACF,CAEJ,CAEO,SAASG,EAAW,CACzB,KAAAC,EACA,QAAAb,EACA,SAAAc,EACA,KAAAN,CACF,EAKG,CACD,MAAMO,EAAgBF,EAAK,aAAe,CAACA,EAAK,YAC1CG,EAAKH,EAAK,YAAcI,EAAAA,gBAAgBJ,EAAK,YAAa,UAAW,SAAS,EAAI,OACxF,OACEV,EAAAA,KAAC,SAAA,CACC,KAAK,SACL,QAAS,IAAMW,GAAA,YAAAA,EAAWD,EAAMb,GAChC,UAAWK,EAAAA,GACT,yIACA,sGACAU,GAAiBF,EAAK,YAClB,sBACAL,EACE,wCACA,uDAAA,EAER,MACEK,EAAK,YACD,CAAE,gBAAiBA,EAAK,YAAa,MAAOG,CAAA,EAC5CD,EACE,CACE,gBAAiB,4BACjB,MAAO,8BAAA,EAET,OAGP,SAAA,CAAAF,EAAK,KAAO,QACbX,EAAAA,IAACgB,EAAAA,WAAA,CAAW,UAAU,oBAAA,CAAqB,CAAA,CAAA,CAAA,CAGjD"}
1
+ {"version":3,"file":"parts.cjs","sources":["../../../../src/components/Pricing/parts.tsx"],"sourcesContent":["import { cn } from \"../../utils/cn\";\nimport { ArrowRight } from \"../../icons\";\nimport type { Plan } from \"./types\";\n\nexport function PriceValue({\n value,\n billing,\n dim,\n}: {\n value: number | null;\n billing: \"monthly\" | \"yearly\";\n /** False when rendered on a colored background where opacity would kill contrast. */\n dim?: boolean;\n}) {\n if (value === null) {\n return <span>Custom</span>;\n }\n return (\n <>\n <span className=\"text-[2.6rem] font-semibold tracking-tight sm:text-[3rem]\">${value}</span>\n <span className={cn(\"text-sm font-normal\", dim && \"opacity-60\")}>\n /{billing === \"monthly\" ? \"mo\" : \"yr\"}\n </span>\n </>\n );\n}\n\nexport function BillingToggle({\n billing,\n onChange,\n dark,\n yearlyBadge,\n}: {\n billing: \"monthly\" | \"yearly\";\n onChange: (b: \"monthly\" | \"yearly\") => void;\n dark?: boolean;\n yearlyBadge?: string;\n}) {\n // The accent token is a background color, but its shipped \"on-accent\"\n // pairing isn't guaranteed to be contrast-safe (e.g. white on amber).\n // Let CSS pick the readable text color from the actual accent value via\n // contrast-color(); it re-evaluates automatically when the token changes.\n return (\n <div className=\"mb-10 flex items-center justify-center gap-4\">\n <span\n className={cn(\n \"text-sm font-medium transition-colors\",\n billing === \"monthly\" ? (dark ? \"text-white\" : \"text-foreground\") : \"text-muted-foreground\",\n )}\n >\n Monthly\n </span>\n <button\n type=\"button\"\n role=\"switch\"\n aria-checked={billing === \"yearly\"}\n aria-label=\"Billing period\"\n onClick={() => onChange(billing === \"monthly\" ? \"yearly\" : \"monthly\")}\n className={cn(\n \"relative inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full transition-colors duration-200\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background\",\n billing === \"yearly\" ? \"bg-primary\" : \"bg-border\",\n )}\n >\n <span\n className={cn(\n \"inline-block h-4 w-4 transform rounded-full bg-white shadow transition-transform duration-200\",\n billing === \"yearly\" ? \"translate-x-6\" : \"translate-x-1\",\n )}\n />\n </button>\n <span\n className={cn(\n \"flex items-center gap-2 text-sm font-medium transition-colors\",\n billing === \"yearly\" ? (dark ? \"text-white\" : \"text-foreground\") : \"text-muted-foreground\",\n )}\n >\n Yearly\n {yearlyBadge ? (\n <span\n className=\"rounded-full bg-accent px-2 py-0.5 text-xs font-semibold\"\n style={{ color: \"contrast-color(rgb(var(--color-accent)))\" }}\n >\n {yearlyBadge}\n </span>\n ) : null}\n </span>\n </div>\n );\n}\n\nexport function PlanButton({\n plan,\n billing,\n onSelect,\n dark,\n}: {\n plan: Plan;\n billing: \"monthly\" | \"yearly\";\n onSelect?: (plan: Plan, billing: \"monthly\" | \"yearly\") => void;\n dark?: boolean;\n}) {\n const isHighlighted = plan.highlighted && !plan.customColor;\n return (\n <button\n type=\"button\"\n onClick={() => onSelect?.(plan, billing)}\n className={cn(\n \"inline-flex h-11 cursor-pointer items-center justify-center gap-2 rounded-lg px-5 text-sm font-semibold transition-colors duration-200\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n isHighlighted || plan.customColor\n ? \"hover:brightness-95\"\n : dark\n ? \"bg-white text-black hover:bg-white/90\"\n : \"border border-border text-foreground hover:bg-surface\",\n )}\n style={\n plan.customColor\n ? {\n backgroundColor: plan.customColor,\n color: `contrast-color(${plan.customColor})`,\n }\n : isHighlighted\n ? {\n backgroundColor: \"rgb(var(--color-primary))\",\n color: \"rgb(var(--color-on-primary))\",\n }\n : undefined\n }\n >\n {plan.cta || \"Start\"}\n <ArrowRight className=\"h-4 w-4 opacity-60\" />\n </button>\n );\n}"],"names":["PriceValue","value","billing","dim","jsx","jsxs","Fragment","cn","BillingToggle","onChange","dark","yearlyBadge","PlanButton","plan","onSelect","isHighlighted","ArrowRight"],"mappings":"kLAIO,SAASA,EAAW,CACzB,MAAAC,EACA,QAAAC,EACA,IAAAC,CACF,EAKG,CACD,OAAIF,IAAU,KACLG,EAAAA,IAAC,QAAK,SAAA,QAAA,CAAM,EAGnBC,EAAAA,KAAAC,WAAA,CACE,SAAA,CAAAD,EAAAA,KAAC,OAAA,CAAK,UAAU,4DAA4D,SAA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yIACA,sGACAQ,GAAiBF,EAAK,YAClB,sBACAH,EACE,wCACA,uDAAA,EAER,MACEG,EAAK,YACD,CACE,gBAAiBA,EAAK,YACtB,MAAO,kBAAkBA,EAAK,WAAW,GAAA,EAE3CE,EACE,CACE,gBAAiB,4BACjB,MAAO,8BAAA,EAET,OAGP,SAAA,CAAAF,EAAK,KAAO,QACbT,EAAAA,IAACY,EAAAA,WAAA,CAAW,UAAU,oBAAA,CAAqB,CAAA,CAAA,CAAA,CAGjD"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("../../../utils/cn.cjs"),f=require("../../../utils/contrast.cjs"),c=require("../parts.cjs"),j=require("../../../icons.cjs"),l=({className:d,plans:a,billing:o,onBillingChange:m,onSelect:x,yearlyBadge:g,...u})=>e.jsxs("div",{className:t.cn("w-full",d),...u,children:[e.jsx(c.BillingToggle,{billing:o,onChange:m,yearlyBadge:g}),e.jsx("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:a.map(r=>{const i=r.highlighted&&!r.customColor,s=r.customColor||(i?"rgb(var(--color-primary))":void 0),h=r.customColor?f.getContrastText(r.customColor,"#111111","#ffffff"):i?"rgb(var(--color-on-primary))":void 0;return e.jsxs("div",{className:t.cn("flex h-full flex-col rounded-xl p-8",s?"lg:col-span-2":"border border-border bg-surface"),style:s?{backgroundColor:s,color:h}:void 0,children:[e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("h3",{className:t.cn("font-display text-xl font-semibold tracking-tight",s?"text-current":"text-foreground"),children:r.name}),r.description?e.jsx("p",{className:t.cn("mt-1.5 text-sm",s?void 0:"text-muted-foreground"),children:r.description}):null]}),e.jsx("div",{className:t.cn("shrink-0 font-display",s?"text-current":"text-foreground"),children:e.jsx(c.PriceValue,{value:o==="monthly"?r.monthly:r.yearly,billing:o,dim:!s})})]}),e.jsx("ul",{className:t.cn("mt-7 grid grid-cols-1 gap-x-8 gap-y-2.5 text-sm sm:grid-cols-2",s?"lg:max-w-2xl":void 0),children:r.features.map(n=>e.jsxs("li",{className:t.cn("flex items-start gap-2.5",s?"text-current":"text-muted-foreground"),children:[e.jsx(j.Check,{className:t.cn("mt-0.5 h-4 w-4 shrink-0",s?"text-current":"text-primary")}),n]},n))}),e.jsx("div",{className:"mt-8",children:e.jsx(c.PlanButton,{plan:r,billing:o,onSelect:x,dark:!s})})]},r.name)})})]});l.displayName="PricingBento";exports.PricingBento=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("../../../utils/cn.cjs"),c=require("../parts.cjs"),j=require("../../../icons.cjs"),l=({className:d,plans:a,billing:o,onBillingChange:m,onSelect:x,yearlyBadge:g,...u})=>e.jsxs("div",{className:t.cn("w-full",d),...u,children:[e.jsx(c.BillingToggle,{billing:o,onChange:m,yearlyBadge:g}),e.jsx("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:a.map(r=>{const i=r.highlighted&&!r.customColor,s=r.customColor||(i?"rgb(var(--color-primary))":void 0),h=r.customColor?`contrast-color(${r.customColor})`:i?"rgb(var(--color-on-primary))":void 0;return e.jsxs("div",{className:t.cn("flex h-full flex-col rounded-xl p-8",s?"lg:col-span-2":"border border-border bg-surface"),style:s?{backgroundColor:s,color:h}:void 0,children:[e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("h3",{className:t.cn("font-display text-xl font-semibold tracking-tight",s?"text-current":"text-foreground"),children:r.name}),r.description?e.jsx("p",{className:t.cn("mt-1.5 text-sm",s?void 0:"text-muted-foreground"),children:r.description}):null]}),e.jsx("div",{className:t.cn("shrink-0 font-display",s?"text-current":"text-foreground"),children:e.jsx(c.PriceValue,{value:o==="monthly"?r.monthly:r.yearly,billing:o,dim:!s})})]}),e.jsx("ul",{className:t.cn("mt-7 grid grid-cols-1 gap-x-8 gap-y-2.5 text-sm sm:grid-cols-2",s?"lg:max-w-2xl":void 0),children:r.features.map(n=>e.jsxs("li",{className:t.cn("flex items-start gap-2.5",s?"text-current":"text-muted-foreground"),children:[e.jsx(j.Check,{className:t.cn("mt-0.5 h-4 w-4 shrink-0",s?"text-current":"text-primary")}),n]},n))}),e.jsx("div",{className:"mt-8",children:e.jsx(c.PlanButton,{plan:r,billing:o,onSelect:x,dark:!s})})]},r.name)})})]});l.displayName="PricingBento";exports.PricingBento=l;
2
2
  //# sourceMappingURL=Bento.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Bento.cjs","sources":["../../../../../src/components/Pricing/variants/Bento.tsx"],"sourcesContent":["import { cn } from \"../../../utils/cn\";\nimport { getContrastText } from \"../../../utils/contrast\";\nimport { PriceValue, BillingToggle, PlanButton } from \"../parts\";\nimport { Check } from \"../../../icons\";\nimport type { PricingVariantProps } from \"../types\";\n\ninterface BentoProps extends PricingVariantProps {\n className?: string;\n}\n\nexport const PricingBento = ({ className, plans, billing, onBillingChange, onSelect, yearlyBadge, ...props }: BentoProps) => {\n return (\n <div className={cn(\"w-full\", className)} {...props}>\n <BillingToggle billing={billing} onChange={onBillingChange} yearlyBadge={yearlyBadge} />\n <div className=\"grid grid-cols-1 gap-4 lg:grid-cols-2\">\n {plans.map((plan) => {\n const isHighlighted = plan.highlighted && !plan.customColor;\n const bg = plan.customColor || (isHighlighted ? \"rgb(var(--color-primary))\" : undefined);\n const fg = plan.customColor\n ? getContrastText(plan.customColor, \"#111111\", \"#ffffff\")\n : isHighlighted\n ? \"rgb(var(--color-on-primary))\"\n : undefined;\n return (\n <div\n key={plan.name}\n className={cn(\n \"flex h-full flex-col rounded-xl p-8\",\n bg\n ? \"lg:col-span-2\"\n : \"border border-border bg-surface\",\n )}\n style={bg ? { backgroundColor: bg, color: fg } : undefined}\n >\n <div className=\"flex items-start justify-between gap-4\">\n <div className=\"min-w-0\">\n <h3 className={cn(\"font-display text-xl font-semibold tracking-tight\", bg ? \"text-current\" : \"text-foreground\")}>\n {plan.name}\n </h3>\n {plan.description ? (\n <p className={cn(\"mt-1.5 text-sm\", bg ? undefined : \"text-muted-foreground\")}>\n {plan.description}\n </p>\n ) : null}\n </div>\n <div className={cn(\"shrink-0 font-display\", bg ? \"text-current\" : \"text-foreground\")}>\n <PriceValue value={billing === \"monthly\" ? plan.monthly : plan.yearly} billing={billing} dim={!bg} />\n </div>\n </div>\n <ul\n className={cn(\n \"mt-7 grid grid-cols-1 gap-x-8 gap-y-2.5 text-sm sm:grid-cols-2\",\n bg ? \"lg:max-w-2xl\" : undefined,\n )}\n >\n {plan.features.map((feature) => (\n <li key={feature} className={cn(\"flex items-start gap-2.5\", bg ? \"text-current\" : \"text-muted-foreground\")}>\n <Check className={cn(\"mt-0.5 h-4 w-4 shrink-0\", bg ? \"text-current\" : \"text-primary\")} />\n {feature}\n </li>\n ))}\n </ul>\n <div className=\"mt-8\">\n <PlanButton plan={plan} billing={billing} onSelect={onSelect} dark={!bg} />\n </div>\n </div>\n );\n })}\n </div>\n </div>\n );\n};\nPricingBento.displayName = \"PricingBento\";"],"names":["PricingBento","className","plans","billing","onBillingChange","onSelect","yearlyBadge","props","jsxs","cn","jsx","BillingToggle","plan","isHighlighted","bg","fg","getContrastText","PriceValue","feature","Check","PlanButton"],"mappings":"2PAUaA,EAAe,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAO,QAAAC,EAAS,gBAAAC,EAAiB,SAAAC,EAAU,YAAAC,EAAa,GAAGC,KAEjGC,EAAAA,KAAC,OAAI,UAAWC,EAAAA,GAAG,SAAUR,CAAS,EAAI,GAAGM,EAC3C,SAAA,CAAAG,EAAAA,IAACC,EAAAA,cAAA,CAAc,QAAAR,EAAkB,SAAUC,EAAiB,YAAAE,EAA0B,QACrF,MAAA,CAAI,UAAU,wCACZ,SAAAJ,EAAM,IAAKU,GAAS,CACnB,MAAMC,EAAgBD,EAAK,aAAe,CAACA,EAAK,YAC1CE,EAAK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EAAAA,IAACU,EAAAA,WAAA,CAAW,KAAAR,EAAY,QAAAT,EAAkB,SAAAE,EAAoB,KAAM,CAACS,CAAA,CAAI,CAAA,CAC3E,CAAA,CAAA,EAvCKF,EAAK,IAAA,CA0ChB,CAAC,CAAA,CACH,CAAA,EACF,EAGJZ,EAAa,YAAc"}
1
+ {"version":3,"file":"Bento.cjs","sources":["../../../../../src/components/Pricing/variants/Bento.tsx"],"sourcesContent":["import { cn } from \"../../../utils/cn\";\nimport { PriceValue, BillingToggle, PlanButton } from \"../parts\";\nimport { Check } from \"../../../icons\";\nimport type { PricingVariantProps } from \"../types\";\n\ninterface BentoProps extends PricingVariantProps {\n className?: string;\n}\n\nexport const PricingBento = ({ className, plans, billing, onBillingChange, onSelect, yearlyBadge, ...props }: BentoProps) => {\n return (\n <div className={cn(\"w-full\", className)} {...props}>\n <BillingToggle billing={billing} onChange={onBillingChange} yearlyBadge={yearlyBadge} />\n <div className=\"grid grid-cols-1 gap-4 lg:grid-cols-2\">\n {plans.map((plan) => {\n const isHighlighted = plan.highlighted && !plan.customColor;\n const bg = plan.customColor || (isHighlighted ? \"rgb(var(--color-primary))\" : undefined);\n const fg = plan.customColor\n ? `contrast-color(${plan.customColor})`\n : isHighlighted\n ? \"rgb(var(--color-on-primary))\"\n : undefined;\n return (\n <div\n key={plan.name}\n className={cn(\n \"flex h-full flex-col rounded-xl p-8\",\n bg\n ? \"lg:col-span-2\"\n : \"border border-border bg-surface\",\n )}\n style={bg ? { backgroundColor: bg, color: fg } : undefined}\n >\n <div className=\"flex items-start justify-between gap-4\">\n <div className=\"min-w-0\">\n <h3 className={cn(\"font-display text-xl font-semibold tracking-tight\", bg ? \"text-current\" : \"text-foreground\")}>\n {plan.name}\n </h3>\n {plan.description ? (\n <p className={cn(\"mt-1.5 text-sm\", bg ? undefined : \"text-muted-foreground\")}>\n {plan.description}\n </p>\n ) : null}\n </div>\n <div className={cn(\"shrink-0 font-display\", bg ? \"text-current\" : \"text-foreground\")}>\n <PriceValue value={billing === \"monthly\" ? plan.monthly : plan.yearly} billing={billing} dim={!bg} />\n </div>\n </div>\n <ul\n className={cn(\n \"mt-7 grid grid-cols-1 gap-x-8 gap-y-2.5 text-sm sm:grid-cols-2\",\n bg ? \"lg:max-w-2xl\" : undefined,\n )}\n >\n {plan.features.map((feature) => (\n <li key={feature} className={cn(\"flex items-start gap-2.5\", bg ? \"text-current\" : \"text-muted-foreground\")}>\n <Check className={cn(\"mt-0.5 h-4 w-4 shrink-0\", bg ? \"text-current\" : \"text-primary\")} />\n {feature}\n </li>\n ))}\n </ul>\n <div className=\"mt-8\">\n <PlanButton plan={plan} billing={billing} onSelect={onSelect} dark={!bg} />\n </div>\n </div>\n );\n })}\n </div>\n </div>\n );\n};\nPricingBento.displayName = \"PricingBento\";"],"names":["PricingBento","className","plans","billing","onBillingChange","onSelect","yearlyBadge","props","jsxs","cn","jsx","BillingToggle","plan","isHighlighted","bg","fg","PriceValue","feature","Check","PlanButton"],"mappings":"kNASaA,EAAe,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAO,QAAAC,EAAS,gBAAAC,EAAiB,SAAAC,EAAU,YAAAC,EAAa,GAAGC,KAEjGC,EAAAA,KAAC,OAAI,UAAWC,EAAAA,GAAG,SAAUR,CAAS,EAAI,GAAGM,EAC3C,SAAA,CAAAG,EAAAA,IAACC,EAAAA,cAAA,CAAc,QAAAR,EAAkB,SAAUC,EAAiB,YAAAE,EAA0B,QACrF,MAAA,CAAI,UAAU,wCACZ,SAAAJ,EAAM,IAAKU,GAAS,CACnB,MAAMC,EAAgBD,EAAK,aAAe,CAACA,EAAK,YAC1CE,EAAKF,EAAK,cAAgBC,EAAgB,4BAA8B,QACxEE,EAAKH,EAAK,YACZ,kBAAkBA,EAAK,WAAW,IAClCC,EACE,+BACA,OACN,OACEL,EAAAA,KAAC,MAAA,CAEC,UAAWC,EAAAA,GACT,sCACAK,EACI,gBACA,iCAAA,EAEN,MAAOA,EAAK,CAAE,gBAAiBA,EA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defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),s=require("../../../utils/cn.cjs"),h=require("../../../utils/contrast.cjs"),i=require("../parts.cjs"),y=require("../../../icons.cjs"),a=({className:n,plans:d,billing:o,onBillingChange:m,onSelect:u,yearlyBadge:x,...g})=>r.jsxs("div",{className:s.cn("w-full",n),...g,children:[r.jsx(i.BillingToggle,{billing:o,onChange:m,yearlyBadge:x}),r.jsx("div",{className:"grid grid-cols-1 gap-5 md:grid-cols-2 lg:grid-cols-3",children:d.map(e=>{const c=e.highlighted&&!e.customColor,t=e.customColor||(c?"rgb(var(--color-primary))":void 0),f=e.customColor?h.getContrastText(e.customColor,"#111111","#ffffff"):c?"rgb(var(--color-on-primary))":void 0;return r.jsxs("div",{className:s.cn("relative flex flex-col rounded-xl p-7",t?"shadow-raised":"border border-border bg-surface",!t&&c&&"border-primary"),style:t?{backgroundColor:t,color:f}:void 0,children:[c?r.jsx("span",{className:s.cn("absolute -top-3 left-7 rounded-full px-2.5 py-1 text-[11px] font-semibold uppercase tracking-wider",!t&&"bg-primary text-on-primary"),style:t?{backgroundColor:"rgb(var(--color-on-primary))",color:"rgb(var(--color-primary))"}:void 0,children:"Most popular"}):null,r.jsx("h3",{className:s.cn("font-display text-lg font-semibold tracking-tight",t?"text-current":"text-foreground"),children:e.name}),e.description?r.jsx("p",{className:s.cn("mt-1.5 text-sm",t?void 0:"text-muted-foreground"),children:e.description}):null,r.jsx("div",{className:s.cn("mt-6 flex items-baseline font-display",t?"text-current":"text-foreground"),children:r.jsx(i.PriceValue,{value:o==="monthly"?e.monthly:e.yearly,billing:o,dim:!t})}),r.jsx("ul",{className:s.cn("mt-7 flex-1 space-y-2.5 text-sm",t?"text-current":"text-muted-foreground"),children:e.features.map(l=>r.jsxs("li",{className:"flex items-start gap-2.5",children:[r.jsx(y.Check,{className:s.cn("mt-0.5 h-4 w-4 shrink-0",t?"text-current":"text-primary")}),l]},l))}),r.jsx("div",{className:"mt-8",children:r.jsx(i.PlanButton,{plan:e,billing:o,onSelect:u,dark:!t})})]},e.name)})})]});a.displayName="PricingCards";exports.PricingCards=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),t=require("../../../utils/cn.cjs"),i=require("../parts.cjs"),y=require("../../../icons.cjs"),a=({className:d,plans:n,billing:s,onBillingChange:m,onSelect:u,yearlyBadge:x,...g})=>r.jsxs("div",{className:t.cn("w-full",d),...g,children:[r.jsx(i.BillingToggle,{billing:s,onChange:m,yearlyBadge:x}),r.jsx("div",{className:"grid grid-cols-1 gap-5 md:grid-cols-2 lg:grid-cols-3",children:n.map(e=>{const c=e.highlighted&&!e.customColor,o=e.customColor||(c?"rgb(var(--color-primary))":void 0),h=e.customColor?`contrast-color(${e.customColor})`:c?"rgb(var(--color-on-primary))":void 0;return r.jsxs("div",{className:t.cn("relative flex flex-col rounded-xl p-7",o?"shadow-raised":"border border-border bg-surface",!o&&c&&"border-primary"),style:o?{backgroundColor:o,color:h}:void 0,children:[c?r.jsx("span",{className:t.cn("absolute -top-3 left-7 rounded-full px-2.5 py-1 text-[11px] font-semibold uppercase tracking-wider",!o&&"bg-primary text-on-primary"),style:o?{backgroundColor:"rgb(var(--color-on-primary))",color:"rgb(var(--color-primary))"}:void 0,children:"Most popular"}):null,r.jsx("h3",{className:t.cn("font-display text-lg font-semibold tracking-tight",o?"text-current":"text-foreground"),children:e.name}),e.description?r.jsx("p",{className:t.cn("mt-1.5 text-sm",o?void 0:"text-muted-foreground"),children:e.description}):null,r.jsx("div",{className:t.cn("mt-6 flex items-baseline font-display",o?"text-current":"text-foreground"),children:r.jsx(i.PriceValue,{value:s==="monthly"?e.monthly:e.yearly,billing:s,dim:!o})}),r.jsx("ul",{className:t.cn("mt-7 flex-1 space-y-2.5 text-sm",o?"text-current":"text-muted-foreground"),children:e.features.map(l=>r.jsxs("li",{className:"flex items-start gap-2.5",children:[r.jsx(y.Check,{className:t.cn("mt-0.5 h-4 w-4 shrink-0",o?"text-current":"text-primary")}),l]},l))}),r.jsx("div",{className:"mt-8",children:r.jsx(i.PlanButton,{plan:e,billing:s,onSelect:u,dark:!o})})]},e.name)})})]});a.displayName="PricingCards";exports.PricingCards=a;
2
2
  //# sourceMappingURL=Cards.cjs.map