@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.
- package/README.md +2 -3
- package/dist/cjs/components/Badge.cjs +1 -1
- package/dist/cjs/components/Badge.cjs.map +1 -1
- package/dist/cjs/components/Button.cjs +1 -1
- package/dist/cjs/components/Button.cjs.map +1 -1
- package/dist/cjs/components/CTA/variants/Inverse.cjs +1 -2
- package/dist/cjs/components/CTA/variants/Inverse.cjs.map +1 -1
- package/dist/cjs/components/CTA/variants/Panel.cjs +1 -2
- package/dist/cjs/components/CTA/variants/Panel.cjs.map +1 -1
- package/dist/cjs/components/Features/FeatureCard.cjs +1 -1
- package/dist/cjs/components/Features/FeatureCard.cjs.map +1 -1
- package/dist/cjs/components/Hero/variants/Statement.cjs +1 -2
- package/dist/cjs/components/Hero/variants/Statement.cjs.map +1 -1
- package/dist/cjs/components/MegaMenu/MegaMenu.cjs +1 -1
- package/dist/cjs/components/MegaMenu/MegaMenu.cjs.map +1 -1
- package/dist/cjs/components/Pricing/parts.cjs +1 -2
- package/dist/cjs/components/Pricing/parts.cjs.map +1 -1
- package/dist/cjs/components/Pricing/variants/Bento.cjs +1 -1
- package/dist/cjs/components/Pricing/variants/Bento.cjs.map +1 -1
- package/dist/cjs/components/Pricing/variants/Cards.cjs +1 -1
- package/dist/cjs/components/Pricing/variants/Cards.cjs.map +1 -1
- package/dist/cjs/components/Testimonials/TestimonialCard.cjs +1 -1
- package/dist/cjs/components/Testimonials/TestimonialCard.cjs.map +1 -1
- package/dist/cjs/components/Testimonials/variants/Carousel.cjs +1 -1
- package/dist/cjs/components/Testimonials/variants/Carousel.cjs.map +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/es/components/Badge.js +21 -17
- package/dist/es/components/Badge.js.map +1 -1
- package/dist/es/components/Button.js +29 -29
- package/dist/es/components/Button.js.map +1 -1
- package/dist/es/components/CTA/variants/Inverse.js +37 -42
- package/dist/es/components/CTA/variants/Inverse.js.map +1 -1
- package/dist/es/components/CTA/variants/Panel.js +51 -56
- package/dist/es/components/CTA/variants/Panel.js.map +1 -1
- package/dist/es/components/Features/FeatureCard.js +13 -14
- package/dist/es/components/Features/FeatureCard.js.map +1 -1
- package/dist/es/components/Hero/variants/Statement.js +37 -42
- package/dist/es/components/Hero/variants/Statement.js.map +1 -1
- package/dist/es/components/MegaMenu/MegaMenu.js +27 -28
- package/dist/es/components/MegaMenu/MegaMenu.js.map +1 -1
- package/dist/es/components/Pricing/parts.js +33 -34
- package/dist/es/components/Pricing/parts.js.map +1 -1
- package/dist/es/components/Pricing/variants/Bento.js +16 -17
- package/dist/es/components/Pricing/variants/Bento.js.map +1 -1
- package/dist/es/components/Pricing/variants/Cards.js +10 -11
- package/dist/es/components/Pricing/variants/Cards.js.map +1 -1
- package/dist/es/components/Testimonials/TestimonialCard.js +10 -11
- package/dist/es/components/Testimonials/TestimonialCard.js.map +1 -1
- package/dist/es/components/Testimonials/variants/Carousel.js +10 -11
- package/dist/es/components/Testimonials/variants/Carousel.js.map +1 -1
- package/dist/es/index.js +89 -93
- package/dist/es/index.js.map +1 -1
- package/dist/index.d.ts +0 -33
- package/dist/styles.css +0 -3
- package/package.json +1 -1
- package/dist/cjs/utils/contrast.cjs +0 -2
- package/dist/cjs/utils/contrast.cjs.map +0 -1
- package/dist/cjs/utils/useTokenForeground.cjs +0 -3
- package/dist/cjs/utils/useTokenForeground.cjs.map +0 -1
- package/dist/es/utils/contrast.js +0 -48
- package/dist/es/utils/contrast.js.map +0 -1
- package/dist/es/utils/useTokenForeground.js +0 -28
- package/dist/es/utils/useTokenForeground.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cards.cjs","sources":["../../../../../src/components/Pricing/variants/Cards.tsx"],"sourcesContent":["import { cn } from \"../../../utils/cn\";\nimport {
|
|
1
|
+
{"version":3,"file":"Cards.cjs","sources":["../../../../../src/components/Pricing/variants/Cards.tsx"],"sourcesContent":["import { cn } from \"../../../utils/cn\";\nimport { PriceValue, BillingToggle, PlanButton } from \"../parts\";\nimport { Check } from \"../../../icons\";\nimport type { PricingVariantProps } from \"../types\";\n\ninterface CardsProps extends PricingVariantProps {\n className?: string;\n}\n\nexport const PricingCards = ({ className, plans, billing, onBillingChange, onSelect, yearlyBadge, ...props }: CardsProps) => {\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-5 md:grid-cols-2 lg:grid-cols-3\">\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 \"relative flex flex-col rounded-xl p-7\",\n bg ? \"shadow-raised\" : \"border border-border bg-surface\",\n !bg && isHighlighted && \"border-primary\",\n )}\n style={bg ? { backgroundColor: bg, color: fg } : undefined}\n >\n {isHighlighted ? (\n <span\n className={cn(\n \"absolute -top-3 left-7 rounded-full px-2.5 py-1 text-[11px] font-semibold uppercase tracking-wider\",\n !bg && \"bg-primary text-on-primary\",\n )}\n style={\n bg\n ? { backgroundColor: \"rgb(var(--color-on-primary))\", color: \"rgb(var(--color-primary))\" }\n : undefined\n }\n >\n Most popular\n </span>\n ) : null}\n <h3 className={cn(\"font-display text-lg 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 className={cn(\"mt-6 flex items-baseline font-display\", bg ? \"text-current\" : \"text-foreground\")}>\n <PriceValue value={billing === \"monthly\" ? plan.monthly : plan.yearly} billing={billing} dim={!bg} />\n </div>\n <ul className={cn(\"mt-7 flex-1 space-y-2.5 text-sm\", bg ? \"text-current\" : \"text-muted-foreground\")}>\n {plan.features.map((feature) => (\n <li key={feature} className=\"flex items-start gap-2.5\">\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};\nPricingCards.displayName = \"PricingCards\";"],"names":["PricingCards","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,uDACZ,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,wCACAK,EAAK,gBAAkB,kCACvB,CAACA,GAAMD,GAAiB,gBAAA,EAE1B,MAAOC,EAAK,CAAE,gBAAiBA,EAAI,MAAOC,GAAO,OAEhD,SAAA,CAAAF,EACCH,EAAAA,IAAC,OAAA,CACC,UAAWD,EAAAA,GACT,qGACA,CAACK,GAAM,4BAAA,EAET,MACEA,EACI,CAAE,gBAAiB,+BAAgC,MAAO,6BAC1D,OAEP,SAAA,cAAA,CAAA,EAGC,KACJJ,EAAAA,IAAC,KAAA,CAAG,UAAWD,EAAAA,GAAG,oDAAqDK,EAAK,eAAiB,iBAAiB,EAC3G,SAAAF,EAAK,IAAA,CACR,EACCA,EAAK,YACJF,EAAAA,IAAC,IAAA,CAAE,UAAWD,EAAAA,GAAG,iBAAkBK,EAAK,OAAY,uBAAuB,EACxE,SAAAF,EAAK,YACR,EACE,KACJF,EAAAA,IAAC,OAAI,UAAWD,EAAAA,GAAG,wCAAyCK,EAAK,eAAiB,iBAAiB,EACjG,SAAAJ,EAAAA,IAACM,EAAAA,WAAA,CAAW,MAAOb,IAAY,UAAYS,EAAK,QAAUA,EAAK,OAAQ,QAAAT,EAAkB,IAAK,CAACW,CAAA,CAAI,CAAA,CACrG,QACC,KAAA,CAAG,UAAWL,EAAAA,GAAG,kCAAmCK,EAAK,eAAiB,uBAAuB,EAC/F,SAAAF,EAAK,SAAS,IAAKK,GAClBT,EAAAA,KAAC,KAAA,CAAiB,UAAU,2BAC1B,SAAA,CAAAE,MAACQ,EAAAA,OAAM,UAAWT,EAAAA,GAAG,0BAA2BK,EAAK,eAAiB,cAAc,EAAG,EACtFG,CAAA,GAFMA,CAGT,CACD,EACH,EACAP,EAAAA,IAAC,MAAA,CAAI,UAAU,OACb,SAAAA,EAAAA,IAACS,EAAAA,WAAA,CAAW,KAAAP,EAAY,QAAAT,EAAkB,SAAAE,EAAoB,KAAM,CAACS,CAAA,CAAI,CAAA,CAC3E,CAAA,CAAA,EA5CKF,EAAK,IAAA,CA+ChB,CAAC,CAAA,CACH,CAAA,EACF,EAGJZ,EAAa,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),g=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),g=require("react"),t=require("../../utils/cn.cjs"),l=require("../../icons.cjs"),j=require("./parts.cjs"),h=g.forwardRef(function({className:c,testimonial:d,...x},m){const{quote:u,author:s,role:a,company:n,avatar:o,accent:r,rating:i}=d,f=r?{backgroundColor:r,color:`contrast-color(${r})`}:void 0;return e.jsxs("figure",{ref:m,className:t.cn("mb-4 flex flex-col break-inside-avoid rounded-2xl border border-border bg-surface p-7",c),...x,children:[e.jsxs("div",{className:"mb-5 flex items-center justify-between",children:[e.jsx(l.Quote,{className:t.cn("h-6 w-6",r?void 0:"text-primary/30"),style:r?{color:r}:void 0}),i?e.jsx("span",{className:"flex items-center gap-0.5 text-amber-500","aria-label":`${i} / 5`,children:Array.from({length:5}).map((y,b)=>e.jsx(l.Star,{className:"h-3.5 w-3.5"},b))}):null]}),e.jsx("blockquote",{className:"flex-1 text-[15px] leading-7 text-foreground/85",children:u}),e.jsxs("figcaption",{className:"mt-6 flex items-center gap-3",children:[o||e.jsx("span",{style:f,className:t.cn("inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-full text-xs font-bold",!r&&"bg-primary-soft text-primary"),children:j.initials(s)}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-semibold text-foreground",children:s}),(a||n)&&e.jsx("div",{className:"text-xs text-muted-foreground",children:[a,n].filter(Boolean).join(" · ")})]})]})]})});exports.TestimonialCard=h;
|
|
2
2
|
//# sourceMappingURL=TestimonialCard.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestimonialCard.cjs","sources":["../../../../src/components/Testimonials/TestimonialCard.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport {
|
|
1
|
+
{"version":3,"file":"TestimonialCard.cjs","sources":["../../../../src/components/Testimonials/TestimonialCard.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { Quote, Star } from \"../../icons\";\nimport { initials } from \"./parts\";\nimport type { TestimonialCardProps } from \"./types\";\n\nexport const TestimonialCard = forwardRef<HTMLElement, TestimonialCardProps>(\n function TestimonialCard({ className, testimonial, ...props }, ref) {\n const { quote, author, role, company, avatar, accent, rating } = testimonial;\n const badgeStyle = accent\n ? { backgroundColor: accent, color: `contrast-color(${accent})` }\n : undefined;\n\n return (\n <figure\n ref={ref}\n className={cn(\n \"mb-4 flex flex-col break-inside-avoid rounded-2xl border border-border bg-surface p-7\",\n className,\n )}\n {...props}\n >\n <div className=\"mb-5 flex items-center justify-between\">\n <Quote className={cn(\"h-6 w-6\", accent ? undefined : \"text-primary/30\")} style={accent ? { color: accent } : undefined} />\n {rating ? (\n <span className=\"flex items-center gap-0.5 text-amber-500\" aria-label={`${rating} / 5`}>\n {Array.from({ length: 5 }).map((_, i) => (\n <Star key={i} className=\"h-3.5 w-3.5\" />\n ))}\n </span>\n ) : null}\n </div>\n <blockquote className=\"flex-1 text-[15px] leading-7 text-foreground/85\">{quote}</blockquote>\n <figcaption className=\"mt-6 flex items-center gap-3\">\n {avatar ? (\n avatar\n ) : (\n <span\n style={badgeStyle}\n className={cn(\n \"inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-full text-xs font-bold\",\n !accent && \"bg-primary-soft text-primary\",\n )}\n >\n {initials(author)}\n </span>\n )}\n <div>\n <div className=\"text-sm font-semibold text-foreground\">{author}</div>\n {(role || company) && (\n <div className=\"text-xs text-muted-foreground\">\n {[role, company].filter(Boolean).join(\" · \")}\n </div>\n )}\n </div>\n </figcaption>\n </figure>\n );\n },\n);"],"names":["TestimonialCard","forwardRef","className","testimonial","props","ref","quote","author","role","company","avatar","accent","rating","badgeStyle","jsxs","cn","jsx","Quote","_","i","Star"],"mappings":"8NAMaA,EAAkBC,EAAAA,WAC7B,SAAyB,CAAE,UAAAC,EAAW,YAAAC,EAAa,GAAGC,CAAA,EAASC,EAAK,CAClE,KAAM,CAAE,MAAAC,EAAO,OAAAC,EAAQ,KAAAC,EAAM,QAAAC,EAAS,OAAAC,EAAQ,OAAAC,EAAQ,OAAAC,GAAWT,EAC3DU,EAAaF,EACf,CAAE,gBAAiBA,EAAQ,MAAO,kBAAkBA,CAAM,GAAA,EAC1D,OAEJ,OACEG,EAAAA,KAAC,SAAA,CACC,IAAAT,EACA,UAAWU,EAAAA,GACT,wFACAb,CAAA,EAED,GAAGE,EAEJ,SAAA,CAAAU,EAAAA,KAAC,MAAA,CAAI,UAAU,yCACb,SAAA,CAAAE,EAAAA,IAACC,EAAAA,MAAA,CAAM,UAAWF,EAAAA,GAAG,UAAWJ,EAAS,OAAY,iBAAiB,EAAG,MAAOA,EAAS,CAAE,MAAOA,CAAA,EAAW,OAAW,EACvHC,EACCI,EAAAA,IAAC,OAAA,CAAK,UAAU,2CAA2C,aAAY,GAAGJ,CAAM,OAC7E,SAAA,MAAM,KAAK,CAAE,OAAQ,CAAA,CAAG,EAAE,IAAI,CAACM,EAAGC,IACjCH,EAAAA,IAACI,OAAA,CAAa,UAAU,aAAA,EAAbD,CAA2B,CACvC,CAAA,CACH,EACE,IAAA,EACN,EACAH,EAAAA,IAAC,aAAA,CAAW,UAAU,kDAAmD,SAAAV,EAAM,EAC/EQ,EAAAA,KAAC,aAAA,CAAW,UAAU,+BACnB,SAAA,CAAAJ,GAGCM,EAAAA,IAAC,OAAA,CACC,MAAOH,EACP,UAAWE,EAAAA,GACT,4FACA,CAACJ,GAAU,8BAAA,EAGZ,oBAASJ,CAAM,CAAA,CAAA,SAGnB,MAAA,CACC,SAAA,CAAAS,EAAAA,IAAC,MAAA,CAAI,UAAU,wCAAyC,SAAAT,EAAO,GAC7DC,GAAQC,IACRO,EAAAA,IAAC,MAAA,CAAI,UAAU,gCACZ,SAAA,CAACR,EAAMC,CAAO,EAAE,OAAO,OAAO,EAAE,KAAK,KAAK,CAAA,CAC7C,CAAA,CAAA,CAEJ,CAAA,CAAA,CACF,CAAA,CAAA,CAAA,CAGN,CACF"}
|
|
@@ -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"),
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("react"),n=require("../../../utils/cn.cjs"),i=require("../../../icons.cjs"),g=require("../parts.cjs"),d=u.forwardRef(({className:x,items:o,...f},m)=>{const[s,a]=u.useState(0),r=o[s%o.length],b=r.accent?{backgroundColor:r.accent,color:`contrast-color(${r.accent})`}:void 0,l=c=>a(t=>(t+c+o.length)%o.length);return e.jsxs("div",{className:n.cn("mx-auto w-full max-w-3xl",x),ref:m,...f,children:[e.jsxs("figure",{className:"relative rounded-2xl border border-border bg-surface p-10 text-center sm:p-14",children:[e.jsx(i.Quote,{className:n.cn("mx-auto mb-6 h-8 w-8",r.accent?void 0:"text-primary/25"),style:r.accent?{color:r.accent}:void 0,"aria-hidden":!0}),e.jsx("blockquote",{className:"font-display text-balance text-xl font-medium leading-relaxed tracking-tight text-foreground sm:text-2xl",children:r.quote}),e.jsxs("figcaption",{className:"mt-8 flex items-center justify-center gap-3",children:[r.avatar?r.avatar:e.jsx("span",{style:b,className:n.cn("inline-flex h-11 w-11 items-center justify-center rounded-full text-xs font-bold",!r.accent&&"bg-foreground text-background"),children:g.initials(r.author)}),e.jsxs("div",{className:"text-left",children:[e.jsx("div",{className:"text-sm font-semibold text-foreground",children:r.author}),e.jsx("div",{className:"text-xs text-muted-foreground",children:[r.role,r.company].filter(Boolean).join(" · ")})]})]})]}),e.jsxs("div",{className:"mt-6 flex items-center justify-center gap-4",children:[e.jsx("button",{type:"button","aria-label":"Previous testimonial",onClick:()=>l(-1),className:"inline-flex h-10 w-10 cursor-pointer items-center justify-center rounded-full border border-border bg-surface text-foreground transition-colors duration-150 hover:border-foreground/25 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:e.jsx(i.ChevronLeft,{className:"h-4 w-4"})}),e.jsx("div",{className:"flex items-center gap-1.5",children:o.map((c,t)=>e.jsx("button",{type:"button","aria-label":`Testimonial ${t+1}`,"aria-current":t===s,onClick:()=>a(t),className:n.cn("h-1.5 cursor-pointer rounded-full transition-all duration-200",t===s?"w-6 bg-foreground":"w-1.5 bg-foreground/25 hover:bg-foreground/50")},t))}),e.jsx("button",{type:"button","aria-label":"Next testimonial",onClick:()=>l(1),className:"inline-flex h-10 w-10 cursor-pointer items-center justify-center rounded-full border border-border bg-surface text-foreground transition-colors duration-150 hover:border-foreground/25 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:e.jsx(i.ChevronRight,{className:"h-4 w-4"})})]})]})});d.displayName="TestimonialsCarousel";exports.TestimonialsCarousel=d;
|
|
3
3
|
//# sourceMappingURL=Carousel.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Carousel.cjs","sources":["../../../../../src/components/Testimonials/variants/Carousel.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, useState, type HTMLAttributes } from \"react\";\nimport { cn } from \"../../../utils/cn\";\nimport {
|
|
1
|
+
{"version":3,"file":"Carousel.cjs","sources":["../../../../../src/components/Testimonials/variants/Carousel.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, useState, type HTMLAttributes } from \"react\";\nimport { cn } from \"../../../utils/cn\";\nimport { ChevronLeft, ChevronRight, Quote } from \"../../../icons\";\nimport { initials } from \"../parts\";\nimport type { Testimonial } from \"../types\";\n\ninterface CarouselProps extends HTMLAttributes<HTMLDivElement> {\n items: Testimonial[];\n}\n\nexport const TestimonialsCarousel = forwardRef<HTMLDivElement, CarouselProps>(\n ({ className, items, ...props }, ref) => {\n const [index, setIndex] = useState(0);\n const item = items[index % items.length];\n const badgeStyle = item.accent\n ? { backgroundColor: item.accent, color: `contrast-color(${item.accent})` }\n : undefined;\n\n const go = (dir: 1 | -1) => setIndex((i) => (i + dir + items.length) % items.length);\n\n return (\n <div className={cn(\"mx-auto w-full max-w-3xl\", className)} ref={ref} {...props}>\n <figure className=\"relative rounded-2xl border border-border bg-surface p-10 text-center sm:p-14\">\n <Quote\n className={cn(\"mx-auto mb-6 h-8 w-8\", item.accent ? undefined : \"text-primary/25\")}\n style={item.accent ? { color: item.accent } : undefined}\n aria-hidden\n />\n <blockquote className=\"font-display text-balance text-xl font-medium leading-relaxed tracking-tight text-foreground sm:text-2xl\">\n {item.quote}\n </blockquote>\n <figcaption className=\"mt-8 flex items-center justify-center gap-3\">\n {item.avatar ? (\n item.avatar\n ) : (\n <span\n style={badgeStyle}\n className={cn(\n \"inline-flex h-11 w-11 items-center justify-center rounded-full text-xs font-bold\",\n !item.accent && \"bg-foreground text-background\",\n )}\n >\n {initials(item.author)}\n </span>\n )}\n <div className=\"text-left\">\n <div className=\"text-sm font-semibold text-foreground\">{item.author}</div>\n <div className=\"text-xs text-muted-foreground\">\n {[item.role, item.company].filter(Boolean).join(\" · \")}\n </div>\n </div>\n </figcaption>\n </figure>\n\n <div className=\"mt-6 flex items-center justify-center gap-4\">\n <button\n type=\"button\"\n aria-label=\"Previous testimonial\"\n onClick={() => go(-1)}\n className=\"inline-flex h-10 w-10 cursor-pointer items-center justify-center rounded-full border border-border bg-surface text-foreground transition-colors duration-150 hover:border-foreground/25 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\"\n >\n <ChevronLeft className=\"h-4 w-4\" />\n </button>\n <div className=\"flex items-center gap-1.5\">\n {items.map((_, i) => (\n <button\n key={i}\n type=\"button\"\n aria-label={`Testimonial ${i + 1}`}\n aria-current={i === index}\n onClick={() => setIndex(i)}\n className={cn(\n \"h-1.5 cursor-pointer rounded-full transition-all duration-200\",\n i === index ? \"w-6 bg-foreground\" : \"w-1.5 bg-foreground/25 hover:bg-foreground/50\",\n )}\n />\n ))}\n </div>\n <button\n type=\"button\"\n aria-label=\"Next testimonial\"\n onClick={() => go(1)}\n className=\"inline-flex h-10 w-10 cursor-pointer items-center justify-center rounded-full border border-border bg-surface text-foreground transition-colors duration-150 hover:border-foreground/25 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\"\n >\n <ChevronRight className=\"h-4 w-4\" />\n </button>\n </div>\n </div>\n );\n },\n);\nTestimonialsCarousel.displayName = \"TestimonialsCarousel\";"],"names":["TestimonialsCarousel","forwardRef","className","items","props","ref","index","setIndex","useState","item","badgeStyle","go","dir","i","jsxs","cn","jsx","Quote","initials","ChevronLeft","_","ChevronRight"],"mappings":"qOAWaA,EAAuBC,EAAAA,WAClC,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAO,GAAGC,CAAA,EAASC,IAAQ,CACvC,KAAM,CAACC,EAAOC,CAAQ,EAAIC,EAAAA,SAAS,CAAC,EAC9BC,EAAON,EAAMG,EAAQH,EAAM,MAAM,EACjCO,EAAaD,EAAK,OACpB,CAAE,gBAAiBA,EAAK,OAAQ,MAAO,kBAAkBA,EAAK,MAAM,GAAA,EACpE,OAEEE,EAAMC,GAAgBL,EAAUM,IAAOA,EAAID,EAAMT,EAAM,QAAUA,EAAM,MAAM,EAEnF,OACEW,OAAC,OAAI,UAAWC,EAAAA,GAAG,2BAA4Bb,CAAS,EAAG,IAAAG,EAAW,GAAGD,EACvE,SAAA,CAAAU,EAAAA,KAAC,SAAA,CAAO,UAAU,gFAChB,SAAA,CAAAE,EAAAA,IAACC,EAAAA,MAAA,CACC,UAAWF,EAAAA,GAAG,uBAAwBN,EAAK,OAAS,OAAY,iBAAiB,EACjF,MAAOA,EAAK,OAAS,CAAE,MAAOA,EAAK,QAAW,OAC9C,cAAW,EAAA,CAAA,EAEbO,EAAAA,IAAC,aAAA,CAAW,UAAU,2GACnB,WAAK,MACR,EACAF,EAAAA,KAAC,aAAA,CAAW,UAAU,8CACnB,SAAA,CAAAL,EAAK,OACJA,EAAK,OAELO,EAAAA,IAAC,OAAA,CACC,MAAON,EACP,UAAWK,EAAAA,GACT,mFACA,CAACN,EAAK,QAAU,+BAAA,EAGjB,SAAAS,EAAAA,SAAST,EAAK,MAAM,CAAA,CAAA,EAGzBK,EAAAA,KAAC,MAAA,CAAI,UAAU,YACb,SAAA,CAAAE,EAAAA,IAAC,MAAA,CAAI,UAAU,wCAAyC,SAAAP,EAAK,OAAO,EACpEO,EAAAA,IAAC,MAAA,CAAI,UAAU,gCACZ,UAACP,EAAK,KAAMA,EAAK,OAAO,EAAE,OAAO,OAAO,EAAE,KAAK,KAAK,CAAA,CACvD,CAAA,CAAA,CACF,CAAA,CAAA,CACF,CAAA,EACF,EAEAK,EAAAA,KAAC,MAAA,CAAI,UAAU,8CACb,SAAA,CAAAE,EAAAA,IAAC,SAAA,CACC,KAAK,SACL,aAAW,uBACX,QAAS,IAAML,EAAG,EAAE,EACpB,UAAU,kQAEV,SAAAK,EAAAA,IAACG,EAAAA,YAAA,CAAY,UAAU,SAAA,CAAU,CAAA,CAAA,EAEnCH,EAAAA,IAAC,OAAI,UAAU,4BACZ,WAAM,IAAI,CAACI,EAAGP,IACbG,EAAAA,IAAC,SAAA,CAEC,KAAK,SACL,aAAY,eAAeH,EAAI,CAAC,GAChC,eAAcA,IAAMP,EACpB,QAAS,IAAMC,EAASM,CAAC,EACzB,UAAWE,EAAAA,GACT,gEACAF,IAAMP,EAAQ,oBAAsB,+CAAA,CACtC,EARKO,CAAA,CAUR,EACH,EACAG,EAAAA,IAAC,SAAA,CACC,KAAK,SACL,aAAW,mBACX,QAAS,IAAML,EAAG,CAAC,EACnB,UAAU,kQAEV,SAAAK,EAAAA,IAACK,EAAAA,aAAA,CAAa,UAAU,SAAA,CAAU,CAAA,CAAA,CACpC,CAAA,CACF,CAAA,EACF,CAEJ,CACF,EACArB,EAAqB,YAAc"}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./components/Button.cjs"),n=require("./components/Slot.cjs"),c=require("./components/Badge.cjs"),r=require("./components/Card.cjs"),o=require("./components/Section.cjs"),s=require("./components/Modal.cjs"),t=require("./components/Prose.cjs"),a=require("./components/Container.cjs"),u=require("./utils/cn.cjs"),l=require("./utils/iso2Flag.cjs"),e=require("./icons.cjs"),d=require("./components/AccordionShowcase/AccordionShowcase.cjs"),C=require("./components/Blog/BlogCard.cjs"),g=require("./components/Blog/BlogSection.cjs"),S=require("./components/CTA/CTA.cjs"),h=require("./components/FAQ/FAQ.cjs"),q=require("./components/Features/FeatureCard.cjs"),w=require("./components/Features/FeatureGrid.cjs"),F=require("./components/FeatureShowcase/FeatureShowcase.cjs"),A=require("./components/Footer/Footer.cjs"),B=require("./components/Hero/Hero.cjs"),L=require("./components/LanguageSwitcher/LanguageSwitcher.cjs"),T=require("./components/LogoCloud/LogoCloud.cjs"),P=require("./components/MegaMenu/MegaMenu.cjs"),k=require("./components/Navbar/Navbar.cjs"),M=require("./components/Newsletter/Newsletter.cjs"),m=require("./components/Pricing/Pricing.cjs"),p=require("./components/Stats/Stats.cjs"),v=require("./components/Testimonials/TestimonialCard.cjs"),D=require("./components/Testimonials/Testimonials.cjs");exports.Button=i.Button;exports.Slot=n.Slot;exports.Badge=c.Badge;exports.Card=r.Card;exports.CardContent=r.CardContent;exports.CardDescription=r.CardDescription;exports.CardFooter=r.CardFooter;exports.CardHeader=r.CardHeader;exports.CardTitle=r.CardTitle;exports.Section=o.Section;exports.SectionHeader=o.SectionHeader;exports.Modal=s.Modal;exports.Prose=t.Prose;exports.ProseLead=t.ProseLead;exports.Container=a.Container;exports.Stack=a.Stack;exports.cn=u.cn;exports.iso2ToFlagEmoji=l.iso2ToFlagEmoji;exports.ArrowDown=e.ArrowDown;exports.ArrowRight=e.ArrowRight;exports.ArrowUp=e.ArrowUp;exports.ArrowUpRight=e.ArrowUpRight;exports.BarChart=e.BarChart;exports.Box=e.Box;exports.Check=e.Check;exports.ChevronDown=e.ChevronDown;exports.ChevronLeft=e.ChevronLeft;exports.ChevronRight=e.ChevronRight;exports.Clock=e.Clock;exports.Code=e.Code;exports.Cpu=e.Cpu;exports.Database=e.Database;exports.DollarSign=e.DollarSign;exports.ExternalLink=e.ExternalLink;exports.Gauge=e.Gauge;exports.Globe=e.Globe;exports.Layers=e.Layers;exports.Lock=e.Lock;exports.Mail=e.Mail;exports.Menu=e.Menu;exports.Palette=e.Palette;exports.Play=e.Play;exports.Plus=e.Plus;exports.Quote=e.Quote;exports.Rocket=e.Rocket;exports.Send=e.Send;exports.ShieldCheck=e.ShieldCheck;exports.Sliders=e.Sliders;exports.Smartphone=e.Smartphone;exports.Star=e.Star;exports.Terminal=e.Terminal;exports.Users=e.Users;exports.X=e.X;exports.Zap=e.Zap;exports.AccordionShowcase=d.AccordionShowcase;exports.BlogCard=C.BlogCard;exports.BlogSection=g.BlogSection;exports.CTA=S.CTA;exports.FAQ=h.FAQ;exports.FeatureCard=q.FeatureCard;exports.FeatureGrid=w.FeatureGrid;exports.FeatureShowcase=F.FeatureShowcase;exports.Footer=A.Footer;exports.Hero=B.Hero;exports.LanguageSwitcher=L.LanguageSwitcher;exports.LogoCloud=T.LogoCloud;exports.MegaMenu=P.MegaMenu;exports.Navbar=k.Navbar;exports.Newsletter=M.Newsletter;exports.Pricing=m.Pricing;exports.Stats=p.Stats;exports.TestimonialCard=v.TestimonialCard;exports.Testimonials=D.Testimonials;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,43 +1,47 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as c, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as m } from "react";
|
|
3
|
-
import { cn as
|
|
4
|
-
|
|
5
|
-
const c = "inline-flex items-center rounded-full font-medium tracking-tight transition-colors duration-200", u = {
|
|
3
|
+
import { cn as o } from "../utils/cn.js";
|
|
4
|
+
const f = "inline-flex items-center rounded-full font-medium tracking-tight transition-colors duration-200", u = {
|
|
6
5
|
sm: "px-2.5 py-0.5 text-xs gap-1",
|
|
7
6
|
md: "px-3 py-1 text-[13px] gap-1.5"
|
|
8
|
-
},
|
|
7
|
+
}, x = {
|
|
9
8
|
solid: "bg-primary text-on-primary",
|
|
10
9
|
soft: "bg-primary-soft text-primary",
|
|
11
10
|
outline: "text-muted-foreground ring-1 ring-inset ring-border",
|
|
12
11
|
dot: "text-foreground ring-1 ring-inset ring-border bg-surface"
|
|
13
12
|
}, b = m(
|
|
14
|
-
({ className: a, variant: t = "soft", size:
|
|
15
|
-
const
|
|
16
|
-
|
|
13
|
+
({ className: a, variant: t = "soft", size: s = "md", icon: n, customColor: r, style: e, children: d, ...l }, g) => {
|
|
14
|
+
const p = r ? {
|
|
15
|
+
...e,
|
|
16
|
+
"--lc-bg": r,
|
|
17
|
+
backgroundColor: "var(--lc-bg)",
|
|
18
|
+
color: "contrast-color(var(--lc-bg))"
|
|
19
|
+
} : e;
|
|
20
|
+
return /* @__PURE__ */ c(
|
|
17
21
|
"span",
|
|
18
22
|
{
|
|
19
|
-
ref:
|
|
20
|
-
style:
|
|
21
|
-
className:
|
|
22
|
-
|
|
23
|
-
u[
|
|
24
|
-
r ? void 0 :
|
|
23
|
+
ref: g,
|
|
24
|
+
style: p,
|
|
25
|
+
className: o(
|
|
26
|
+
f,
|
|
27
|
+
u[s],
|
|
28
|
+
r ? void 0 : x[t],
|
|
25
29
|
a
|
|
26
30
|
),
|
|
27
|
-
...
|
|
31
|
+
...l,
|
|
28
32
|
children: [
|
|
29
33
|
t === "dot" ? /* @__PURE__ */ i(
|
|
30
34
|
"span",
|
|
31
35
|
{
|
|
32
36
|
"aria-hidden": !0,
|
|
33
|
-
className:
|
|
37
|
+
className: o(
|
|
34
38
|
"h-1.5 w-1.5 shrink-0 rounded-full",
|
|
35
39
|
r ? "currentColor" : "bg-primary"
|
|
36
40
|
),
|
|
37
41
|
style: r ? { backgroundColor: r } : void 0
|
|
38
42
|
}
|
|
39
43
|
) : null,
|
|
40
|
-
|
|
44
|
+
n ? /* @__PURE__ */ i("span", { className: "shrink-0 opacity-70", children: n }) : null,
|
|
41
45
|
d
|
|
42
46
|
]
|
|
43
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.js","sources":["../../../src/components/Badge.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport { cn } from \"../utils/cn\";\
|
|
1
|
+
{"version":3,"file":"Badge.js","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":";;;AAcA,MAAMA,IACJ,mGAEIC,IAAmC;AAAA,EACvC,IAAI;AAAA,EACJ,IAAI;AACN,GAEMC,IAAyC;AAAA,EAC7C,OAAO;AAAA,EACP,MAAM;AAAA,EACN,SAAS;AAAA,EACT,KAAK;AACP,GAEaC,IAAQC;AAAA,EACnB,CACE,EAAE,WAAAC,GAAW,SAAAC,IAAU,QAAQ,MAAAC,IAAO,MAAM,MAAAC,GAAM,aAAAC,GAAa,OAAAC,GAAO,UAAAC,GAAU,GAAGC,EAAA,GACnFC,MACG;AACH,UAAMC,IAAcL,IACf;AAAA,MACC,GAAGC;AAAA,MACH,WAAWD;AAAA,MACX,iBAAiB;AAAA,MACjB,OAAO;AAAA,IAAA,IAETC;AAEJ,WACE,gBAAAK;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAAF;AAAA,QACA,OAAOC;AAAA,QACP,WAAWE;AAAA,UACThB;AAAA,UACAC,EAAMM,CAAI;AAAA,UACVE,IAAc,SAAYP,EAASI,CAAO;AAAA,UAC1CD;AAAA,QAAA;AAAA,QAED,GAAGO;AAAA,QAEH,UAAA;AAAA,UAAAN,MAAY,QACX,gBAAAW;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,eAAW;AAAA,cACX,WAAWD;AAAA,gBACT;AAAA,gBACAP,IAAc,iBAAiB;AAAA,cAAA;AAAA,cAEjC,OAAOA,IAAc,EAAE,iBAAiBA,MAAgB;AAAA,YAAA;AAAA,UAAA,IAExD;AAAA,UACHD,IAAO,gBAAAS,EAAC,QAAA,EAAK,WAAU,uBAAuB,aAAK,IAAU;AAAA,UAC7DN;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AACAR,EAAM,cAAc;"}
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as e, jsxs as x } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as v } from "react";
|
|
3
3
|
import { cn as t } from "../utils/cn.js";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
const N = {
|
|
4
|
+
import { Slot as y } from "./Slot.js";
|
|
5
|
+
const k = {
|
|
7
6
|
primary: "bg-primary text-on-primary hover:bg-primary-hover",
|
|
8
7
|
dark: "bg-secondary text-on-secondary hover:bg-secondary-hover",
|
|
9
8
|
outline: "border border-border bg-transparent text-foreground hover:border-foreground/30 hover:bg-surface",
|
|
10
9
|
ghost: "text-foreground hover:bg-surface",
|
|
11
10
|
link: "px-0 h-auto text-primary hover:text-primary-hover"
|
|
12
|
-
},
|
|
11
|
+
}, N = {
|
|
13
12
|
sm: "h-9 px-4 text-[13px] gap-1.5",
|
|
14
13
|
md: "h-11 px-5 text-sm gap-2",
|
|
15
14
|
lg: "h-12 px-7 text-[15px] gap-2"
|
|
16
|
-
},
|
|
15
|
+
}, j = "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", w = v(
|
|
17
16
|
({
|
|
18
|
-
className:
|
|
17
|
+
className: b,
|
|
19
18
|
variant: n = "primary",
|
|
20
|
-
size:
|
|
19
|
+
size: p = "md",
|
|
21
20
|
iconLeft: s,
|
|
22
21
|
iconRight: i,
|
|
23
22
|
customColor: r,
|
|
24
|
-
fullWidth:
|
|
23
|
+
fullWidth: m,
|
|
25
24
|
asChild: f,
|
|
26
25
|
style: a,
|
|
27
26
|
type: h = "button",
|
|
28
27
|
children: l,
|
|
29
28
|
...c
|
|
30
|
-
},
|
|
31
|
-
const
|
|
29
|
+
}, u) => {
|
|
30
|
+
const d = r ? {
|
|
32
31
|
...a,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
j
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
32
|
+
"--lc-bg": r,
|
|
33
|
+
backgroundColor: "var(--lc-bg)",
|
|
34
|
+
color: "contrast-color(var(--lc-bg))"
|
|
35
|
+
} : a, o = n === "link", g = t(
|
|
36
|
+
j,
|
|
37
|
+
N[p],
|
|
38
|
+
r ? "hover:brightness-95" : k[n],
|
|
39
|
+
o && "underline-offset-4 hover:underline",
|
|
40
|
+
m && "w-full",
|
|
41
|
+
b
|
|
42
42
|
);
|
|
43
|
-
return f ? /* @__PURE__ */
|
|
43
|
+
return f ? /* @__PURE__ */ e(y, { ref: u, style: d, className: g, ...c, children: l }) : /* @__PURE__ */ x(
|
|
44
44
|
"button",
|
|
45
45
|
{
|
|
46
|
-
ref:
|
|
46
|
+
ref: u,
|
|
47
47
|
type: h,
|
|
48
|
-
style:
|
|
49
|
-
className:
|
|
48
|
+
style: d,
|
|
49
|
+
className: g,
|
|
50
50
|
...c,
|
|
51
51
|
children: [
|
|
52
|
-
s ? /* @__PURE__ */
|
|
52
|
+
s ? /* @__PURE__ */ e("span", { className: t("shrink-0", !o && "opacity-70"), children: s }) : null,
|
|
53
53
|
l,
|
|
54
|
-
i ? /* @__PURE__ */
|
|
54
|
+
i ? /* @__PURE__ */ e(
|
|
55
55
|
"span",
|
|
56
56
|
{
|
|
57
57
|
className: t(
|
|
58
58
|
"shrink-0 transition-transform duration-200",
|
|
59
|
-
!
|
|
59
|
+
!o && "opacity-70 group-hover:translate-x-0.5"
|
|
60
60
|
),
|
|
61
61
|
children: i
|
|
62
62
|
}
|
|
@@ -66,8 +66,8 @@ const N = {
|
|
|
66
66
|
);
|
|
67
67
|
}
|
|
68
68
|
);
|
|
69
|
-
|
|
69
|
+
w.displayName = "Button";
|
|
70
70
|
export {
|
|
71
|
-
|
|
71
|
+
w as Button
|
|
72
72
|
};
|
|
73
73
|
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../../../src/components/Button.tsx"],"sourcesContent":["import { forwardRef, type ButtonHTMLAttributes, type CSSProperties, type ReactNode } from \"react\";\nimport { cn } from \"../utils/cn\";\nimport {
|
|
1
|
+
{"version":3,"file":"Button.js","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":";;;;AAwBA,MAAMA,IAA0C;AAAA,EAC9C,SAAS;AAAA,EACT,MAAM;AAAA,EACN,SACE;AAAA,EACF,OAAO;AAAA,EACP,MAAM;AACR,GAEMC,IAAoC;AAAA,EACxC,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEMC,IACJ,qXAEWC,IAASC;AAAA,EACpB,CACE;AAAA,IACE,WAAAC;AAAA,IACA,SAAAC,IAAU;AAAA,IACV,MAAAC,IAAO;AAAA,IACP,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,aAAAC;AAAA,IACA,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,OAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,UAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAMC,IAAyCR,IAC1C;AAAA,MACC,GAAGG;AAAA,MACH,WAAWH;AAAA,MACX,iBAAiB;AAAA,MACjB,OAAO;AAAA,IAAA,IAETG,GAEEM,IAASb,MAAY,QAErBc,IAAUC;AAAA,MACdnB;AAAA,MACAD,EAAMM,CAAI;AAAA,MACVG,IAAc,wBAAwBV,EAASM,CAAO;AAAA,MACtDa,KAAU;AAAA,MACVR,KAAa;AAAA,MACbN;AAAA,IAAA;AAGF,WAAIO,IAEA,gBAAAU,EAACC,KAAK,KAAAN,GAAU,OAAOC,GAAa,WAAWE,GAAU,GAAGJ,GACzD,UAAAD,EAAA,CACH,IAKF,gBAAAS;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAAP;AAAA,QACA,MAAAH;AAAA,QACA,OAAOI;AAAA,QACP,WAAWE;AAAA,QACV,GAAGJ;AAAA,QAEH,UAAA;AAAA,UAAAR,IAAW,gBAAAc,EAAC,QAAA,EAAK,WAAWD,EAAG,YAAY,CAACF,KAAU,YAAY,GAAI,UAAAX,EAAA,CAAS,IAAU;AAAA,UACzFO;AAAA,UACAN,IACC,gBAAAa;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAWD;AAAA,gBACT;AAAA,gBACA,CAACF,KAAU;AAAA,cAAA;AAAA,cAGZ,UAAAV;AAAA,YAAA;AAAA,UAAA,IAED;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGV;AACF;AACAN,EAAO,cAAc;"}
|
|
@@ -1,47 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import { forwardRef as p } from "react";
|
|
1
|
+
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as x } from "react";
|
|
4
3
|
import { cn as t } from "../../../utils/cn.js";
|
|
5
|
-
import { Container as
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
]
|
|
39
|
-
}
|
|
40
|
-
) }) });
|
|
41
|
-
}
|
|
4
|
+
import { Container as p } from "../../Container.js";
|
|
5
|
+
import { CTAActions as f } from "../parts.js";
|
|
6
|
+
const v = x(
|
|
7
|
+
({ className: a, title: s, description: o, action: n, secondaryAction: c, align: r = "left", id: i, ...m }, d) => /* @__PURE__ */ e("section", { ref: d, id: i, className: t("w-full py-6 pb-20", a), ...m, children: /* @__PURE__ */ e(p, { children: /* @__PURE__ */ l(
|
|
8
|
+
"div",
|
|
9
|
+
{
|
|
10
|
+
className: "relative overflow-hidden rounded-[1.75rem] px-7 py-16 sm:px-16 sm:py-20",
|
|
11
|
+
style: {
|
|
12
|
+
backgroundColor: "rgb(var(--color-secondary))",
|
|
13
|
+
color: "contrast-color(rgb(var(--color-secondary)))"
|
|
14
|
+
},
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ e("div", { "aria-hidden": !0, className: "pointer-events-none absolute inset-0 grain opacity-[0.09] mix-blend-overlay" }),
|
|
17
|
+
/* @__PURE__ */ l(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
className: t(
|
|
21
|
+
"relative flex flex-col items-start gap-10",
|
|
22
|
+
r === "center" && "items-center text-center",
|
|
23
|
+
"lg:flex-row lg:items-end lg:justify-between"
|
|
24
|
+
),
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ l("div", { className: t("max-w-3xl", r === "center" && "mx-auto"), children: [
|
|
27
|
+
/* @__PURE__ */ e("h2", { className: "font-display text-balance text-4xl font-semibold leading-[1.02] tracking-[-0.03em] sm:text-6xl", children: s }),
|
|
28
|
+
o ? /* @__PURE__ */ e("p", { className: t("mt-5 max-w-xl text-pretty text-base leading-7 sm:text-lg", r === "center" && "mx-auto"), children: o }) : null
|
|
29
|
+
] }),
|
|
30
|
+
/* @__PURE__ */ e(f, { action: n, secondaryAction: c, align: r })
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
) }) })
|
|
42
37
|
);
|
|
43
|
-
|
|
38
|
+
v.displayName = "CTAInverse";
|
|
44
39
|
export {
|
|
45
|
-
|
|
40
|
+
v as CTAInverse
|
|
46
41
|
};
|
|
47
42
|
//# sourceMappingURL=Inverse.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Inverse.js","sources":["../../../../../src/components/CTA/variants/Inverse.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"Inverse.js","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":";;;;;AAOO,MAAMA,IAAaC;AAAA,EACxB,CAAC,EAAE,WAAAC,GAAW,OAAAC,GAAO,aAAAC,GAAa,QAAAC,GAAQ,iBAAAC,GAAiB,OAAAC,IAAQ,QAAQ,IAAAC,GAAI,GAAGC,EAAA,GAASC,MAEvF,gBAAAC,EAAC,WAAA,EAAQ,KAAAD,GAAU,IAAAF,GAAQ,WAAWI,EAAG,qBAAqBV,CAAS,GAAI,GAAGO,GAC5E,UAAA,gBAAAE,EAACE,GAAA,EACC,UAAA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACV,OAAO;AAAA,QACL,iBAAiB;AAAA,QACjB,OAAO;AAAA,MAAA;AAAA,MAGT,UAAA;AAAA,QAAA,gBAAAH,EAAC,OAAA,EAAI,eAAW,IAAC,WAAU,+EAA8E;AAAA,QACzG,gBAAAG;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAWF;AAAA,cACT;AAAA,cACAL,MAAU,YAAY;AAAA,cACtB;AAAA,YAAA;AAAA,YAGF,UAAA;AAAA,cAAA,gBAAAO,EAAC,SAAI,WAAWF,EAAG,aAAaL,MAAU,YAAY,SAAS,GAC7D,UAAA;AAAA,gBAAA,gBAAAI,EAAC,MAAA,EAAG,WAAU,kGACX,UAAAR,GACH;AAAA,gBACCC,IACC,gBAAAO,EAAC,KAAA,EAAE,WAAWC,EAAG,4DAA4DL,MAAU,YAAY,SAAS,GACzG,UAAAH,EAAA,CACH,IACE;AAAA,cAAA,GACN;AAAA,cACA,gBAAAO,EAACI,GAAA,EAAW,QAAAV,GAAgB,iBAAAC,GAAkC,OAAAC,EAAA,CAAc;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MAC9E;AAAA,IAAA;AAAA,EAAA,GAEJ,EAAA,CACF;AAGN;AACAP,EAAW,cAAc;"}
|